Code cleanup
This commit is contained in:
parent
518e2e1ae3
commit
b79a11cc2b
6
Makefile
6
Makefile
|
@ -100,7 +100,7 @@ LIBS += board/$(BOARDDIR)/lib$(BOARD).a
|
||||||
LIBS += cpu/$(CPU)/lib$(CPU).a
|
LIBS += cpu/$(CPU)/lib$(CPU).a
|
||||||
LIBS += lib_$(ARCH)/lib$(ARCH).a
|
LIBS += lib_$(ARCH)/lib$(ARCH).a
|
||||||
LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a \
|
LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a \
|
||||||
fs/reiserfs/libreiserfs.a
|
fs/reiserfs/libreiserfs.a
|
||||||
LIBS += net/libnet.a
|
LIBS += net/libnet.a
|
||||||
LIBS += disk/libdisk.a
|
LIBS += disk/libdisk.a
|
||||||
LIBS += rtc/librtc.a
|
LIBS += rtc/librtc.a
|
||||||
|
@ -976,10 +976,10 @@ omap1610h2_cs0boot_config \
|
||||||
omap1610h2_cs3boot_config : unconfig
|
omap1610h2_cs3boot_config : unconfig
|
||||||
@if [ "$(findstring _cs0boot_, $@)" ] ; then \
|
@if [ "$(findstring _cs0boot_, $@)" ] ; then \
|
||||||
echo "#define CONFIG_CS0_BOOT" >> ./include/config.h ; \
|
echo "#define CONFIG_CS0_BOOT" >> ./include/config.h ; \
|
||||||
echo "Configured for CS0 boot"; \
|
echo "... configured for CS0 boot"; \
|
||||||
else \
|
else \
|
||||||
echo "#define CONFIG_CS3_BOOT" >> ./include/config.h ; \
|
echo "#define CONFIG_CS3_BOOT" >> ./include/config.h ; \
|
||||||
echo "Configured for CS3 boot"; \
|
echo "... configured for CS3 boot"; \
|
||||||
fi;
|
fi;
|
||||||
@./mkconfig -a $(call xtract_omap1610xxx,$@) arm arm926ejs omap1610inn
|
@./mkconfig -a $(call xtract_omap1610xxx,$@) arm arm926ejs omap1610inn
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ OBJS = $(BOARD).o
|
||||||
SOBJS =
|
SOBJS =
|
||||||
|
|
||||||
$(LIB): .depend $(OBJS) $(SOBJS)
|
$(LIB): .depend $(OBJS) $(SOBJS)
|
||||||
$(AR) crv $@ $^
|
$(AR) crv $@ $(OBJS) $(SOBJS)
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
|
||||||
|
|
|
@ -183,7 +183,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||||
puts ( "\n"
|
puts ( "\n"
|
||||||
"ip_addr = ");
|
"ip_addr = ");
|
||||||
print_IPaddr (bd->bi_ip_addr);
|
print_IPaddr (bd->bi_ip_addr);
|
||||||
puts ( "\n"
|
printf ("\n"
|
||||||
"baudrate = %d bps\n", bd->bi_baudrate);
|
"baudrate = %d bps\n", bd->bi_baudrate);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -206,5 +206,3 @@ int video_get_params (struct ctfb_res_modes *pPar, char *penv)
|
||||||
}
|
}
|
||||||
return bpp;
|
return bpp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -86,4 +86,3 @@ extern const struct ctfb_vesa_modes vesa_modes[];
|
||||||
extern const struct ctfb_res_modes res_mode_init[];
|
extern const struct ctfb_res_modes res_mode_init[];
|
||||||
|
|
||||||
int video_get_params (struct ctfb_res_modes *pPar, char *penv);
|
int video_get_params (struct ctfb_res_modes *pPar, char *penv);
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ int reiserfs_devread (int sector, int byte_offset, int byte_len, char *buf)
|
||||||
if (sector < 0
|
if (sector < 0
|
||||||
|| ((sector + ((byte_offset + byte_len - 1) >> SECTOR_BITS))
|
|| ((sector + ((byte_offset + byte_len - 1) >> SECTOR_BITS))
|
||||||
>= part_info.size)) {
|
>= part_info.size)) {
|
||||||
// errnum = ERR_OUTSIDE_PART;
|
/* errnum = ERR_OUTSIDE_PART; */
|
||||||
printf (" ** reiserfs_devread() read outside partition\n");
|
printf (" ** reiserfs_devread() read outside partition\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,6 @@ const char *bb_mode_string(int mode)
|
||||||
|
|
||||||
/* The previous version used "0pcCd?bB-?l?s???". However, the '0', 'C',
|
/* The previous version used "0pcCd?bB-?l?s???". However, the '0', 'C',
|
||||||
* and 'B' types don't appear to be available on linux. So I removed them. */
|
* and 'B' types don't appear to be available on linux. So I removed them. */
|
||||||
//static const char type_chars[16] = "?pc?d?b?-?l?s???";
|
|
||||||
static const char type_chars[16] = "?pc?d?b?-?l?s???";
|
static const char type_chars[16] = "?pc?d?b?-?l?s???";
|
||||||
/* 0123456789abcdef */
|
/* 0123456789abcdef */
|
||||||
static const char mode_chars[7] = "rwxSTst";
|
static const char mode_chars[7] = "rwxSTst";
|
||||||
|
|
|
@ -285,10 +285,10 @@ struct disk_child {
|
||||||
#define dc_block_number(dc_p) (__le32_to_cpu((dc_p)->dc_block_number))
|
#define dc_block_number(dc_p) (__le32_to_cpu((dc_p)->dc_block_number))
|
||||||
|
|
||||||
|
|
||||||
//
|
/*
|
||||||
// old stat data is 32 bytes long. We are going to distinguish new one by
|
* old stat data is 32 bytes long. We are going to distinguish new one by
|
||||||
// different size
|
* different size
|
||||||
//
|
*/
|
||||||
struct stat_data_v1
|
struct stat_data_v1
|
||||||
{
|
{
|
||||||
__u16 sd_mode; /* file type, permissions */
|
__u16 sd_mode; /* file type, permissions */
|
||||||
|
@ -315,7 +315,6 @@ struct stat_data_v1
|
||||||
} __attribute__ ((__packed__));
|
} __attribute__ ((__packed__));
|
||||||
|
|
||||||
#define stat_data_v1(ih) (ih_version(ih) == ITEM_VERSION_1)
|
#define stat_data_v1(ih) (ih_version(ih) == ITEM_VERSION_1)
|
||||||
//#define sd_v1_mode(sdp) (__le16_to_cpu((sdp)->sd_mode))
|
|
||||||
#define sd_v1_mode(sdp) ((sdp)->sd_mode)
|
#define sd_v1_mode(sdp) ((sdp)->sd_mode)
|
||||||
#define sd_v1_nlink(sdp) (__le16_to_cpu((sdp)->sd_nlink))
|
#define sd_v1_nlink(sdp) (__le16_to_cpu((sdp)->sd_nlink))
|
||||||
#define sd_v1_uid(sdp) (__le16_to_cpu((sdp)->sd_uid))
|
#define sd_v1_uid(sdp) (__le16_to_cpu((sdp)->sd_uid))
|
||||||
|
@ -339,7 +338,7 @@ struct stat_data {
|
||||||
union {
|
union {
|
||||||
__u32 sd_rdev;
|
__u32 sd_rdev;
|
||||||
__u32 sd_generation;
|
__u32 sd_generation;
|
||||||
//__u32 sd_first_direct_byte;
|
/*__u32 sd_first_direct_byte; */
|
||||||
/* first byte of file which is stored in a
|
/* first byte of file which is stored in a
|
||||||
direct item: except that if it equals 1
|
direct item: except that if it equals 1
|
||||||
it is a symlink and if it equals
|
it is a symlink and if it equals
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
CFG_CMD_MEMORY | \
|
CFG_CMD_MEMORY | \
|
||||||
CFG_CMD_LOADS | \
|
CFG_CMD_LOADS | \
|
||||||
CFG_CMD_LOADB)
|
CFG_CMD_LOADB)
|
||||||
#define CONFIG_CMD_NORMAL (CONFIG_CMD_DFL & ~CFG_CMD_BOOTD)
|
#define CONFIG_CMD_NORMAL (CONFIG_CMD_DFL & ~CFG_CMD_BOOTD & ~CFG_CMD_REISER)
|
||||||
#define CONFIG_CMD_GDB (CONFIG_CMD_NORMAL | CFG_CMD_KGDB)
|
#define CONFIG_CMD_GDB (CONFIG_CMD_NORMAL | CFG_CMD_KGDB)
|
||||||
#define CONFIG_CMD_FULL (CFG_CMD_ALL & ~CFG_CMD_BEDBUG \
|
#define CONFIG_CMD_FULL (CFG_CMD_ALL & ~CFG_CMD_BEDBUG \
|
||||||
& ~CFG_CMD_BMP \
|
& ~CFG_CMD_BMP \
|
||||||
|
@ -103,6 +103,7 @@
|
||||||
& ~CFG_CMD_NAND \
|
& ~CFG_CMD_NAND \
|
||||||
& ~CFG_CMD_PCI \
|
& ~CFG_CMD_PCI \
|
||||||
& ~CFG_CMD_PCMCIA \
|
& ~CFG_CMD_PCMCIA \
|
||||||
|
& ~CFG_CMD_REISER \
|
||||||
& ~CFG_CMD_SCSI \
|
& ~CFG_CMD_SCSI \
|
||||||
& ~CFG_CMD_SPI \
|
& ~CFG_CMD_SPI \
|
||||||
& ~CFG_CMD_USB \
|
& ~CFG_CMD_USB \
|
||||||
|
|
|
@ -170,6 +170,7 @@
|
||||||
CFG_CMD_NAND | \
|
CFG_CMD_NAND | \
|
||||||
CFG_CMD_PCI | \
|
CFG_CMD_PCI | \
|
||||||
CFG_CMD_PCMCIA | \
|
CFG_CMD_PCMCIA | \
|
||||||
|
CFG_CMD_REISER | \
|
||||||
CFG_CMD_SCSI | \
|
CFG_CMD_SCSI | \
|
||||||
CFG_CMD_SPI | \
|
CFG_CMD_SPI | \
|
||||||
CFG_CMD_USB | \
|
CFG_CMD_USB | \
|
||||||
|
|
|
@ -164,6 +164,7 @@
|
||||||
CFG_CMD_MMC | \
|
CFG_CMD_MMC | \
|
||||||
CFG_CMD_NAND | \
|
CFG_CMD_NAND | \
|
||||||
CFG_CMD_PCMCIA | \
|
CFG_CMD_PCMCIA | \
|
||||||
|
CFG_CMD_REISER | \
|
||||||
CFG_CMD_SCSI | \
|
CFG_CMD_SCSI | \
|
||||||
CFG_CMD_SPI | \
|
CFG_CMD_SPI | \
|
||||||
CFG_CMD_VFD | \
|
CFG_CMD_VFD | \
|
||||||
|
@ -172,8 +173,8 @@
|
||||||
/* Define a command string that is automatically executed when no character
|
/* Define a command string that is automatically executed when no character
|
||||||
* is read on the console interface withing "Boot Delay" after reset.
|
* is read on the console interface withing "Boot Delay" after reset.
|
||||||
*/
|
*/
|
||||||
#define CONFIG_BOOT_ROOT_INITRD 0 /* Use ram disk for the root file system */
|
#undef CONFIG_BOOT_ROOT_INITRD /* Use ram disk for the root file system */
|
||||||
#define CONFIG_BOOT_ROOT_NFS 1 /* Use a NFS mounted root file system */
|
#define CONFIG_BOOT_ROOT_NFS /* Use a NFS mounted root file system */
|
||||||
|
|
||||||
#ifdef CONFIG_BOOT_ROOT_INITRD
|
#ifdef CONFIG_BOOT_ROOT_INITRD
|
||||||
#define CONFIG_BOOTCOMMAND \
|
#define CONFIG_BOOTCOMMAND \
|
||||||
|
|
|
@ -694,6 +694,4 @@
|
||||||
|
|
||||||
#endif /* CONFIG_NO_SERIAL_EEPROM */
|
#endif /* CONFIG_NO_SERIAL_EEPROM */
|
||||||
|
|
||||||
#define CFG_OPB_FREQ 50000000
|
|
||||||
|
|
||||||
#endif /* __CONFIG_H */
|
#endif /* __CONFIG_H */
|
||||||
|
|
|
@ -89,35 +89,32 @@
|
||||||
#define CONFIG_HARD_I2C
|
#define CONFIG_HARD_I2C
|
||||||
#define CFG_I2C_SPEED 40000
|
#define CFG_I2C_SPEED 40000
|
||||||
#define CFG_I2C_SLAVE 0xfe
|
#define CFG_I2C_SLAVE 0xfe
|
||||||
#define CFG_I2C_EEPROM_ADDR 0x50
|
#define CFG_I2C_EEPROM_ADDR 0x50
|
||||||
#define CFG_I2C_EEPROM_ADDR_LEN 1
|
#define CFG_I2C_EEPROM_ADDR_LEN 1
|
||||||
#define CFG_EEPROM_WRITE_BITS 4
|
#define CFG_EEPROM_WRITE_BITS 4
|
||||||
#define CFG_EEPROM_WRITE_DELAY_MS 10
|
#define CFG_EEPROM_WRITE_DELAY_MS 10
|
||||||
|
|
||||||
#define CONFIG_COMMANDS ( CFG_CMD_ALL & \
|
#define CONFIG_COMMANDS ( CFG_CMD_ALL & \
|
||||||
~CFG_CMD_PCMCIA & \
|
|
||||||
~CFG_CMD_IDE & \
|
|
||||||
~CFG_CMD_PCI & \
|
|
||||||
~CFG_CMD_FDC & \
|
|
||||||
~CFG_CMD_HWFLOW & \
|
|
||||||
~CFG_CMD_FDOS & \
|
|
||||||
~CFG_CMD_SCSI & \
|
|
||||||
~CFG_CMD_SETGETDCR & \
|
|
||||||
~CFG_CMD_BSP & \
|
~CFG_CMD_BSP & \
|
||||||
~CFG_CMD_USB & \
|
~CFG_CMD_DATE & \
|
||||||
~CFG_CMD_VFD & \
|
|
||||||
~CFG_CMD_SPI & \
|
|
||||||
/* ~CFG_CMD_I2C & */ \
|
|
||||||
~CFG_CMD_IRQ & \
|
|
||||||
~CFG_CMD_NAND & \
|
|
||||||
~CFG_CMD_JFFS2 & \
|
|
||||||
~CFG_CMD_DTT & \
|
~CFG_CMD_DTT & \
|
||||||
|
~CFG_CMD_FDC & \
|
||||||
|
~CFG_CMD_FDOS & \
|
||||||
|
~CFG_CMD_HWFLOW & \
|
||||||
|
~CFG_CMD_IDE & \
|
||||||
|
~CFG_CMD_IRQ & \
|
||||||
|
~CFG_CMD_JFFS2 & \
|
||||||
~CFG_CMD_MII & \
|
~CFG_CMD_MII & \
|
||||||
~CFG_CMD_MMC & \
|
~CFG_CMD_MMC & \
|
||||||
/*~CFG_CMD_NET &*/ \
|
~CFG_CMD_NAND & \
|
||||||
/*~CFG_CMD_ELF &*/ \
|
~CFG_CMD_PCI & \
|
||||||
/* ~CFG_CMD_EEPROM & */ \
|
~CFG_CMD_PCMCIA & \
|
||||||
~CFG_CMD_DATE )
|
~CFG_CMD_REISER & \
|
||||||
|
~CFG_CMD_SCSI & \
|
||||||
|
~CFG_CMD_SETGETDCR & \
|
||||||
|
~CFG_CMD_SPI & \
|
||||||
|
~CFG_CMD_USB & \
|
||||||
|
~CFG_CMD_VFD )
|
||||||
|
|
||||||
/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
|
/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
|
||||||
#include <cmd_confdefs.h>
|
#include <cmd_confdefs.h>
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
#define CONFIG_COMMANDS ( CONFIG_CMD_DFL | \
|
#define CONFIG_COMMANDS ( CONFIG_CMD_DFL | \
|
||||||
ADD_PCI_CMD | \
|
ADD_PCI_CMD | \
|
||||||
ADD_USB_CMD | \
|
ADD_USB_CMD | \
|
||||||
ADD_IDE_CMD | \
|
ADD_IDE_CMD | \
|
||||||
CFG_CMD_ASKENV | \
|
CFG_CMD_ASKENV | \
|
||||||
CFG_CMD_DATE | \
|
CFG_CMD_DATE | \
|
||||||
CFG_CMD_DHCP | \
|
CFG_CMD_DHCP | \
|
||||||
|
|
|
@ -130,6 +130,7 @@
|
||||||
CFG_CMD_NAND | \
|
CFG_CMD_NAND | \
|
||||||
CFG_CMD_PCI | \
|
CFG_CMD_PCI | \
|
||||||
CFG_CMD_PCMCIA | \
|
CFG_CMD_PCMCIA | \
|
||||||
|
CFG_CMD_REISER | \
|
||||||
CFG_CMD_SCSI | \
|
CFG_CMD_SCSI | \
|
||||||
CFG_CMD_SPI | \
|
CFG_CMD_SPI | \
|
||||||
CFG_CMD_USB | \
|
CFG_CMD_USB | \
|
||||||
|
|
|
@ -288,6 +288,7 @@
|
||||||
~CFG_CMD_PCI & \
|
~CFG_CMD_PCI & \
|
||||||
~CFG_CMD_PCMCIA & \
|
~CFG_CMD_PCMCIA & \
|
||||||
~CFG_CMD_SCSI & \
|
~CFG_CMD_SCSI & \
|
||||||
|
~CFG_CMD_REISER & \
|
||||||
~CFG_CMD_SPI & \
|
~CFG_CMD_SPI & \
|
||||||
~CFG_CMD_USB & \
|
~CFG_CMD_USB & \
|
||||||
~CFG_CMD_VFD & \
|
~CFG_CMD_VFD & \
|
||||||
|
|
|
@ -188,6 +188,7 @@
|
||||||
CFG_CMD_PCMCIA | \
|
CFG_CMD_PCMCIA | \
|
||||||
CFG_CMD_PCI | \
|
CFG_CMD_PCI | \
|
||||||
CFG_CMD_USB | \
|
CFG_CMD_USB | \
|
||||||
|
CFG_CMD_REISER | \
|
||||||
CFG_CMD_SCSI | \
|
CFG_CMD_SCSI | \
|
||||||
CFG_CMD_SPI | \
|
CFG_CMD_SPI | \
|
||||||
CFG_CMD_VFD ) )
|
CFG_CMD_VFD ) )
|
||||||
|
|
|
@ -238,8 +238,8 @@
|
||||||
/* Define a command string that is automatically executed when no character
|
/* Define a command string that is automatically executed when no character
|
||||||
* is read on the console interface withing "Boot Delay" after reset.
|
* is read on the console interface withing "Boot Delay" after reset.
|
||||||
*/
|
*/
|
||||||
#define CONFIG_BOOT_ROOT_INITRD 0 /* Use ram disk for the root file system */
|
#undef CONFIG_BOOT_ROOT_INITRD /* Use ram disk for the root file system */
|
||||||
#define CONFIG_BOOT_ROOT_NFS 1 /* Use a NFS mounted root file system */
|
#define CONFIG_BOOT_ROOT_NFS /* Use a NFS mounted root file system */
|
||||||
|
|
||||||
#ifdef CONFIG_BOOT_ROOT_INITRD
|
#ifdef CONFIG_BOOT_ROOT_INITRD
|
||||||
#define CONFIG_BOOTCOMMAND \
|
#define CONFIG_BOOTCOMMAND \
|
||||||
|
|
|
@ -443,8 +443,8 @@
|
||||||
/* Define a command string that is automatically executed when no character
|
/* Define a command string that is automatically executed when no character
|
||||||
* is read on the console interface withing "Boot Delay" after reset.
|
* is read on the console interface withing "Boot Delay" after reset.
|
||||||
*/
|
*/
|
||||||
#define CONFIG_BOOT_ROOT_INITRD 0 /* Use ram disk for the root file system */
|
#undef CONFIG_BOOT_ROOT_INITRD /* Use ram disk for the root file system */
|
||||||
#define CONFIG_BOOT_ROOT_NFS 1 /* Use a NFS mounted root file system */
|
#define CONFIG_BOOT_ROOT_NFS /* Use a NFS mounted root file system */
|
||||||
|
|
||||||
#ifdef CONFIG_BOOT_ROOT_INITRD
|
#ifdef CONFIG_BOOT_ROOT_INITRD
|
||||||
#define CONFIG_BOOTCOMMAND \
|
#define CONFIG_BOOTCOMMAND \
|
||||||
|
|
|
@ -389,8 +389,8 @@
|
||||||
/* Define a command string that is automatically executed when no character
|
/* Define a command string that is automatically executed when no character
|
||||||
* is read on the console interface withing "Boot Delay" after reset.
|
* is read on the console interface withing "Boot Delay" after reset.
|
||||||
*/
|
*/
|
||||||
#define CONFIG_BOOT_ROOT_INITRD 0 /* Use ram disk for the root file system */
|
#undef CONFIG_BOOT_ROOT_INITRD /* Use ram disk for the root file system */
|
||||||
#define CONFIG_BOOT_ROOT_NFS 1 /* Use a NFS mounted root file system */
|
#define CONFIG_BOOT_ROOT_NFS /* Use a NFS mounted root file system */
|
||||||
|
|
||||||
#ifdef CONFIG_BOOT_ROOT_INITRD
|
#ifdef CONFIG_BOOT_ROOT_INITRD
|
||||||
#define CONFIG_BOOTCOMMAND \
|
#define CONFIG_BOOTCOMMAND \
|
||||||
|
|
|
@ -80,4 +80,3 @@ extern int reiserfs_ls (char *dirname);
|
||||||
extern int reiserfs_open (char *filename);
|
extern int reiserfs_open (char *filename);
|
||||||
extern int reiserfs_read (char *buf, unsigned len);
|
extern int reiserfs_read (char *buf, unsigned len);
|
||||||
extern int reiserfs_mount (unsigned part_length);
|
extern int reiserfs_mount (unsigned part_length);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue