Adding support for DevKit8000
PATCH 1/1 Adding support for DevKit8000
This patch adds support for the DevKit8000 board.
---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 +++++++++++++++++++++++++++++++++++ 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
MAINTAINERS +4 -0
@@ -706,6 +706,10 @@ Alex Z lart SA1100 dnp1110 SA1110 +Frederik Kriewitz <[email protected]> + + omap3_devkit8000 ARM CORTEX-A8 (OMAP3530 SoC) + ------------------------------------------------------------------------- Unknown / orphaned boards:
Makefile +3 -0
@@ -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
board/omap3/devkit8000/Makefile new file +52 -0
52 lines not on this page · raw message
board/omap3/devkit8000/config.mk new file +35 -0
@@ -0,0 +1,35 @@ +# +# (C) Copyright 2006 +# Texas Instruments, <www.ti.com> +# +# (C) Copyright 2009 +# Frederik Kriewitz <[email protected]> +# +# DevKit8000 uses OMAP3 (ARM-CortexA8) cpu +# see http://www.ti.com/ for more information on Texas Instruments +# +# 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 +# +# Physical Address: +# 8000'0000 (bank0) +# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000 +# (mem base + reserved) + +# For use with external or internal boots. +TEXT_BASE = 0x80e80000
board/omap3/devkit8000/devkit8000.c new file +124 -0
124 lines not on this page · raw message
board/omap3/devkit8000/devkit8000.h new file +373 -0
373 lines not on this page · raw message
doc/README.omap3 +11 -0
@@ -11,6 +11,8 @@ Currently the following boards are supported: * OMAP3530 BeagleBoard [2] +* DevKit8000 [9] + * Gumstix Overo [3] * TI EVM [4]
@@ -36,6 +38,11 @@ Build make omap3_beagle_config make +* DevKit8000: + +make omap3_devkit8000_config +make + * Gumstix Overo: make omap3_overo_config
@@ -156,3 +163,7 @@ http://www.logicpd.com/sites/default/files/1012659A_Zoom_OMAP34x-II_MDP_Brief.pd [8] TI OMAP3 U-Boot: http://beagleboard.googlecode.com/files/u-boot_beagle_revb.tar.gz + +[9] DevKit8000: + +http://www.embedinfo.com/English/Product/devkit8000.asp
include/configs/omap3_devkit8000.h new file +321 -0
321 lines not on this page · raw message
Signature · 1 line
1.6.3.3
PATCH 1/1 Adding support for DevKit8000
Quoted 5 lines · Frederik Kriewitz
This patch adds support for the DevKit8000 board.
Signed-off-by Frederik Kriewitz <[email protected]>---
mach-types.hneeds to be synced (MACH_TYPE_DEVKIT8000)
Quoted 7 lines
--- 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/
Quoted 8 lines
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
Quoted 36 lines
MAINTAINERS +4
-0@@ -706,6 +706,10 @@ Alex Z lart SA1100 dnp1110 SA1110 +Frederik Kriewitz <[email protected]> + + omap3_devkit8000 ARM CORTEX-A8 (OMAP3530 SoC) + ------------------------------------------------------------------------- Unknown / orphaned boards:Makefile +10
-0@@ -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);
Makefile omap3_beagle_config : unconfig
Quoted 10 lines
Makefile +10
-0+ 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
Quoted 19 lines
Makefile +19
-0+ } +#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(); +} +
Makefile
Quoted 10 lines
Makefile +10
-0+#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
Makefile
Quoted 8 lines
Makefile +8
-0+#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 "+"
Makefile
Quoted 7 lines
Makefile +7
-0+#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?
Makefile
Quoted 5 lines
Makefile +5
-0+ +#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?
Quoted 18 lines
Makefile +18
-0+ +/* 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 */
Makefile
Quoted 10 lines
Makefile +10
-0+#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
Quoted 9 lines
Makefile +9
-0+ +#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
Makefile
Quoted 10 lines
Makefile +10
-0+#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
Makefile
Quoted 6 lines
Makefile +6
-0+ +#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)"
Quoted 25 lines
Makefile +25
-0+ +#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 at 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 " \
Makefile
Quoted 10 lines
Makefile +10
-0+ "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" \Quoted 22 lines
Makefile +22
-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; " \
Makefile
Quoted 10 lines
Makefile +10
-0+ "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
Makefile
Quoted 6 lines
Makefile +6
-0+ +#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
Quoted 5 lines
Makefile +5
-0+#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 */
Makefile
Quoted 10 lines
Makefile +10
-0+ +/* 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.
PATCH 1/1 Adding support for DevKit8000
I'll fix that.
Quoted 6 lines · Jean-Christophe PLAGNIOL-VILLARD
board/omap3/devkit8000/devkit8000.c line 123
Quoted 4 lines
board/omap3/devkit8000/devkit8000.c new file +4
-0+void reset_phy (void ) +{ + ? ? eth_init(gd->bd); +}NACK
the net need to be init only when you use it
The kernel will try to use the already (temporally) programmed MAC address. I always init it because that way no kernel hack for the MAC address is required.
Is it ok if I add a comment?
PATCH 1/1 Adding support for DevKit8000
Quoted 11 lines · Frederik Kriewitz
I'll fix that.
Quoted 6 lines · Jean-Christophe PLAGNIOL-VILLARD
board/omap3/devkit8000/devkit8000.c line 123
Quoted 4 lines
board/omap3/devkit8000/devkit8000.c new file +4
-0+void reset_phy (void ) +{ + ? ? eth_init(gd->bd); +}NACK
the net need to be init only when you use it
Quoted 4 lines
The kernel will try to use the already (temporally) programmed MAC address. I always init it because that way no kernel hack for the MAC address is required.
Is it ok if I add a comment?
no sorry
this will be also nack by Wolfgang
to program the mac you need to create a initramfs in your kernel wich generate the same thing or read the content of the U-Boot env via fw_printenv and use ifconfig hw ether
Best Regards,
J.
PATCH 1/1 Adding support for DevKit8000
Quoted 6 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 4 lines
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/
What do you mean with that?
Quoted 11 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 11 lines
Quoted 6 lines
board/omap3/devkit8000/devkit8000.c line 123
Quoted 4 lines
board/omap3/devkit8000/devkit8000.c new file +4
-0+void reset_phy (void ) +{ + ? ? eth_init(gd->bd); +}NACK
the net need to be init only when you use itThe kernel will try to use the already (temporally) programmed MAC address. I always init it because that way no kernel hack for the MAC address is required.
Is it ok if I add a comment?
Quoted 5 lines
no sorry
this will be also nack by Wolfgang
to program the mac you need to create a initramfs in your kernel wich generate the same thing or read the content of the U-Boot env viafw_printenvand use ifconfig hw ether
ok, I think this will break nfsroot.
I don't think it's possible to init ethernet with a initramfs before mounting the rootfs.
There are several boards doing the same because of nfsroot:
board/ronetix/pm9261/pm9261.cboard/ronetix/pm9263/pm9263.cboard/afeb9260/afeb9260.cboard/atmel/at91cap9adk/at91cap9adk.cboard/atmel/at91sam9260ek/at91sam9260ek.cboard/atmel/at91sam9261ek/at91sam9261ek.cboard/atmel/at91sam9263ek/at91sam9263ek.cboard/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
Is there any command to call eth_init() in a script?
PATCH 1/1 Adding support for DevKit8000
Quoted 9 lines · Frederik Kriewitz
Quoted 6 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 4 lines
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/What do you mean with that?
board/devkit8000/devkit8000.h
or board/embedinfo/devkit8000/devkit8000.h
Quoted 20 lines
Quoted 11 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 11 lines
Quoted 6 lines
board/omap3/devkit8000/devkit8000.c line 123
Quoted 4 lines
board/omap3/devkit8000/devkit8000.c new file +4
-0+void reset_phy (void ) +{ + ? ? eth_init(gd->bd); +}NACK
the net need to be init only when you use itThe kernel will try to use the already (temporally) programmed MAC address. I always init it because that way no kernel hack for the MAC address is required.
Is it ok if I add a comment?Quoted 5 lines
no sorry
this will be also nack by Wolfgang
to program the mac you need to create a initramfs in your kernel wich generate the same thing or read the content of the U-Boot env viafw_printenvand use ifconfig hw ether
Quoted 3 lines
ok, I think this will break nfsroot.
I don't think it's possible to init ethernet with a initramfs before mounting the rootfs.
pivot root is your friend
and generate the mac address at the openof the device in the kernel
Quoted 3 lines
There are several boards doing the same because of nfsroot:
I known but it's not allow anyway
Quoted 2 lines
Is there any command to call
eth_init()in a script?
if you download the uImage from the net it work but the best will be to handle this in a initramfs
Best Regards,
J.
PATCH 1/1 Adding support for DevKit8000
Dear Jean-Christophe PLAGNIOL-VILLARD,
Quoted 6 lines · In message <[email protected]> you wrote:
Quoted 4 lines
ok, I think this will break nfsroot.
I don't think it's possible to init ethernet with a initramfs before mounting the rootfs.pivot root is your friend
and generate the mac address at the openof the device in the kernel
...
Quoted 1 line
but the best will be to handle this in a initramfs
Well, anybody with a minimum of experience in embedded systems and a halfway sane state of mind will agree that having to boot Linux into user space just to set the MAC address of the network interface is a real waste of time and resources, and not an acceptable solution.
The fact that the ARM Linux kernel until today has not found any standard way to allow passing of vital hardware information (including MAC addresses) from the boot loader to the Linux kenrel is extremely pitiable, and we all can but hope that we will see device tree support for ARM rather sooner than later.
In the mean time, Linux kernal modifications like accepting an "ethaddr=" boot argument are a viable workaround.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Nothing in progression can rest on its original plan. We may as well think of rocking a grown man in the cradle of an infant. - Edmund Burke