Re: [U-Boot] [PATCH] imx: Add support for the SabreSD shipped with i.MX6DL
Hello Wolfgang, Le 18/04/2013 19:37, Wolfgang Denk a écrit : Dear Pierre Aubert, In message 1366296086-22394-1-git-send-email-p.aub...@staubli.com you wrote: The SabreSD platform is available with i.MX6Q or i.MX6DL. This patch adds the support of the i.MX6DL. The config file and the board directory are renamed to remove the reference to the MX6Q. Formal issues: - entry to MAINTAINERS file missing Fabio Estevam is already the maintainer of the SabreSD. I didn't add any new boad, I've just add the support for the i.MX6DL on this board. I will update the MAINTAINERS file. - there are 2 checkpatch warnings (please, no spaces at the start of a line) that need to be fixed. Will be fixed int checkboard(void) { - puts(Board: MX6Q-SabreSD\n); - +#ifdef CONFIG_MX6Q +puts(Board: MX6Q-SabreSD\n); +#else +puts(Board: MX6DL-SabreSD\n); +#endif Can we please avoid such #ifdef's? Here, we could for example refer to the board name (CONFIG_SYS_BOARD if you like the name, or some custom defined CONFIG_BOARD_NAME like other boards do). The board name in MX6-SabreSD. The Soc type (dual or quad core) is already printed by print_cpuinfo. Best regards, Wolfgang Denk Best regards Pierre Aubert ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx: Add support for the SabreSD shipped with i.MX6DL
On 18/04/2013 19:37, Wolfgang Denk wrote: Dear Pierre Aubert, In message 1366296086-22394-1-git-send-email-p.aub...@staubli.com you wrote: The SabreSD platform is available with i.MX6Q or i.MX6DL. This patch adds the support of the i.MX6DL. The config file and the board directory are renamed to remove the reference to the MX6Q. Formal issues: - entry to MAINTAINERS file missing - there are 2 checkpatch warnings (please, no spaces at the start of a line) that need to be fixed. int checkboard(void) { -puts(Board: MX6Q-SabreSD\n); - +#ifdef CONFIG_MX6Q +puts(Board: MX6Q-SabreSD\n); +#else +puts(Board: MX6DL-SabreSD\n); +#endif Can we please avoid such #ifdef's? Here, we could for example refer to the board name (CONFIG_SYS_BOARD if you like the name, or some custom defined CONFIG_BOARD_NAME like other boards do). And who does set CONFIG_MX6Q ? You drop it, but I do not see who sets it. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/6] imx: Align the imximage header and payload to multiples of 4k
Dear Marek Vasut, On Friday, April 19, 2013 6:10:50 AM, Marek Vasut wrote: The MX53 ROM loads the data from NAND in multiples of pages and supports maximum page size of 4k. Thus, align the image and header to 4k to be safe from ROM bugs. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- tools/imximage.c | 11 +++ tools/imximage.h | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/imximage.c b/tools/imximage.c index fa308c9..c018562 100644 --- a/tools/imximage.c +++ b/tools/imximage.c @@ -518,11 +518,14 @@ static void imximage_set_header(void *ptr, struct stat *sbuf, int ifd, /* * ROM bug alert - * mx53 only loads 512 byte multiples. - * The remaining fraction of a block bytes would - * not be loaded. + * + * MX53 only loads 512 byte multiples in case of SD boot. + * MX53 only loads NAND page multiples in case of NAND boot and + * supports up to 4096 byte large pages, thus align to 4096. + * + * The remaining fraction of a block bytes would not be loaded! */ - *header_size_ptr = ROUND(sbuf-st_size + imxhdr-flash_offset, 512); + *header_size_ptr = ROUND(sbuf-st_size + imxhdr-flash_offset, 4096); } int imximage_check_params(struct mkimage_params *params) diff --git a/tools/imximage.h b/tools/imximage.h index 42b6090..dfd2e9e 100644 --- a/tools/imximage.h +++ b/tools/imximage.h @@ -151,13 +151,14 @@ typedef struct { dcd_v2_t dcd_table; } imx_header_v2_t; +/* The header must be aligned to 4k on MX53 for NAND boot */ struct imx_header { union { imx_header_v1_t hdr_v1; imx_header_v2_t hdr_v2; } header; uint32_t flash_offset; -}; +} __attribute__((aligned(4096))); typedef void (*set_dcd_val_t)(struct imx_header *imxhdr, char *name, int lineno, -- 1.7.11.7 Reviewed-by: Benoît Thébaudeau benoit.thebaud...@advansee.com Best regards, Benoît ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx: Add support for the SabreSD shipped with i.MX6DL
Le 19/04/2013 10:15, Stefano Babic a écrit : int checkboard(void) { - puts(Board: MX6Q-SabreSD\n); - +#ifdef CONFIG_MX6Q +puts(Board: MX6Q-SabreSD\n); +#else +puts(Board: MX6DL-SabreSD\n); +#endif Can we please avoid such #ifdef's? Here, we could for example refer to the board name (CONFIG_SYS_BOARD if you like the name, or some custom defined CONFIG_BOARD_NAME like other boards do). And who does set CONFIG_MX6Q ? You drop it, but I do not see who sets it. It is set in boards.cfg: -mx6qsabresd arm armv7 mx6qsabresd freescale mx6 mx6qsabresd:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg +mx6qsabresd arm armv7 mx6sabresd freescale mx6 mx6sabresd:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg,MX6Q Best regards, Stefano Babic Best regards Pierre Aubert ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx: Add support for the SabreSD shipped with i.MX6DL
Hi Stefano, Le Fri, 19 Apr 2013 10:15:49 +0200, Stefano Babic sba...@denx.de a écrit : On 18/04/2013 19:37, Wolfgang Denk wrote: Dear Pierre Aubert, In message 1366296086-22394-1-git-send-email-p.aub...@staubli.com you wrote: The SabreSD platform is available with i.MX6Q or i.MX6DL. This patch adds the support of the i.MX6DL. The config file and the board directory are renamed to remove the reference to the MX6Q. Formal issues: - entry to MAINTAINERS file missing - there are 2 checkpatch warnings (please, no spaces at the start of a line) that need to be fixed. int checkboard(void) { - puts(Board: MX6Q-SabreSD\n); - +#ifdef CONFIG_MX6Q +puts(Board: MX6Q-SabreSD\n); +#else +puts(Board: MX6DL-SabreSD\n); +#endif Can we please avoid such #ifdef's? Here, we could for example refer to the board name (CONFIG_SYS_BOARD if you like the name, or some custom defined CONFIG_BOARD_NAME like other boards do). And who does set CONFIG_MX6Q ? You drop it, but I do not see who sets it. that's done in boards.cfg : +++ b/boards.cfg +mx6qsabreautoarm armv7 mx6qsabreauto freescale mx6 mx6qsabreauto:IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg,MX6Q Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/6] nand: Add SPL_NAND support to mxc_nand_spl
Dear Marek Vasut, On Friday, April 19, 2013 6:10:51 AM, Marek Vasut wrote: Add support for generic NAND SPL via the SPL framework into the mxc_nand_spl driver. This is basically just a simple rename and publication of the already implemented functions. To avoid the old function which are used with the nand_spl/ stuff getting in the way of NAND SPL framework, the macro CONFIG_SPL_NAND_LEGACY was introduced and two remaining legacy boards were adjusted. These board need to be either fixed or removed in the long run, but I don't have either. Also make sure the requested payload is aligned to full pages, otherwise this simple driver fails to load the last page. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- drivers/mtd/nand/mxc_nand_spl.c | 13 ++--- include/configs/mx31pdk.h | 1 + include/configs/tx25.h | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/mxc_nand_spl.c b/drivers/mtd/nand/mxc_nand_spl.c index 09f23c3..8ff03c9 100644 --- a/drivers/mtd/nand/mxc_nand_spl.c +++ b/drivers/mtd/nand/mxc_nand_spl.c @@ -290,7 +290,7 @@ static int is_badblock(int pagenumber) return 0; } -static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) +int nand_spl_load_image(uint32_t from, unsigned int size, void *buf) { int i; unsigned int page; @@ -303,6 +303,7 @@ static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) page = from / CONFIG_SYS_NAND_PAGE_SIZE; i = 0; + size = roundup(size, CONFIG_SYS_NAND_PAGE_SIZE); while (i size / CONFIG_SYS_NAND_PAGE_SIZE) { if (nfc_read_page(page, buf) 0) return -1; @@ -332,6 +333,7 @@ static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) return 0; } +#ifdef CONFIG_SPL_NAND_SUPPORT_LEGACY /* * The main entry for NAND booting. It's necessary that SDRAM is already * configured and available since this code loads the main U-Boot image @@ -345,8 +347,9 @@ void nand_boot(void) * CONFIG_SYS_NAND_U_BOOT_OFFS and CONFIG_SYS_NAND_U_BOOT_SIZE must * be aligned to full pages */ - if (!nand_load(CONFIG_SYS_NAND_U_BOOT_OFFS, CONFIG_SYS_NAND_U_BOOT_SIZE, -(uchar *)CONFIG_SYS_NAND_U_BOOT_DST)) { + if (!nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS, + CONFIG_SYS_NAND_U_BOOT_SIZE, + (uchar *)CONFIG_SYS_NAND_U_BOOT_DST)) { /* Copy from NAND successful, start U-boot */ uboot = (void *)CONFIG_SYS_NAND_U_BOOT_START; uboot(); @@ -364,3 +367,7 @@ void hang(void) /* Loop forever */ while (1) ; } +#endif + +void nand_init(void) {} +void nand_deselect(void) {} diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h index 1754595..217552e 100644 --- a/include/configs/mx31pdk.h +++ b/include/configs/mx31pdk.h @@ -50,6 +50,7 @@ #define CONFIG_SPL_LDSCRIPT arch/$(ARCH)/cpu/u-boot-spl.lds #define CONFIG_SPL_MAX_SIZE 2048 #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SUPPORT_LEGACY #define CONFIG_SPL_TEXT_BASE 0x87dc #define CONFIG_SYS_TEXT_BASE 0x87e0 diff --git a/include/configs/tx25.h b/include/configs/tx25.h index e72f8f6..7c362d0 100644 --- a/include/configs/tx25.h +++ b/include/configs/tx25.h @@ -37,6 +37,7 @@ #define CONFIG_SPL_LDSCRIPT arch/$(ARCH)/cpu/u-boot-spl.lds #define CONFIG_SPL_MAX_SIZE 2048 #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SUPPORT_LEGACY #define CONFIG_SPL_TEXT_BASE 0x810c #define CONFIG_SYS_TEXT_BASE 0x8120 -- 1.7.11.7 This is not about legacy vs. non-legacy. This is about basic vs. more featured SPL because of SPL size constraints. So what about dropping CONFIG_SPL_NAND_SUPPORT_LEGACY and testing for CONFIG_SPL_FRAMEWORK definition instead? Best regards, Benoît ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 1/5] microblaze: fix style in board.c
Make microblaze's board.c checkpatch clean. Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com Reviewed-by: Michal Simek mon...@monstr.eu --- Changes in v3: * shorten error string for 'no FDT' Changes in v2: None arch/microblaze/lib/board.c | 63 +-- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index a7c2f76..4c4f36b 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -71,15 +71,15 @@ void board_init_f(ulong not_used) { bd_t *bd; init_fnc_t **init_fnc_ptr; - gd = (gd_t *) (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_GBL_DATA_OFFSET); - bd = (bd_t *) (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_GBL_DATA_OFFSET \ + gd = (gd_t *)(CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_GBL_DATA_OFFSET); + bd = (bd_t *)(CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_GBL_DATA_OFFSET - GENERATED_BD_INFO_SIZE); #if defined(CONFIG_CMD_FLASH) ulong flash_size = 0; #endif asm (nop);/* FIXME gd is not initialize - wait */ - memset ((void *)gd, 0, GENERATED_GBL_DATA_SIZE); - memset ((void *)bd, 0, GENERATED_BD_INFO_SIZE); + memset((void *)gd, 0, GENERATED_GBL_DATA_SIZE); + memset((void *)bd, 0, GENERATED_BD_INFO_SIZE); gd-bd = bd; gd-baudrate = CONFIG_BAUDRATE; bd-bi_baudrate = CONFIG_BAUDRATE; @@ -105,57 +105,55 @@ void board_init_f(ulong not_used) * aka CONFIG_SYS_MONITOR_BASE - Note there is no need for reloc_off * as our monitory code is run from SDRAM */ - mem_malloc_init (CONFIG_SYS_MALLOC_BASE, CONFIG_SYS_MALLOC_LEN); + mem_malloc_init(CONFIG_SYS_MALLOC_BASE, CONFIG_SYS_MALLOC_LEN); serial_initialize(); for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { - WATCHDOG_RESET (); - if ((*init_fnc_ptr) () != 0) { - hang (); - } + WATCHDOG_RESET(); + if ((*init_fnc_ptr) () != 0) + hang(); } #ifdef CONFIG_OF_CONTROL /* For now, put this check after the console is ready */ - if (fdtdec_prepare_fdt()) { - panic(** CONFIG_OF_CONTROL defined but no FDT - please see - doc/README.fdt-control); - } else + if (fdtdec_prepare_fdt()) + panic(** No FDT - please see doc/README.fdt-control); + else printf(DTB: 0x%x\n, (u32)gd-fdt_blob); #endif - puts (SDRAM :\n); - printf (\t\tIcache:%s\n, icache_status() ? ON : OFF); - printf (\t\tDcache:%s\n, dcache_status() ? ON : OFF); - printf (\tU-Boot Start:0x%08x\n, CONFIG_SYS_TEXT_BASE); + puts(SDRAM :\n); + printf(\t\tIcache:%s\n, icache_status() ? ON : OFF); + printf(\t\tDcache:%s\n, dcache_status() ? ON : OFF); + printf(\tU-Boot Start:0x%08x\n, CONFIG_SYS_TEXT_BASE); #if defined(CONFIG_CMD_FLASH) - puts (Flash: ); + puts(Flash: ); bd-bi_flashstart = CONFIG_SYS_FLASH_BASE; flash_size = flash_init(); if (bd-bi_flashstart flash_size 0) { # ifdef CONFIG_SYS_FLASH_CHECKSUM - print_size (flash_size, ); + print_size(flash_size, ); /* * Compute and print flash CRC if flashchecksum is set to 'y' * * NOTE: Maybe we should add some WATCHDOG_RESET()? XXX */ if (getenv_yesno(flashchecksum) == 1) { - printf ( CRC: %08X, - crc32(0, (const u8 *)bd-bi_flashstart, - flash_size) + printf( CRC: %08X, + crc32(0, (const u8 *)bd-bi_flashstart, +flash_size) ); } - putc ('\n'); + putc('\n'); # else /* !CONFIG_SYS_FLASH_CHECKSUM */ - print_size (flash_size, \n); + print_size(flash_size, \n); # endif /* CONFIG_SYS_FLASH_CHECKSUM */ bd-bi_flashsize = flash_size; bd-bi_flashoffset = bd-bi_flashstart + flash_size; } else { - puts (Flash init FAILED); + puts(Flash init FAILED); bd-bi_flashstart = 0; bd-bi_flashsize = 0; bd-bi_flashoffset = 0; @@ -163,10 +161,10 @@ void board_init_f(ulong not_used) #endif /* relocate environment function pointers etc. */ - env_relocate (); + env_relocate(); /* Initialize stdio devices */ - stdio_init (); + stdio_init(); /* Initialize the jump table for applications */ jumptable_init(); @@ -190,13 +188,14 @@ void board_init_f(ulong not_used)
[U-Boot] [PATCH v3 2/5] nios2: fix style in board.c.
Make nios2's board.c checkpatch clean. Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com --- Changes in v3: None Changes in v2: None arch/nios2/lib/board.c | 43 +-- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/arch/nios2/lib/board.c b/arch/nios2/lib/board.c index 1e495d4..0f2bc7e 100644 --- a/arch/nios2/lib/board.c +++ b/arch/nios2/lib/board.c @@ -64,7 +64,6 @@ typedef int (init_fnc_t) (void); ***/ init_fnc_t *init_sequence[] = { - #if defined(CONFIG_BOARD_EARLY_INIT_F) board_early_init_f, /* Call board-specific init code early.*/ #endif @@ -83,7 +82,7 @@ init_fnc_t *init_sequence[] = { /***/ -void board_init (void) +void board_init(void) { bd_t *bd; init_fnc_t **init_fnc_ptr; @@ -93,7 +92,7 @@ void board_init (void) /* Pointer is writable since we allocated a register for it. */ gd = gd_data; /* compiler optimization barrier needed for GCC = 3.4 */ - __asm__ __volatile__(: : :memory); + __asm__ __volatile__( : : : memory); gd-bd = bd_data; gd-baudrate = CONFIG_BAUDRATE; @@ -106,25 +105,24 @@ void board_init (void) bd-bi_flashstart = CONFIG_SYS_FLASH_BASE; #endif #ifdefined(CONFIG_SYS_SRAM_BASE) defined(CONFIG_SYS_SRAM_SIZE) - bd-bi_sramstart= CONFIG_SYS_SRAM_BASE; + bd-bi_sramstart = CONFIG_SYS_SRAM_BASE; bd-bi_sramsize = CONFIG_SYS_SRAM_SIZE; #endif bd-bi_baudrate = CONFIG_BAUDRATE; for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { - WATCHDOG_RESET (); - if ((*init_fnc_ptr) () != 0) { - hang (); - } + WATCHDOG_RESET(); + if ((*init_fnc_ptr) () != 0) + hang(); } - WATCHDOG_RESET (); + WATCHDOG_RESET(); /* The Malloc area is immediately below the monitor copy in RAM */ mem_malloc_init(CONFIG_SYS_MALLOC_BASE, CONFIG_SYS_MALLOC_LEN); #ifndef CONFIG_SYS_NO_FLASH - WATCHDOG_RESET (); + WATCHDOG_RESET(); bd-bi_flashsize = flash_init(); #endif @@ -138,39 +136,40 @@ void board_init (void) mmc_initialize(bd); #endif - WATCHDOG_RESET (); + WATCHDOG_RESET(); env_relocate(); - WATCHDOG_RESET (); + WATCHDOG_RESET(); stdio_init(); jumptable_init(); console_init_r(); - WATCHDOG_RESET (); - interrupt_init (); + WATCHDOG_RESET(); + interrupt_init(); #if defined(CONFIG_BOARD_LATE_INIT) - board_late_init (); + board_late_init(); #endif #if defined(CONFIG_CMD_NET) - puts (Net: ); - eth_initialize (bd); + puts(Net: ); + eth_initialize(bd); #endif /* main_loop */ for (;;) { - WATCHDOG_RESET (); - main_loop (); + WATCHDOG_RESET(); + main_loop(); } } /***/ -void hang (void) +void hang(void) { - disable_interrupts (); + disable_interrupts(); puts(### ERROR ### Please reset board ###\n); - for (;;); + for (;;) + ; } -- 1.7.10.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 3/5] mx31pdk: add CONFIG_SPL_LIBGENERIC_SUPPORT
In order to use the generic hang() later on pull libgeneric in SPL. This has no impact on the SPL size. Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com --- Changes in v3: None Changes in v2: None include/configs/mx31pdk.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h index 1754595..82ea4fa 100644 --- a/include/configs/mx31pdk.h +++ b/include/configs/mx31pdk.h @@ -50,6 +50,7 @@ #define CONFIG_SPL_LDSCRIPTarch/$(ARCH)/cpu/u-boot-spl.lds #define CONFIG_SPL_MAX_SIZE2048 #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_LIBGENERIC_SUPPORT #define CONFIG_SPL_TEXT_BASE 0x87dc #define CONFIG_SYS_TEXT_BASE 0x87e0 -- 1.7.10.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 4/5] tx25: add CONFIG_SPL_LIBGENERIC_SUPPORT
In order to use the generic hang() later on pull libgeneric in SPL. This has no impact on the SPL size. Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com --- Changes in v3: None Changes in v2: None include/configs/tx25.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/tx25.h b/include/configs/tx25.h index e72f8f6..d61a218 100644 --- a/include/configs/tx25.h +++ b/include/configs/tx25.h @@ -37,6 +37,7 @@ #define CONFIG_SPL_LDSCRIPTarch/$(ARCH)/cpu/u-boot-spl.lds #define CONFIG_SPL_MAX_SIZE2048 #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_LIBGENERIC_SUPPORT #define CONFIG_SPL_TEXT_BASE 0x810c #define CONFIG_SYS_TEXT_BASE 0x8120 -- 1.7.10.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx: Add support for the SabreSD shipped with i.MX6DL
On 19/04/2013 10:27, Eric Bénard wrote: Hi Stefano, Hi Eric, Can we please avoid such #ifdef's? Here, we could for example refer to the board name (CONFIG_SYS_BOARD if you like the name, or some custom defined CONFIG_BOARD_NAME like other boards do). And who does set CONFIG_MX6Q ? You drop it, but I do not see who sets it. that's done in boards.cfg : +++ b/boards.cfg +mx6qsabreautoarm armv7 mx6qsabreauto freescale mx6 mx6qsabreauto:IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg,MX6Q Ah, ok, thanks. Regards, Stefano -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/6] arm: imx: Fix u-boot-with-nand-spl.imx target
Dear Marek Vasut, On Friday, April 19, 2013 6:10:52 AM, Marek Vasut wrote: This target is currently concatenating u-boot SPL in imximage format with u-boot.bin. The NAND SPL can load a raw binary, but the preffered format with much less limitations is uImage format. Fix the target so u-boot.bin is first converted into uImage format and only after that is concatenated. Please reword: This is not a fix, but an enhancement. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- arch/arm/imx-common/Makefile | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile index 44b6822..ba31d3e 100644 --- a/arch/arm/imx-common/Makefile +++ b/arch/arm/imx-common/Makefile @@ -69,8 +69,11 @@ $(OBJTREE)/u-boot-with-nand-spl.imx: $(OBJTREE)/SPL $(OBJTREE)/u-boot.bin -I binary -O binary $(OBJTREE)/spl/u-boot-nand-spl.imx \ $(OBJTREE)/spl/u-boot-nand-spl-pad.imx rm $(OBJTREE)/spl/u-boot-nand-spl.imx - cat $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.bin $@ - rm $(OBJTREE)/spl/u-boot-nand-spl-pad.imx + $(OBJTREE)/tools/mkimage -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \ + -e $(CONFIG_SYS_TEXT_BASE) -C none -d $(OBJTREE)/u-boot.bin \ + $(OBJTREE)/u-boot.uim + cat $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim $@ + rm $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim # -- 1.7.11.7 This change is correct. I don't know the uImage format very well. Can you give examples of what this patch can bring compared to the raw binary format? If this change is useful, it should probably be made for u-boot-with-spl.imx too. Best regards, Benoît ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 4/5] tx25: add CONFIG_SPL_LIBGENERIC_SUPPORT
Dear Andreas Bießmann, On Friday, April 19, 2013 10:48:49 AM, Andreas Bießmann wrote: In order to use the generic hang() later on pull libgeneric in SPL. This has no impact on the SPL size. Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com --- Changes in v3: None Changes in v2: None include/configs/tx25.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/tx25.h b/include/configs/tx25.h index e72f8f6..d61a218 100644 --- a/include/configs/tx25.h +++ b/include/configs/tx25.h @@ -37,6 +37,7 @@ #define CONFIG_SPL_LDSCRIPT arch/$(ARCH)/cpu/u-boot-spl.lds #define CONFIG_SPL_MAX_SIZE 2048 #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_LIBGENERIC_SUPPORT #define CONFIG_SPL_TEXT_BASE 0x810c #define CONFIG_SYS_TEXT_BASE 0x8120 -- 1.7.10.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot v3 5/5 seems to be missing? Best regards, Benoît ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/6] arm: mx5: Add NAND clock handling
Dear Marek Vasut, On Friday, April 19, 2013 6:10:54 AM, Marek Vasut wrote: Augment the MX5 clock code with function to enable and configure NFC clock. This is necessary to get NFC working on MX5. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- arch/arm/cpu/armv7/mx5/clock.c| 14 -- arch/arm/include/asm/arch-mx5/clock.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv7/mx5/clock.c b/arch/arm/cpu/armv7/mx5/clock.c index 76c2c52..431756e 100644 --- a/arch/arm/cpu/armv7/mx5/clock.c +++ b/arch/arm/cpu/armv7/mx5/clock.c @@ -739,10 +739,11 @@ static int config_core_clk(u32 ref, u32 freq) static int config_nfc_clk(u32 nfc_clk) { u32 parent_rate = get_emi_slow_clk(); - u32 div = parent_rate / nfc_clk; + u32 div; - if (nfc_clk = 0) + if (nfc_clk == 0) return -EINVAL; + div = parent_rate / nfc_clk; if (div == 0) div++; if (parent_rate / div NFC_CLK_MAX) @@ -755,6 +756,15 @@ static int config_nfc_clk(u32 nfc_clk) return 0; } +void enable_nfc_clk(unsigned char enable) +{ + unsigned int cg = enable ? MXC_CCM_CCGR_CG_ON : MXC_CCM_CCGR_CG_OFF; + + clrsetbits_le32(mxc_ccm-CCGR5, + MXC_CCM_CCGR5_EMI_ENFC(MXC_CCM_CCGR_CG_MASK), + MXC_CCM_CCGR5_EMI_ENFC(cg)); +} + /* Config main_bus_clock for periphs */ static int config_periph_clk(u32 ref, u32 freq) { diff --git a/arch/arm/include/asm/arch-mx5/clock.h b/arch/arm/include/asm/arch-mx5/clock.h index 9cdfb48..6910192 100644 --- a/arch/arm/include/asm/arch-mx5/clock.h +++ b/arch/arm/include/asm/arch-mx5/clock.h @@ -68,5 +68,6 @@ void set_usboh3_clk(void); void enable_usboh3_clk(unsigned char enable); void mxc_set_sata_internal_clock(void); int enable_i2c_clk(unsigned char enable, unsigned i2c_num); +void enable_nfc_clk(unsigned char enable); #endif /* __ASM_ARCH_CLOCK_H */ -- 1.7.11.7 Reviewed-by: Benoît Thébaudeau benoit.thebaud...@advansee.com Best regards, Benoît ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/6] arm: mx5: Add SPL support code to MX5
Dear Marek Vasut, On Friday, April 19, 2013 6:10:53 AM, Marek Vasut wrote: Fix minor adjustments needed to get SPL framework building on MX5. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- arch/arm/include/asm/arch-mx5/spl.h | 19 +++ spl/Makefile| 4 2 files changed, 23 insertions(+) create mode 100644 arch/arm/include/asm/arch-mx5/spl.h diff --git a/arch/arm/include/asm/arch-mx5/spl.h b/arch/arm/include/asm/arch-mx5/spl.h new file mode 100644 index 000..e0b6e3e --- /dev/null +++ b/arch/arm/include/asm/arch-mx5/spl.h @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2013 Marek Vasut ma...@denx.de + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +#ifndef __ASM_ARCH_SPL_H__ +#define __ASM_ARCH_SPL_H__ + +#define BOOT_DEVICE_NONE 0 +#define BOOT_DEVICE_NAND 1 + +#endif /* __ASM_ARCH_SPL_H__ */ diff --git a/spl/Makefile b/spl/Makefile index b5a8de7..90f932a 100644 --- a/spl/Makefile +++ b/spl/Makefile @@ -88,6 +88,10 @@ ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(C LIBS-y += $(CPUDIR)/omap-common/libomap-common.o endif +ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35)) +LIBS-y += arch/$(ARCH)/imx-common/libimx-common.o +endif + ifneq ($(CONFIG_TEGRA),) LIBS-y += arch/$(ARCH)/cpu/$(SOC)-common/lib$(SOC)-common.o LIBS-y += arch/$(ARCH)/cpu/tegra-common/libcputegra-common.o -- 1.7.11.7 Reviewed-by: Benoît Thébaudeau benoit.thebaud...@advansee.com Best regards, Benoît ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/6] arm: mx5: Add NAND clock handling
On Friday, April 19, 2013 11:02:03 AM, Benoît Thébaudeau wrote: Dear Marek Vasut, On Friday, April 19, 2013 6:10:54 AM, Marek Vasut wrote: Augment the MX5 clock code with function to enable and configure NFC clock. This is necessary to get NFC working on MX5. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- arch/arm/cpu/armv7/mx5/clock.c| 14 -- arch/arm/include/asm/arch-mx5/clock.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv7/mx5/clock.c b/arch/arm/cpu/armv7/mx5/clock.c index 76c2c52..431756e 100644 --- a/arch/arm/cpu/armv7/mx5/clock.c +++ b/arch/arm/cpu/armv7/mx5/clock.c @@ -739,10 +739,11 @@ static int config_core_clk(u32 ref, u32 freq) static int config_nfc_clk(u32 nfc_clk) { u32 parent_rate = get_emi_slow_clk(); - u32 div = parent_rate / nfc_clk; + u32 div; - if (nfc_clk = 0) + if (nfc_clk == 0) return -EINVAL; + div = parent_rate / nfc_clk; if (div == 0) div++; if (parent_rate / div NFC_CLK_MAX) @@ -755,6 +756,15 @@ static int config_nfc_clk(u32 nfc_clk) return 0; } +void enable_nfc_clk(unsigned char enable) +{ + unsigned int cg = enable ? MXC_CCM_CCGR_CG_ON : MXC_CCM_CCGR_CG_OFF; + + clrsetbits_le32(mxc_ccm-CCGR5, + MXC_CCM_CCGR5_EMI_ENFC(MXC_CCM_CCGR_CG_MASK), + MXC_CCM_CCGR5_EMI_ENFC(cg)); +} + /* Config main_bus_clock for periphs */ static int config_periph_clk(u32 ref, u32 freq) { diff --git a/arch/arm/include/asm/arch-mx5/clock.h b/arch/arm/include/asm/arch-mx5/clock.h index 9cdfb48..6910192 100644 --- a/arch/arm/include/asm/arch-mx5/clock.h +++ b/arch/arm/include/asm/arch-mx5/clock.h @@ -68,5 +68,6 @@ void set_usboh3_clk(void); void enable_usboh3_clk(unsigned char enable); void mxc_set_sata_internal_clock(void); int enable_i2c_clk(unsigned char enable, unsigned i2c_num); +void enable_nfc_clk(unsigned char enable); #endif /* __ASM_ARCH_CLOCK_H */ -- 1.7.11.7 Reviewed-by: Benoît Thébaudeau benoit.thebaud...@advansee.com Actually, this code is correct, but why is it needed? Indeed, this clock is already ungated by arch/arm/cpu/armv7/mx5/lowlevel_init.S. Also, your board seems to be hardware-bootable only from NAND, so in this case the boot ROM also ungates this clock itself. Best regards, Benoît ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/6] arm: mx5: Add support for DENX M53EVK
Dear Marek Vasut, On Friday, April 19, 2013 6:10:55 AM, Marek Vasut wrote: Add basic support for the DENX M53EVK board. Currently supported is the MMC, Ethernet, I2C. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com Cc: Wolfgang Denk w...@denx.de --- MAINTAINERS| 1 + board/denx/m53evk/Makefile | 40 board/denx/m53evk/imximage.cfg | 108 +++ board/denx/m53evk/m53evk.c | 410 + boards.cfg | 1 + include/configs/m53evk.h | 252 + 6 files changed, 812 insertions(+) create mode 100644 board/denx/m53evk/Makefile create mode 100644 board/denx/m53evk/imximage.cfg create mode 100644 board/denx/m53evk/m53evk.c create mode 100644 include/configs/m53evk.h diff --git a/MAINTAINERS b/MAINTAINERS index 643a5ac..e109be6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -954,6 +954,7 @@ Marek Vasut marek.va...@gmail.com mx23_olinuxino i.MX23 m28evk i.MX28 sc_sps_1i.MX28 + m53evk i.MX53 Hugo Villeneuve hugo.villene...@lyrtech.com diff --git a/board/denx/m53evk/Makefile b/board/denx/m53evk/Makefile new file mode 100644 index 000..bfb040a --- /dev/null +++ b/board/denx/m53evk/Makefile @@ -0,0 +1,40 @@ +# +# DENX M53EVK +# Copyright (C) 2012-2013 Marek Vasut ma...@denx.de +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS:= m53evk.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/denx/m53evk/imximage.cfg b/board/denx/m53evk/imximage.cfg new file mode 100644 index 000..3d60de0 --- /dev/null +++ b/board/denx/m53evk/imximage.cfg @@ -0,0 +1,108 @@ +/* + * DENX M53 DRAM init values + * Copyright (C) 2012-2013 Marek Vasut ma...@denx.de + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not write to the Free Software + * Foundation Inc. 51 Franklin Street Fifth Floor Boston, + * MA 02110-1301 USA + * + * Refer docs/README.imxmage for more details about how-to configure + * and create imximage boot image + * + * The syntax is taken as close as possible with the kwbimage + */ +/* image version */ +IMAGE_VERSION2 + +/* + * Boot Device : one of + * spi, sd, nand + */ +BOOT_FROMnand + +/* + * Device Configuration Data (DCD) + * + * Each entry must have the format: + * Addr-type AddressValue + * + * where: + * Addr-type register length (1,2 or 4 bytes) + * Address absolute address of the register + * value value to be stored in the register + */ +DATA 4 0x53fa86f4 0x /* GRP_DDRMODE_CTL */ +DATA 4 0x53fa8714 0x /* GRP_DDRMODE */ +DATA 4 0x53fa86fc 0x /* GRP_DDRPKE */ +DATA 4 0x53fa8724 0x0400 /* GRP_DDR_TYPE */ + +DATA 4 0x53fa872c 0x0030 /* GRP_B3DS */ +DATA 4 0x53fa8554 0x0030 /* DRAM_DQM3 */ +DATA 4 0x53fa8558 0x00300040 /* DRAM_SDQS3 */ + +DATA 4 0x53fa8728
[U-Boot] [PATCH] usb: common: Use a global definition for 'min3'
We can use a common global method for calculating minimum of 3 numbers. Put the same in 'common header' and let 'ehci' use it. Signed-off-by: Vivek Gautam gautam.vi...@samsung.com --- drivers/usb/host/ehci-hcd.c | 10 -- include/common.h|5 + 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 19d4352..e0f3e4b 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -603,16 +603,6 @@ fail: return -1; } -static inline int min3(int a, int b, int c) -{ - - if (b a) - a = b; - if (c a) - a = c; - return a; -} - int ehci_submit_root(struct usb_device *dev, unsigned long pipe, void *buffer, int length, struct devrequest *req) diff --git a/include/common.h b/include/common.h index 0cfa6a8..611edca 100644 --- a/include/common.h +++ b/include/common.h @@ -211,6 +211,11 @@ typedef void (interrupt_handler_t)(void *); #define MIN(x, y) min(x, y) #define MAX(x, y) max(x, y) +static inline int min3(int a, int b, int c) +{ + return min(min(a, b), c); +} + /* * Return the absolute value of a number. * -- 1.7.6.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/6] nand: Add SPL_NAND support to mxc_nand_spl
On Friday, April 19, 2013 10:38:48 AM, Benoît Thébaudeau wrote: Dear Marek Vasut, On Friday, April 19, 2013 6:10:51 AM, Marek Vasut wrote: Add support for generic NAND SPL via the SPL framework into the mxc_nand_spl driver. This is basically just a simple rename and publication of the already implemented functions. To avoid the old function which are used with the nand_spl/ stuff getting in the way of NAND SPL framework, the macro CONFIG_SPL_NAND_LEGACY was introduced and two remaining legacy boards were adjusted. These board need to be either fixed or removed in the long run, but I don't have either. Also make sure the requested payload is aligned to full pages, otherwise this simple driver fails to load the last page. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- drivers/mtd/nand/mxc_nand_spl.c | 13 ++--- include/configs/mx31pdk.h | 1 + include/configs/tx25.h | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/mxc_nand_spl.c b/drivers/mtd/nand/mxc_nand_spl.c index 09f23c3..8ff03c9 100644 --- a/drivers/mtd/nand/mxc_nand_spl.c +++ b/drivers/mtd/nand/mxc_nand_spl.c @@ -290,7 +290,7 @@ static int is_badblock(int pagenumber) return 0; } -static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) +int nand_spl_load_image(uint32_t from, unsigned int size, void *buf) { int i; unsigned int page; @@ -303,6 +303,7 @@ static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) page = from / CONFIG_SYS_NAND_PAGE_SIZE; i = 0; + size = roundup(size, CONFIG_SYS_NAND_PAGE_SIZE); while (i size / CONFIG_SYS_NAND_PAGE_SIZE) { if (nfc_read_page(page, buf) 0) return -1; @@ -332,6 +333,7 @@ static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) return 0; } +#ifdef CONFIG_SPL_NAND_SUPPORT_LEGACY /* * The main entry for NAND booting. It's necessary that SDRAM is already * configured and available since this code loads the main U-Boot image @@ -345,8 +347,9 @@ void nand_boot(void) * CONFIG_SYS_NAND_U_BOOT_OFFS and CONFIG_SYS_NAND_U_BOOT_SIZE must * be aligned to full pages */ - if (!nand_load(CONFIG_SYS_NAND_U_BOOT_OFFS, CONFIG_SYS_NAND_U_BOOT_SIZE, - (uchar *)CONFIG_SYS_NAND_U_BOOT_DST)) { + if (!nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS, + CONFIG_SYS_NAND_U_BOOT_SIZE, + (uchar *)CONFIG_SYS_NAND_U_BOOT_DST)) { /* Copy from NAND successful, start U-boot */ uboot = (void *)CONFIG_SYS_NAND_U_BOOT_START; uboot(); @@ -364,3 +367,7 @@ void hang(void) /* Loop forever */ while (1) ; } +#endif + +void nand_init(void) {} +void nand_deselect(void) {} diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h index 1754595..217552e 100644 --- a/include/configs/mx31pdk.h +++ b/include/configs/mx31pdk.h @@ -50,6 +50,7 @@ #define CONFIG_SPL_LDSCRIPTarch/$(ARCH)/cpu/u-boot-spl.lds #define CONFIG_SPL_MAX_SIZE2048 #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SUPPORT_LEGACY #define CONFIG_SPL_TEXT_BASE 0x87dc #define CONFIG_SYS_TEXT_BASE 0x87e0 diff --git a/include/configs/tx25.h b/include/configs/tx25.h index e72f8f6..7c362d0 100644 --- a/include/configs/tx25.h +++ b/include/configs/tx25.h @@ -37,6 +37,7 @@ #define CONFIG_SPL_LDSCRIPT arch/$(ARCH)/cpu/u-boot-spl.lds #define CONFIG_SPL_MAX_SIZE2048 #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SUPPORT_LEGACY #define CONFIG_SPL_TEXT_BASE 0x810c #define CONFIG_SYS_TEXT_BASE 0x8120 -- 1.7.11.7 This is not about legacy vs. non-legacy. This is about basic vs. more featured SPL because of SPL size constraints. So what about dropping CONFIG_SPL_NAND_SUPPORT_LEGACY and testing for CONFIG_SPL_FRAMEWORK definition instead? Also, I don't see any nand_init() (called by spl_nand_load_image()) for m53evk. Best regards, Benoît ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 4/5] tx25: add CONFIG_SPL_LIBGENERIC_SUPPORT
Dear Benoît Thébaudeau, On 04/19/2013 11:00 AM, Benoît Thébaudeau wrote: Dear Andreas Bießmann, On Friday, April 19, 2013 10:48:49 AM, Andreas Bießmann wrote: In order to use the generic hang() later on pull libgeneric in SPL. This has no impact on the SPL size. Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com --- Changes in v3: None Changes in v2: None v3 5/5 seems to be missing? moderator approval due to long cc list, should hit the ml soon. Best regards Andreas Bießmann ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 0/5] consolidate hang()
This series started with intention to make a hung board visualize the (end-)user that it does hang(). The first approach was to make all the different hang() functions weak and provide board specific versions to implement the 'visualization' there. After some discussion it turned out, that there is still an interface to visualize such states to the user: the 'bootstage' stuff. BTW: This is my first try sending a series with patman. All I can say is: patman is really cool ;) The 'microblaze: fix style in board.c' is an leftover from the first approach. The 'nios2: fix style in board.c' is an leftover from the first approach. The 'lib: consolidate hang()' is build tested on arm and avr32. It may produces errors on other arches like ppc cause the previous SPL inlined hang() function was also removed. We need to discuss if we always pull in the libgeneric unconditional into SPL or provide a second hang() for those boards which do not link against libgeneric in SPL. Since v2 got a complete (compile-)test on powerpc by Wolfgang I think we can stick with the current solution. v3 includes some minor changes mentioned in the changelog of respective patches. Changes in v3: * shorten error string for 'no FDT' * remove unnecessarily added linux/compiler.h * fix typo in new hang() docu * use simplified macro for SPL_LIBCOMMON_SUPPORT as suggested by Benoît Changes in v2: * delete all hang() and provide generic lib/hang.c Andreas Bießmann (5): microblaze: fix style in board.c nios2: fix style in board.c. mx31pdk: add CONFIG_SPL_LIBGENERIC_SUPPORT tx25: add CONFIG_SPL_LIBGENERIC_SUPPORT lib: consolidate hang() arch/arm/cpu/arm926ejs/mxs/spl_boot.c |7 arch/arm/cpu/arm926ejs/spear/spl.c|7 arch/arm/lib/board.c |6 arch/avr32/lib/board.c|5 --- arch/blackfin/lib/board.c | 14 arch/m68k/lib/board.c |7 arch/microblaze/lib/board.c | 62 ++--- arch/mips/lib/board.c |7 arch/nds32/lib/board.c|7 arch/nios2/lib/board.c| 46 +--- arch/openrisc/lib/board.c | 12 --- arch/powerpc/lib/board.c |9 - arch/sandbox/lib/board.c |7 arch/sh/lib/board.c |9 - arch/sparc/lib/board.c|9 - arch/x86/lib/board.c |7 common/board_f.c |6 common/spl/spl.c |7 drivers/mtd/nand/mxc_nand_spl.c |9 - include/configs/mx31pdk.h |1 + include/configs/tx25.h|1 + lib/Makefile |1 + lib/hang.c| 46 23 files changed, 93 insertions(+), 199 deletions(-) create mode 100644 lib/hang.c -- 1.7.10.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 5/5] lib: consolidate hang()
Delete all occurrences of hang() and provide a generic function. Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com --- Changes in v3: * remove unnecessarily added linux/compiler.h * fix typo in new hang() docu * use simplified macro for SPL_LIBCOMMON_SUPPORT as suggested by Benoît Changes in v2: * delete all hang() and provide generic lib/hang.c arch/arm/cpu/arm926ejs/mxs/spl_boot.c |7 - arch/arm/cpu/arm926ejs/spear/spl.c|7 - arch/arm/lib/board.c |6 - arch/avr32/lib/board.c|5 arch/blackfin/lib/board.c | 14 -- arch/m68k/lib/board.c |7 - arch/microblaze/lib/board.c |7 - arch/mips/lib/board.c |7 - arch/nds32/lib/board.c|7 - arch/nios2/lib/board.c| 11 arch/openrisc/lib/board.c | 12 - arch/powerpc/lib/board.c |9 --- arch/sandbox/lib/board.c |7 - arch/sh/lib/board.c |9 --- arch/sparc/lib/board.c|9 --- arch/x86/lib/board.c |7 - common/board_f.c |6 - common/spl/spl.c |7 - drivers/mtd/nand/mxc_nand_spl.c |9 --- lib/Makefile |1 + lib/hang.c| 46 + 21 files changed, 47 insertions(+), 153 deletions(-) create mode 100644 lib/hang.c diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c index 7e70440..ed525e5 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c @@ -148,10 +148,3 @@ inline void board_init_r(gd_t *id, ulong dest_addr) for (;;) ; } - -void hang(void) __attribute__ ((noreturn)); -void hang(void) -{ - for (;;) - ; -} diff --git a/arch/arm/cpu/arm926ejs/spear/spl.c b/arch/arm/cpu/arm926ejs/spear/spl.c index 48e6efb..0101c5d 100644 --- a/arch/arm/cpu/arm926ejs/spear/spl.c +++ b/arch/arm/cpu/arm926ejs/spear/spl.c @@ -31,13 +31,6 @@ #include asm/arch/spr_misc.h #include asm/arch/spr_syscntl.h -inline void hang(void) -{ - serial_puts(### ERROR ### Please RESET the board ###\n); - for (;;) - ; -} - static void ddr_clock_init(void) { struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE; diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 0521178..09ab4ad 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -706,9 +706,3 @@ void board_init_r(gd_t *id, ulong dest_addr) /* NOTREACHED - no way out of command loop except booting */ } - -void hang(void) -{ - puts(### ERROR ### Please RESET the board ###\n); - for (;;); -} diff --git a/arch/avr32/lib/board.c b/arch/avr32/lib/board.c index 57e07df..ccf862a 100644 --- a/arch/avr32/lib/board.c +++ b/arch/avr32/lib/board.c @@ -120,11 +120,6 @@ static int display_banner (void) return 0; } -void hang(void) -{ - for (;;) ; -} - static int display_dram_config (void) { int i; diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c index 75b6c46..ccea3b9 100644 --- a/arch/blackfin/lib/board.c +++ b/arch/blackfin/lib/board.c @@ -432,17 +432,3 @@ void board_init_r(gd_t * id, ulong dest_addr) for (;;) main_loop(); } - -void hang(void) -{ -#ifdef CONFIG_STATUS_LED - status_led_set(STATUS_LED_BOOT, STATUS_LED_OFF); - status_led_set(STATUS_LED_CRASH, STATUS_LED_BLINKING); -#endif - puts(### ERROR ### Please RESET the board ###\n); - while (1) - /* If a JTAG emulator is hooked up, we'll automatically trigger -* a breakpoint in it. If one isn't, this is just a NOP. -*/ - asm(emuexcpt;); -} diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c index adaccfe..b2e3068 100644 --- a/arch/m68k/lib/board.c +++ b/arch/m68k/lib/board.c @@ -663,10 +663,3 @@ void board_init_r (gd_t *id, ulong dest_addr) /* NOTREACHED - no way out of command loop except booting */ } - - -void hang(void) -{ - puts (### ERROR ### Please RESET the board ###\n); - for (;;); -} diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index 4c4f36b..f0987ad 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -192,10 +192,3 @@ void board_init_f(ulong not_used) main_loop(); } } - -void hang(void) -{ - puts(### ERROR ### Please RESET the board ###\n); - for (;;) - ; -} diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c index f19f198..fac7915 100644 --- a/arch/mips/lib/board.c +++ b/arch/mips/lib/board.c @@ -344,10 +344,3 @@ void board_init_r(gd_t *id, ulong dest_addr) /* NOTREACHED
Re: [U-Boot] [PATCH v3 5/5] lib: consolidate hang()
Hi Andreas, On Fri, 19 Apr 2013 10:48:50 +0200, Andreas Bießmann andreas.de...@googlemail.com wrote: Delete all occurrences of hang() and provide a generic function. Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com --- Changes in v3: * remove unnecessarily added linux/compiler.h * fix typo in new hang() docu * use simplified macro for SPL_LIBCOMMON_SUPPORT as suggested by Benoît Changes in v2: * delete all hang() and provide generic lib/hang.c arch/arm/cpu/arm926ejs/mxs/spl_boot.c |7 - arch/arm/cpu/arm926ejs/spear/spl.c|7 - arch/arm/lib/board.c |6 - arch/avr32/lib/board.c|5 arch/blackfin/lib/board.c | 14 -- arch/m68k/lib/board.c |7 - arch/microblaze/lib/board.c |7 - arch/mips/lib/board.c |7 - arch/nds32/lib/board.c|7 - arch/nios2/lib/board.c| 11 arch/openrisc/lib/board.c | 12 - arch/powerpc/lib/board.c |9 --- arch/sandbox/lib/board.c |7 - arch/sh/lib/board.c |9 --- arch/sparc/lib/board.c|9 --- arch/x86/lib/board.c |7 - common/board_f.c |6 - common/spl/spl.c |7 - drivers/mtd/nand/mxc_nand_spl.c |9 --- lib/Makefile |1 + lib/hang.c| 46 + 21 files changed, 47 insertions(+), 153 deletions(-) create mode 100644 lib/hang.c diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c index 7e70440..ed525e5 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c @@ -148,10 +148,3 @@ inline void board_init_r(gd_t *id, ulong dest_addr) for (;;) ; } - -void hang(void) __attribute__ ((noreturn)); -void hang(void) -{ - for (;;) - ; -} diff --git a/arch/arm/cpu/arm926ejs/spear/spl.c b/arch/arm/cpu/arm926ejs/spear/spl.c index 48e6efb..0101c5d 100644 --- a/arch/arm/cpu/arm926ejs/spear/spl.c +++ b/arch/arm/cpu/arm926ejs/spear/spl.c @@ -31,13 +31,6 @@ #include asm/arch/spr_misc.h #include asm/arch/spr_syscntl.h -inline void hang(void) -{ - serial_puts(### ERROR ### Please RESET the board ###\n); - for (;;) - ; -} - static void ddr_clock_init(void) { struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE; diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 0521178..09ab4ad 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -706,9 +706,3 @@ void board_init_r(gd_t *id, ulong dest_addr) /* NOTREACHED - no way out of command loop except booting */ } - -void hang(void) -{ - puts(### ERROR ### Please RESET the board ###\n); - for (;;); -} diff --git a/arch/avr32/lib/board.c b/arch/avr32/lib/board.c index 57e07df..ccf862a 100644 --- a/arch/avr32/lib/board.c +++ b/arch/avr32/lib/board.c @@ -120,11 +120,6 @@ static int display_banner (void) return 0; } -void hang(void) -{ - for (;;) ; -} - static int display_dram_config (void) { int i; diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c index 75b6c46..ccea3b9 100644 --- a/arch/blackfin/lib/board.c +++ b/arch/blackfin/lib/board.c @@ -432,17 +432,3 @@ void board_init_r(gd_t * id, ulong dest_addr) for (;;) main_loop(); } - -void hang(void) -{ -#ifdef CONFIG_STATUS_LED - status_led_set(STATUS_LED_BOOT, STATUS_LED_OFF); - status_led_set(STATUS_LED_CRASH, STATUS_LED_BLINKING); -#endif - puts(### ERROR ### Please RESET the board ###\n); - while (1) - /* If a JTAG emulator is hooked up, we'll automatically trigger - * a breakpoint in it. If one isn't, this is just a NOP. - */ - asm(emuexcpt;); -} diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c index adaccfe..b2e3068 100644 --- a/arch/m68k/lib/board.c +++ b/arch/m68k/lib/board.c @@ -663,10 +663,3 @@ void board_init_r (gd_t *id, ulong dest_addr) /* NOTREACHED - no way out of command loop except booting */ } - - -void hang(void) -{ - puts (### ERROR ### Please RESET the board ###\n); - for (;;); -} diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index 4c4f36b..f0987ad 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -192,10 +192,3 @@ void board_init_f(ulong not_used) main_loop(); } } - -void hang(void) -{ - puts(### ERROR ### Please RESET the board ###\n); - for (;;) - ; -} diff --git a/arch/mips/lib/board.c
Re: [U-Boot] [PATCH 3/6] arm: imx: Fix u-boot-with-nand-spl.imx target
Dear Benoît Thébaudeau, Dear Marek Vasut, On Friday, April 19, 2013 6:10:52 AM, Marek Vasut wrote: This target is currently concatenating u-boot SPL in imximage format with u-boot.bin. The NAND SPL can load a raw binary, but the preffered format with much less limitations is uImage format. Fix the target so u-boot.bin is first converted into uImage format and only after that is concatenated. Please reword: This is not a fix, but an enhancement. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- arch/arm/imx-common/Makefile | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile index 44b6822..ba31d3e 100644 --- a/arch/arm/imx-common/Makefile +++ b/arch/arm/imx-common/Makefile @@ -69,8 +69,11 @@ $(OBJTREE)/u-boot-with-nand-spl.imx: $(OBJTREE)/SPL $(OBJTREE)/u-boot.bin -I binary -O binary $(OBJTREE)/spl/u-boot-nand-spl.imx \ $(OBJTREE)/spl/u-boot-nand-spl-pad.imx rm $(OBJTREE)/spl/u-boot-nand-spl.imx - cat $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.bin $@ - rm $(OBJTREE)/spl/u-boot-nand-spl-pad.imx + $(OBJTREE)/tools/mkimage -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \ + -e $(CONFIG_SYS_TEXT_BASE) -C none -d $(OBJTREE)/u-boot.bin \ + $(OBJTREE)/u-boot.uim + cat $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim $@ + rm $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim # -- 1.7.11.7 This change is correct. I don't know the uImage format very well. Can you give examples of what this patch can bring compared to the raw binary format? If this change is useful, it should probably be made for u-boot-with-spl.imx too. Please see common/spl/spl_nand.c which calls spl_parse_image_header() on the payload loaded from NAND. This is implemented in common/spl/spl.c and if proper header is not found, the payload is assumed to be of 200kB of size, which is far less than fully configured U-Boot. So using the uimage format is much more flexible. Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/6] arm: mx5: Add NAND clock handling
Dear Benoît Thébaudeau, On Friday, April 19, 2013 11:02:03 AM, Benoît Thébaudeau wrote: Dear Marek Vasut, On Friday, April 19, 2013 6:10:54 AM, Marek Vasut wrote: Augment the MX5 clock code with function to enable and configure NFC clock. This is necessary to get NFC working on MX5. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- arch/arm/cpu/armv7/mx5/clock.c| 14 -- arch/arm/include/asm/arch-mx5/clock.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv7/mx5/clock.c b/arch/arm/cpu/armv7/mx5/clock.c index 76c2c52..431756e 100644 --- a/arch/arm/cpu/armv7/mx5/clock.c +++ b/arch/arm/cpu/armv7/mx5/clock.c @@ -739,10 +739,11 @@ static int config_core_clk(u32 ref, u32 freq) static int config_nfc_clk(u32 nfc_clk) { u32 parent_rate = get_emi_slow_clk(); - u32 div = parent_rate / nfc_clk; + u32 div; - if (nfc_clk = 0) + if (nfc_clk == 0) return -EINVAL; + div = parent_rate / nfc_clk; if (div == 0) div++; if (parent_rate / div NFC_CLK_MAX) @@ -755,6 +756,15 @@ static int config_nfc_clk(u32 nfc_clk) return 0; } +void enable_nfc_clk(unsigned char enable) +{ + unsigned int cg = enable ? MXC_CCM_CCGR_CG_ON : MXC_CCM_CCGR_CG_OFF; + + clrsetbits_le32(mxc_ccm-CCGR5, + MXC_CCM_CCGR5_EMI_ENFC(MXC_CCM_CCGR_CG_MASK), + MXC_CCM_CCGR5_EMI_ENFC(cg)); +} + /* Config main_bus_clock for periphs */ static int config_periph_clk(u32 ref, u32 freq) { diff --git a/arch/arm/include/asm/arch-mx5/clock.h b/arch/arm/include/asm/arch-mx5/clock.h index 9cdfb48..6910192 100644 --- a/arch/arm/include/asm/arch-mx5/clock.h +++ b/arch/arm/include/asm/arch-mx5/clock.h @@ -68,5 +68,6 @@ void set_usboh3_clk(void); void enable_usboh3_clk(unsigned char enable); void mxc_set_sata_internal_clock(void); int enable_i2c_clk(unsigned char enable, unsigned i2c_num); +void enable_nfc_clk(unsigned char enable); #endif /* __ASM_ARCH_CLOCK_H */ -- 1.7.11.7 Reviewed-by: Benoît Thébaudeau benoit.thebaud...@advansee.com Actually, this code is correct, but why is it needed? Indeed, this clock is already ungated by arch/arm/cpu/armv7/mx5/lowlevel_init.S. This is not good, the code should be moved away from the assembly. Also, your board seems to be hardware-bootable only from NAND This is incorrect, it is bootable from SD card as well. so in this case the boot ROM also ungates this clock itself. We can not rely on that. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/6] nand: Add SPL_NAND support to mxc_nand_spl
Dear Benoît Thébaudeau, On Friday, April 19, 2013 10:38:48 AM, Benoît Thébaudeau wrote: Dear Marek Vasut, On Friday, April 19, 2013 6:10:51 AM, Marek Vasut wrote: Add support for generic NAND SPL via the SPL framework into the mxc_nand_spl driver. This is basically just a simple rename and publication of the already implemented functions. To avoid the old function which are used with the nand_spl/ stuff getting in the way of NAND SPL framework, the macro CONFIG_SPL_NAND_LEGACY was introduced and two remaining legacy boards were adjusted. These board need to be either fixed or removed in the long run, but I don't have either. Also make sure the requested payload is aligned to full pages, otherwise this simple driver fails to load the last page. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- drivers/mtd/nand/mxc_nand_spl.c | 13 ++--- include/configs/mx31pdk.h | 1 + include/configs/tx25.h | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/mxc_nand_spl.c b/drivers/mtd/nand/mxc_nand_spl.c index 09f23c3..8ff03c9 100644 --- a/drivers/mtd/nand/mxc_nand_spl.c +++ b/drivers/mtd/nand/mxc_nand_spl.c @@ -290,7 +290,7 @@ static int is_badblock(int pagenumber) return 0; } -static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) +int nand_spl_load_image(uint32_t from, unsigned int size, void *buf) { int i; unsigned int page; @@ -303,6 +303,7 @@ static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) page = from / CONFIG_SYS_NAND_PAGE_SIZE; i = 0; + size = roundup(size, CONFIG_SYS_NAND_PAGE_SIZE); while (i size / CONFIG_SYS_NAND_PAGE_SIZE) { if (nfc_read_page(page, buf) 0) return -1; @@ -332,6 +333,7 @@ static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) return 0; } +#ifdef CONFIG_SPL_NAND_SUPPORT_LEGACY /* * The main entry for NAND booting. It's necessary that SDRAM is already * configured and available since this code loads the main U-Boot image @@ -345,8 +347,9 @@ void nand_boot(void) * CONFIG_SYS_NAND_U_BOOT_OFFS and CONFIG_SYS_NAND_U_BOOT_SIZE must * be aligned to full pages */ - if (!nand_load(CONFIG_SYS_NAND_U_BOOT_OFFS, CONFIG_SYS_NAND_U_BOOT_SIZE, - (uchar *)CONFIG_SYS_NAND_U_BOOT_DST)) { + if (!nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS, + CONFIG_SYS_NAND_U_BOOT_SIZE, + (uchar *)CONFIG_SYS_NAND_U_BOOT_DST)) { /* Copy from NAND successful, start U-boot */ uboot = (void *)CONFIG_SYS_NAND_U_BOOT_START; uboot(); @@ -364,3 +367,7 @@ void hang(void) /* Loop forever */ while (1) ; } +#endif + +void nand_init(void) {} +void nand_deselect(void) {} diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h index 1754595..217552e 100644 --- a/include/configs/mx31pdk.h +++ b/include/configs/mx31pdk.h @@ -50,6 +50,7 @@ #define CONFIG_SPL_LDSCRIPT arch/$(ARCH)/cpu/u-boot-spl.lds #define CONFIG_SPL_MAX_SIZE 2048 #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SUPPORT_LEGACY #define CONFIG_SPL_TEXT_BASE 0x87dc #define CONFIG_SYS_TEXT_BASE 0x87e0 diff --git a/include/configs/tx25.h b/include/configs/tx25.h index e72f8f6..7c362d0 100644 --- a/include/configs/tx25.h +++ b/include/configs/tx25.h @@ -37,6 +37,7 @@ #define CONFIG_SPL_LDSCRIPT arch/$(ARCH)/cpu/u-boot- spl.lds #define CONFIG_SPL_MAX_SIZE 2048 #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SUPPORT_LEGACY #define CONFIG_SPL_TEXT_BASE 0x810c #define CONFIG_SYS_TEXT_BASE 0x8120 -- 1.7.11.7 This is not about legacy vs. non-legacy. This is about basic vs. more featured SPL because of SPL size constraints. So what about dropping CONFIG_SPL_NAND_SUPPORT_LEGACY and testing for CONFIG_SPL_FRAMEWORK definition instead? I was thinking about that, but the symbol is unrelated to NAND. I still think it's either a matter of fixing for new SPL or removing those two boards. The nand_spl/ stuff shall be removed ASAP. Also, I don't see any nand_init() (called by spl_nand_load_image()) for m53evk. What do you mean? Best regards, Marek Vasut
Re: [U-Boot] [PATCH 5/6] arm: mx5: Add NAND clock handling
Dear Marek Vasut, On Friday, April 19, 2013 1:18:06 PM, Marek Vasut wrote: Dear Benoît Thébaudeau, On Friday, April 19, 2013 11:02:03 AM, Benoît Thébaudeau wrote: Dear Marek Vasut, On Friday, April 19, 2013 6:10:54 AM, Marek Vasut wrote: Augment the MX5 clock code with function to enable and configure NFC clock. This is necessary to get NFC working on MX5. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- arch/arm/cpu/armv7/mx5/clock.c| 14 -- arch/arm/include/asm/arch-mx5/clock.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv7/mx5/clock.c b/arch/arm/cpu/armv7/mx5/clock.c index 76c2c52..431756e 100644 --- a/arch/arm/cpu/armv7/mx5/clock.c +++ b/arch/arm/cpu/armv7/mx5/clock.c @@ -739,10 +739,11 @@ static int config_core_clk(u32 ref, u32 freq) static int config_nfc_clk(u32 nfc_clk) { u32 parent_rate = get_emi_slow_clk(); - u32 div = parent_rate / nfc_clk; + u32 div; - if (nfc_clk = 0) + if (nfc_clk == 0) return -EINVAL; + div = parent_rate / nfc_clk; if (div == 0) div++; if (parent_rate / div NFC_CLK_MAX) @@ -755,6 +756,15 @@ static int config_nfc_clk(u32 nfc_clk) return 0; } +void enable_nfc_clk(unsigned char enable) +{ + unsigned int cg = enable ? MXC_CCM_CCGR_CG_ON : MXC_CCM_CCGR_CG_OFF; + + clrsetbits_le32(mxc_ccm-CCGR5, + MXC_CCM_CCGR5_EMI_ENFC(MXC_CCM_CCGR_CG_MASK), + MXC_CCM_CCGR5_EMI_ENFC(cg)); +} + /* Config main_bus_clock for periphs */ static int config_periph_clk(u32 ref, u32 freq) { diff --git a/arch/arm/include/asm/arch-mx5/clock.h b/arch/arm/include/asm/arch-mx5/clock.h index 9cdfb48..6910192 100644 --- a/arch/arm/include/asm/arch-mx5/clock.h +++ b/arch/arm/include/asm/arch-mx5/clock.h @@ -68,5 +68,6 @@ void set_usboh3_clk(void); void enable_usboh3_clk(unsigned char enable); void mxc_set_sata_internal_clock(void); int enable_i2c_clk(unsigned char enable, unsigned i2c_num); +void enable_nfc_clk(unsigned char enable); #endif /* __ASM_ARCH_CLOCK_H */ -- 1.7.11.7 Reviewed-by: Benoît Thébaudeau benoit.thebaud...@advansee.com Actually, this code is correct, but why is it needed? Indeed, this clock is already ungated by arch/arm/cpu/armv7/mx5/lowlevel_init.S. This is not good, the code should be moved away from the assembly. Also, your board seems to be hardware-bootable only from NAND This is incorrect, it is bootable from SD card as well. so in this case the boot ROM also ungates this clock itself. We can not rely on that. OK, then this patch is fine. Best regards, Benoît ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] usb: common: Use a global definition for 'min3'
Dear Vivek Gautam, We can use a common global method for calculating minimum of 3 numbers. Put the same in 'common header' and let 'ehci' use it. Signed-off-by: Vivek Gautam gautam.vi...@samsung.com Applied, thanks --- drivers/usb/host/ehci-hcd.c | 10 -- include/common.h|5 + 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 19d4352..e0f3e4b 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -603,16 +603,6 @@ fail: return -1; } -static inline int min3(int a, int b, int c) -{ - - if (b a) - a = b; - if (c a) - a = c; - return a; -} - int ehci_submit_root(struct usb_device *dev, unsigned long pipe, void *buffer, int length, struct devrequest *req) diff --git a/include/common.h b/include/common.h index 0cfa6a8..611edca 100644 --- a/include/common.h +++ b/include/common.h @@ -211,6 +211,11 @@ typedef void (interrupt_handler_t)(void *); #define MIN(x, y) min(x, y) #define MAX(x, y) max(x, y) +static inline int min3(int a, int b, int c) +{ + return min(min(a, b), c); +} + /* * Return the absolute value of a number. * Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/6] arm: mx5: Add support for DENX M53EVK
Dear Benoît Thébaudeau, [...] +static void setup_iomux_nand(void) +{ + mxc_request_iomux(MX53_PIN_NANDF_WE_B, IOMUX_CONFIG_ALT0); + mxc_request_iomux(MX53_PIN_NANDF_RE_B, IOMUX_CONFIG_ALT0); + mxc_request_iomux(MX53_PIN_NANDF_CLE, IOMUX_CONFIG_ALT0); + mxc_request_iomux(MX53_PIN_NANDF_ALE, IOMUX_CONFIG_ALT0); + mxc_request_iomux(MX53_PIN_NANDF_WP_B, IOMUX_CONFIG_ALT0); + mxc_request_iomux(MX53_PIN_NANDF_RB0, IOMUX_CONFIG_ALT0); + mxc_request_iomux(MX53_PIN_NANDF_CS0, IOMUX_CONFIG_ALT0); + mxc_request_iomux(MX53_PIN_ATA_DATA0, IOMUX_CONFIG_ALT3); + mxc_request_iomux(MX53_PIN_ATA_DATA1, IOMUX_CONFIG_ALT3); + mxc_request_iomux(MX53_PIN_ATA_DATA2, IOMUX_CONFIG_ALT3); + mxc_request_iomux(MX53_PIN_ATA_DATA3, IOMUX_CONFIG_ALT3); + mxc_request_iomux(MX53_PIN_ATA_DATA4, IOMUX_CONFIG_ALT3); + mxc_request_iomux(MX53_PIN_ATA_DATA5, IOMUX_CONFIG_ALT3); + mxc_request_iomux(MX53_PIN_ATA_DATA6, IOMUX_CONFIG_ALT3); + mxc_request_iomux(MX53_PIN_ATA_DATA7, IOMUX_CONFIG_ALT3); + + mxc_iomux_set_pad(MX53_PIN_NANDF_WE_B, PAD_CTL_DRV_HIGH); + mxc_iomux_set_pad(MX53_PIN_NANDF_RE_B, PAD_CTL_DRV_HIGH); + mxc_iomux_set_pad(MX53_PIN_NANDF_CLE, PAD_CTL_DRV_HIGH); + mxc_iomux_set_pad(MX53_PIN_NANDF_ALE, PAD_CTL_DRV_HIGH); + mxc_iomux_set_pad(MX53_PIN_NANDF_WP_B, PAD_CTL_PUE_PULL | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); + mxc_iomux_set_pad(MX53_PIN_NANDF_RB0, PAD_CTL_PUE_PULL | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); + mxc_iomux_set_pad(MX53_PIN_NANDF_CS0, PAD_CTL_DRV_HIGH); + mxc_iomux_set_pad(MX53_PIN_ATA_DATA0, PAD_CTL_DRV_HIGH | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); + mxc_iomux_set_pad(MX53_PIN_ATA_DATA1, PAD_CTL_DRV_HIGH | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); + mxc_iomux_set_pad(MX53_PIN_ATA_DATA2, PAD_CTL_DRV_HIGH | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); + mxc_iomux_set_pad(MX53_PIN_ATA_DATA3, PAD_CTL_DRV_HIGH | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); + mxc_iomux_set_pad(MX53_PIN_ATA_DATA4, PAD_CTL_DRV_HIGH | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); + mxc_iomux_set_pad(MX53_PIN_ATA_DATA5, PAD_CTL_DRV_HIGH | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); + mxc_iomux_set_pad(MX53_PIN_ATA_DATA6, PAD_CTL_DRV_HIGH | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); + mxc_iomux_set_pad(MX53_PIN_ATA_DATA7, PAD_CTL_DRV_HIGH | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); +} Like for 5/6, why is this function needed? When booting from NAND Where did you get the information the board can only boot from NAND? Did I mistakenly present it somewhere like that please? Anyway, no, it can also boot from SD and USB at least. the boot ROM sets the NAND pads appropriately itself (see 7.5.2.4), so unless it reverts those changes to the IOMUX reset values afterwards, there is no need to set the NAND IOMUX again. It's not as if the board were using NAND after having been booted from another source (like mx53ard does). I want to use NAND when booted from other sources, yes. Or perhaps you are planning to add more boot sources later, in which case there are configs missing for M4IF and WEIM (see mx53ard's setup_iomux_nand()). Yes, but even without this configuration, the NAND works perfectly well when booted from SD. Am I missing something here? [...] ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/6] arm: imx: Fix u-boot-with-nand-spl.imx target
Dear Marek Vasut, On Friday, April 19, 2013 1:16:31 PM, Marek Vasut wrote: Dear Benoît Thébaudeau, Dear Marek Vasut, On Friday, April 19, 2013 6:10:52 AM, Marek Vasut wrote: This target is currently concatenating u-boot SPL in imximage format with u-boot.bin. The NAND SPL can load a raw binary, but the preffered format with much less limitations is uImage format. Fix the target so u-boot.bin is first converted into uImage format and only after that is concatenated. Please reword: This is not a fix, but an enhancement. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- arch/arm/imx-common/Makefile | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile index 44b6822..ba31d3e 100644 --- a/arch/arm/imx-common/Makefile +++ b/arch/arm/imx-common/Makefile @@ -69,8 +69,11 @@ $(OBJTREE)/u-boot-with-nand-spl.imx: $(OBJTREE)/SPL $(OBJTREE)/u-boot.bin -I binary -O binary $(OBJTREE)/spl/u-boot-nand-spl.imx \ $(OBJTREE)/spl/u-boot-nand-spl-pad.imx rm $(OBJTREE)/spl/u-boot-nand-spl.imx - cat $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.bin $@ - rm $(OBJTREE)/spl/u-boot-nand-spl-pad.imx + $(OBJTREE)/tools/mkimage -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \ + -e $(CONFIG_SYS_TEXT_BASE) -C none -d $(OBJTREE)/u-boot.bin \ + $(OBJTREE)/u-boot.uim + cat $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim $@ + rm $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim # -- 1.7.11.7 This change is correct. I don't know the uImage format very well. Can you give examples of what this patch can bring compared to the raw binary format? If this change is useful, it should probably be made for u-boot-with-spl.imx too. Please see common/spl/spl_nand.c which calls spl_parse_image_header() on the payload loaded from NAND. This is implemented in common/spl/spl.c and if proper header is not found, the payload is assumed to be of 200kB of size, which is far less than fully configured U-Boot. Or you could #define CONFIG_SYS_MONITOR_LEN to what you need. So using the uimage format is much more flexible. I agree. So I'd see the following changes for this patch: - Reword fix to show enhancement, and detail the flexibility rationale in the description. - Extend to u-boot-with-spl.imx. Best regards, Benoît ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/6] arm: imx: Fix u-boot-with-nand-spl.imx target
Dear Benoît Thébaudeau, Dear Marek Vasut, On Friday, April 19, 2013 1:16:31 PM, Marek Vasut wrote: Dear Benoît Thébaudeau, Dear Marek Vasut, On Friday, April 19, 2013 6:10:52 AM, Marek Vasut wrote: This target is currently concatenating u-boot SPL in imximage format with u-boot.bin. The NAND SPL can load a raw binary, but the preffered format with much less limitations is uImage format. Fix the target so u-boot.bin is first converted into uImage format and only after that is concatenated. Please reword: This is not a fix, but an enhancement. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- arch/arm/imx-common/Makefile | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile index 44b6822..ba31d3e 100644 --- a/arch/arm/imx-common/Makefile +++ b/arch/arm/imx-common/Makefile @@ -69,8 +69,11 @@ $(OBJTREE)/u-boot-with-nand-spl.imx: $(OBJTREE)/SPL $(OBJTREE)/u-boot.bin -I binary -O binary $(OBJTREE)/spl/u-boot-nand-spl.imx \ $(OBJTREE)/spl/u-boot-nand-spl-pad.imx rm $(OBJTREE)/spl/u-boot-nand-spl.imx - cat $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.bin $@ -rm $(OBJTREE)/spl/u-boot-nand-spl-pad.imx + $(OBJTREE)/tools/mkimage -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \ + -e $(CONFIG_SYS_TEXT_BASE) -C none -d $(OBJTREE)/u-boot.bin \ + $(OBJTREE)/u-boot.uim + cat $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim $@ +rm $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim # -- 1.7.11.7 This change is correct. I don't know the uImage format very well. Can you give examples of what this patch can bring compared to the raw binary format? If this change is useful, it should probably be made for u-boot-with-spl.imx too. Please see common/spl/spl_nand.c which calls spl_parse_image_header() on the payload loaded from NAND. This is implemented in common/spl/spl.c and if proper header is not found, the payload is assumed to be of 200kB of size, which is far less than fully configured U-Boot. Or you could #define CONFIG_SYS_MONITOR_LEN to what you need. YUCK! So using the uimage format is much more flexible. I agree. So I'd see the following changes for this patch: - Reword fix to show enhancement, and detail the flexibility rationale in the description. - Extend to u-boot-with-spl.imx. Ok. Tom, shall we merge this one into current release after it's fixed? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/6] arm: imx: Fix u-boot-with-nand-spl.imx target
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/19/2013 07:51 AM, Marek Vasut wrote: Dear Benoît Thébaudeau, Dear Marek Vasut, On Friday, April 19, 2013 1:16:31 PM, Marek Vasut wrote: Dear Benoît Thébaudeau, Dear Marek Vasut, On Friday, April 19, 2013 6:10:52 AM, Marek Vasut wrote: This target is currently concatenating u-boot SPL in imximage format with u-boot.bin. The NAND SPL can load a raw binary, but the preffered format with much less limitations is uImage format. Fix the target so u-boot.bin is first converted into uImage format and only after that is concatenated. Please reword: This is not a fix, but an enhancement. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- arch/arm/imx-common/Makefile | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile index 44b6822..ba31d3e 100644 --- a/arch/arm/imx-common/Makefile +++ b/arch/arm/imx-common/Makefile @@ -69,8 +69,11 @@ $(OBJTREE)/u-boot-with-nand-spl.imx: $(OBJTREE)/SPL $(OBJTREE)/u-boot.bin -I binary -O binary $(OBJTREE)/spl/u-boot-nand-spl.imx \ $(OBJTREE)/spl/u-boot-nand-spl-pad.imx rm $(OBJTREE)/spl/u-boot-nand-spl.imx - cat $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.bin $@ - rm $(OBJTREE)/spl/u-boot-nand-spl-pad.imx + $(OBJTREE)/tools/mkimage -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \ + -e $(CONFIG_SYS_TEXT_BASE) -C none -d $(OBJTREE)/u-boot.bin \ + $(OBJTREE)/u-boot.uim + cat $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim $@ + rm $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim # -- 1.7.11.7 This change is correct. I don't know the uImage format very well. Can you give examples of what this patch can bring compared to the raw binary format? If this change is useful, it should probably be made for u-boot-with-spl.imx too. Please see common/spl/spl_nand.c which calls spl_parse_image_header() on the payload loaded from NAND. This is implemented in common/spl/spl.c and if proper header is not found, the payload is assumed to be of 200kB of size, which is far less than fully configured U-Boot. Or you could #define CONFIG_SYS_MONITOR_LEN to what you need. YUCK! So using the uimage format is much more flexible. I agree. So I'd see the following changes for this patch: - Reword fix to show enhancement, and detail the flexibility rationale in the description. - Extend to u-boot-with-spl.imx. Ok. Tom, shall we merge this one into current release after it's fixed? This is an enhancement not a bug fix, right? If so, next release. - -- Tom -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJRcTCWAAoJENk4IS6UOR1WFx8P/1CXwEcPqrvZthAJPqMYOjvU r1FVOX0MgXCkRQ1FXnGKaYdlJbc+1GS09KgsnbQ+AOwMEPPPAju62npHzP1/CfhH FkRInGmb/cqSuIt3shXg/Q4URkGEyMW6QhQpaskMgLNAzjGX1Q12Wnz2O1BLnIzr 1y9hMxNaqA8aIW9apXEtC/U67vHFVU74jT5IHzv/F6rzcAayoCz2Az0oG4bvRR90 HTPJMLH/z2lis1JgG5GSiH+604z+KOprNz1Uid2aZr7os/WmDsPkO4rJ0l8kd2HE Us7Au7/b0h1TfXrJv6oYNEsYn4jECPZ8HeHxjcRTi102JBAiiAK914PSuKVm+Kys ILffCZXcOHS6Q3zUTp4EkrcrxVzJxX+yIv2SJipy0dXx7mmrM559J55DUyFLsrKh o8Z4MMidjqulmTdQNeBhLLIo80URynouRQ2ZpiwpR7iKdObFuAPr0HVzg65tNpbo vr5WOquk4fooK88s3HXKjDvIyBJcq08rtn5sgmJCvba57WRrlnYwS1D3SF6NT/Me isF6jeL7nsZF2mckeCHJ3Wduw6kbg9n9mbfDWWqpYyqh/srvWvN6A7gCtwrlK2eR vN8DvDkBpWWulqfRzq6PLs8nH1x3WOajiA9iICc1O7+YyXzKGF+sAEBcBgTcH3fX lz4Hs0VAu3RA/kdeJiVJ =zMqB -END PGP SIGNATURE- ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/6] arm: mx5: Add support for DENX M53EVK
Dear Wolfgang Denk, Dear Marek Vasut, In message 1366344655-8535-6-git-send-email-ma...@denx.de you wrote: ... +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT +#define CONFIG_CMD_FAT One CONFIG_CMD_FAT should be enough. Indeed, it might be too fat now. [...] +#define CONFIG_CMDLINE_TAG +#define CONFIG_INITRD_TAG +#define CONFIG_SETUP_MEMORY_TAGS I think we support only DT enabled kernels, so do we really need these? I do need those to boot ancient FSL kernel (for that Android 4.1.2 for MX53 with working graphics acceleration I'm cooking here). +#defineCONFIG_BOOTFILE uImage Please make this m53evk/uImage as usual. Don't we need a DT file as well? OK +#defineCONFIG_BOOTARGS console=ttymxc1,115200 +#defineCONFIG_BOOTCOMMAND run bootcmd_net Where is bootcmd_net defined? I doubt that this is actually a working environment. Right. +#define CONFIG_LOADADDR0x7080 +#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR What do we need CONFIG_LOADADDR for? For this stuff, the loadaddr env variable. I have kinda idea to kill this and unify it to CONFIG_SYS_LOAD_ADDR all around, what do you think? include/env_default.h:#ifdefCONFIG_LOADADDR include/env_default.h: loadaddr= __stringify(CONFIG_LOADADDR)\0 +/* + * The 0x1000 offset must be present, otherwise board won't boot. + * The value (IRAM_BASE_ADDR) must be spelled out, otherwise linker won't link. + */ +#define CONFIG_SPL_TEXT_BASE 0x70008000 +#define CONFIG_SPL_PAD_TO 0x8000 +#define CONFIG_SPL_STACK 0x70004000 +#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_GPIO_SUPPORT The comment above does not relate to the definitions here. Is it misplaced, or not correct? Damn, remnant of my experimentation. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/6] nand: Add SPL_NAND support to mxc_nand_spl
Dear Marek Vasut, On Friday, April 19, 2013 1:14:16 PM, Marek Vasut wrote: Dear Benoît Thébaudeau, On Friday, April 19, 2013 10:38:48 AM, Benoît Thébaudeau wrote: Dear Marek Vasut, On Friday, April 19, 2013 6:10:51 AM, Marek Vasut wrote: Add support for generic NAND SPL via the SPL framework into the mxc_nand_spl driver. This is basically just a simple rename and publication of the already implemented functions. To avoid the old function which are used with the nand_spl/ stuff getting in the way of NAND SPL framework, the macro CONFIG_SPL_NAND_LEGACY was introduced and two remaining legacy boards were adjusted. These board need to be either fixed or removed in the long run, but I don't have either. Also make sure the requested payload is aligned to full pages, otherwise this simple driver fails to load the last page. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- drivers/mtd/nand/mxc_nand_spl.c | 13 ++--- include/configs/mx31pdk.h | 1 + include/configs/tx25.h | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/mxc_nand_spl.c b/drivers/mtd/nand/mxc_nand_spl.c index 09f23c3..8ff03c9 100644 --- a/drivers/mtd/nand/mxc_nand_spl.c +++ b/drivers/mtd/nand/mxc_nand_spl.c @@ -290,7 +290,7 @@ static int is_badblock(int pagenumber) return 0; } -static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) +int nand_spl_load_image(uint32_t from, unsigned int size, void *buf) { int i; unsigned int page; @@ -303,6 +303,7 @@ static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) page = from / CONFIG_SYS_NAND_PAGE_SIZE; i = 0; + size = roundup(size, CONFIG_SYS_NAND_PAGE_SIZE); while (i size / CONFIG_SYS_NAND_PAGE_SIZE) { if (nfc_read_page(page, buf) 0) return -1; @@ -332,6 +333,7 @@ static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) return 0; } +#ifdef CONFIG_SPL_NAND_SUPPORT_LEGACY /* * The main entry for NAND booting. It's necessary that SDRAM is already * configured and available since this code loads the main U-Boot image @@ -345,8 +347,9 @@ void nand_boot(void) * CONFIG_SYS_NAND_U_BOOT_OFFS and CONFIG_SYS_NAND_U_BOOT_SIZE must * be aligned to full pages */ - if (!nand_load(CONFIG_SYS_NAND_U_BOOT_OFFS, CONFIG_SYS_NAND_U_BOOT_SIZE, - (uchar *)CONFIG_SYS_NAND_U_BOOT_DST)) { + if (!nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS, + CONFIG_SYS_NAND_U_BOOT_SIZE, + (uchar *)CONFIG_SYS_NAND_U_BOOT_DST)) { /* Copy from NAND successful, start U-boot */ uboot = (void *)CONFIG_SYS_NAND_U_BOOT_START; uboot(); @@ -364,3 +367,7 @@ void hang(void) /* Loop forever */ while (1) ; } +#endif + +void nand_init(void) {} +void nand_deselect(void) {} diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h index 1754595..217552e 100644 --- a/include/configs/mx31pdk.h +++ b/include/configs/mx31pdk.h @@ -50,6 +50,7 @@ #define CONFIG_SPL_LDSCRIPTarch/$(ARCH)/cpu/u-boot-spl.lds #define CONFIG_SPL_MAX_SIZE2048 #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SUPPORT_LEGACY #define CONFIG_SPL_TEXT_BASE 0x87dc #define CONFIG_SYS_TEXT_BASE 0x87e0 diff --git a/include/configs/tx25.h b/include/configs/tx25.h index e72f8f6..7c362d0 100644 --- a/include/configs/tx25.h +++ b/include/configs/tx25.h @@ -37,6 +37,7 @@ #define CONFIG_SPL_LDSCRIPTarch/$(ARCH)/cpu/u-boot- spl.lds #define CONFIG_SPL_MAX_SIZE2048 #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SUPPORT_LEGACY #define CONFIG_SPL_TEXT_BASE 0x810c #define CONFIG_SYS_TEXT_BASE 0x8120 -- 1.7.11.7 This is not about legacy vs. non-legacy. This is about basic vs. more featured SPL because of SPL size constraints. So what about dropping CONFIG_SPL_NAND_SUPPORT_LEGACY and testing for CONFIG_SPL_FRAMEWORK definition instead?
Re: [U-Boot] [PATCH] mx51evk: Update environmet in order to allow booting a dt kernel
On Fri, Apr 19, 2013 at 2:29 AM, Wolfgang Denk w...@denx.de wrote: Dear Fabio Estevam, In message 1366328263-8468-1-git-send-email-feste...@gmail.com you wrote: There is a typo in the Subject: s/environmet/environment/ - mmcroot=/dev/mmcblk0p3 rw\0 \ - mmcrootfstype=ext3 rootwait\0 \ - mmcargs=setenv bootargs console=ttymxc0,${baudrate} \ - root=${mmcroot} \ - rootfstype=${mmcrootfstype}\0 \ + mmcroot=/dev/mmcblk0p3 rw rootwait\0 \ + mmcargs=setenv bootargs console=ttymxc0,${baudrate} root=${mmcroot}\0\ You are dropping the mmcrootfstype part here. Is this intentional? If yes, it appears to be an unrelated change that should be done in a separate commit. He is doing the sync of environment being used here with the other boards so I think the commit log could be reworded so it is clear about it. -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx: Complete the pin definitions for the i.MX6DL / i.MX6Solo
On Fri, Apr 19, 2013 at 2:28 AM, Pierre AUBERT p.aub...@staubli.com wrote: Hello Wolfgang Le 18/04/2013 19:38, Wolfgang Denk a écrit : Dear Pierre AUBERT, In message 51700b80.2090...@staubli.com you wrote: What is the purpose of this patch? Who needs the added definitions? These new definitions are useful for all boards based on i.MX6DL or i.MX6Solo. I just submitted a patch to support SabreSD equipped with i.MX6DL. I missed the submission of two patches together. So your SabreSD patch depends on this one? Yes I just asked for some cleanup for that other patch, so when resubmitting you can make this a series. I will resubmit as a serie today. Please also improve the commitlog. You should use the SoC or board name your are changing and copy Fabio and Stefano. -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/6] arm: mx5: Add support for DENX M53EVK
Dear Marek Vasut, In message 201304191358.25181.ma...@denx.de you wrote: +#define CONFIG_LOADADDR 0x7080 +#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR What do we need CONFIG_LOADADDR for? For this stuff, the loadaddr env variable. I have kinda idea to kill this and unify it to CONFIG_SYS_LOAD_ADDR all around, what do you think? Why CONFIG_SYS_* ? include/env_default.h:#ifdefCONFIG_LOADADDR include/env_default.h: loadaddr= __stringify(CONFIG_LOADADDR)\0 Indeed - I missed this one. I only checked C and asm sources, and cound not find a single reference... So arch/blackfin/include/asm/config.h and include/env_default.h are the only locateions that refer to CONFIG_LOADADDR ? This should indeed be cleaned up. [But this is not related to your patch any longer.] Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de If something is different, it's either better or worse, and usually both.- Larry Wall ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/6] nand: Add SPL_NAND support to mxc_nand_spl
On 2013-04-19 06:10:51 (+0200), Marek Vasut ma...@denx.de wrote: To avoid the old function which are used with the nand_spl/ stuff getting in the way of NAND SPL framework, the macro CONFIG_SPL_NAND_LEGACY was introduced and two remaining legacy boards were adjusted. These board need to be either fixed or removed in the long run, but I don't have either. It sounds like fixing these boards is mainly a matter of confirming that a configuration for them based around CONFIG_SPL_FRAMEWORK will fit in 2K. If so, I don't think there is any reason to keep legacy support around. +void nand_init(void) {} +void nand_deselect(void) {} Couldn't you just rename nfc_nand_init() to nand_init()? - Philip -- Philip Paeps Senior Reality Engineer Ministry of Information ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/6] arm: mx5: Add support for DENX M53EVK
Dear Marek Vasut, On Friday, April 19, 2013 1:44:57 PM, Marek Vasut wrote: Dear Benoît Thébaudeau, [...] +static void setup_iomux_nand(void) +{ + mxc_request_iomux(MX53_PIN_NANDF_WE_B, IOMUX_CONFIG_ALT0); + mxc_request_iomux(MX53_PIN_NANDF_RE_B, IOMUX_CONFIG_ALT0); + mxc_request_iomux(MX53_PIN_NANDF_CLE, IOMUX_CONFIG_ALT0); + mxc_request_iomux(MX53_PIN_NANDF_ALE, IOMUX_CONFIG_ALT0); + mxc_request_iomux(MX53_PIN_NANDF_WP_B, IOMUX_CONFIG_ALT0); + mxc_request_iomux(MX53_PIN_NANDF_RB0, IOMUX_CONFIG_ALT0); + mxc_request_iomux(MX53_PIN_NANDF_CS0, IOMUX_CONFIG_ALT0); + mxc_request_iomux(MX53_PIN_ATA_DATA0, IOMUX_CONFIG_ALT3); + mxc_request_iomux(MX53_PIN_ATA_DATA1, IOMUX_CONFIG_ALT3); + mxc_request_iomux(MX53_PIN_ATA_DATA2, IOMUX_CONFIG_ALT3); + mxc_request_iomux(MX53_PIN_ATA_DATA3, IOMUX_CONFIG_ALT3); + mxc_request_iomux(MX53_PIN_ATA_DATA4, IOMUX_CONFIG_ALT3); + mxc_request_iomux(MX53_PIN_ATA_DATA5, IOMUX_CONFIG_ALT3); + mxc_request_iomux(MX53_PIN_ATA_DATA6, IOMUX_CONFIG_ALT3); + mxc_request_iomux(MX53_PIN_ATA_DATA7, IOMUX_CONFIG_ALT3); + + mxc_iomux_set_pad(MX53_PIN_NANDF_WE_B, PAD_CTL_DRV_HIGH); + mxc_iomux_set_pad(MX53_PIN_NANDF_RE_B, PAD_CTL_DRV_HIGH); + mxc_iomux_set_pad(MX53_PIN_NANDF_CLE, PAD_CTL_DRV_HIGH); + mxc_iomux_set_pad(MX53_PIN_NANDF_ALE, PAD_CTL_DRV_HIGH); + mxc_iomux_set_pad(MX53_PIN_NANDF_WP_B, PAD_CTL_PUE_PULL | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); + mxc_iomux_set_pad(MX53_PIN_NANDF_RB0, PAD_CTL_PUE_PULL | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); + mxc_iomux_set_pad(MX53_PIN_NANDF_CS0, PAD_CTL_DRV_HIGH); + mxc_iomux_set_pad(MX53_PIN_ATA_DATA0, PAD_CTL_DRV_HIGH | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); + mxc_iomux_set_pad(MX53_PIN_ATA_DATA1, PAD_CTL_DRV_HIGH | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); + mxc_iomux_set_pad(MX53_PIN_ATA_DATA2, PAD_CTL_DRV_HIGH | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); + mxc_iomux_set_pad(MX53_PIN_ATA_DATA3, PAD_CTL_DRV_HIGH | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); + mxc_iomux_set_pad(MX53_PIN_ATA_DATA4, PAD_CTL_DRV_HIGH | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); + mxc_iomux_set_pad(MX53_PIN_ATA_DATA5, PAD_CTL_DRV_HIGH | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); + mxc_iomux_set_pad(MX53_PIN_ATA_DATA6, PAD_CTL_DRV_HIGH | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); + mxc_iomux_set_pad(MX53_PIN_ATA_DATA7, PAD_CTL_DRV_HIGH | + PAD_CTL_100K_PU | PAD_CTL_PKE_ENABLE); +} Like for 5/6, why is this function needed? When booting from NAND Where did you get the information the board can only boot from NAND? Did I mistakenly present it somewhere like that please? No, it's just suggested by the series, e.g. because imximage.cfg is NAND-specific. Anyway, no, it can also boot from SD and USB at least. Then it's fine. the boot ROM sets the NAND pads appropriately itself (see 7.5.2.4), so unless it reverts those changes to the IOMUX reset values afterwards, there is no need to set the NAND IOMUX again. It's not as if the board were using NAND after having been booted from another source (like mx53ard does). I want to use NAND when booted from other sources, yes. OK. Or perhaps you are planning to add more boot sources later, in which case there are configs missing for M4IF and WEIM (see mx53ard's setup_iomux_nand()). Yes, but even without this configuration, the NAND works perfectly well when booted from SD. Am I missing something here? It's just a matter of precaution. If you think that you can't rely on the auto IOMUX or clock setup by the boot ROM, the same applies to M4IF and WEIM. Best regards, Benoît ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/6] arm: mx5: Add SPL support code to MX5
On 2013-04-19 06:10:53 (+0200), Marek Vasut ma...@denx.de wrote: Fix minor adjustments needed to get SPL framework building on MX5. The same adjustment is needed to make other mx* build. Perhaps spl.h should live under arch/arm/include/asm/imx-common to avoid duplicating it for others? - Philip -- Philip Paeps Senior Reality Engineer Ministry of Information ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] wandboard: Add support for carrier board MicroSD card
On Wed, Apr 17, 2013 at 7:21 PM, Otavio Salvador ota...@ossystems.com.br wrote: On Tue, Apr 16, 2013 at 2:36 AM, Wolfgang Denk w...@denx.de wrote: Dear Otavio Salvador, In message cap9odkqo8v1-wyzq4_gxrz5djbd2xixw59xkozgy0zjsujj...@mail.gmail.com you wrote: + default: + printf(ERROR: you configured more USDHC controllers + (%d) than supported by the board\n, i + 1); + return -EINVAL; + } Can you please make this a compile time test and error? I will check how to do that. I checked and it will be a much bigger change as it should be done in all boards using this so I will look at it but won't hold the patches for now. I will send a new revision without this change and work on this. -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 1/7] mx6qsabre{sd, auto}: Add update_sd_firmware support
This allow for easy update of firmware in the SD card from a running U-Boot. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v3: - New patch Changes in v2: None include/configs/mx6qsabre_common.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/configs/mx6qsabre_common.h b/include/configs/mx6qsabre_common.h index 015e2b0..a32d7dd 100644 --- a/include/configs/mx6qsabre_common.h +++ b/include/configs/mx6qsabre_common.h @@ -78,6 +78,7 @@ #define CONFIG_CMD_BMODE #define CONFIG_CMD_BOOTZ +#define CONFIG_CMD_SETEXPR #undef CONFIG_CMD_IMLS #define CONFIG_BOOTDELAY 10 @@ -98,6 +99,19 @@ mmcdev= __stringify(CONFIG_SYS_MMC_ENV_DEV) \0 \ mmcpart= __stringify(CONFIG_SYS_MMC_ENV_PART) \0 \ mmcroot= CONFIG_MMCROOT rootwait rw\0 \ + update_sd_firmware= \ + if test ${ip_dyn} = yes; then \ + setenv get_cmd dhcp; \ + else \ + setenv get_cmd tftp; \ + fi; \ + if mmc dev ${mmcdev}; then\ + if ${get_cmd} ${update_sd_firmware_filename}; then \ + setexpr fw_sz ${filesize} / 0x200; \ + setexpr fw_sz ${fw_sz} + 1; \ + mmc write ${loadaddr} 0x2 ${fw_sz}; \ + fi; \ + fi\0 \ mmcargs=setenv bootargs console=${console},${baudrate} \ root=${mmcroot}\0 \ loadbootscript= \ -- 1.8.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 2/7] mx6qsabresd: Return status when initializing MMC
Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v3: - New patch Changes in v2: None board/freescale/mx6qsabresd/mx6qsabresd.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/board/freescale/mx6qsabresd/mx6qsabresd.c b/board/freescale/mx6qsabresd/mx6qsabresd.c index 0d7cb9e..bf9beef 100644 --- a/board/freescale/mx6qsabresd/mx6qsabresd.c +++ b/board/freescale/mx6qsabresd/mx6qsabresd.c @@ -166,6 +166,7 @@ int board_mmc_getcd(struct mmc *mmc) int board_mmc_init(bd_t *bis) { + s32 status = 0; int i; /* @@ -196,15 +197,15 @@ int board_mmc_init(bd_t *bis) break; default: printf(Warning: you configured more USDHC controllers - (%d) than supported by the board\n, i + 1); - return 0; - } + (%d) then supported by the board (%d)\n, + i + 1, CONFIG_SYS_FSL_USDHC_NUM); + return status; + } - if (fsl_esdhc_initialize(bis, usdhc_cfg[i])) - printf(Warning: failed to initialize mmc dev %d\n, i); + status |= fsl_esdhc_initialize(bis, usdhc_cfg[i]); } - return 0; + return status; } #endif -- 1.8.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 3/7] wandboard: Use env storage info for mmcdev/mmcpart
This makes environment and mmcdev/mmcpart in sync with SYS_MMC_ENV_DEV and SYS_MMC_ENV_PART settings. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v3: - New patch Changes in v2: None include/configs/wandboard.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h index 120e3f6..bd3e727 100644 --- a/include/configs/wandboard.h +++ b/include/configs/wandboard.h @@ -97,8 +97,8 @@ fdt_addr=0x1100\0 \ boot_fdt=try\0 \ ip_dyn=yes\0 \ - mmcdev=0\0 \ - mmcpart=2\0 \ + mmcdev= __stringify(CONFIG_SYS_MMC_ENV_DEV) \0 \ + mmcpart= __stringify(CONFIG_SYS_MMC_ENV_PART) \0 \ mmcroot=/dev/mmcblk0p3 rootwait rw\0 \ mmcargs=setenv bootargs console=${console},${baudrate} \ root=${mmcroot}\0 \ @@ -198,6 +198,7 @@ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_ENV_OFFSET (6 * 64 * 1024) #define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_PART2 #define CONFIG_OF_LIBFDT #define CONFIG_CMD_BOOTZ -- 1.8.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 4/7] wandboard: Add update_sd_firmware support
This allow for easy update of firmware in the SD card from a running U-Boot. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v3: - New patch Changes in v2: None include/configs/wandboard.h | 16 1 file changed, 16 insertions(+) diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h index bd3e727..0dc3286 100644 --- a/include/configs/wandboard.h +++ b/include/configs/wandboard.h @@ -47,6 +47,8 @@ #undef CONFIG_CMD_IMLS +#define CONFIG_CMD_SETEXPR + #define CONFIG_BOOTDELAY 5 #define CONFIG_SYS_MEMTEST_START 0x1000 @@ -100,6 +102,20 @@ mmcdev= __stringify(CONFIG_SYS_MMC_ENV_DEV) \0 \ mmcpart= __stringify(CONFIG_SYS_MMC_ENV_PART) \0 \ mmcroot=/dev/mmcblk0p3 rootwait rw\0 \ + update_sd_firmware_filename=u-boot.imx\0 \ + update_sd_firmware= \ + if test ${ip_dyn} = yes; then \ + setenv get_cmd dhcp; \ + else \ + setenv get_cmd tftp; \ + fi; \ + if mmc dev ${mmcdev}; then\ + if ${get_cmd} ${update_sd_firmware_filename}; then \ + setexpr fw_sz ${filesize} / 0x200; \ + setexpr fw_sz ${fw_sz} + 1; \ + mmc write ${loadaddr} 0x2 ${fw_sz}; \ + fi; \ + fi\0 \ mmcargs=setenv bootargs console=${console},${baudrate} \ root=${mmcroot}\0 \ loadbootscript= \ -- 1.8.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 5/7] wandboard: Add card detection for SOM MicroSD card
This add support to identify if the card is connected or not; so it does not try to communicate with the controller if no card is available. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v3: - Move GPIO definition to the top Changes in v2: None arch/arm/include/asm/arch-mx6/mx6dl_pins.h | 1 + board/wandboard/wandboard.c| 18 ++ 2 files changed, 19 insertions(+) diff --git a/arch/arm/include/asm/arch-mx6/mx6dl_pins.h b/arch/arm/include/asm/arch-mx6/mx6dl_pins.h index 9846f1b..b8e6bf0 100644 --- a/arch/arm/include/asm/arch-mx6/mx6dl_pins.h +++ b/arch/arm/include/asm/arch-mx6/mx6dl_pins.h @@ -93,6 +93,7 @@ enum { MX6_PAD_EIM_D28__I2C1_SDA = IOMUX_PAD(0x0544, 0x0174, 1 | IOMUX_CONFIG_SION, 0x086C, 1, 0), MX6_PAD_EIM_D28__GPIO_3_28 = IOMUX_PAD(0x0544, 0x0174, 5, 0x, 0, 0), MX6_PAD_EIM_D29__GPIO_3_29 = IOMUX_PAD(0x0548, 0x0178, 5, 0x, 0, 0), + MX6_PAD_EIM_DA9__GPIO_3_9 = IOMUX_PAD(0x0590, 0x01C0, 5, 0x, 0, 0), MX6_PAD_ENET_MDC__ENET_MDC = IOMUX_PAD(0x05B8, 0x01E8, 1, 0x, 0, 0), MX6_PAD_ENET_MDIO__ENET_MDIO= IOMUX_PAD(0x05BC, 0x01EC, 1, 0x0810, 0, 0), MX6_PAD_ENET_REF_CLK__ENET_TX_CLK = IOMUX_PAD(0x05C0, 0x01F0, 1, 0x, 0, 0), diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c index ac7b89a..8ec7eb9 100644 --- a/board/wandboard/wandboard.c +++ b/board/wandboard/wandboard.c @@ -38,6 +38,7 @@ DECLARE_GLOBAL_DATA_PTR; PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \ PAD_CTL_DSE_40ohm | PAD_CTL_HYS) +#define USDHC3_CD_GPIO IMX_GPIO_NR(3, 9) #define ETH_PHY_RESET IMX_GPIO_NR(3, 29) int dram_init(void) @@ -59,6 +60,8 @@ static iomux_v3_cfg_t const usdhc3_pads[] = { MX6_PAD_SD3_DAT1__USDHC3_DAT1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD3_DAT2__USDHC3_DAT2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD3_DAT3__USDHC3_DAT3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + /* SOM MicroSD Card Detect */ + MX6_PAD_EIM_DA9__GPIO_3_9 | MUX_PAD_CTRL(NO_PAD_CTRL), }; static iomux_v3_cfg_t const enet_pads[] = { @@ -100,12 +103,27 @@ static struct fsl_esdhc_cfg usdhc_cfg[1] = { {USDHC3_BASE_ADDR}, }; +int board_mmc_getcd(struct mmc *mmc) +{ + struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc-priv; + int ret = 0; + + switch (cfg-esdhc_base) { + case USDHC3_BASE_ADDR: + ret = !gpio_get_value(USDHC3_CD_GPIO); + break; + } + + return ret; +} + int board_mmc_init(bd_t *bis) { imx_iomux_v3_setup_multiple_pads(usdhc3_pads, ARRAY_SIZE(usdhc3_pads)); usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); usdhc_cfg[0].max_bus_width = 4; + gpio_direction_input(USDHC3_CD_GPIO); return fsl_esdhc_initialize(bis, usdhc_cfg[0]); } -- 1.8.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 6/7] wandboard: Add support for Carrier Board MicroSD card
Allow use of the carrier board MicroSD card available in the Wandboard; this allow for loading alternative system from the other card for testing or upgrade proposes. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v3: - Improve commit log - Reword comment about the 'mmc' mapping - Rework code which initialize mmc - Move GPIO definition to the top Changes in v2: - Return -EINVAL when trying to initialize a wrong controller arch/arm/include/asm/arch-mx6/mx6dl_pins.h | 7 board/wandboard/wandboard.c| 59 ++ include/configs/wandboard.h| 1 + 3 files changed, 60 insertions(+), 7 deletions(-) diff --git a/arch/arm/include/asm/arch-mx6/mx6dl_pins.h b/arch/arm/include/asm/arch-mx6/mx6dl_pins.h index b8e6bf0..8cedbdc 100644 --- a/arch/arm/include/asm/arch-mx6/mx6dl_pins.h +++ b/arch/arm/include/asm/arch-mx6/mx6dl_pins.h @@ -103,6 +103,7 @@ enum { MX6_PAD_GPIO_17__GPIO_7_12 = IOMUX_PAD(0x05E8, 0x0218, 5, 0x, 0, 0), MX6_PAD_GPIO_18__GPIO_7_13 = IOMUX_PAD(0x05EC, 0x021C, 5, 0x, 0, 0), MX6_PAD_GPIO_19__GPIO_4_5 = IOMUX_PAD(0x05F0, 0x0220, 5, 0x, 0, 0), + MX6_PAD_GPIO_2__GPIO_1_2= IOMUX_PAD(0x05F4, 0x0224, 5, 0x, 0, 0), MX6_PAD_GPIO_5__GPIO_1_5= IOMUX_PAD(0x0600, 0x0230, 5, 0x, 0, 0), MX6_PAD_GPIO_5__I2C3_SCL= IOMUX_PAD(0x0600, 0x0230, 6 | IOMUX_CONFIG_SION, 0x0878, 2, 0), MX6_PAD_KEY_COL3__I2C2_SCL = IOMUX_PAD(0x0638, 0x0250, 4 | IOMUX_CONFIG_SION, 0x0870, 1, 0), @@ -135,8 +136,14 @@ enum { MX6_PAD_RGMII_TD3__ENET_RGMII_TD3 = IOMUX_PAD(0x06B8, 0x02D0, 1, 0x, 0, 0), MX6_PAD_RGMII_TX_CTL__RGMII_TX_CTL = IOMUX_PAD(0x06BC, 0x02D4, 1, 0x, 0, 0), MX6_PAD_RGMII_TXC__ENET_RGMII_TXC = IOMUX_PAD(0x06C0, 0x02D8, 1, 0x, 0, 0), + MX6_PAD_SD1_CLK__USDHC1_CLK = IOMUX_PAD(0x06C4, 0x02DC, 0, 0x0928, 1, 0), + MX6_PAD_SD1_CMD__USDHC1_CMD = IOMUX_PAD(0x06C8, 0x02E0, 0 | IOMUX_CONFIG_SION, 0x, 0, 0), MX6_PAD_SD1_CMD__GPIO_1_18 = IOMUX_PAD(0x06C8, 0x02E0, 5, 0x, 0, 0), MX6_PAD_SD1_DAT3__GPIO_1_21 = IOMUX_PAD(0x06D8, 0x02F0, 5, 0x, 0, 0), + MX6_PAD_SD1_DAT0__USDHC1_DAT0 = IOMUX_PAD(0x06CC, 0x02E4, 0, 0x, 0, 0), + MX6_PAD_SD1_DAT1__USDHC1_DAT1 = IOMUX_PAD(0x06D0, 0x02E8, 0, 0x, 0, 0), + MX6_PAD_SD1_DAT2__USDHC1_DAT2 = IOMUX_PAD(0x06D4, 0x02EC, 0, 0x, 0, 0), + MX6_PAD_SD1_DAT3__USDHC1_DAT3 = IOMUX_PAD(0x06D8, 0x02F0, 0, 0x, 0, 0), MX6_PAD_SD3_CLK__USDHC3_CLK = IOMUX_PAD(0x06F4, 0x030C, 0, 0x0934, 1, 0), MX6_PAD_SD3_CMD__USDHC3_CMD = IOMUX_PAD(0x06F8, 0x0310, 0 | IOMUX_CONFIG_SION, 0x, 0, 0), MX6_PAD_SD3_DAT0__USDHC3_DAT0 = IOMUX_PAD(0x06FC, 0x0314, 0, 0x, 0, 0), diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c index 8ec7eb9..2bf121c 100644 --- a/board/wandboard/wandboard.c +++ b/board/wandboard/wandboard.c @@ -38,6 +38,7 @@ DECLARE_GLOBAL_DATA_PTR; PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \ PAD_CTL_DSE_40ohm | PAD_CTL_HYS) +#define USDHC1_CD_GPIO IMX_GPIO_NR(1, 2) #define USDHC3_CD_GPIO IMX_GPIO_NR(3, 9) #define ETH_PHY_RESET IMX_GPIO_NR(3, 29) @@ -53,6 +54,17 @@ static iomux_v3_cfg_t const uart1_pads[] = { MX6_PAD_CSI0_DAT11__UART1_RXD | MUX_PAD_CTRL(UART_PAD_CTRL), }; +iomux_v3_cfg_t const usdhc1_pads[] = { + MX6_PAD_SD1_CLK__USDHC1_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD1_CMD__USDHC1_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD1_DAT0__USDHC1_DAT0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD1_DAT1__USDHC1_DAT1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD1_DAT2__USDHC1_DAT2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD1_DAT3__USDHC1_DAT3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + /* Carrier MicroSD Card Detect */ + MX6_PAD_GPIO_2__GPIO_1_2 | MUX_PAD_CTRL(NO_PAD_CTRL), +}; + static iomux_v3_cfg_t const usdhc3_pads[] = { MX6_PAD_SD3_CLK__USDHC3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD3_CMD__USDHC3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), @@ -99,8 +111,9 @@ static void setup_iomux_enet(void) gpio_set_value(ETH_PHY_RESET, 1); } -static struct fsl_esdhc_cfg usdhc_cfg[1] = { +static struct fsl_esdhc_cfg usdhc_cfg[2] = { {USDHC3_BASE_ADDR}, + {USDHC1_BASE_ADDR}, }; int board_mmc_getcd(struct mmc *mmc) @@ -109,6 +122,9 @@ int board_mmc_getcd(struct mmc *mmc) int ret = 0; switch (cfg-esdhc_base) { + case USDHC1_BASE_ADDR: + ret = !gpio_get_value(USDHC1_CD_GPIO); + break; case USDHC3_BASE_ADDR: ret =
[U-Boot] [PATCH v3 7/7] wandboard: Add boot selection support
Adds support for 'bmode' command which let user to choose where to boot from; this allows U-Boot to load system from another storage without messing with jumpers. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- Changes in v3: None Changes in v2: None board/wandboard/wandboard.c | 19 +++ include/configs/wandboard.h | 2 ++ 2 files changed, 21 insertions(+) diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c index 2bf121c..c71c90d 100644 --- a/board/wandboard/wandboard.c +++ b/board/wandboard/wandboard.c @@ -16,6 +16,7 @@ #include asm/arch/sys_proto.h #include asm/gpio.h #include asm/imx-common/iomux-v3.h +#include asm/imx-common/boot_mode.h #include asm/io.h #include asm/sizes.h #include common.h @@ -225,6 +226,24 @@ int board_early_init_f(void) return 0; } +#ifdef CONFIG_CMD_BMODE +static const struct boot_mode board_boot_modes[] = { + /* 4 bit bus width */ + {mmc0, MAKE_CFGVAL(0x40, 0x30, 0x00, 0x00)}, + {mmc1, MAKE_CFGVAL(0x40, 0x20, 0x00, 0x00)}, + {NULL, 0}, +}; +#endif + +int board_late_init(void) +{ +#ifdef CONFIG_CMD_BMODE + add_board_boot_modes(board_boot_modes); +#endif + + return 0; +} + int board_init(void) { /* address of boot parameters */ diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h index 9898f55..9d7ec3f 100644 --- a/include/configs/wandboard.h +++ b/include/configs/wandboard.h @@ -32,6 +32,7 @@ #define CONFIG_SYS_MALLOC_LEN (3 * SZ_1M) #define CONFIG_BOARD_EARLY_INIT_F +#define CONFIG_BOARD_LATE_INIT #define CONFIG_MXC_GPIO #define CONFIG_MXC_UART @@ -47,6 +48,7 @@ #undef CONFIG_CMD_IMLS +#define CONFIG_CMD_BMODE #define CONFIG_CMD_SETEXPR #define CONFIG_BOOTDELAY 5 -- 1.8.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] mx51evk: Update environment in order to allow booting a dt kernel
From: Fabio Estevam fabio.este...@freescale.com Update the environment as done in other imx boards to allow easy switching between booting a non-dt kernel and a dt kernel. Boot tested the following kernels: - 2.6.35 from FSL (11.09 branch) - 3.9-rc7 non-dt - 3.9-rc7 dt Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Changes since v1: - Do not remove mmcrootfstype - Fix typo in Subject - Improve commit log by adding the tested booted kernels include/configs/mx51evk.h | 42 +++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h index cb3d938..4545a80 100644 --- a/include/configs/mx51evk.h +++ b/include/configs/mx51evk.h @@ -149,11 +149,15 @@ #define CONFIG_ETHPRIMEFEC0 -#define CONFIG_LOADADDR0x9080 /* loadaddr env var */ +#define CONFIG_LOADADDR0x9200 /* loadaddr env var */ #define CONFIG_EXTRA_ENV_SETTINGS \ script=boot.scr\0 \ uimage=uImage\0 \ + fdt_file=imx51-babbage.dtb\0 \ + fdt_addr=0x9100\0 \ + boot_fdt=try\0 \ + ip_dyn=yes\0 \ mmcdev=0\0 \ mmcpart=2\0 \ mmcroot=/dev/mmcblk0p3 rw\0 \ @@ -166,15 +170,47 @@ bootscript=echo Running bootscript from mmc ...; \ source\0 \ loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0 \ + loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0 \ mmcboot=echo Booting from mmc ...; \ run mmcargs; \ - bootm\0 \ + if test ${boot_fdt} = yes || test ${boot_fdt} = try; then \ + if run loadfdt; then \ + bootm ${loadaddr} - ${fdt_addr}; \ + else \ + if test ${boot_fdt} = try; then \ + bootm; \ + else \ + echo WARN: Cannot load the DT; \ + fi; \ + fi; \ + else \ + bootm; \ + fi;\0 \ netargs=setenv bootargs console=ttymxc0,${baudrate} \ root=/dev/nfs \ ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0 \ netboot=echo Booting from net ...; \ run netargs; \ - dhcp ${uimage}; bootm\0 \ + if test ${ip_dyn} = yes; then \ + setenv get_cmd dhcp; \ + else \ + setenv get_cmd tftp; \ + fi; \ + ${get_cmd} ${uimage}; \ + if test ${boot_fdt} = yes || test ${boot_fdt} = try; then \ + if ${get_cmd} ${fdt_addr} ${fdt_file}; then \ + bootm ${loadaddr} - ${fdt_addr}; \ + else \ + if test ${boot_fdt} = try; then \ + bootm; \ + else \ + echo ERROR: Cannot load the DT; \ + exit; \ + fi; \ + fi; \ + else \ + bootm; \ + fi;\0 #define CONFIG_BOOTCOMMAND \ mmc dev ${mmcdev}; if mmc rescan; then \ -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/6] nand: Add SPL_NAND support to mxc_nand_spl
Dear Marek Vasut, On Friday, April 19, 2013 1:55:31 PM, Benoît Thébaudeau wrote: Dear Marek Vasut, On Friday, April 19, 2013 1:14:16 PM, Marek Vasut wrote: Dear Benoît Thébaudeau, On Friday, April 19, 2013 10:38:48 AM, Benoît Thébaudeau wrote: Dear Marek Vasut, On Friday, April 19, 2013 6:10:51 AM, Marek Vasut wrote: Add support for generic NAND SPL via the SPL framework into the mxc_nand_spl driver. This is basically just a simple rename and publication of the already implemented functions. To avoid the old function which are used with the nand_spl/ stuff getting in the way of NAND SPL framework, the macro CONFIG_SPL_NAND_LEGACY was introduced and two remaining legacy boards were adjusted. These board need to be either fixed or removed in the long run, but I don't have either. Also make sure the requested payload is aligned to full pages, otherwise this simple driver fails to load the last page. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- drivers/mtd/nand/mxc_nand_spl.c | 13 ++--- include/configs/mx31pdk.h | 1 + include/configs/tx25.h | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/mxc_nand_spl.c b/drivers/mtd/nand/mxc_nand_spl.c index 09f23c3..8ff03c9 100644 --- a/drivers/mtd/nand/mxc_nand_spl.c +++ b/drivers/mtd/nand/mxc_nand_spl.c @@ -290,7 +290,7 @@ static int is_badblock(int pagenumber) return 0; } -static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) +int nand_spl_load_image(uint32_t from, unsigned int size, void *buf) { int i; unsigned int page; @@ -303,6 +303,7 @@ static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) page = from / CONFIG_SYS_NAND_PAGE_SIZE; i = 0; + size = roundup(size, CONFIG_SYS_NAND_PAGE_SIZE); while (i size / CONFIG_SYS_NAND_PAGE_SIZE) { if (nfc_read_page(page, buf) 0) return -1; @@ -332,6 +333,7 @@ static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) return 0; } +#ifdef CONFIG_SPL_NAND_SUPPORT_LEGACY /* * The main entry for NAND booting. It's necessary that SDRAM is already * configured and available since this code loads the main U-Boot image @@ -345,8 +347,9 @@ void nand_boot(void) * CONFIG_SYS_NAND_U_BOOT_OFFS and CONFIG_SYS_NAND_U_BOOT_SIZE must * be aligned to full pages */ - if (!nand_load(CONFIG_SYS_NAND_U_BOOT_OFFS, CONFIG_SYS_NAND_U_BOOT_SIZE, - (uchar *)CONFIG_SYS_NAND_U_BOOT_DST)) { + if (!nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS, + CONFIG_SYS_NAND_U_BOOT_SIZE, + (uchar *)CONFIG_SYS_NAND_U_BOOT_DST)) { /* Copy from NAND successful, start U-boot */ uboot = (void *)CONFIG_SYS_NAND_U_BOOT_START; uboot(); @@ -364,3 +367,7 @@ void hang(void) /* Loop forever */ while (1) ; } +#endif + +void nand_init(void) {} +void nand_deselect(void) {} diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h index 1754595..217552e 100644 --- a/include/configs/mx31pdk.h +++ b/include/configs/mx31pdk.h @@ -50,6 +50,7 @@ #define CONFIG_SPL_LDSCRIPT arch/$(ARCH)/cpu/u-boot-spl.lds #define CONFIG_SPL_MAX_SIZE 2048 #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SUPPORT_LEGACY #define CONFIG_SPL_TEXT_BASE 0x87dc #define CONFIG_SYS_TEXT_BASE 0x87e0 diff --git a/include/configs/tx25.h b/include/configs/tx25.h index e72f8f6..7c362d0 100644 --- a/include/configs/tx25.h +++ b/include/configs/tx25.h @@ -37,6 +37,7 @@ #define CONFIG_SPL_LDSCRIPT arch/$(ARCH)/cpu/u-boot- spl.lds #define CONFIG_SPL_MAX_SIZE 2048 #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SUPPORT_LEGACY #define CONFIG_SPL_TEXT_BASE 0x810c #define CONFIG_SYS_TEXT_BASE 0x8120 -- 1.7.11.7 This is not about legacy vs. non-legacy. This is about basic vs. more
Re: [U-Boot] [PATCH v2] mx51evk: Update environment in order to allow booting a dt kernel
On Fri, Apr 19, 2013 at 10:47 AM, Fabio Estevam feste...@gmail.com wrote: From: Fabio Estevam fabio.este...@freescale.com Update the environment as done in other imx boards to allow easy switching between booting a non-dt kernel and a dt kernel. Boot tested the following kernels: - 2.6.35 from FSL (11.09 branch) - 3.9-rc7 non-dt - 3.9-rc7 dt Signed-off-by: Fabio Estevam fabio.este...@freescale.com Your commit log say nothing about the LOADADDR; I'd also prefer if you could reuse most of other environments as it'd keep them mostly in sync (so please remove mmcfstype if you have no other reason to keep it). -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] mx51evk: Update environment in order to allow booting a dt kernel
On Fri, Apr 19, 2013 at 10:58 AM, Otavio Salvador ota...@ossystems.com.br wrote: Your commit log say nothing about the LOADADDR; I'd also prefer if you Ok, I can add a comment about the LOADADDR change in v3. could reuse most of other environments as it'd keep them mostly in sync (so please remove mmcfstype if you have no other reason to keep it). The removal of mmcrootfstype is unrelated to the change proposed by this patch. The goal of this patch is to be able to boot a dt kernel. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/6] arm: mx5: Add support for DENX M53EVK
Dear Marek Vasut, On Friday, April 19, 2013 2:54:56 PM, Benoît Thébaudeau wrote: Dear Marek Vasut, On Friday, April 19, 2013 1:44:57 PM, Marek Vasut wrote: Dear Benoît Thébaudeau, [...] Where did you get the information the board can only boot from NAND? Did I mistakenly present it somewhere like that please? No, it's just suggested by the series, e.g. because imximage.cfg is NAND-specific. This makes me wonder if the following should not be added to m53evk.h: #define CONFIG_SPL_TARGET u-boot-with-nand-spl.imx Best regards, Benoît ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3] mx51evk: Update environment in order to allow booting a dt kernel
From: Fabio Estevam fabio.este...@freescale.com Update the environment as done in other imx boards to allow easy switching between booting a non-dt kernel and a dt kernel. Change CONFIG_LOADADDR to 0x9200, so that we can have the: - uImage at 0x9200 - imx51-babbage.dtb at 0x9100 ,which are adequate locations in RAM to avoid overlapping. Boot tested the following kernels: - 2.6.35 from FSL (11.09 branch) - 3.9-rc7 non-dt - 3.9-rc7 dt Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Changes since v2: - Mention the LOADADDR change in the commit log Changes since v1: - Do not remove mmcrootfstype - Fix typo in Subject - Improve commit log by adding the tested booted kernels include/configs/mx51evk.h | 42 +++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h index cb3d938..4545a80 100644 --- a/include/configs/mx51evk.h +++ b/include/configs/mx51evk.h @@ -149,11 +149,15 @@ #define CONFIG_ETHPRIMEFEC0 -#define CONFIG_LOADADDR0x9080 /* loadaddr env var */ +#define CONFIG_LOADADDR0x9200 /* loadaddr env var */ #define CONFIG_EXTRA_ENV_SETTINGS \ script=boot.scr\0 \ uimage=uImage\0 \ + fdt_file=imx51-babbage.dtb\0 \ + fdt_addr=0x9100\0 \ + boot_fdt=try\0 \ + ip_dyn=yes\0 \ mmcdev=0\0 \ mmcpart=2\0 \ mmcroot=/dev/mmcblk0p3 rw\0 \ @@ -166,15 +170,47 @@ bootscript=echo Running bootscript from mmc ...; \ source\0 \ loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0 \ + loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0 \ mmcboot=echo Booting from mmc ...; \ run mmcargs; \ - bootm\0 \ + if test ${boot_fdt} = yes || test ${boot_fdt} = try; then \ + if run loadfdt; then \ + bootm ${loadaddr} - ${fdt_addr}; \ + else \ + if test ${boot_fdt} = try; then \ + bootm; \ + else \ + echo WARN: Cannot load the DT; \ + fi; \ + fi; \ + else \ + bootm; \ + fi;\0 \ netargs=setenv bootargs console=ttymxc0,${baudrate} \ root=/dev/nfs \ ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0 \ netboot=echo Booting from net ...; \ run netargs; \ - dhcp ${uimage}; bootm\0 \ + if test ${ip_dyn} = yes; then \ + setenv get_cmd dhcp; \ + else \ + setenv get_cmd tftp; \ + fi; \ + ${get_cmd} ${uimage}; \ + if test ${boot_fdt} = yes || test ${boot_fdt} = try; then \ + if ${get_cmd} ${fdt_addr} ${fdt_file}; then \ + bootm ${loadaddr} - ${fdt_addr}; \ + else \ + if test ${boot_fdt} = try; then \ + bootm; \ + else \ + echo ERROR: Cannot load the DT; \ + exit; \ + fi; \ + fi; \ + else \ + bootm; \ + fi;\0 #define CONFIG_BOOTCOMMAND \ mmc dev ${mmcdev}; if mmc rescan; then \ -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] crc32: Correct endianness of crc32 result
On Thu, Apr 18, 2013 at 01:25:51PM -0700, Simon Glass wrote: When crc32 is handled by the hash library, it requires the data to be in big-endian format, since it reads it byte-wise. Thus at present the 'crc32' command reports incorrect data. For example, previously we might see: Peach # crc32 4000 100 CRC32 for 4000 ... 40ff == 0d968558 but instead with the hash library we see: Peach # crc32 4000 100 CRC32 for 4000 ... 40ff == 5885960d Correct this. Signed-off-by: Simon Glass s...@chromium.org Reviewed-by: Vadim Bendebury vben...@google.com --- Changes in v2: - Remove use of put_unaligned_be32() - Use htonl() instead of htobe32() lib/crc32.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/crc32.c b/lib/crc32.c index 76205da..9759212 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -8,7 +8,9 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -#ifndef USE_HOSTCC +#ifdef USE_HOSTCC +#include arpa/inet.h +#else #include common.h #endif #include compiler.h @@ -256,5 +258,6 @@ void crc32_wd_buf(const unsigned char *input, unsigned int ilen, uint32_t crc; crc = crc32_wd(0, input, ilen, chunk_sz); + crc = htonl(crc); memcpy(output, crc, sizeof(crc)); } Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/6] nand: Add SPL_NAND support to mxc_nand_spl
On 2013-04-19 15:00:13 (+0200), Philip Paeps phi...@paeps.cx wrote: On 2013-04-19 06:10:51 (+0200), Marek Vasut ma...@denx.de wrote: To avoid the old function which are used with the nand_spl/ stuff getting in the way of NAND SPL framework, the macro CONFIG_SPL_NAND_LEGACY was introduced and two remaining legacy boards were adjusted. These board need to be either fixed or removed in the long run, but I don't have either. It sounds like fixing these boards is mainly a matter of confirming that a configuration for them based around CONFIG_SPL_FRAMEWORK will fit in 2K. If so, I don't think there is any reason to keep legacy support around. A first build with CONFIG_SPL_FRAMEWORK came out to nearly 4K. Large contributors being (unsurprisingly) libcommon and libgeneric. I had to get rid of a puts() in libspl to make it build without those libraries. Unfortunately, that still came out to 2.2K. Close. :-) I couldn't identify any obvious 100 bytes to scrap from glancing at u-boot-spl.map or objdump -D u-boot-spl, but I'll take a look. - Philip diff --git a/common/spl/spl.c b/common/spl/spl.c index 6a5a136..c061ab4 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -50,7 +50,6 @@ static bd_t bdata __attribute__ ((section(.data))); inline void hang(void) { - puts(### ERROR ### Please RESET the board ###\n); for (;;) ; } -- Philip Paeps Senior Reality Engineer Ministry of Information ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/6] arm: mx5: Add support for DENX M53EVK
On Fri, Apr 19, 2013 at 1:10 AM, Marek Vasut ma...@denx.de wrote: Add basic support for the DENX M53EVK board. Currently supported is the MMC, Ethernet, I2C. What about NAND, SATA and USB ? --- /dev/null +++ b/board/denx/m53evk/Makefile @@ -0,0 +1,40 @@ +# +# DENX M53EVK +# Copyright (C) 2012-2013 Marek Vasut ma...@denx.de +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA You could just remove the adress paragraph. Same for other places in this patch. +u32 get_board_rev(void) +{ + struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE; + struct fuse_bank *bank = iim-bank[0]; + struct fuse_bank0_regs *fuse = + (struct fuse_bank0_regs *)bank-fuse_regs; + int rev = readl(fuse-gp[6]); + + return (get_cpu_rev() ~(0xF 8)) | (rev 0xF) 8; +} Can't you just remove this get_board_rev() from the board file and use the generic one instead? +/* + * Do not overwrite the console + * Use always serial for U-Boot console + */ +int overwrite_console(void) +{ + return 1; +} + Is this really needed? It doesn't seem so, as you do not use splash screen. +int board_init(void) +{ + gd-bd-bi_boot_params = PHYS_SDRAM_1 + 0x100; + + mxc_set_sata_internal_clock(); + + mxc_set_clock(0, 33, MXC_NFC_CLK); Can you put a comment explaining which frequency you are setting MXC_NFC_CLK to ? +/* + * U-Boot Commands + */ In this file you use multi-line style for single line comments. You could simply do: /* U-Boot Commands */ +#define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024) Why do you need such large size? +#define CONFIG_SYS_MEMTEST_START 0x7001 +#define CONFIG_SYS_MEMTEST_END 0x7002 Are these values correct? You are only testing 64kB of the RAM. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/6] nand: Add SPL_NAND support to mxc_nand_spl
Hi Philip, On Friday, April 19, 2013 4:48:42 PM, Philip Paeps wrote: On 2013-04-19 15:00:13 (+0200), Philip Paeps phi...@paeps.cx wrote: On 2013-04-19 06:10:51 (+0200), Marek Vasut ma...@denx.de wrote: To avoid the old function which are used with the nand_spl/ stuff getting in the way of NAND SPL framework, the macro CONFIG_SPL_NAND_LEGACY was introduced and two remaining legacy boards were adjusted. These board need to be either fixed or removed in the long run, but I don't have either. It sounds like fixing these boards is mainly a matter of confirming that a configuration for them based around CONFIG_SPL_FRAMEWORK will fit in 2K. If so, I don't think there is any reason to keep legacy support around. A first build with CONFIG_SPL_FRAMEWORK came out to nearly 4K. Large contributors being (unsurprisingly) libcommon and libgeneric. I had to get rid of a puts() in libspl to make it build without those libraries. Unfortunately, that still came out to 2.2K. Close. :-) I couldn't identify any obvious 100 bytes to scrap from glancing at u-boot-spl.map or objdump -D u-boot-spl, but I'll take a look. Cool. But don't forget that the build must also succeed whatever the toolchain, so there must be a margin on the 2 kiB, perhaps 5% to 10%. Another way around could be to just move nand_boot() to a more generic SPL location so that other hardware having minimal SPL size requirements can use it without duplicating it. As to hang(), it has already been handled by Andreas. Best regards, Benoît ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/6] nand: Add SPL_NAND support to mxc_nand_spl
On 2013-04-19 16:48:42 (+0200), Philip Paeps phi...@paeps.cx wrote: On 2013-04-19 15:00:13 (+0200), Philip Paeps phi...@paeps.cx wrote: On 2013-04-19 06:10:51 (+0200), Marek Vasut ma...@denx.de wrote: To avoid the old function which are used with the nand_spl/ stuff getting in the way of NAND SPL framework, the macro CONFIG_SPL_NAND_LEGACY was introduced and two remaining legacy boards were adjusted. These board need to be either fixed or removed in the long run, but I don't have either. It sounds like fixing these boards is mainly a matter of confirming that a configuration for them based around CONFIG_SPL_FRAMEWORK will fit in 2K. If so, I don't think there is any reason to keep legacy support around. A first build with CONFIG_SPL_FRAMEWORK came out to nearly 4K. Large contributors being (unsurprisingly) libcommon and libgeneric. I had to get rid of a puts() in libspl to make it build without those libraries. Unfortunately, that still came out to 2.2K. Close. :-) I couldn't identify any obvious 100 bytes to scrap from glancing at u-boot-spl.map or objdump -D u-boot-spl, but I'll take a look. Just as I hit 'send', it occurred to me that this configuration is with a fairly lengthy lowlevel_init.S to support external boot. Paring that to the bare minimum gives a u-boot-spl.bin of 1821 bytes. I'm not familiar enough with 'internal boot' and the 'imximage' format to judge whether this leaves enough margin for telling the ROM loader to do its thing usefully. Benoît: do you have an idea how long a typically useful imximage preamble gets? Is ~230 bytes sufficient margin? - Philip -- Philip Paeps Senior Reality Engineer Ministry of Information ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/6] nand: Add SPL_NAND support to mxc_nand_spl
Hi Philip, On Friday, April 19, 2013 5:09:59 PM,Philip Paeps wrote: On 2013-04-19 16:48:42 (+0200), Philip Paeps phi...@paeps.cx wrote: On 2013-04-19 15:00:13 (+0200), Philip Paeps phi...@paeps.cx wrote: On 2013-04-19 06:10:51 (+0200), Marek Vasut ma...@denx.de wrote: To avoid the old function which are used with the nand_spl/ stuff getting in the way of NAND SPL framework, the macro CONFIG_SPL_NAND_LEGACY was introduced and two remaining legacy boards were adjusted. These board need to be either fixed or removed in the long run, but I don't have either. It sounds like fixing these boards is mainly a matter of confirming that a configuration for them based around CONFIG_SPL_FRAMEWORK will fit in 2K. If so, I don't think there is any reason to keep legacy support around. A first build with CONFIG_SPL_FRAMEWORK came out to nearly 4K. Large contributors being (unsurprisingly) libcommon and libgeneric. I had to get rid of a puts() in libspl to make it build without those libraries. Unfortunately, that still came out to 2.2K. Close. :-) I couldn't identify any obvious 100 bytes to scrap from glancing at u-boot-spl.map or objdump -D u-boot-spl, but I'll take a look. Just as I hit 'send', it occurred to me that this configuration is with a fairly lengthy lowlevel_init.S to support external boot. Paring that to the bare minimum gives a u-boot-spl.bin of 1821 bytes. But this requires a board-specific lowlevel_init() and a hack for puts() (which is perhaps already solved by Andreas' series), just to bloat the SPL with stuff useless for those boards, vs. a simple nand_boot() that can be made common to all SPLs with size restrictions. I'm not familiar enough with 'internal boot' and the 'imximage' format to judge whether this leaves enough margin for telling the ROM loader to do its thing usefully. Benoît: do you have an idea how long a typically useful imximage preamble gets? Is ~230 bytes sufficient margin? What do you mean? mx31pdk and tx25, contrary to m53evk, use external NAND boot, hence the 2-kiB SPL size limit (which could actually be extended to 4 kiB for tx25, but not for mx31pdk), and they don't require any imximage. Best regards, Benoît ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] mx51evk: Update environment in order to allow booting a dt kernel
On Fri, Apr 19, 2013 at 11:15 AM, Fabio Estevam feste...@gmail.com wrote: From: Fabio Estevam fabio.este...@freescale.com Update the environment as done in other imx boards to allow easy switching between booting a non-dt kernel and a dt kernel. Change CONFIG_LOADADDR to 0x9200, so that we can have the: - uImage at 0x9200 - imx51-babbage.dtb at 0x9100 ,which are adequate locations in RAM to avoid overlapping. Boot tested the following kernels: - 2.6.35 from FSL (11.09 branch) - 3.9-rc7 non-dt - 3.9-rc7 dt Signed-off-by: Fabio Estevam fabio.este...@freescale.com So I think this patch could be split in two: * one for loadaddr fix (which is the real fix here) * another to sync the environment with other boards (and thus doing all the sync in a single patch) What do you think? -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/6] nand: Add SPL_NAND support to mxc_nand_spl
On Friday, April 19, 2013 5:21:49 PM, Benoît Thébaudeau wrote: Hi Philip, On Friday, April 19, 2013 5:09:59 PM,Philip Paeps wrote: On 2013-04-19 16:48:42 (+0200), Philip Paeps phi...@paeps.cx wrote: On 2013-04-19 15:00:13 (+0200), Philip Paeps phi...@paeps.cx wrote: On 2013-04-19 06:10:51 (+0200), Marek Vasut ma...@denx.de wrote: To avoid the old function which are used with the nand_spl/ stuff getting in the way of NAND SPL framework, the macro CONFIG_SPL_NAND_LEGACY was introduced and two remaining legacy boards were adjusted. These board need to be either fixed or removed in the long run, but I don't have either. It sounds like fixing these boards is mainly a matter of confirming that a configuration for them based around CONFIG_SPL_FRAMEWORK will fit in 2K. If so, I don't think there is any reason to keep legacy support around. A first build with CONFIG_SPL_FRAMEWORK came out to nearly 4K. Large contributors being (unsurprisingly) libcommon and libgeneric. I had to get rid of a puts() in libspl to make it build without those libraries. Unfortunately, that still came out to 2.2K. Close. :-) I couldn't identify any obvious 100 bytes to scrap from glancing at u-boot-spl.map or objdump -D u-boot-spl, but I'll take a look. Just as I hit 'send', it occurred to me that this configuration is with a fairly lengthy lowlevel_init.S to support external boot. Paring that to the bare minimum gives a u-boot-spl.bin of 1821 bytes. But this requires a board-specific lowlevel_init() and a hack for puts() (which is perhaps already solved by Andreas' series), just to bloat the SPL with stuff useless for those boards, vs. a simple nand_boot() that can be made common to all SPLs with size restrictions. Or, with Andreas' series to get rid of puts(), and with an option to make the use of spl_parse_image_header() an option (i.e. to be able to force raw binary SPL payload format), the change would be almost equivalent to using the current nand_boot(), so the size should follow. Best regards, Benoît ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/6] nand: Add SPL_NAND support to mxc_nand_spl
On 2013-04-19 17:21:49 (+0200), Benoît Thébaudeau benoit.thebaud...@advansee.com wrote: On Friday, April 19, 2013 5:09:59 PM,Philip Paeps wrote: On 2013-04-19 16:48:42 (+0200), Philip Paeps phi...@paeps.cx wrote: A first build with CONFIG_SPL_FRAMEWORK came out to nearly 4K. Large contributors being (unsurprisingly) libcommon and libgeneric. I had to get rid of a puts() in libspl to make it build without those libraries. Unfortunately, that still came out to 2.2K. Close. :-) I couldn't identify any obvious 100 bytes to scrap from glancing at u-boot-spl.map or objdump -D u-boot-spl, but I'll take a look. Just as I hit 'send', it occurred to me that this configuration is with a fairly lengthy lowlevel_init.S to support external boot. Paring that to the bare minimum gives a u-boot-spl.bin of 1821 bytes. But this requires a board-specific lowlevel_init() and a hack for puts() (which is perhaps already solved by Andreas' series), just to bloat the SPL with stuff useless for those boards, vs. a simple nand_boot() that can be made common to all SPLs with size restrictions. Comparing the contents of framework SPL with old SPL, it looks like the only thing we gain is support for booting uImage files. At the cost of significantly reduced room for flexibility in lowlevel_init(). I agree that a simple nand_boot() is probably the way forward. I'm not familiar enough with 'internal boot' and the 'imximage' format to judge whether this leaves enough margin for telling the ROM loader to do its thing usefully. Benoît: do you have an idea how long a typically useful imximage preamble gets? Is ~230 bytes sufficient margin? What do you mean? mx31pdk and tx25, contrary to m53evk, use external NAND boot, hence the 2-kiB SPL size limit (which could actually be extended to 4 kiB for tx25, but not for mx31pdk), and they don't require any imximage. Mmm. Oh. It looks like I was looking at the wrong lowlevel_init() functions. They could be made to work with a very stripped down lowlevel_init(), but it's a _very_ tight fit. - Philip -- Philip Paeps Senior Reality Engineer Ministry of Information ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Displaying characters on the display in u-boot
Hi All, I have enabled the following configurations. in my board's config header #define CONFIG_VGA_AS_SINGLE_DEVICE #define CONFIG_VIDEO #define CONFIG_CFB_CONSOLE video_hw_init() returns a pointer to GraphicsDevice structure. It does the following - omap4_GD.winSizeX = 480; //__raw_readl() omap4_GD.winSizeY = 800; omap4_GD.gdfBytesPP = 4; omap4_GD.gdfIndex = GDF_32BIT_X888RGB; __raw_writel(0xA500, DISPC_GFX_BA0); omap4_GD.frameAdrs = __raw_readl(DISPC_GFX_BA0); initDisplay(); // Do all other clocks, GPIOs, OMAP4 registers specific for LCD(DSI, DISPC, DSS). -- board_video_init() is just a dummy call. I did a console_assign() to redirect stderr and stdout to vga. All the printf's doesn't come on the serial console or the LCD. I tried using the video_drawstring(10, 20, hello world), after resetting the stdout to serial. I see all the printf's on the serial console, but the string from video_drawstring()(hello world) won't come on the LCD even after syncing LCD pipelines (GO_LCD in OMAP4470). Then I just exported the lcd_drawchars() function into my LCD code, tried to write characters to the LCD, nothing came onto the screen. Please point out where I am going wrong. Kind regards Bhargav From: Bhargav A K Sent: Wednesday, March 27, 2013 10:04 PM To: Anatolij Gustschin Cc: u-boot@lists.denx.de Subject: RE: [U-Boot] Displaying characters on the display in u-boot Anatolij, Thank you very very much, I will implement this very soon. If I face any issues, which I won't after such excellent tutoring from you, can I revert back to you ? Thanks again :)... Yes. If board specific video initialization is done elsewhere the board_video_init() can be a dummy function. I shall make it a dummy, and I have to make sure it return success, as I have done it elsewhere. Kind regards Bhargav From: Anatolij Gustschin [ag...@denx.de] Sent: Wednesday, March 27, 2013 9:57 PM To: Bhargav A K Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] Displaying characters on the display in u-boot Hi, On Wed, 27 Mar 2013 21:05:55 +0530 Bhargav A K bhargav...@sasken.com wrote: ... What U-Boot version do you use? U-Boot 1.1.4-geb3fa991 (Feb 21 2013 - 10:11:04) (output of version command) Very old, ;-). This video_set_lut() function is only needed if you use 8 bits per pixel frame buffer. So can I comment it out, (or) just make a dummy call and dummy return from it. It wont affect my character(text) rendering on the display, correct ? yes, just provide a dummy video_set_lut(). If you do not use the GDF__8BIT_INDEX framebuffer format, the rendering will work. My last question, the board_video_init() function just initializes the board in display/video mode. For example if I have a GPIO to switch b/w command and video modes and a GPIO to switch on the LCD, etc., I'll have to do all such functions in it. But if all of those are already done, I can just return a dummy from the function ? Yes. If board specific video initialisation is done elsewhere the board_video_init() can be a dummy function. Some video drivers expect board_video_init() to return frame buffer base address but i.e. in omap3 driver it returns 0 for successful video init or an error code in case the board specific video init fails, thus preventing further initialisation in the cfb_console driver. Thanks, Anatolij SASKEN BUSINESS DISCLAIMER: This message may contain confidential, proprietary or legally privileged information. In case you are not the original intended Recipient of the message, you must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message and you are requested to delete it and inform the sender. Any views expressed in this message are those of the individual sender unless otherwise stated. Nothing contained in this message shall be construed as an offer or acceptance of any offer by Sasken Communication Technologies Limited (Sasken) unless sent with that express intent and with due authority of Sasken. Sasken has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email. Read Disclaimer at http://www.sasken.com/extras/mail_disclaimer.html ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] mx51evk: Update environment in order to allow booting a dt kernel
On Fri, Apr 19, 2013 at 12:31 PM, Otavio Salvador ota...@ossystems.com.br wrote: So I think this patch could be split in two: I do not agree. * one for loadaddr fix (which is the real fix here) My patch does not do any fix. We are able to load a non-dt kernel currently. I am adding a new feature: allow booting a dt kernel. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/6] nand: Add SPL_NAND support to mxc_nand_spl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/19/2013 11:41 AM, Philip Paeps wrote: On 2013-04-19 17:21:49 (+0200), Benoît Thébaudeau benoit.thebaud...@advansee.com wrote: On Friday, April 19, 2013 5:09:59 PM,Philip Paeps wrote: On 2013-04-19 16:48:42 (+0200), Philip Paeps phi...@paeps.cx wrote: A first build with CONFIG_SPL_FRAMEWORK came out to nearly 4K. Large contributors being (unsurprisingly) libcommon and libgeneric. I had to get rid of a puts() in libspl to make it build without those libraries. Unfortunately, that still came out to 2.2K. Close. :-) I couldn't identify any obvious 100 bytes to scrap from glancing at u-boot-spl.map or objdump -D u-boot-spl, but I'll take a look. Just as I hit 'send', it occurred to me that this configuration is with a fairly lengthy lowlevel_init.S to support external boot. Paring that to the bare minimum gives a u-boot-spl.bin of 1821 bytes. But this requires a board-specific lowlevel_init() and a hack for puts() (which is perhaps already solved by Andreas' series), just to bloat the SPL with stuff useless for those boards, vs. a simple nand_boot() that can be made common to all SPLs with size restrictions. Comparing the contents of framework SPL with old SPL, it looks like the only thing we gain is support for booting uImage files. At the cost of significantly reduced room for flexibility in lowlevel_init(). I agree that a simple nand_boot() is probably the way forward. Note that PowerPC has had to deal with this as well, see drivers/mtd/nand/fsl_elbc_spl.c and I suspect some amount of that should be made more easily borrowable for the case where SPL doesn't (or can't/won't) deal with image headers. - -- Tom -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJRcW7JAAoJENk4IS6UOR1Wmx4P/iIJS8QXZfdO7FNpeZz7Zet6 UNwsFoZeZ1jq+7DhFoA+o5Vwafys+AcYXX2uP0pVC9TJAbGBGSprYao6NE8tA0oo OWFWktUHoNn5vPedcrZuN6fxcBT9p+7MCo76YojSnWWd2DuwODODY6G3MX7I9iMi qbsBxJ9R13ubvd3rXGLltDFmR3hZx6wNRv/ke7Mk1dTycEKFbQIFmYhyXLHJLB6+ wxon4knbYcz1GmISUioGDX+hmc4NmKapydSeolmN1wE2tY9+0Mw+OINXcrYTjAN+ 8HpeuDsY2d/MzFdfgf9XvrZh2BFWmT7infK09udd6mbxosQYmEc8jIDnk+3DtA1I blcLjHOkxdVBS1665D0rWVGHs41CQcJfaaSdb3+pZSAbRwNzh2vivuLwdI//LyHf oMivbM8fLWkSpMSAxu517rfutF+KiJRr0Bns/QqQn4JmIs3qLfjPvpdPST/BaaI9 CAzlpz9c+iZaFvmfutvXhkPOZOKsjAfvT/04SAdXiruf83tn5ceU3/Z/adVxycth i8UdVqjAG4wtZtGaGjwd7SsW5cFlNy0ODZHMY+QqxD+XSD6T+3L815QpPZDhM2T2 obhgujYC6gg6vAlFp5nWnRxjeL0vB5k/HqV+4k9V9dAcpOyhWRvLeKgaiGyQMSpL xTyf7qQrf4ZkGFjO1zU/ =lMuD -END PGP SIGNATURE- ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] mx51evk: Update environment in order to allow booting a dt kernel
On Fri, Apr 19, 2013 at 1:11 PM, Fabio Estevam feste...@gmail.com wrote: On Fri, Apr 19, 2013 at 12:31 PM, Otavio Salvador ota...@ossystems.com.br wrote: So I think this patch could be split in two: I do not agree. * one for loadaddr fix (which is the real fix here) My patch does not do any fix. We are able to load a non-dt kernel currently. I am adding a new feature: allow booting a dt kernel. So in this case could you make a new patch to sync the other changes in the env? So it is kept in sync and avoid divertion from other boards we did it already? -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] mx51evk: Update environment in order to allow booting a dt kernel
On Fri, Apr 19, 2013 at 1:39 PM, Otavio Salvador ota...@ossystems.com.br wrote: So in this case could you make a new patch to sync the other changes in the env? So it is kept in sync and avoid divertion from other boards we did it already? Sorry, but I don't plan have any plans to work on such cleanup. I am not saying it is not important, just that I do not have the bandwidth to work on this right now. Feel free to submit patches for this env cleanup, if you like. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] mx51evk: Update environment in order to allow booting a dt kernel
On Fri, Apr 19, 2013 at 1:50 PM, Fabio Estevam feste...@gmail.com wrote: On Fri, Apr 19, 2013 at 1:39 PM, Otavio Salvador ota...@ossystems.com.br wrote: So in this case could you make a new patch to sync the other changes in the env? So it is kept in sync and avoid divertion from other boards we did it already? Sorry, but I don't plan have any plans to work on such cleanup. I am not saying it is not important, just that I do not have the bandwidth to work on this right now. Feel free to submit patches for this env cleanup, if you like. I don't have the board to test, neither I am working on the board, so it more logical as you're changing it to make this change. It more logical to make this now and avoid dealing with it in future again ... isn't it? -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] mx51evk: Update environment in order to allow booting a dt kernel
On Fri, Apr 19, 2013 at 1:55 PM, Otavio Salvador ota...@ossystems.com.br wrote: I don't have the board to test, neither I am working on the board, so it more logical as you're changing it to make this change. It more logical to make this now and avoid dealing with it in future again ... isn't it? Again, cleaning up the envs for all the imx boards is a huge effort and beyond the scope of this patch. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/6] arm: imx: Fix u-boot-with-nand-spl.imx target
Dear Tom Rini, On 04/19/2013 07:51 AM, Marek Vasut wrote: Dear Benoît Thébaudeau, Dear Marek Vasut, On Friday, April 19, 2013 1:16:31 PM, Marek Vasut wrote: Dear Benoît Thébaudeau, Dear Marek Vasut, On Friday, April 19, 2013 6:10:52 AM, Marek Vasut wrote: This target is currently concatenating u-boot SPL in imximage format with u-boot.bin. The NAND SPL can load a raw binary, but the preffered format with much less limitations is uImage format. Fix the target so u-boot.bin is first converted into uImage format and only after that is concatenated. Please reword: This is not a fix, but an enhancement. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- arch/arm/imx-common/Makefile | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile index 44b6822..ba31d3e 100644 --- a/arch/arm/imx-common/Makefile +++ b/arch/arm/imx-common/Makefile @@ -69,8 +69,11 @@ $(OBJTREE)/u-boot-with-nand-spl.imx: $(OBJTREE)/SPL $(OBJTREE)/u-boot.bin -I binary -O binary $(OBJTREE)/spl/u-boot-nand-spl.imx \ $(OBJTREE)/spl/u-boot-nand-spl-pad.imx rm $(OBJTREE)/spl/u-boot-nand-spl.imx - cat $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.bin $@ -rm $(OBJTREE)/spl/u-boot-nand-spl-pad.imx + $(OBJTREE)/tools/mkimage -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \ + -e $(CONFIG_SYS_TEXT_BASE) -C none -d $(OBJTREE)/u-boot.bin \ + $(OBJTREE)/u-boot.uim + cat $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim $@ +rm $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim # -- 1.7.11.7 This change is correct. I don't know the uImage format very well. Can you give examples of what this patch can bring compared to the raw binary format? If this change is useful, it should probably be made for u-boot-with-spl.imx too. Please see common/spl/spl_nand.c which calls spl_parse_image_header() on the payload loaded from NAND. This is implemented in common/spl/spl.c and if proper header is not found, the payload is assumed to be of 200kB of size, which is far less than fully configured U-Boot. Or you could #define CONFIG_SYS_MONITOR_LEN to what you need. YUCK! So using the uimage format is much more flexible. I agree. So I'd see the following changes for this patch: - Reword fix to show enhancement, and detail the flexibility rationale in the description. - Extend to u-boot-with-spl.imx. Ok. Tom, shall we merge this one into current release after it's fixed? This is an enhancement not a bug fix, right? If so, next release. Since the release is nigh, let's wrap it into the next one. But the usability of the spl is lower :( ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/6] nand: Add SPL_NAND support to mxc_nand_spl
Dear Benoît Thébaudeau, Dear Marek Vasut, On Friday, April 19, 2013 1:14:16 PM, Marek Vasut wrote: Dear Benoît Thébaudeau, On Friday, April 19, 2013 10:38:48 AM, Benoît Thébaudeau wrote: Dear Marek Vasut, On Friday, April 19, 2013 6:10:51 AM, Marek Vasut wrote: Add support for generic NAND SPL via the SPL framework into the mxc_nand_spl driver. This is basically just a simple rename and publication of the already implemented functions. To avoid the old function which are used with the nand_spl/ stuff getting in the way of NAND SPL framework, the macro CONFIG_SPL_NAND_LEGACY was introduced and two remaining legacy boards were adjusted. These board need to be either fixed or removed in the long run, but I don't have either. Also make sure the requested payload is aligned to full pages, otherwise this simple driver fails to load the last page. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- drivers/mtd/nand/mxc_nand_spl.c | 13 ++--- include/configs/mx31pdk.h | 1 + include/configs/tx25.h | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/mxc_nand_spl.c b/drivers/mtd/nand/mxc_nand_spl.c index 09f23c3..8ff03c9 100644 --- a/drivers/mtd/nand/mxc_nand_spl.c +++ b/drivers/mtd/nand/mxc_nand_spl.c @@ -290,7 +290,7 @@ static int is_badblock(int pagenumber) return 0; } -static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) +int nand_spl_load_image(uint32_t from, unsigned int size, void *buf) { int i; unsigned int page; @@ -303,6 +303,7 @@ static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) page = from / CONFIG_SYS_NAND_PAGE_SIZE; i = 0; + size = roundup(size, CONFIG_SYS_NAND_PAGE_SIZE); while (i size / CONFIG_SYS_NAND_PAGE_SIZE) { if (nfc_read_page(page, buf) 0) return -1; @@ -332,6 +333,7 @@ static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) return 0; } +#ifdef CONFIG_SPL_NAND_SUPPORT_LEGACY /* * The main entry for NAND booting. It's necessary that SDRAM is already * configured and available since this code loads the main U-Boot image @@ -345,8 +347,9 @@ void nand_boot(void) * CONFIG_SYS_NAND_U_BOOT_OFFS and CONFIG_SYS_NAND_U_BOOT_SIZE must * be aligned to full pages */ - if (!nand_load(CONFIG_SYS_NAND_U_BOOT_OFFS, CONFIG_SYS_NAND_U_BOOT_SIZE, - (uchar *)CONFIG_SYS_NAND_U_BOOT_DST)) { + if (!nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS, + CONFIG_SYS_NAND_U_BOOT_SIZE, + (uchar *)CONFIG_SYS_NAND_U_BOOT_DST)) { /* Copy from NAND successful, start U-boot */ uboot = (void *)CONFIG_SYS_NAND_U_BOOT_START; uboot(); @@ -364,3 +367,7 @@ void hang(void) /* Loop forever */ while (1) ; } +#endif + +void nand_init(void) {} +void nand_deselect(void) {} diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h index 1754595..217552e 100644 --- a/include/configs/mx31pdk.h +++ b/include/configs/mx31pdk.h @@ -50,6 +50,7 @@ #define CONFIG_SPL_LDSCRIPT arch/$(ARCH)/cpu/u-boot-spl.lds #define CONFIG_SPL_MAX_SIZE 2048 #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SUPPORT_LEGACY #define CONFIG_SPL_TEXT_BASE 0x87dc #define CONFIG_SYS_TEXT_BASE 0x87e0 diff --git a/include/configs/tx25.h b/include/configs/tx25.h index e72f8f6..7c362d0 100644 --- a/include/configs/tx25.h +++ b/include/configs/tx25.h @@ -37,6 +37,7 @@ #define CONFIG_SPL_LDSCRIPT arch/$(ARCH)/cpu/u-boot- spl.lds #define CONFIG_SPL_MAX_SIZE 2048 #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SUPPORT_LEGACY #define CONFIG_SPL_TEXT_BASE 0x810c #define CONFIG_SYS_TEXT_BASE 0x8120 -- 1.7.11.7 This is not about legacy vs. non-legacy. This is about basic vs. more featured SPL because of SPL size
Re: [U-Boot] [PATCH 2/6] nand: Add SPL_NAND support to mxc_nand_spl
Dear Benoît Thébaudeau, Dear Marek Vasut, On Friday, April 19, 2013 1:55:31 PM, Benoît Thébaudeau wrote: Dear Marek Vasut, On Friday, April 19, 2013 1:14:16 PM, Marek Vasut wrote: Dear Benoît Thébaudeau, On Friday, April 19, 2013 10:38:48 AM, Benoît Thébaudeau wrote: Dear Marek Vasut, On Friday, April 19, 2013 6:10:51 AM, Marek Vasut wrote: Add support for generic NAND SPL via the SPL framework into the mxc_nand_spl driver. This is basically just a simple rename and publication of the already implemented functions. To avoid the old function which are used with the nand_spl/ stuff getting in the way of NAND SPL framework, the macro CONFIG_SPL_NAND_LEGACY was introduced and two remaining legacy boards were adjusted. These board need to be either fixed or removed in the long run, but I don't have either. Also make sure the requested payload is aligned to full pages, otherwise this simple driver fails to load the last page. Signed-off-by: Marek Vasut ma...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net Cc: Benoît Thébaudeau benoit.thebaud...@advansee.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Stefano Babic sba...@denx.de Cc: Tom Rini tr...@ti.com --- drivers/mtd/nand/mxc_nand_spl.c | 13 ++--- include/configs/mx31pdk.h | 1 + include/configs/tx25.h | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/mxc_nand_spl.c b/drivers/mtd/nand/mxc_nand_spl.c index 09f23c3..8ff03c9 100644 --- a/drivers/mtd/nand/mxc_nand_spl.c +++ b/drivers/mtd/nand/mxc_nand_spl.c @@ -290,7 +290,7 @@ static int is_badblock(int pagenumber) return 0; } -static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) +int nand_spl_load_image(uint32_t from, unsigned int size, void *buf) { int i; unsigned int page; @@ -303,6 +303,7 @@ static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) page = from / CONFIG_SYS_NAND_PAGE_SIZE; i = 0; + size = roundup(size, CONFIG_SYS_NAND_PAGE_SIZE); while (i size / CONFIG_SYS_NAND_PAGE_SIZE) { if (nfc_read_page(page, buf) 0) return -1; @@ -332,6 +333,7 @@ static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) return 0; } +#ifdef CONFIG_SPL_NAND_SUPPORT_LEGACY /* * The main entry for NAND booting. It's necessary that SDRAM is already * configured and available since this code loads the main U-Boot image @@ -345,8 +347,9 @@ void nand_boot(void) * CONFIG_SYS_NAND_U_BOOT_OFFS and CONFIG_SYS_NAND_U_BOOT_SIZE must * be aligned to full pages */ - if (!nand_load(CONFIG_SYS_NAND_U_BOOT_OFFS, CONFIG_SYS_NAND_U_BOOT_SIZE, - (uchar *)CONFIG_SYS_NAND_U_BOOT_DST)) { + if (!nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS, + CONFIG_SYS_NAND_U_BOOT_SIZE, + (uchar *)CONFIG_SYS_NAND_U_BOOT_DST)) { /* Copy from NAND successful, start U-boot */ uboot = (void *)CONFIG_SYS_NAND_U_BOOT_START; uboot(); @@ -364,3 +367,7 @@ void hang(void) /* Loop forever */ while (1) ; } +#endif + +void nand_init(void) {} +void nand_deselect(void) {} diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h index 1754595..217552e 100644 --- a/include/configs/mx31pdk.h +++ b/include/configs/mx31pdk.h @@ -50,6 +50,7 @@ #define CONFIG_SPL_LDSCRIPTarch/$(ARCH)/cpu/u-boot- spl.lds #define CONFIG_SPL_MAX_SIZE2048 #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SUPPORT_LEGACY #define CONFIG_SPL_TEXT_BASE 0x87dc #define CONFIG_SYS_TEXT_BASE 0x87e0 diff --git a/include/configs/tx25.h b/include/configs/tx25.h index e72f8f6..7c362d0 100644 --- a/include/configs/tx25.h +++ b/include/configs/tx25.h @@ -37,6 +37,7 @@ #define CONFIG_SPL_LDSCRIPTarch/$(ARCH)/cpu/u- boot- spl.lds #define CONFIG_SPL_MAX_SIZE2048 #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SUPPORT_LEGACY #define CONFIG_SPL_TEXT_BASE
Re: [U-Boot] [PATCH 2/6] nand: Add SPL_NAND support to mxc_nand_spl
Dear Philip Paeps, On 2013-04-19 06:10:51 (+0200), Marek Vasut ma...@denx.de wrote: To avoid the old function which are used with the nand_spl/ stuff getting in the way of NAND SPL framework, the macro CONFIG_SPL_NAND_LEGACY was introduced and two remaining legacy boards were adjusted. These board need to be either fixed or removed in the long run, but I don't have either. It sounds like fixing these boards is mainly a matter of confirming that a configuration for them based around CONFIG_SPL_FRAMEWORK will fit in 2K. If so, I don't think there is any reason to keep legacy support around. These boards are too limited, so we can do nothing about them but to keep this hack in. +void nand_init(void) {} +void nand_deselect(void) {} Couldn't you just rename nfc_nand_init() to nand_init()? What good would that do? Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 1/2] mx51evk: Update environment in order to allow booting a dt kernel
From: Fabio Estevam fabio.este...@freescale.com Update the environment as done in other imx boards to allow easy switching between booting a non-dt kernel and a dt kernel. Change CONFIG_LOADADDR to 0x9200, so that we can have the: - uImage at 0x9200 - imx51-babbage.dtb at 0x9100 ,which are adequate locations in RAM to avoid overlapping. Boot tested the following kernels: - 2.6.35 from FSL (11.09 branch) - 3.9-rc7 non-dt - 3.9-rc7 dt Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Changes since v3: - None. Just make it part of a series now Changes since v2: - Mention the LOADADDR change in the commit log Changes since v1: - Do not remove mmcrootfstype - Fix typo in Subject - Improve commit log by adding the tested booted kernels include/configs/mx51evk.h | 42 +++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h index cb3d938..4545a80 100644 --- a/include/configs/mx51evk.h +++ b/include/configs/mx51evk.h @@ -149,11 +149,15 @@ #define CONFIG_ETHPRIMEFEC0 -#define CONFIG_LOADADDR0x9080 /* loadaddr env var */ +#define CONFIG_LOADADDR0x9200 /* loadaddr env var */ #define CONFIG_EXTRA_ENV_SETTINGS \ script=boot.scr\0 \ uimage=uImage\0 \ + fdt_file=imx51-babbage.dtb\0 \ + fdt_addr=0x9100\0 \ + boot_fdt=try\0 \ + ip_dyn=yes\0 \ mmcdev=0\0 \ mmcpart=2\0 \ mmcroot=/dev/mmcblk0p3 rw\0 \ @@ -166,15 +170,47 @@ bootscript=echo Running bootscript from mmc ...; \ source\0 \ loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0 \ + loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0 \ mmcboot=echo Booting from mmc ...; \ run mmcargs; \ - bootm\0 \ + if test ${boot_fdt} = yes || test ${boot_fdt} = try; then \ + if run loadfdt; then \ + bootm ${loadaddr} - ${fdt_addr}; \ + else \ + if test ${boot_fdt} = try; then \ + bootm; \ + else \ + echo WARN: Cannot load the DT; \ + fi; \ + fi; \ + else \ + bootm; \ + fi;\0 \ netargs=setenv bootargs console=ttymxc0,${baudrate} \ root=/dev/nfs \ ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0 \ netboot=echo Booting from net ...; \ run netargs; \ - dhcp ${uimage}; bootm\0 \ + if test ${ip_dyn} = yes; then \ + setenv get_cmd dhcp; \ + else \ + setenv get_cmd tftp; \ + fi; \ + ${get_cmd} ${uimage}; \ + if test ${boot_fdt} = yes || test ${boot_fdt} = try; then \ + if ${get_cmd} ${fdt_addr} ${fdt_file}; then \ + bootm ${loadaddr} - ${fdt_addr}; \ + else \ + if test ${boot_fdt} = try; then \ + bootm; \ + else \ + echo ERROR: Cannot load the DT; \ + exit; \ + fi; \ + fi; \ + else \ + bootm; \ + fi;\0 #define CONFIG_BOOTCOMMAND \ mmc dev ${mmcdev}; if mmc rescan; then \ -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 2/2] mx51evk: Do not force the rootfs type
From: Fabio Estevam fabio.este...@freescale.com Currently mmcrootfstype is set to ext3 type. It is better not to force it in the env vars, because users may prefer a different file system type, so let's get rid of 'mmcrootfstype'. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Changes since v3: - Newly introduced include/configs/mx51evk.h |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h index 4545a80..0973a74 100644 --- a/include/configs/mx51evk.h +++ b/include/configs/mx51evk.h @@ -160,8 +160,7 @@ ip_dyn=yes\0 \ mmcdev=0\0 \ mmcpart=2\0 \ - mmcroot=/dev/mmcblk0p3 rw\0 \ - mmcrootfstype=ext3 rootwait\0 \ + mmcroot=/dev/mmcblk0p3 rootwait rw\0 \ mmcargs=setenv bootargs console=ttymxc0,${baudrate} \ root=${mmcroot} \ rootfstype=${mmcrootfstype}\0 \ -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 2/2] mx51evk: Do not force the rootfs type
On Fri, Apr 19, 2013 at 2:43 PM, Fabio Estevam feste...@gmail.com wrote: From: Fabio Estevam fabio.este...@freescale.com Currently mmcrootfstype is set to ext3 type. It is better not to force it in the env vars, because users may prefer a different file system type, so let's get rid of 'mmcrootfstype'. Signed-off-by: Fabio Estevam fabio.este...@freescale.com Acked-by: Otavio Salvador ota...@ossystems.com.br -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 1/2] mx51evk: Update environment in order to allow booting a dt kernel
On Fri, Apr 19, 2013 at 2:43 PM, Fabio Estevam feste...@gmail.com wrote: From: Fabio Estevam fabio.este...@freescale.com Update the environment as done in other imx boards to allow easy switching between booting a non-dt kernel and a dt kernel. Change CONFIG_LOADADDR to 0x9200, so that we can have the: - uImage at 0x9200 - imx51-babbage.dtb at 0x9100 ,which are adequate locations in RAM to avoid overlapping. Boot tested the following kernels: - 2.6.35 from FSL (11.09 branch) - 3.9-rc7 non-dt - 3.9-rc7 dt Signed-off-by: Fabio Estevam fabio.este...@freescale.com Acked-by: Otavio Salvador ota...@ossystems.com.br -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v3, 6/8] USB: SS: Add support for Super Speed USB interface
Migrating my comments here for public discussion. This adds usb framework support for super-speed usb, which will further facilitate to add stack support for xHCI. Signed-off-by: Vikas C Sajjan vikas.saj...@samsung.com Signed-off-by: Vivek Gautam gautam.vi...@samsung.com --- Changes from v2: - Replacing if-else with switch-case in portspeed() in cmd_usb.c common/cmd_usb.c | 24 ++-- common/usb.c |5 + common/usb_hub.c |8 ++-- include/usb.h |6 ++ include/usb_defs.h | 24 +++- 5 files changed, 58 insertions(+), 9 deletions(-) diff --git a/common/cmd_usb.c b/common/cmd_usb.c index dacdc2d..594385a 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -271,12 +271,24 @@ static void usb_display_config(struct usb_device *dev) static inline char *portspeed(int speed) { - if (speed == USB_SPEED_HIGH) - return 480 Mb/s; - else if (speed == USB_SPEED_LOW) - return 1.5 Mb/s; - else - return 12 Mb/s; + char *speed_str; + + switch (speed) { + case USB_SPEED_SUPER: + speed_str = 5 Gb/s; + break; + case USB_SPEED_HIGH: + speed_str = 480 Mb/s; + break; + case USB_SPEED_LOW: + speed_str = 1.5 Mb/s; + break; + default: + speed_str = 12 Mb/s; + break; + } + + return speed_str; } /* shows the device tree recursively */ diff --git a/common/usb.c b/common/usb.c index 3a96a34..55fff5b 100644 --- a/common/usb.c +++ b/common/usb.c @@ -409,6 +409,11 @@ static int usb_parse_config(struct usb_device *dev, wMaxPacketSize); debug(if %d, ep %d\n, ifno, epno); break; + case USB_DT_SS_ENDPOINT_COMP: + if_desc = dev-config.if_desc[ifno]; + memcpy(if_desc-ss_ep_comp_desc[epno], + buffer[index], buffer[index]); + break; default: if (head-bLength == 0) return 1; diff --git a/common/usb_hub.c b/common/usb_hub.c index ab41943..1e225e6 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -165,7 +165,9 @@ static struct usb_hub_device *usb_hub_allocate(void) static inline char *portspeed(int portstatus) { - if (portstatus (1 USB_PORT_FEAT_HIGHSPEED)) + if (portstatus (1 USB_PORT_FEAT_SUPERSPEED)) It doesn't make sense to use the USB_PORT_FEAT_ constants to read a port status here. These should be USB_PORT_STAT_ instead (you could use a switch statement if you mask and shift them correctly). + return 5 Gb/s; + else if (portstatus (1 USB_PORT_FEAT_HIGHSPEED)) return 480 Mb/s; else if (portstatus (1 USB_PORT_FEAT_LOWSPEED)) return 1.5 Mb/s; @@ -268,7 +270,9 @@ void usb_hub_port_connect_change(struct usb_device *dev, int port) /* Allocate a new device struct for it */ usb = usb_alloc_new_device(dev-controller); - if (portstatus USB_PORT_STAT_HIGH_SPEED) + if (portstatus USB_PORT_STAT_SUPER_SPEED) + usb-speed = USB_SPEED_SUPER; + else if (portstatus USB_PORT_STAT_HIGH_SPEED) usb-speed = USB_SPEED_HIGH; else if (portstatus USB_PORT_STAT_LOW_SPEED) usb-speed = USB_SPEED_LOW; Should change to switch statement after implementing my suggestion to usb_defs.h diff --git a/include/usb.h b/include/usb.h index d79c865..d7b082d 100644 --- a/include/usb.h +++ b/include/usb.h @@ -76,6 +76,12 @@ struct usb_interface { unsigned char act_altsetting; struct usb_endpoint_descriptor ep_desc[USB_MAXENDPOINTS]; + /* + * Super Speed Device will have Super Speed Endpoint + * Companion Descriptor (section 9.6.7 of usb 3.0 spec) + * Revision 1.0 June 6th 2011 + */ + struct usb_ss_ep_comp_descriptor ss_ep_comp_desc[USB_MAXENDPOINTS]; } __attribute__ ((packed)); /* Configuration information.. */ diff --git a/include/usb_defs.h b/include/usb_defs.h index 0c78d9d..e2aaef3 100644 --- a/include/usb_defs.h +++ b/include/usb_defs.h @@ -203,6 +203,8 @@ #define USB_PORT_FEAT_POWER 8 #define USB_PORT_FEAT_LOWSPEED 9 #define USB_PORT_FEAT_HIGHSPEED 10 +#define USB_PORT_FEAT_FULLSPEED 11 +#define USB_PORT_FEAT_SUPERSPEED 12 Speed is never set as a feature anyway. We should just get rid of all of these and always use USB_PORT_STAT_ for them. #define USB_PORT_FEAT_C_CONNECTION 16 #define USB_PORT_FEAT_C_ENABLE 17 #define USB_PORT_FEAT_C_SUSPEND 18 @@ -218,8 +220,20 @@ #define USB_PORT_STAT_POWER 0x0100 #define USB_PORT_STAT_LOW_SPEED 0x0200 #define USB_PORT_STAT_HIGH_SPEED0x0400
Re: [U-Boot] [U-Boot, v3, 6/8] USB: SS: Add support for Super Speed USB interface
Hi Julius, Migrating my comments here for public discussion. Maybe you can make a patch(set) against u-boot-usb/next ? Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v3, 4/8] usb: Update device class in usb device's descriptor
Fetch the device class into usb device's dwcriptors, so that the host controller's driver can use this info to differentiate between HUB and DEVICE. Signed-off-by: Amar amarendra...@samsung.com --- Changes from v2: - none common/usb.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/common/usb.c b/common/usb.c index 8407974..3a96a34 100644 --- a/common/usb.c +++ b/common/usb.c @@ -879,6 +879,11 @@ int usb_new_device(struct usb_device *dev) } dev-descriptor.bMaxPacketSize0 = desc-bMaxPacketSize0; + /* + * Fetch the device class, driver can use this info + * to differentiate between HUB and DEVICE. + */ + dev-descriptor.bDeviceClass = desc-bDeviceClass; There is nothing wrong with this, but I also don't think you need it. In those places where you check for the hub class in your XHCI stack, you actually want to check whether the device is the root hub... so you should do that differently to avoid breaking external hubs (e.g. by comparing the device address). I think we should drop this since there is no real use for it. /* find the port number we're at */ if (parent) { ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [STATUS] v2013.04 released
Hey all, U-Boot v2013.04 has been released and uploaded to git and should be on the FTP server soon. The merge window is now open until May 4th and the next release, v2013.07 is scheduled for release on July 15th 2013 (the wiki is a bit off right now). Looking over the git log I see: - WARNING! ext4write syntax has been changed to match the other read/write commands. - Improved platform support for many ARM SoCs - Improved platform support on x86, PowerPC and MIPS too - More PowerPC targets migrated to the new SPL - global_data clean up and consolidation - Improved DFU support - Started work on generic board support (see common/board_*.c) - Added 'buildman' script. Like patman? You'll probably love buildman, give it a whirl and provide feedback. - And even more I've skimmed over! To repeat one thing and point out another: WARNING! ext4write syntax has been changed to match the other read/write commands. And: The mtest command is scheduled for removal in the next release. doc/README.memory-test explains the reasoning why. Thanks for all of your hard work everyone! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [STATUS] v2013.04 released
On Fri, Apr 19, 2013 at 02:57:45PM -0400, Tom Rini wrote: Hey all, U-Boot v2013.04 has been released and uploaded to git and should be on the FTP server soon. The merge window is now open until May 4th and the next release, v2013.07 is scheduled for release on July 15th 2013 (the wiki is a bit off right now). Looking over the git log I see: - WARNING! ext4write syntax has been changed to match the other read/write commands. - Improved platform support for many ARM SoCs - Improved platform support on x86, PowerPC and MIPS too - More PowerPC targets migrated to the new SPL - global_data clean up and consolidation - Improved DFU support - Started work on generic board support (see common/board_*.c) - Added 'buildman' script. Like patman? You'll probably love buildman, give it a whirl and provide feedback. - And even more I've skimmed over! To repeat one thing and point out another: WARNING! ext4write syntax has been changed to match the other read/write commands. And: The mtest command is scheduled for removal in the next release. doc/README.memory-test explains the reasoning why. ... removal from the default list. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] config_cmd_default.h: Remove CONFIG_CMD_MEMTEST
As per doc/feature-removal-schedule.txt, remove CONFIG_CMD_MEMTEST from default list of commands. Signed-off-by: Tom Rini tr...@ti.com --- doc/feature-removal-schedule.txt | 17 - include/config_cmd_default.h |1 - 2 files changed, 18 deletions(-) diff --git a/doc/feature-removal-schedule.txt b/doc/feature-removal-schedule.txt index ce72861..b4899c4 100644 --- a/doc/feature-removal-schedule.txt +++ b/doc/feature-removal-schedule.txt @@ -7,23 +7,6 @@ file. --- -What: Remove CONFIG_CMD_MEMTEST from default list -When: Release v2013.07 - -Why: The mtest command is of little practical use (if any), and - experience has shown that a large number of board configu- - rations define useless or even dangerous start and end - addresses. If not even the board maintainers are able to - figure out which memory range can be reliably tested, how can - we expect such from the end users? As this problem comes up - repeatedly, we rather do not enable this command by default, - so only people who know what they are doing will be confronted - with it. - -Who: Wolfgang Denk w...@denx.de - - What: Remove CONFIG_SYS_ENABLE_PADS_ALL and CONFIG_SYS_CLOCKS_ENABLE_ALL When: Release v2013.07 diff --git a/include/config_cmd_default.h b/include/config_cmd_default.h index a521103..73c9544 100644 --- a/include/config_cmd_default.h +++ b/include/config_cmd_default.h @@ -31,7 +31,6 @@ #define CONFIG_CMD_LOADB /* loadb*/ #define CONFIG_CMD_LOADS /* loads*/ #define CONFIG_CMD_MEMORY /* md mm nm mw cp cmp crc base loop */ -#define CONFIG_CMD_MEMTEST /* mtest*/ #define CONFIG_CMD_MISC/* Misc functions like sleep etc*/ #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot*/ #define CONFIG_CMD_NFS /* NFS support */ -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] feature-removal-schedule.txt: Add CONFIG_SYS_MTEST_START/END
With 'mtest' no longer a default command, we will have unused defines which should be removed for the v2013.10 release. Signed-off-by: Tom Rini tr...@ti.com --- doc/feature-removal-schedule.txt | 12 1 file changed, 12 insertions(+) diff --git a/doc/feature-removal-schedule.txt b/doc/feature-removal-schedule.txt index b4899c4..1c79c14 100644 --- a/doc/feature-removal-schedule.txt +++ b/doc/feature-removal-schedule.txt @@ -7,6 +7,18 @@ file. --- +What: Remove unused CONFIG_SYS_MEMTEST_START/END +When: Release v2013.10 + +Why: As the 'mtest' command is no longer default, a number of platforms + have not opted to turn the command back on and thus provide unused + defines (which are likely to be propogated to new platforms from + copy/paste). Remove these defines when unused. + +Who: Tom Rini tr...@ti.com + +--- + What: Remove CONFIG_SYS_ENABLE_PADS_ALL and CONFIG_SYS_CLOCKS_ENABLE_ALL When: Release v2013.07 -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5] palmtreo680: add utility that writes u-boot to flash
This adds a userspace linux utility that writes the u-boot image to an mtd partition on the docg4 nand flash. A special utility is required to do this because u-boot is partially loaded by an initial program loader (IPL) that is permanently programmed to the boot region of the flash. This IPL expects the image to be written in a unique format. The characteristics of this format can be summarized as follows: - Flash blocks to be loaded must have a magic number in the oob bytes of the first page of the block. - Each page must be written redundantly in the subsequent page. - The integrated flash controller's reliable mode is used, requiring that alternate 2k regions (4 pages) are skipped when writing. For these reasons, a u-boot image can not be written using nandwrite from mtd-utils. Signed-off-by: Mike Dunn miked...@newsguy.com --- Changelog: v5: on error, return sensible code from errno.h v4: - use return instead of exit - use calloc() instead of malloc() - remove call to read() from within while loop test v3: new patch; split off from patch 7 in v2 of patchset tools/palmtreo680/flash_u-boot.c | 177 ++ 1 files changed, 177 insertions(+), 0 deletions(-) create mode 100644 tools/palmtreo680/flash_u-boot.c diff --git a/tools/palmtreo680/flash_u-boot.c b/tools/palmtreo680/flash_u-boot.c new file mode 100644 index 000..3d8296f --- /dev/null +++ b/tools/palmtreo680/flash_u-boot.c @@ -0,0 +1,177 @@ +/* + * Copyright (C) 2013 Mike Dunn miked...@newsguy.com + * + * This file is released under the terms of GPL v2 and any later version. + * See the file COPYING in the root directory of the source tree for details. + * + * + * This is a userspace Linux utility that, when run on the Treo 680, will + * program u-boot to flash. The docg4 driver *must* be loaded with the + * reliable_mode and ignore_badblocks parameters enabled: + * + *modprobe docg4 ignore_badblocks=1 reliable_mode=1 + * + * This utility writes the concatenated spl + u-boot image to the start of the + * mtd device in the format expected by the IPL/SPL. The image file and mtd + * device node are passed to the utility as arguments. The blocks must have + * been erased beforehand. + * + * When you compile this, note that it links to libmtd from mtd-utils, so ensure + * that your include and lib paths include this. + */ + +#include stdio.h +#include stdlib.h +#include sys/stat.h +#include fcntl.h +#include string.h +#include sys/types.h +#include unistd.h +#include errno.h +#include mtd/mtd-user.h +#include libmtd.h + +#define RELIABLE_BLOCKSIZE 0x1 /* block capacity in reliable mode */ +#define STANDARD_BLOCKSIZE 0x4 /* block capacity in normal mode */ +#define PAGESIZE 512 +#define PAGES_PER_BLOCK 512 +#define OOBSIZE 7 /* available to user (16 total) */ + +uint8_t ff_oob[OOBSIZE] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; + +/* this is the magic number the IPL looks for (ASCII BIPO) */ +uint8_t page0_oob[OOBSIZE] = {'B', 'I', 'P', 'O', 0xff, 0xff, 0xff}; + +int main(int argc, char * const argv[]) +{ + int devfd, datafd, num_blocks, block; + off_t file_size; + libmtd_t mtd_desc; + struct mtd_dev_info devinfo; + uint8_t *blockbuf; + char response[8]; + + if (argc != 3) { + printf(usage: %s image file mtd dev node\n, argv[0]); + return -EINVAL; + } + + mtd_desc = libmtd_open(); + if (mtd_desc == NULL) { + int errsv = errno; + fprintf(stderr, can't initialize libmtd\n); + return -errsv; + } + + /* open the spl image file and mtd device */ + datafd = open(argv[1], O_RDONLY); + if (datafd == -1) { + int errsv = errno; + perror(argv[1]); + return -errsv; + } + devfd = open(argv[2], O_WRONLY); + if (devfd == -1) { + int errsv = errno; + perror(argv[2]); + return -errsv; + } + if (mtd_get_dev_info(mtd_desc, argv[2], devinfo) 0) { + int errsv = errno; + perror(argv[2]); + return -errsv; + } + + /* determine the number of blocks needed by the image */ + file_size = lseek(datafd, 0, SEEK_END); + if (file_size == (off_t)-1) { + int errsv = errno; + perror(lseek); + return -errsv; + } + num_blocks = (file_size + RELIABLE_BLOCKSIZE - 1) / RELIABLE_BLOCKSIZE; + file_size = lseek(datafd, 0, SEEK_SET); + if (file_size == (off_t)-1) { + int errsv = errno; + perror(lseek); + return -errsv; + } + printf(The mtd partition contains %d blocks\n, devinfo.eb_cnt); + printf(U-boot will occupy %d blocks\n, num_blocks); + if (num_blocks devinfo.eb_cnt) { + fprintf(stderr, Insufficient blocks
Re: [U-Boot] [U-Boot, v3, 3/8] usb: hub: Power-cycle on root-hub ports
XHCI ports are powered on after a H/W reset, however EHCI ports are not. So disabling and re-enabling power on all ports invariably. Signed-off-by: Amar amarendra...@samsung.com Signed-off-by: Vivek Gautam gautam.vi...@samsung.com --- Changes from v2: - Replaced USB_HUB_PRINTFs to debug() common/usb_hub.c | 34 ++ 1 files changed, 34 insertions(+), 0 deletions(-) diff --git a/common/usb_hub.c b/common/usb_hub.c index f2a0285..e4f4e3c 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -100,11 +100,45 @@ static void usb_hub_power_on(struct usb_hub_device *hub) int i; struct usb_device *dev; unsigned pgood_delay = hub-desc.bPwrOn2PwrGood * 2; + ALLOC_CACHE_ALIGN_BUFFER(struct usb_port_status, portsts, 1); + unsigned short portstatus; + int ret; dev = hub-pusb_dev; /* Enable power to the ports */ debug(enabling power on all ports\n); for (i = 0; i dev-maxchild; i++) { + /* + * Power-cycle the ports here: aka, + * turning them off and turning on again. + */ + usb_clear_port_feature(dev, i + 1, USB_PORT_FEAT_POWER); + debug(port %d returns %lX\n, i + 1, dev-status); + + /* Wait at least 2*bPwrOn2PwrGood for PP to change */ + mdelay(pgood_delay); This adds 20ms per port to USB boot times... is it really necessary? Why do we need to powercycle XHCI ports? Couldn't we just check if the ports are powered and only power them on if they aren't? If you insist, please at least parallelize this. Disable power on all ports, wait, then check and reenable it. + + ret = usb_get_port_status(dev, i + 1, portsts); + if (ret 0) { + debug(port %d: get_port_status failed\n, i + 1); This is a severe error (because the ports won't come up again), so I think it should be a printf() instead of a debug(). + return; + } + + /* + * Check to confirm the state of Port Power: + * xHCI says After modifying PP, s/w shall read + * PP and confirm that it has reached the desired state + * before modifying it again, undefined behavior may occur + * if this procedure is not followed. + * EHCI doesn't say anything like this, but no harm in keeping + * this. + */ + portstatus = le16_to_cpu(portsts-wPortStatus); + if (portstatus (USB_PORT_STAT_POWER 1)) { + debug(port %d: Port power change failed\n, i + 1); Same as above. + return; + } + usb_set_port_feature(dev, i + 1, USB_PORT_FEAT_POWER); debug(port %d returns %lX\n, i + 1, dev-status); } ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [UBOOT PATCH 1/2] ARM:Panda:Fix device tree loading for the panda-es
+ Sricharan On 04/18/2013 11:29 AM, Dan Murphy wrote: Fix the device tree loading for panda(4430) and panda-es(4460) Modify the board name if a 4460 panda or panda-es is detected at run time. In the findfdt add a check for the panda-es board name and load the panda-es device tree blob. Signed-off-by: Dan Murphy dmur...@ti.com --- board/ti/panda/panda.c |6 ++ include/configs/omap4_common.h |4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c index cab0598..2bbe392 100644 --- a/board/ti/panda/panda.c +++ b/board/ti/panda/panda.c @@ -82,6 +82,12 @@ int misc_init_r(void) if (omap_revision() == OMAP4430_ES1_0) return 0; +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG + if (omap_revision() = OMAP4460_ES1_0 || + omap_revision() = OMAP4460_ES1_1) + setenv(board_name, strcat(CONFIG_SYS_BOARD, -es)); +#endif + gpio_direction_input(PANDA_ULPI_PHY_TYPE_GPIO); phy_type = gpio_get_value(PANDA_ULPI_PHY_TYPE_GPIO); diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h index 1fd3097..68faeca 100644 --- a/include/configs/omap4_common.h +++ b/include/configs/omap4_common.h @@ -176,7 +176,9 @@ if test $board_name = sdp4430; then \ setenv fdtfile omap4-sdp.dtb; fi; \ if test $board_name = panda; then \ - setenv fdtfile omap4-panda-es.dtb; fi\0 \ + setenv fdtfile omap4-panda.dtb; fi; \ + if test $board_name = panda-es; then \ + setenv fdtfile omap4-panda-es.dtb; fi; \0 \ loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0 \ #define CONFIG_BOOTCOMMAND \ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [UBOOT PATCH 2/2] ARM: Panda: Add flag to allow runtime enviroment varibale mods
+ Sricharan On 04/18/2013 11:29 AM, Dan Murphy wrote: Add the flag to allow runtime enviroment variable modifications. This is being added so that the board-name can be modified at runtime to indicate either a panda(4430) or a panda-es(4460) Signed-off-by: Dan Murphy dmur...@ti.com --- include/configs/omap4_panda.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h index eacb5f5..abf586b 100644 --- a/include/configs/omap4_panda.h +++ b/include/configs/omap4_panda.h @@ -66,4 +66,6 @@ #define CONFIG_SYS_PROMPTPanda # +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG + #endif /* __CONFIG_PANDA_H */ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 2/2] mx51evk: Do not force the rootfs type
On Fri, Apr 19, 2013 at 3:01 PM, Otavio Salvador ota...@ossystems.com.br wrote: On Fri, Apr 19, 2013 at 2:43 PM, Fabio Estevam feste...@gmail.com wrote: From: Fabio Estevam fabio.este...@freescale.com Currently mmcrootfstype is set to ext3 type. It is better not to force it in the env vars, because users may prefer a different file system type, so let's get rid of 'mmcrootfstype'. Signed-off-by: Fabio Estevam fabio.este...@freescale.com Acked-by: Otavio Salvador ota...@ossystems.com.br - root=${mmcroot} \ - rootfstype=${mmcrootfstype}\0 \ + root=${mmcroot}\0 \ Please do this in this patch as well ;-) -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v3, 6/8] USB: SS: Add support for Super Speed USB interface
These patches haven't gone in yet, right? I think Vivek wants to discuss/update them himself, he just asked me to move my reviews to this thread. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [STATUS] v2013.04 released
Dear Tom, In message 20130419185745.GJ14952@bill-the-cat you wrote: U-Boot v2013.04 has been released and uploaded to git and should be on the FTP server soon. It's there. The merge window is now open until May 4th and the next release, v2013.07 is scheduled for release on July 15th 2013 (the wiki is a bit off right now). Should we not rather allow for a MW through May 11, so we have the usual about 3 weeks window? Here is the release statistics - for details please see http://www.denx.de/wiki/U-Boot/UbootStat_2013_04 Processed 980 csets from 135 developers 25 employers found A total of 78060 lines added, 44127 removed (delta 33933) Developers with the most changesets Simon Glass179 (18.3%) Tom Warren 57 (5.8%) Tom Rini39 (4.0%) Benoît Thébaudeau 35 (3.6%) Otavio Salvador 30 (3.1%) Allen Martin29 (3.0%) Gabor Juhos 29 (3.0%) Fabio Estevam 26 (2.7%) Stephen Warren 25 (2.6%) Marek Vasut 23 (2.3%) ... Developers with the most changed lines Tom Warren12510 (12.1%) Simon Glass 11745 (11.4%) Michal Simek 6548 (6.4%) Eric Nelson 4690 (4.6%) Benoît Thébaudeau 4430 (4.3%) York Sun 3520 (3.4%) Stefan Roese 3186 (3.1%) R Sricharan 3052 (3.0%) Piotr Wilczek 2823 (2.7%) Wolfgang Denk 2296 (2.2%) ... Developers with the most lines removed Michal Simek 6306 (14.3%) Benoît Thébaudeau 3523 (8.0%) Stefan Roese 2874 (6.5%) Wolfgang Denk 2053 (4.7%) Jeroen Hofstee 290 (0.7%) Javier Martinez Canillas 251 (0.6%) Gabor Juhos222 (0.5%) Daniel Schwierzeck 98 (0.2%) Lucas Stach 75 (0.2%) Robert P. J. Day34 (0.1%) ... Developers with the most signoffs (total 347) Minkyu Kang 54 (15.6%) Tom Warren 51 (14.7%) Andy Fleming32 (9.2%) Tom Rini23 (6.6%) Sonic Zhang 14 (4.0%) Kyungmin Park 13 (3.7%) R Sricharan 13 (3.7%) Simon Glass 13 (3.7%) Igor Grinberg 11 (3.2%) Poonam Aggrwal 9 (2.6%) ... Developers with the most reviews (total 128) Stephen Warren 60 (46.9%) Tom Rini45 (35.2%) Doug Anderson9 (7.0%) R Sricharan 3 (2.3%) Otavio Salvador 3 (2.3%) Benoît Thébaudeau 2 (1.6%) Javier Martinez Canillas 2 (1.6%) Simon Glass 1 (0.8%) Vadim Bendebury 1 (0.8%) Joe Hershberger 1 (0.8%) ... Developers with the most test credits (total 29) Fabio Estevam5 (17.2%) Rommel Custodio 3 (10.3%) Nishanth Menon 3 (10.3%) Michal Simek 2 (6.9%) Jagannadha Sutradharudu Teki2 (6.9%) Eric Nelson 2 (6.9%) R Sricharan 1 (3.4%) Javier Martinez Canillas 1 (3.4%) Andreas Bießmann1 (3.4%) Marek Vasut 1 (3.4%) ... Developers who gave the most tested-by credits (total 29) Benoît Thébaudeau 5 (17.2%) R Sricharan 4 (13.8%) Fabio Estevam2 (6.9%) Michal Simek 2 (6.9%) Tom Rini 2 (6.9%) Simon Glass 2 (6.9%) man.hu...@arcor.de 2 (6.9%) Nishanth Menon 1 (3.4%) Jagannadha Sutradharudu Teki1 (3.4%) Eric Nelson 1 (3.4%) ... Developers with the most report credits (total 10) Benoît Thébaudeau 2 (20.0%) Albert ARIBAUD 2 (20.0%) Koen Kooi1 (10.0%) Lubomir Popov1 (10.0%) Michael Cashwell 1 (10.0%) Alexei Fedorov 1 (10.0%) Aaron Williams 1 (10.0%) Peter Korsgaard 1 (10.0%) Developers who gave the most report credits (total 10) Albert ARIBAUD 2 (20.0%) Fabio Estevam2 (20.0%) Tom Rini 2 (20.0%) Marek Vasut 1 (10.0%) Vincent Stehlé 1 (10.0%) Akshay Saraswat 1 (10.0%) Lokesh Vutla 1 (10.0%) Top changeset contributors by employer (Unknown) 231 (23.6%) Google, Inc. 200 (20.4%) Texas Instruments 96 (9.8%) NVidia 75 (7.7%) Freescale 72 (7.3%) Samsung 66 (6.7%) DENX Software Engineering 50 (5.1%) ADVANSEE35 (3.6%) O.S. Systems30 (3.1%) Keymile 24 (2.4%) ... Top lines changed by employer (Unknown) 22275 (21.6%) Google, Inc. 19013 (18.5%) DENX Software Engineering 9156 (8.9%) Freescale 8640 (8.4%) Texas Instruments
Re: [U-Boot] [PATCH] Add NanoBone board support
On 16/04/13 16:48, Tom Rini wrote: On Tue, Apr 16, 2013 at 04:02:34PM +0100, Mark Jackson wrote: snip +config_ddr(303, MT41J128MJT125_IOCTRL_VALUE, ddr3_data, + ddr3_cmd_ctrl_data, ddr3_emif_reg_data, 0); And are you unable to run at 400MHz here? Or just weren't aware / having tried updating the timing parameters, etc? Forgive my ignorance, but where does the 400MHz come from ? I thought that 303MHz was the max clock speed on the AM335x (TRM 7.3.2.2), or am I missing something ? Cheers Mark J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 1/2] mx51evk: Update environment in order to allow booting a dt kernel
From: Fabio Estevam fabio.este...@freescale.com Update the environment as done in other imx boards to allow easy switching between booting a non-dt kernel and a dt kernel. Change CONFIG_LOADADDR to 0x9200, so that we can have the: - uImage at 0x9200 - imx51-babbage.dtb at 0x9100 ,which are adequate locations in RAM to avoid overlapping. Boot tested the following kernels: - 2.6.35 from FSL (11.09 branch) - 3.9-rc7 non-dt - 3.9-rc7 dt Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Changes since v4: - None Changes since v3: - None. Just make it part of a series now Changes since v2: - Mention the LOADADDR change in the commit log Changes since v1: - Do not remove mmcrootfstype - Fix typo in Subject - Improve commit log by adding the tested booted kernels include/configs/mx51evk.h | 42 +++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h index cb3d938..4545a80 100644 --- a/include/configs/mx51evk.h +++ b/include/configs/mx51evk.h @@ -149,11 +149,15 @@ #define CONFIG_ETHPRIMEFEC0 -#define CONFIG_LOADADDR0x9080 /* loadaddr env var */ +#define CONFIG_LOADADDR0x9200 /* loadaddr env var */ #define CONFIG_EXTRA_ENV_SETTINGS \ script=boot.scr\0 \ uimage=uImage\0 \ + fdt_file=imx51-babbage.dtb\0 \ + fdt_addr=0x9100\0 \ + boot_fdt=try\0 \ + ip_dyn=yes\0 \ mmcdev=0\0 \ mmcpart=2\0 \ mmcroot=/dev/mmcblk0p3 rw\0 \ @@ -166,15 +170,47 @@ bootscript=echo Running bootscript from mmc ...; \ source\0 \ loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0 \ + loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0 \ mmcboot=echo Booting from mmc ...; \ run mmcargs; \ - bootm\0 \ + if test ${boot_fdt} = yes || test ${boot_fdt} = try; then \ + if run loadfdt; then \ + bootm ${loadaddr} - ${fdt_addr}; \ + else \ + if test ${boot_fdt} = try; then \ + bootm; \ + else \ + echo WARN: Cannot load the DT; \ + fi; \ + fi; \ + else \ + bootm; \ + fi;\0 \ netargs=setenv bootargs console=ttymxc0,${baudrate} \ root=/dev/nfs \ ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0 \ netboot=echo Booting from net ...; \ run netargs; \ - dhcp ${uimage}; bootm\0 \ + if test ${ip_dyn} = yes; then \ + setenv get_cmd dhcp; \ + else \ + setenv get_cmd tftp; \ + fi; \ + ${get_cmd} ${uimage}; \ + if test ${boot_fdt} = yes || test ${boot_fdt} = try; then \ + if ${get_cmd} ${fdt_addr} ${fdt_file}; then \ + bootm ${loadaddr} - ${fdt_addr}; \ + else \ + if test ${boot_fdt} = try; then \ + bootm; \ + else \ + echo ERROR: Cannot load the DT; \ + exit; \ + fi; \ + fi; \ + else \ + bootm; \ + fi;\0 #define CONFIG_BOOTCOMMAND \ mmc dev ${mmcdev}; if mmc rescan; then \ -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 2/2] mx51evk: Do not force the rootfs type
From: Fabio Estevam fabio.este...@freescale.com Currently mmcrootfstype is set to ext3 type. It is better not to force it in the env vars, because users may prefer a different file system type, so let's get rid of 'mmcrootfstype'. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Changes since v4: - Remove the real usage of mmcrootfstype - Boot a rootfs from mmc card Changes since v3: - Newly introduced include/configs/mx51evk.h |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h index 4545a80..5f13a6e 100644 --- a/include/configs/mx51evk.h +++ b/include/configs/mx51evk.h @@ -160,11 +160,9 @@ ip_dyn=yes\0 \ mmcdev=0\0 \ mmcpart=2\0 \ - mmcroot=/dev/mmcblk0p3 rw\0 \ - mmcrootfstype=ext3 rootwait\0 \ + mmcroot=/dev/mmcblk0p3 rootwait rw\0 \ mmcargs=setenv bootargs console=ttymxc0,${baudrate} \ - root=${mmcroot} \ - rootfstype=${mmcrootfstype}\0 \ + root=${mmcroot}\0 \ loadbootscript= \ fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0 \ bootscript=echo Running bootscript from mmc ...; \ -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 1/2] mx51evk: Update environment in order to allow booting a dt kernel
On Fri, Apr 19, 2013 at 6:04 PM, Fabio Estevam feste...@gmail.com wrote: From: Fabio Estevam fabio.este...@freescale.com Update the environment as done in other imx boards to allow easy switching between booting a non-dt kernel and a dt kernel. Change CONFIG_LOADADDR to 0x9200, so that we can have the: - uImage at 0x9200 - imx51-babbage.dtb at 0x9100 ,which are adequate locations in RAM to avoid overlapping. Boot tested the following kernels: - 2.6.35 from FSL (11.09 branch) - 3.9-rc7 non-dt - 3.9-rc7 dt Signed-off-by: Fabio Estevam fabio.este...@freescale.com Acked-by: Otavio Salvador ota...@ossystems.com.br -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 2/2] mx51evk: Do not force the rootfs type
On Fri, Apr 19, 2013 at 6:04 PM, Fabio Estevam feste...@gmail.com wrote: From: Fabio Estevam fabio.este...@freescale.com Currently mmcrootfstype is set to ext3 type. It is better not to force it in the env vars, because users may prefer a different file system type, so let's get rid of 'mmcrootfstype'. Signed-off-by: Fabio Estevam fabio.este...@freescale.com Acked-by: Otavio Salvador ota...@ossystems.com.br -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Add NanoBone board support
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/19/2013 04:58 PM, Mark Jackson wrote: On 16/04/13 16:48, Tom Rini wrote: On Tue, Apr 16, 2013 at 04:02:34PM +0100, Mark Jackson wrote: snip + config_ddr(303, MT41J128MJT125_IOCTRL_VALUE, ddr3_data, + ddr3_cmd_ctrl_data, ddr3_emif_reg_data, 0); And are you unable to run at 400MHz here? Or just weren't aware / having tried updating the timing parameters, etc? Forgive my ignorance, but where does the 400MHz come from ? I thought that 303MHz was the max clock speed on the AM335x (TRM 7.3.2.2), or am I missing something ? Ah, OK. The nearly released now board I'm referring to that does have 400MHz there has newer silicon that does really support DDR3-800 and there is a new TRM that reflects this. I suspect however you have PG1.0 and 303 is your max speed. Sorry for the confusion! - -- Tom -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJRcb9aAAoJENk4IS6UOR1W3LsQAKQu/fCeOYVLS6ZOK0F/Yb9F oa7rdPdnGaNpCmZD53vLr0VfnfkLf0O/zC/YqXjx5hPYTw5voc0T2O1+wriG2Zlk uQ5UoWaSkIoMpZsJ2hViWXXY5fV1GFNW2EamuR00yf8byePGe96QKtRMTOg/EgMy 3yx6HKngC+IbjAg0p0vlTk4EZcYay6nY66uWmx1N8BXLcnIkEJCQY8SF7lwn8Wxy d33LPTQVIQsOi/cibzb4L28msAgyMPCvT2B9auE++BpVGJz+3yWHhJdnEU+dWI7n Q6PQ3h+iSrl6mYnw6YQV44dbZwxzad85P3qs/BvapE+6lBl+yzLjE+UYXuGePTa4 W8RqF+B7cFI/0pKdA5DBjRYJDdnJzAdrOBRZUH/lR6HsmeHFGrvxDr7Rfv/JkLSH /KmhmY9qIS1R9SRXy7Ck+CJD/mhD+wVuNFurosa+sYLkvhPDgzmJW7+0mc+VGj54 ACCiOdGkBuYsX108jpe8/Z+5y6aI65pv2MRGd+fzzBiMXoxuWSrzhX7IYBiHSuHJ 6xgKFhGaM7spYOh/x8NQF2jy8elIiQMlPFUTubUpDk5Tnm0dzCMgM8JxIjart6Lt kimOlsMSnBDAGLI5RnETJZoMzGMZxN6OxBsVcsGRoKf9vP2LNxpsRYBnApeegrIT Zi4R+rVueOTL4E1RPhOI =6oBd -END PGP SIGNATURE- ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [STATUS] v2013.04 released
On Fri, Apr 19, 2013 at 10:52:33PM +0200, Wolfgang Denk wrote: Dear Tom, In message 20130419185745.GJ14952@bill-the-cat you wrote: U-Boot v2013.04 has been released and uploaded to git and should be on the FTP server soon. It's there. The merge window is now open until May 4th and the next release, v2013.07 is scheduled for release on July 15th 2013 (the wiki is a bit off right now). Should we not rather allow for a MW through May 11, so we have the usual about 3 weeks window? A good point, lets go with May 11 then. Thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] freescale i.MX28 mxsboot NAND booting on mx28evk bad blocks
On 4/11/2013 4:25 PM, Trent Piepho wrote: Maybe it would make more sense for mxsboot to write two files? One with the FCBs and one with everything else? Hmm, possibly; I guess that would be conceptually simpler but require more commands to execute to get done. The FCBs are only 1036 byes long. The OOB isn't used by the FCB. So when writing the FCBs, the OOB should not be written and whatever bad/good flag is in there left alone. But u-boot flashes the entire block with zeros (the first 2112 page and also the 63 unused pages after it too). So the OOB is also zeroed out, and that marks the block as bad. I'm not that familiar with the intricacies of NAND, it sounds like you're saying each FCB should be written separately rather than in one fell swoop as it does currently? There haven't been any responses or follow-ups to this thread, so I guess they either think it's working fine as is or aren't interested/don't have the time to follow up on the issue. I'm not accusing anything of being broken, just explaining what I'm seeing and offering to help :)... I think we're going to always have u-boot boot the recovery kernel and have that bootstrap the production kernel. We plan to have a physical reset You'll boot slower then, as you're basically booting twice. Maybe that doesn't matter for you. Boot time doesn't matter too much for our application, it shouldn't boot very often and if it does a couple extra seconds won't be a problem. What is your recovery plan in the case of the production kernel/file system becoming corrupt and unbootable? u-boot, per the environment variable, will try to load the production kernel, which then can't boot far enough to reset the environment variable to load the recovery kernel? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot