Add board support for hawkboard
Subsystems (3)
PATCH v3 3/3 Add board support for hawkboard
The patch adds basic board support for TI's OMAP-L138 based Hawkboard. This board is pretty similar to the da850 EVM. Support for nand and network access is added in this version.
The following bootup procedure is used.
At reset, the Rom Boot Loader(RBL), initialises the ddr and the nand controllers and copies the second stage bootloader(nand_spl) to RAM. The secondary bootloader then copies u-boot from a predefined location in the nand flash to the RAM, and passes control to the u-boot image.
Three config options are supported
* hawkboard_config - Used to create the u-boot.bin. Tftp the u-boot.bin image to the RAM from u-boot, and flash to the nand flash at address 0xe0000.
* hawkboard_nand_config - Used to generate the secondary bootloader(nand_spl) image. This creates an elf file u-boot-spl under nand_spl/. Create an AIS signed image using this file, and flash it to the nand flash at address 0x20000. The ais file should fit in one block.
* hawkboard_uart_config - This is same as the first image, but with the TEXT_BASE as expected by the RBL(0xc1080000). Create the AIS Signed bin, as use the normal UART boot procedure to boot the image.
---
Changes since V2:
* Fix the checkpatch errors.
* Fix the build issue on da850evm due to a missed out change.
MAINTAINERS | 5 + arch/arm/include/asm/arch-davinci/da8xx_common.h | 3 + arch/arm/include/asm/arch-davinci/hardware.h | 5 +- board/davinci/common/Makefile | 2 +- board/davinci/common/davinci_pinmux.c | 105 +++++++++++ board/davinci/common/misc.c | 75 -------- board/davinci/da8xxevm/Makefile | 2 + board/davinci/da8xxevm/hawkboard.c | 69 ++++++++ board/davinci/da8xxevm/hawkboard_nand_spl.c | 164 +++++++++++++++++ boards.cfg | 3 + drivers/mtd/nand/davinci_nand.c | 1 + include/configs/hawkboard.h | 205 ++++++++++++++++++++++ nand_spl/board/davinci/da8xxevm/Makefile | 141 +++++++++++++++ nand_spl/board/davinci/da8xxevm/u-boot.lds | 75 ++++++++ 14 files changed, 778 insertions(+), 77 deletions(-) create mode 100644 board/davinci/common/davinci_pinmux.c create mode 100644 board/davinci/da8xxevm/hawkboard.c create mode 100644 board/davinci/da8xxevm/hawkboard_nand_spl.c create mode 100644 include/configs/hawkboard.h create mode 100644 nand_spl/board/davinci/da8xxevm/Makefile create mode 100644 nand_spl/board/davinci/da8xxevm/u-boot.lds
MAINTAINERS +5 -0
@@ -849,6 +849,11 @@ Alex Z lart SA1100 dnp1110 SA1110 +Syed Mohammed Khasim <[email protected]> +Sughosh Ganu <[email protected]> + + hawkboard ARM926EJS (OMAP-L138) + ------------------------------------------------------------------------- Unknown / orphaned boards:
arch/arm/include/asm/arch-davinci/da8xx_common.h +3 -0
@@ -19,6 +19,9 @@#ifndef __COMMON_H#define __COMMON_H +#define HAWKBOARD_KICK0_UNLOCK 0x83e70b13 +#define HAWKBOARD_KICK1_UNLOCK 0x95a4f1e0 +struct lpsc_resource {const int lpsc_no; };
arch/arm/include/asm/arch-davinci/hardware.h +4 -1
@@ -379,7 +379,10 @@ int clk_get(enum davinci_clk_ids id);/* Boot config */ struct davinci_syscfg_regs {dv_reg revid; -dv_reg rsvd[71 ]; +dv_reg rsvd[13 ]; +dv_reg kick0; +dv_reg kick1; +dv_reg rsvd1[56 ];dv_reg pinmux[20 ];dv_reg suspsrc;dv_reg chipsig;
board/davinci/common/Makefile +1 -1
@@ -29,7 +29,7 @@ endif LIB = $(obj)lib$(VENDOR).a -COBJS := misc.o +COBJS := misc.o davinci_pinmux.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))
board/davinci/common/davinci_pinmux.c new file +105 -0
105 lines not on this page · raw message
board/davinci/common/misc.c +0 -75
78 lines not on this page · raw message
board/davinci/da8xxevm/Makefile +2 -0
@@ -30,6 +30,8 @@ LIB = $(obj)lib$(BOARD).a COBJS-y += common.o COBJS-$(CONFIG_MACH_DAVINCI_DA830_EVM) += da830evm.o COBJS-$(CONFIG_MACH_DAVINCI_DA850_EVM) += da850evm.o +COBJS-$(CONFIG_MACH_DAVINCI_HAWK) += hawkboard.o +COBJS-$(CONFIG_NAND_SPL_HAWK) += hawkboard_nand_spl.o COBJS := $(COBJS-y)
board/davinci/da8xxevm/hawkboard.c new file +69 -0
69 lines not on this page · raw message
board/davinci/da8xxevm/hawkboard_nand_spl.c new file +164 -0
164 lines not on this page · raw message
boards.cfg +3 -0
@@ -372,6 +372,9 @@ davinci_sffsdr arm arm926ejs sffsdr davinci davinci davinci_sonata arm arm926ejs sonata davinci davinci da830evm arm arm926ejs da8xxevm davinci davinci da850evm arm arm926ejs da8xxevm davinci davinci +hawkboard arm arm926ejs da8xxevm davinci davinci hawkboard:SYS_TEXT_BASE=0xc1180000 +hawkboard_nand arm arm926ejs da8xxevm davinci davinci hawkboard:SYS_TEXT_BASE=0xc1080000,NAND_U_BOOT +hawkboard_uart arm arm926ejs da8xxevm davinci davinci hawkboard:SYS_TEXT_BASE=0xc1080000 guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood openrd_base arm arm926ejs - Marvell kirkwood
drivers/mtd/nand/davinci_nand.c +1 -0
@@ -635,6 +635,7 @@ void davinci_nand_init(struct nand_chip *nand) nand->write_buf = nand_davinci_write_buf; nand->dev_ready = nand_davinci_dev_ready; + nand->select_chip =NULL ;nand_flash_init (); }
include/configs/hawkboard.h new file +205 -0
205 lines not on this page · raw message
nand_spl/board/davinci/da8xxevm/Makefile new file +141 -0
141 lines not on this page · raw message
nand_spl/board/davinci/da8xxevm/u-boot.lds new file +75 -0
75 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH v3 3/3 Add board support for hawkboard
Hi Sughosh,
[...]
Quoted 5 lines
*
hawkboard_nand_config- Used to generate the secondarybootloader(nand_spl)image. This creates an elf file u-boot-spl under nand_spl/. Create an AIS signed image using this file, and flash it to the nand flash at address0x20000. The ais file should fit in one block.
Could you elaborate on "create an AIS signed image" a little bit for people who are not intimately familiar with this architecture? Maybe you can add a small doc/README.da8xx for that purpose?
Quoted 3 lines
*
hawkboard_uart_config- This is same as the first image, but with theTEXT_BASEas expected by the RBL(0xc1080000). Create the AIS Signed bin, as use the normal UART boot procedure to boot the image.
Again a short step-by-step instruction in a readme file would be a very valuable addition.
Thanks
Detlev
Signature · 7 lines
UN Resolution by the General Assembly on December 31, 1988 condemning "Terrorism Wherever and by Whomever Committed": 153 votes to 2. The two voting /against/ the resolution were the US and Israel... -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
PATCH v3 3/3 Add board support for hawkboard
hi Detlev,
Quoted 10 lines · Detlev Zundel
Hi Sughosh,
[...]
Quoted 5 lines
*
hawkboard_nand_config- Used to generate the secondarybootloader(nand_spl)image. This creates an elf file u-boot-spl under nand_spl/. Create an AIS signed image using this file, and flash it to the nand flash at address0x20000. The ais file should fit in one block.
Quoted 3 lines
Could you elaborate on "create an AIS signed image" a little bit for people who are not intimately familiar with this architecture? Maybe you can add a small doc/README.da8xx for that purpose?
AIS is a format used to package an image which is to be copied to the memory to be run. The format consists of a series of commands which are parsed and executed by the RBL(primary boot loader) to get the image copied to the memory, and then jump to the image's entry point(also specified as part of the format). I will add more info on this in the document, as you suggest.
Quoted 7 lines
Quoted 4 lines
*
hawkboard_uart_config- This is same as the first image, but with theTEXT_BASEas expected by the RBL(0xc1080000). Create the AIS Signed bin, as use the normal UART boot procedure to boot the image.Again a short step-by-step instruction in a readme file would be a very valuable addition.
Will add this to the readme.
-sughosh
PATCH v3 3/3 Add board support for hawkboard
In reply to Sughosh Ganudrivers/mtd/nand/davinci_nand.c void davinci_nand_init(struct nand_chip *nand) · line 638
Quoted 9 lines · On Tue, 26 Oct 2010 23:28:05 +0530 Sughosh Ganu <[email protected]> wrote:
drivers/mtd/nand/davinci_nand.c +1
-0@@ -635,6 +635,7 @@ void davinci_nand_init(struct nand_chip *nand) nand->write_buf = nand_davinci_write_buf; nand->dev_ready = nand_davinci_dev_ready; + nand->select_chip =NULL ;
Shouldn't it already be NULL from the BSS?
There are many other fields where this is relied on...
-Scott
PATCH v3 3/3 Add board support for hawkboard
hi Scott,
Quoted 11 lines · Scott Wood
Review
Quoted 1 line · On Tue, 26 Oct 2010 23:28:05 +0530 Sughosh Ganu <[email protected]> wrote:
(quoted diff) +0
-0
b/drivers/mtd/nand/davinci_nand.cQuoted 6 lines
index d41579c..ad70dd9 100644
drivers/mtd/nand/davinci_nand.c +0
-0@@ -635,6 +635,7 @@ void davinci_nand_init(struct nand_chip *nand) nand->write_buf = nand_davinci_write_buf;
Quoted 8 lines
drivers/mtd/nand/davinci_nand.c void davinci_nand_init(struct nand_chip *nand) · line 638
Quoted 2 lines
drivers/mtd/nand/davinci_nand.c +1
-0nand->dev_ready = nand_davinci_dev_ready; + nand->select_chip =NULL ;Shouldn't it already be NULL from the BSS?
There are many other fields where this is relied on...
This is needed when building for nand_spl, where the nand_boot function innand_boot.c declares the chip object as a local variable.
-sughosh
PATCH v3 3/3 Add board support for hawkboard
Quoted 20 lines · On Thu, 28 Oct 2010 23:59:10 +0530 sughosh ganu <[email protected]> wrote:
hi Scott,
Quoted 16 lines · Scott Wood
Review
Quoted 1 line · On Tue, 26 Oct 2010 23:28:05 +0530 Sughosh Ganu <[email protected]> wrote:
(quoted diff) +0
-0
b/drivers/mtd/nand/davinci_nand.cdrivers/mtd/nand/davinci_nand.c void davinci_nand_init(struct nand_chip *nand) · line 638
Quoted 8 lines
index d41579c..ad70dd9 100644
drivers/mtd/nand/davinci_nand.c +1
-0@@ -635,6 +635,7 @@ void davinci_nand_init(struct nand_chip *nand) nand->write_buf = nand_davinci_write_buf; nand->dev_ready = nand_davinci_dev_ready; + nand->select_chip =NULL ;Shouldn't it already be NULL from the BSS?
Quoted 5 lines
Quoted 3 lines
There are many other fields where this is relied on...
This is needed when building for
nand_spl, where thenand_bootfunction innand_boot.cdeclares the chip object as a local variable.
Ah. In that case nand_boot() should probably clear select_chip before calling board_nand_init().
-Scott
PATCH v3 3/3 Add board support for hawkboard
hi Scott,
Quoted 10 lines · Scott Wood
Quoted 1 line · On Thu, 28 Oct 2010 23:59:10 +0530 sughosh ganu <[email protected]> wrote:
This is needed when building for
nand_spl, where thenand_bootfunctionin
Quoted 1 line
nand_boot.cdeclares the chip object as a local variable.Ah. In that case
nand_boot()should probably clearselect_chipbefore callingboard_nand_init().
Will move this to the nand_boot function.
-sughosh