In this patchset, a new i.MX35 board is added implementing
Subsystems (5)
cover In this patchset, a new i.MX35 board is added implementing
the internal boot mode and using the general SPL Framework.
For this reason, this patchset depends on:
Tom Rini's SPL generic framework:
http://lists.denx.de/pipermail/u-boot/2012-August/132813.html
To fix that relocation should not happen in SPL, the following patch is also required:
http://patchwork.ozlabs.org/patch/181166/
The woodburn board boots from SD Card. However, the presented way introducing SPL is general, and can applied to other devices.
Stefano Babic (7):
ARM: Fix start.S when used with SPL in arm1136
NAND: added NAND type to nand_ids
MX35: add LOW_LEVEL_SRAM_STACK to use SPL_FRAMEWORK
MX35: Add soc_boot_mode and soc_boot_device to MX35
SPL: Added MLO for mx35 SOC to SPL Makefile
ARM: Add MLO target to arm1136
MX35: add support for woodburn board
MAINTAINERS | 1 + arch/arm/cpu/arm1136/config.mk | 3 + arch/arm/cpu/arm1136/mx35/generic.c | 80 ++++++ arch/arm/cpu/arm1136/start.S | 31 ++- arch/arm/cpu/arm1136/u-boot-spl.lds | 62 +++++ arch/arm/include/asm/arch-mx35/imx-regs.h | 2 + arch/arm/include/asm/arch-mx35/mmc_host_def.h | 31 +++ arch/arm/include/asm/arch-mx35/spl.h | 38 +++ arch/arm/include/asm/arch-mx35/sys_proto.h | 2 + board/woodburn/Makefile | 43 ++++ board/woodburn/imximage.cfg | 4 + board/woodburn/lowlevel_init.S | 93 +++++++ board/woodburn/mx35_sdram.c | 137 +++++++++++ board/woodburn/woodburn.c | 240 ++++++++++++++++++ boards.cfg | 2 + drivers/mtd/nand/nand_ids.c | 2 + include/configs/woodburn.h | 33 +++ include/configs/woodburn_common.h | 322 +++++++++++++++++++++++++ include/configs/woodburn_sd.h | 65 +++++ spl/Makefile | 6 + 20 files changed, 1186 insertions(+), 11 deletions(-) create mode 100644 arch/arm/cpu/arm1136/u-boot-spl.lds create mode 100644 arch/arm/include/asm/arch-mx35/mmc_host_def.h create mode 100644 arch/arm/include/asm/arch-mx35/spl.h create mode 100644 board/woodburn/Makefile create mode 100644 board/woodburn/imximage.cfg create mode 100644 board/woodburn/lowlevel_init.S create mode 100644 board/woodburn/mx35_sdram.c create mode 100644 board/woodburn/woodburn.c create mode 100644 include/configs/woodburn.h create mode 100644 include/configs/woodburn_common.h create mode 100644 include/configs/woodburn_sd.h
Signature · 1 line
1.7.9.5
PATCH 1/7 ARM: Fix start.S when used with SPL in arm1136
This patch modifies start.S for the arm1136 to make it conform to start.S in armv7 architecture, to make it usable if the SPL framework is used.
--- arch/arm/cpu/arm1136/start.S | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-)
arch/arm/cpu/arm1136/start.S +20 -11
@@ -100,6 +100,10 @@ _TEXT_BASE: _bss_start_ofs: .word __bss_start - _start +.global _image_copy_end_ofs +_image_copy_end_ofs: + .word __image_copy_end - _start + .globl _bss_end_ofs _bss_end_ofs: .word __bss_end__ - _start
@@ -193,7 +197,7 @@ stack_setup: moveq r9, #0 /* no relocation. relocation offset(r9) = 0 */ beq clear_bss /* skip relocation */ mov r1, r6 /* r1 <- scratch for copy_loop */ - ldr r3, _bss_start_ofs + ldr r3, _image_copy_end_ofs add r2, r0, r3 /* r2 <- source end address */ copy_loop:
@@ -241,15 +245,28 @@ fixnext: add r2, r2, #8 /* each rel.dyn entry is 8 bytes */ cmp r2, r3 blo fixloop + b clear_bss + +_rel_dyn_start_ofs: + .word __rel_dyn_start - _start +_rel_dyn_end_ofs: + .word __rel_dyn_end - _start +_dynsym_start_ofs: + .word __dynsym_start - _start #endif clear_bss: -#ifndef CONFIG_SPL_BUILD +#ifdef CONFIG_SPL_BUILD + /* No relocation for SPL */ + ldr r0, =__bss_start + ldr r1, =__bss_end__ +#else ldr r0, _bss_start_ofs ldr r1, _bss_end_ofs mov r4, r6 /* reloc addr */ add r0, r0, r4 add r1, r1, r4 +#endif mov r2, #0x00000000 /* clear */ clbss_l:cmp r0, r1 /* clear loop... */
@@ -258,7 +275,6 @@ clbss_l:cmp r0, r1 /* clear loop... */ add r0, r0, #4 b clbss_l clbss_e: -#endif /* #ifndef CONFIG_SPL_BUILD */ /* * We are done. Do not return, instead branch to second part of board
@@ -273,7 +289,7 @@ _nand_boot_ofs: #else jump_2_ram: ldr r0, _board_init_r_ofs - ldr r1, _TEXT_BASE + adr r1, _start add lr, r0, r1 add lr, lr, r9 /* setup parameters for board_init_r */
@@ -286,13 +302,6 @@ _board_init_r_ofs: .word board_init_r - _start #endif -_rel_dyn_start_ofs: - .word __rel_dyn_start - _start -_rel_dyn_end_ofs: - .word __rel_dyn_end - _start -_dynsym_start_ofs: - .word __dynsym_start - _start - /* ************************************************************************* *
Signature · 1 line
1.7.9.5
PATCH 2/7 NAND: added NAND type to nand_ids
In reply to Stefano Babic--- drivers/mtd/nand/nand_ids.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/mtd/nand/nand_ids.c +2 -0
@@ -131,6 +131,8 @@ const struct nand_flash_dev nand_flash_ids[] = {/* 128 Gigabit */ {"NAND 16GiB 1,8V 8-bit", 0x1A, 0, 16384, 0, LP_OPTIONS}, {"NAND 16GiB 3,3V 8-bit", 0x3A, 0, 16384, 0, LP_OPTIONS}, + {"NAND 16GiB 3,3V 8-bit", 0x48, 4096, 16384, 0x100000, + LP_OPTIONS}, {"NAND 16GiB 1,8V 16-bit", 0x2A, 0, 16384, 0, LP_OPTIONS16}, {"NAND 16GiB 3,3V 16-bit", 0x4A, 0, 16384, 0, LP_OPTIONS16},
Signature · 1 line
1.7.9.5
PATCH 2/7 NAND: added NAND type to nand_ids
Quoted 11 lines · Stefano Babic
Signed-off-by Stefano Babic <[email protected]>--- drivers/mtd/nand/nand_ids.c | 2 ++ 1 file changed, 2 insertions(+)drivers/mtd/nand/nand_ids.c +0
-0
drivers/mtd/nand/nand_ids.c const struct nand_flash_dev nand_flash_ids[] = { · line 138
Quoted 8 lines
drivers/mtd/nand/nand_ids.c +2
-0@@ -131,6 +131,8 @@ const struct nand_flash_dev nand_flash_ids[] = {/* 128 Gigabit */ {"NAND 16GiB 1,8V 8-bit", 0x1A, 0, 16384, 0, LP_OPTIONS}, {"NAND 16GiB 3,3V 8-bit", 0x3A, 0, 16384, 0, LP_OPTIONS}, + {"NAND 16GiB 3,3V 8-bit", 0x48, 4096, 16384, 0x100000, + LP_OPTIONS}, {"NAND 16GiB 1,8V 16-bit", 0x2A, 0, 16384, 0, LP_OPTIONS16}, {"NAND 16GiB 3,3V 16-bit", 0x4A, 0, 16384, 0, LP_OPTIONS16},
Why does this NAND chip need things specified that are zeroes for other chips?
-Scott
PATCH 2/7 NAND: added NAND type to nand_ids
Quoted 3 lines · Scott Wood
Quoted 2 lines · Stefano Babic
Signed-off-by Stefano Babic <[email protected]>---
Hi Scott,
Quoted 12 lines
Quoted 12 lines
drivers/mtd/nand/nand_ids.c | 2 ++ 1 file changed, 2 insertions(+)drivers/mtd/nand/nand_ids.c +1
-0@@ -131,6 +131,8 @@ const struct nand_flash_dev nand_flash_ids[] = {/* 128 Gigabit */ {"NAND 16GiB 1,8V 8-bit", 0x1A, 0, 16384, 0, LP_OPTIONS}, {"NAND 16GiB 3,3V 8-bit", 0x3A, 0, 16384, 0, LP_OPTIONS}, + {"NAND 16GiB 3,3V 8-bit", 0x48, 4096, 16384, 0x100000,
Quoted 8 lines
drivers/mtd/nand/nand_ids.c const struct nand_flash_dev nand_flash_ids[] = { · line 138
Quoted 5 lines
drivers/mtd/nand/nand_ids.c +1
-0+ LP_OPTIONS}, {"NAND 16GiB 1,8V 16-bit", 0x2A, 0, 16384, 0, LP_OPTIONS16}, {"NAND 16GiB 3,3V 16-bit", 0x4A, 0, 16384, 0, LP_OPTIONS16},Why does this NAND chip need things specified that are zeroes for other chips?
At least on this board with MX35, the chip cannot be recognized. Manufacturer ID and device ID are read flawlessly, but then u-boot fails to get the correct geometry. Setting explicitely the values, I can then read / write into the NAND without any problem. It can be more a problem related to the specific MXC NAND driver (mxc_nand.c).
Regards,
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 2/7 NAND: added NAND type to nand_ids
Quoted 28 lines · Stefano Babic
Quoted 3 lines · Scott Wood
Quoted 2 lines · Stefano Babic
Signed-off-by Stefano Babic <[email protected]>---
Hi Scott,
Quoted 12 lines
Quoted 12 lines
drivers/mtd/nand/nand_ids.c | 2 ++ 1 file changed, 2 insertions(+)drivers/mtd/nand/nand_ids.c +1
-0@@ -131,6 +131,8 @@ const struct nand_flash_dev nand_flash_ids[] = {/* 128 Gigabit */ {"NAND 16GiB 1,8V 8-bit", 0x1A, 0, 16384, 0, LP_OPTIONS}, {"NAND 16GiB 3,3V 8-bit", 0x3A, 0, 16384, 0, LP_OPTIONS}, + {"NAND 16GiB 3,3V 8-bit", 0x48, 4096, 16384, 0x100000,Quoted 8 lines
drivers/mtd/nand/nand_ids.c const struct nand_flash_dev nand_flash_ids[] = { · line 138
Quoted 5 lines
drivers/mtd/nand/nand_ids.c +1
-0+ LP_OPTIONS}, {"NAND 16GiB 1,8V 16-bit", 0x2A, 0, 16384, 0, LP_OPTIONS16}, {"NAND 16GiB 3,3V 16-bit", 0x4A, 0, 16384, 0, LP_OPTIONS16},Why does this NAND chip need things specified that are zeroes for other chips?
Quoted 5 lines
At least on this board with MX35, the chip cannot be recognized. Manufacturer ID and device ID are read flawlessly, but then u-boot fails to get the correct geometry. Setting explicitely the values, I can then read / write into the NAND without any problem. It can be more a problem related to the specific MXC NAND driver (
mxc_nand.c).
It seems to me that the values returned by this flash cannot be interpreted in nand_get_flash_type().
The values returned from a READ-ID command with address 0x00 are:
0x2C 0x48 0x04 0x4A 0xA5,
I can really get these values from the flash, so the MXC controller gets the correct data.
However, the code in nand_base.c (lines from 2718, so not-Samsung case) parses the answer setting the NAND as a 16-bit device, but this is really a 8bit device. I do not know the meaning of the answer, it is not described in the datasheet.
Cheers,
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 2/7 NAND: added NAND type to nand_ids
Quoted 42 lines · Stefano Babic
Quoted 28 lines · Stefano Babic
Quoted 3 lines · Scott Wood
Quoted 2 lines · Stefano Babic
Signed-off-by Stefano Babic <[email protected]>---
Hi Scott,
Quoted 12 lines
Quoted 12 lines
drivers/mtd/nand/nand_ids.c | 2 ++ 1 file changed, 2 insertions(+)drivers/mtd/nand/nand_ids.c +1
-0@@ -131,6 +131,8 @@ const struct nand_flash_dev nand_flash_ids[] = {/* 128 Gigabit */ {"NAND 16GiB 1,8V 8-bit", 0x1A, 0, 16384, 0, LP_OPTIONS}, {"NAND 16GiB 3,3V 8-bit", 0x3A, 0, 16384, 0, LP_OPTIONS}, + {"NAND 16GiB 3,3V 8-bit", 0x48, 4096, 16384, 0x100000,Quoted 8 lines
drivers/mtd/nand/nand_ids.c const struct nand_flash_dev nand_flash_ids[] = { · line 138
Quoted 5 lines
drivers/mtd/nand/nand_ids.c +1
-0+ LP_OPTIONS}, {"NAND 16GiB 1,8V 16-bit", 0x2A, 0, 16384, 0, LP_OPTIONS16}, {"NAND 16GiB 3,3V 16-bit", 0x4A, 0, 16384, 0, LP_OPTIONS16},Why does this NAND chip need things specified that are zeroes for other chips?
Quoted 5 lines
At least on this board with MX35, the chip cannot be recognized. Manufacturer ID and device ID are read flawlessly, but then u-boot fails to get the correct geometry. Setting explicitely the values, I can then read / write into the NAND without any problem. It can be more a problem related to the specific MXC NAND driver (
mxc_nand.c).It seems to me that the values returned by this flash cannot be interpreted in
nand_get_flash_type().The values returned from a READ-ID command with address
0x00are:0x2C 0x48 0x04 0x4A 0xA5,
Quoted 7 lines
I can really get these values from the flash, so the MXC controller gets the correct data.
However, the code in
nand_base.c(lines from 2718, so not-Samsung case) parses the answer setting the NAND as a 16-bit device, but this is really a 8bit device. I do not know the meaning of the answer, it is not described in the datasheet.
Does the datasheet say anything about what the ID data is supposed to look like and how to interpret it? I tried to download it and Micron shoved an NDA in my face.
What kind of chip is this? Is the datasheet publicly available?
These threads seem relevant:
http://patchwork.ozlabs.org/patch/60042/
http://old.nabble.com/-U-Boot--Add-new-NAND-flash-td29858370.html
Does the chip support ONFI?
-Scott
PATCH 2/7 NAND: added NAND type to nand_ids
On 07/09/2012 20:56, Scott Wood wrote:
Hi Scott,
Quoted 38 lines
Quoted 38 lines
Quoted 22 lines
Quoted 13 lines
Quoted 13 lines
drivers/mtd/nand/nand_ids.c | 2 ++ 1 file changed, 2 insertions(+)drivers/mtd/nand/nand_ids.c +1
-0@@ -131,6 +131,8 @@ const struct nand_flash_dev nand_flash_ids[] = {/* 128 Gigabit */ {"NAND 16GiB 1,8V 8-bit", 0x1A, 0, 16384, 0, LP_OPTIONS}, {"NAND 16GiB 3,3V 8-bit", 0x3A, 0, 16384, 0, LP_OPTIONS}, + {"NAND 16GiB 3,3V 8-bit", 0x48, 4096, 16384, 0x100000,Quoted 8 lines
drivers/mtd/nand/nand_ids.c const struct nand_flash_dev nand_flash_ids[] = { · line 138
Quoted 5 lines
drivers/mtd/nand/nand_ids.c +1
-0+ LP_OPTIONS}, {"NAND 16GiB 1,8V 16-bit", 0x2A, 0, 16384, 0, LP_OPTIONS16}, {"NAND 16GiB 3,3V 16-bit", 0x4A, 0, 16384, 0, LP_OPTIONS16},Why does this NAND chip need things specified that are zeroes for other chips?
Quoted 5 lines
At least on this board with MX35, the chip cannot be recognized. Manufacturer ID and device ID are read flawlessly, but then u-boot fails to get the correct geometry. Setting explicitely the values, I can then read / write into the NAND without any problem. It can be more a problem related to the specific MXC NAND driver (
mxc_nand.c).It seems to me that the values returned by this flash cannot be interpreted in
nand_get_flash_type().The values returned from a READ-ID command with address
0x00are:0x2C 0x48 0x04 0x4A 0xA5,I can really get these values from the flash, so the MXC controller gets the correct data.
Quoted 8 lines
Quoted 4 lines
However, the code in
nand_base.c(lines from 2718, so not-Samsung case) parses the answer setting the NAND as a 16-bit device, but this is really a 8bit device. I do not know the meaning of the answer, it is not described in the datasheet.Does the datasheet say anything about what the ID data is supposed to look like and how to interpret it? I tried to download it and Micron shoved an NDA in my face.
I find no description in the datasheet.
Quoted 6 lines
What kind of chip is this? Is the datasheet publicly available?
These threads seem relevant:
http://patchwork.ozlabs.org/patch/60042/
http://old.nabble.com/-U-Boot--Add-new-NAND-flash-td29858370.html
It is the same case, as I can see, with the same chip.
Quoted 2 lines
Does the chip support ONFI?
The chip supports ONFI, but it seems the i.MX driver does not. Quite as described in http://patchwork.ozlabs.org/patch/60042/. READ-ID is always sent with address 0, I do not know if we can convince the driver to send the address.
Regards,
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 2/7 NAND: added NAND type to nand_ids
Quoted 10 lines · Stefano Babic
Quoted 5 lines · Scott Wood
What kind of chip is this? Is the datasheet publicly available?
These threads seem relevant:
http://patchwork.ozlabs.org/patch/60042/
http://old.nabble.com/-U-Boot--Add-new-NAND-flash-td29858370.htmlIt is the same case, as I can see, with the same chip.
Quoted 1 line
Quoted 6 lines
Quoted 1 line
Does the chip support ONFI?
The chip supports ONFI, but it seems the i.MX driver does not. Quite as described in http://patchwork.ozlabs.org/patch/60042/. READ-ID is always sent with address 0, I do not know if we can convince the driver to send the address.
How did Linux end up resolving this? I think it'd be better to have the Micron decoding logic from that patch, than to introduce a special addition to the ID table for this one chip, which might not be correct for all chips with that ID byte.
Or, we could treat it as information to be supplied by platform code (or the device tree).
-Scott
PATCH 2/7 NAND: added NAND type to nand_ids
Quoted 11 lines · Scott Wood
Quoted 10 lines · Stefano Babic
Quoted 5 lines · Scott Wood
What kind of chip is this? Is the datasheet publicly available?
These threads seem relevant:
http://patchwork.ozlabs.org/patch/60042/
http://old.nabble.com/-U-Boot--Add-new-NAND-flash-td29858370.htmlIt is the same case, as I can see, with the same chip.
Quoted 1 line
Hi Scott,
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Does the chip support ONFI?
The chip supports ONFI, but it seems the i.MX driver does not. Quite as described in http://patchwork.ozlabs.org/patch/60042/. READ-ID is always sent with address 0, I do not know if we can convince the driver to send the address.
How did Linux end up resolving this?
I could take a closer look. The issue is not solved on linux, too. In fact, the MXC driver in current kernel supports ONFI, but it should work for newer version of the controller - I think with MX5.
On MX35, the NFC controller is V1.1, exactly as on MX25, and I have the same issue reported by Matthias that you pointed out in the past
threads: ONFI command does not work.
Quoted 4 lines
I think it'd be better to have the
Micron decoding logic from that patch, than to introduce a special addition to the ID table for this one chip, which might not be correct for all chips with that ID byte.
Agree. I am trying to contact Micron to get some information about it. I have tried to decode the bytes on basis of other Micron's NAND, but then bit 6 in byte 4 says that the NAND is a 16 bit device, and that is wrong. Exactly the same wrong value that Matthias found some times ago.
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 2/7 NAND: added NAND type to nand_ids
In reply to Stefano BabicHi Stefano,
Le Mon, 10 Sep 2012 14:09:21 +0200,
Stefano Babic <[email protected]> a ?crit :
Quoted 4 lines
The chip supports ONFI, but it seems the i.MX driver does not. Quite as described in http://patchwork.ozlabs.org/patch/60042/. READ-ID is always sent with address 0, I do not know if we can convince the driver to send the address.
to add ONFI support to i.MX's driver, you can check this patch (in barebox, a similar patch for Linux is cooking, actually tested on i.MX53 and i.MX25) :
http://git.pengutronix.de/?p=barebox.git;a=commit;h=632c45795065e6a7471ab82be38e808eb6204341
Eric
PATCH 2/7 NAND: added NAND type to nand_ids
Quoted 9 lines · Eric B?nard
Hi Stefano,
Le Mon, 10 Sep 2012 14:09:21 +0200,
Stefano Babic <[email protected]> a ?crit :Quoted 4 lines
The chip supports ONFI, but it seems the i.MX driver does not. Quite as described in http://patchwork.ozlabs.org/patch/60042/. READ-ID is always sent with address 0, I do not know if we can convince the driver to send the address.
Quoted 4 lines
to add ONFI support to i.MX's driver, you can check this patch (in barebox, a similar patch for Linux is cooking, actually tested on i.MX53 and i.MX25) :
http://git.pengutronix.de/?p=barebox.git;a=commit;h=632c45795065e6a7471ab82be38e808eb6204341
Thanks Eric, I look at it
Regards,
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 3/7 MX35: add LOW_LEVEL_SRAM_STACK to use SPL_FRAMEWORK
In reply to Stefano Babic--- arch/arm/include/asm/arch-mx35/imx-regs.h | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/include/asm/arch-mx35/imx-regs.h +2 -0
@@ -31,6 +31,8 @@#define IRAM_BASE_ADDR 0x10000000/* internal ram */ #define IRAM_SIZE 0x00020000/* 128 KB */ +#define LOW_LEVEL_SRAM_STACK 0x1001E000 +/* * AIPS 1 */
Signature · 1 line
1.7.9.5
PATCH 4/7 MX35: Add soc_boot_mode and soc_boot_device to MX35
In reply to Stefano BabicThe functions are required to use the generic
SPL Framework.
--- arch/arm/cpu/arm1136/mx35/generic.c | 80 +++++++++++++++++++++++++ arch/arm/cpu/arm1136/u-boot-spl.lds | 62 +++++++++++++++++++ arch/arm/include/asm/arch-mx35/mmc_host_def.h | 31 ++++++++++ arch/arm/include/asm/arch-mx35/spl.h | 38 ++++++++++++ 4 files changed, 211 insertions(+) create mode 100644 arch/arm/cpu/arm1136/u-boot-spl.lds create mode 100644 arch/arm/include/asm/arch-mx35/mmc_host_def.h create mode 100644 arch/arm/include/asm/arch-mx35/spl.h
arch/arm/cpu/arm1136/mx35/generic.c +80 -0
@@ -31,6 +31,7 @@#include <asm/arch/clock.h> #include <asm/arch/sys_proto.h> #include <netdev.h> +#include <spl.h> #define CLK_CODE (arm, ahb, sel) (((arm) << 16) + ((ahb) << 8) + (sel))#define CLK_CODE_ARM (c) (((c) >> 16) & 0xFF)
@@ -488,3 +489,82 @@ void reset_cpu(ulong addr)struct wdog_regs *wdog = (struct wdog_regs *)WDOG_BASE_ADDR ;writew (4 , &wdog->wcr); } + +#define RCSR_MEM_CTL_WEIM 0 +#define RCSR_MEM_CTL_NAND 1 +#define RCSR_MEM_CTL_SD 2 +#define RCSR_MEM_TYPE_NOR 0 +#define RCSR_MEM_TYPE_ONENAND 2 +#define RCSR_MEM_TYPE_SD 0 +#define RCSR_MEM_TYPE_I2C 2 +#define RCSR_MEM_TYPE_SPI 3 + +u32 spl_boot_device (void ) +{ +puts ("spl_boot_device\n" ); +struct ccm_regs *ccm = + (struct ccm_regs *)IMX_CCM_BASE ; + +#if 1 +return BOOT_DEVICE_MMC1 ; +#endif + +u32 rcsr =readl (&ccm->rcsr); +u32 mem_type, mem_ctl; + +/* In external mode, no boot device is returned */ +if ((rcsr >>10 ) &0x03 ) +return BOOT_DEVICE_NONE ; + + mem_ctl = (rcsr >>25 ) &0x03 ; + mem_type = (rcsr >>23 ) &0x03 ; + +switch (mem_ctl) { +case RCSR_MEM_CTL_WEIM : +switch (mem_type) { +case RCSR_MEM_TYPE_NOR : +return BOOT_DEVICE_NOR ; +case RCSR_MEM_TYPE_ONENAND : +return BOOT_DEVICE_ONE_NAND ; +default : +return BOOT_DEVICE_NONE ; + } +case RCSR_MEM_CTL_NAND : +return BOOT_DEVICE_NAND ; +case RCSR_MEM_CTL_SD : +switch (mem_type) { +case RCSR_MEM_TYPE_SD : +return BOOT_DEVICE_MMC1 ; +case RCSR_MEM_TYPE_I2C : +return BOOT_DEVICE_I2C ; +case RCSR_MEM_TYPE_SPI : +return BOOT_DEVICE_SPI ; +default : +return BOOT_DEVICE_NONE ; + } + } + +return BOOT_DEVICE_NONE ; +} + +#ifdef CONFIG_SPL_BUILD +u32 spl_boot_mode (void ) +{ +puts ("spl_boot_mode\n" ); +switch (spl_boot_device ()) { +case BOOT_DEVICE_MMC1 : +#ifdef CONFIG_SPL_FAT_SUPPORT +return MMCSD_MODE_FAT ; +#else +return MMCSD_MODE_RAW ; +#endif +break ; +case BOOT_DEVICE_NAND : +return 0 ; +break ; +default : +puts ("spl: ERROR: unsupported device\n" ); +hang (); + } +} +#endif
arch/arm/cpu/arm1136/u-boot-spl.lds new file +62 -0
62 lines not on this page · raw message
arch/arm/include/asm/arch-mx35/mmc_host_def.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* (C) Copyright 2008 +* Texas Instruments, <www.ti.com> +* Syed Mohammed Khasim <[email protected]> +* +* 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's version 2 of +* the License. +* +* 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 +*/ + +#ifndef MMC_HOST_DEF_H +#define MMC_HOST_DEF_H + +/* Driver definitions */ +#define MMCSD_SECTOR_SIZE 512 + +#endif /* MMC_HOST_DEF_H */
arch/arm/include/asm/arch-mx35/spl.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* (C) Copyright 2012 +* Texas Instruments, <www.ti.com> +* +* 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 +*/ +#ifndef _ASM_ARCH_SPL_H_ +#define _ASM_SPL_H_ + +#define BOOT_DEVICE_NONE 0 +#define BOOT_DEVICE_XIP 1 +#define BOOT_DEVICE_XIPWAIT 2 +#define BOOT_DEVICE_NAND 3 +#define BOOT_DEVICE_ONE_NAND 4 +#define BOOT_DEVICE_MMC1 5 +#define BOOT_DEVICE_MMC2 6 +#define BOOT_DEVICE_MMC2_2 7 +#define BOOT_DEVICE_NOR 8 +#define BOOT_DEVICE_I2C 9 +#define BOOT_DEVICE_SPI 10 + +#endif
Signature · 1 line
1.7.9.5
PATCH 4/7 MX35: Add soc_boot_mode and soc_boot_device to MX35
Hi Stefano,
Le Thu, 6 Sep 2012 10:04:57 +0200,
Stefano Babic <[email protected]> a ?crit :
Quoted 8 lines
arch/arm/cpu/arm1136/mx35/generic.c +8
-0+#define RCSR_MEM_CTL_WEIM 0 +#define RCSR_MEM_CTL_NAND 1 +#define RCSR_MEM_CTL_SD 2 +#define RCSR_MEM_TYPE_NOR 0 +#define RCSR_MEM_TYPE_ONENAND 2 +#define RCSR_MEM_TYPE_SD 0 +#define RCSR_MEM_TYPE_I2C 2 +#define RCSR_MEM_TYPE_SPI 3
arch/arm/cpu/arm1136/mx35/generic.c void reset_cpu(ulong addr) · line 510
Quoted 10 lines
arch/arm/cpu/arm1136/mx35/generic.c +10
-0+ +u32 spl_boot_device (void ) +{ +puts ("spl_boot_device\n" ); +struct ccm_regs *ccm = + (struct ccm_regs *)IMX_CCM_BASE ; + +#if 1 +return BOOT_DEVICE_MMC1 ; +#endif
thisseems not clean and seems caused by the fact that the define RCSR_MEM_CTL_SD should be 3 and not 2 so in your tests the function spl_boot_device was not detecting the right boot mode. Also IMHO this define should be named RCSR_MEM_CTL_EXPANSION as in the app note AN3996 at end of page 3 (there is a typo in the reference manual which seems to be a copy'n paste from i.MX25 as it doesn't take in acount the ATA HDD case) :
http://cache.freescale.com/files/dsp/doc/app_note/AN3996.pdf
Quoted 29 lines
arch/arm/cpu/arm1136/mx35/generic.c +29
-0+ +u32 rcsr =readl (&ccm->rcsr); +u32 mem_type, mem_ctl; + +/* In external mode, no boot device is returned */ +if ((rcsr >>10 ) &0x03 ) +return BOOT_DEVICE_NONE ; + + mem_ctl = (rcsr >>25 ) &0x03 ; + mem_type = (rcsr >>23 ) &0x03 ; + +switch (mem_ctl) { +case RCSR_MEM_CTL_WEIM : +switch (mem_type) { +case RCSR_MEM_TYPE_NOR : +return BOOT_DEVICE_NOR ; +case RCSR_MEM_TYPE_ONENAND : +return BOOT_DEVICE_ONE_NAND ; +default : +return BOOT_DEVICE_NONE ; + } +case RCSR_MEM_CTL_NAND : +return BOOT_DEVICE_NAND ; +case RCSR_MEM_CTL_SD : +switch (mem_type) { +case RCSR_MEM_TYPE_SD : +return BOOT_DEVICE_MMC1 ; +case RCSR_MEM_TYPE_I2C : +return BOOT_DEVICE_I2C ;
arch/arm/cpu/arm1136/mx35/generic.c void reset_cpu(ulong addr) · line 549
Quoted 10 lines
arch/arm/cpu/arm1136/mx35/generic.c +10
-0+case RCSR_MEM_TYPE_SPI : +return BOOT_DEVICE_SPI ; +default : +return BOOT_DEVICE_NONE ; + } + } + +return BOOT_DEVICE_NONE ; +} +
Eric
PATCH 4/7 MX35: Add soc_boot_mode and soc_boot_device to MX35
Quoted 23 lines · Eric B?nard
Hi Stefano,
Le Thu, 6 Sep 2012 10:04:57 +0200,
Stefano Babic <[email protected]> a ?crit :Quoted 8 lines
arch/arm/cpu/arm1136/mx35/generic.c +8
-0+#define RCSR_MEM_CTL_WEIM 0 +#define RCSR_MEM_CTL_NAND 1 +#define RCSR_MEM_CTL_SD 2 +#define RCSR_MEM_TYPE_NOR 0 +#define RCSR_MEM_TYPE_ONENAND 2 +#define RCSR_MEM_TYPE_SD 0 +#define RCSR_MEM_TYPE_I2C 2 +#define RCSR_MEM_TYPE_SPI 3arch/arm/cpu/arm1136/mx35/generic.c void reset_cpu(ulong addr) · line 510
Quoted 10 lines
arch/arm/cpu/arm1136/mx35/generic.c +10
-0+ +u32 spl_boot_device (void ) +{ +puts ("spl_boot_device\n" ); +struct ccm_regs *ccm = + (struct ccm_regs *)IMX_CCM_BASE ; + +#if 1 +return BOOT_DEVICE_MMC1 ; +#endif
Quoted 8 lines
thisseems not clean and seems caused by the fact that the define
RCSR_MEM_CTL_SDshould be 3 and not 2 so in your tests the functionspl_boot_devicewas not detecting the right boot mode. Also IMHO this define should be namedRCSR_MEM_CTL_EXPANSIONas in the app note AN3996 at end of page 3 (there is a typo in the reference manual which seems to be a copy'n paste from i.MX25 as it doesn't take in acount the ATA HDD case) :
http://cache.freescale.com/files/dsp/doc/app_note/AN3996.pdf
You're right, thanks ! I will fix in V2
Regards,
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 5/7 SPL: Added MLO for mx35 SOC to SPL Makefile
In reply to Stefano Babic--- spl/Makefile | 6 ++++++ 1 file changed, 6 insertions(+)
spl/Makefile +6 -0
@@ -109,6 +109,12 @@ $(OBJTREE)/MLO: $(obj)u-boot-spl.bin -a $(CONFIG_SPL_TEXT_BASE) -d $< $@ endif +ifneq ($(CONFIG_IMX_CONFIG),) +$(OBJTREE)/MLO: $(obj)u-boot-spl.bin + $(OBJTREE)/tools/mkimage -n $(SRCTREE)/$(CONFIG_IMX_CONFIG) -T imximage \ + -e $(CONFIG_SPL_TEXT_BASE) -d $< $@ +endif + ALL-y += $(obj)u-boot-spl.bin ifdef CONFIG_SAMSUNG
Signature · 1 line
1.7.9.5
PATCH 5/7 SPL: Added MLO for mx35 SOC to SPL Makefile
Quoted 12 lines · Stefano Babic
Signed-off-by Stefano Babic <[email protected]>--- spl/Makefile | 6 ++++++ 1 file changed, 6 insertions(+)spl/Makefile +0
-0@@ -109,6 +109,12 @@ $(OBJTREE)/MLO: $(obj)u-boot-spl.bin -a $(CONFIG_SPL_TEXT_BASE) -d $< $@ endif
spl/Makefile $(OBJTREE)/MLO: $(obj)u-boot-spl.bin · line 120
Quoted 10 lines
spl/Makefile +6
-0+ifneq ($(CONFIG_IMX_CONFIG),) +$(OBJTREE)/MLO: $(obj)u-boot-spl.bin + $(OBJTREE)/tools/mkimage -n $(SRCTREE)/$(CONFIG_IMX_CONFIG) -T imximage \ + -e $(CONFIG_SPL_TEXT_BASE) -d $< $@ +endif + ALL-y += $(obj)u-boot-spl.bin ifdef CONFIG_SAMSUNG
Is that really the name you want? MLO comes from some part or another (I've read it, just can't recall off-hand) of the IT ROM docs saying it will read a file named MLO. Is mx35 in the same boat? Or just looking for a common name? Thanks!
Signature · 1 line
Tom
PATCH 5/7 SPL: Added MLO for mx35 SOC to SPL Makefile
Quoted 22 lines · Tom Rini
Quoted 21 lines · Stefano Babic
Signed-off-by Stefano Babic <[email protected]>--- spl/Makefile | 6 ++++++ 1 file changed, 6 insertions(+)spl/Makefile +6
-0@@ -109,6 +109,12 @@ $(OBJTREE)/MLO: $(obj)u-boot-spl.bin -a $(CONFIG_SPL_TEXT_BASE) -d $< $@ endif +ifneq ($(CONFIG_IMX_CONFIG),) +$(OBJTREE)/MLO: $(obj)u-boot-spl.bin + $(OBJTREE)/tools/mkimage -n $(SRCTREE)/$(CONFIG_IMX_CONFIG) -T imximage \ + -e $(CONFIG_SPL_TEXT_BASE) -d $< $@ +endif + ALL-y += $(obj)u-boot-spl.bin
Quoted 5 lines
spl/Makefile $(OBJTREE)/MLO: $(obj)u-boot-spl.bin · line 120
Quoted 1 line
spl/Makefile +0
-0ifdef CONFIG_SAMSUNGIs that really the name you want? MLO comes from some part or another (I've read it, just can't recall off-hand) of the IT ROM docs saying it will read a file named MLO.
I know...
Quoted 3 lines
Is mx35 in the same boat?
Or just looking
for a common name?
Right. It makes no sense that the binary for Freescale's SOCs has a name, for TI another one, for...we can generates less confusion if we uses the same name.
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 5/7 SPL: Added MLO for mx35 SOC to SPL Makefile
Quoted 31 lines · Stefano Babic
Quoted 22 lines · Tom Rini
Quoted 21 lines · Stefano Babic
Signed-off-by Stefano Babic <[email protected]>--- spl/Makefile | 6 ++++++ 1 file changed, 6 insertions(+)spl/Makefile +6
-0@@ -109,6 +109,12 @@ $(OBJTREE)/MLO: $(obj)u-boot-spl.bin -a $(CONFIG_SPL_TEXT_BASE) -d $< $@ endif +ifneq ($(CONFIG_IMX_CONFIG),) +$(OBJTREE)/MLO: $(obj)u-boot-spl.bin + $(OBJTREE)/tools/mkimage -n $(SRCTREE)/$(CONFIG_IMX_CONFIG) -T imximage \ + -e $(CONFIG_SPL_TEXT_BASE) -d $< $@ +endif + ALL-y += $(obj)u-boot-spl.binQuoted 5 lines
spl/Makefile $(OBJTREE)/MLO: $(obj)u-boot-spl.bin · line 120
Quoted 1 line
spl/Makefile +0
-0ifdef CONFIG_SAMSUNGIs that really the name you want? MLO comes from some part or another (I've read it, just can't recall off-hand) of the IT ROM docs saying it will read a file named MLO.
I know...
Quoted 7 lines
Quoted 3 lines
Is mx35 in the same boat?
Or just looking
for a common name?Right. It makes no sense that the binary for Freescale's SOCs has a name, for TI another one, for...we can generates less confusion if we uses the same name.
Agreed. I guess what I'm asking is, in the TI case the ROM reads FAT and must find 'MLO'. Does mx35 do the same or is the post-build step "dd if=MLO of=/dev/... ..." and the filename doesn't matter? I'm fine with the change now, just looking for the full details. Thanks!
Signature · 1 line
Tom
PATCH 5/7 SPL: Added MLO for mx35 SOC to SPL Makefile
Am 06/09/2012 22:48, schrieb Tom Rini:
Quoted 36 lines · Stefano Babic
Quoted 35 lines · Tom Rini
Quoted 22 lines · Stefano Babic
Quoted 21 lines
Signed-off-by Stefano Babic <[email protected]>--- spl/Makefile | 6 ++++++ 1 file changed, 6 insertions(+)spl/Makefile +6
-0@@ -109,6 +109,12 @@ $(OBJTREE)/MLO: $(obj)u-boot-spl.bin -a $(CONFIG_SPL_TEXT_BASE) -d $< $@ endif +ifneq ($(CONFIG_IMX_CONFIG),) +$(OBJTREE)/MLO: $(obj)u-boot-spl.bin + $(OBJTREE)/tools/mkimage -n $(SRCTREE)/$(CONFIG_IMX_CONFIG) -T imximage \ + -e $(CONFIG_SPL_TEXT_BASE) -d $< $@ +endif + ALL-y += $(obj)u-boot-spl.binQuoted 5 lines
spl/Makefile $(OBJTREE)/MLO: $(obj)u-boot-spl.bin · line 120
Quoted 1 line
spl/Makefile +0
-0ifdef CONFIG_SAMSUNGIs that really the name you want? MLO comes from some part or another (I've read it, just can3't recall off-hand) of the IT ROM docs saying it will read a file named MLO.
I know...
Quoted 3 lines
Is mx35 in the same boat?
Or just looking
for a common name?
Quoted 6 lines
Quoted 3 lines
Right. It makes no sense that the binary for Freescale's SOCs has a name, for TI another one, for...we can generates less confusion if we uses the same name.
Agreed. I guess what I'm asking is, in the TI case the ROM reads FAT and must find 'MLO'. Does mx35 do the same or
No. And not only the MX35, but also the MX5/MX6.
Quoted 2 lines
is the post-build step
"dd if=MLO of=/dev/... ..." and the filename doesn't matter?
Exactly. The ROM does not understand a filesystem, and the SPL must be stored at a fixed address in the SD card. The filename does not matter, and the SPL is not seen as file, but as a raw image.
Quoted 2 lines
I'm fine
with the change now, just looking for the full details. Thanks!
As for Freescale the filename does not matter while for TI does, we can use for both MLO ;-)
Stefano
Signature · 5 lines
===================================================================== 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: office at denx.de =====================================================================
PATCH 5/7 SPL: Added MLO for mx35 SOC to SPL Makefile
Hello,
Le Thu, 06 Sep 2012 23:57:08 +0200,
stefano babic <[email protected]> a ?crit :
Quoted 12 lines
Quoted 2 lines
Agreed. I guess what I'm asking is, in the TI case the ROM reads FAT and must find 'MLO'. Does mx35 do the same or
No. And not only the MX35, but also the MX5/MX6.
Quoted 2 lines
is the post-build step
"dd if=MLO of=/dev/... ..." and the filename doesn't matter?Exactly. The ROM does not understand a filesystem, and the SPL must be stored at a fixed address in the SD card. The filename does not matter, and the SPL is not seen as file, but as a raw image.
Quoted 5 lines
Quoted 2 lines
I'm fine
with the change now, just looking for the full details. Thanks!As for Freescale the filename does not matter while for TI does, we can use for both MLO ;-)
Then in that case I would precisely *not* use the same filename, in order to make it clear that Freescale SPL cannot be used in the same way as the TI SPL. Naming it MLO will certainly confuse users having previous experience with TI stuff: it will lead them to believe that creating a FAT filesystem and putting the MLO file in it will be the necessary steps to get this SPL loaded by the ROM code.
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 5/7 SPL: Added MLO for mx35 SOC to SPL Makefile
Quoted 2 lines · Thomas Petazzoni
Hello,
Hi Thomas,
Quoted 10 lines
Quoted 9 lines
Exactly. The ROM does not understand a filesystem, and the SPL must be stored at a fixed address in the SD card. The filename does not matter, and the SPL is not seen as file, but as a raw image.
Quoted 2 lines
I'm fine
with the change now, just looking for the full details. Thanks!As for Freescale the filename does not matter while for TI does, we can use for both MLO ;-)
Quoted 6 lines
Then in that case I would precisely *not* use the same filename, in order to make it clear that Freescale SPL cannot be used in the same way as the TI SPL. Naming it MLO will certainly confuse users having previous experience with TI stuff: it will lead them to believe that creating a FAT filesystem and putting the MLO file in it will be the necessary steps to get this SPL loaded by the ROM code.
Of couse, setting a common name is not a reason enough for the users to not read the manual ;-). The way TI and Freescale have chosen to boot their SOCs are and remain quite differently.
The reason to have a common name is to avoid to document for each SOC which is the binary result. Maybe a more neutral name as "SPL" instead of "MLO" ? This is the first attempt to set SPL for a not-TI SOC, but hopefully other SOCs will follow, and it is better to set already some simple rules,
In any case, the resulting binary is a different thing as how to put the binary into the target: SPL can be copied as MLO on the SD-Card. Tom, what do you think ?
Best regards,
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 5/7 SPL: Added MLO for mx35 SOC to SPL Makefile
Quoted 33 lines · Stefano Babic
Quoted 2 lines · Thomas Petazzoni
Hello,
Hi Thomas,
Quoted 10 lines
Quoted 9 lines
Exactly. The ROM does not understand a filesystem, and the SPL must be stored at a fixed address in the SD card. The filename does not matter, and the SPL is not seen as file, but as a raw image.
Quoted 2 lines
I'm fine
with the change now, just looking for the full details. Thanks!As for Freescale the filename does not matter while for TI does, we can use for both MLO ;-)
Quoted 6 lines
Then in that case I would precisely *not* use the same filename, in order to make it clear that Freescale SPL cannot be used in the same way as the TI SPL. Naming it MLO will certainly confuse users having previous experience with TI stuff: it will lead them to believe that creating a FAT filesystem and putting the MLO file in it will be the necessary steps to get this SPL loaded by the ROM code.
Of couse, setting a common name is not a reason enough for the users to not read the manual ;-). The way TI and Freescale have chosen to boot their SOCs are and remain quite differently.
The reason to have a common name is to avoid to document for each SOC which is the binary result. Maybe a more neutral name as "SPL" instead of "MLO" ? This is the first attempt to set SPL for a not-TI SOC, but hopefully other SOCs will follow, and it is better to set already some simple rules,
Quoted 3 lines
In any case, the resulting binary is a different thing as how to put the binary into the target: SPL can be copied as MLO on the SD-Card. Tom, what do you think ?
I think Thomas raises a good point. The important thing is that 'make fooboard' produces everything to boot the board (when possible). But at the end of the day, it comes down to the user needs to understand how to boot their board. The TI MLO file can be dd'ed to an SD card and booted too, for example.
Signature · 1 line
Tom
PATCH 6/7 ARM: Add MLO target to arm1136
In reply to Stefano Babic--- arch/arm/cpu/arm1136/config.mk | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/cpu/arm1136/config.mk +3 -0
@@ -31,3 +31,6 @@ PLATFORM_CPPFLAGS += -march=armv5 # ========================================================================= PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) +ifdef CONFIG_SPL_BUILD +ALL-y += $(OBJTREE)/MLO +endif
Signature · 1 line
1.7.9.5
PATCH 7/7 MX35: add support for woodburn board
In reply to Stefano BabicThe woodburn board is based on the MX35 SOC. Support for both external (NOR) and internal (SD Card) boot mode are added. It uses the generic SPL framework to implement the internal boot mode.
The following peripherals are supported:
- Ethernet (FEC)
- SD Card
- NAND (16 Gb)
- NOR Flash
In the internal boot mode, a simple imximage header file is generated to set the address in internal RAM where the SOC must copy the SPL code. The initial setup is then demanded to the SPL itself.
--- MAINTAINERS | 1 + arch/arm/include/asm/arch-mx35/sys_proto.h | 2 + board/woodburn/Makefile | 43 ++++ board/woodburn/imximage.cfg | 4 + board/woodburn/lowlevel_init.S | 93 ++++++++ board/woodburn/mx35_sdram.c | 137 ++++++++++++ board/woodburn/woodburn.c | 240 +++++++++++++++++++++ boards.cfg | 2 + include/configs/woodburn.h | 33 +++ include/configs/woodburn_common.h | 322 ++++++++++++++++++++++++++++ include/configs/woodburn_sd.h | 65 ++++++ 11 files changed, 942 insertions(+) create mode 100644 board/woodburn/Makefile create mode 100644 board/woodburn/imximage.cfg create mode 100644 board/woodburn/lowlevel_init.S create mode 100644 board/woodburn/mx35_sdram.c create mode 100644 board/woodburn/woodburn.c create mode 100644 include/configs/woodburn.h create mode 100644 include/configs/woodburn_common.h create mode 100644 include/configs/woodburn_sd.h
MAINTAINERS +1 -0
@@ -585,6 +585,7 @@ Stefano Babic <[email protected]> trizepsiv xscale/pxa twister omap3 vision2 i.MX51 + woodburn i.MX35 Jason Liu <[email protected]>
arch/arm/include/asm/arch-mx35/sys_proto.h +2 -0
@@ -25,6 +25,8 @@#define _SYS_PROTO_H_u32 get_cpu_rev (void ); +void mx3_setup_sdram_bank (u32 start_address,u32 ddr2_config, +u32 row,u32 col,u32 dsize,u32 refresh);#define is_soc_rev (rev) ((get_cpu_rev() & 0xFF) - rev)void sdelay (unsigned long );
board/woodburn/Makefile new file +43 -0
43 lines not on this page · raw message
board/woodburn/imximage.cfg new file +4 -0
@@ -0,0 +1,4 @@ +BOOT_FROM sd + +# DDR2 init +DATA 4 0xB8001010 0x00000304
board/woodburn/lowlevel_init.S new file +93 -0
93 lines not on this page · raw message
board/woodburn/mx35_sdram.c new file +137 -0
137 lines not on this page · raw message
board/woodburn/woodburn.c new file +240 -0
240 lines not on this page · raw message
boards.cfg +2 -0
@@ -50,6 +50,8 @@ tt01 arm arm1136 - hale imx31_litekit arm arm1136 - logicpd mx31 flea3 arm arm1136 - CarMediaLab mx35 mx35pdk arm arm1136 - freescale mx35 +woodburn arm arm1136 - - mx35 +woodburn_sd arm arm1136 woodburn - mx35 woodburn_sd:IMX_CONFIG=board/woodburn/imximage.cfg apollon arm arm1136 apollon - omap24xx omap2420h4 arm arm1136 - ti omap24xx tnetv107x_evm arm arm1176 tnetv107xevm ti tnetv107x
include/configs/woodburn.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* (C) Copyright 2011, Stefano Babic <[email protected]> +* +* (C) Copyright 2008-2010 Freescale Semiconductor, Inc. +* +* Configuration for the woodburn board. +* +* 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 +*/ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include <asm/arch/imx-regs.h> +#include "woodburn_common.h" + +/* Set TEXT at the beginning of the NOR flash */ +#define CONFIG_SYS_TEXT_BASE 0xA0000000 + +#endif /* __CONFIG_H */
include/configs/woodburn_common.h new file +322 -0
322 lines not on this page · raw message
include/configs/woodburn_sd.h new file +65 -0
65 lines not on this page · raw message
Signature · 1 line
1.7.9.5