[U-Boot] [PATCH v2 0/10] mx23/mxs pending patches

This patchset includes the pending patches we have in our tree. It fixes issues for mx23evk and mx23_olinuxino boards.
The DRAM control register change has been kept specific to mx23evk as it breaks mx23_olinuxino (as it than reads only 16MB)
Changes in v2: - Extend code comment to explicit say it needs to be there. - Use MUX pin name - Requested by Marek - Avoid wrong clock setting in MX23 - Add changes for allow use of the USB hub - Remove extra newline
Otavio Salvador (10): mxs: Rename CONFIG_SPL_MX28_PSWITCH_WAIT to CONFIG_SPL_MXS_PSWITCH_WAIT mx23: Document the tRAS lockout setting in memory initialization mx23evk: Adjust DRAM control register to use full 128MB of RAM led: Use STATUS_LED_ON and STATUS_LED_OFF when calling __led_set mxs: Fix iomux.h to not break build during assembly stage mx23_olinuxino: Add support for status LED usb: mxs: Disable USB Port 1 for i.MX23 mx23evk: Enable USB support mx23_olinuxino: Enable USB support mx23_olinuxino: Add ethernet support
arch/arm/cpu/arm926ejs/mxs/mxs_init.h | 2 +- arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c | 1 + arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | 2 +- arch/arm/include/asm/arch-mxs/iomux.h | 5 +++ board/freescale/mx23evk/spl_boot.c | 10 +++++ board/olimex/mx23_olinuxino/mx23_olinuxino.c | 13 ++++++ board/olimex/mx23_olinuxino/spl_boot.c | 8 ++++ common/cmd_led.c | 6 ++- drivers/usb/host/ehci-mxs.c | 12 ++++++ include/configs/mx23_olinuxino.h | 63 ++++++++++++++++++++++++++-- include/configs/mx23evk.h | 10 +++++ 11 files changed, 125 insertions(+), 7 deletions(-)

The power switch option is compatible with i.MX23 and i.MX28 so the configration option needs to reflect it. We choose 'CONFIG_SPL_MXS_PSWITCH_WAIT' for the option name.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br Acked-by: Marek Vasut marex@denx.de --- Changes in v2: None
arch/arm/cpu/arm926ejs/mxs/mxs_init.h | 2 +- arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs_init.h b/arch/arm/cpu/arm926ejs/mxs/mxs_init.h index 2ddc5bc..084def5 100644 --- a/arch/arm/cpu/arm926ejs/mxs/mxs_init.h +++ b/arch/arm/cpu/arm926ejs/mxs/mxs_init.h @@ -30,7 +30,7 @@ void early_delay(int delay);
void mxs_power_init(void);
-#ifdef CONFIG_SPL_MX28_PSWITCH_WAIT +#ifdef CONFIG_SPL_MXS_PSWITCH_WAIT void mxs_power_wait_pswitch(void); #else static inline void mxs_power_wait_pswitch(void) { } diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c index e9d6302..287c698 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c @@ -921,7 +921,7 @@ void mxs_power_init(void) early_delay(1000); }
-#ifdef CONFIG_SPL_MX28_PSWITCH_WAIT +#ifdef CONFIG_SPL_MXS_PSWITCH_WAIT void mxs_power_wait_pswitch(void) { struct mxs_power_regs *power_regs =

Add a comment about the tRAS lockout setting of HW_DRAM_CTL08 to enable the 'Fast Auto Pre-Charge' found in the memory chip. The setting is applied after memory initialization and it is worth document it.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br --- Changes in v2: - Extend code comment to explicit say it needs to be there.
arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c index f8392f6..1952eac 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c @@ -119,6 +119,7 @@ static void initialize_dram_values(void) writel(dram_vals[i], MXS_DRAM_BASE + (4 * i));
#ifdef CONFIG_MX23 + /* Enable tRAS lockout in HW_DRAM_CTL08 ; it must be after all */ writel((1 << 24), MXS_DRAM_BASE + (4 * 8)); #endif }

Dear Otavio Salvador,
Add a comment about the tRAS lockout setting of HW_DRAM_CTL08 to enable the 'Fast Auto Pre-Charge' found in the memory chip. The setting is applied after memory initialization and it is worth document it.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
Changes in v2:
- Extend code comment to explicit say it needs to be there.
arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c index f8392f6..1952eac 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c @@ -119,6 +119,7 @@ static void initialize_dram_values(void) writel(dram_vals[i], MXS_DRAM_BASE + (4 * i));
#ifdef CONFIG_MX23
- /* Enable tRAS lockout in HW_DRAM_CTL08 ; it must be after all */
'After all'?
writel((1 << 24), MXS_DRAM_BASE + (4 * 8)); #endif }
Best regards, Marek Vasut

On Wed, Feb 13, 2013 at 7:12 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
Add a comment about the tRAS lockout setting of HW_DRAM_CTL08 to enable the 'Fast Auto Pre-Charge' found in the memory chip. The setting is applied after memory initialization and it is worth document it.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
Changes in v2:
- Extend code comment to explicit say it needs to be there.
arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c index f8392f6..1952eac 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c @@ -119,6 +119,7 @@ static void initialize_dram_values(void) writel(dram_vals[i], MXS_DRAM_BASE + (4 * i));
#ifdef CONFIG_MX23
/* Enable tRAS lockout in HW_DRAM_CTL08 ; it must be after all */
'After all'?
For me it is clear enough; I am not native so it'd be good if a native English speaker could comment on this.
writel((1 << 24), MXS_DRAM_BASE + (4 * 8));
#endif }
Best regards, Marek Vasut

On Wed, Feb 13, 2013 at 7:20 PM, Otavio Salvador otavio@ossystems.com.br wrote:
#ifdef CONFIG_MX23
/* Enable tRAS lockout in HW_DRAM_CTL08 ; it must be after all */
'After all'?
For me it is clear enough; I am not native so it'd be good if a native English speaker could comment on this.
I think you meant to say "it must be the last element".

On Wed, Feb 13, 2013 at 7:31 PM, Fabio Estevam festevam@gmail.com wrote:
On Wed, Feb 13, 2013 at 7:20 PM, Otavio Salvador otavio@ossystems.com.br wrote:
#ifdef CONFIG_MX23
/* Enable tRAS lockout in HW_DRAM_CTL08 ; it must be after all */
'After all'?
For me it is clear enough; I am not native so it'd be good if a native English speaker could comment on this.
I think you meant to say "it must be the last element".
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c b/arch/arm/cpu/arm926 index f8392f6..b6a0563 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c @@ -119,6 +119,9 @@ static void initialize_dram_values(void) writel(dram_vals[i], MXS_DRAM_BASE + (4 * i));
#ifdef CONFIG_MX23 + /* Enable tRAS lockout in HW_DRAM_CTL08 ; it must be the last + * element to be set */ writel((1 << 24), MXS_DRAM_BASE + (4 * 8)); #endif }
What about this?
-- Otavio Salvador O.S. Systems E-mail: otavio@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

On Wed, Feb 13, 2013 at 7:36 PM, Otavio Salvador otavio@ossystems.com.br wrote:
On Wed, Feb 13, 2013 at 7:31 PM, Fabio Estevam festevam@gmail.com wrote:
On Wed, Feb 13, 2013 at 7:20 PM, Otavio Salvador otavio@ossystems.com.br wrote:
#ifdef CONFIG_MX23
/* Enable tRAS lockout in HW_DRAM_CTL08 ; it must be after all */
'After all'?
For me it is clear enough; I am not native so it'd be good if a native English speaker could comment on this.
I think you meant to say "it must be the last element".
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c b/arch/arm/cpu/arm926 index f8392f6..b6a0563 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c @@ -119,6 +119,9 @@ static void initialize_dram_values(void) writel(dram_vals[i], MXS_DRAM_BASE + (4 * i));
#ifdef CONFIG_MX23
/* Enable tRAS lockout in HW_DRAM_CTL08 ; it must be the last
* element to be set */
I think the comment is clear, but multi-line comment should be like:
/* * First line bla bla bla * Second line bla bla bla */

On Wed, Feb 13, 2013 at 7:39 PM, Fabio Estevam festevam@gmail.com wrote:
On Wed, Feb 13, 2013 at 7:36 PM, Otavio Salvador otavio@ossystems.com.br wrote:
On Wed, Feb 13, 2013 at 7:31 PM, Fabio Estevam festevam@gmail.com wrote:
On Wed, Feb 13, 2013 at 7:20 PM, Otavio Salvador otavio@ossystems.com.br wrote:
#ifdef CONFIG_MX23
/* Enable tRAS lockout in HW_DRAM_CTL08 ; it must be after all */
'After all'?
For me it is clear enough; I am not native so it'd be good if a native English speaker could comment on this.
I think you meant to say "it must be the last element".
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c b/arch/arm/cpu/arm926 index f8392f6..b6a0563 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c @@ -119,6 +119,9 @@ static void initialize_dram_values(void) writel(dram_vals[i], MXS_DRAM_BASE + (4 * i));
#ifdef CONFIG_MX23
/* Enable tRAS lockout in HW_DRAM_CTL08 ; it must be the last
* element to be set */
I think the comment is clear, but multi-line comment should be like:
/*
- First line bla bla bla
- Second line bla bla bla
*/
Ok; fixed for v3.

Adjust HW_DRAM_CTL14 to enable the chip selects to allow usage of full 128MB of RAM.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br --- Changes in v2: None
board/freescale/mx23evk/spl_boot.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/board/freescale/mx23evk/spl_boot.c b/board/freescale/mx23evk/spl_boot.c index 6007433..b6f4e7e 100644 --- a/board/freescale/mx23evk/spl_boot.c +++ b/board/freescale/mx23evk/spl_boot.c @@ -98,6 +98,16 @@ const iomux_cfg_t iomux_setup[] = { (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), };
+#define HW_DRAM_CTL14 (0x38 >> 2) +#define CS_MAP 0x3 +#define INTAREF 0x2 +#define HW_DRAM_CTL14_CONFIG (INTAREF << 8 | CS_MAP) + +void mxs_adjust_memory_params(uint32_t *dram_vals) +{ + dram_vals[HW_DRAM_CTL14] = HW_DRAM_CTL14_CONFIG; +} + void board_init_ll(void) { mxs_common_spl_init(iomux_setup, ARRAY_SIZE(iomux_setup));

Dear Otavio Salvador,
Adjust HW_DRAM_CTL14 to enable the chip selects to allow usage of full 128MB of RAM.
Why can this not be enabled globally?
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
Changes in v2: None
board/freescale/mx23evk/spl_boot.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/board/freescale/mx23evk/spl_boot.c b/board/freescale/mx23evk/spl_boot.c index 6007433..b6f4e7e 100644 --- a/board/freescale/mx23evk/spl_boot.c +++ b/board/freescale/mx23evk/spl_boot.c @@ -98,6 +98,16 @@ const iomux_cfg_t iomux_setup[] = { (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), };
+#define HW_DRAM_CTL14 (0x38 >> 2) +#define CS_MAP 0x3 +#define INTAREF 0x2 +#define HW_DRAM_CTL14_CONFIG (INTAREF << 8 | CS_MAP)
+void mxs_adjust_memory_params(uint32_t *dram_vals) +{
- dram_vals[HW_DRAM_CTL14] = HW_DRAM_CTL14_CONFIG;
+}
void board_init_ll(void) { mxs_common_spl_init(iomux_setup, ARRAY_SIZE(iomux_setup));
Best regards, Marek Vasut

On Wed, Feb 13, 2013 at 7:13 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
Adjust HW_DRAM_CTL14 to enable the chip selects to allow usage of full 128MB of RAM.
Why can this not be enabled globally?
Because it breaks mx23_olinuxino; it is a good reason for me.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
Changes in v2: None
board/freescale/mx23evk/spl_boot.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/board/freescale/mx23evk/spl_boot.c b/board/freescale/mx23evk/spl_boot.c index 6007433..b6f4e7e 100644 --- a/board/freescale/mx23evk/spl_boot.c +++ b/board/freescale/mx23evk/spl_boot.c @@ -98,6 +98,16 @@ const iomux_cfg_t iomux_setup[] = { (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), };
+#define HW_DRAM_CTL14 (0x38 >> 2) +#define CS_MAP 0x3 +#define INTAREF 0x2 +#define HW_DRAM_CTL14_CONFIG (INTAREF << 8 | CS_MAP)
+void mxs_adjust_memory_params(uint32_t *dram_vals) +{
dram_vals[HW_DRAM_CTL14] = HW_DRAM_CTL14_CONFIG;
+}
void board_init_ll(void) { mxs_common_spl_init(iomux_setup, ARRAY_SIZE(iomux_setup));
Best regards, Marek Vasut

Dear Otavio Salvador,
On Wed, Feb 13, 2013 at 7:13 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
Adjust HW_DRAM_CTL14 to enable the chip selects to allow usage of full 128MB of RAM.
Why can this not be enabled globally?
Because it breaks mx23_olinuxino; it is a good reason for me.
Can you elaborate please?
Best regards, Marek Vasut

On Wed, Feb 13, 2013 at 7:33 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
On Wed, Feb 13, 2013 at 7:13 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
Adjust HW_DRAM_CTL14 to enable the chip selects to allow usage of full 128MB of RAM.
Why can this not be enabled globally?
Because it breaks mx23_olinuxino; it is a good reason for me.
Can you elaborate please?
From cover letter:
The DRAM control register change has been kept specific to mx23evk as it breaks mx23_olinuxino (as it than reads only 16MB)
-- Otavio Salvador O.S. Systems E-mail: otavio@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

Dear Otavio Salvador,
On Wed, Feb 13, 2013 at 7:33 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
On Wed, Feb 13, 2013 at 7:13 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
Adjust HW_DRAM_CTL14 to enable the chip selects to allow usage of full 128MB of RAM.
Why can this not be enabled globally?
Because it breaks mx23_olinuxino; it is a good reason for me.
Can you elaborate please?
From cover letter:
The DRAM control register change has been kept specific to mx23evk as it breaks mx23_olinuxino (as it than reads only 16MB)
That's unfortunate.
Best regards, Marek Vasut

This fixes the gpio_led driver which needs to compare againt a STATUS_LED_ON to enable a led.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br --- Changes in v2: None
common/cmd_led.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/common/cmd_led.c b/common/cmd_led.c index 7f5ab43..84f79fa 100644 --- a/common/cmd_led.c +++ b/common/cmd_led.c @@ -110,13 +110,15 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (led_commands[i].on) led_commands[i].on(); else - __led_set(led_commands[i].mask, 1); + __led_set(led_commands[i].mask, + STATUS_LED_ON); break; case LED_OFF: if (led_commands[i].off) led_commands[i].off(); else - __led_set(led_commands[i].mask, 0); + __led_set(led_commands[i].mask, + STATUS_LED_OFF); break; case LED_TOGGLE: if (led_commands[i].toggle)

This fixes the build failure when included in mx23_olinuxino.h board config; the addition of "asm/types.h" is due "u32" being otherwise undefined.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br --- Changes in v2: None
arch/arm/include/asm/arch-mxs/iomux.h | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/include/asm/arch-mxs/iomux.h b/arch/arm/include/asm/arch-mxs/iomux.h index 7abdf58..4288715 100644 --- a/arch/arm/include/asm/arch-mxs/iomux.h +++ b/arch/arm/include/asm/arch-mxs/iomux.h @@ -21,6 +21,10 @@ #ifndef __MACH_MXS_IOMUX_H__ #define __MACH_MXS_IOMUX_H__
+#ifndef __ASSEMBLY__ + +#include <asm/types.h> + /* * IOMUX/PAD Bit field definitions * @@ -165,4 +169,5 @@ int mxs_iomux_setup_pad(iomux_cfg_t pad); */ int mxs_iomux_setup_multiple_pads(const iomux_cfg_t *pad_list, unsigned count);
+#endif /* __ASSEMBLY__ */ #endif /* __MACH_MXS_IOMUX_H__*/

Dear Otavio Salvador,
This fixes the build failure when included in mx23_olinuxino.h board config; the addition of "asm/types.h" is due "u32" being otherwise undefined.
Regular <types.h> doesn't cut it?
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
Changes in v2: None
arch/arm/include/asm/arch-mxs/iomux.h | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/include/asm/arch-mxs/iomux.h b/arch/arm/include/asm/arch-mxs/iomux.h index 7abdf58..4288715 100644 --- a/arch/arm/include/asm/arch-mxs/iomux.h +++ b/arch/arm/include/asm/arch-mxs/iomux.h @@ -21,6 +21,10 @@ #ifndef __MACH_MXS_IOMUX_H__ #define __MACH_MXS_IOMUX_H__
+#ifndef __ASSEMBLY__
+#include <asm/types.h>
/*
- IOMUX/PAD Bit field definitions
@@ -165,4 +169,5 @@ int mxs_iomux_setup_pad(iomux_cfg_t pad); */ int mxs_iomux_setup_multiple_pads(const iomux_cfg_t *pad_list, unsigned count);
+#endif /* __ASSEMBLY__ */ #endif /* __MACH_MXS_IOMUX_H__*/
Best regards, Marek Vasut

On Wed, Feb 13, 2013 at 7:13 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
This fixes the build failure when included in mx23_olinuxino.h board config; the addition of "asm/types.h" is due "u32" being otherwise undefined.
Regular <types.h> doesn't cut it?
I did not test; this seemed as the right one to take. Stefano?
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
Changes in v2: None
arch/arm/include/asm/arch-mxs/iomux.h | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/include/asm/arch-mxs/iomux.h b/arch/arm/include/asm/arch-mxs/iomux.h index 7abdf58..4288715 100644 --- a/arch/arm/include/asm/arch-mxs/iomux.h +++ b/arch/arm/include/asm/arch-mxs/iomux.h @@ -21,6 +21,10 @@ #ifndef __MACH_MXS_IOMUX_H__ #define __MACH_MXS_IOMUX_H__
+#ifndef __ASSEMBLY__
+#include <asm/types.h>
/*
- IOMUX/PAD Bit field definitions
@@ -165,4 +169,5 @@ int mxs_iomux_setup_pad(iomux_cfg_t pad); */ int mxs_iomux_setup_multiple_pads(const iomux_cfg_t *pad_list, unsigned count);
+#endif /* __ASSEMBLY__ */ #endif /* __MACH_MXS_IOMUX_H__*/
Best regards, Marek Vasut

Dear Otavio Salvador,
On Wed, Feb 13, 2013 at 7:13 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
This fixes the build failure when included in mx23_olinuxino.h board config; the addition of "asm/types.h" is due "u32" being otherwise undefined.
Regular <types.h> doesn't cut it?
I did not test; this seemed as the right one to take. Stefano?
ok, asm/types.h seems good
Best regards, Marek Vasut

This allow user to know if the bootloader is running, even without a serial console.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br --- Changes in v2: - Use MUX pin name - Requested by Marek
board/olimex/mx23_olinuxino/mx23_olinuxino.c | 7 +++++++ board/olimex/mx23_olinuxino/spl_boot.c | 4 ++++ include/configs/mx23_olinuxino.h | 14 ++++++++++++++ 3 files changed, 25 insertions(+)
diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c index 6a6053b..2501417 100644 --- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c +++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c @@ -28,6 +28,9 @@ #include <asm/arch/imx-regs.h> #include <asm/arch/clock.h> #include <asm/arch/sys_proto.h> +#ifdef CONFIG_STATUS_LED +#include <status_led.h> +#endif
DECLARE_GLOBAL_DATA_PTR;
@@ -67,5 +70,9 @@ int board_init(void) /* Adress of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
+#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT) + status_led_set(STATUS_LED_BOOT, STATUS_LED_STATE); +#endif + return 0; } diff --git a/board/olimex/mx23_olinuxino/spl_boot.c b/board/olimex/mx23_olinuxino/spl_boot.c index 7def8bc..3bbf5ad 100644 --- a/board/olimex/mx23_olinuxino/spl_boot.c +++ b/board/olimex/mx23_olinuxino/spl_boot.c @@ -84,6 +84,10 @@ const iomux_cfg_t iomux_setup[] = { MX23_PAD_EMI_RASN__EMI_RASN | MUX_CONFIG_EMI, MX23_PAD_EMI_WEN__EMI_WEN | MUX_CONFIG_EMI,
+ /* Green LED */ + MX23_PAD_SSP1_DETECT__GPIO_2_1 | + (MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL), + /* MMC 0 */ MX23_PAD_SSP1_CMD__SSP1_CMD | MUX_CONFIG_SSP, MX23_PAD_SSP1_DATA0__SSP1_DATA0 | MUX_CONFIG_SSP, diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h index 7983c5d..d019944 100644 --- a/include/configs/mx23_olinuxino.h +++ b/include/configs/mx23_olinuxino.h @@ -19,6 +19,8 @@ #ifndef __MX23_OLINUXINO_CONFIG_H__ #define __MX23_OLINUXINO_CONFIG_H__
+#include <asm/arch/iomux-mx23.h> + /* * SoC configurations */ @@ -56,6 +58,7 @@ #define CONFIG_CMD_EXT2 #define CONFIG_CMD_FAT #define CONFIG_CMD_GPIO +#define CONFIG_CMD_LED #define CONFIG_CMD_MMC
/* @@ -112,6 +115,17 @@ #define CONFIG_BAUDRATE 115200 /* Default baud rate */
/* + * Status LED + */ +#define CONFIG_STATUS_LED +#define CONFIG_GPIO_LED +#define CONFIG_BOARD_SPECIFIC_LED +#define STATUS_LED_BOOT 0 +#define STATUS_LED_BIT MX23_PAD_SSP1_DETECT__GPIO_2_1 +#define STATUS_LED_STATE STATUS_LED_ON +#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2) + +/* * MMC Driver */ #ifdef CONFIG_CMD_MMC

The i.MX23 just one USB port so disable the second controller probe when building for i.MX23.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br --- Changes in v2: - Avoid wrong clock setting in MX23
drivers/usb/host/ehci-mxs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c index 5062af5..b7bf856 100644 --- a/drivers/usb/host/ehci-mxs.c +++ b/drivers/usb/host/ehci-mxs.c @@ -50,10 +50,12 @@ int mxs_ehci_get_port(struct ehci_mxs *mxs_usb, int port) usb_base = MXS_USBCTRL0_BASE; phy_base = MXS_USBPHY0_BASE; break; +#ifdef CONFIG_MX28 case 1: usb_base = MXS_USBCTRL1_BASE; phy_base = MXS_USBPHY1_BASE; break; +#endif default: printf("CONFIG_EHCI_MXS_PORT (port = %d)\n", port); return -1; @@ -67,7 +69,9 @@ int mxs_ehci_get_port(struct ehci_mxs *mxs_usb, int port) /* This DIGCTL register ungates clock to USB */ #define HW_DIGCTL_CTRL 0x8001c000 #define HW_DIGCTL_CTRL_USB0_CLKGATE (1 << 2) +#ifdef CONFIG_MX28 #define HW_DIGCTL_CTRL_USB1_CLKGATE (1 << 16) +#endif
int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { @@ -95,8 +99,12 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) writel(CLKCTRL_PLL1CTRL0_EN_USB_CLKS | CLKCTRL_PLL1CTRL0_POWER, &clkctrl_regs->hw_clkctrl_pll1ctrl0_set);
+#if defined(CONFIG_MX23) + writel(HW_DIGCTL_CTRL_USB0_CLKGATE, &digctl_ctrl->reg_clr); +#elif defined(CONFIG_MX28) writel(HW_DIGCTL_CTRL_USB0_CLKGATE | HW_DIGCTL_CTRL_USB1_CLKGATE, &digctl_ctrl->reg_clr); +#endif
/* Start USB PHY */ writel(0, &ehci_mxs.phy_regs->hw_usbphy_pwd); @@ -153,8 +161,12 @@ int ehci_hcd_stop(int index) &clkctrl_regs->hw_clkctrl_pll1ctrl0_clr);
/* Gate off the USB clock */ +#if defined(CONFIG_MX23) + writel(HW_DIGCTL_CTRL_USB0_CLKGATE, &digctl_ctrl->reg_set); +#elif defined(CONFIG_MX28) writel(HW_DIGCTL_CTRL_USB0_CLKGATE | HW_DIGCTL_CTRL_USB1_CLKGATE, &digctl_ctrl->reg_set); +#endif
return 0; }

Dear Otavio Salvador,
The i.MX23 just one USB port so disable the second controller probe when building for i.MX23.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
Changes in v2:
- Avoid wrong clock setting in MX23
drivers/usb/host/ehci-mxs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c index 5062af5..b7bf856 100644 --- a/drivers/usb/host/ehci-mxs.c +++ b/drivers/usb/host/ehci-mxs.c @@ -50,10 +50,12 @@ int mxs_ehci_get_port(struct ehci_mxs *mxs_usb, int port) usb_base = MXS_USBCTRL0_BASE; phy_base = MXS_USBPHY0_BASE; break; +#ifdef CONFIG_MX28 case 1: usb_base = MXS_USBCTRL1_BASE; phy_base = MXS_USBPHY1_BASE; break; +#endif default: printf("CONFIG_EHCI_MXS_PORT (port = %d)\n", port); return -1; @@ -67,7 +69,9 @@ int mxs_ehci_get_port(struct ehci_mxs *mxs_usb, int port) /* This DIGCTL register ungates clock to USB */ #define HW_DIGCTL_CTRL 0x8001c000 #define HW_DIGCTL_CTRL_USB0_CLKGATE (1 << 2) +#ifdef CONFIG_MX28 #define HW_DIGCTL_CTRL_USB1_CLKGATE (1 << 16) +#endif
int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { @@ -95,8 +99,12 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) writel(CLKCTRL_PLL1CTRL0_EN_USB_CLKS | CLKCTRL_PLL1CTRL0_POWER, &clkctrl_regs->hw_clkctrl_pll1ctrl0_set);
+#if defined(CONFIG_MX23)
- writel(HW_DIGCTL_CTRL_USB0_CLKGATE, &digctl_ctrl->reg_clr);
What is that large space before '&digctl_regs->...' ?
+#elif defined(CONFIG_MX28) writel(HW_DIGCTL_CTRL_USB0_CLKGATE | HW_DIGCTL_CTRL_USB1_CLKGATE, &digctl_ctrl->reg_clr); +#endif
I'm sure these can be wrapped in much more elegant way, yes?
/* Start USB PHY */ writel(0, &ehci_mxs.phy_regs->hw_usbphy_pwd); @@ -153,8 +161,12 @@ int ehci_hcd_stop(int index) &clkctrl_regs->hw_clkctrl_pll1ctrl0_clr);
/* Gate off the USB clock */ +#if defined(CONFIG_MX23)
- writel(HW_DIGCTL_CTRL_USB0_CLKGATE, &digctl_ctrl->reg_set);
+#elif defined(CONFIG_MX28) writel(HW_DIGCTL_CTRL_USB0_CLKGATE | HW_DIGCTL_CTRL_USB1_CLKGATE, &digctl_ctrl->reg_set); +#endif
return 0; }
Best regards, Marek Vasut

On Wed, Feb 13, 2013 at 7:15 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
The i.MX23 just one USB port so disable the second controller probe when building for i.MX23.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
Changes in v2:
- Avoid wrong clock setting in MX23
drivers/usb/host/ehci-mxs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c index 5062af5..b7bf856 100644 --- a/drivers/usb/host/ehci-mxs.c +++ b/drivers/usb/host/ehci-mxs.c @@ -50,10 +50,12 @@ int mxs_ehci_get_port(struct ehci_mxs *mxs_usb, int port) usb_base = MXS_USBCTRL0_BASE; phy_base = MXS_USBPHY0_BASE; break; +#ifdef CONFIG_MX28 case 1: usb_base = MXS_USBCTRL1_BASE; phy_base = MXS_USBPHY1_BASE; break; +#endif default: printf("CONFIG_EHCI_MXS_PORT (port = %d)\n", port); return -1; @@ -67,7 +69,9 @@ int mxs_ehci_get_port(struct ehci_mxs *mxs_usb, int port) /* This DIGCTL register ungates clock to USB */ #define HW_DIGCTL_CTRL 0x8001c000 #define HW_DIGCTL_CTRL_USB0_CLKGATE (1 << 2) +#ifdef CONFIG_MX28 #define HW_DIGCTL_CTRL_USB1_CLKGATE (1 << 16) +#endif
int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { @@ -95,8 +99,12 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) writel(CLKCTRL_PLL1CTRL0_EN_USB_CLKS | CLKCTRL_PLL1CTRL0_POWER, &clkctrl_regs->hw_clkctrl_pll1ctrl0_set);
+#if defined(CONFIG_MX23)
writel(HW_DIGCTL_CTRL_USB0_CLKGATE, &digctl_ctrl->reg_clr);
What is that large space before '&digctl_regs->...' ?
My fault. I can fix it.
+#elif defined(CONFIG_MX28) writel(HW_DIGCTL_CTRL_USB0_CLKGATE | HW_DIGCTL_CTRL_USB1_CLKGATE, &digctl_ctrl->reg_clr); +#endif
I'm sure these can be wrapped in much more elegant way, yes?
I wanted to keep the changes at minimum; so seems the right route. What you'd like me to do? Use a temporary variable?
/* Start USB PHY */ writel(0, &ehci_mxs.phy_regs->hw_usbphy_pwd);
@@ -153,8 +161,12 @@ int ehci_hcd_stop(int index) &clkctrl_regs->hw_clkctrl_pll1ctrl0_clr);
/* Gate off the USB clock */
+#if defined(CONFIG_MX23)
writel(HW_DIGCTL_CTRL_USB0_CLKGATE, &digctl_ctrl->reg_set);
+#elif defined(CONFIG_MX28) writel(HW_DIGCTL_CTRL_USB0_CLKGATE | HW_DIGCTL_CTRL_USB1_CLKGATE, &digctl_ctrl->reg_set); +#endif
return 0;
}
Best regards, Marek Vasut

Dear Otavio Salvador,
On Wed, Feb 13, 2013 at 7:15 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
The i.MX23 just one USB port so disable the second controller probe when building for i.MX23.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
Changes in v2:
- Avoid wrong clock setting in MX23
drivers/usb/host/ehci-mxs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c index 5062af5..b7bf856 100644 --- a/drivers/usb/host/ehci-mxs.c +++ b/drivers/usb/host/ehci-mxs.c @@ -50,10 +50,12 @@ int mxs_ehci_get_port(struct ehci_mxs *mxs_usb, int port) usb_base = MXS_USBCTRL0_BASE;
phy_base = MXS_USBPHY0_BASE; break;
+#ifdef CONFIG_MX28
case 1: usb_base = MXS_USBCTRL1_BASE; phy_base = MXS_USBPHY1_BASE; break;
+#endif
default: printf("CONFIG_EHCI_MXS_PORT (port = %d)\n", port); return -1;
@@ -67,7 +69,9 @@ int mxs_ehci_get_port(struct ehci_mxs *mxs_usb, int port)
/* This DIGCTL register ungates clock to USB */ #define HW_DIGCTL_CTRL 0x8001c000 #define HW_DIGCTL_CTRL_USB0_CLKGATE (1 << 2)
+#ifdef CONFIG_MX28
#define HW_DIGCTL_CTRL_USB1_CLKGATE (1 << 16)
+#endif
int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor
**hcor) { @@ -95,8 +99,12 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) writel(CLKCTRL_PLL1CTRL0_EN_USB_CLKS | CLKCTRL_PLL1CTRL0_POWER,
&clkctrl_regs->hw_clkctrl_pll1ctrl0_set);
+#if defined(CONFIG_MX23)
writel(HW_DIGCTL_CTRL_USB0_CLKGATE, &digctl_ctrl->reg_clr);
What is that large space before '&digctl_regs->...' ?
My fault. I can fix it.
+#elif defined(CONFIG_MX28)
writel(HW_DIGCTL_CTRL_USB0_CLKGATE | HW_DIGCTL_CTRL_USB1_CLKGATE, &digctl_ctrl->reg_clr);
+#endif
I'm sure these can be wrapped in much more elegant way, yes?
I wanted to keep the changes at minimum; so seems the right route. What you'd like me to do? Use a temporary variable?
Either that or wrap it all in struct ehci_mxs and do these ungatings etc on a per-port basis.

On Wed, Feb 13, 2013 at 7:36 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
On Wed, Feb 13, 2013 at 7:15 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
The i.MX23 just one USB port so disable the second controller probe when building for i.MX23.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
Changes in v2:
- Avoid wrong clock setting in MX23
drivers/usb/host/ehci-mxs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c index 5062af5..b7bf856 100644 --- a/drivers/usb/host/ehci-mxs.c +++ b/drivers/usb/host/ehci-mxs.c @@ -50,10 +50,12 @@ int mxs_ehci_get_port(struct ehci_mxs *mxs_usb, int port) usb_base = MXS_USBCTRL0_BASE;
phy_base = MXS_USBPHY0_BASE; break;
+#ifdef CONFIG_MX28
case 1: usb_base = MXS_USBCTRL1_BASE; phy_base = MXS_USBPHY1_BASE; break;
+#endif
default: printf("CONFIG_EHCI_MXS_PORT (port = %d)\n", port); return -1;
@@ -67,7 +69,9 @@ int mxs_ehci_get_port(struct ehci_mxs *mxs_usb, int port)
/* This DIGCTL register ungates clock to USB */ #define HW_DIGCTL_CTRL 0x8001c000 #define HW_DIGCTL_CTRL_USB0_CLKGATE (1 << 2)
+#ifdef CONFIG_MX28
#define HW_DIGCTL_CTRL_USB1_CLKGATE (1 << 16)
+#endif
int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor
**hcor) { @@ -95,8 +99,12 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) writel(CLKCTRL_PLL1CTRL0_EN_USB_CLKS | CLKCTRL_PLL1CTRL0_POWER,
&clkctrl_regs->hw_clkctrl_pll1ctrl0_set);
+#if defined(CONFIG_MX23)
writel(HW_DIGCTL_CTRL_USB0_CLKGATE, &digctl_ctrl->reg_clr);
What is that large space before '&digctl_regs->...' ?
My fault. I can fix it.
+#elif defined(CONFIG_MX28)
writel(HW_DIGCTL_CTRL_USB0_CLKGATE | HW_DIGCTL_CTRL_USB1_CLKGATE, &digctl_ctrl->reg_clr);
+#endif
I'm sure these can be wrapped in much more elegant way, yes?
I wanted to keep the changes at minimum; so seems the right route. What you'd like me to do? Use a temporary variable?
Either that or wrap it all in struct ehci_mxs and do these ungatings etc on a per-port basis.
I've prepared the v3 of the patch; I will give it a runtime test tomorrow and send.

This enabled USB support for the mx23evk board.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br --- Changes in v2: None
include/configs/mx23evk.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h index c44a8b8..8db6283 100644 --- a/include/configs/mx23evk.h +++ b/include/configs/mx23evk.h @@ -60,6 +60,7 @@ #define CONFIG_CMD_FAT #define CONFIG_CMD_GPIO #define CONFIG_CMD_MMC +#define CONFIG_CMD_USB #define CONFIG_CMD_BOOTZ
/* Memory configurations */ @@ -125,6 +126,15 @@ #define CONFIG_MXS_MMC #endif
+/* USB */ +#ifdef CONFIG_CMD_USB +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_MXS +#define CONFIG_EHCI_MXS_PORT 0 +#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_STORAGE +#endif + /* Boot Linux */ #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS

This enabled USB support for the mx23_olinuxino board.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br --- Changes in v2: - Add changes for allow use of the USB hub
board/olimex/mx23_olinuxino/mx23_olinuxino.c | 6 ++++++ board/olimex/mx23_olinuxino/spl_boot.c | 4 ++++ include/configs/mx23_olinuxino.h | 10 ++++++++++ 3 files changed, 20 insertions(+)
diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c index 2501417..9ed7718 100644 --- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c +++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c @@ -23,6 +23,7 @@ */
#include <common.h> +#include <asm/gpio.h> #include <asm/io.h> #include <asm/arch/iomux-mx23.h> #include <asm/arch/imx-regs.h> @@ -45,6 +46,11 @@ int board_early_init_f(void) /* SSP0 clock at 96MHz */ mxs_set_sspclk(MXC_SSPCLK0, 96000, 0);
+#ifdef CONFIG_CMD_USB + /* Enable LAN9512 */ + gpio_direction_output(MX23_PAD_GPMI_ALE__GPIO_0_17, 1); +#endif + return 0; }
diff --git a/board/olimex/mx23_olinuxino/spl_boot.c b/board/olimex/mx23_olinuxino/spl_boot.c index 3bbf5ad..a96c293 100644 --- a/board/olimex/mx23_olinuxino/spl_boot.c +++ b/board/olimex/mx23_olinuxino/spl_boot.c @@ -95,6 +95,10 @@ const iomux_cfg_t iomux_setup[] = { MX23_PAD_SSP1_DATA2__SSP1_DATA2 | MUX_CONFIG_SSP, MX23_PAD_SSP1_DATA3__SSP1_DATA3 | MUX_CONFIG_SSP, MX23_PAD_SSP1_SCK__SSP1_SCK | MUX_CONFIG_SSP, + + /* Ethernet */ + MX23_PAD_GPMI_ALE__GPIO_0_17 | + (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL), };
void board_init_ll(void) diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h index d019944..e081c49 100644 --- a/include/configs/mx23_olinuxino.h +++ b/include/configs/mx23_olinuxino.h @@ -60,6 +60,7 @@ #define CONFIG_CMD_GPIO #define CONFIG_CMD_LED #define CONFIG_CMD_MMC +#define CONFIG_CMD_USB
/* * Memory configurations @@ -140,6 +141,15 @@ */ #define CONFIG_APBH_DMA
+/* USB */ +#ifdef CONFIG_CMD_USB +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_MXS +#define CONFIG_EHCI_MXS_PORT 0 +#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_STORAGE +#endif + /* * Boot Linux */

This adds support to the LAN9512 chip included in the board and extend the environment to easy netboot use.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br --- Changes in v2: - Remove extra newline
include/configs/mx23_olinuxino.h | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-)
diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h index e081c49..dfba0fc 100644 --- a/include/configs/mx23_olinuxino.h +++ b/include/configs/mx23_olinuxino.h @@ -55,11 +55,13 @@ #define CONFIG_DOS_PARTITION
#define CONFIG_CMD_CACHE +#define CONFIG_CMD_DHCP #define CONFIG_CMD_EXT2 #define CONFIG_CMD_FAT #define CONFIG_CMD_GPIO #define CONFIG_CMD_LED #define CONFIG_CMD_MMC +#define CONFIG_CMD_NET #define CONFIG_CMD_USB
/* @@ -150,6 +152,12 @@ #define CONFIG_USB_STORAGE #endif
+/* Ethernet */ +#ifdef CONFIG_CMD_NET +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_SMSC95XX +#endif + /* * Boot Linux */ @@ -191,6 +199,7 @@ "fdt_file=imx23-olinuxino.dtb\0" \ "fdt_addr=0x41000000\0" \ "boot_fdt=try\0" \ + "ip_dyn=yes\0" \ "mmcdev=0\0" \ "mmcpart=2\0" \ "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \ @@ -216,6 +225,31 @@ "fi; " \ "else " \ "bootm; " \ + "fi;\0" \ + "netargs=setenv bootargs console=${console_mainline},${baudrate} " \ + "root=/dev/nfs " \ + "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ + "netboot=echo Booting from net ...; " \ + "usb start; " \ + "run netargs; " \ + "if test ${ip_dyn} = yes; then " \ + "setenv get_cmd dhcp; " \ + "else " \ + "setenv get_cmd tftp; " \ + "fi; " \ + "${get_cmd} ${uimage}; " \ + "if test ${boot_fdt} = yes; then " \ + "if ${get_cmd} ${fdt_addr} ${fdt_file}; 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"
#define CONFIG_BOOTCOMMAND \ @@ -225,10 +259,9 @@ "else " \ "if run loaduimage; then " \ "run mmcboot; " \ - "else " \ - "echo ERR: Fail to boot from MMC; " \ + "else run netboot; " \ "fi; " \ "fi; " \ - "else exit; fi" + "else run netboot; fi"
#endif /* __MX23_OLINUXINO_CONFIG_H__ */

Dear Otavio Salvador,
This adds support to the LAN9512 chip included in the board and extend the environment to easy netboot use.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
You completely ignored previous discussion to make this ethernet thingie part of the previous patch.
Best regards, Marek Vasut

On Wed, Feb 13, 2013 at 7:19 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
This adds support to the LAN9512 chip included in the board and extend the environment to easy netboot use.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
You completely ignored previous discussion to make this ethernet thingie part of the previous patch.
I made the HUB part of the previous patch; I don't agree in moving ethernet to there.

Dear Otavio Salvador,
On Wed, Feb 13, 2013 at 7:19 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
This adds support to the LAN9512 chip included in the board and extend the environment to easy netboot use.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
You completely ignored previous discussion to make this ethernet thingie part of the previous patch.
I made the HUB part of the previous patch; I don't agree in moving ethernet to there.
The ethernet is integral part of the hub chip. This approach you take here breaks bisectability.
Best regards, Marek Vasut

On Wed, Feb 13, 2013 at 7:36 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
On Wed, Feb 13, 2013 at 7:19 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
This adds support to the LAN9512 chip included in the board and extend the environment to easy netboot use.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
You completely ignored previous discussion to make this ethernet thingie part of the previous patch.
I made the HUB part of the previous patch; I don't agree in moving ethernet to there.
The ethernet is integral part of the hub chip. This approach you take here breaks bisectability.
It does not; in case you do bisect you'll be able to build and run both revisions; it'll be a matter of one more 'bad' command call. I prefer to keep it split as it is much easier for someone reading the history to stop what has been done.

Dear Otavio Salvador,
On Wed, Feb 13, 2013 at 7:36 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
On Wed, Feb 13, 2013 at 7:19 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
This adds support to the LAN9512 chip included in the board and extend the environment to easy netboot use.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
You completely ignored previous discussion to make this ethernet thingie part of the previous patch.
I made the HUB part of the previous patch; I don't agree in moving ethernet to there.
The ethernet is integral part of the hub chip. This approach you take here breaks bisectability.
It does not; in case you do bisect you'll be able to build and run both revisions; it'll be a matter of one more 'bad' command call. I prefer to keep it split as it is much easier for someone reading the history to stop what has been done.
Yes, you're adding only part of the support in one patch and the other part in another patch. It makes no sense to me.
Best regards, Marek Vasut

On Thu, Feb 14, 2013 at 2:44 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
On Wed, Feb 13, 2013 at 7:36 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
On Wed, Feb 13, 2013 at 7:19 PM, Marek Vasut marex@denx.de wrote:
Dear Otavio Salvador,
This adds support to the LAN9512 chip included in the board and extend the environment to easy netboot use.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br
You completely ignored previous discussion to make this ethernet thingie part of the previous patch.
I made the HUB part of the previous patch; I don't agree in moving ethernet to there.
The ethernet is integral part of the hub chip. This approach you take here breaks bisectability.
It does not; in case you do bisect you'll be able to build and run both revisions; it'll be a matter of one more 'bad' command call. I prefer to keep it split as it is much easier for someone reading the history to stop what has been done.
Yes, you're adding only part of the support in one patch and the other part in another patch. It makes no sense to me.
I think the environment changes are part of the ethernet support; do you wish me to merge it all together? I'd prefer to leave it as is.
participants (3)
-
Fabio Estevam
-
Marek Vasut
-
Otavio Salvador