OMAP3: add CM-T35 board
PATCH v4 1/1 OMAP3: add CM-T35 board
Add CM-T35 board support
--
v2 changes:
- rename board config file from omap3_cm-t35.h to cm-t35.h
- remove SZ_xx references
- add MAKEALL/MAINTEINERS entries
v3 changes:
- fix whitespace and indentation
- remove eth_init from board_eth_init
- add CM-T35 entry to doc/README.omap3
- fixed board name in MAINTAINERS
v4 changes:
- rebased agains u-boot-ti/next branch
--- MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 2 + board/cm-t35/Makefile | 47 +++++++ board/cm-t35/cm-t35.c | 190 +++++++++++++++++++++++++++++ board/cm-t35/cm-t35.h | 173 ++++++++++++++++++++++++++ board/cm-t35/config.mk | 30 +++++ doc/README.omap3 | 16 ++- include/configs/cm-t35.h | 299 ++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 760 insertions(+), 2 deletions(-) create mode 100644 board/cm-t35/Makefile create mode 100644 board/cm-t35/cm-t35.c create mode 100644 board/cm-t35/cm-t35.h create mode 100644 board/cm-t35/config.mk create mode 100644 include/configs/cm-t35.h
MAINTAINERS +4 -0
@@ -677,6 +677,10 @@ Stelian Pop <[email protected]> at91sam9263ek ARM926EJS (AT91SAM9263 SoC) at91sam9rlek ARM926EJS (AT91SAM9RL SoC) +Mike Rapoport <[email protected]> + + cm-t35 ARM CORTEX-A8 (OMAP3xx SoC) + Tom Rix <[email protected]> omap3_zoom2 ARM CORTEX-A8 (OMAP3xx SoC)
MAKEALL +1 -0
@@ -612,6 +612,7 @@ LIST_ARM11=" \ ## ARM Cortex-A8 Systems ######################################################################### LIST_ARM_CORTEX_A8=" \ + cm-t35 \ devkit8000 \ omap3_beagle \ omap3_overo \
Makefile +2 -0
@@ -3143,6 +3143,8 @@ SMN42_config : unconfig ######################################################################### ## ARM CORTEX Systems ######################################################################### +cm-t35_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 cm-t35 NULL omap3 devkit8000_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 devkit8000 timll omap3
board/cm-t35/Makefile new file +47 -0
47 lines not on this page · raw message
board/cm-t35/cm-t35.c new file +190 -0
190 lines not on this page · raw message
board/cm-t35/cm-t35.h new file +173 -0
173 lines not on this page · raw message
board/cm-t35/config.mk new file +30 -0
@@ -0,0 +1,30 @@ +# +# (C) Copyright 2009 +# CompuLab, Ltd., <www.compulab.co.il> +# +# 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
doc/README.omap3 +14 -2
@@ -21,6 +21,8 @@ Currently the following boards are supported: * TI/Logic PD Zoom 2 [7] +* CompuLab Ltd. CM-T35 [8] + Toolchain =========
@@ -61,6 +63,11 @@ make make omap3_zoom2_config make +* CM-T35: + +make cm-t35_config +make + Custom commands ===============
@@ -119,7 +126,7 @@ To read a bit : Acknowledgements ================ -OMAP3 U-Boot is based on U-Boot tar ball [8] for BeagleBoard and EVM done by +OMAP3 U-Boot is based on U-Boot tar ball [9] for BeagleBoard and EVM done by several TI employees. Links
@@ -153,6 +160,11 @@ http://www.logicpd.com/products/devkit/ti/zoom_mobile_development_kit [7] TI/Logic PD Zoom 2 http://www.logicpd.com/sites/default/files/1012659A_Zoom_OMAP34x-II_MDP_Brief.pdf -[8] TI OMAP3 U-Boot: + +[8] CompuLab Ltd. CM-T35: + +http://www.compulab.co.il/t35/html/t35-cm-datasheet.htm + +[9] TI OMAP3 U-Boot: http://beagleboard.googlecode.com/files/u-boot_beagle_revb.tar.gz
include/configs/cm-t35.h new file +299 -0
299 lines not on this page · raw message
Signature · 1 line
1.6.4.4
Paulraj
PATCH v4 1/1 OMAP3: add CM-T35 board
Quoted 30 lines
Add CM-T35 board support
Signed-off-by Mike Rapoport <[email protected]>--
v2 changes:
- rename board config file fromomap3_cm-t35.htocm-t35.h
- removeSZ_xxreferences
- add MAKEALL/MAINTEINERS entriesv3 changes:
- fix whitespace and indentation
- removeeth_initfromboard_eth_init
- add CM-T35 entry to doc/README.omap3
- fixed board name inMAINTAINERSv4 changes:
- rebased agains u-boot-ti/next branch--- MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 2 + board/cm-t35/Makefile | 47 +++++++ board/cm-t35/cm-t35.c | 190 +++++++++++++++++++++++++++++ board/cm-t35/cm-t35.h | 173 ++++++++++++++++++++++++++ board/cm-t35/config.mk | 30 +++++ doc/README.omap3 | 16 ++-
Quoted 8 lines
include/configs/cm-t35.h | 299 ++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 760 insertions(+), 2 deletions(-) create mode 100644 board/cm-t35/Makefile create mode 100644 board/cm-t35/cm-t35.c create mode 100644 board/cm-t35/cm-t35.h create mode 100644 board/cm-t35/config.mk create mode 100644 include/configs/cm-t35.h
Tom,
Looks like all outstanding comments have been addressed. If its OK with you I'm going to do 2 things
1) merge my next with my master because the next branch has the OMAP3 DDR patches which created some issue before.
2) apply this patch to my master after the merge because it was made against the u-boot-ti/next branch.
Sandeep
PATCH v4 1/1 OMAP3: add CM-T35 board
Quoted 2 lines · Sandeep
Quoted 2 lines
Add CM-T35 board support
Please add more description of the board.
Quoted 7 lines
Quoted 7 lines
Signed-off-by Mike Rapoport <[email protected]>--
v2 changes:
- rename board config file fromomap3_cm-t35.htocm-t35.h
- removeSZ_xxreferences
- add MAKEALL/MAINTEINERS entries
Wolfgang had made this comment on V2 that has not been addressed.
Quoted 18 lines
Quoted 5 lines
include/configs/cm-t35.h new file +0
-0Quoted 3 lines
index 0000000..b881112
include/configs/cm-t35.h new file +0
-0...
Quoted 8 lines
include/configs/cm-t35.h line 286
Quoted 8 lines
include/configs/cm-t35.h new file +8
-0+#ifndef __ASSEMBLY__ +extern struct gpmc *gpmc_cfg; +extern unsigned int boot_flash_base; +extern volatile unsigned int boot_flash_env_addr; +extern unsigned int boot_flash_off; +extern unsigned int boot_flash_sec; +extern unsigned int boot_flash_type; +#endif These should not be needed in your board config file. Please move to a more appropriate header.
Quoted 3 lines
Best regards,
Wolfgang Denk
Please do not push this change.
Tom
PATCH v4 1/1 OMAP3: add CM-T35 board
Tom,
Quoted 8 lines · Tom
Quoted 2 lines · Sandeep
Quoted 2 lines
Add CM-T35 board support
Please add more description of the board.
Quoted 2 lines
Quoted 2 lines
Signed-off-by Mike Rapoport <[email protected]>
Quoted 26 lines
Quoted 5 lines
Quoted 5 lines
Signature · 4 lines
v2 changes: - rename board config file from omap3_cm-t35.h to cm-t35.h - remove SZ_xx references - add MAKEALL/MAINTEINERS entriesWolfgang had made this comment on V2 that has not been addressed.
Quoted 17 lines
Quoted 5 lines
include/configs/cm-t35.h new file +0
-0Quoted 3 lines
index 0000000..b881112
include/configs/cm-t35.h new file +0
-0...
Quoted 8 lines
include/configs/cm-t35.h line 286
Quoted 8 lines
include/configs/cm-t35.h new file +8
-0+#ifndef __ASSEMBLY__ +extern struct gpmc *gpmc_cfg; +extern unsigned int boot_flash_base; +extern volatile unsigned int boot_flash_env_addr; +extern unsigned int boot_flash_off; +extern unsigned int boot_flash_sec; +extern unsigned int boot_flash_type; +#endif These should not be needed in your board config file. Please move to a more appropriate header.
As I've already answered Wolfgang ([1]), this is what _all_ other omap3 board do... Moving these requires rework of common omap3 code and updates to all omap3 boards.
[1] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/71466
Quoted 9 lines
Quoted 3 lines
Best regards,
Wolfgang Denk
Please do not push this change.
Tom
Signature · 2 lines
Sincerely yours, Mike.
PATCH v4 1/1 OMAP3: add CM-T35 board
Quoted 35 lines · Mike Rapoport
Tom,
Quoted 7 lines · Tom
Quoted 2 lines · Sandeep
Quoted 2 lines
Add CM-T35 board support
Please add more description of the board.
Quoted 2 lines
Quoted 2 lines
Signed-off-by Mike Rapoport <[email protected]>Quoted 24 lines
Quoted 5 lines
Quoted 5 lines
Signature · 4 lines
v2 changes: - rename board config file from omap3_cm-t35.h to cm-t35.h - remove SZ_xx references - add MAKEALL/MAINTEINERS entriesWolfgang had made this comment on V2 that has not been addressed.
Quoted 16 lines
Quoted 5 lines
include/configs/cm-t35.h new file +0
-0Quoted 3 lines
index 0000000..b881112
include/configs/cm-t35.h new file +0
-0...
Quoted 8 lines
include/configs/cm-t35.h line 286
Quoted 8 lines
include/configs/cm-t35.h new file +8
-0+#ifndef __ASSEMBLY__ +extern struct gpmc *gpmc_cfg; +extern unsigned int boot_flash_base; +extern volatile unsigned int boot_flash_env_addr; +extern unsigned int boot_flash_off; +extern unsigned int boot_flash_sec; +extern unsigned int boot_flash_type; +#endif These should not be needed in your board config file. Please move to a more appropriate header.
Quoted 5 lines
As I've already answered Wolfgang ([1]), this is what _all_ other omap3 board do... Moving these requires rework of common omap3 code and updates to all omap3 boards.
Yes this change would apply to all the omap3 boards. But it looks like they are are all the same change.
The change per board, would be to delete these externs once the first code change is made.
Since this is a code movement change, it can be verified by running MAKEALL arm before and after the change.
Tom
PATCH v4 1/1 OMAP3: add CM-T35 board
Quoted 44 lines · Tom
Quoted 35 lines · Mike Rapoport
Tom,
Quoted 7 lines · Tom
Quoted 2 lines · Sandeep
Quoted 2 lines
Add CM-T35 board support
Please add more description of the board.
Quoted 2 lines
Quoted 2 lines
Signed-off-by Mike Rapoport <[email protected]>Quoted 24 lines
Quoted 5 lines
Quoted 5 lines
Signature · 4 lines
v2 changes: - rename board config file from omap3_cm-t35.h to cm-t35.h - remove SZ_xx references - add MAKEALL/MAINTEINERS entriesWolfgang had made this comment on V2 that has not been addressed.
Quoted 16 lines
Quoted 5 lines
include/configs/cm-t35.h new file +0
-0Quoted 3 lines
index 0000000..b881112
include/configs/cm-t35.h new file +0
-0...
Quoted 8 lines
include/configs/cm-t35.h line 286
Quoted 8 lines
include/configs/cm-t35.h new file +8
-0+#ifndef __ASSEMBLY__ +extern struct gpmc *gpmc_cfg; +extern unsigned int boot_flash_base; +extern volatile unsigned int boot_flash_env_addr; +extern unsigned int boot_flash_off; +extern unsigned int boot_flash_sec; +extern unsigned int boot_flash_type; +#endif These should not be needed in your board config file. Please move to a more appropriate header.
Quoted 7 lines
As I've already answered Wolfgang ([1]), this is what _all_ other omap3 board
do... Moving these requires rework of common omap3 code and updates to all omap3
boards.
Quoted 8 lines
Yes this change would apply to all the omap3 boards. But it looks like they are are all the same change.
The change per board, would be to delete these externs once the first code change is made.
Since this is a code movement change, it can be verified by running MAKEALL arm before and after the change.
The problem here, that just moving these externs to e.g. include/arm-arm/arch-omap3/mem.h is not enough. All omap3 boards set environment related defines to these externs, and therefore without them common/env_nand does not build. It seems that all the board_flash_* variables can be completely removed completely, but I really don't know what was the original author intention about those variables.
Quoted 3 lines
Tom
Signature · 2 lines
Sincerely yours, Mike.
PATCH v4 1/1 OMAP3: add CM-T35 board
Quoted 1 line · Mike Rapoport
<snip>
Quoted 11 lines
Quoted 10 lines
Quoted 2 lines
Yes this change would apply to all the omap3 boards. But it looks like they are are all the same change.
The change per board, would be to delete these externs once the first code change is made.
Since this is a code movement change, it can be verified by running MAKEALL arm before and after the change.
Quoted 7 lines
The problem here, that just moving these externs to e.g.
include/arm-arm/arch-omap3/mem.his not enough. All omap3 boards set environment related defines to these externs, and therefore without them common/env_nand does not build. It seems that all the board_flash_* variables can be completely removed completely, but I really don't know what was the original author intention about those variables.
I have posted a patch for the first part of this problem with gpmc. I am testing a change now to remove the board_flash_* variables. After that I think we will be ok.
Tom
PATCH v4 1/1 OMAP3: add CM-T35 board
In reply to Mike RapoportDear Mike Rapoport,
Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 3 lines
Quoted 3 lines
These should not be needed in your board config file. Please move to a more appropriate header.
As I've already answered Wolfgang ([1]), this is what _all_ other omap3 board do... Moving these requires rework of common omap3 code and updates to all omap3 boards.
Quoting a (or several) bad examples does not make the thing better. Sorry that this has slipped through previous reviews, but now we caught it and want to see it cleaned up.
Best regards,
Wolfgang Denk
Signature · 7 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
GUIs are virtually useless. Learn tools. They're configurable,
scriptable, automatable, cron-able, interoperable, etc. We don't need
no brain-dead winslurping monolithic claptrap.
-- Tom Christiansen in 371140df at csnewsPATCH v4 1/1 OMAP3: add CM-T35 board
In reply to Mike RapoportDear Mike Rapoport,
Quoted 1 line · In message <[email protected]> you wrote:
Add CM-T35 board support
...
Quoted 7 lines
MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 2 + board/cm-t35/Makefile | 47 +++++++ board/cm-t35/cm-t35.c | 190 +++++++++++++++++++++++++++++ board/cm-t35/cm-t35.h | 173 ++++++++++++++++++++++++++ board/cm-t35/config.mk | 30 +++++
Quoted 8 lines
doc/README.omap3 | 16 ++- include/configs/cm-t35.h | 299 ++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 760 insertions(+), 2 deletions(-) create mode 100644 board/cm-t35/Makefile create mode 100644 board/cm-t35/cm-t35.c create mode 100644 board/cm-t35/cm-t35.h create mode 100644 board/cm-t35/config.mk create mode 100644 include/configs/cm-t35.h
Would it be possible to rename this into cm_t35? I would like to avoid characters in board names (and thus make targets etc. that are not legal in shell/Make/C variable names.
Best regards,
Wolfgang Denk
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-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "Everybody is talking about the weather but nobody does anything about it." - Mark Twain
PATCH v4 1/1 OMAP3: add CM-T35 board
Dear Wolfgang,
Quoted 21 lines · Wolfgang Denk
Dear Mike Rapoport,
Quoted 1 line · In message <[email protected]> you wrote:
Add CM-T35 board support
...
Quoted 7 lines
MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 2 + board/cm-t35/Makefile | 47 +++++++ board/cm-t35/cm-t35.c | 190 +++++++++++++++++++++++++++++ board/cm-t35/cm-t35.h | 173 ++++++++++++++++++++++++++ board/cm-t35/config.mk | 30 +++++Quoted 8 lines
doc/README.omap3 | 16 ++- include/configs/cm-t35.h | 299 ++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 760 insertions(+), 2 deletions(-) create mode 100644 board/cm-t35/Makefile create mode 100644 board/cm-t35/cm-t35.c create mode 100644 board/cm-t35/cm-t35.h create mode 100644 board/cm-t35/config.mk create mode 100644 include/configs/cm-t35.h
Quoted 3 lines
Would it be possible to rename this into
cm_t35? I would like to avoid characters in board names (and thus make targets etc. that are not legal in shell/Make/C variable names.
No problem.
Quoted 4 lines
Best regards,
Wolfgang Denk
Signature · 2 lines
Sincerely yours, Mike.
PATCH v4 1/1 OMAP3: add CM-T35 board
In reply to Mike RapoportQuoted 19 lines · Mike Rapoport
Add CM-T35 board support
Signed-off-by Mike Rapoport <[email protected]>--
v2 changes:
- rename board config file fromomap3_cm-t35.htocm-t35.h
- removeSZ_xxreferences
- add MAKEALL/MAINTEINERS entriesv3 changes:
- fix whitespace and indentation
- removeeth_initfromboard_eth_init
- add CM-T35 entry to doc/README.omap3
- fixed board name inMAINTAINERSv4 changes:
- rebased agains u-boot-ti/next branch
<snip>
Quoted 54 lines
board/cm-t35/cm-t35.c new file +53
-0+static void setup_net_chip (void ) +{ +struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE ; + +enable_gpmc_cs_config (gpmc_net_config, &gpmc_cfg->cs[5 ], +CM_T35_SMC911X_BASE ,GPMC_SIZE_16M ); +enable_gpmc_cs_config (gpmc_net_config, &gpmc_cfg->cs[4 ], +SB_T35_SMC911X_BASE ,GPMC_SIZE_16M ); + +/* Enable off mode for NWE in PADCONF_GPMC_NWE register */ +writew (readw (&ctrl_base->gpmc_nwe) |0x0E00 , &ctrl_base->gpmc_nwe); + +/* Enable off mode for NOE in PADCONF_GPMC_NADV_ALE register */ +writew (readw (&ctrl_base->gpmc_noe) |0x0E00 , &ctrl_base->gpmc_noe); + +/* Enable off mode for ALE in PADCONF_GPMC_NADV_ALE register */ +writew (readw (&ctrl_base->gpmc_nadv_ale) |0x0E00 , + &ctrl_base->gpmc_nadv_ale); + +/* Reset the ethernet controller via TPS65930 GPIO */ +/* Set GPIO1 of TPS65930 as output */ +twl4030_i2c_write_u8 (TWL4030_CHIP_GPIO ,0x02 , +TWL4030_BASEADD_GPIO +0x03 ); +/* Send a pulse on the GPIO pin */ +twl4030_i2c_write_u8 (TWL4030_CHIP_GPIO ,0x02 , +TWL4030_BASEADD_GPIO +0x0C ); +udelay (1 ); +twl4030_i2c_write_u8 (TWL4030_CHIP_GPIO ,0x02 , +TWL4030_BASEADD_GPIO +0x09 ); +udelay (1 ); +twl4030_i2c_write_u8 (TWL4030_CHIP_GPIO ,0x02 , +TWL4030_BASEADD_GPIO +0x0C ); +} + +/* +* Routine: board_init +* Description: Early hardware init. +*/ +int board_init (void ) +{ +gpmc_init ();/* in SRAM or SDRAM, finish GPMC */ + +/* board id for Linux */ + gd->bd->bi_arch_number =MACH_TYPE_CM_T35 ; +/* boot param addr */ + gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 +0x100 ); + +return 0 ; +} + +/* +* Routine: misc_init_r +* Description: Init ethernet (done here so udelay works)
board/cm-t35/cm-t35.c line 126
Quoted 10 lines
board/cm-t35/cm-t35.c new file +10
-0+*/ +int misc_init_r (void ) +{ +#ifdef CONFIG_DRIVER_OMAP34XX_I2C +i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE ); +#endif + +#if defined(CONFIG_CMD_NET ) +setup_net_chip (); +#endif
Net setup should be dependent on i2c initialization. The setup_net_chip uses i2c read/write
board/cm-t35/cm-t35.c line 131
Quoted 5 lines
board/cm-t35/cm-t35.c new file +5
-0+ +dieid_num_r (); + +return 0 ; +}
Tom