diff options
-rw-r--r-- | common/cmd_fpga.c | 59 | ||||
-rw-r--r-- | common/env_common.c | 7 | ||||
-rw-r--r-- | common/env_flash.c | 5 | ||||
-rw-r--r-- | common/env_mgdisk.c | 5 | ||||
-rw-r--r-- | common/env_mmc.c | 5 | ||||
-rw-r--r-- | common/env_nand.c | 5 | ||||
-rw-r--r-- | common/env_nowhere.c | 5 | ||||
-rw-r--r-- | common/env_nvram.c | 6 | ||||
-rw-r--r-- | common/env_onenand.c | 5 | ||||
-rw-r--r-- | common/env_sf.c | 5 | ||||
-rw-r--r-- | doc/git-mailrc | 5 | ||||
-rw-r--r-- | drivers/fpga/spartan3.c | 1 | ||||
-rw-r--r-- | fs/fat/fat.c | 2 | ||||
-rw-r--r-- | include/common.h | 16 | ||||
-rw-r--r-- | include/environment.h | 8 | ||||
-rw-r--r-- | include/phy.h | 1 | ||||
-rw-r--r-- | include/spartan3.h | 9 | ||||
-rw-r--r-- | tools/env/fw_env.h | 4 | ||||
-rw-r--r-- | tools/envcrc.c | 6 | ||||
-rw-r--r-- | tools/mkenvimage.c | 4 |
20 files changed, 73 insertions, 90 deletions
diff --git a/common/cmd_fpga.c b/common/cmd_fpga.c index 8946345f19..915a5c046c 100644 --- a/common/cmd_fpga.c +++ b/common/cmd_fpga.c @@ -33,16 +33,6 @@ #include <fpga.h> #include <malloc.h> -#if 0 -#define FPGA_DEBUG -#endif - -#ifdef FPGA_DEBUG -#define PRINTF(fmt,args...) printf (fmt ,##args) -#else -#define PRINTF(fmt,args...) -#endif - /* Local functions */ static int fpga_get_op (char *opstr); @@ -76,8 +66,9 @@ int fpga_loadbitstream(unsigned long dev, char* fpgadata, size_t size) length = (*dataptr << 8) + *(dataptr+1); dataptr+=2; if (*dataptr++ != 0x61) { - PRINTF ("%s: Design name identifier not recognized in bitstream\n", - __FUNCTION__ ); + debug("%s: Design name identifier not recognized " + "in bitstream\n", + __func__); return FPGA_FAIL; } @@ -90,8 +81,9 @@ int fpga_loadbitstream(unsigned long dev, char* fpgadata, size_t size) /* get part number (identifier, length, string) */ if (*dataptr++ != 0x62) { - printf("%s: Part number identifier not recognized in bitstream\n", - __FUNCTION__ ); + printf("%s: Part number identifier not recognized " + "in bitstream\n", + __func__); return FPGA_FAIL; } @@ -104,7 +96,7 @@ int fpga_loadbitstream(unsigned long dev, char* fpgadata, size_t size) /* get date (identifier, length, string) */ if (*dataptr++ != 0x63) { printf("%s: Date identifier not recognized in bitstream\n", - __FUNCTION__); + __func__); return FPGA_FAIL; } @@ -116,7 +108,8 @@ int fpga_loadbitstream(unsigned long dev, char* fpgadata, size_t size) /* get time (identifier, length, string) */ if (*dataptr++ != 0x64) { - printf("%s: Time identifier not recognized in bitstream\n",__FUNCTION__); + printf("%s: Time identifier not recognized in bitstream\n", + __func__); return FPGA_FAIL; } @@ -129,7 +122,7 @@ int fpga_loadbitstream(unsigned long dev, char* fpgadata, size_t size) /* get fpga data length (identifier, length) */ if (*dataptr++ != 0x65) { printf("%s: Data length identifier not recognized in bitstream\n", - __FUNCTION__); + __func__); return FPGA_FAIL; } swapsize = ((unsigned int) *dataptr <<24) + @@ -183,39 +176,43 @@ int do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) if (fit_parse_subimage (argv[3], (ulong)fpga_data, &fit_addr, &fit_uname)) { fpga_data = (void *)fit_addr; - debug ("* fpga: subimage '%s' from FIT image at 0x%08lx\n", - fit_uname, fit_addr); + debug("* fpga: subimage '%s' from FIT image " + "at 0x%08lx\n", + fit_uname, fit_addr); } else #endif { fpga_data = (void *) simple_strtoul (argv[3], NULL, 16); - debug ("* fpga: cmdline image address = 0x%08lx\n", (ulong)fpga_data); + debug("* fpga: cmdline image address = 0x%08lx\n", + (ulong)fpga_data); } - PRINTF ("%s: fpga_data = 0x%x\n", __FUNCTION__, (uint) fpga_data); + debug("%s: fpga_data = 0x%x\n", __func__, (uint) fpga_data); case 3: /* fpga <op> <dev | data addr> */ dev = (int) simple_strtoul (argv[2], NULL, 16); - PRINTF ("%s: device = %d\n", __FUNCTION__, dev); + debug("%s: device = %d\n", __func__, dev); /* FIXME - this is a really weak test */ if ((argc == 3) && (dev > fpga_count ())) { /* must be buffer ptr */ - PRINTF ("%s: Assuming buffer pointer in arg 3\n", - __FUNCTION__); + debug("%s: Assuming buffer pointer in arg 3\n", + __func__); #if defined(CONFIG_FIT) if (fit_parse_subimage (argv[2], (ulong)fpga_data, &fit_addr, &fit_uname)) { fpga_data = (void *)fit_addr; - debug ("* fpga: subimage '%s' from FIT image at 0x%08lx\n", - fit_uname, fit_addr); + debug("* fpga: subimage '%s' from FIT image " + "at 0x%08lx\n", + fit_uname, fit_addr); } else #endif { fpga_data = (void *) dev; - debug ("* fpga: cmdline image address = 0x%08lx\n", (ulong)fpga_data); + debug("* fpga: cmdline image address = " + "0x%08lx\n", (ulong)fpga_data); } - PRINTF ("%s: fpga_data = 0x%x\n", - __FUNCTION__, (uint) fpga_data); + debug("%s: fpga_data = 0x%x\n", + __func__, (uint) fpga_data); dev = FPGA_INVALID_DEVICE; /* reset device num */ } @@ -224,8 +221,8 @@ int do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) break; default: - PRINTF ("%s: Too many or too few args (%d)\n", - __FUNCTION__, argc); + debug("%s: Too many or too few args (%d)\n", + __func__, argc); op = FPGA_NONE; /* force usage display */ break; } diff --git a/common/env_common.c b/common/env_common.c index 8a7109645d..71811c4d2a 100644 --- a/common/env_common.c +++ b/common/env_common.c @@ -124,6 +124,13 @@ const uchar default_environment[] = { struct hsearch_data env_htab; +static uchar __env_get_char_spec(int index) +{ + return *((uchar *)(gd->env_addr + index)); +} +uchar env_get_char_spec(int) + __attribute__((weak, alias("__env_get_char_spec"))); + static uchar env_get_char_init(int index) { /* if crc was bad, use the default environment */ diff --git a/common/env_flash.c b/common/env_flash.c index a99f850e91..aa970d4400 100644 --- a/common/env_flash.c +++ b/common/env_flash.c @@ -73,11 +73,6 @@ static ulong end_addr_new = CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1; #endif /* CONFIG_ENV_ADDR_REDUND */ -uchar env_get_char_spec(int index) -{ - return *((uchar *)(gd->env_addr + index)); -} - #ifdef CONFIG_ENV_ADDR_REDUND int env_init(void) { diff --git a/common/env_mgdisk.c b/common/env_mgdisk.c index 5dd92e709c..d00e141d5b 100644 --- a/common/env_mgdisk.c +++ b/common/env_mgdisk.c @@ -33,11 +33,6 @@ env_t *env_ptr; DECLARE_GLOBAL_DATA_PTR; -uchar env_get_char_spec(int index) -{ - return *((uchar *)(gd->env_addr + index)); -} - void env_relocate_spec(void) { char buf[CONFIG_ENV_SIZE]; diff --git a/common/env_mmc.c b/common/env_mmc.c index 8441c77ead..0c58ae19b2 100644 --- a/common/env_mmc.c +++ b/common/env_mmc.c @@ -54,11 +54,6 @@ static int __mmc_get_env_addr(struct mmc *mmc, u32 *env_addr) int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr) __attribute__((weak, alias("__mmc_get_env_addr"))); -uchar env_get_char_spec(int index) -{ - return *((uchar *)(gd->env_addr + index)); -} - int env_init(void) { /* use default */ diff --git a/common/env_nand.c b/common/env_nand.c index 3cb75c8962..e8daec9712 100644 --- a/common/env_nand.c +++ b/common/env_nand.c @@ -66,11 +66,6 @@ env_t *env_ptr; DECLARE_GLOBAL_DATA_PTR; -uchar env_get_char_spec(int index) -{ - return *((uchar *)(gd->env_addr + index)); -} - /* * This is called before nand_init() so we can't read NAND to * validate env data. diff --git a/common/env_nowhere.c b/common/env_nowhere.c index 8a3ca1978f..18fcf2ca41 100644 --- a/common/env_nowhere.c +++ b/common/env_nowhere.c @@ -37,11 +37,6 @@ void env_relocate_spec(void) { } -uchar env_get_char_spec(int index) -{ - return *((uchar *)(gd->env_addr + index)); -} - /* * Initialize Environment use * diff --git a/common/env_nvram.c b/common/env_nvram.c index 726eaac55e..6483db39d3 100644 --- a/common/env_nvram.c +++ b/common/env_nvram.c @@ -59,18 +59,16 @@ env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR; char *env_name_spec = "NVRAM"; +#ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE uchar env_get_char_spec(int index) { -#ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE uchar c; nvram_read(&c, CONFIG_ENV_ADDR + index, 1); return c; -#else - return *((uchar *)(gd->env_addr + index)); -#endif } +#endif void env_relocate_spec(void) { diff --git a/common/env_onenand.c b/common/env_onenand.c index 0ad2fc7a4c..652665a189 100644 --- a/common/env_onenand.c +++ b/common/env_onenand.c @@ -44,11 +44,6 @@ char *env_name_spec = "OneNAND"; DECLARE_GLOBAL_DATA_PTR; -uchar env_get_char_spec(int index) -{ - return *((uchar *)(gd->env_addr + index)); -} - void env_relocate_spec(void) { struct mtd_info *mtd = &onenand_mtd; diff --git a/common/env_sf.c b/common/env_sf.c index 592b87088e..bbd472fcf2 100644 --- a/common/env_sf.c +++ b/common/env_sf.c @@ -59,11 +59,6 @@ char *env_name_spec = "SPI Flash"; static struct spi_flash *env_flash; -uchar env_get_char_spec(int index) -{ - return *((uchar *)(gd->env_addr + index)); -} - #if defined(CONFIG_ENV_OFFSET_REDUND) int saveenv(void) { diff --git a/doc/git-mailrc b/doc/git-mailrc index 4039e55f5c..96f1d86e2b 100644 --- a/doc/git-mailrc +++ b/doc/git-mailrc @@ -39,16 +39,17 @@ alias arches arch alias arm uboot, aaribaud alias at91 uboot, reinhardm -alias davinci omap +alias davinci ti alias imx uboot, sbabic alias kirkwood uboot, prafulla -alias omap uboot, Sandeep Paulraj <s-paulraj@ti.com> +alias omap ti alias pxa uboot, marex alias s3c samsung alias s5pc samsung alias samsung uboot, prom alias tegra uboot, Simon Glass <sjg@chromium.org>, Tom Warren <twarren@nvidia.com>, Stephen Warren <swarren@nvidia.com> alias tegra2 tegra +alias ti uboot, Sandeep Paulraj <s-paulraj@ti.com>, Tom Rini <trini@ti.com> alias avr32 uboot, reinhardm diff --git a/drivers/fpga/spartan3.c b/drivers/fpga/spartan3.c index 9207391249..1633a7069d 100644 --- a/drivers/fpga/spartan3.c +++ b/drivers/fpga/spartan3.c @@ -38,7 +38,6 @@ #endif #undef CONFIG_SYS_FPGA_CHECK_BUSY -#undef CONFIG_SYS_FPGA_PROG_FEEDBACK /* Note: The assumption is that we cannot possibly run fast enough to * overrun the device (the Slave Parallel mode can free run at 50MHz). diff --git a/fs/fat/fat.c b/fs/fat/fat.c index dbb8db92f0..1542194a1a 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -633,6 +633,7 @@ static dir_entry *get_dentfromdir (fsdata *mydata, int startsect, } #ifdef CONFIG_SUPPORT_VFAT if (dols && mkcksum(dentptr->name) == prevcksum) { + prevcksum = 0xffff; dentptr++; continue; } @@ -963,6 +964,7 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize, #ifdef CONFIG_SUPPORT_VFAT else if (dols == LS_ROOT && mkcksum(dentptr->name) == prevcksum) { + prevcksum = 0xffff; dentptr++; continue; } diff --git a/include/common.h b/include/common.h index 3df1defab1..59e0b00a91 100644 --- a/include/common.h +++ b/include/common.h @@ -22,10 +22,10 @@ */ #ifndef __COMMON_H_ -#define __COMMON_H_ 1 +#define __COMMON_H_ #undef _LINUX_CONFIG_H -#define _LINUX_CONFIG_H 1 /* avoid reading Linux autoconf.h file */ +#define _LINUX_CONFIG_H /* avoid reading Linux autoconf.h file */ #ifndef __ASSEMBLY__ /* put C only stuff in this section */ @@ -51,18 +51,18 @@ typedef volatile unsigned char vu_char; defined(CONFIG_MPC859DSL) || \ defined(CONFIG_MPC866) || defined(CONFIG_MPC866T) || \ defined(CONFIG_MPC866P) -# define CONFIG_MPC866_FAMILY 1 +# define CONFIG_MPC866_FAMILY #elif defined(CONFIG_MPC870) \ || defined(CONFIG_MPC875) \ || defined(CONFIG_MPC880) \ || defined(CONFIG_MPC885) -# define CONFIG_MPC885_FAMILY 1 +# define CONFIG_MPC885_FAMILY #endif #if defined(CONFIG_MPC860) \ || defined(CONFIG_MPC860T) \ || defined(CONFIG_MPC866_FAMILY) \ || defined(CONFIG_MPC885_FAMILY) -# define CONFIG_MPC86x 1 +# define CONFIG_MPC86x #endif #elif defined(CONFIG_5xx) #include <asm/5xx_immap.h> @@ -77,10 +77,10 @@ typedef volatile unsigned char vu_char; || defined(CONFIG_MPC8248) \ || defined(CONFIG_MPC8271) \ || defined(CONFIG_MPC8272) -#define CONFIG_MPC8272_FAMILY 1 +#define CONFIG_MPC8272_FAMILY #endif #if defined(CONFIG_MPC8272_FAMILY) -#define CONFIG_MPC8260 1 +#define CONFIG_MPC8260 #endif #include <asm/immap_8260.h> #endif @@ -200,7 +200,7 @@ typedef void (interrupt_handler_t)(void *); || defined(CONFIG_8xx_CONS_SCC1) || defined(CONFIG_8xx_CONS_SCC2) \ || defined(CONFIG_8xx_CONS_SCC3) || defined(CONFIG_8xx_CONS_SCC4) -#define CONFIG_SERIAL_MULTI 1 +#define CONFIG_SERIAL_MULTI #endif diff --git a/include/environment.h b/include/environment.h index 3c145af938..1ef44f3cc6 100644 --- a/include/environment.h +++ b/include/environment.h @@ -22,7 +22,7 @@ */ #ifndef _ENVIRONMENT_H_ -#define _ENVIRONMENT_H_ 1 +#define _ENVIRONMENT_H_ /************************************************************************** * @@ -64,10 +64,10 @@ # if (CONFIG_ENV_ADDR >= CONFIG_SYS_MONITOR_BASE) && \ (CONFIG_ENV_ADDR + CONFIG_ENV_SIZE) <= \ (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) -# define ENV_IS_EMBEDDED 1 +# define ENV_IS_EMBEDDED # endif # if defined(CONFIG_ENV_ADDR_REDUND) || defined(CONFIG_ENV_OFFSET_REDUND) -# define CONFIG_SYS_REDUNDAND_ENVIRONMENT 1 +# define CONFIG_SYS_REDUNDAND_ENVIRONMENT # endif # ifdef CONFIG_ENV_IS_EMBEDDED # error "do not define CONFIG_ENV_IS_EMBEDDED in your board config" @@ -120,7 +120,7 @@ extern unsigned long nand_env_oob_offset; * calculated automatically (i.e. NAND), take the board opt-in. */ #if defined(CONFIG_ENV_IS_EMBEDDED) && !defined(ENV_IS_EMBEDDED) -# define ENV_IS_EMBEDDED 1 +# define ENV_IS_EMBEDDED #endif /* The build system likes to know if the env is embedded */ diff --git a/include/phy.h b/include/phy.h index 095f41c43b..bc522d57c3 100644 --- a/include/phy.h +++ b/include/phy.h @@ -224,6 +224,7 @@ int phy_marvell_init(void); int phy_micrel_init(void); int phy_natsemi_init(void); int phy_realtek_init(void); +int phy_smsc_init(void); int phy_teranetics_init(void); int phy_vitesse_init(void); diff --git a/include/spartan3.h b/include/spartan3.h index 67ede4b1d6..89f115694d 100644 --- a/include/spartan3.h +++ b/include/spartan3.h @@ -80,6 +80,12 @@ typedef struct { #define XILINX_XC3S1200E_SIZE 3841184/8 #define XILINX_XC3S1600E_SIZE 5969696/8 +/* + * Spartan-6 : the Spartan-6 family can be programmed + * exactly as the Spartan-3 + */ +#define XILINK_XC6SLX4_SIZE (3713568/8) + /* Descriptor Macros *********************************************************************/ /* Spartan-III devices */ @@ -123,4 +129,7 @@ typedef struct { #define XILINX_XC3S1600E_DESC(iface, fn_table, cookie) \ { Xilinx_Spartan3, iface, XILINX_XC3S1600E_SIZE, fn_table, cookie } +#define XILINX_XC6SLX4_DESC(iface, fn_table, cookie) \ +{ Xilinx_Spartan3, iface, XILINK_XC6SLX4_SIZE, fn_table, cookie } + #endif /* _SPARTAN3_H_ */ diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h index 9258c796d8..2dcb373b62 100644 --- a/tools/env/fw_env.h +++ b/tools/env/fw_env.h @@ -34,8 +34,12 @@ #define DEVICE2_NAME "/dev/mtd2" #define DEVICE1_OFFSET 0x0000 #define ENV1_SIZE 0x4000 +#define DEVICE1_ESIZE 0x4000 +#define DEVICE1_ENVSECTORS 2 #define DEVICE2_OFFSET 0x0000 #define ENV2_SIZE 0x4000 +#define DEVICE2_ESIZE 0x4000 +#define DEVICE2_ENVSECTORS 2 #define CONFIG_BAUDRATE 115200 #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ diff --git a/tools/envcrc.c b/tools/envcrc.c index 51e3f54a38..08d2a8f550 100644 --- a/tools/envcrc.c +++ b/tools/envcrc.c @@ -53,15 +53,15 @@ # endif # if (CONFIG_ENV_ADDR >= CONFIG_SYS_MONITOR_BASE) && \ ((CONFIG_ENV_ADDR + CONFIG_ENV_SIZE) <= (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)) -# define ENV_IS_EMBEDDED 1 +# define ENV_IS_EMBEDDED # endif # if defined(CONFIG_ENV_ADDR_REDUND) || defined(CONFIG_ENV_OFFSET_REDUND) -# define CONFIG_SYS_REDUNDAND_ENVIRONMENT 1 +# define CONFIG_SYS_REDUNDAND_ENVIRONMENT # endif #endif /* CONFIG_ENV_IS_IN_FLASH */ #if defined(ENV_IS_EMBEDDED) && !defined(CONFIG_BUILD_ENVCRC) -# define CONFIG_BUILD_ENVCRC 1 +# define CONFIG_BUILD_ENVCRC #endif #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c index c5ed373b99..8ee2bd00e5 100644 --- a/tools/mkenvimage.c +++ b/tools/mkenvimage.c @@ -122,11 +122,11 @@ int main(int argc, char **argv) return EXIT_SUCCESS; case ':': fprintf(stderr, "Missing argument for option -%c\n", - option); + optopt); usage(argv[0]); return EXIT_FAILURE; default: - fprintf(stderr, "Wrong option -%c\n", option); + fprintf(stderr, "Wrong option -%c\n", optopt); usage(prg); return EXIT_FAILURE; } |