Add support for hawkboard
Subsystems (3)
PATCH v2 3/3 Add 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.
---
V2:
Taken care of comments from Wolfgang.
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 | 68 +++++++ board/davinci/da8xxevm/hawkboard_nand_spl.c | 163 +++++++++++++++++ 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, 776 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 +68 -0
68 lines not on this page · raw message
board/davinci/da8xxevm/hawkboard_nand_spl.c new file +163 -0
163 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 v2 3/3 Add support for hawkboard
Quoted 23 lines · Sughosh Ganu
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 address0xe0000.*
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 address0x20000. The ais file should ?fit in one block.
Quoted 5 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.Signed-off-by Sughosh Ganu <[email protected]>
Applies to c163f4478ca72f51b28b55f74addc8fe029d7b83 ofgit://git.denx.de/u-boot.git.
This patch has checkpatch.pl warnings and errors:
ERROR: return is not a function, parentheses are not required#456:
FILE: board/davinci/da8xxevm/hawkboard.c:58:
+ return(0);
WARNING: space prohibited between function name and open parenthesis '(' #459: FILE: board/davinci/da8xxevm/hawkboard.c:61:
+int misc_init_r (void)
WARNING: line over 80 characters
#463: FILE: board/davinci/da8xxevm/hawkboard.c:65:
+ printf ("ARM Clock : %s MHz\n", strmhz(buf, clk_get(DAVINCI_ARM_CLKID)));
WARNING: space prohibited between function name and open parenthesis '(' #463: FILE: board/davinci/da8xxevm/hawkboard.c:65:
+ printf ("ARM Clock : %s MHz\n", strmhz(buf, clk_get(DAVINCI_ARM_CLKID)));
ERROR: return is not a function, parentheses are not required #465: FILE: board/davinci/da8xxevm/hawkboard.c:67:
+ return(0);
ERROR: space required after that ',' (ctx:VxV) #537: FILE: board/davinci/da8xxevm/hawkboard_nand_spl.c:65:
+ { pinmux(12),1, 5 },
^
ERROR: space required after that ',' (ctx:VxV) #538: FILE: board/davinci/da8xxevm/hawkboard_nand_spl.c:66:
+ { pinmux(12),1, 6 }
^
WARNING: space prohibited between function name and open parenthesis '(' #569: FILE: board/davinci/da8xxevm/hawkboard_nand_spl.c:97:
+void board_init_f (ulong bootflag)
ERROR: code indent should use tabs where possible #601: FILE: board/davinci/da8xxevm/hawkboard_nand_spl.c:129:
+^I CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);$
WARNING: space prohibited between function name and open parenthesis '(' #605: FILE: board/davinci/da8xxevm/hawkboard_nand_spl.c:133:
+ relocate_code (CONFIG_SYS_NAND_U_BOOT_RELOC_SP, (gd_t *)gd,
WARNING: space prohibited between function name and open parenthesis '(' #631: FILE: board/davinci/da8xxevm/hawkboard_nand_spl.c:159:
+void hang (void)
WARNING: space prohibited between function name and open parenthesis '(' #633: FILE: board/davinci/da8xxevm/hawkboard_nand_spl.c:161:
+ puts ("### ERROR ### Please RESET the board ###\n");
ERROR: trailing statements should be on next line #634: FILE: board/davinci/da8xxevm/hawkboard_nand_spl.c:162:
+ for (;;);
+ for (;;);
WARNING: line over 80 characters
#721: FILE: include/configs/hawkboard.h:54:
+#define PHYS_SDRAM_1 DAVINCI_DDR_EMIF_DATA_BASE /* DDR Start */
WARNING: line over 80 characters
#725: FILE: include/configs/hawkboard.h:58:
+#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - \
WARNING: line over 80 characters
#842: FILE: include/configs/hawkboard.h:175:
+ "mem=128M console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xc1180000," \
total: 6 errors, 10 warnings, 823 lines checked
../sugosh-da8xx-v2/3of3.patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
I was also unable to build the da850evm u-boot with this patch applied:
$make mrproper ; make da850evm_config ; make -j9 all|grep -E '( error| warning)' awk '(NF && $1 !~ /^#/) { print $1 ": " $1 "_config; $(MAKE)" }' boards.cfg > .boards.depend
Configuring for da850evm board...
davinci_pinmux.c:30:26: error: davinci_misc.h: No such file or directory make[1]: *** No rule to make target .depend', needed by libdavinci.a'. Stop.
make: *** [board/davinci/common/libdavinci.a] Error 2
make: *** Waiting for unfinished jobs....
make: *** wait: No child processes. Stop.
For your next patch submission, I recommend running checkpatch.pl (from a recent linux kernel scripts/ directory) on your patches and also using the ./MAKEALL script [1] to test that your changes haven't broken other boards.
Best Regards,
Ben Gardiner
[1] http://www.denx.de/wiki/U-Boot/Patches
---
Nanometrics Inc.
http://www.nanometrics.ca
PATCH v2 3/3 Add support for hawkboard
hi Ben,
Quoted 18 lines · Ben Gardiner
../sugosh-da8xx-v2/3of3.patchhas style problems, please review. If any of these errors
are false positives report them to the maintainer, see CHECKPATCH inMAINTAINERS.I was also unable to build the da850evm u-boot with this patch applied:
$make mrproper ; makeda850evm_config; make -j9 all|grep -E '( error| warning)'
awk '(NF && $1 !~ /^#/) { print $1 ": " $1 "_config; $(MAKE)" }' boards.cfg > .boards.depend
Configuring for da850evm board...
davinci_pinmux.c:30:26: error:davinci_misc.h: No such file or directory make[1]: *** No rule to make target.depend', needed bylibdavinci.a'.
Stop.
make: *** [board/davinci/common/libdavinci.a] Error 2
make: *** Waiting for unfinished jobs....
make: *** wait: No child processes. Stop.
Quoted 5 lines
For your next patch submission, I recommend running checkpatch.pl (from a recent linux kernel
scripts/directory) on your patches and also using the ./MAKEALL script [1] to test that your changes haven't broken other boards.
Thanks a lot for the testing. Will check the patches with checkpatch script
while posting the next version.
-sughosh