QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1266|回复: 2

关于bootload两个参数的咨询.

[复制链接]
发表于 2005-3-30 18:22:53 | 显示全部楼层 |阅读模式
Compex BIOS for SAMSUNG S3C4510B v1.20-lt

Liu Tao        <[email protected]>


1. Disclaimer
-------------

This program is derived from
"Compex BIOS for SAMSUNG S3C4510B v1.20 (build 0801)"

I am not liable for any damage and liability caused
by the use of this program.


2. Quick Install
----------------

The default system configuration is:
        ROM BANK0:        512K x 8 FLASH                8bit
        ROM BANK1:        1M x 16 FLASH                16bit
        DRAM BANK0:        4M x 16 SDRAM x 2        32bit
        CPU CLOCK:        50MHz

If this configuration fits your board, type 'make',
and the bios image is ./imgtools/img/bios.img ,
burn bios.img to the FLASH at ROM BANK0, and enjoy!
The initial password is "arm".


3. Change system configuration
------------------------------

If the default system configuration doesn't fit your
borad, you can first try quick install, and change
system configuration in BIOS. If the BIOS can't boot
at all, you should edit ./imgtools/param.c to change
the default configuration, and make the new image.


4. Support your FLASH
---------------------

The BIOS supports following FLASH chips:

AM29F040B
AM29LV040B
AM29LV160BT/DT
AM29LV160BB/DB
HY29F040A
HY29LV160T
HY29LV160B
SST39VF040
SST39VF080
SST39VF016

If your FLASH chip is not supported, you should add
the vendor ID and device ID to ./biosapi/flash.h, and
add the detailed chip information to ./biosapi/flash.c

===>上面是一个boot的说明文件,我想请问一下, device ID是什么东西?怎么设置。另外,我把他的flash.h贴出来,请大家帮我分析一下,怎么得到 device ID

==》flash.h
#ifndef __FLASH_H
#define __FLASH_H

#include "board.h"

#define MAX_CHIPS             6

#define DEVICE_TYPE_X8        (8 /
#define DEVICE_TYPE_X16        (16 /
#define DEVICE_TYPE_X32        (32 /

/* Addresses */
#define ADDR_MANUFACTURER                0x0000
#define ADDR_DEVICE_ID                        0x0001
#define ADDR_SECTOR_LOCK                0x0002
#define ADDR_HANDSHAKE                        0x0003
#define ADDR_UNLOCK_1                        0x0555
#define ADDR_UNLOCK_2                        0x02AA

/* Commands */
#define CMD_UNLOCK_DATA_1                0x00AA
#define CMD_UNLOCK_DATA_2                0x0055
#define CMD_MANUFACTURER_UNLOCK_DATA        0x0090
#define CMD_UNLOCK_BYPASS_MODE                0x0020
#define CMD_PROGRAM_UNLOCK_DATA                0x00A0
#define CMD_RESET_DATA                        0x00F0
#define CMD_SECTOR_ERASE_UNLOCK_DATA        0x0080
#define CMD_SECTOR_ERASE_UNLOCK_DATA_2        0x0030
#define CMD_UNLOCK_SECTOR                0x0060


/* Manufacturers */
#define MANUFACTURER_AMD                0x0001
//#define MANUFACTURER_FUJITSU            0x0004
#define MANUFACTURER_FUJITSU                0x0014
#define MANUFACTURER_ATMEL                0x001f
#define MANUFACTURER_ST                        0x0020
#define MANUFACTURER_TOSHIBA                0x0098
#define MANUFACTURER_HYNIX                0x00ad
#define MANUFACTURER_SST                0x00bf
#define MANUFACTURER_MX                        0x00c2
#define MANUFACTURER_AMIC                0x0004

/* AMD */
#define AM29F040B                        0x00a4
#define AM29F800BB                        0x2258
#define AM29F800BT                        0x22d6
#define AM29LV040B                        0x004f
#define AM29LV800BB                        0x225b
#define AM29LV800BT                        0x22da
#define AM29LV160BT_DT                        0x22c4
#define AM29LV160BB_DB                        0x2249

/* HYNIX */
#define HY29F040A                        0x00a4
#define HY29LV160T                        0x22c4
#define HY29LV160B                        0x2249

/* SST */
#define SST39VF040                      0x00D7
#define SST39VF080                      0x00D8
#define SST39VF016                      0x00D9

/* MX */
#define MX29LV160BTC                        0x2249

/* AMIC */
#define A29DL320F                        0x227E

#define D6_MASK                                0x40

struct erase_region {
        unsigned long offset;
        unsigned long erasesize;
        unsigned long numblocks;
};

struct flchip {
        unsigned long start;        /* Offset within the map */
        unsigned long size;
        int buswidth;                /* in octets */
        struct mtd_info *mtd;
        int numeraseregions;
        struct erase_region regions[4];
};

struct mtd_info {
        unsigned long offset; /* Offset within the memory */
        unsigned long size;   /* Total size of the MTD */
        int numchips;       
        struct flchip chips[MAX_CHIPS];
};

struct flash_info {
        const unsigned short mfr_id;
        const unsigned short dev_id;
        const char *name;
        const unsigned long size;
        const int numeraseregions;
        const struct erase_region regions[4];
};


int flash_init(unsigned long rom_base);
int flash_read(unsigned long from,
        unsigned long len, unsigned long *retlen, unsigned char *buf);
int flash_write(unsigned long to,
        unsigned long len, unsigned long *retlen, const unsigned char *buf);
int flash_erase(unsigned long addr, unsigned long size);


#endif /* __FLASH_H */
发表于 2005-3-31 19:02:10 | 显示全部楼层
这个flash中说的device ID肯定是用来标识你的flash设备的...
可以读出来看看..
然后查手册对一下,应该是一样的.
回复

使用道具 举报

发表于 2006-8-29 15:01:12 | 显示全部楼层
通过读操作,可以读出来它的ID号,用来标示你的器件
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-2 10:22 , Processed in 0.041220 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表