
On 01:20 Tue 18 Aug , Frederik Kriewitz wrote:
This patch adds support for the DevKit8000 board.
Signed-off-by: Frederik Kriewitz frederik@kriewitz.eu
mach-types.h needs to be synced (MACH_TYPE_DEVKIT8000)
MAINTAINERS | 4 + Makefile | 3 + board/omap3/devkit8000/Makefile | 52 +++++ board/omap3/devkit8000/config.mk | 35 ++++ board/omap3/devkit8000/devkit8000.c | 124 ++++++++++++ board/omap3/devkit8000/devkit8000.h | 373 +++++++++++++++++++++++++++++++++++
no need board are allow in board/omap3 please create your own vendor dirent or just put it in board/
doc/README.omap3 | 11 + include/configs/omap3_devkit8000.h | 321 ++++++++++++++++++++++++++++++ 8 files changed, 923 insertions(+), 0 deletions(-) create mode 100644 board/omap3/devkit8000/Makefile create mode 100644 board/omap3/devkit8000/config.mk create mode 100644 board/omap3/devkit8000/devkit8000.c create mode 100644 board/omap3/devkit8000/devkit8000.h create mode 100644 include/configs/omap3_devkit8000.h
please add entry in MAKEALL
diff --git a/MAINTAINERS b/MAINTAINERS index 620604c..12ad7f5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -706,6 +706,10 @@ Alex Z lart SA1100 dnp1110 SA1110
+Frederik Kriewitz frederik@kriewitz.eu
- omap3_devkit8000 ARM CORTEX-A8 (OMAP3530 SoC)
Unknown / orphaned boards: diff --git a/Makefile b/Makefile index 329e0f5..bed9f5e 100644 --- a/Makefile +++ b/Makefile @@ -3072,6 +3072,9 @@ omap3_beagle_config : unconfig omap3_overo_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 overo omap3 omap3
+omap3_devkit8000_config : unconfig
- @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 devkit8000 omap3 omap3
omap3_evm_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 evm omap3 omap3
+#ifdef CONFIG_DRIVER_DM9000
- /* Configure GPMC registers for DM9000 */
- writel(NET_GPMC_CONFIG1, &gpmc_cfg->cs[6].config1);
- writel(NET_GPMC_CONFIG2, &gpmc_cfg->cs[6].config2);
- writel(NET_GPMC_CONFIG3, &gpmc_cfg->cs[6].config3);
- writel(NET_GPMC_CONFIG4, &gpmc_cfg->cs[6].config4);
- writel(NET_GPMC_CONFIG5, &gpmc_cfg->cs[6].config5);
- writel(NET_GPMC_CONFIG6, &gpmc_cfg->cs[6].config6);
- writel(NET_GPMC_CONFIG7, &gpmc_cfg->cs[6].config7);
- /* Use OMAP DIE_ID as MAC address */
- if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
enetaddr[0] = 0x02; /* locally administered */
enetaddr[1] = readl(&id_base->die_id_1) & 0xff;
*(u32*)&enetaddr[2] = readl(&id_base->die_id_0);
eth_setenv_enetaddr("ethaddr", enetaddr);
please add a warning for the user to known about it
- }
+#endif
- dieid_num_r();
- return 0;
+}
+/*
- Routine: set_muxconf_regs
- Description: Setting up the configuration Mux registers specific to the
hardware. Many pins need to be moved from protect to primary
mode.
- */
+void set_muxconf_regs(void) +{
- MUX_DEVKIT8000();
+}
+#ifdef CONFIG_DRIVER_DM9000 +int board_eth_init(bd_t *bis) +{
- return dm9000_initialize(bis);
+}
+void reset_phy(void) +{
- eth_init(gd->bd);
+}
NACK the net need to be init only when you use it
+#endif +/* DM9000 */ +#define CONFIG_NET_MULTI 1 +#define CONFIG_NET_RETRY_COUNT 20 +#define CONFIG_DRIVER_DM9000 1 +#define CONFIG_DM9000_BASE 0x2c000000 +#define DM9000_IO CONFIG_DM9000_BASE +#define DM9000_DATA (CONFIG_DM9000_BASE+0x400)
please add a space before and after "+"
+#define CONFIG_DM9000_USE_16BIT 1 +#define CONFIG_DM9000_NO_SROM 1 +#define CONFIG_RESET_PHY_R 1 +#undef CONFIG_DM9000_DEBUG
+/* NS16550 Configuration */ +#define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
why define it twice?
+#define CONFIG_SYS_NS16550 +#define CONFIG_SYS_NS16550_SERIAL +#define CONFIG_SYS_NS16550_REG_SIZE (-4) +#define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
here?
+/* select serial console configuration */ +#define CONFIG_CONS_INDEX 3 +#define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3 +#define CONFIG_SERIAL3 3 +#define CONFIG_BAUDRATE 115200 +#define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
115200}
+/* MMC */ +#define CONFIG_MMC 1 +#define CONFIG_OMAP3_MMC 1 +#define CONFIG_DOS_PARTITION 1
+/* commands to include */ +#include <config_cmd_default.h>
+#define CONFIG_CMD_DHCP /* DHCP support */ +#define CONFIG_CMD_EXT2 /* EXT2 Support */ +#define CONFIG_CMD_FAT /* FAT support */ +#define CONFIG_CMD_I2C /* I2C serial bus support */ +#define CONFIG_CMD_JFFS2 /* JFFS2 Support */ +#define CONFIG_CMD_MMC /* MMC support */ +#define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */ +#define CONFIG_CMD_NAND /* NAND support */ +#define CONFIG_CMD_NAND_LOCK_UNLOCK /* nand (un)lock commands */ +#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ +#define CONFIG_CMD_NFS /* NFS support */
please check what is already define in cmd_default
+#undef CONFIG_CMD_FLASH /* flinfo, erase, protect */ +#undef CONFIG_CMD_FPGA /* FPGA configuration Support */ +#undef CONFIG_CMD_IMI /* iminfo */ +#undef CONFIG_CMD_IMLS /* List all found images */
+/* I2C */ +#define CONFIG_SYS_I2C_SPEED 100000 +#define CONFIG_SYS_I2C_SLAVE 1 +#define CONFIG_SYS_I2C_BUS 0 +#define CONFIG_SYS_I2C_BUS_SELECT 1 +#define CONFIG_DRIVER_OMAP34XX_I2C 1
+/* TWL4030 */ +#define CONFIG_TWL4030_POWER 1 +#define CONFIG_TWL4030_LED 1
+/* Board NAND Info */ +#define CONFIG_SYS_NO_FLASH /* no NOR flash */
please define it before including cmd_default so no-need to undef CMD_FLASH & CMD_IMLS
+#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ +#define MTDIDS_DEFAULT "nand0=nand" +#define MTDPARTS_DEFAULT "mtdparts=nand:512k(x-loader),"\
"1920k(u-boot),128k(u-boot-env),"\
"4m(kernel),-(fs)"
why no this #define MTDPARTS_DEFAULT "mtdparts=nand:" \ "512k(x-loader)," \ "1920k(u-boot)," \ "128k(u-boot-env)," \ "4m(kernel),-(fs)"
+#define CONFIG_NAND_OMAP_GPMC +#define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */
/* to access nand */
+#define CONFIG_SYS_NAND_BASE NAND_BASE /* physical address */
/* to access nand at */
+#define CONFIG_EXTRA_ENV_SETTINGS \
- "loadaddr=0x82000000\0" \
- "console=ttyS2,115200n8\0" \
- "vram=12M\0" \
- "dvimode=1024x768MR-16@60\0" \
- "defaultdisplay=dvi\0" \
- "nfsopts=hard,tcp,rsize=65536,wsize=65536\0" \
- "kernelopts=rw\0" \
- "mmcargs=setenv bootargs console=${console} " \
"vram=${vram} " \
"omapfb.mode=dvi:${dvimode} " \
"omapdss.def_disp=${defaultdisplay} " \
"root=/dev/mmcblk0p2\0" \
- "nandargs=setenv bootargs console=${console} " \
"vram=${vram} " \
"omapfb.mode=dvi:${dvimode} " \
"omapdss.def_disp=${defaultdisplay} " \
"root=/dev/mtdblock4 " \
"rootfstype=jffs2\0" \
- "netargs=setenv bootargs console=${console} " \
"vram=${vram} " \
"omapfb.mode=dvi:${dvimode} " \
"omapdss.def_disp=${defaultdisplay} " \
"root=/dev/nfs " \
"nfsroot=${serverip}:${rootpath},${nfsopts} " \
"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off " \
"dnsip1=${dnsip} " \
"dnsip2=${dnsip2}\0" \
here you can reduce duplicate code as example by somthink like this "commonargs=" \ "setenv bootargs console=${console} " \ "vram=${vram} " \ "omapfb.mode=dvi:${dvimode} " \ "omapdss.def_disp=${defaultdisplay} " \ "mmcargs=" \ "run commonargs; " \ "setenv bootargs ${bootargs}" \ "root=/dev/mmcblk0p2\0" \
- "loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
- "bootscript=echo Running bootscript from mmc ...; " \
"source ${loadaddr}\0" \
- "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
- "eraseenv=nand unlock 0x260000 0x20000; nand erase 0x260000 0x20000\0" \
- "mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
"bootm ${loadaddr}\0" \
- "nandboot=echo Booting from nand ...; " \
"run nandargs; " \
"nand read ${loadaddr} 280000 400000; " \
"bootm ${loadaddr}\0" \
- "netboot=echo Booting from network ...; " \
"dhcp ${loadaddr}; " \
"run netargs; " \
"bootm ${loadaddr}\0" \
- "autoboot=if mmc init 0; then " \
"if run loadbootscript; then " \
"run bootscript; " \
"else " \
"if run loaduimage; then " \
"run mmcboot; " \
"else run nandboot; " \
"fi; " \
"fi; " \
"else run nandboot; fi\0"
+#define CONFIG_BOOTCOMMAND "run autoboot"
+/* Miscellaneous configurable options */ +#define V_PROMPT "OMAP3 DevKit8000 # "
no need
+#define CONFIG_SYS_LONGHELP /* undef to save memory */ +#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ +#define CONFIG_AUTO_COMPLETE 1 +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " +#define CONFIG_SYS_PROMPT V_PROMPT
just define it here
+#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ +/* Print Buffer Size */ +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
sizeof(CONFIG_SYS_PROMPT) + 16)
+#define CONFIG_SYS_MAXARGS 128 /* max number of command args */
+/* Boot Argument Buffer Size */ +#define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
+#define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0 + 0x07000000) +#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + \
0x01000000) /* 16MB */
+#define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0 + 0x02000000)
Best Regards, J.