Re: [U-Boot] About the CRC of u-boot.bin
Dear Peter Pan, In message you wrote: > I found out that even with the same source code, the final u-boot.bin > has a different MD5sum each time I build. > Is that possible to get an identical u-boot.bin for the same source > code, no matter when I build? No, as the image contains a time stamp that changes each time you build a new image. 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 Steal five dollars and you were a petty thief. Steal thousands of dollars and you are either a government or a hero. - Terry Pratchett, _Going_Postal_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] [V2] AT91: Makes AT91SAM9RL-EK build correctly against u-boot-atmel/master
Rework for AT91SAM9RL-EK, makes it build again. Based on the work for AT91SAM9260-EK. Signed-off-by: Hong Xu --- Makefile| 12 - board/atmel/at91sam9rlek/at91sam9rlek.c | 71 +--- board/atmel/at91sam9rlek/config.mk |1 - board/atmel/at91sam9rlek/led.c |6 ++- boards.cfg |3 + include/configs/at91sam9rlek.h | 77 +- 6 files changed, 95 insertions(+), 75 deletions(-) delete mode 100644 board/atmel/at91sam9rlek/config.mk diff --git a/Makefile b/Makefile index 1619c47..35e9107 100644 --- a/Makefile +++ b/Makefile @@ -808,18 +808,6 @@ at91sam9263ek_config : unconfig fi; @$(MKCONFIG) -n $@ -a at91sam9263ek arm arm926ejs at91sam9263ek atmel at91 -at91sam9rlek_nandflash_config \ -at91sam9rlek_dataflash_config \ -at91sam9rlek_dataflash_cs0_config \ -at91sam9rlek_config: unconfig - @mkdir -p $(obj)include - @if [ "$(findstring _nandflash,$@)" ] ; then \ - echo "#define CONFIG_SYS_USE_NANDFLASH 1" >>$(obj)include/config.h ; \ - else \ - echo "#define CONFIG_SYS_USE_DATAFLASH 1" >>$(obj)include/config.h ; \ - fi; - @$(MKCONFIG) -n $@ -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91 - at91sam9m10g45ek_nandflash_config \ at91sam9m10g45ek_dataflash_config \ at91sam9m10g45ek_dataflash_cs0_config \ diff --git a/board/atmel/at91sam9rlek/at91sam9rlek.c b/board/atmel/at91sam9rlek/at91sam9rlek.c index e374917..ad289a4 100644 --- a/board/atmel/at91sam9rlek/at91sam9rlek.c +++ b/board/atmel/at91sam9rlek/at91sam9rlek.c @@ -23,6 +23,7 @@ */ #include +#include #include #include #include @@ -31,7 +32,7 @@ #include #include #include -#include + #include #include #if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB) @@ -48,33 +49,37 @@ DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_CMD_NAND static void at91sam9rlek_nand_hw_init(void) { + struct at91_smc *smc = (struct at91_smc *)ATMEL_BASE_SMC; + struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX; + struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; unsigned long csa; /* Enable CS3 */ - csa = at91_sys_read(AT91_MATRIX_EBICSA); - at91_sys_write(AT91_MATRIX_EBICSA, - csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA); + csa = readl(&matrix->ebicsa); + csa |= AT91_MATRIX_CS3A_SMC_SMARTMEDIA; + + writel(csa, &matrix->ebicsa); /* Configure SMC CS3 for NAND/SmartMedia */ - at91_sys_write(AT91_SMC_SETUP(3), - AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(0) | - AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(0)); - at91_sys_write(AT91_SMC_PULSE(3), - AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) | - AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3)); - at91_sys_write(AT91_SMC_CYCLE(3), - AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5)); - at91_sys_write(AT91_SMC_MODE(3), - AT91_SMC_READMODE | AT91_SMC_WRITEMODE | - AT91_SMC_EXNWMODE_DISABLE | + writel(AT91_SMC_SETUP_NWE(1) | AT91_SMC_SETUP_NCS_WR(0) | + AT91_SMC_SETUP_NRD(1) | AT91_SMC_SETUP_NCS_RD(0), + &smc->cs[3].setup); + writel(AT91_SMC_PULSE_NWE(3) | AT91_SMC_PULSE_NCS_WR(3) | + AT91_SMC_PULSE_NRD(3) | AT91_SMC_PULSE_NCS_RD(3), + &smc->cs[3].pulse); + writel(AT91_SMC_CYCLE_NWE(5) | AT91_SMC_CYCLE_NRD(5), + &smc->cs[3].cycle); + writel(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE | + AT91_SMC_MODE_EXNW_DISABLE | #ifdef CONFIG_SYS_NAND_DBW_16 - AT91_SMC_DBW_16 | + AT91_SMC_MODE_DBW_16 | #else /* CONFIG_SYS_NAND_DBW_8 */ - AT91_SMC_DBW_8 | + AT91_SMC_MODE_DBW_8 | #endif - AT91_SMC_TDF_(2)); + AT91_SMC_MODE_TDF_CYCLE(2), + &smc->cs[3].mode); - at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9RL_ID_PIOD); + writel(1 << ATMEL_ID_PIOD, &pmc->pcer); /* Configure RDY/BSY */ at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1); @@ -102,7 +107,7 @@ vidinfo_t panel_info = { vl_vsync_len: 1, vl_upper_margin:1, vl_lower_margin:0, - mmio: AT91SAM9RL_LCDC_BASE, + mmio: ATMEL_BASE_LCDC, }; void lcd_enable(void) @@ -116,6 +121,8 @@ void lcd_disable(void) } static void at91sam9rlek_lcd_hw_init(void) { + struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; + at91_set_B_periph(AT91_PIN_PC1, 0); /* LCDPWR */ at91_set_A_periph(AT91_PIN_PC5, 0); /* LCDHSYNC */ at91_set_A_periph(AT91_PIN_PC6, 0); /* LCDDOTCK */ @@ -138,9 +145,7
[U-Boot] [PATCH 1/2] [V2] AT91: Makes AT91SAM9RL SoC build correctly against u-boot-atmel/master
Rework for AT91SAM9RL SoC, makes it build again. Based on the work for AT91SAM9260-EK. Signed-off-by: Hong Xu --- arch/arm/cpu/arm926ejs/at91/at91sam9rl_devices.c | 26 ++-- arch/arm/include/asm/arch-at91/at91_spi.h |2 +- arch/arm/include/asm/arch-at91/at91sam9rl.h| 176 ++-- arch/arm/include/asm/arch-at91/at91sam9rl_matrix.h | 121 +- 4 files changed, 141 insertions(+), 184 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/at91/at91sam9rl_devices.c b/arch/arm/cpu/arm926ejs/at91/at91sam9rl_devices.c index 4f570f4..c8d19f8 100644 --- a/arch/arm/cpu/arm926ejs/at91/at91sam9rl_devices.c +++ b/arch/arm/cpu/arm926ejs/at91/at91sam9rl_devices.c @@ -23,45 +23,45 @@ */ #include +#include #include #include #include -#include void at91_serial0_hw_init(void) { - at91_pmc_t *pmc= (at91_pmc_t *) AT91_PMC_BASE; + at91_pmc_t *pmc= (at91_pmc_t *) ATMEL_BASE_PMC; at91_set_a_periph(AT91_PIO_PORTA, 6, 1);/* TXD0 */ at91_set_a_periph(AT91_PIO_PORTA, 7, 0);/* RXD0 */ - writel(1 << AT91SAM9RL_ID_US0, &pmc->pcer); + writel(1 << ATMEL_ID_US0, &pmc->pcer); } void at91_serial1_hw_init(void) { - at91_pmc_t *pmc= (at91_pmc_t *) AT91_PMC_BASE; + at91_pmc_t *pmc= (at91_pmc_t *) ATMEL_BASE_PMC; at91_set_a_periph(AT91_PIO_PORTA, 11, 1); /* TXD1 */ at91_set_a_periph(AT91_PIO_PORTA, 12, 0); /* RXD1 */ - writel(1 << AT91SAM9RL_ID_US1, &pmc->pcer); + writel(1 << ATMEL_ID_US1, &pmc->pcer); } void at91_serial2_hw_init(void) { - at91_pmc_t *pmc= (at91_pmc_t *) AT91_PMC_BASE; + at91_pmc_t *pmc= (at91_pmc_t *) ATMEL_BASE_PMC; at91_set_a_periph(AT91_PIO_PORTA, 13, 1); /* TXD2 */ at91_set_a_periph(AT91_PIO_PORTA, 14, 0); /* RXD2 */ - writel(1 << AT91SAM9RL_ID_US2, &pmc->pcer); + writel(1 << ATMEL_ID_US2, &pmc->pcer); } -void at91_serial3_hw_init(void) +void at91_seriald_hw_init(void) { - at91_pmc_t *pmc= (at91_pmc_t *) AT91_PMC_BASE; + at91_pmc_t *pmc= (at91_pmc_t *) ATMEL_BASE_PMC; at91_set_a_periph(AT91_PIO_PORTA, 21, 0); /* DRXD */ at91_set_a_periph(AT91_PIO_PORTA, 22, 1); /* DTXD */ - writel(1 << AT91_ID_SYS, &pmc->pcer); + writel(1 << ATMEL_ID_SYS, &pmc->pcer); } void at91_serial_hw_init(void) @@ -79,21 +79,21 @@ void at91_serial_hw_init(void) #endif #ifdef CONFIG_USART3 /* DBGU */ - at91_serial3_hw_init(); + at91_seriald_hw_init(); #endif } #ifdef CONFIG_HAS_DATAFLASH void at91_spi0_hw_init(unsigned long cs_mask) { - at91_pmc_t *pmc= (at91_pmc_t *) AT91_PMC_BASE; + at91_pmc_t *pmc= (at91_pmc_t *) ATMEL_BASE_PMC; at91_set_a_periph(AT91_PIO_PORTA, 25, 0); /* SPI0_MISO */ at91_set_a_periph(AT91_PIO_PORTA, 26, 0); /* SPI0_MOSI */ at91_set_a_periph(AT91_PIO_PORTA, 27, 0); /* SPI0_SPCK */ /* Enable clock */ - writel(1 << AT91SAM9RL_ID_SPI, &pmc->pcer); + writel(1 << ATMEL_ID_SPI, &pmc->pcer); if (cs_mask & (1 << 0)) { at91_set_a_periph(AT91_PIO_PORTA, 28, 1); diff --git a/arch/arm/include/asm/arch-at91/at91_spi.h b/arch/arm/include/asm/arch-at91/at91_spi.h index c520e89..afe724d 100644 --- a/arch/arm/include/asm/arch-at91/at91_spi.h +++ b/arch/arm/include/asm/arch-at91/at91_spi.h @@ -33,7 +33,7 @@ typedef struct at91_spi { at91_pdc_t pdc; } at91_spi_t; -#ifdef CONFIG_AT91_LEGACY +#ifdef CONFIG_ATMEL_LEGACY #define AT91_SPI_CR0x00/* Control Register */ #defineAT91_SPI_SPIEN (1 << 0) /* SPI Enable */ diff --git a/arch/arm/include/asm/arch-at91/at91sam9rl.h b/arch/arm/include/asm/arch-at91/at91sam9rl.h index 8eb0d4f..7e3a029 100644 --- a/arch/arm/include/asm/arch-at91/at91sam9rl.h +++ b/arch/arm/include/asm/arch-at91/at91sam9rl.h @@ -14,117 +14,109 @@ #ifndef AT91SAM9RL_H #define AT91SAM9RL_H +#define CONFIG_ARM926EJS /* ARM926EJS Core */ +#define CONFIG_AT91FAMILY /* it's a member of AT91 */ /* * Peripheral identifiers/interrupts. */ -#define AT91_ID_FIQ0 /* Advanced Interrupt Controller (FIQ) */ -#define AT91_ID_SYS1 /* System Controller */ -#define AT91SAM9RL_ID_PIOA 2 /* Parallel IO Controller A */ -#define AT91SAM9RL_ID_PIOB 3 /* Parallel IO Controller B */ -#define AT91SAM9RL_ID_PIOC 4 /* Parallel IO Controller C */ -#define AT91SAM9RL_ID_PIOD 5 /* Parallel IO Controller D */ -#define AT91SAM9RL_ID_US0 6 /* USART 0 */ -#define AT91SAM9RL_ID_US1 7 /* USART 1 */ -#define AT91SAM9RL_ID_US2 8 /* USART 2 */ -#define AT91SAM9RL_
Re: [U-Boot] [PATCH] Makes AT91SAM9261-EK build correctly against the mainline HEAD
Dear Hong Xu, and please rebase against the u-boot-atmel/master, there are already a few patches on it that yours might be relying on. For the time being, we should at first fix the SoC files, and later when that all is on top of tree, fix the boards. Otherwise we'll get a lot of mess and non-applying patches. Reinhard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Makes AT91SAM9261-EK build correctly against the mainline HEAD
Dear Hong Xu, > Rework for AT91SAM9261-EK, makes it build again. > Based on the work for AT91SAM9260-EK. > > Signed-off-by: voice > Signed-off-by: Hong Xu > --- > Makefile | 23 > arch/arm/cpu/arm926ejs/at91/at91sam9261_devices.c | 45 +++ > arch/arm/include/asm/arch-at91/at91_spi.h |2 +- > arch/arm/include/asm/arch-at91/at91sam9261.h |2 +- > .../arm/include/asm/arch-at91/at91sam9261_matrix.h | 77 +-- > board/atmel/at91sam9261ek/at91sam9261ek.c | 136 > ++- > board/atmel/at91sam9261ek/config.mk|1 - > board/atmel/at91sam9261ek/led.c|7 +- > boards.cfg |6 + > include/configs/at91sam9261ek.h| 81 +++- > 10 files changed, 184 insertions(+), 196 deletions(-) > delete mode 100644 board/atmel/at91sam9261ek/config.mk Could you please make separate patches for the parts that fix the SoC itself, and for what fixes the board? I by now have several similar SoC fixes gotten as patches, I have to somehow make the best of them I might have to pick parts from each of them. Best Regards, Reinhard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Makes AT91SAM9261-EK build correctly against the mainline HEAD
Rework for AT91SAM9261-EK, makes it build again. Based on the work for AT91SAM9260-EK. Signed-off-by: voice Signed-off-by: Hong Xu --- Makefile | 23 arch/arm/cpu/arm926ejs/at91/at91sam9261_devices.c | 45 +++ arch/arm/include/asm/arch-at91/at91_spi.h |2 +- arch/arm/include/asm/arch-at91/at91sam9261.h |2 +- .../arm/include/asm/arch-at91/at91sam9261_matrix.h | 77 +-- board/atmel/at91sam9261ek/at91sam9261ek.c | 136 ++- board/atmel/at91sam9261ek/config.mk|1 - board/atmel/at91sam9261ek/led.c|7 +- boards.cfg |6 + include/configs/at91sam9261ek.h| 81 +++- 10 files changed, 184 insertions(+), 196 deletions(-) delete mode 100644 board/atmel/at91sam9261ek/config.mk diff --git a/Makefile b/Makefile index dcf5d93..fedddf4 100644 --- a/Makefile +++ b/Makefile @@ -803,29 +803,6 @@ at91sam9xeek_config: unconfig fi; @$(MKCONFIG) -n $@ -a at91sam9260ek arm arm926ejs at91sam9260ek atmel at91 -at91sam9261ek_nandflash_config \ -at91sam9261ek_dataflash_cs0_config \ -at91sam9261ek_dataflash_cs3_config \ -at91sam9261ek_config \ -at91sam9g10ek_nandflash_config \ -at91sam9g10ek_dataflash_cs0_config \ -at91sam9g10ek_dataflash_cs3_config \ -at91sam9g10ek_config : unconfig - @mkdir -p $(obj)include - @if [ "$(findstring 9g10,$@)" ] ; then \ - echo "#define CONFIG_AT91SAM9G10EK 1" >>$(obj)include/config.h ; \ - else \ - echo "#define CONFIG_AT91SAM9261EK 1" >>$(obj)include/config.h ; \ - fi; - @if [ "$(findstring _nandflash,$@)" ] ; then \ - echo "#define CONFIG_SYS_USE_NANDFLASH 1" >>$(obj)include/config.h ; \ - elif [ "$(findstring dataflash_cs0,$@)" ] ; then \ - echo "#define CONFIG_SYS_USE_DATAFLASH_CS3 1" >>$(obj)include/config.h ; \ - else \ - echo "#define CONFIG_SYS_USE_DATAFLASH_CS0 1" >>$(obj)include/config.h ; \ - fi; - @$(MKCONFIG) -n $@ -a at91sam9261ek arm arm926ejs at91sam9261ek atmel at91 - at91sam9263ek_norflash_config \ at91sam9263ek_norflash_boot_config \ at91sam9263ek_nandflash_config \ diff --git a/arch/arm/cpu/arm926ejs/at91/at91sam9261_devices.c b/arch/arm/cpu/arm926ejs/at91/at91sam9261_devices.c index b4353ef..3db2b20 100644 --- a/arch/arm/cpu/arm926ejs/at91/at91sam9261_devices.c +++ b/arch/arm/cpu/arm926ejs/at91/at91sam9261_devices.c @@ -26,74 +26,65 @@ #include #include #include -#include +#include void at91_serial0_hw_init(void) { - at91_pmc_t *pmc= (at91_pmc_t *) AT91_PMC_BASE; + at91_pmc_t *pmc= (at91_pmc_t *) ATMEL_BASE_PMC; at91_set_a_periph(AT91_PIO_PORTC, 8, 1);/* TXD0 */ at91_set_a_periph(AT91_PIO_PORTC, 9, 0);/* RXD0 */ - writel(1 << AT91SAM9261_ID_US0, &pmc->pcer); + writel(1 << ATMEL_ID_USART0, &pmc->pcer); } void at91_serial1_hw_init(void) { - at91_pmc_t *pmc= (at91_pmc_t *) AT91_PMC_BASE; + at91_pmc_t *pmc= (at91_pmc_t *) ATMEL_BASE_PMC; at91_set_a_periph(AT91_PIO_PORTC, 12, 1); /* TXD1 */ at91_set_a_periph(AT91_PIO_PORTC, 13, 0); /* RXD1 */ - writel(1 << AT91SAM9261_ID_US1, &pmc->pcer); + writel(1 << ATMEL_ID_USART1, &pmc->pcer); } void at91_serial2_hw_init(void) { - at91_pmc_t *pmc= (at91_pmc_t *) AT91_PMC_BASE; + at91_pmc_t *pmc= (at91_pmc_t *) ATMEL_BASE_PMC; at91_set_a_periph(AT91_PIO_PORTC, 14, 1); /* TXD2 */ at91_set_a_periph(AT91_PIO_PORTC, 15, 0); /* RXD2 */ - writel(1 << AT91SAM9261_ID_US2, &pmc->pcer); + writel(1 << ATMEL_ID_USART2, &pmc->pcer); } void at91_serial3_hw_init(void) { - at91_pmc_t *pmc= (at91_pmc_t *) AT91_PMC_BASE; + at91_pmc_t *pmc= (at91_pmc_t *) ATMEL_BASE_PMC; at91_set_a_periph(AT91_PIO_PORTA, 9, 0);/* DRXD */ at91_set_a_periph(AT91_PIO_PORTA, 10, 1); /* DTXD */ - writel(1 << AT91_ID_SYS, &pmc->pcer); + writel(1 << ATMEL_ID_SYS, &pmc->pcer); } -void at91_serial_hw_init(void) +void at91_seriald_hw_init(void) { -#ifdef CONFIG_USART0 - at91_serial0_hw_init(); -#endif + at91_pmc_t *pmc = (at91_pmc_t *)ATMEL_BASE_PMC; -#ifdef CONFIG_USART1 - at91_serial1_hw_init(); -#endif + at91_set_a_periph(AT91_PIO_PORTB, 14, 0); /* DRXD */ + at91_set_a_periph(AT91_PIO_PORTB, 15, 1); /* DTXD */ -#ifdef CONFIG_USART2 - at91_serial2_hw_init(); -#endif - -#ifdef CONFIG_USART3 /* DBGU */ - at91_serial3_hw_init(); -#endif + writel(1 << ATMEL_ID_SYS, &pmc->pcer); } #ifdef CONFIG_HAS_DATAFLASH void at91_spi0_hw_ini
Re: [U-Boot] [PATCH v2 4/5] arm/km: replace suenx targets with km_kirkwood
> -Original Message- > From: Prafulla Wadaskar > Sent: Saturday, June 11, 2011 9:53 AM > To: 'Holger Brunck'; u-boot@lists.denx.de > Cc: Valentin Longchamp; Heiko Schocher > Subject: RE: [PATCH v2 4/5] arm/km: replace suenx targets with > km_kirkwood > > > > > -Original Message- > > From: Holger Brunck [mailto:holger.bru...@keymile.com] > > Sent: Wednesday, June 08, 2011 5:13 PM > > To: u-boot@lists.denx.de > > Cc: Holger Brunck; Valentin Longchamp; Prafulla Wadaskar; Heiko > Schocher > > Subject: [PATCH v2 4/5] arm/km: replace suenx targets with km_kirkwood > > > > suen3 and suen8 were in first HW version quite different, but > > now they are from a u-boot point of view similar. So these > > two boards can use the same header file. Other keymile boards > > differ only in the usage of the PCI interface. Therefore > > a target km_kirkwood_pci was introduced. All targets use > > the same header file. > > > > Signed-off-by: Holger Brunck > > Signed-off-by: Valentin Longchamp > > cc: Prafulla Wadaskar > > cc: Heiko Schocher > > --- > > Changes for v2: > > - squashed together with 5/6 from previous serie, because > > the pci defines belongs logically to this patch > > - change typo in board maintainers name > > > > MAINTAINERS|6 ++- > > MAKEALL|2 +- > > boards.cfg |4 +- > > include/configs/km/km_arm.h|1 - > > include/configs/{suen3.h => km_kirkwood.h} | 18 +++--- > > include/configs/mgcoge3un.h|5 +++ > > include/configs/suen8.h| 50 --- > -- > > --- > > Applied to u-boot-marvell.git next branch > Regards.. > Prafulla . . Hi Holger, Valentin During this pull check I observed that u-boot.kwb image generation gives build errors for all Kirkwood based keymile boards. Please kindly check on this and provide a fix. Regards.. Prafulla . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/5] arm/km: replace suenx targets with km_kirkwood
> -Original Message- > From: Holger Brunck [mailto:holger.bru...@keymile.com] > Sent: Wednesday, June 08, 2011 5:13 PM > To: u-boot@lists.denx.de > Cc: Holger Brunck; Valentin Longchamp; Prafulla Wadaskar; Heiko Schocher > Subject: [PATCH v2 4/5] arm/km: replace suenx targets with km_kirkwood > > suen3 and suen8 were in first HW version quite different, but > now they are from a u-boot point of view similar. So these > two boards can use the same header file. Other keymile boards > differ only in the usage of the PCI interface. Therefore > a target km_kirkwood_pci was introduced. All targets use > the same header file. > > Signed-off-by: Holger Brunck > Signed-off-by: Valentin Longchamp > cc: Prafulla Wadaskar > cc: Heiko Schocher > --- > Changes for v2: > - squashed together with 5/6 from previous serie, because > the pci defines belongs logically to this patch > - change typo in board maintainers name > > MAINTAINERS|6 ++- > MAKEALL|2 +- > boards.cfg |4 +- > include/configs/km/km_arm.h|1 - > include/configs/{suen3.h => km_kirkwood.h} | 18 +++--- > include/configs/mgcoge3un.h|5 +++ > include/configs/suen8.h| 50 - > --- Applied to u-boot-marvell.git next branch Regards.. Prafulla . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 5/5] arm/km: add support for portl2 board
> -Original Message- > From: Holger Brunck [mailto:holger.bru...@keymile.com] > Sent: Wednesday, June 08, 2011 5:13 PM > To: u-boot@lists.denx.de > Cc: Valentin Longchamp; Holger Brunck; Prafulla Wadaskar; Heiko Schocher > Subject: [PATCH v2 5/5] arm/km: add support for portl2 board > > From: Valentin Longchamp > > This adds support for the keymile Kirkwood BEC portl2 board. This board > relies on the km_arm (km_kirkwood) BEC. > > The egiga driver is configured for a 100M full-duplex, A/N off > connnection > to the backplane. This board has always ethernet present, because it is > connected to the marvell switch similar to mgcoge3un. The reset_phy > functionality is also the same to mgcoge3un. > > Signed-off-by: Valentin Longchamp > Signed-off-by: Holger Brunck > cc: Prafulla Wadaskar > cc: Heiko Schocher > --- > Changes for v2: >- add this board support patch to the end of the serie > > MAINTAINERS |1 + > MAKEALL |1 + > board/keymile/km_arm/km_arm.c |8 +++-- > boards.cfg|1 + > include/configs/portl2.h | 81 > + > 5 files changed, 89 insertions(+), 3 deletions(-) > create mode 100644 include/configs/portl2.h > Applied to u-boot-marvell.git next branch Regards.. Prafulla . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/5] arm/km: use board KM_ENV_BUS for CONFIG_I2C_ENV_EEPROM_BUS
> -Original Message- > From: Holger Brunck [mailto:holger.bru...@keymile.com] > Sent: Wednesday, June 08, 2011 5:13 PM > To: u-boot@lists.denx.de > Cc: Valentin Longchamp; Holger Brunck; Prafulla Wadaskar; Heiko Schocher > Subject: [PATCH v2 2/5] arm/km: use board KM_ENV_BUS for > CONFIG_I2C_ENV_EEPROM_BUS > > From: Valentin Longchamp > > This is defined for all km_kirkwood boards and was not used up to now. > This value was the same for all boards but it could be changed for some > boards (and thus needs to be defined for every board). > > Signed-off-by: Valentin Longchamp > Signed-off-by: Holger Brunck > cc: Prafulla Wadaskar > cc: Heiko Schocher > --- > Changes for v2: > - the content is the same but patch is now 2/5 instead 5/6 > > include/configs/km/km_arm.h |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > Applied to u-boot-marvell.git next branch Regards.. Prafulla . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/5] arm/km: ethernet support for mgcoge3un
> -Original Message- > From: Holger Brunck [mailto:holger.bru...@keymile.com] > Sent: Wednesday, June 08, 2011 5:13 PM > To: u-boot@lists.denx.de > Cc: Valentin Longchamp; Holger Brunck; Prafulla Wadaskar; Heiko Schocher > Subject: [PATCH v2 3/5] arm/km: ethernet support for mgcoge3un > > From: Valentin Longchamp > > The phy is also configured with "RGMII clock transitions when data > stable" and "Class A driver for the direct backplane connection". > > Signed-off-by: Valentin Longchamp > Signed-off-by: Holger Brunck > cc: Prafulla Wadaskar > cc: Heiko Schocher > --- > Changes for v2: > - first version has also defines for portl2, they were removed > because > the board support for portl2 has moved to the end of the serie > > board/keymile/km_arm/km_arm.c | 39 > ++- > 1 files changed, 38 insertions(+), 1 deletions(-) > Applied to u-boot-marvell.git next branch Regards.. Prafulla . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/5] arm/km: remove unneeded define
> -Original Message- > From: Holger Brunck [mailto:holger.bru...@keymile.com] > Sent: Wednesday, June 08, 2011 5:13 PM > To: u-boot@lists.denx.de > Cc: Holger Brunck; Valentin Longchamp; Prafulla Wadaskar; Heiko Schocher > Subject: [PATCH v2 1/5] arm/km: remove unneeded define > > CONFIG_ENV_SIZE for NAND was later in this file overwritten > because we have the environment in i2c eeprom, so remove > this define. > > Signed-off-by: Holger Brunck > Signed-off-by: Valentin Longchamp > cc: Prafulla Wadaskar > cc: Heiko Schocher > --- > Changes for v2: > - nothing > > include/configs/km/km_arm.h |2 -- > 1 files changed, 0 insertions(+), 2 deletions(-) > > diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h > index 20ee6ea..5b0f1d8 100644 > --- a/include/configs/km/km_arm.h > +++ b/include/configs/km/km_arm.h > @@ -50,7 +50,6 @@ > #include "keymile-common.h" > > #define CONFIG_SYS_TEXT_BASE 0x0400 /* code address after reloc > */ > -#define CONFIG_ENV_SIZE (128 << 10) /* NAND chip block size > */ > #define CONFIG_SYS_MEMTEST_START 0x0040 /* 4M */ > #define CONFIG_SYS_MEMTEST_END 0x007f /*(_8M -1) */ > #define CONFIG_SYS_LOAD_ADDR 0x0080 /* default load adr- 8M */ > @@ -215,7 +214,6 @@ int get_scl(void); > #define CONFIG_ENV_EEPROM_IS_ON_I2C > #define CONFIG_SYS_EEPROM_WREN > #define CONFIG_ENV_OFFSET0x0 /* no bracets! */ > -#undef CONFIG_ENV_SIZE > #define CONFIG_ENV_SIZE (0x2000 - CONFIG_ENV_OFFSET) > #define CONFIG_I2C_ENV_EEPROM_BUS"pca9547:70:d\0" > > -- Applied to u-boot-marvell.git next branch Regards.. Prafulla . . > 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Makes AT91SAM9263-EK build correctly against the mainline HEAD
Rework for AT91SAM9263-EK, makes it build again. Based on the work for AT91SAM9260-EK. Signed-off-by: Hong Xu --- Makefile | 19 --- arch/arm/cpu/arm926ejs/at91/lowlevel_init.S| 26 ++-- arch/arm/cpu/arm926ejs/at91/timer.c| 13 ++ arch/arm/include/asm/arch-at91/at91_matrix.h | 10 +- arch/arm/include/asm/arch-at91/at91_pio.h | 14 +- arch/arm/include/asm/arch-at91/at91_pmc.h | 10 +- arch/arm/include/asm/arch-at91/at91_rstc.h |2 +- arch/arm/include/asm/arch-at91/at91_spi.h |2 +- arch/arm/include/asm/arch-at91/at91_wdt.h |2 +- arch/arm/include/asm/arch-at91/at91sam9263.h |5 + .../arm/include/asm/arch-at91/at91sam9263_matrix.h | 146 ++-- arch/arm/include/asm/arch-at91/at91sam9_sdramc.h |2 +- arch/arm/include/asm/arch-at91/at91sam9_smc.h |2 +- board/atmel/at91sam9263ek/at91sam9263ek.c | 51 +--- board/atmel/at91sam9263ek/config.mk|1 - board/atmel/at91sam9263ek/led.c| 23 ++-- boards.cfg |5 + include/configs/at91sam9263ek.h| 83 +++- 18 files changed, 190 insertions(+), 226 deletions(-) delete mode 100644 board/atmel/at91sam9263ek/config.mk diff --git a/Makefile b/Makefile index dcf5d93..80867d2 100644 --- a/Makefile +++ b/Makefile @@ -826,25 +826,6 @@ at91sam9g10ek_config : unconfig fi; @$(MKCONFIG) -n $@ -a at91sam9261ek arm arm926ejs at91sam9261ek atmel at91 -at91sam9263ek_norflash_config \ -at91sam9263ek_norflash_boot_config \ -at91sam9263ek_nandflash_config \ -at91sam9263ek_dataflash_config \ -at91sam9263ek_dataflash_cs0_config \ -at91sam9263ek_config : unconfig - @mkdir -p $(obj)include - @if [ "$(findstring _nandflash,$@)" ] ; then \ - echo "#define CONFIG_SYS_USE_NANDFLASH 1" >>$(obj)include/config.h ; \ - elif [ "$(findstring norflash,$@)" ] ; then \ - echo "#define CONFIG_SYS_USE_NORFLASH 1" >>$(obj)include/config.h ; \ - else \ - echo "#define CONFIG_SYS_USE_DATAFLASH 1" >>$(obj)include/config.h ; \ - fi; - @if [ "$(findstring norflash_boot,$@)" ] ; then \ - echo "#define CONFIG_SYS_USE_BOOT_NORFLASH 1" >>$(obj)include/config.h ; \ - fi; - @$(MKCONFIG) -n $@ -a at91sam9263ek arm arm926ejs at91sam9263ek atmel at91 - at91sam9rlek_nandflash_config \ at91sam9rlek_dataflash_config \ at91sam9rlek_dataflash_cs0_config \ diff --git a/arch/arm/cpu/arm926ejs/at91/lowlevel_init.S b/arch/arm/cpu/arm926ejs/at91/lowlevel_init.S index 7f7ca5e..56b5c6e 100644 --- a/arch/arm/cpu/arm926ejs/at91/lowlevel_init.S +++ b/arch/arm/cpu/arm926ejs/at91/lowlevel_init.S @@ -27,7 +27,7 @@ */ #include -#include +#include #include #include #include @@ -230,37 +230,37 @@ SMRDATA1: .word CONFIG_SYS_SDRC_MDR_VAL .word AT91_ASM_SDRAMC_MR .word CONFIG_SYS_SDRC_MR_VAL2 - .word AT91_SDRAM_BASE + .word ATMEL_BASE_CS1 .word CONFIG_SYS_SDRAM_VAL1 .word AT91_ASM_SDRAMC_MR .word CONFIG_SYS_SDRC_MR_VAL3 - .word AT91_SDRAM_BASE + .word ATMEL_BASE_CS1 .word CONFIG_SYS_SDRAM_VAL2 - .word AT91_SDRAM_BASE + .word ATMEL_BASE_CS1 .word CONFIG_SYS_SDRAM_VAL3 - .word AT91_SDRAM_BASE + .word ATMEL_BASE_CS1 .word CONFIG_SYS_SDRAM_VAL4 - .word AT91_SDRAM_BASE + .word ATMEL_BASE_CS1 .word CONFIG_SYS_SDRAM_VAL5 - .word AT91_SDRAM_BASE + .word ATMEL_BASE_CS1 .word CONFIG_SYS_SDRAM_VAL6 - .word AT91_SDRAM_BASE + .word ATMEL_BASE_CS1 .word CONFIG_SYS_SDRAM_VAL7 - .word AT91_SDRAM_BASE + .word ATMEL_BASE_CS1 .word CONFIG_SYS_SDRAM_VAL8 - .word AT91_SDRAM_BASE + .word ATMEL_BASE_CS1 .word CONFIG_SYS_SDRAM_VAL9 .word AT91_ASM_SDRAMC_MR .word CONFIG_SYS_SDRC_MR_VAL4 - .word AT91_SDRAM_BASE + .word ATMEL_BASE_CS1 .word CONFIG_SYS_SDRAM_VAL10 .word AT91_ASM_SDRAMC_MR .word CONFIG_SYS_SDRC_MR_VAL5 - .word AT91_SDRAM_BASE + .word ATMEL_BASE_CS1 .word CONFIG_SYS_SDRAM_VAL11 .word AT91_ASM_SDRAMC_TR .word CONFIG_SYS_SDRC_TR_VAL2 - .word AT91_SDRAM_BASE + .word ATMEL_BASE_CS1 .word CONFIG_SYS_SDRAM_VAL12 /* User reset enable*/ .word AT91_ASM_RSTC_MR diff --git a/arch/arm/cpu/arm926ejs/at91/timer.c b/arch/arm/cpu/arm926ejs/at91/timer.c index a087687..89a01ea 100644 --- a/arch/arm/cpu/arm926ejs/at91/timer.c +++ b/arch/arm/cpu/arm926ejs/at91/timer.c @@ -134,3 +134,16 @@ ulong get_tbclk(void) { return gd->timer_rate_hz; } + +/* + * Reset the timer. + */ +void reset_timer(void) +{ + /* TODO: write this code. */ +} + +
[U-Boot] About the CRC of u-boot.bin
I found out that even with the same source code, the final u-boot.bin has a different MD5sum each time I build. Is that possible to get an identical u-boot.bin for the same source code, no matter when I build? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v7 RESEND 1/5] Add support for SMSC95XX USB 2.0 10/100MBit Ethernet Adapter
On 11/06/2011 00:26, Simon Glass wrote: > OK thanks have added Gilles' patch and will resend the series on > Monday with any comments received. If this can get applied then > perhaps we can more easily handle other patches that come up. This > driver is by no means perfect but it is a start. > a very good start as it simply works ;-) Thanks ! Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v7 RESEND 0/5] Add SMSC95XX support including MAC address control
Hi Simon, On 10/06/2011 17:04, Simon Glass wrote: > Simon Glass (5): >Add support for SMSC95XX USB 2.0 10/100MBit Ethernet Adapter >Add Ethernet hardware MAC address framework to usbnet >Add documentation for USB Host Networking >Put common autoload code into auto_load() function for the 4 first patches, with the 2 comments I sent concerning patches 1 and 4 : Tested-by: Eric Bénard Thanks, Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v7 RESEND 4/5] Put common autoload code into auto_load() function
On Fri, Jun 10, 2011 at 2:53 PM, Eric Bénard wrote: > Hi Simon, > > On 10/06/2011 17:04, Simon Glass wrote: >> >> This is a small clean-up patch. >> >> Signed-off-by: Simon Glass >> --- >> net/bootp.c | 75 >> +- >> 1 files changed, 32 insertions(+), 43 deletions(-) >> >> diff --git a/net/bootp.c b/net/bootp.c >> index 4db63cb..4774624 100644 >> --- a/net/bootp.c >> +++ b/net/bootp.c >> @@ -138,6 +138,35 @@ static int truncate_sz (const char *name, int maxlen, >> int curlen) >> return (curlen); >> } >> >> +/* >> + * Check if autoload is enabled. If so, use either NFS or TFTP to >> download >> + * the boot file. >> + */ >> +static void auto_load(void) >> +{ >> + const char *s = getenv("autoload"); >> + >> + if (s != NULL) { >> + if (*s == 'n') { >> + /* >> + * Just use BOOTP to configure system; >> + * Do not use TFTP to load the bootfile. >> + */ >> + NetState = NETLOOP_SUCCESS; >> + return; >> + } >> +#if defined(CONFIG_CMD_NFS) >> + if (strcmp(s, "NFS") == 0) { >> + /* >> + * Use NFS to load the bootfile. >> + */ >> + NfsStart(); >> + return; >> + } >> +#endif >> + TftpStart(); >> +} > > a "}" is missing here > > Eric > Thanks Eric, done. -Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v7 RESEND 4/5] Put common autoload code into auto_load() function
Hi Simon, On 10/06/2011 17:04, Simon Glass wrote: > This is a small clean-up patch. > > Signed-off-by: Simon Glass > --- > net/bootp.c | 75 > +- > 1 files changed, 32 insertions(+), 43 deletions(-) > > diff --git a/net/bootp.c b/net/bootp.c > index 4db63cb..4774624 100644 > --- a/net/bootp.c > +++ b/net/bootp.c > @@ -138,6 +138,35 @@ static int truncate_sz (const char *name, int maxlen, > int curlen) > return (curlen); > } > > +/* > + * Check if autoload is enabled. If so, use either NFS or TFTP to download > + * the boot file. > + */ > +static void auto_load(void) > +{ > + const char *s = getenv("autoload"); > + > + if (s != NULL) { > + if (*s == 'n') { > + /* > + * Just use BOOTP to configure system; > + * Do not use TFTP to load the bootfile. > + */ > + NetState = NETLOOP_SUCCESS; > + return; > + } > +#if defined(CONFIG_CMD_NFS) > + if (strcmp(s, "NFS") == 0) { > + /* > + * Use NFS to load the bootfile. > + */ > + NfsStart(); > + return; > + } > +#endif > + TftpStart(); > +} a "}" is missing here Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v7 RESEND 1/5] Add support for SMSC95XX USB 2.0 10/100MBit Ethernet Adapter
On Fri, Jun 10, 2011 at 3:09 PM, Eric Bénard wrote: > Hi Simon, > > On 10/06/2011 17:04, Simon Glass wrote: >> >> +int smsc95xx_eth_get_info(struct usb_device *dev, struct ueth_data *ss, >> + struct eth_device *eth) >> +{ >> + debug("** %s()\n", __func__); >> + if (!eth) { >> + debug("%s: missing parameter.\n", __func__); >> + return 0; >> + } >> + sprintf(eth->name, "%s%d", SMSC95XX_BASE_NAME, curr_eth_dev++); >> + eth->init = smsc95xx_init; >> + eth->send = smsc95xx_send; >> + eth->recv = smsc95xx_recv; >> + eth->halt = smsc95xx_halt; > > as Gilles in "Re: [U-Boot] TFTP support for Pandaboard (OMAP4430 Cortex-A9 > Dual core)", you need > > + eth->write_hwaddr = smsc95xx_write_hwaddr; > > here else setting MAC address using setenv usbethaddr doesn't work Hi Eric, OK thanks have added Gilles' patch and will resend the series on Monday with any comments received. If this can get applied then perhaps we can more easily handle other patches that come up. This driver is by no means perfect but it is a start. Regards, Simon > > Eric > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Booting to an alternate bank on an ADS512101?
Hi, I just got an ADS512101, so I have a few beginner questions on it. Is it possible to boot to an "alternate" flash bank on this board, like the "pixis_reset altbank" command does? I know that jumper P4 is supposed to do a flash recovery, but that doesn't seem to work for me (I'll email the manufacturer about that later). And even if it did, that's not exactly what I want, since it requires me to physically move the jumpers. Instead, I'd like to be able to write a new u-boot.bin into some address in NOR flash, and then reset the board and boot that U-Boot instead. If for some reason this U-boot fails, then a hard reset will bring me back to the original U-Boot. -- Timur Tabi Linux kernel developer at Freescale ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v7 RESEND 5/5] usbeth: asix: Do a fast init if link already established
On Fri, Jun 10, 2011 at 1:09 PM, Mike Frysinger wrote: > On Friday, June 10, 2011 11:04:11 Simon Glass wrote: >> The Asix driver takes the link down during init() and then brings it back >> up. This commit changes this so that if a link has already been >> established successfully we simply check that the link is still good. >> >> This reduces the delay between successive network commands. > > i'm not sure about this. i think this is a general issue to all net devices > and should be resolved there rather than making diff net drivers behave > differently based on how the maintainer felt like going. > > i also vaguely recall there being discussions on this topic recently. > -mike > Hi Mike, OK perhaps my understanding is incorrect. I saw discussion about the SMSC driver and whether half should do something there. I changed it to stop packet reception. In my view it is correct for it to stop packet reception but keep the link up. Bringing the link down and up takes a few seconds, which adds delay between bootp and tftp. We don't want that. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] beagleboard: enable HUB power on XM boards
LEDA needs to be at level 0 to enable HUB_3V3 Signed-off-by: Eric Bénard --- board/ti/beagle/beagle.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index ab50514..7509916 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -299,7 +299,10 @@ int misc_init_r(void) setenv(expansion_config.env_var, expansion_config.env_setting); twl4030_power_init(); - twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); + if (get_board_revision() < REVISION_C4) + twl4030_led_init(TWL4030_LED_LEDEN_LEDBON); /* Enable HUB PWR */ + else + twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); /* Configure GPIOs to output */ writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe); -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] dm3730: enable dpll5
which is used to provide 120MHz to USB EHCI This allows EHCI to work on BeagleBoard XM Signed-off-by: Eric Bénard --- arch/arm/cpu/armv7/omap3/clock.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/armv7/omap3/clock.c b/arch/arm/cpu/armv7/omap3/clock.c index 3d38d08..6a9edcf 100644 --- a/arch/arm/cpu/armv7/omap3/clock.c +++ b/arch/arm/cpu/armv7/omap3/clock.c @@ -579,6 +579,7 @@ void prcm_init(void) dpll3_init_36xx(0, clk_index); dpll4_init_36xx(0, clk_index); + dpll5_init_34xx(0, clk_index); iva_init_36xx(0, clk_index); mpu_init_36xx(0, clk_index); -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v7 RESEND 1/5] Add support for SMSC95XX USB 2.0 10/100MBit Ethernet Adapter
Hi Simon, On 10/06/2011 17:04, Simon Glass wrote: > +int smsc95xx_eth_get_info(struct usb_device *dev, struct ueth_data *ss, > + struct eth_device *eth) > +{ > + debug("** %s()\n", __func__); > + if (!eth) { > + debug("%s: missing parameter.\n", __func__); > + return 0; > + } > + sprintf(eth->name, "%s%d", SMSC95XX_BASE_NAME, curr_eth_dev++); > + eth->init = smsc95xx_init; > + eth->send = smsc95xx_send; > + eth->recv = smsc95xx_recv; > + eth->halt = smsc95xx_halt; as Gilles in "Re: [U-Boot] TFTP support for Pandaboard (OMAP4430 Cortex-A9 Dual core)", you need + eth->write_hwaddr = smsc95xx_write_hwaddr; here else setting MAC address using setenv usbethaddr doesn't work Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 1/3] lib: add uuid_str_to_bin for use with bootp and PXE uuid
Signed-off-by: Jason Hobbs --- Changes for v2: - Move uuid_str_to_bin's prototype from uuid. to common.h - Place uuid.o make rule in sorted order and conditionalize --- include/common.h |3 +++ lib/Makefile |1 + lib/uuid.c | 50 ++ 3 files changed, 54 insertions(+), 0 deletions(-) create mode 100644 lib/uuid.c diff --git a/include/common.h b/include/common.h index 1e4a6a5..5e1f444 100644 --- a/include/common.h +++ b/include/common.h @@ -648,6 +648,9 @@ int strcmp_compar(const void *, const void *); /* lib/time.c */ void udelay(unsigned long); +/* lib/uuid.c */ +void uuid_str_to_bin(const char *uuid, unsigned char *out); + /* lib/vsprintf.c */ ulong simple_strtoul(const char *cp,char **endp,unsigned int base); int strict_strtoul(const char *cp, unsigned int base, unsigned long *res); diff --git a/lib/Makefile b/lib/Makefile index afa6914..a8e0920 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -51,6 +51,7 @@ COBJS-$(CONFIG_SHA256) += sha256.o COBJS-y += string.o COBJS-y+= strmhz.o COBJS-y += time.o +COBJS-$(CONFIG_BOOTP_PXE) += uuid.o COBJS-y += vsprintf.o COBJS-$(CONFIG_RBTREE) += rbtree.o diff --git a/lib/uuid.c b/lib/uuid.c new file mode 100644 index 000..edc0c9f --- /dev/null +++ b/lib/uuid.c @@ -0,0 +1,50 @@ +/* + * Copyright 2011 Calxeda, Inc. + * + * 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., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include "common.h" + +/* + * 0914 19 24 + * ---- + *le le le be be + */ +void uuid_str_to_bin(const char *uuid, unsigned char *out) +{ + uint16_t tmp16; + uint32_t tmp32; + uint64_t tmp64; + + tmp32 = cpu_to_le32(simple_strtoul(uuid, NULL, 16)); + memcpy(out, &tmp32, 4); + + tmp16 = cpu_to_le16(simple_strtoul(uuid + 9, NULL, 16)); + memcpy(out + 4, &tmp16, 2); + + tmp16 = cpu_to_le16(simple_strtoul(uuid + 14, NULL, 16)); + memcpy(out + 6, &tmp16, 2); + + tmp16 = cpu_to_be16(simple_strtoul(uuid + 19, NULL, 16)); + memcpy(out + 8, &tmp16, 2); + + tmp64 = cpu_to_be64(simple_strtoull(uuid + 24, NULL, 16)); + memcpy(out + 10, (char *)&tmp64 + 2, 6); +} -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 3/3] arm: ca9x4_ct_vxp: enable CONFIG_BOOTP_PXE
Signed-off-by: Jason Hobbs --- Changes for v2: - Add armv7 architecture to VCI string --- include/configs/ca9x4_ct_vxp.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/include/configs/ca9x4_ct_vxp.h b/include/configs/ca9x4_ct_vxp.h index 7f83249..fdf9a2a 100644 --- a/include/configs/ca9x4_ct_vxp.h +++ b/include/configs/ca9x4_ct_vxp.h @@ -100,6 +100,11 @@ #define CONFIG_BOOTP_GATEWAY #define CONFIG_BOOTP_HOSTNAME +/* PXE support */ +#define CONFIG_BOOTP_PXE +#define CONFIG_BOOTP_PXE_CLIENTARCH0x100 +#define CONFIG_BOOTP_VCI_STRING"U-boot.armv7.ca9x4_ct_vxp" + /* Miscellaneous configurable options */ #undef CONFIG_SYS_CLKS_IN_HZ #define CONFIG_SYS_LOAD_ADDR 0x60008000 /* load address */ -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/3] net: bootp: add PXE/RFC 4578 DHCP options support
These options are required to be present in RFC 4578 compliant DHCP requests. They give more information to DHCP servers to allow serving different DHCP responses to different systems based on client architecture, client capabilities, UUID, or vendor. Signed-off-by: Jason Hobbs --- Changes for v2: - Use common.h to get uuid_str_to_bin prototype --- net/bootp.c | 36 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/net/bootp.c b/net/bootp.c index 4db63cb..06ff598 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -360,6 +360,11 @@ static int DhcpExtended (u8 * e, int message_type, IPaddr_t ServerID, IPaddr_t R { u8 *start = e; u8 *cnt; +#if defined(CONFIG_BOOTP_PXE) + char *uuid; + size_t vci_strlen; + u16 clientarch; +#endif #if defined(CONFIG_BOOTP_VENDOREX) u8 *x; @@ -414,6 +419,37 @@ static int DhcpExtended (u8 * e, int message_type, IPaddr_t ServerID, IPaddr_t R } #endif +#if defined(CONFIG_BOOTP_PXE) + clientarch = CONFIG_BOOTP_PXE_CLIENTARCH; + *e++ = 93; /* Client System Architecture */ + *e++ = 2; + *e++ = (clientarch >> 8) & 0xff; + *e++ = clientarch & 0xff; + + *e++ = 94; /* Client Network Interface Identifier */ + *e++ = 3; + *e++ = 1; /* type field for UNDI */ + *e++ = 0; /* major revision */ + *e++ = 0; /* minor revision */ + + uuid = getenv("pxeuuid"); + + if (uuid) { + *e++ = 97; /* Client Machine Identifier */ + *e++ = 17; + *e++ = 0; /* type 0 - UUID */ + + uuid_str_to_bin(uuid, e); + e += 16; + } + + *e++ = 60; /* Vendor Class Identifier */ + vci_strlen = strlen(CONFIG_BOOTP_VCI_STRING); + *e++ = vci_strlen; + memcpy(e, CONFIG_BOOTP_VCI_STRING, vci_strlen); + e += vci_strlen; +#endif + #if defined(CONFIG_BOOTP_VENDOREX) if ((x = dhcp_vendorex_prep (e))) return x - start; -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v7 RESEND 5/5] usbeth: asix: Do a fast init if link already established
On Friday, June 10, 2011 11:04:11 Simon Glass wrote: > The Asix driver takes the link down during init() and then brings it back > up. This commit changes this so that if a link has already been > established successfully we simply check that the link is still good. > > This reduces the delay between successive network commands. i'm not sure about this. i think this is a general issue to all net devices and should be resolved there rather than making diff net drivers behave differently based on how the maintainer felt like going. i also vaguely recall there being discussions on this topic recently. -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] scb9328: Add ARM relocation support
Hello, Stefano Babic wrote: > On 06/10/2011 07:44 AM, Torsten Koschorrek wrote: > Hi Torsten, > > send your answer to the ML, too. Someone else can help you ;-) > Oh, yes, right. This little 'Reply All' Button, sorry :-) >>> size1 = get_ram_size((volatile void *)SCB9328_SDRAM_1, >>> SCB9328_SDRAM_1_SIZE); >>> #if ( CONFIG_NR_DRAM_BANKS> 1 ) >>> size2 = get_ram_size((volatile void *)SCB9328_SDRAM_2, >>> SCB9328_SDRAM_2_SIZE); >>> . >>> >>> and then: >>> gd->ram_size = size1 + size2 + size3 + size4; >>> >> >> Yes, I thought about it. The thing is, we only have one bank on the >> system. So, dram_init_banksize() needs a cleanup, but that's a problem >> for another cleanup-patch, which will be committed in a next step. >> >> (If it's needed I could do a minor cleanup first...) > > You decide. However, the code in the patch is wrong. If you have only > one bank, you could directly simplify your code, I think. > Good point. >> >> Unfortunately I have to work on another project today and next week and >> I think I'm not able to solve the hanging problem. > > Understood, I tried only to give you some hints where to check ;-) > ... and I appreciate that very much :-) Above all, your answers showed me, that I was looking in the right direction so far. >> Minor fixes (such as >> config.mk) for the above patch should be possible, though. > > Ok, agree. Fix first the problem to make MAKEALL happy and build the > board again. > OK, I just tested it again, MAKEALL is happy. 'include/configs/scb9328.h' is the only file that has to be patched with the patch already send to the ml. 'board/scb9328/config.mk' and 'board/scb9328/scb9328.c' definately need a cleanup, but compilation is ok. The cleanup of those two files 'll be done next week. And hopefully I find some time next week to work on the hangup problem, too. > Best regards, > Stefano Babic > Thanks Torsten ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v7 RESEND 1/5] Add support for SMSC95XX USB 2.0 10/100MBit Ethernet Adapter
The SMSC95XX is a USB hub with a built-in Ethernet adapter. This adds support for this, using the USB host network framework. Changes for v2: - Coding style cleanup - Changed some comments as suggested Changes for v3: - Change turbo_mode to #define Changes for v4: - Dropped Tegra2 specific bit - Fixed a few broken bits in SMSC from my testing Changes for v5: - Code style clean-ups in SMSC - Cleaned up debugging of errors in SMSC driver Changes for v6: - Set NET_IP_ALIGN to 0 always Signed-off-by: Simon Glass --- drivers/usb/eth/Makefile|1 + drivers/usb/eth/smsc95xx.c | 878 +++ drivers/usb/eth/usb_ether.c |7 + include/usb_ether.h | 13 + 4 files changed, 899 insertions(+), 0 deletions(-) create mode 100644 drivers/usb/eth/smsc95xx.c diff --git a/drivers/usb/eth/Makefile b/drivers/usb/eth/Makefile index 6a5f25a..e28793d 100644 --- a/drivers/usb/eth/Makefile +++ b/drivers/usb/eth/Makefile @@ -28,6 +28,7 @@ COBJS-$(CONFIG_USB_HOST_ETHER) += usb_ether.o ifdef CONFIG_USB_ETHER_ASIX COBJS-y += asix.o endif +COBJS-$(CONFIG_USB_ETHER_SMSC95XX) += smsc95xx.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c new file mode 100644 index 000..4d8dde0 --- /dev/null +++ b/drivers/usb/eth/smsc95xx.c @@ -0,0 +1,878 @@ +/* + * Copyright (c) 2011 The Chromium OS Authors. + * Copyright (C) 2009 NVIDIA, Corporation + * 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., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include +#include +#include +#include "usb_ether.h" + +/* SMSC LAN95xx based USB 2.0 Ethernet Devices */ + +/* Tx command words */ +#define TX_CMD_A_FIRST_SEG_0x2000 +#define TX_CMD_A_LAST_SEG_ 0x1000 + +/* Rx status word */ +#define RX_STS_FL_ 0x3FFF /* Frame Length */ +#define RX_STS_ES_ 0x8000 /* Error Summary */ + +/* SCSRs */ +#define ID_REV 0x00 + +#define INT_STS0x08 + +#define TX_CFG 0x10 +#define TX_CFG_ON_ 0x0004 + +#define HW_CFG 0x14 +#define HW_CFG_BIR_0x1000 +#define HW_CFG_RXDOFF_ 0x0600 +#define HW_CFG_MEF_0x0020 +#define HW_CFG_BCE_0x0002 +#define HW_CFG_LRST_ 0x0008 + +#define PM_CTRL0x20 +#define PM_CTL_PHY_RST_0x0010 + +#define AFC_CFG0x2C + +/* + * Hi watermark = 15.5Kb (~10 mtu pkts) + * low watermark = 3k (~2 mtu pkts) + * backpressure duration = ~ 350us + * Apply FC on any frame. + */ +#define AFC_CFG_DEFAULT0x00F830A1 + +#define E2P_CMD0x30 +#define E2P_CMD_BUSY_ 0x8000 +#define E2P_CMD_READ_ 0x +#define E2P_CMD_TIMEOUT_ 0x0400 +#define E2P_CMD_LOADED_0x0200 +#define E2P_CMD_ADDR_ 0x01FF + +#define E2P_DATA 0x34 + +#define BURST_CAP 0x38 + +#define INT_EP_CTL 0x68 +#define INT_EP_CTL_PHY_INT_0x8000 + +#define BULK_IN_DLY0x6C + +/* MAC CSRs */ +#define MAC_CR 0x100 +#define MAC_CR_MCPAS_ 0x0008 +#define MAC_CR_PRMS_ 0x0004 +#define MAC_CR_HPFILT_ 0x2000 +#define MAC_CR_TXEN_ 0x0008 +#define MAC_CR_RXEN_ 0x0004 + +#define ADDRH 0x104 + +#define ADDRL 0x108 + +#define MII_ADDR 0x114 +#define MII_WRITE_ 0x02 +#define MII_BUSY_ 0x01 +#define MII_READ_ 0x00 /* ~of MII Write bit */ + +#define MII_DATA 0x118 + +#define FLOW 0x11C + +#define VLAN1 0x120 + +#define COE_CR 0x130 +#define Tx_COE_EN_
[U-Boot] [PATCH v7 RESEND 3/5] Add documentation for USB Host Networking
This describes what it is for, devices supported, how to enable for your board in U-Boot, setting up the server, and notes about MAC addresses. Changes for v6: - Adjust documentation file according to Wolfgang's comments Signed-off-by: Simon Glass --- doc/README.usb | 157 +++- 1 files changed, 156 insertions(+), 1 deletions(-) diff --git a/doc/README.usb b/doc/README.usb index 9aa4f62..a8a4058 100644 --- a/doc/README.usb +++ b/doc/README.usb @@ -79,4 +79,159 @@ CONFIG_USB_UHCI defines the lowlevel part.A lowlevel part must be defined if using CONFIG_CMD_USB CONFIG_USB_KEYBOARD enables the USB Keyboard CONFIG_USB_STORAGE enables the USB storage devices -CONFIG_USB_HOST_ETHER enables USB ethernet dongle support +CONFIG_USB_HOST_ETHER enables USB ethernet adapter support + + +USB Host Networking +=== + +If you have a supported USB Ethernet adapter you can use it in U-Boot +to obtain an IP address and load a kernel from a network server. + +Note: USB Host Networking is not the same as making your board act as a USB +client. In that case your board is pretending to be an Ethernet adapter +and will appear as a network interface to an attached computer. In that +case the connection is via a USB cable with the computer acting as the host. + +With USB Host Networking, your board is the USB host. It controls the +Ethernet adapter to which it is directly connected and the connection to +the outside world is your adapter's Ethernet cable. Your board becomes an +independent network device, able to connect and perform network operations +independently of your computer. + + +Device support +-- + +Currently supported devices are listed in the drivers according to +their vendor and product IDs. You can check your device by connecting it +to a Linux machine and typing 'lsusb'. The drivers are in +drivers/usb/eth. + +For example this lsusb output line shows a device with Vendor ID 0x0x95 +and product ID 0x7720: + +Bus 002 Device 010: ID 0b95:7720 ASIX Electronics Corp. AX88772 + +If you look at drivers/usb/eth/asix.c you will see this line within the +supported device list, so we know this adapter is supported. + +{ 0x0b95, 0x7720 }, /* Trendnet TU2-ET100 V3.0R */ + +If your adapter is not listed there is a still a chance that it will +work. Try looking up the manufacturer of the chip inside your adapter. +or take the adapter apart and look for chip markings. Then add a line +for your vendor/product ID into the table of the appropriate driver, +build U-Boot and see if it works. If not then there might be differences +between the chip in your adapter and the driver. You could try to get a +datasheet for your device and add support for it to U-Boot. This is not +particularly difficult - you only need to provide support for four basic +functions: init, halt, send and recv. + + +Enabling USB Host Networking + + +The normal U-Boot commands are used with USB networking, but you must +start USB first. For example: + +usb start +setenv bootfile /tftpboot/uImage +bootp + + +To enable USB Host Ethernet in U-Boot, your platform must of course +support USB with CONFIG_CMD_USB enabled and working. You will need to +add some config settings to your board header file: + +#define CONFIG_USB_HOST_ETHER /* Enable USB Ethernet adapters */ +#define CONFIG_USB_ETHER_ASIX /* Asix, or whatever driver(s) you want */ + +As with built-in networking, you will also want to enable some network +commands, for example: + +#define CONFIG_CMD_NET +#define CONFIG_NET_MULTI +#define CONFIG_CMD_PING +#define CONFIG_CMD_DHCP + +and some bootp options, which tell your board to obtain its subnet, +gateway IP, host name and boot path from the bootp/dhcp server. These +settings should start you off: + +#define CONFIG_BOOTP_SUBNETMASK +#define CONFIG_BOOTP_GATEWAY +#define CONFIG_BOOTP_HOSTNAME +#define CONFIG_BOOTP_BOOTPATH + +You can also set the default IP address of your board and the server +as well as the default file to load when a 'bootp' command is issued. +All of these can be obtained from the bootp server if not set. + +#define CONFIG_IPADDR 10.0.0.2 (replace with your value) +#define CONFIG_SERVERIP 10.0.0.1 (replace with your value) +#define CONFIG_BOOTFILE uImage + + +The 'usb start' command should identify the adapter something like this: + +CrOS> usb start +(Re)start USB... +USB EHCI 1.00 +scanning bus for devices... 3 USB Device(s) found + scanning bus for storage devices... 0 Storage Device(s) found + scanning bus for ethernet devices... 1 Ethernet Device(s) found +CrOS> print ethact +ethact=asx0 + +You can see that it found an ethernet device and we can print out the +device name (asx0 in this case). + +Then 'bootp' or 'dhcp' should use it to obtain an IP address from DHCP, +perhaps something like this: + +CrOS> bootp +Waiting for Ethernet connec
[U-Boot] [PATCH v7 RESEND 4/5] Put common autoload code into auto_load() function
This is a small clean-up patch. Signed-off-by: Simon Glass --- net/bootp.c | 75 +- 1 files changed, 32 insertions(+), 43 deletions(-) diff --git a/net/bootp.c b/net/bootp.c index 4db63cb..4774624 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -138,6 +138,35 @@ static int truncate_sz (const char *name, int maxlen, int curlen) return (curlen); } +/* + * Check if autoload is enabled. If so, use either NFS or TFTP to download + * the boot file. + */ +static void auto_load(void) +{ + const char *s = getenv("autoload"); + + if (s != NULL) { + if (*s == 'n') { + /* +* Just use BOOTP to configure system; +* Do not use TFTP to load the bootfile. +*/ + NetState = NETLOOP_SUCCESS; + return; + } +#if defined(CONFIG_CMD_NFS) + if (strcmp(s, "NFS") == 0) { + /* +* Use NFS to load the bootfile. +*/ + NfsStart(); + return; + } +#endif + TftpStart(); +} + #if !defined(CONFIG_CMD_DHCP) static void BootpVendorFieldProcess (u8 * ext) @@ -279,6 +308,7 @@ static void BootpVendorProcess (u8 * ext, int size) if (NetBootFileSize) debug("NetBootFileSize: %d\n", NetBootFileSize); } + /* * Handle a BOOTP received packet. */ @@ -287,7 +317,6 @@ BootpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src, unsigned len) { Bootp_t *bp; - char*s; debug("got BOOTP packet (src=%d, dst=%d, len=%d want_len=%zu)\n", src, dest, len, sizeof (Bootp_t)); @@ -314,26 +343,7 @@ BootpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src, debug("Got good BOOTP\n"); - if ((s = getenv("autoload")) != NULL) { - if (*s == 'n') { - /* -* Just use BOOTP to configure system; -* Do not use TFTP to load the bootfile. -*/ - NetState = NETLOOP_SUCCESS; - return; -#if defined(CONFIG_CMD_NFS) - } else if (strcmp(s, "NFS") == 0) { - /* -* Use NFS to load the bootfile. -*/ - NfsStart(); - return; -#endif - } - } - - TftpStart(); + auto_load(); } #endif @@ -907,34 +917,13 @@ DhcpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src, debug("DHCP State: REQUESTING\n"); if ( DhcpMessageType((u8 *)bp->bp_vend) == DHCP_ACK ) { - char *s; - if (NetReadLong((ulong*)&bp->bp_vend[0]) == htonl(BOOTP_VENDOR_MAGIC)) DhcpOptionsProcess((u8 *)&bp->bp_vend[4], bp); BootpCopyNetParams(bp); /* Store net params from reply */ dhcp_state = BOUND; printf ("DHCP client bound to address %pI4\n", &NetOurIP); - /* Obey the 'autoload' setting */ - if ((s = getenv("autoload")) != NULL) { - if (*s == 'n') { - /* -* Just use BOOTP to configure system; -* Do not use TFTP to load the bootfile. -*/ - NetState = NETLOOP_SUCCESS; - return; -#if defined(CONFIG_CMD_NFS) - } else if (strcmp(s, "NFS") == 0) { - /* -* Use NFS to load the bootfile. -*/ - NfsStart(); - return; -#endif - } - } - TftpStart(); + auto_load(); return; } break; -- 1.7.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v7 RESEND 0/5] Add SMSC95XX support including MAC address control
The SMSC95XX is a USB hub with a built-in Ethernet adapter. This adds support for this, using the USB host network framework. The framework is extended to support setting the hardware MAC address via an environment variable, since SMSC95XX chips often have no EEPROM attached, and thus no MAC address. Documentation is added on USB networking, the auto load code is refactored to remove duplication, and the ASIX USB ethernet driver is optimized to reduce the time between successive network operations. Changes for v2: - Coding style cleanup - Changed some comments as suggested - eth_set_hwaddr -> eth_write_hwaddr - tided up other users of eth_getenv_enetaddr_by_index() Changes for v3: - Drop tfpserverip patch - Change turbo_mode to #define - Fix tfpserverip patch bleed Changes for v4: - Dropped Tegra2 specific bit - Added patch in place of tftpserverip patch, to speed up successive network commands on asix - Fixed a few broken bits in SMSC from my testing Changes for v5: - Code style clean-ups in SMSC - Cleaned up debugging of errors in SMSC driver - Changed NULL to "eth" in eth_getenv_enetaddr_by_index() API Changes for v6: - Adjust documentation file according to Wolfgang's comments - Set NET_IP_ALIGN to 0 always Changes for v7: - Added change logs to each patch as requested by Wolfgang Simon Glass (5): Add support for SMSC95XX USB 2.0 10/100MBit Ethernet Adapter Add Ethernet hardware MAC address framework to usbnet Add documentation for USB Host Networking Put common autoload code into auto_load() function usbeth: asix: Do a fast init if link already established board/davinci/common/misc.c |2 +- doc/README.usb | 157 - drivers/net/designware.c|2 +- drivers/usb/eth/Makefile|1 + drivers/usb/eth/asix.c | 36 ++- drivers/usb/eth/smsc95xx.c | 878 +++ drivers/usb/eth/usb_ether.c | 16 +- include/net.h | 25 ++- include/usb_ether.h | 18 +- net/bootp.c | 75 ++--- net/eth.c | 64 ++-- 11 files changed, 1185 insertions(+), 89 deletions(-) create mode 100644 drivers/usb/eth/smsc95xx.c -- 1.7.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v7 RESEND 5/5] usbeth: asix: Do a fast init if link already established
The Asix driver takes the link down during init() and then brings it back up. This commit changes this so that if a link has already been established successfully we simply check that the link is still good. This reduces the delay between successive network commands. Signed-off-by: Simon Glass --- drivers/usb/eth/asix.c | 36 +++- include/usb_ether.h|5 +++-- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/drivers/usb/eth/asix.c b/drivers/usb/eth/asix.c index 9b012e4..18e5457 100644 --- a/drivers/usb/eth/asix.c +++ b/drivers/usb/eth/asix.c @@ -307,20 +307,12 @@ static int mii_nway_restart(struct ueth_data *dev) return r; } -/* - * Asix callbacks - */ -static int asix_init(struct eth_device *eth, bd_t *bd) +static int full_init(struct eth_device *eth) { + struct ueth_data *dev = (struct ueth_data *)eth->priv; int embd_phy; unsigned char buf[ETH_ALEN]; u16 rx_ctl; - struct ueth_data*dev = (struct ueth_data *)eth->priv; - int timeout = 0; -#define TIMEOUT_RESOLUTION 50 /* ms */ - int link_detected; - - debug("** %s()\n", __func__); if (asix_write_gpio(dev, AX_GPIO_RSE | AX_GPIO_GPO_2 | AX_GPIO_GPO2EN, 5) < 0) @@ -395,6 +387,25 @@ static int asix_init(struct eth_device *eth, bd_t *bd) if (asix_write_rx_ctl(dev, AX_DEFAULT_RX_CTL) < 0) goto out_err; + return 0; +out_err: + return -1; +} + +/* + * Asix callbacks + */ +static int asix_init(struct eth_device *eth, bd_t *bd) +{ + struct ueth_data *dev = (struct ueth_data *)eth->priv; + int timeout = 0; +#define TIMEOUT_RESOLUTION 50 /* ms */ + int link_detected; + + debug("** %s()\n", __func__); + + if (!dev->has_been_running && full_init(eth)) + return -1; do { link_detected = asix_mdio_read(dev, dev->phy_id, MII_BMSR) & @@ -411,12 +422,11 @@ static int asix_init(struct eth_device *eth, bd_t *bd) printf("done.\n"); } else { printf("unable to connect.\n"); - goto out_err; + return -1; } + dev->has_been_running = 1; return 0; -out_err: - return -1; } static int asix_send(struct eth_device *eth, volatile void *packet, int length) diff --git a/include/usb_ether.h b/include/usb_ether.h index a7fb26b..73b085d 100644 --- a/include/usb_ether.h +++ b/include/usb_ether.h @@ -37,8 +37,9 @@ struct ueth_data { /* eth info */ - struct eth_device eth_dev; /* used with eth_register */ - int phy_id; /* mii phy id */ + struct eth_device eth_dev; /* used with eth_register */ + int phy_id; /* mii phy id */ + int has_been_running; /* 1 if we have had a link up */ /* usb info */ struct usb_device *pusb_dev;/* this usb_device */ -- 1.7.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v7 RESEND 2/5] Add Ethernet hardware MAC address framework to usbnet
Built-in Ethernet adapters support setting the mac address by means of a ethaddr environment variable for each interface (ethaddr, eth1addr, eth2addr). This adds similar support to the USB network side, using the names usbethaddr, usbeth1addr, etc. They are kept separate since we don't want a USB device taking the MAC address of a built-in device or vice versa. Changes for v2: - eth_set_hwaddr -> eth_write_hwaddr - tided up other users of eth_getenv_enetaddr_by_index() Changes for v5: - Changed NULL to "eth" in eth_getenv_enetaddr_by_index() API Signed-off-by: Simon Glass --- board/davinci/common/misc.c |2 +- drivers/net/designware.c|2 +- drivers/usb/eth/usb_ether.c |9 +- include/net.h | 25 - net/eth.c | 64 ++- 5 files changed, 72 insertions(+), 30 deletions(-) diff --git a/board/davinci/common/misc.c b/board/davinci/common/misc.c index 2bfdf23..53d6aa1 100644 --- a/board/davinci/common/misc.c +++ b/board/davinci/common/misc.c @@ -101,7 +101,7 @@ void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr) { uint8_t env_enetaddr[6]; - eth_getenv_enetaddr_by_index(0, env_enetaddr); + eth_getenv_enetaddr_by_index("eth", 0, env_enetaddr); if (!memcmp(env_enetaddr, "\0\0\0\0\0\0", 6)) { /* There is no MAC address in the environment, so we initialize * it from the value in the EEPROM. */ diff --git a/drivers/net/designware.c b/drivers/net/designware.c index 3f5eeb7..02ba393 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -500,7 +500,7 @@ int designware_initialize(u32 id, ulong base_addr, u32 phy_addr) dev->iobase = (int)base_addr; dev->priv = priv; - eth_getenv_enetaddr_by_index(id, &dev->enetaddr[0]); + eth_getenv_enetaddr_by_index("eth", id, &dev->enetaddr[0]); priv->dev = dev; priv->mac_regs_p = (struct eth_mac_regs *)base_addr; diff --git a/drivers/usb/eth/usb_ether.c b/drivers/usb/eth/usb_ether.c index 7b55da3..6565ea5 100644 --- a/drivers/usb/eth/usb_ether.c +++ b/drivers/usb/eth/usb_ether.c @@ -80,6 +80,7 @@ int is_eth_dev_on_usb_host(void) */ static void probe_valid_drivers(struct usb_device *dev) { + struct eth_device *eth; int j; for (j = 0; prob_dev[j].probe && prob_dev[j].get_info; j++) { @@ -88,9 +89,10 @@ static void probe_valid_drivers(struct usb_device *dev) /* * ok, it is a supported eth device. Get info and fill it in */ + eth = &usb_eth[usb_max_eth_dev].eth_dev; if (prob_dev[j].get_info(dev, &usb_eth[usb_max_eth_dev], - &usb_eth[usb_max_eth_dev].eth_dev)) { + eth)) { /* found proper driver */ /* register with networking stack */ usb_max_eth_dev++; @@ -100,7 +102,10 @@ static void probe_valid_drivers(struct usb_device *dev) * call since eth_current_changed (internally called) * relies on it */ - eth_register(&usb_eth[usb_max_eth_dev - 1].eth_dev); + eth_register(eth); + if (eth_write_hwaddr(eth, "usbeth", + usb_max_eth_dev - 1)) + puts("Warning: failed to set MAC address\n"); break; } } diff --git a/include/net.h b/include/net.h index 018a744..ce54825 100644 --- a/include/net.h +++ b/include/net.h @@ -128,7 +128,18 @@ extern int eth_get_dev_index (void); /* get the device index */ extern void eth_parse_enetaddr(const char *addr, uchar *enetaddr); extern int eth_getenv_enetaddr(char *name, uchar *enetaddr); extern int eth_setenv_enetaddr(char *name, const uchar *enetaddr); -extern int eth_getenv_enetaddr_by_index(int index, uchar *enetaddr); + +/* + * Get the hardware address for an ethernet interface . + * Args: + * base_name - base name for device (normally "eth") + * index - device index number (0 for first) + * enetaddr - returns 6 byte hardware address + * Returns: + * Return true if the address is valid. + */ +extern int eth_getenv_enetaddr_by_index(const char *base_name, int index, + uchar *enetaddr); extern int usb_eth_initialize(bd_t *bi); extern int eth_init(bd_t *bis);/* Initialize the device */ @@ -141,6 +152,18 @@ extern int eth_rx(void); /* Check for received packets */ extern void eth_halt(void);/* stop SCC */ extern char *eth_get_name(void); /* get name of current device */ +/* + * Set the hardware address for an ethernet interface based on 'eth%daddr' + * environ
[U-Boot] [PATCH 2/2] at91sam9261ek: fix build errors
The targets using dataflash and nandflash as storage, for both at91sam9261 and at91sam9g10 SoC are available. Signed-off-by: Romain Izard --- MAKEALL |2 - Makefile | 23 --- arch/arm/cpu/arm926ejs/at91/at91sam9261_devices.c | 32 ++-- arch/arm/include/asm/arch-at91/at91_matrix.h | 15 +- arch/arm/include/asm/arch-at91/at91sam9261.h |1 + board/atmel/at91sam9261ek/at91sam9261ek.c | 211 +++- board/atmel/at91sam9261ek/config.mk |1 - board/atmel/at91sam9261ek/led.c | 21 +-- boards.cfg|6 + include/configs/at91sam9261ek.h | 101 ++ 10 files changed, 220 insertions(+), 193 deletions(-) delete mode 100644 board/atmel/at91sam9261ek/config.mk diff --git a/MAKEALL b/MAKEALL index 3aac7ca..6e97054 100755 --- a/MAKEALL +++ b/MAKEALL @@ -448,8 +448,6 @@ LIST_ARMV7="\ LIST_at91="$(boards_by_soc at91)\ $(boards_by_soc at91rm9200)\ at91sam9260ek \ - at91sam9261ek \ - at91sam9g10ek \ at91sam9g20ek \ at91sam9m10g45ek\ at91sam9rlek\ diff --git a/Makefile b/Makefile index c62601a..b0edafb 100644 --- a/Makefile +++ b/Makefile @@ -766,29 +766,6 @@ M5485HFE_config : unconfig ## ARM926EJ-S Systems # -at91sam9261ek_nandflash_config \ -at91sam9261ek_dataflash_cs0_config \ -at91sam9261ek_dataflash_cs3_config \ -at91sam9261ek_config \ -at91sam9g10ek_nandflash_config \ -at91sam9g10ek_dataflash_cs0_config \ -at91sam9g10ek_dataflash_cs3_config \ -at91sam9g10ek_config : unconfig - @mkdir -p $(obj)include - @if [ "$(findstring 9g10,$@)" ] ; then \ - echo "#define CONFIG_AT91SAM9G10EK 1" >>$(obj)include/config.h ; \ - else \ - echo "#define CONFIG_AT91SAM9261EK 1" >>$(obj)include/config.h ; \ - fi; - @if [ "$(findstring _nandflash,$@)" ] ; then \ - echo "#define CONFIG_SYS_USE_NANDFLASH 1" >>$(obj)include/config.h ; \ - elif [ "$(findstring dataflash_cs0,$@)" ] ; then \ - echo "#define CONFIG_SYS_USE_DATAFLASH_CS3 1" >>$(obj)include/config.h ; \ - else \ - echo "#define CONFIG_SYS_USE_DATAFLASH_CS0 1" >>$(obj)include/config.h ; \ - fi; - @$(MKCONFIG) -n $@ -a at91sam9261ek arm arm926ejs at91sam9261ek atmel at91 - at91sam9rlek_nandflash_config \ at91sam9rlek_dataflash_config \ at91sam9rlek_dataflash_cs0_config \ diff --git a/arch/arm/cpu/arm926ejs/at91/at91sam9261_devices.c b/arch/arm/cpu/arm926ejs/at91/at91sam9261_devices.c index b4353ef..0d087b8 100644 --- a/arch/arm/cpu/arm926ejs/at91/at91sam9261_devices.c +++ b/arch/arm/cpu/arm926ejs/at91/at91sam9261_devices.c @@ -23,45 +23,47 @@ */ #include +#include +#include #include #include +#include #include -#include void at91_serial0_hw_init(void) { - at91_pmc_t *pmc= (at91_pmc_t *) AT91_PMC_BASE; + at91_pmc_t *pmc= (at91_pmc_t *) ATMEL_BASE_PMC; at91_set_a_periph(AT91_PIO_PORTC, 8, 1);/* TXD0 */ at91_set_a_periph(AT91_PIO_PORTC, 9, 0);/* RXD0 */ - writel(1 << AT91SAM9261_ID_US0, &pmc->pcer); + writel(1 << ATMEL_ID_USART0, &pmc->pcer); } void at91_serial1_hw_init(void) { - at91_pmc_t *pmc= (at91_pmc_t *) AT91_PMC_BASE; + at91_pmc_t *pmc= (at91_pmc_t *) ATMEL_BASE_PMC; at91_set_a_periph(AT91_PIO_PORTC, 12, 1); /* TXD1 */ at91_set_a_periph(AT91_PIO_PORTC, 13, 0); /* RXD1 */ - writel(1 << AT91SAM9261_ID_US1, &pmc->pcer); + writel(1 << ATMEL_ID_USART1, &pmc->pcer); } void at91_serial2_hw_init(void) { - at91_pmc_t *pmc= (at91_pmc_t *) AT91_PMC_BASE; + at91_pmc_t *pmc= (at91_pmc_t *) ATMEL_BASE_PMC; at91_set_a_periph(AT91_PIO_PORTC, 14, 1); /* TXD2 */ at91_set_a_periph(AT91_PIO_PORTC, 15, 0); /* RXD2 */ - writel(1 << AT91SAM9261_ID_US2, &pmc->pcer); + writel(1 << ATMEL_ID_USART2, &pmc->pcer); } -void at91_serial3_hw_init(void) +void at91_seriald_hw_init(void) { - at91_pmc_t *pmc= (at91_pmc_t *) AT91_PMC_BASE; + at91_pmc_t *pmc= (at91_pmc_t *) ATMEL_BASE_PMC; at91_set_a_periph(AT91_PIO_PORTA, 9, 0);/* DRXD */ at91_set_a_periph(AT91_PIO_PORTA, 10, 1); /* DTXD */ - writel(1 << AT91_ID_SYS, &pmc->pcer); + writel(1 << ATMEL_ID_SYS, &pmc->pcer); } void at91_serial_hw_init(void) @@ -79,21 +81,21 @@ void at91_serial_hw_init(void) #endif #ifdef CONFIG_USART3 /* DBGU */ - at91_serial3_hw_init(); + at91_se
[U-Boot] [PATCH 1/2] at91sam9263ek: fix build errors
The targets using dataflash and nandflash as storage are available. Signed-off-by: Romain Izard --- MAKEALL |1 - Makefile | 19 arch/arm/include/asm/arch-at91/at91sam9263.h | 19 arch/arm/include/asm/arch-at91/at91sam9_sdramc.h |2 +- board/atmel/at91sam9263ek/at91sam9263ek.c| 62 -- board/atmel/at91sam9263ek/config.mk |1 - board/atmel/at91sam9263ek/led.c | 13 +-- boards.cfg |2 + include/configs/at91sam9263ek.h | 100 +- 9 files changed, 119 insertions(+), 100 deletions(-) delete mode 100644 board/atmel/at91sam9263ek/config.mk diff --git a/MAKEALL b/MAKEALL index 50c0080..3aac7ca 100755 --- a/MAKEALL +++ b/MAKEALL @@ -449,7 +449,6 @@ LIST_at91="$(boards_by_soc at91)\ $(boards_by_soc at91rm9200)\ at91sam9260ek \ at91sam9261ek \ - at91sam9263ek \ at91sam9g10ek \ at91sam9g20ek \ at91sam9m10g45ek\ diff --git a/Makefile b/Makefile index 1619c47..c62601a 100644 --- a/Makefile +++ b/Makefile @@ -789,25 +789,6 @@ at91sam9g10ek_config : unconfig fi; @$(MKCONFIG) -n $@ -a at91sam9261ek arm arm926ejs at91sam9261ek atmel at91 -at91sam9263ek_norflash_config \ -at91sam9263ek_norflash_boot_config \ -at91sam9263ek_nandflash_config \ -at91sam9263ek_dataflash_config \ -at91sam9263ek_dataflash_cs0_config \ -at91sam9263ek_config : unconfig - @mkdir -p $(obj)include - @if [ "$(findstring _nandflash,$@)" ] ; then \ - echo "#define CONFIG_SYS_USE_NANDFLASH 1" >>$(obj)include/config.h ; \ - elif [ "$(findstring norflash,$@)" ] ; then \ - echo "#define CONFIG_SYS_USE_NORFLASH 1" >>$(obj)include/config.h ; \ - else \ - echo "#define CONFIG_SYS_USE_DATAFLASH 1" >>$(obj)include/config.h ; \ - fi; - @if [ "$(findstring norflash_boot,$@)" ] ; then \ - echo "#define CONFIG_SYS_USE_BOOT_NORFLASH 1" >>$(obj)include/config.h ; \ - fi; - @$(MKCONFIG) -n $@ -a at91sam9263ek arm arm926ejs at91sam9263ek atmel at91 - at91sam9rlek_nandflash_config \ at91sam9rlek_dataflash_config \ at91sam9rlek_dataflash_cs0_config \ diff --git a/arch/arm/include/asm/arch-at91/at91sam9263.h b/arch/arm/include/asm/arch-at91/at91sam9263.h index 2a1d6ee..e48c9ff 100644 --- a/arch/arm/include/asm/arch-at91/at91sam9263.h +++ b/arch/arm/include/asm/arch-at91/at91sam9263.h @@ -124,11 +124,30 @@ #define ATMEL_BASE_DMAC0x0080 /* DMA Controller */ #define ATMEL_BASE_UHP 0x00a0 /* USB Host controller */ +#define ATMEL_BASE_EBI0_CS00x1000 +#define ATMEL_BASE_EBI0_CS10x2000 +#define ATMEL_BASE_EBI0_CS20x3000 +#define ATMEL_BASE_EBI0_CS30x4000 +#define ATMEL_BASE_EBI0_CS40x5000 +#define ATMEL_BASE_EBI0_CS50x6000 + +#define ATMEL_BASE_EBI1_CS00x7000 +#define ATMEL_BASE_EBI1_CS10x8000 +#define ATMEL_BASE_EBI1_CS20x9000 + +#define ATMEL_BASE_CS0 ATMEL_BASE_EBI0_CS0 +#define ATMEL_BASE_CS1 ATMEL_BASE_EBI0_CS1 +#define ATMEL_BASE_CS2 ATMEL_BASE_EBI0_CS2 +#define ATMEL_BASE_CS3 ATMEL_BASE_EBI0_CS3 +#define ATMEL_BASE_CS4 ATMEL_BASE_EBI0_CS4 +#define ATMEL_BASE_CS5 ATMEL_BASE_EBI0_CS5 + /* * Other misc defines */ #define ATMEL_PIO_PORTS5 /* this SoCs has 5 PIO */ #define ATMEL_BASE_PIO ATMEL_BASE_PIOA +#define ATMEL_PMC_UHP AT91SAM926x_PMC_UHP /* * Cpu Name diff --git a/arch/arm/include/asm/arch-at91/at91sam9_sdramc.h b/arch/arm/include/asm/arch-at91/at91sam9_sdramc.h index 54159a7..2d4c49e 100644 --- a/arch/arm/include/asm/arch-at91/at91sam9_sdramc.h +++ b/arch/arm/include/asm/arch-at91/at91sam9_sdramc.h @@ -20,7 +20,7 @@ #ifdef __ASSEMBLY__ #ifndef ATMEL_BASE_SDRAMC -#define ATMEL_BASE_SDRAMC AT91_SDRAMC0_BASE +#define ATMEL_BASE_SDRAMC ATMEL_BASE_SDRAMC0 #endif #define AT91_ASM_SDRAMC_MR ATMEL_BASE_SDRAMC diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c index 91efc07..7af7446 100644 --- a/board/atmel/at91sam9263ek/at91sam9263ek.c +++ b/board/atmel/at91sam9263ek/at91sam9263ek.c @@ -23,17 +23,15 @@ */ #include +#include #include -#include +#include #include #include #include #include -#include #include #include -#include -#include #include #include #if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB) @@ -52,15 +50,13 @@ DECLARE_GLOBAL_DATA_PTR; static void at91sam9263ek_nand_hw_init(void) { unsigned long csa; - at91_smc_t *smc= (at91_smc_t *) AT91_SMC0_BASE; - at91_matrix_t *matrix = (at91_matr
[U-Boot] [PATCH 0/2] AT91 rework: fix build errors for at91sam(9261/9g10/9263)ek
This patchset makes it possible to build u-boot for at91sam9261ek and at91sam9263ek evaluation kits. It applies on top of u-boot-atmel. It is directly inspired of Reinhard Meyer's patch for at91sam9260ek. It has not been tested on a live device, yet. Moreover, the NOR flash support for the at91sam9263ek compiles but does not link due to the CFI timer issue, so it is not mentioned in the boards.cfg file pending the issue's resolution. Romain Izard (2): at91sam9263ek: fix build errors at91sam9261ek: fix build errors MAKEALL |3 - Makefile | 42 arch/arm/cpu/arm926ejs/at91/at91sam9261_devices.c | 32 ++-- arch/arm/include/asm/arch-at91/at91_matrix.h | 15 +- arch/arm/include/asm/arch-at91/at91sam9261.h |1 + arch/arm/include/asm/arch-at91/at91sam9263.h | 19 ++ arch/arm/include/asm/arch-at91/at91sam9_sdramc.h |2 +- board/atmel/at91sam9261ek/at91sam9261ek.c | 211 +++- board/atmel/at91sam9261ek/config.mk |1 - board/atmel/at91sam9261ek/led.c | 21 +-- board/atmel/at91sam9263ek/at91sam9263ek.c | 62 --- board/atmel/at91sam9263ek/config.mk |1 - board/atmel/at91sam9263ek/led.c | 13 +- boards.cfg|8 + include/configs/at91sam9261ek.h | 101 ++ include/configs/at91sam9263ek.h | 100 ++ 16 files changed, 339 insertions(+), 293 deletions(-) delete mode 100644 board/atmel/at91sam9261ek/config.mk delete mode 100644 board/atmel/at91sam9263ek/config.mk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] TFTP support for Pandaboard (OMAP4430 Cortex-A9 Dual core)
On Tue, Jun 7, 2011 at 2:31 AM, Iordan Neshev wrote: > On 6/7/2011 10:53 AM, Gilles Chanteperdrix wrote: >> On 06/06/2011 08:07 PM, Peter Meerwald wrote: 1. I need to boot my Pandaboard via TFTP. As long as I see this is not yet possible, since in u-boot\include\configs\omap4_panda.h there is: /* Disabled commands */ #undef CONFIG_CMD_NET #undef CONFIG_CMD_NFS >>> a couple of patches have been posted on this ML to support SMSC USB >>> ethernet and EHCI; I have been unsuccessful so far to get them to work but >>> maybe there is hope... :) >> Hi Peter, >> >> Here is how it worked for me: >> I Updated x-loader to the latest revision from omap4_dev branch from >> x-loader git (git://git.omapzoom.org/repo/x-loader.git, you can find >> this information on pandaboard wiki), the head at the time being commit >> c8855fa6b85bd44073bd1b25dbffa99f02cbeeed >> >> I cloned u-boot git, the head at the time being commit >> 96d04c3150ae9284500aef48803d7d132968f2b2 >> >> I applied some of Simon's patches: >> Add support for SMSC95XX USB 2.0 10/100MBit Ethernet Adapter >> Add Ethernet hardware MAC address framework to usbnet >> Add documentation for USB Host Networking >> >> The applied the patches I already posted on this list: >> omap4: add support for gpios >> omap4: add support for EHCI >> omap4_panda: add support for EHCI >> >> Then an additional patch in order to get the mac address working for >> smsc95xx: >> diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c >> index 4d8dde0..97f2729 100644 >> --- a/drivers/usb/eth/smsc95xx.c >> +++ b/drivers/usb/eth/smsc95xx.c >> @@ -873,6 +873,7 @@ int smsc95xx_eth_get_info(struct usb_device *dev, >> struct ueth_data *ss, >> eth->send = smsc95xx_send; >> eth->recv = smsc95xx_recv; >> eth->halt = smsc95xx_halt; >> + eth->write_hwaddr = smsc95xx_write_hwaddr; >> eth->priv = ss; >> return 1; >> } >> >> Then modified the config.h in order to enable all this, that is, adding: >> #define CONFIG_CMD_USB 1 >> #define CONFIG_USB_STORAGE 1 >> #define CONFIG_USB_HOST_ETHER 1 >> #define CONFIG_USB_EHCI 1 >> #define CONFIG_USB_EHCI_OMAP4 1 >> #define CONFIG_USB_HOST 1 >> #define CONFIG_USB_ETHER_SMSC95XX 1 >> > Does somebody have any idea when these patches will be committed to the > git tree? Hi Iordan, I think the network maintainer was away - I will resend. I think there has already been one 'patch to the patch' sent to the list. I do have a panda board here but haven't got around to testing USB networking on it. Regards, Simon > > > Regards, > Iordan > ___ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] tftp/ipv6
Dear Sergey Lapin, In message <20110610114303.ga7...@build.ihdev.net> you wrote: > > Is it possible to use u-boot's tftp client > in v6-only setup? No, this is not possible yet. > If not, is there some known working tftp/ipv6 implementation? No, there isn't. At least none I know about. We once submitted such a proposal to CELF, see http://elinux.org/CELF_Project_Proposal/Add_IPV6_support_to_U-Boot But it was not selected. 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 "I think trash is the most important manifestation of culture we have in my lifetime." - Johnny Legend ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] tftp/ipv6
Hi, all! Is it possible to use u-boot's tftp client in v6-only setup? If not, is there some known working tftp/ipv6 implementation? Thanks a lot, S. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] fat: Handle moved FAT32 root directory
The default location of the root directory in a FAT32 partition is the same as its location in a FAT12/16 partition. But a difference is that in FAT32, it is possible for the root directory to move. This fix ensures that the parsing uses the root directory location stored in the PBR, instead of always using the default location. Signed-off-by: Romain Izard --- fs/fat/fat.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index c450bf6..22d34d3 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -798,6 +798,8 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize, if (mydata->fatsize == 32) { mydata->data_begin = mydata->rootdir_sect - (mydata->clust_size * 2); + cursect = mydata->data_begin + + (root_cluster * mydata->clust_size); } else { rootdir_size = ((bs.dir_entries[1] * (int)256 + bs.dir_entries[0]) * -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] scb9328: Add ARM relocation support
On 06/10/2011 07:44 AM, Torsten Koschorrek wrote: > Hello, Hi Torsten, send your answer to the ML, too. Someone else can help you ;-) >> size1 = get_ram_size((volatile void *)SCB9328_SDRAM_1, >> SCB9328_SDRAM_1_SIZE); >> #if ( CONFIG_NR_DRAM_BANKS> 1 ) >> size2 = get_ram_size((volatile void *)SCB9328_SDRAM_2, >> SCB9328_SDRAM_2_SIZE); >> . >> >> and then: >> gd->ram_size = size1 + size2 + size3 + size4; >> > > Yes, I thought about it. The thing is, we only have one bank on the > system. So, dram_init_banksize() needs a cleanup, but that's a problem > for another cleanup-patch, which will be committed in a next step. > > (If it's needed I could do a minor cleanup first...) You decide. However, the code in the patch is wrong. If you have only one bank, you could directly simplify your code, I think. > >>>/** >>> diff --git a/include/configs/scb9328.h b/include/configs/scb9328.h >>> index 3da214e..c610ed1 100644 >>> --- a/include/configs/scb9328.h >>> +++ b/include/configs/scb9328.h >>> @@ -127,6 +127,9 @@ >>> #define SCB9328_SDRAM_10x0800/* SDRAM bank #1 */ >>> #define SCB9328_SDRAM_1_SIZE0x0100/* 16 MB */ >>> +#define CONFIG_SYS_SDRAM_BASESCB9328_SDRAM_1 >>> +#define CONFIG_SYS_INIT_SP_ADDRSCB9328_SDRAM_1 + 0xf0 >> >> In most boards/processors the stack pointer is set to the internal RAM, >> that is available before the SDRAM controller is activated. When not >> available, cache can be used. Is there no internal memory available for >> this processor ? It could be that the stack is used before the SDRAM is >> initialized, and then it hangs. >> > > I suppose, here is the cause of the hanging problem, yes. While I was > trying to solve it I saw some board configs which use sdram, too. Take into account that a lot of new processors set automatically the RAM controller before u-boot is started. I am thinking to the newer i.MX processors, but this is true for other architectures, too. And in some cases u-boot runs as second or third bootloader, such as for at91sam, davinci and omap, without touching the RAM controller that is already programmed by the first-stage bootloader. In your case the SDRAM controller is probably not yet programmed when the stack pointer is set. > Internal RAM came to my mind, too, but I didn't had the time to > investigate further. > > Unfortunately I have to work on another project today and next week and > I think I'm not able to solve the hanging problem. Understood, I tried only to give you some hints where to check ;-) > Minor fixes (such as > config.mk) for the above patch should be possible, though. Ok, agree. Fix first the problem to make MAKEALL happy and build the board again. 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-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot