Skip to contentSkip to conversation

OMAP3 Regression after merging ARM relocation code for custom board

U-Boot New Luca Ceresoli 5 participants 49 messages Mar 21, 2011 – Apr 25, 2011 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

Wolfgang, Albert, all,

following last week's discussion [1], here's the patch that would implement Comelit CPS board support in U-boot.

The point is that this code is not booting.
It is a rebase on top of current master of a previous, working, version based on v2010.06.
During the rebase process, the code stopped working after rebasing on top of the ARM Relocation commits.

FWIW, The code compiles correctly.

As you can see by looking at the patch, the core is implemented just like the BeagleBoard's code. This is because the two boards are identical in terms of the core devices required for booting (same CPU, same NAND, same model of RAM but only one chip installed).

A detailed problem report is in the mentioned thread [1].

I hope this helps in finding the issue and finally merge in U-boot.

Thanks in advance,
Luca

[1] http://lists.denx.de/pipermail/u-boot/2011-March/088704.html

#1 lore raw

PATCH 1/1 ARMV7: OMAP3: Add support for Comelit CPS board

Board support for the Comelit Group SpA CPS board, which is a custom board based on the BeagleBoard <http://beagleboard.org/> by Texas Instruments.

The board support is based on the BeagleBoard implementation.

Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>
---
 MAINTAINERS                 |    4 +
 MAKEALL                     |    1 +
 board/comelit/cps/Makefile  |   49 ++++++
 board/comelit/cps/config.mk |   36 ++++
 board/comelit/cps/cps.c     |  173 ++++++++++++++++++++
 board/comelit/cps/cps.h     |  379 +++++++++++++++++++++++++++++++++++++++++++
 boards.cfg                  |    1 +
 include/configs/omap3_cps.h |  315 +++++++++++++++++++++++++++++++++++
 8 files changed, 958 insertions(+), 0 deletions(-)
 create mode 100644 board/comelit/cps/Makefile
 create mode 100644 board/comelit/cps/config.mk
 create mode 100644 board/comelit/cps/cps.c
 create mode 100644 board/comelit/cps/cps.h
 create mode 100644 include/configs/omap3_cps.h
MAINTAINERS +4 -0
index 4756f14..8030184 100644
@@ -599,6 +599,10 @@ Rick Bronson <[email protected]>
 
 	AT91RM9200DK	at91rm9200
 
+Luca Ceresoli <[email protected]>
+
+	omap3_cps	ARM ARMV7 (OMAP3530 SoC)
+
 Po-Yu Chuang <[email protected]>
 
 	a320evb		FA526 (ARM920T-like) (a320 SoC)
MAKEALL +1 -0
index a732e6a..2e59992 100755
@@ -425,6 +425,7 @@ LIST_ARMV7="		\
 	igep0030		\
 	mx51evk			\
 	omap3_beagle		\
+	omap3_cps		\
 	omap3_overo		\
 	omap3_evm		\
 	omap3_pandora		\
board/comelit/cps/Makefile new file +49 -0

49 lines not on this page · raw message

board/comelit/cps/config.mk new file +36 -0
new file mode 100644
index 0000000..e1fcafd
@@ -0,0 +1,36 @@
+#
+# (C) Copyright 2011 Comelit Group SpA
+# Luca Ceresoli <[email protected]>
+#
+# Based on board/ti/beagle/config.mk:
+# (C) Copyright 2006
+# Texas Instruments, <www.ti.com>
+#
+# Comelit CPS Board uses OMAP3 (ARM-CortexA8) CPU.
+#
+# 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)
+# A000/0000 (bank1)
+# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000
+# (mem base + reserved)
+
+# For use with external or internal boots.
+CONFIG_SYS_TEXT_BASE = 0x80008000
board/comelit/cps/cps.c new file +173 -0

173 lines not on this page · raw message

board/comelit/cps/cps.h new file +379 -0

379 lines not on this page · raw message

boards.cfg +1 -0
index 45c3102..62a25a7 100644
@@ -117,6 +117,7 @@ omap3_pandora                arm         armv7       pandora             -
 igep0020                     arm         armv7       igep0020            isee           omap3
 igep0030                     arm         armv7       igep0030            isee           omap3
 am3517_evm                   arm         armv7       am3517evm           logicpd        omap3
+omap3_cps                    arm         armv7       cps                 comelit        omap3
 omap3_zoom1                  arm         armv7       zoom1               logicpd        omap3
 omap3_zoom2                  arm         armv7       zoom2               logicpd        omap3
 omap3_beagle                 arm         armv7       beagle              ti             omap3
include/configs/omap3_cps.h new file +315 -0

315 lines not on this page · raw message

Signature · 1 line
1.7.1
#2 lore raw

PATCH 1/1 ARMV7: OMAP3: Add support for Comelit CPS board

Dear Luca Ceresoli,

Quoted 4 lines · In message <[email protected]> you…

Board support for the Comelit Group SpA CPS board, which is a custom board based on the BeagleBoard <http://beagleboard.org/> by Texas Instruments.

The board support is based on the BeagleBoard implementation.

It appears you base this code on an old version of U-Boot. Please update your code base first.

ALso make sure to run your patch to checkpatch before submitting:

[PATCH] ARMV7: OMAP3: Add support for Comelit CPS board
total: 4 errors, 325 warnings, 976 lines checked

Please fix these!

Quoted 2 lines
board/comelit/cps/config.mk new file +0 -0

...

Quoted 1 line

+CONFIG_SYS_TEXT_BASE = 0x80008000

We don't accept such config.mk files any more. Please move definition into your board config file.

board/comelit/cps/config.mk

Quoted 5 lines
board/comelit/cps/config.mk new file +5 -0
+	/* GPIO list
+	   - 159 OUT (GPIO5+31): reset for remote camera interface connector.
+	   - 19  OUT (GPIO1+19): integrated speaker amplifier (1=on, 0=shdn).
+	   - 20  OUT (GPIO1+20): handset amplifier (1=on, 0=shdn).
+	*/

Incorrect multiline comment style.

...

boards.cfg omap3_pandora arm armv7 pandora - · line 123

Quoted 10 lines
boards.cfg +1 -0
@@ -117,6 +117,7 @@ omap3_pandora                arm         armv7       pandora             -
 igep0020                     arm         armv7       igep0020            isee           omap3
 igep0030                     arm         armv7       igep0030            isee           omap3
 am3517_evm                   arm         armv7       am3517evm           logicpd        omap3
+omap3_cps                    arm         armv7       cps                 comelit        omap3
 omap3_zoom1                  arm         armv7       zoom1               logicpd        omap3
 omap3_zoom2                  arm         armv7       zoom2               logicpd        omap3
 omap3_beagle                 arm         armv7       beagle              ti             omap3

Please name your board just "cps" (or chose a better name). There shall be no SoC-prefix in the board names.

Quoted 3 lines
include/configs/omap3_cps.h new file +0 -0
@@ -0,0 +1,315 @@

...

include/configs/omap3_cps.h line 42

Quoted 5 lines
include/configs/omap3_cps.h new file +5 -0
+#define CONFIG_ARMV7		1	/* This is an ARM V7 CPU core */
+#define CONFIG_OMAP		1	/* in a TI OMAP core */
+#define CONFIG_OMAP34XX		1	/* which is a 34XX */
+#define CONFIG_OMAP3430		1	/* which is in a 3430 */
+#define CONFIG_OMAP3_CPS   	1	/* working with CPS board */

#defines like these which select a feature shall not have values assigned. Remove all these '1' here. Please fix globally.

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
At the source of every error which is blamed on the computer you will
find at least two human errors, including the error of blaming it  on
the computer.
#3 lore raw

PATCH 1/1 ARMV7: OMAP3: Add support for Comelit CPS board

Wolfgang,

thanks for your patient and prompt review, and sorry for having overlooked checkpatch.

Il 21/03/2011 12:55, Wolfgang Denk ha scritto:

Quoted 10 lines

Dear Luca Ceresoli,

Quoted 4 lines · In message<[email protected]> you…

Board support for the Comelit Group SpA CPS board, which is a custom board based on the BeagleBoard<http://beagleboard.org/> by Texas Instruments.

The board support is based on the BeagleBoard implementation.

It appears you base this code on an old version of U-Boot. Please update your code base first.

Strange.

My patch is based on current master, on the latest commit that I see today on git://git.denx.de/u-boot.git:

$ git show HEAD^
commit cc1dd33f273f8c96cbd7539b4a2d1d7aa12773cd
Author: John Schmoller <[email protected]>
Date:   Thu Mar 10 16:09:26 2011 -0600

mpc8[5/6]xx: Ensure POST word does not get reset
...

The "next" branch is much older, and I haven't found any more recent head in either u-boot-arm nor u-boot-ti.

Where should I rebase my code on?

Quoted 7 lines

ALso make sure to run your patch to checkpatch before submitting:

[PATCH] ARMV7: OMAP3: Add support for Comelit CPS board
total: 4 errors, 325 warnings, 976 lines checked

Please fix these!

Fixed most of them for v2. There are still a few warnings, though, that I think are false positives:

Quoted 3 lines

WARNING: Use #include <linux/io.h> instead of <asm/io.h> #169: FILE: board/comelit/cps/cps.c:39:
+#include <asm/io.h>

I guess I can safely ignore this one.

Quoted 1 line

WARNING: Use of volatile is usually wrong: see

Documentation/volatile-considered-harmful.txt

Quoted 2 lines

#1011: FILE: include/configs/omap3_cps.h:305:
+extern volatile unsigned int boot_flash_env_addr;

I don't know why it is volatile, but since it's defined this way in arch/arm/cpu/armv7/omap3/mem.c I think there's a reason.

Quoted 8 lines
Quoted 3 lines
board/comelit/cps/config.mk new file +0 -0

...

Quoted 1 line

+CONFIG_SYS_TEXT_BASE = 0x80008000

We don't accept such config.mk files any more. Please move definition into your board config file.

Meaning I should remove config.mk entirely, right?

Quoted 8 lines

board/comelit/cps/config.mk

Quoted 6 lines
board/comelit/cps/config.mk new file +5 -0
+	/* GPIO list
+	   - 159 OUT (GPIO5+31): reset for remote camera interface connector.
+	   - 19  OUT (GPIO1+19): integrated speaker amplifier (1=on, 0=shdn).
+	   - 20  OUT (GPIO1+20): handset amplifier (1=on, 0=shdn).
+	*/

Incorrect multiline comment style.

Will fix in v2.

Quoted 15 lines

...

boards.cfg omap3_pandora arm armv7 pandora - · line 123

Quoted 10 lines
boards.cfg +1 -0
@@ -117,6 +117,7 @@ omap3_pandora                arm         armv7       pandora             -
  igep0020                     arm         armv7       igep0020            isee           omap3
  igep0030                     arm         armv7       igep0030            isee           omap3
  am3517_evm                   arm         armv7       am3517evm           logicpd        omap3
+omap3_cps                    arm         armv7       cps                 comelit        omap3
  omap3_zoom1                  arm         armv7       zoom1               logicpd        omap3
  omap3_zoom2                  arm         armv7       zoom2               logicpd        omap3
  omap3_beagle                 arm         armv7       beagle              ti             omap3

Please name your board just "cps" (or chose a better name). There shall be no SoC-prefix in the board names.

Will be called dig297 in v2.

Quoted 5 lines
Quoted 4 lines
include/configs/omap3_cps.h new file +0 -0
@@ -0,0 +1,315 @@

...

Quoted 9 lines

include/configs/omap3_cps.h line 42

Quoted 5 lines
include/configs/omap3_cps.h new file +5 -0
+#define CONFIG_ARMV7		1	/* This is an ARM V7 CPU core */
+#define CONFIG_OMAP		1	/* in a TI OMAP core */
+#define CONFIG_OMAP34XX		1	/* which is a 34XX */
+#define CONFIG_OMAP3430		1	/* which is in a 3430 */
+#define CONFIG_OMAP3_CPS   	1	/* working with CPS board */

#defines like these which select a feature shall not have values assigned. Remove all these '1' here. Please fix globally.

Ok except for OMAP34XX, since arch/arm/cpu/armv7/start.S at line 114 does:

Quoted 1 line

#if (CONFIG_OMAP34XX)

Is it intended?
If that's a mistake, I can submit a trivial patch to fix it.

Quoted 4 lines

Best regards,

Wolfgang Denk

Luca

#4 lore raw

PATCH 1/1 ARMV7: OMAP3: Add support for Comelit CPS board

Il 21/03/2011 17:32, Luca Ceresoli ha scritto:
...

Quoted 14 lines
Quoted 5 lines
Quoted 5 lines
boards.cfg +0 -0
@@ -117,6 +117,7 @@ omap3_pandora                arm         armv7       pandora             -
   igep0020                     arm         armv7       igep0020            isee           omap3
   igep0030                     arm         armv7       igep0030            isee           omap3
Quoted 8 lines

boards.cfg omap3_pandora arm armv7 pandora - · line 123

Quoted 5 lines
boards.cfg +1 -0
   am3517_evm                   arm         armv7       am3517evm           logicpd        omap3
+omap3_cps                    arm         armv7       cps                 comelit        omap3
   omap3_zoom1                  arm         armv7       zoom1               logicpd        omap3
   omap3_zoom2                  arm         armv7       zoom2               logicpd        omap3
   omap3_beagle                 arm         armv7       beagle              ti             omap3

Please name your board just "cps" (or chose a better name). There shall be no SoC-prefix in the board names.

Quoted 1 line

Will be called dig297 in v2.

Well, not so fast.

The board is named OMAP3_CPS in the ARM Linux Machine Registry
(http://www.arm.linux.org.uk/developer/machines/list.php?id=2751),
which is reflected in mach-types.h.

I don't know how exactly the registry info is used throughout U-Boot, and I didn't find documentation about it.

Am I supposed to rename the board in the registry, then wait for mach-types to be updated in U-Boot before submitting a new patch?

Or can I live with the current name in mach-types and rename elsewhere?

Thanks,
Luca

#5 lore raw

PATCH 1/1 ARMV7: OMAP3: Add support for Comelit CPS board

Dear Luca Ceresoli,

Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 2 lines

Will be called dig297 in v2.

Well, not so fast.

The board is named OMAP3_CPS in the ARM Linux Machine Registry
(http://www.arm.linux.org.uk/developer/machines/list.php?id=2751),
which is reflected in mach-types.h.

If you want, you can ask for a name change in the Machine Registry. On the other hand, I see no inherent issues when the board config name 0n U-Boot (and Linux?) don't match the MACH_ID's name.

But I forgot one thing: it seems also a good idear that the board config names in U-Boot and Linux match. But you don't have any Linux kernel code pushed upstream yet, or have you?

Quoted 2 lines

Am I supposed to rename the board in the registry, then wait for mach-types to be updated in U-Boot before submitting a new patch?

No, this is not really necessary.

Quoted 1 line

Or can I live with the current name in mach-types and rename elsewhere?

Yes. You may want to clean that up in the near future, but it's not blocking anything here.

Best regards,

Wolfgang Denk

Signature · 4 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
1 1 was a race-horse, 2 2 was 1 2. When 1 1 1 1 race, 2 2 1 1 2.
#6 lore raw

PATCH 1/1 ARMV7: OMAP3: Add support for Comelit CPS board

In reply to Luca Ceresoli

Dear Luca Ceresoli,

Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 3 lines

It appears you base this code on an old version of U-Boot. Please update your code base first.

Strange.

My patch is based on current master, on the latest commit that I see today on git://git.denx.de/u-boot.git:

Sorry. I thought we had cleaned up the config.mk file use for these boards long ago. Seems I was wrong.

Quoted 5 lines
Quoted 3 lines

WARNING: Use #include <linux/io.h> instead of <asm/io.h> #169: FILE: board/comelit/cps/cps.c:39:
+#include <asm/io.h>

I guess I can safely ignore this one.

Yes.

Quoted 7 lines
Quoted 1 line

WARNING: Use of volatile is usually wrong: see

Documentation/volatile-considered-harmful.txt

Quoted 2 lines

#1011: FILE: include/configs/omap3_cps.h:305:
+extern volatile unsigned int boot_flash_env_addr;

I don't know why it is volatile, but since it's defined this way in arch/arm/cpu/armv7/omap3/mem.c I think there's a reason.

No, this should be removed. See
Documentation/volatile-considered-harmful.txt

Quoted 4 lines
Quoted 2 lines

We don't accept such config.mk files any more. Please move definition into your board config file.

Meaning I should remove config.mk entirely, right?

Right.

Quoted 4 lines
Quoted 2 lines

Please name your board just "cps" (or chose a better name). There shall be no SoC-prefix in the board names.

Will be called dig297 in v2.

Thanks.

Quoted 11 lines
Quoted 3 lines

#defines like these which select a feature shall not have values assigned. Remove all these '1' here. Please fix globally.

Ok except for OMAP34XX, since arch/arm/cpu/armv7/start.S at line 114 does:

Quoted 1 line

#if (CONFIG_OMAP34XX)

Is it intended?
If that's a mistake, I can submit a trivial patch to fix it.

Ouch. This is wrong and should be fixed. Yes, please send a (separate) patch for that.

Best regards,

Wolfgang Denk

Signature · 4 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
My play was a complete success.  The audience was a failure.
#7 lore raw
In reply to Luca Ceresoli

Hi all,

here's a patch series that incorporates all the changes required during the review of v1.
Patches 1 to 3 are cleanups to issues that were discovered up during discussion.

Please note that the new board code is not working (see
http://lists.denx.de/pipermail/u-boot/2011-March/088704.html for the detailed explanation). The goal of this patch submission is to get it both working and integrated upstream.

Patch index:
- ARMV7: OMAP3: Fix preprocessor check for CONFIG_OMAP34XX
- ARMV7: OMAP3: Remove unused variable boot_flash_env_addr
- ARMV7: OMAP3: boot_flash_env_addr should not be volatile
- ARMV7: OMAP3: Add support for Comelit DIG297 board

Luca

#8 lore raw

v3 cover Add DIG297 board and OMAP3 fixes

Hi all,

here's a resubmit of the DIG297 board support with minor OMAP3 fixes.

The board support is now working. It's always been working indeed, I was just doing the same mistake reported here:
http://lists.denx.de/pipermail/u-boot/2011-March/089238.html.

v3 just fixes little typos in the commit messages. The content is the same.

Luca Ceresoli (4):
ARMV7: OMAP3: Fix preprocessor check for CONFIG_OMAP34XX
ARMV7: OMAP3: Remove unused variable boot_flash_env_addr
ARMV7: OMAP3: boot_flash_env_addr should not be volatile
ARMV7: OMAP3: Add support for Comelit DIG297 board

Luca

#9 lore raw

PATCH v3 1/4 ARMV7: OMAP3: Fix preprocessor check for CONFIG_OMAP34XX

CONFIG_OMAP34XX must be checked for existence, not value.

Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
Changes in v2:
- this patch is new in v2.

Changes in v3: none.

 arch/arm/cpu/armv7/start.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/cpu/armv7/start.S +1 -1
index d83d501..6387b8b 100644
@@ -115,7 +115,7 @@ reset:
 	orr	r0, r0, #0xd3
 	msr	cpsr,r0
 
-#if (CONFIG_OMAP34XX)
+#if defined(CONFIG_OMAP34XX)
 	/* Copy vectors to mask ROM indirect addr */
 	adr	r0, _start		@ r0 <- current position of code
 	add	r0, r0, #4		@ skip reset vector
Signature · 1 line
1.7.1
#10 lore raw

PATCH v3 1/4 ARMV7: OMAP3: Fix preprocessor check for CONFIG_OMAP34XX

In reply to Luca Ceresoli

CONFIG_OMAP34XX must be checked for existence, not value.

Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
Changes in v2:
- this patch is new in v2.

Changes in v3: none.

Changes in v4: none.

 arch/arm/cpu/armv7/start.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/cpu/armv7/start.S +1 -1
index d83d501..6387b8b 100644
@@ -115,7 +115,7 @@ reset:
 	orr	r0, r0, #0xd3
 	msr	cpsr,r0
 
-#if (CONFIG_OMAP34XX)
+#if defined(CONFIG_OMAP34XX)
 	/* Copy vectors to mask ROM indirect addr */
 	adr	r0, _start		@ r0 <- current position of code
 	add	r0, r0, #4		@ skip reset vector
Signature · 1 line
1.7.1
#11 lore raw

PATCH v3 2/4 ARMV7: OMAP3: Remove unused variable boot_flash_env_addr

In reply to Luca Ceresoli
Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
Changes in v2:
- this patch is new in v2.

Changes in v3: none.

 include/configs/cm_t35.h        |    1 -
 include/configs/devkit8000.h    |    1 -
 include/configs/omap3_beagle.h  |    1 -
 include/configs/omap3_overo.h   |    1 -
 include/configs/omap3_pandora.h |    1 -
 include/configs/omap3_sdp3430.h |    1 -
 include/configs/omap3_zoom1.h   |    1 -
 include/configs/omap3_zoom2.h   |    1 -
 8 files changed, 0 insertions(+), 8 deletions(-)
include/configs/cm_t35.h +0 -1
index 510c6d4..2c5f13b 100644
@@ -326,7 +326,6 @@
 
 #ifndef __ASSEMBLY__
 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;
include/configs/devkit8000.h +0 -1
index d898b77..060d7a6 100644
@@ -301,7 +301,6 @@
 
 #ifndef __ASSEMBLY__
 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;
include/configs/omap3_beagle.h +0 -1
index 5cfa4cb..d010ff7 100644
@@ -322,7 +322,6 @@
 
 #ifndef __ASSEMBLY__
 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;
include/configs/omap3_overo.h +0 -1
index 1b3d439..1bf837e 100644
@@ -287,7 +287,6 @@
 
 #ifndef __ASSEMBLY__
 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;
include/configs/omap3_pandora.h +0 -1
index 72b0cc2..2561428 100644
@@ -276,7 +276,6 @@
 
 #ifndef __ASSEMBLY__
 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;
include/configs/omap3_sdp3430.h +0 -1
index 4708981..ad0d501 100644
@@ -362,7 +362,6 @@
 
 #ifndef __ASSEMBLY__
 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;
include/configs/omap3_zoom1.h +0 -1
index f7d0652..4cec6a9 100644
@@ -301,7 +301,6 @@
 
 #ifndef __ASSEMBLY__
 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;
include/configs/omap3_zoom2.h +0 -1
index 7377933..0736cef 100644
@@ -268,7 +268,6 @@
 
 #ifndef __ASSEMBLY__
 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;
Signature · 1 line
1.7.1
#12 lore raw

PATCH v3 2/4 ARMV7: OMAP3: Cleanup extern variables in mem.c

In reply to Luca Ceresoli

Removed boot_flash_* extern variables.
boot_flash_type was totally unused. The other ones were actually constants, so they have been replaced with #defines in the board config files.

Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
Changes in v4:
- this patch is new in v4.

 arch/arm/cpu/armv7/omap3/mem.c  |   32 --------------------------------
 include/configs/am3517_evm.h    |   18 ++++++------------
 include/configs/cm_t35.h        |   16 +++++-----------
 include/configs/devkit8000.h    |   10 +---------
 include/configs/omap3_beagle.h  |   16 +++++-----------
 include/configs/omap3_evm.h     |   26 ++++++++++++--------------
 include/configs/omap3_overo.h   |   16 +++++-----------
 include/configs/omap3_pandora.h |   16 +++++-----------
 include/configs/omap3_sdp3430.h |   10 ----------
 include/configs/omap3_zoom1.h   |   16 +++++-----------
 include/configs/omap3_zoom2.h   |   16 +++++-----------
 11 files changed, 49 insertions(+), 143 deletions(-)
arch/arm/cpu/armv7/omap3/mem.c +0 -32
index bd914b0..a01c303 100644
@@ -31,16 +31,6 @@
 #include <asm/arch/sys_proto.h>
 #include <command.h>
 
-/*
- * Only One NAND allowed on board at a time.
- * The GPMC CS Base for the same
- */
-unsigned int boot_flash_base;
-unsigned int boot_flash_off;
-unsigned int boot_flash_sec;
-unsigned int boot_flash_type;
-volatile unsigned int boot_flash_env_addr;
-
 struct gpmc *gpmc_cfg;
 
 #if defined(CONFIG_CMD_NAND)
@@ -134,10 +124,6 @@ void gpmc_init(void)
 	const u32 *gpmc_config = NULL;
 	u32 base = 0;
 	u32 size = 0;
-#if defined(CONFIG_ENV_IS_IN_NAND) || defined(CONFIG_ENV_IS_IN_ONENAND)
-	u32 f_off = CONFIG_SYS_MONITOR_LEN;
-	u32 f_sec = 0;
-#endif
 #endif
 	u32 config = 0;
 
@@ -162,15 +148,6 @@ void gpmc_init(void)
 	base = PISMO1_NAND_BASE;
 	size = PISMO1_NAND_SIZE;
 	enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[0], base, size);
-#if defined(CONFIG_ENV_IS_IN_NAND)
-	f_off = SMNAND_ENV_OFFSET;
-	f_sec = (128 << 10);	/* 128 KiB */
-	/* env setup */
-	boot_flash_base = base;
-	boot_flash_off = f_off;
-	boot_flash_sec = f_sec;
-	boot_flash_env_addr = f_off;
-#endif
 #endif
 
 #if defined(CONFIG_CMD_ONENAND)
@@ -178,14 +155,5 @@ void gpmc_init(void)
 	base = PISMO1_ONEN_BASE;
 	size = PISMO1_ONEN_SIZE;
 	enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[0], base, size);
-#if defined(CONFIG_ENV_IS_IN_ONENAND)
-	f_off = ONENAND_ENV_OFFSET;
-	f_sec = (128 << 10);	/* 128 KiB */
-	/* env setup */
-	boot_flash_base = base;
-	boot_flash_off = f_off;
-	boot_flash_sec = f_sec;
-	boot_flash_env_addr = f_off;
-#endif
 #endif
 }
include/configs/am3517_evm.h +6 -12
index 70e8f07..f5d5821 100644
@@ -294,7 +294,9 @@
 #define CONFIG_SYS_MAX_FLASH_BANKS	2	/* max number of flash banks */
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -304,9 +306,9 @@
 #define CONFIG_ENV_IS_IN_NAND		1
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
-#define CONFIG_ENV_ADDR			boot_flash_env_addr
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
+#define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
 /*-----------------------------------------------------------------------
  * CFI FLASH driver setup
@@ -323,14 +325,6 @@
 #define CONFIG_SYS_JFFS2_FIRST_BANK	CONFIG_SYS_MAX_FLASH_BANKS
 #define CONFIG_SYS_JFFS2_NUM_BANKS	1
 
-#ifndef __ASSEMBLY__
-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
-
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
 #define CONFIG_SYS_INIT_RAM_ADDR	0x4020f800
 #define CONFIG_SYS_INIT_RAM_SIZE	0x800
include/configs/cm_t35.h +5 -11
index 510c6d4..ee9175d 100644
@@ -310,7 +310,9 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -320,18 +322,10 @@
 #define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-#ifndef __ASSEMBLY__
-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
-
 #if defined(CONFIG_CMD_NET)
 #define CONFIG_NET_MULTI
 #define CONFIG_SMC911X
include/configs/devkit8000.h +1 -9
index d898b77..4ba3d91 100644
@@ -297,15 +297,7 @@
 #define CONFIG_ENV_IS_IN_NAND		1
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_ENV_OFFSET		boot_flash_off
-
-#ifndef __ASSEMBLY__
-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
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 
 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
 #define CONFIG_SYS_INIT_RAM_ADDR        0x4020f800
include/configs/omap3_beagle.h +5 -11
index 5cfa4cb..9c35a1d 100644
@@ -306,7 +306,9 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -316,18 +318,10 @@
 #define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-#ifndef __ASSEMBLY__
-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
-
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
 #define CONFIG_SYS_INIT_RAM_ADDR	0x4020f800
 #define CONFIG_SYS_INIT_RAM_SIZE	0x800
include/configs/omap3_evm.h +12 -14
index 5bdb3fd..5ec079c 100644
@@ -298,33 +298,31 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#elif defined(CONFIG_CMD_ONENAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_ONEN_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
 #define CONFIG_SYS_ONENAND_BASE		ONENAND_MAP
 
+#define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
+#define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
+
 #if defined(CONFIG_CMD_NAND)
 #define CONFIG_NAND_OMAP_GPMC
 #define GPMC_NAND_ECC_LP_x16_LAYOUT	1
 #define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #elif defined(CONFIG_CMD_ONENAND)
 #define CONFIG_ENV_IS_IN_ONENAND	1
+#define CONFIG_ENV_OFFSET		ONENAND_ENV_OFFSET
 #endif
-#define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
-#define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
-#define CONFIG_ENV_ADDR			boot_flash_env_addr
-
-#ifndef __ASSEMBLY__
-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
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_ADDR			CONFIG_ENV_OFFSET
 
 /*
  * Support for relocation
include/configs/omap3_overo.h +5 -11
index 1b3d439..44a6eb7 100644
@@ -271,7 +271,9 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -281,18 +283,10 @@
 #define ONENAND_ENV_OFFSET		0x240000 /* environment starts here */
 #define SMNAND_ENV_OFFSET		0x240000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-#ifndef __ASSEMBLY__
-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
-
 #if defined(CONFIG_CMD_NET)
 /*----------------------------------------------------------------------------
  * SMSC9211 Ethernet from SMSC9118 family
include/configs/omap3_pandora.h +5 -11
index 72b0cc2..7b6883c 100644
@@ -262,7 +262,9 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -270,16 +272,8 @@
 #define CONFIG_ENV_IS_IN_NAND		1
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-#ifndef __ASSEMBLY__
-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
-
 #endif				/* __CONFIG_H */
include/configs/omap3_sdp3430.h +0 -10
index 4708981..5ddf920 100644
@@ -358,14 +358,4 @@
  *  - rest for filesystem
  */
 
-/*--------------------------------------------------------------------------*/
-
-#ifndef __ASSEMBLY__
-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
-
 #endif				/* __CONFIG_H */
include/configs/omap3_zoom1.h +5 -11
index f7d0652..2bfda4b 100644
@@ -285,7 +285,9 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -295,16 +297,8 @@
 #define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-#ifndef __ASSEMBLY__
-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
-
 #endif				/* __CONFIG_H */
include/configs/omap3_zoom2.h +5 -11
index 7377933..dadca28 100644
@@ -254,7 +254,9 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor@start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -262,16 +264,8 @@
 #define CONFIG_ENV_IS_IN_NAND		1
 #define SMNAND_ENV_OFFSET		0x0c0000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-#ifndef __ASSEMBLY__
-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
-
 #endif /* __CONFIG_H */
Signature · 1 line
1.7.1
#13 lore raw

v3 cover Add DIG297 board and OMAP3 fixes

In reply to Luca Ceresoli

Dear custodians,

Quoted 2 lines · Luca Ceresoli

Hi all,
here's a resubmit of the DIG297 board support with minor OMAP3 fixes.

Sorry for the newbie question, but I didn't find the answer in the docs.

Now that the Merge Window is open, do I have to rebase these patches on top of v2011.03 and resubmit them as "v4"?

FYI, v3 cleanly applies also on top of v2011.03 without any changes and it works fine, so that would be a trivial rebase.

Thanks,
Luca

#14 lore raw

cover Add DIG297 board and OMAP3 fixes

In reply to Luca Ceresoli

Hi all,

this patch series cleans up some OMAP3 stuff and adds DIG297 board support.

New in v4:
- patch 2 gets rid of some ugly extern variables in mem.c;
- patch 3 creates a new file for register definitions (inspired by the pxa and imx code base), and defines GPMC_CONFIGx register values.

Luca

Luca Ceresoli (4):
ARMV7: OMAP3: Fix preprocessor check for CONFIG_OMAP34XX
ARMV7: OMAP3: Cleanup extern variables in mem.c
ARMV7: OMAP3: Add GPMC_CONFIGx register value definitions
ARMV7: OMAP3: Add support for Comelit DIG297 board

 MAINTAINERS                                  |    4 +
 MAKEALL                                      |    1 +
 arch/arm/cpu/armv7/omap3/mem.c               |   32 ---
 arch/arm/cpu/armv7/start.S                   |    2 +-
 arch/arm/include/asm/arch-omap3/omap3-regs.h |   95 +++++++
 board/comelit/dig297/Makefile                |   49 ++++
 board/comelit/dig297/dig297.c                |  187 +++++++++++++
 board/comelit/dig297/dig297.h                |  383 ++++++++++++++++++++++++++
 boards.cfg                                   |    1 +
 include/configs/am3517_evm.h                 |   18 +-
 include/configs/cm_t35.h                     |   16 +-
 include/configs/devkit8000.h                 |   10 +-
 include/configs/dig297.h                     |  311 +++++++++++++++++++++
 include/configs/omap3_beagle.h               |   16 +-
 include/configs/omap3_evm.h                  |   26 +-
 include/configs/omap3_overo.h                |   16 +-
 include/configs/omap3_pandora.h              |   16 +-
 include/configs/omap3_sdp3430.h              |   10 -
 include/configs/omap3_zoom1.h                |   16 +-
 include/configs/omap3_zoom2.h                |   16 +-
 20 files changed, 1081 insertions(+), 144 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-omap3/omap3-regs.h
 create mode 100644 board/comelit/dig297/Makefile
 create mode 100644 board/comelit/dig297/dig297.c
 create mode 100644 board/comelit/dig297/dig297.h
 create mode 100644 include/configs/dig297.h
#15 lore raw

PATCH v3 3/4 ARMV7: OMAP3: boot_flash_env_addr should not be volatile

In reply to Luca Ceresoli
Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
Changes in v2:
- this patch is new in v2.

Changes in v3: none.

 arch/arm/cpu/armv7/omap3/mem.c |    2 +-
 include/configs/am3517_evm.h   |    2 +-
 include/configs/omap3_evm.h    |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/cpu/armv7/omap3/mem.c +1 -1
index bd914b0..e9de05d 100644
@@ -39,7 +39,7 @@ unsigned int boot_flash_base;
 unsigned int boot_flash_off;
 unsigned int boot_flash_sec;
 unsigned int boot_flash_type;
-volatile unsigned int boot_flash_env_addr;
+unsigned int boot_flash_env_addr;
 
 struct gpmc *gpmc_cfg;
 
include/configs/am3517_evm.h +1 -1
index 70e8f07..bc2e8bb 100644
@@ -325,7 +325,7 @@
 
 #ifndef __ASSEMBLY__
 extern unsigned int boot_flash_base;
-extern volatile unsigned int boot_flash_env_addr;
+extern unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
 extern unsigned int boot_flash_sec;
 extern unsigned int boot_flash_type;
include/configs/omap3_evm.h +1 -1
index 5bdb3fd..570e794 100644
@@ -320,7 +320,7 @@
 
 #ifndef __ASSEMBLY__
 extern unsigned int boot_flash_base;
-extern volatile unsigned int boot_flash_env_addr;
+extern unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
 extern unsigned int boot_flash_sec;
 extern unsigned int boot_flash_type;
Signature · 1 line
1.7.1
#16 lore raw

PATCH v3 3/4 ARMV7: OMAP3: boot_flash_env_addr should not be volatile

Dear Luca Ceresoli,

Quoted 46 lines · In message <[email protected]> you…
Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
Changes in v2:
- this patch is new in v2.

Changes in v3: none.

 arch/arm/cpu/armv7/omap3/mem.c |    2 +-
 include/configs/am3517_evm.h   |    2 +-
 include/configs/omap3_evm.h    |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/cpu/armv7/omap3/mem.c +1 -1
index bd914b0..e9de05d 100644
@@ -39,7 +39,7 @@ unsigned int boot_flash_base;
 unsigned int boot_flash_off;
 unsigned int boot_flash_sec;
 unsigned int boot_flash_type;
-volatile unsigned int boot_flash_env_addr;
+unsigned int boot_flash_env_addr;
 
 struct gpmc *gpmc_cfg;
 
include/configs/am3517_evm.h +1 -1
index 70e8f07..bc2e8bb 100644
@@ -325,7 +325,7 @@
 
 #ifndef __ASSEMBLY__
 extern unsigned int boot_flash_base;
-extern volatile unsigned int boot_flash_env_addr;
+extern unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
 extern unsigned int boot_flash_sec;
 extern unsigned int boot_flash_type;
include/configs/omap3_evm.h +0 -0
index 5bdb3fd..570e794 100644

include/configs/omap3_evm.h line 326

Quoted 8 lines
include/configs/omap3_evm.h +1 -1
@@ -320,7 +320,7 @@
 
 #ifndef __ASSEMBLY__
 extern unsigned int boot_flash_base;
-extern volatile unsigned int boot_flash_env_addr;
+extern unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
 extern unsigned int boot_flash_sec;
 extern unsigned int boot_flash_type;

Can we please get rid off all these extern declarations in board config files? It is a maintenance nightmare that we have to repeat allt hese stuff in several board config files - this is a clear indication of a design problem, that needs to be fixed.

Can we please move this stuff to some common place instead?

Thanks.

Best regards,

Wolfgang Denk

Signature · 4 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
If all you have is a hammer, everything looks like a nail.
#17 lore raw

PATCH v3 3/4 ARMV7: OMAP3: Add GPMC_CONFIGx register value definitions

In reply to Luca Ceresoli

---
Changes in v4:
- this patch is new in v4.

 arch/arm/include/asm/arch-omap3/omap3-regs.h |   95 ++++++++++++++++++++++++++
 1 files changed, 95 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-omap3/omap3-regs.h
arch/arm/include/asm/arch-omap3/omap3-regs.h new file +95 -0
new file mode 100644
index 0000000..818214f
@@ -0,0 +1,95 @@
+/*
+ * (c) 2011 Comelit Group SpA, Luca Ceresoli <[email protected]>
+ *
+ * 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
+ */
+
+#ifndef _OMAP3_REGS_H
+#define _OMAP3_REGS_H
+
+/*
+ * Register definitions for OMAP3 processors.
+ */
+
+/*
+ * GPMC_CONFIG1 - GPMC_CONFIG7
+ */
+
+/* Values for GPMC_CONFIG1 - signal control parameters */
+#define WRAPBURST                     (1 << 31)
+#define READMULTIPLE                  (1 << 30)
+#define READTYPE                      (1 << 29)
+#define WRITEMULTIPLE                 (1 << 28)
+#define WRITETYPE                     (1 << 27)
+#define CLKACTIVATIONTIME(x)          (((x) & 3) << 25)
+#define ATTACHEDDEVICEPAGELENGTH(x)   (((x) & 3) << 23)
+#define WAITREADMONITORING            (1 << 22)
+#define WAITWRITEMONITORING           (1 << 21)
+#define WAITMONITORINGTIME(x)         (((x) & 3) << 18)
+#define WAITPINSELECT(x)              (((x) & 3) << 16)
+#define DEVICESIZE(x)                 (((x) & 3) << 12)
+#define DEVICESIZE_8BIT               DEVICESIZE(0)
+#define DEVICESIZE_16BIT              DEVICESIZE(1)
+#define DEVICETYPE(x)                 (((x) & 3) << 10)
+#define DEVICETYPE_NOR                DEVICETYPE(0)
+#define DEVICETYPE_NAND               DEVICETYPE(2)
+#define MUXADDDATA                    (1 << 9)
+#define TIMEPARAGRANULARITY           (1 << 4)
+#define GPMCFCLKDIVIDER(x)            (((x) & 3) << 0)
+
+/* Values for GPMC_CONFIG2 - CS timing */
+#define CSWROFFTIME(x)   (((x) & 0x1f) << 16)
+#define CSRDOFFTIME(x)   (((x) & 0x1f) <<  8)
+#define CSEXTRADELAY     (1 << 7)
+#define CSONTIME(x)      (((x) &  0xf) <<  0)
+
+/* Values for GPMC_CONFIG3 - nADV timing */
+#define ADVWROFFTIME(x)  (((x) & 0x1f) << 16)
+#define ADVRDOFFTIME(x)  (((x) & 0x1f) <<  8)
+#define ADVEXTRADELAY    (1 << 7)
+#define ADVONTIME(x)     (((x) &  0xf) <<  0)
+
+/* Values for GPMC_CONFIG4 - nWE and nOE timing */
+#define WEOFFTIME(x)     (((x) & 0x1f) << 24)
+#define WEEXTRADELAY     (1 << 23)
+#define WEONTIME(x)      (((x) &  0xf) << 16)
+#define OEOFFTIME(x)     (((x) & 0x1f) <<  8)
+#define OEEXTRADELAY     (1 << 7)
+#define OEONTIME(x)      (((x) &  0xf) <<  0)
+
+/* Values for GPMC_CONFIG5 - RdAccessTime and CycleTime timing */
+#define PAGEBURSTACCESSTIME(x)  (((x) &  0xf) << 24)
+#define RDACCESSTIME(x)         (((x) & 0x1f) << 16)
+#define WRCYCLETIME(x)          (((x) & 0x1f) <<  8)
+#define RDCYCLETIME(x)          (((x) & 0x1f) <<  0)
+
+/* Values for GPMC_CONFIG6 - misc timings */
+#define WRACCESSTIME(x)        (((x) & 0x1f) << 24)
+#define WRDATAONADMUXBUS(x)    (((x) &  0xf) << 16)
+#define CYCLE2CYCLEDELAY(x)    (((x) &  0xf) <<  8)
+#define CYCLE2CYCLESAMECSEN    (1 << 7)
+#define CYCLE2CYCLEDIFFCSEN    (1 << 6)
+#define BUSTURNAROUND(x)       (((x) &  0xf) <<  0)
+
+/* Values for GPMC_CONFIG7 - CS address mapping configuration */
+#define MASKADDRESS(x)         (((x) &  0xf) <<  8)
+#define CSVALID                (1 << 6)
+#define BASEADDRESS(x)         (((x) & 0x3f) <<  0)
+
+#endif /* _OMAP3_REGS_H */
Signature · 1 line
1.7.1
#18 lore raw

PATCH v3 4/4 ARMV7: OMAP3: Add support for Comelit DIG297 board

In reply to Luca Ceresoli

Board support for the DIG297 board manufactured by Comelit Group SpA. It is a custom board based on the BeagleBoard <http://beagleboard.org/> by Texas Instruments.

The board support is based on the BeagleBoard implementation.

Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>
---
 MAINTAINERS                   |    4 +
 MAKEALL                       |    1 +
 board/comelit/dig297/Makefile |   49 ++++++
 board/comelit/dig297/dig297.c |  174 +++++++++++++++++++
 board/comelit/dig297/dig297.h |  380 +++++++++++++++++++++++++++++++++++++++++
 boards.cfg                    |    1 +
 include/configs/dig297.h      |  318 ++++++++++++++++++++++++++++++++++
 7 files changed, 927 insertions(+), 0 deletions(-)
 create mode 100644 board/comelit/dig297/Makefile
 create mode 100644 board/comelit/dig297/dig297.c
 create mode 100644 board/comelit/dig297/dig297.h
 create mode 100644 include/configs/dig297.h
MAINTAINERS +4 -0
index 4756f14..d363710 100644
@@ -599,6 +599,10 @@ Rick Bronson <[email protected]>
 
 	AT91RM9200DK	at91rm9200
 
+Luca Ceresoli <[email protected]>
+
+	dig297		ARM ARMV7 (OMAP3530 SoC)
+
 Po-Yu Chuang <[email protected]>
 
 	a320evb		FA526 (ARM920T-like) (a320 SoC)
MAKEALL +1 -0
index a732e6a..3e28e64 100755
@@ -425,6 +425,7 @@ LIST_ARMV7="		\
 	igep0030		\
 	mx51evk			\
 	omap3_beagle		\
+	dig297			\
 	omap3_overo		\
 	omap3_evm		\
 	omap3_pandora		\
board/comelit/dig297/Makefile new file +49 -0

49 lines not on this page · raw message

board/comelit/dig297/dig297.c new file +174 -0

174 lines not on this page · raw message

board/comelit/dig297/dig297.h new file +380 -0

380 lines not on this page · raw message

boards.cfg +1 -0
index 45c3102..087a633 100644
@@ -117,6 +117,7 @@ omap3_pandora                arm         armv7       pandora             -
 igep0020                     arm         armv7       igep0020            isee           omap3
 igep0030                     arm         armv7       igep0030            isee           omap3
 am3517_evm                   arm         armv7       am3517evm           logicpd        omap3
+dig297                       arm         armv7       dig297              comelit        omap3
 omap3_zoom1                  arm         armv7       zoom1               logicpd        omap3
 omap3_zoom2                  arm         armv7       zoom2               logicpd        omap3
 omap3_beagle                 arm         armv7       beagle              ti             omap3
include/configs/dig297.h new file +318 -0

318 lines not on this page · raw message

Signature · 1 line
1.7.1
#19 lore raw

PATCH v3 4/4 ARMV7: OMAP3: Add support for Comelit DIG297 board

Hi Luca,

Le 29/03/2011 18:28, Luca Ceresoli a ?crit :

MAKEALL LIST_ARMV7=" \ · line 431

Quoted 12 lines
MAKEALL +1 -0
index a732e6a..3e28e64 100755
@@ -425,6 +425,7 @@ LIST_ARMV7="		\
  	igep0030		\
  	mx51evk			\
  	omap3_beagle		\
+	dig297			\
  	omap3_overo		\
  	omap3_evm		\
  	omap3_pandora		\

Please keep the list ordered alphabetically.

If there are no other comments, I'll take the patch set in once V4 is out with the above fixed.

Amicalement,

Signature · 1 line
Albert.
#20 lore raw

PATCH v3 4/4 ARMV7: OMAP3: Add support for Comelit DIG297 board

In reply to Luca Ceresoli

Dear Luca Ceresoli,

Quoted 3 lines · In message <[email protected]> you…

Board support for the DIG297 board manufactured by Comelit Group SpA. It is a custom board based on the BeagleBoard <http://beagleboard.org/> by Texas Instruments.

...

board/comelit/dig297/dig297.c line 62

Quoted 8 lines
board/comelit/dig297/dig297.c new file +8 -0
+/* GPMC CS 5 connected to an SMSC LAN9220 ethernet controller */
+#define NET_LAN9220_GPMC_CONFIG1    0x00001000
+#define NET_LAN9220_GPMC_CONFIG2    0x00080701
+#define NET_LAN9220_GPMC_CONFIG3    0x00020201
+#define NET_LAN9220_GPMC_CONFIG4    0x08010701
+#define NET_LAN9220_GPMC_CONFIG5    0x00061D1D
+#define NET_LAN9220_GPMC_CONFIG6    0x9D030000
+#define NET_LAN9220_GPMC_CONFIG7    0x00000f6c

See below for general comments on the network stuff. For this block:
would it not make sense to replace the magic numbers by sumbolic constants and/or add some documentation what these settings are supposed to do?

board/comelit/dig297/dig297.c line 73

Quoted 2 lines
board/comelit/dig297/dig297.c new file +2 -0
+	/* board id for Linux */
+	gd->bd->bi_arch_number = MACH_TYPE_OMAP3_CPS;

Is this the correct machine ID? "OMAP3_CPS" does not really relate to the board name, "DIG297" ?

board/comelit/dig297/dig297.c line 96

Quoted 5 lines
board/comelit/dig297/dig297.c new file +5 -0
+	/* GPIO list
+	 * - 159 OUT (GPIO5+31): reset for remote camera interface connector.
+	 * - 19  OUT (GPIO1+19): integrated speaker amplifier (1=on, 0=shdn).
+	 * - 20  OUT (GPIO1+20): handset amplifier (1=on, 0=shdn).
+	 */

Incorrect multiline comment style, please fix globally.

Quoted 9 lines
board/comelit/dig297/dig297.c new file +9 -0
+#ifdef CONFIG_CMD_NET
+/*
+ * Routine: setup_net_chip
+ * Description: Setting up the configuration GPMC registers specific to the
+ *	      Ethernet hardware.
+ */
+static void setup_net_chip(void)
+{
+#ifdef CONFIG_SMC911X

board/comelit/dig297/dig297.c line 144

Quoted 10 lines
board/comelit/dig297/dig297.c new file +10 -0
+	struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
+
+	/* Configure GPMC registers */
+	writel(NET_LAN9220_GPMC_CONFIG1, &gpmc_cfg->cs[5].config1);
+	writel(NET_LAN9220_GPMC_CONFIG2, &gpmc_cfg->cs[5].config2);
+	writel(NET_LAN9220_GPMC_CONFIG3, &gpmc_cfg->cs[5].config3);
+	writel(NET_LAN9220_GPMC_CONFIG4, &gpmc_cfg->cs[5].config4);
+	writel(NET_LAN9220_GPMC_CONFIG5, &gpmc_cfg->cs[5].config5);
+	writel(NET_LAN9220_GPMC_CONFIG6, &gpmc_cfg->cs[5].config6);
+	writel(NET_LAN9220_GPMC_CONFIG7, &gpmc_cfg->cs[5].config7);

This is pretty much unreadable.

Quoted 10 lines
board/comelit/dig297/dig297.c new file +10 -0
+	/* 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);
+
+	/* Make GPIO 12 as output pin and send a magic pulse through it */
+	if (!omap_request_gpio(NET_LAN9221_RESET_GPIO)) {

board/comelit/dig297/dig297.c line 165

Quoted 10 lines
board/comelit/dig297/dig297.c new file +10 -0
+		omap_set_gpio_direction(NET_LAN9221_RESET_GPIO, 0);
+		omap_set_gpio_dataout(NET_LAN9221_RESET_GPIO, 1);
+		udelay(1);
+		omap_set_gpio_dataout(NET_LAN9221_RESET_GPIO, 0);
+		udelay(31000);	/* Should be >= 30ms according to datasheet */
+		omap_set_gpio_dataout(NET_LAN9221_RESET_GPIO, 1);
+	}
+#endif /* CONFIG_SMC911X */
+}
+#endif /* CONFIG_CMD_NET */

This is board specific code - is there any chance you will add another network controller? Or that you will undefine CONFIG_SMC911X and still keep CONFIG_CMD_NET defined?

Please check these #ifdef's!

board/comelit/dig297/dig297.c line 174

Quoted 8 lines
board/comelit/dig297/dig297.c new file +8 -0
+int board_eth_init(bd_t *bis)
+{
+	int rc = 0;
+#ifdef CONFIG_SMC911X
+	rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
+#endif
+	return rc;
+}

Also here.

...

board/comelit/dig297/dig297.h line 265

Quoted 5 lines
board/comelit/dig297/dig297.h new file +5 -0
+/* MCSPI1: to TOUCH controller TSC2046 (ADS7846 compatible).*/\
+	MUX_VAL(CP(MCSPI1_CLK),     (IEN  | PTD | EN  | M0)) /*McSPI1_CLK.
+    IEN needed fot the McSPI to "receive" the clock and be able to sample SOMI.
+    See http://e2e.ti.com/support/arm174_microprocessors/
+      omap_applications_processors/f/42/p/29444/102394.aspx#102394 */\

Incorrect multiline comment style. Please fix globally.

Quoted 4 lines
board/comelit/dig297/dig297.h new file +4 -0
+	MUX_VAL(CP(MCSPI1_SIMO),    (IDIS | PTD | EN  | M0)) /*McSPI1_SIMO*/\
+	MUX_VAL(CP(MCSPI1_SOMI),    (IEN  | PTD | EN  | M0)) /*McSPI1_SOMI*/\
+	MUX_VAL(CP(MCSPI1_CS0),     (IDIS | PTU | EN  | M0)) /*McSPI1_CS0*/\
+/* MCSPI2: verso TFT controller HIMAX.*/\

...

Quoted 1 line

+#define CONFIG_SYS_PROMPT "CPS# "

This also does not appear to match your board name ?

Quoted 1 line

+#define CONFIG_SYS_FLASH_BASE boot_flash_base

...

Quoted 2 lines
include/configs/dig297.h new file +2 -0
+#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
+#define CONFIG_ENV_OFFSET		boot_flash_off

...

include/configs/dig297.h line 309

Quoted 6 lines
include/configs/dig297.h new file +6 -0
+#ifndef __ASSEMBLY__
+extern unsigned int boot_flash_base;
+extern unsigned int boot_flash_off;
+extern unsigned int boot_flash_sec;
+extern unsigned int boot_flash_type;
+#endif

Can we please get rid of this?

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
Hi there! This is just a note from me, to you, to tell you, the  per-
son  reading this note, that I can't think up any more famous quotes,
jokes, nor bizarre stories, so you may as well go home.
#21 lore raw

PATCH v3 4/4 ARMV7: OMAP3: Add support for Comelit DIG297 board

Il 06/04/2011 09:50, Wolfgang Denk ha scritto:

Quoted 7 lines

Dear Luca Ceresoli,

Quoted 3 lines · In message<[email protected]> you…

Board support for the DIG297 board manufactured by Comelit Group SpA. It is a custom board based on the BeagleBoard<http://beagleboard.org/> by Texas Instruments.

...

Quoted 12 lines

board/comelit/dig297/dig297.c line 62

Quoted 8 lines
board/comelit/dig297/dig297.c new file +8 -0
+/* GPMC CS 5 connected to an SMSC LAN9220 ethernet controller */
+#define NET_LAN9220_GPMC_CONFIG1    0x00001000
+#define NET_LAN9220_GPMC_CONFIG2    0x00080701
+#define NET_LAN9220_GPMC_CONFIG3    0x00020201
+#define NET_LAN9220_GPMC_CONFIG4    0x08010701
+#define NET_LAN9220_GPMC_CONFIG5    0x00061D1D
+#define NET_LAN9220_GPMC_CONFIG6    0x9D030000
+#define NET_LAN9220_GPMC_CONFIG7    0x00000f6c

See below for general comments on the network stuff. For this block:
would it not make sense to replace the magic numbers by sumbolic constants and/or add some documentation what these settings are supposed to do?

I'm going to define the bit values for the GPMC_CONFIGn registers. Is arch/arm/include/asm/arch-omap3/omap_gpmc.h the correct place?

Quoted 4 lines

board/comelit/dig297/dig297.c line 73

Quoted 2 lines
board/comelit/dig297/dig297.c new file +2 -0
+	/* board id for Linux */
+	gd->bd->bi_arch_number = MACH_TYPE_OMAP3_CPS;

Is this the correct machine ID? "OMAP3_CPS" does not really relate to the board name, "DIG297" ?

As per our previous discussion (see the bottom of
http://lists.denx.de/pipermail/u-boot/2011-March/088964.html), I renamed the board everywhere except for the Machine ID in the ARM registry, and consequently mach-types.h.
As you suggested, I plan to ask for a rename in the registry just after this patch series is integrated in U-Boot, to avoid confusion. The rename in mach-types.h and in my code would follow.

Quoted 6 lines

board/comelit/dig297/dig297.c line 96

Quoted 5 lines
board/comelit/dig297/dig297.c new file +5 -0
+	/* GPIO list
+	 * - 159 OUT (GPIO5+31): reset for remote camera interface connector.
+	 * - 19  OUT (GPIO1+19): integrated speaker amplifier (1=on, 0=shdn).
+	 * - 20  OUT (GPIO1+20): handset amplifier (1=on, 0=shdn).
+	 */

Incorrect multiline comment style, please fix globally.

Do you mean like this?

- /* GPIO list
+ /*
+ * GPIO list
* - 159 OUT (GPIO5+31): reset for remote camera interface connector.
* - 19 OUT (GPIO1+19): integrated speaker amplifier (1=on, 0=shdn).

Quoted 12 lines
Quoted 12 lines
board/comelit/dig297/dig297.c new file +12 -0
+#ifdef CONFIG_CMD_NET
+/*
+ * Routine: setup_net_chip
+ * Description: Setting up the configuration GPMC registers specific to the
+ *	      Ethernet hardware.
+ */
+static void setup_net_chip(void)
+{
+#ifdef CONFIG_SMC911X
+	struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
+
+	/* Configure GPMC registers */
Quoted 8 lines

Review

Quoted 7 lines
(quoted diff) +7 -0
+	writel(NET_LAN9220_GPMC_CONFIG1,&gpmc_cfg->cs[5].config1);
+	writel(NET_LAN9220_GPMC_CONFIG2,&gpmc_cfg->cs[5].config2);
+	writel(NET_LAN9220_GPMC_CONFIG3,&gpmc_cfg->cs[5].config3);
+	writel(NET_LAN9220_GPMC_CONFIG4,&gpmc_cfg->cs[5].config4);
+	writel(NET_LAN9220_GPMC_CONFIG5,&gpmc_cfg->cs[5].config5);
+	writel(NET_LAN9220_GPMC_CONFIG6,&gpmc_cfg->cs[5].config6);
+	writel(NET_LAN9220_GPMC_CONFIG7,&gpmc_cfg->cs[5].config7);

This is pretty much unreadable.

Fixed using enable_gpmc_cs_config().

Quoted 24 lines
Quoted 10 lines
board/comelit/dig297/dig297.c new file +10 -0
+	/* 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);
+
+	/* Make GPIO 12 as output pin and send a magic pulse through it */
+	if (!omap_request_gpio(NET_LAN9221_RESET_GPIO)) {

board/comelit/dig297/dig297.c line 165

Quoted 10 lines
board/comelit/dig297/dig297.c new file +10 -0
+		omap_set_gpio_direction(NET_LAN9221_RESET_GPIO, 0);
+		omap_set_gpio_dataout(NET_LAN9221_RESET_GPIO, 1);
+		udelay(1);
+		omap_set_gpio_dataout(NET_LAN9221_RESET_GPIO, 0);
+		udelay(31000);	/* Should be>= 30ms according to datasheet */
+		omap_set_gpio_dataout(NET_LAN9221_RESET_GPIO, 1);
+	}
+#endif /* CONFIG_SMC911X */
+}
+#endif /* CONFIG_CMD_NET */

This is board specific code - is there any chance you will add another network controller? Or that you will undefine CONFIG_SMC911X and still keep CONFIG_CMD_NET defined?

Quoted 1 line

Please check these #ifdef's!

Removed all #ifdef CONFIG_SMC911X. The board is never expected to exist without Ethernet.

Quoted 9 lines

board/comelit/dig297/dig297.c line 174

Quoted 8 lines
board/comelit/dig297/dig297.c new file +8 -0
+int board_eth_init(bd_t *bis)
+{
+	int rc = 0;
+#ifdef CONFIG_SMC911X
+	rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
+#endif
+	return rc;
+}

Also here.

Ditto.

Quoted 7 lines

...

board/comelit/dig297/dig297.h line 265

Quoted 5 lines
board/comelit/dig297/dig297.h new file +5 -0
+/* MCSPI1: to TOUCH controller TSC2046 (ADS7846 compatible).*/\
+	MUX_VAL(CP(MCSPI1_CLK),     (IEN  | PTD | EN  | M0)) /*McSPI1_CLK.
+    IEN needed fot the McSPI to "receive" the clock and be able to sample SOMI.
+    Seehttp://e2e.ti.com/support/arm174_microprocessors/
+      omap_applications_processors/f/42/p/29444/102394.aspx#102394 */\

Incorrect multiline comment style. Please fix globally.

Fixed.

Quoted 4 lines

board/comelit/dig297/dig297.h line 269

Quoted 4 lines
board/comelit/dig297/dig297.h new file +4 -0
+	MUX_VAL(CP(MCSPI1_SIMO),    (IDIS | PTD | EN  | M0)) /*McSPI1_SIMO*/\
+	MUX_VAL(CP(MCSPI1_SOMI),    (IEN  | PTD | EN  | M0)) /*McSPI1_SOMI*/\
+	MUX_VAL(CP(MCSPI1_CS0),     (IDIS | PTU | EN  | M0)) /*McSPI1_CS0*/\
+/* MCSPI2: verso TFT controller HIMAX.*/\

Ouch.

Quoted 2 lines
Quoted 1 line

+#define CONFIG_SYS_PROMPT "CPS# "

This also does not appear to match your board name ?

Historical (ee the aforementioned discussion).
I'll rename this one right now, as it doesn't have to wait for the rename in the registry of course.

Quoted 5 lines
Quoted 1 line

+#define CONFIG_SYS_FLASH_BASE boot_flash_base

...

Quoted 2 lines
include/configs/dig297.h new file +2 -0
+#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
+#define CONFIG_ENV_OFFSET		boot_flash_off

...

Quoted 7 lines

include/configs/dig297.h line 309

Quoted 6 lines
include/configs/dig297.h new file +6 -0
+#ifndef __ASSEMBLY__
+extern unsigned int boot_flash_base;
+extern unsigned int boot_flash_off;
+extern unsigned int boot_flash_sec;
+extern unsigned int boot_flash_type;
+#endif

Can we please get rid of this?

Hopefully. This mostly depends on how able I will be in understanding the meaning of this stuff and how it should be done instead. I might need support.

Quoted 4 lines

Best regards,

Wolfgang Denk

#22 lore raw

PATCH v3 4/4 ARMV7: OMAP3: Add support for Comelit DIG297 board

Dear Luca Ceresoli,

Quoted 3 lines · In message <[email protected]> you wrote:

I'm going to define the bit values for the GPMC_CONFIGn registers. Is arch/arm/include/asm/arch-omap3/omap_gpmc.h the correct place?

I think so, but I'm not an OMAP expert.

Sandeep?

Quoted 9 lines
Quoted 2 lines

Is this the correct machine ID? "OMAP3_CPS" does not really relate to the board name, "DIG297" ?

As per our previous discussion (see the bottom of
http://lists.denx.de/pipermail/u-boot/2011-March/088964.html), I renamed the board everywhere except for the Machine ID in the ARM registry, and consequently mach-types.h.
As you suggested, I plan to ask for a rename in the registry just after this patch series is integrated in U-Boot, to avoid confusion. The rename in mach-types.h and in my code would follow.

Ah, now I remember. OK.

Review

Quoted 6 lines
Quoted 1 line

Incorrect multiline comment style, please fix globally.

Do you mean like this?

(quoted diff) +2 -1
-       /* GPIO list
+       /*
+        * GPIO list

Yes.

Thanks.

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
The more complex the mind, the greater the need for the simplicity of
play.
	-- Kirk, "Shore Leave", stardate 3025.8
#23 lore raw

PATCH v3 4/4 ARMV7: OMAP3: Add support for Comelit DIG297 board

Il 07/04/2011 23:49, Wolfgang Denk ha scritto:

Quoted 8 lines

Dear Luca Ceresoli,

Quoted 2 lines · In message<[email protected]> you wrote:

I'm going to define the bit values for the GPMC_CONFIGn registers. Is arch/arm/include/asm/arch-omap3/omap_gpmc.h the correct place?

I think so, but I'm not an OMAP expert.

Sandeep?

For similarity with other ARM architectures (pxa and imx), I added arch/arm/include/asm/arch-omap3/omap3-regs.h instead.

Luca

#24 lore raw

PATCH v3 4/4 ARMV7: OMAP3: Add support for Comelit DIG297 board

In reply to Luca Ceresoli

Wolfgang, Albert, Sandeep,

Quoted 11 lines · Luca Ceresoli
Quoted 7 lines

include/configs/dig297.h line 309

Quoted 6 lines
include/configs/dig297.h new file +6 -0
+#ifndef __ASSEMBLY__
+extern unsigned int boot_flash_base;
+extern unsigned int boot_flash_off;
+extern unsigned int boot_flash_sec;
+extern unsigned int boot_flash_type;
+#endif

Can we please get rid of this?

Hopefully. This mostly depends on how able I will be in understanding the meaning of this stuff and how it should be done instead. I might need support.

I knew this would have been painful.

Here are my considerations about "those variables". They are a bit lengthy, but I think they deserve a little time to understand the issue and choose the best way out.

Observations:

a. arch/arm/cpu/armv7/omap3/mem.c computes a value for those variables based

    on config-values in the config file (see gpmc_init(), bottom half):

      #if defined(CONFIG_CMD_NAND)    /* CS 0 */
	...
	base = PISMO1_NAND_BASE;
	size = PISMO1_NAND_SIZE;
	...
      #if defined(CONFIG_ENV_IS_IN_NAND)
	f_off = SMNAND_ENV_OFFSET;
	f_sec = (128<<  10);    /* 128 KiB */
	/* env setup */
	boot_flash_base = base;
	boot_flash_off = f_off;
	boot_flash_sec = f_sec;
	boot_flash_env_addr = f_off;
      #endif
      #endif

      #if defined(CONFIG_CMD_ONENAND)
	...
         base = PISMO1_ONEN_BASE;
         size = PISMO1_ONEN_SIZE;
	...
      #if defined(CONFIG_ENV_IS_IN_ONENAND)
	f_off = ONENAND_ENV_OFFSET;
	f_sec = (128<<  10);    /* 128 KiB */
	/* env setup */
	boot_flash_base = base;
	boot_flash_off = f_off;
	boot_flash_sec = f_sec;
	boot_flash_env_addr = f_off;
      #endif
      #endif

b. this computation is trivial and based only on constants;
c. omap3 config files define some config-values based on those variables;
e.g. omap3_beagle.h does:
#define CONFIG_ENV_OFFSET boot_flash_off
d. common/env_nand.c (and maybe other common files?) use the config-values
such as CONFIG_ENV_OFFSET to do their work.

Analysis:

If those variable declarations were moved to some common place, I think it should be mem.h (as they are computed in mem.c), or some other omap3-specific include file.

Problem 1: how can a file in common/ (such as env_nand.c) see variables declared in an omap3-specific include file?
The whole thing is currently working because they are declared (extern) in the config file, which is included by common/ files.

If those variables were declared in mem.h, it would be necessary to include <asm/arch/mem.h> in env_nand.c, which would break compilation for architectures where mem.h does not exist (which are the majority).

Problem 2: points a. and c. clearly show a depencency loop. mem.c computes values needed for the config, but it needs itself the config. In fact the computation itself is a function of config-values, and produces config-values as a result.

This definitely has to be moved out of mem.c, which has to live on top of the config file and not mess with it.

The point is, where to place these computations?

Solution(s):

I propose 2 solutions to solve both problems. They are both based on the fact that these computations are based only on constants, and thus they can live entirely in the *_config.h file without ever declaring any variable.

Solution 1:
Since they are based on constants only, if there were properly folded the computations could sit *duplicated* in all the config files taking only a few lines, like this:

  #if defined(CONFIG_CMD_NAND)&&  defined(CONFIG_ENV_IS_IN_NAND)
  #define CONFIG_SYS_FLASH_BASE    PISMO1_NAND_BASE
  #define CONFIG_SYS_ENV_SECT_SIZE (128<<  10)
  #define CONFIG_ENV_OFFSET        SMNAND_ENV_OFFSET
  #endif

  #if defined(CONFIG_CMD_ONENAND)&&  defined(CONFIG_ENV_IS_IN_ONENAND)
  ... similar ...
  #endif

Solution 2:
If, on the other hand, it is desirable to have the computation clearly visible and not duplicated, it could be done in an auxiliary .h file, to be included *in the middle* of config files:

  #define CONFIG_CMD_NAND
  #define CONFIG_ENV_IS_IN_NAND
  ...
  #include<omap3_compute_flash_values.h>  /* any better name? */
  /* now CONFIG_SYS_FLASH_BASE and friends are defined

Wolfgang, Albert, Sandeep, which solution would best fit the U-Boot style?

I personally slightly prefer the former, as most boards do actually support only NAND or ONENAND but not both, so the lines to add would not be so many (probably 4 after alla the cleanups).
Moreover, the .h file to be included in the middle is a trick that makes code less readable.

Anyway, whichever you suggest to be the best will be in the v4 patch series.

Luca

#25 lore raw

PATCH v3 4/4 ARMV7: OMAP3: Add support for Comelit DIG297 board

Dear Luca Ceresoli,

Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 8 lines
Quoted 8 lines

include/configs/dig297.h line 309

Quoted 7 lines
include/configs/dig297.h new file +6 -0
+#ifndef __ASSEMBLY__
+extern unsigned int boot_flash_base;
+extern unsigned int boot_flash_off;
+extern unsigned int boot_flash_sec;
+extern unsigned int boot_flash_type;
+#endif

Can we please get rid of this?

Quoted 5 lines
Quoted 4 lines

Hopefully. This mostly depends on how able I will be in understanding the meaning of this stuff and how it should be done instead. I might need support.

I knew this would have been painful.

I don't think so.

Quoted 4 lines

Observations:

a. arch/arm/cpu/armv7/omap3/mem.c computes a value for those variables based
on config-values in the config file (see gpmc_init(), bottom half):

Note that arch/arm/cpu/armv7/omap3/mem.c is also the only file in the whole U-Boot source tree which references these variables:

-> egrep -lR 'boot_flash_base|boot_flash_off|boot_flash_sec|boot_flash_type' * arch/arm/cpu/armv7/omap3/mem.c
include/configs/am3517_evm.h
include/configs/devkit8000.h
include/configs/omap3_beagle.h
include/configs/cm_t35.h
include/configs/omap3_pandora.h
include/configs/omap3_sdp3430.h
include/configs/omap3_zoom1.h
include/configs/omap3_zoom2.h
include/configs/omap3_overo.h
include/configs/omap3_evm.h

Quoted 3 lines

If those variable declarations were moved to some common place, I think it should be mem.h (as they are computed in mem.c), or some other omap3-specific include file.

Why not add these declarations as "static" variables to arch/arm/cpu/armv7/omap3/mem.c [and remove all references to them from the board config files] ?

Best regards,

Wolfgang Denk

Signature · 4 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
Another megabytes the dust.
#26 lore raw

PATCH v3 4/4 ARMV7: OMAP3: Add support for Comelit DIG297 board

Quoted 3 lines · Wolfgang Denk

Dear Luca Ceresoli,

In message<[email protected]> you wrote:

...

Quoted 6 lines

Observations:

Quoted 2 lines

a. arch/arm/cpu/armv7/omap3/mem.c computes a value for those variables based
on config-values in the config file (see gpmc_init(), bottom half):

Note that arch/arm/cpu/armv7/omap3/mem.c is also the only file in the whole U-Boot source tree which references these variables:

Quoted 12 lines

-> egrep -lR 'boot_flash_base|boot_flash_off|boot_flash_sec|boot_flash_type' * arch/arm/cpu/armv7/omap3/mem.c
include/configs/am3517_evm.h
include/configs/devkit8000.h
include/configs/omap3_beagle.h
include/configs/cm_t35.h
include/configs/omap3_pandora.h
include/configs/omap3_sdp3430.h
include/configs/omap3_zoom1.h
include/configs/omap3_zoom2.h
include/configs/omap3_overo.h
include/configs/omap3_evm.h

Would you please read points c. and d. of my e-mail?

Luca

#27 lore raw

PATCH v3 4/4 ARMV7: OMAP3: Add support for Comelit DIG297 board

Dear Luca Ceresoli,

Quoted 17 lines · In message <[email protected]> you wrote:
Quoted 4 lines

Note that arch/arm/cpu/armv7/omap3/mem.c is also the only file in the whole U-Boot source tree which references these variables:

Quoted 12 lines

-> egrep -lR 'boot_flash_base|boot_flash_off|boot_flash_sec|boot_flash_type' * arch/arm/cpu/armv7/omap3/mem.c
include/configs/am3517_evm.h
include/configs/devkit8000.h
include/configs/omap3_beagle.h
include/configs/cm_t35.h
include/configs/omap3_pandora.h
include/configs/omap3_sdp3430.h
include/configs/omap3_zoom1.h
include/configs/omap3_zoom2.h
include/configs/omap3_overo.h
include/configs/omap3_evm.h

Quoted 1 line

Would you please read points c. and d. of my e-mail?

I did. And I still cannot see why we must use variables declared as extern in the board config files for this purpose. Move the variable declaration to the only file where they ever get used, change them into "static" while doing this, and use preprocessor macros for the rest like all other boards are doing it.

Best regards,

Wolfgang Denk

Signature · 4 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
EMACS belongs in <sys/errno.h>: Editor too big!
#28 lore raw

PATCH v3 4/4 ARMV7: OMAP3: Add support for Comelit DIG297 board

In reply to Luca Ceresoli

Board support for the DIG297 board manufactured by Comelit Group SpA. It is a custom board based on the BeagleBoard <http://beagleboard.org/> by Texas Instruments.

The board support is based on the BeagleBoard implementation.

Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
Changes in v2:
- renamed board from CPS to DIG297;
- fixed all (relevant) issues raised by checkpatch.pl;
- removed config.mk from board dir;
- fixed coding style;
- minor cleanups.

Changes in v3: none.

Changes in v4:
- MAKEALL: keep it sorted alphabetically;
- Fixed multiline comments;
- Use enable_gpmc_cs_config() to initialize GPMC for the LAN chip;
- Remove useless #ifdef CONFIG_SMC911X;
- Fixed english translation;
- Removed "ro" flag from mtdparts;
- Updated prompt to board name ("DIG297# ").

 MAINTAINERS                   |    4 +
 MAKEALL                       |    1 +
 board/comelit/dig297/Makefile |   49 ++++++
 board/comelit/dig297/dig297.c |  187 ++++++++++++++++++++
 board/comelit/dig297/dig297.h |  383 +++++++++++++++++++++++++++++++++++++++++
 boards.cfg                    |    1 +
 include/configs/dig297.h      |  311 +++++++++++++++++++++++++++++++++
 7 files changed, 936 insertions(+), 0 deletions(-)
 create mode 100644 board/comelit/dig297/Makefile
 create mode 100644 board/comelit/dig297/dig297.c
 create mode 100644 board/comelit/dig297/dig297.h
 create mode 100644 include/configs/dig297.h
MAINTAINERS +4 -0
index 1299cbb..5feb6de 100644
@@ -599,6 +599,10 @@ Rick Bronson <[email protected]>
 
 	AT91RM9200DK	at91rm9200
 
+Luca Ceresoli <[email protected]>
+
+	dig297		ARM ARMV7 (OMAP3530 SoC)
+
 Po-Yu Chuang <[email protected]>
 
 	a320evb		FA526 (ARM920T-like) (a320 SoC)
MAKEALL +1 -0
index 6acece7..088b6bc 100755
@@ -421,6 +421,7 @@ LIST_ARMV7="		\
 	am3517_evm		\
 	ca9x4_ct_vxp		\
 	devkit8000		\
+	dig297			\
 	igep0020		\
 	igep0030		\
 	mx51evk			\
board/comelit/dig297/Makefile new file +49 -0

49 lines not on this page · raw message

board/comelit/dig297/dig297.c new file +187 -0

187 lines not on this page · raw message

board/comelit/dig297/dig297.h new file +383 -0

383 lines not on this page · raw message

boards.cfg +1 -0
index 554e06c..0d8dfd4 100644
@@ -117,6 +117,7 @@ omap3_pandora                arm         armv7       pandora             -
 igep0020                     arm         armv7       igep0020            isee           omap3
 igep0030                     arm         armv7       igep0030            isee           omap3
 am3517_evm                   arm         armv7       am3517evm           logicpd        omap3
+dig297                       arm         armv7       dig297              comelit        omap3
 omap3_zoom1                  arm         armv7       zoom1               logicpd        omap3
 omap3_zoom2                  arm         armv7       zoom2               logicpd        omap3
 omap3_beagle                 arm         armv7       beagle              ti             omap3
include/configs/dig297.h new file +311 -0

311 lines not on this page · raw message

Signature · 1 line
1.7.1
#29 lore raw

v4 cover Add DIG297 board and OMAP3 fixes

In reply to Luca Ceresoli

Hi all,

this patch series cleans up some OMAP3 stuff and adds DIG297 board support.

New in v4:
- patch 2 gets rid of some ugly extern variables in mem.c;
- patch 3 creates a new file for register definitions (inspired by the pxa and imx code base), and defines GPMC_CONFIGx register values.

Luca

Luca Ceresoli (4):
ARMV7: OMAP3: Fix preprocessor check for CONFIG_OMAP34XX
ARMV7: OMAP3: Cleanup extern variables in mem.c
ARMV7: OMAP3: Add GPMC_CONFIGx register value definitions
ARMV7: OMAP3: Add support for Comelit DIG297 board

 MAINTAINERS                                  |    4 +
 MAKEALL                                      |    1 +
 arch/arm/cpu/armv7/omap3/mem.c               |   32 ---
 arch/arm/cpu/armv7/start.S                   |    2 +-
 arch/arm/include/asm/arch-omap3/omap3-regs.h |   95 +++++++
 board/comelit/dig297/Makefile                |   49 ++++
 board/comelit/dig297/dig297.c                |  187 +++++++++++++
 board/comelit/dig297/dig297.h                |  383 ++++++++++++++++++++++++++
 boards.cfg                                   |    1 +
 include/configs/am3517_evm.h                 |   18 +-
 include/configs/cm_t35.h                     |   16 +-
 include/configs/devkit8000.h                 |   10 +-
 include/configs/dig297.h                     |  311 +++++++++++++++++++++
 include/configs/omap3_beagle.h               |   16 +-
 include/configs/omap3_evm.h                  |   26 +-
 include/configs/omap3_overo.h                |   16 +-
 include/configs/omap3_pandora.h              |   16 +-
 include/configs/omap3_sdp3430.h              |   10 -
 include/configs/omap3_zoom1.h                |   16 +-
 include/configs/omap3_zoom2.h                |   16 +-
 20 files changed, 1081 insertions(+), 144 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-omap3/omap3-regs.h
 create mode 100644 board/comelit/dig297/Makefile
 create mode 100644 board/comelit/dig297/dig297.c
 create mode 100644 board/comelit/dig297/dig297.h
 create mode 100644 include/configs/dig297.h
#30 lore raw

v4 cover Add DIG297 board and OMAP3 fixes

Hi all,

Le 15/04/2011 14:48, Luca Ceresoli a ?crit :

Quoted 9 lines

Hi all,

this patch series cleans up some OMAP3 stuff and adds DIG297 board support.

New in v4:
- patch 2 gets rid of some ugly extern variables in mem.c;
- patch 3 creates a new file for register definitions (inspired by the pxa and imx code base), and defines GPMC_CONFIGx register values.

Quoted 7 lines

Luca

Luca Ceresoli (4):
ARMV7: OMAP3: Fix preprocessor check for CONFIG_OMAP34XX
ARMV7: OMAP3: Cleanup extern variables in mem.c
ARMV7: OMAP3: Add GPMC_CONFIGx register value definitions
ARMV7: OMAP3: Add support for Comelit DIG297 board

Sandeep, do you plan on taking this patchset in?

Amicalement,

Signature · 1 line
Albert.
#31 lore raw

PATCH v4 1/4 ARMV7: OMAP3: Fix preprocessor check for CONFIG_OMAP34XX

In reply to Luca Ceresoli

CONFIG_OMAP34XX must be checked for existence, not value.

Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
Changes in v2:
- this patch is new in v2.

Changes in v3: none.

Changes in v4: none.

 arch/arm/cpu/armv7/start.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/cpu/armv7/start.S +1 -1
index d83d501..6387b8b 100644
@@ -115,7 +115,7 @@ reset:
 	orr	r0, r0, #0xd3
 	msr	cpsr,r0
 
-#if (CONFIG_OMAP34XX)
+#if defined(CONFIG_OMAP34XX)
 	/* Copy vectors to mask ROM indirect addr */
 	adr	r0, _start		@ r0 <- current position of code
 	add	r0, r0, #4		@ skip reset vector
Signature · 1 line
1.7.1
#33 lore raw

PATCH v4 2/4 ARMV7: OMAP3: Cleanup extern variables in mem.c

In reply to Luca Ceresoli

Removed boot_flash_* extern variables.
boot_flash_type was totally unused. The other ones were actually constants, so they have been replaced with #defines in the board config files.

Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
Changes in v4:
- this patch is new in v4.

 arch/arm/cpu/armv7/omap3/mem.c  |   32 --------------------------------
 include/configs/am3517_evm.h    |   18 ++++++------------
 include/configs/cm_t35.h        |   16 +++++-----------
 include/configs/devkit8000.h    |   10 +---------
 include/configs/omap3_beagle.h  |   16 +++++-----------
 include/configs/omap3_evm.h     |   26 ++++++++++++--------------
 include/configs/omap3_overo.h   |   16 +++++-----------
 include/configs/omap3_pandora.h |   16 +++++-----------
 include/configs/omap3_sdp3430.h |   10 ----------
 include/configs/omap3_zoom1.h   |   16 +++++-----------
 include/configs/omap3_zoom2.h   |   16 +++++-----------
 11 files changed, 49 insertions(+), 143 deletions(-)
arch/arm/cpu/armv7/omap3/mem.c +0 -32
index bd914b0..a01c303 100644
@@ -31,16 +31,6 @@
 #include <asm/arch/sys_proto.h>
 #include <command.h>
 
-/*
- * Only One NAND allowed on board at a time.
- * The GPMC CS Base for the same
- */
-unsigned int boot_flash_base;
-unsigned int boot_flash_off;
-unsigned int boot_flash_sec;
-unsigned int boot_flash_type;
-volatile unsigned int boot_flash_env_addr;
-
 struct gpmc *gpmc_cfg;
 
 #if defined(CONFIG_CMD_NAND)
@@ -134,10 +124,6 @@ void gpmc_init(void)
 	const u32 *gpmc_config = NULL;
 	u32 base = 0;
 	u32 size = 0;
-#if defined(CONFIG_ENV_IS_IN_NAND) || defined(CONFIG_ENV_IS_IN_ONENAND)
-	u32 f_off = CONFIG_SYS_MONITOR_LEN;
-	u32 f_sec = 0;
-#endif
 #endif
 	u32 config = 0;
 
@@ -162,15 +148,6 @@ void gpmc_init(void)
 	base = PISMO1_NAND_BASE;
 	size = PISMO1_NAND_SIZE;
 	enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[0], base, size);
-#if defined(CONFIG_ENV_IS_IN_NAND)
-	f_off = SMNAND_ENV_OFFSET;
-	f_sec = (128 << 10);	/* 128 KiB */
-	/* env setup */
-	boot_flash_base = base;
-	boot_flash_off = f_off;
-	boot_flash_sec = f_sec;
-	boot_flash_env_addr = f_off;
-#endif
 #endif
 
 #if defined(CONFIG_CMD_ONENAND)
@@ -178,14 +155,5 @@ void gpmc_init(void)
 	base = PISMO1_ONEN_BASE;
 	size = PISMO1_ONEN_SIZE;
 	enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[0], base, size);
-#if defined(CONFIG_ENV_IS_IN_ONENAND)
-	f_off = ONENAND_ENV_OFFSET;
-	f_sec = (128 << 10);	/* 128 KiB */
-	/* env setup */
-	boot_flash_base = base;
-	boot_flash_off = f_off;
-	boot_flash_sec = f_sec;
-	boot_flash_env_addr = f_off;
-#endif
 #endif
 }
include/configs/am3517_evm.h +6 -12
index 70e8f07..f5d5821 100644
@@ -294,7 +294,9 @@
 #define CONFIG_SYS_MAX_FLASH_BANKS	2	/* max number of flash banks */
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -304,9 +306,9 @@
 #define CONFIG_ENV_IS_IN_NAND		1
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
-#define CONFIG_ENV_ADDR			boot_flash_env_addr
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
+#define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
 /*-----------------------------------------------------------------------
  * CFI FLASH driver setup
@@ -323,14 +325,6 @@
 #define CONFIG_SYS_JFFS2_FIRST_BANK	CONFIG_SYS_MAX_FLASH_BANKS
 #define CONFIG_SYS_JFFS2_NUM_BANKS	1
 
-#ifndef __ASSEMBLY__
-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
-
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
 #define CONFIG_SYS_INIT_RAM_ADDR	0x4020f800
 #define CONFIG_SYS_INIT_RAM_SIZE	0x800
include/configs/cm_t35.h +5 -11
index 510c6d4..ee9175d 100644
@@ -310,7 +310,9 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -320,18 +322,10 @@
 #define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-#ifndef __ASSEMBLY__
-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
-
 #if defined(CONFIG_CMD_NET)
 #define CONFIG_NET_MULTI
 #define CONFIG_SMC911X
include/configs/devkit8000.h +1 -9
index d898b77..4ba3d91 100644
@@ -297,15 +297,7 @@
 #define CONFIG_ENV_IS_IN_NAND		1
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_ENV_OFFSET		boot_flash_off
-
-#ifndef __ASSEMBLY__
-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
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 
 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
 #define CONFIG_SYS_INIT_RAM_ADDR        0x4020f800
include/configs/omap3_beagle.h +5 -11
index 5cfa4cb..9c35a1d 100644
@@ -306,7 +306,9 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -316,18 +318,10 @@
 #define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-#ifndef __ASSEMBLY__
-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
-
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
 #define CONFIG_SYS_INIT_RAM_ADDR	0x4020f800
 #define CONFIG_SYS_INIT_RAM_SIZE	0x800
include/configs/omap3_evm.h +12 -14
index 5bdb3fd..5ec079c 100644
@@ -298,33 +298,31 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#elif defined(CONFIG_CMD_ONENAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_ONEN_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
 #define CONFIG_SYS_ONENAND_BASE		ONENAND_MAP
 
+#define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
+#define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
+
 #if defined(CONFIG_CMD_NAND)
 #define CONFIG_NAND_OMAP_GPMC
 #define GPMC_NAND_ECC_LP_x16_LAYOUT	1
 #define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #elif defined(CONFIG_CMD_ONENAND)
 #define CONFIG_ENV_IS_IN_ONENAND	1
+#define CONFIG_ENV_OFFSET		ONENAND_ENV_OFFSET
 #endif
-#define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
-#define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
-#define CONFIG_ENV_ADDR			boot_flash_env_addr
-
-#ifndef __ASSEMBLY__
-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
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_ADDR			CONFIG_ENV_OFFSET
 
 /*
  * Support for relocation
include/configs/omap3_overo.h +5 -11
index 1b3d439..44a6eb7 100644
@@ -271,7 +271,9 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -281,18 +283,10 @@
 #define ONENAND_ENV_OFFSET		0x240000 /* environment starts here */
 #define SMNAND_ENV_OFFSET		0x240000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-#ifndef __ASSEMBLY__
-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
-
 #if defined(CONFIG_CMD_NET)
 /*----------------------------------------------------------------------------
  * SMSC9211 Ethernet from SMSC9118 family
include/configs/omap3_pandora.h +5 -11
index 72b0cc2..7b6883c 100644
@@ -262,7 +262,9 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -270,16 +272,8 @@
 #define CONFIG_ENV_IS_IN_NAND		1
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-#ifndef __ASSEMBLY__
-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
-
 #endif				/* __CONFIG_H */
include/configs/omap3_sdp3430.h +0 -10
index 4708981..5ddf920 100644
@@ -358,14 +358,4 @@
  *  - rest for filesystem
  */
 
-/*--------------------------------------------------------------------------*/
-
-#ifndef __ASSEMBLY__
-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
-
 #endif				/* __CONFIG_H */
include/configs/omap3_zoom1.h +5 -11
index f7d0652..2bfda4b 100644
@@ -285,7 +285,9 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -295,16 +297,8 @@
 #define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-#ifndef __ASSEMBLY__
-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
-
 #endif				/* __CONFIG_H */
include/configs/omap3_zoom2.h +5 -11
index 7377933..dadca28 100644
@@ -254,7 +254,9 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor@start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -262,16 +264,8 @@
 #define CONFIG_ENV_IS_IN_NAND		1
 #define SMNAND_ENV_OFFSET		0x0c0000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-#ifndef __ASSEMBLY__
-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
-
 #endif /* __CONFIG_H */
Signature · 1 line
1.7.1
#34 lore raw

PATCH v4 2/4 ARMV7: OMAP3: Cleanup extern variables in mem.c

Quoted 16 lines

Removed boot_flash_* extern variables.
boot_flash_type was totally unused. The other ones were actually constants, so
they have been replaced with #defines in the board config files.

Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
Changes in v4:
- this patch is new in v4.

Quoted 13 lines
 arch/arm/cpu/armv7/omap3/mem.c  |   32 --------------------------------
 include/configs/am3517_evm.h    |   18 ++++++------------
 include/configs/cm_t35.h        |   16 +++++-----------
 include/configs/devkit8000.h    |   10 +---------
 include/configs/omap3_beagle.h  |   16 +++++-----------
 include/configs/omap3_evm.h     |   26 ++++++++++++--------------
 include/configs/omap3_overo.h   |   16 +++++-----------
 include/configs/omap3_pandora.h |   16 +++++-----------
 include/configs/omap3_sdp3430.h |   10 ----------
 include/configs/omap3_zoom1.h   |   16 +++++-----------
 include/configs/omap3_zoom2.h   |   16 +++++-----------
 11 files changed, 49 insertions(+), 143 deletions(-)

Can you please rebase with u-boot-ti?

Also there is a new board am 3517 crane

http://git.denx.de/?p=u-boot/u-boot-ti.git;a=commitdiff;h=29ffd724e25f0cf456d1971e8c1c6567ebbd4818

Can you include this in your patch as well?

Regards,
Sandeep

#35 lore raw

v5 cover Add DIG297 board and OMAP3 fixes

Hi all,

this patch series cleans up some OMAP3 stuff and adds DIG297 board support.

New in v5:
- rebased against u-boot-ti master (007965dbe4dae12);
- updated to support the new am3517 crane board;
- removed two patches that have already been pushed to u-boot-ti master.

Luca

Luca Ceresoli (2):
ARMV7: OMAP3: Cleanup extern variables in mem.c
ARMV7: OMAP3: Add support for Comelit DIG297 board

 MAINTAINERS                     |    4 +
 MAKEALL                         |    1 +
 arch/arm/cpu/armv7/omap3/mem.c  |   32 ----
 board/comelit/dig297/Makefile   |   49 +++++
 board/comelit/dig297/dig297.c   |  187 +++++++++++++++++++
 board/comelit/dig297/dig297.h   |  383 +++++++++++++++++++++++++++++++++++++++
 boards.cfg                      |    1 +
 include/configs/am3517_crane.h  |   16 +--
 include/configs/am3517_evm.h    |   18 +--
 include/configs/cm_t35.h        |   16 +-
 include/configs/devkit8000.h    |   10 +-
 include/configs/dig297.h        |  311 +++++++++++++++++++++++++++++++
 include/configs/omap3_beagle.h  |   16 +-
 include/configs/omap3_evm.h     |   26 ++--
 include/configs/omap3_overo.h   |   16 +-
 include/configs/omap3_pandora.h |   16 +-
 include/configs/omap3_sdp3430.h |   10 -
 include/configs/omap3_zoom1.h   |   16 +-
 include/configs/omap3_zoom2.h   |   16 +-
 19 files changed, 989 insertions(+), 155 deletions(-)
 create mode 100644 board/comelit/dig297/Makefile
 create mode 100644 board/comelit/dig297/dig297.c
 create mode 100644 board/comelit/dig297/dig297.h
 create mode 100644 include/configs/dig297.h
#36 lore raw

v5 cover Add DIG297 board and OMAP3 fixes

Quoted 12 lines

Hi all,

this patch series cleans up some OMAP3 stuff and adds DIG297 board support.

New in v5:
- rebased against u-boot-ti master (007965dbe4dae12);
- updated to support the new am3517 crane board;
- removed two patches that have already been pushed to u-boot-ti master.

Quoted 6 lines

Luca

Luca Ceresoli (2):
ARMV7: OMAP3: Cleanup extern variables in mem.c
ARMV7: OMAP3: Add support for Comelit DIG297 board

Thanks

Pushed to u-boot-ti

Regards,
Sandeep

#37 lore raw

PATCH v5 1/2 ARMV7: OMAP3: Cleanup extern variables in mem.c

In reply to Paulraj

Removed boot_flash_* extern variables.
boot_flash_type was totally unused. The other ones were actually constants, so they have been replaced with #defines in the board config files.

Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
Changes in v4:
- this patch is new in v4.

Changes in v5:
- extended to crane board.

 arch/arm/cpu/armv7/omap3/mem.c  |   32 --------------------------------
 include/configs/am3517_crane.h  |   16 ++++------------
 include/configs/am3517_evm.h    |   18 ++++++------------
 include/configs/cm_t35.h        |   16 +++++-----------
 include/configs/devkit8000.h    |   10 +---------
 include/configs/omap3_beagle.h  |   16 +++++-----------
 include/configs/omap3_evm.h     |   26 ++++++++++++--------------
 include/configs/omap3_overo.h   |   16 +++++-----------
 include/configs/omap3_pandora.h |   16 +++++-----------
 include/configs/omap3_sdp3430.h |   10 ----------
 include/configs/omap3_zoom1.h   |   16 +++++-----------
 include/configs/omap3_zoom2.h   |   16 +++++-----------
 12 files changed, 53 insertions(+), 155 deletions(-)
arch/arm/cpu/armv7/omap3/mem.c +0 -32
index bd914b0..a01c303 100644
@@ -31,16 +31,6 @@
 #include <asm/arch/sys_proto.h>
 #include <command.h>
 
-/*
- * Only One NAND allowed on board at a time.
- * The GPMC CS Base for the same
- */
-unsigned int boot_flash_base;
-unsigned int boot_flash_off;
-unsigned int boot_flash_sec;
-unsigned int boot_flash_type;
-volatile unsigned int boot_flash_env_addr;
-
 struct gpmc *gpmc_cfg;
 
 #if defined(CONFIG_CMD_NAND)
@@ -134,10 +124,6 @@ void gpmc_init(void)
 	const u32 *gpmc_config = NULL;
 	u32 base = 0;
 	u32 size = 0;
-#if defined(CONFIG_ENV_IS_IN_NAND) || defined(CONFIG_ENV_IS_IN_ONENAND)
-	u32 f_off = CONFIG_SYS_MONITOR_LEN;
-	u32 f_sec = 0;
-#endif
 #endif
 	u32 config = 0;
 
@@ -162,15 +148,6 @@ void gpmc_init(void)
 	base = PISMO1_NAND_BASE;
 	size = PISMO1_NAND_SIZE;
 	enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[0], base, size);
-#if defined(CONFIG_ENV_IS_IN_NAND)
-	f_off = SMNAND_ENV_OFFSET;
-	f_sec = (128 << 10);	/* 128 KiB */
-	/* env setup */
-	boot_flash_base = base;
-	boot_flash_off = f_off;
-	boot_flash_sec = f_sec;
-	boot_flash_env_addr = f_off;
-#endif
 #endif
 
 #if defined(CONFIG_CMD_ONENAND)
@@ -178,14 +155,5 @@ void gpmc_init(void)
 	base = PISMO1_ONEN_BASE;
 	size = PISMO1_ONEN_SIZE;
 	enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[0], base, size);
-#if defined(CONFIG_ENV_IS_IN_ONENAND)
-	f_off = ONENAND_ENV_OFFSET;
-	f_sec = (128 << 10);	/* 128 KiB */
-	/* env setup */
-	boot_flash_base = base;
-	boot_flash_off = f_off;
-	boot_flash_sec = f_sec;
-	boot_flash_env_addr = f_off;
-#endif
 #endif
 }
include/configs/am3517_crane.h +4 -12
index ef0c0a1..09cb951 100644
@@ -294,7 +294,7 @@
 #define CONFIG_SYS_MAX_FLASH_BANKS	2	/* max number of flash banks */
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -304,9 +304,9 @@
 #define CONFIG_ENV_IS_IN_NAND		1
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
-#define CONFIG_ENV_ADDR			boot_flash_env_addr
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB sector */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
+#define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
 /*-----------------------------------------------------------------------
  * CFI FLASH driver setup
@@ -323,14 +323,6 @@
 #define CONFIG_SYS_JFFS2_FIRST_BANK	CONFIG_SYS_MAX_FLASH_BANKS
 #define CONFIG_SYS_JFFS2_NUM_BANKS	1
 
-#ifndef __ASSEMBLY__
-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
-
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
 #define CONFIG_SYS_INIT_RAM_ADDR	0x4020f800
 #define CONFIG_SYS_INIT_RAM_SIZE	0x800
include/configs/am3517_evm.h +6 -12
index 70e8f07..f5d5821 100644
@@ -294,7 +294,9 @@
 #define CONFIG_SYS_MAX_FLASH_BANKS	2	/* max number of flash banks */
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -304,9 +306,9 @@
 #define CONFIG_ENV_IS_IN_NAND		1
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
-#define CONFIG_ENV_ADDR			boot_flash_env_addr
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
+#define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
 /*-----------------------------------------------------------------------
  * CFI FLASH driver setup
@@ -323,14 +325,6 @@
 #define CONFIG_SYS_JFFS2_FIRST_BANK	CONFIG_SYS_MAX_FLASH_BANKS
 #define CONFIG_SYS_JFFS2_NUM_BANKS	1
 
-#ifndef __ASSEMBLY__
-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
-
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
 #define CONFIG_SYS_INIT_RAM_ADDR	0x4020f800
 #define CONFIG_SYS_INIT_RAM_SIZE	0x800
include/configs/cm_t35.h +5 -11
index b8dffbb..e07e8b3 100644
@@ -312,7 +312,9 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -322,18 +324,10 @@
 #define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-#ifndef __ASSEMBLY__
-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
-
 #if defined(CONFIG_CMD_NET)
 #define CONFIG_NET_MULTI
 #define CONFIG_SMC911X
include/configs/devkit8000.h +1 -9
index d898b77..4ba3d91 100644
@@ -297,15 +297,7 @@
 #define CONFIG_ENV_IS_IN_NAND		1
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_ENV_OFFSET		boot_flash_off
-
-#ifndef __ASSEMBLY__
-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
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 
 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
 #define CONFIG_SYS_INIT_RAM_ADDR        0x4020f800
include/configs/omap3_beagle.h +5 -11
index 5191d14..6f6d3c5 100644
@@ -329,7 +329,9 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -339,18 +341,10 @@
 #define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-#ifndef __ASSEMBLY__
-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
-
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
 #define CONFIG_SYS_INIT_RAM_ADDR	0x4020f800
 #define CONFIG_SYS_INIT_RAM_SIZE	0x800
include/configs/omap3_evm.h +12 -14
index 5bdb3fd..5ec079c 100644
@@ -298,33 +298,31 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#elif defined(CONFIG_CMD_ONENAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_ONEN_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
 #define CONFIG_SYS_ONENAND_BASE		ONENAND_MAP
 
+#define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
+#define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
+
 #if defined(CONFIG_CMD_NAND)
 #define CONFIG_NAND_OMAP_GPMC
 #define GPMC_NAND_ECC_LP_x16_LAYOUT	1
 #define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #elif defined(CONFIG_CMD_ONENAND)
 #define CONFIG_ENV_IS_IN_ONENAND	1
+#define CONFIG_ENV_OFFSET		ONENAND_ENV_OFFSET
 #endif
-#define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
-#define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
-#define CONFIG_ENV_ADDR			boot_flash_env_addr
-
-#ifndef __ASSEMBLY__
-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
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_ADDR			CONFIG_ENV_OFFSET
 
 /*
  * Support for relocation
include/configs/omap3_overo.h +5 -11
index 1b3d439..44a6eb7 100644
@@ -271,7 +271,9 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -281,18 +283,10 @@
 #define ONENAND_ENV_OFFSET		0x240000 /* environment starts here */
 #define SMNAND_ENV_OFFSET		0x240000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-#ifndef __ASSEMBLY__
-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
-
 #if defined(CONFIG_CMD_NET)
 /*----------------------------------------------------------------------------
  * SMSC9211 Ethernet from SMSC9118 family
include/configs/omap3_pandora.h +5 -11
index 72b0cc2..7b6883c 100644
@@ -262,7 +262,9 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -270,16 +272,8 @@
 #define CONFIG_ENV_IS_IN_NAND		1
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-#ifndef __ASSEMBLY__
-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
-
 #endif				/* __CONFIG_H */
include/configs/omap3_sdp3430.h +0 -10
index 4708981..5ddf920 100644
@@ -358,14 +358,4 @@
  *  - rest for filesystem
  */
 
-/*--------------------------------------------------------------------------*/
-
-#ifndef __ASSEMBLY__
-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
-
 #endif				/* __CONFIG_H */
include/configs/omap3_zoom1.h +5 -11
index f7d0652..2bfda4b 100644
@@ -285,7 +285,9 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor at start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -295,16 +297,8 @@
 #define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-#ifndef __ASSEMBLY__
-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
-
 #endif				/* __CONFIG_H */
include/configs/omap3_zoom2.h +5 -11
index 7377933..dadca28 100644
@@ -254,7 +254,9 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE		PISMO1_NAND_BASE
+#endif
 
 /* Monitor@start of flash */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
@@ -262,16 +264,8 @@
 #define CONFIG_ENV_IS_IN_NAND		1
 #define SMNAND_ENV_OFFSET		0x0c0000 /* environment starts here */
 
-#define CONFIG_SYS_ENV_SECT_SIZE	boot_flash_sec
-#define CONFIG_ENV_OFFSET		boot_flash_off
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
 
-#ifndef __ASSEMBLY__
-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
-
 #endif /* __CONFIG_H */
Signature · 1 line
1.7.1
#38 lore raw

PATCH v5 2/2 ARMV7: OMAP3: Add support for Comelit DIG297 board

In reply to Paulraj

Board support for the DIG297 board manufactured by Comelit Group SpA. It is a custom board based on the BeagleBoard <http://beagleboard.org/> by Texas Instruments.

The board support is based on the BeagleBoard implementation.

Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
Changes in v4:
- this patch is new in v4.

Changes in v5: none.

 MAINTAINERS                   |    4 +
 MAKEALL                       |    1 +
 board/comelit/dig297/Makefile |   49 ++++++
 board/comelit/dig297/dig297.c |  187 ++++++++++++++++++++
 board/comelit/dig297/dig297.h |  383 +++++++++++++++++++++++++++++++++++++++++
 boards.cfg                    |    1 +
 include/configs/dig297.h      |  311 +++++++++++++++++++++++++++++++++
 7 files changed, 936 insertions(+), 0 deletions(-)
 create mode 100644 board/comelit/dig297/Makefile
 create mode 100644 board/comelit/dig297/dig297.c
 create mode 100644 board/comelit/dig297/dig297.h
 create mode 100644 include/configs/dig297.h
MAINTAINERS +4 -0
index 91e7cd9..fc793f5 100644
@@ -600,6 +600,10 @@ Rick Bronson <[email protected]>
 
 	AT91RM9200DK	at91rm9200
 
+Luca Ceresoli <[email protected]>
+
+	dig297		ARM ARMV7 (OMAP3530 SoC)
+
 Po-Yu Chuang <[email protected]>
 
 	a320evb		FA526 (ARM920T-like) (a320 SoC)
MAKEALL +1 -0
index fdc1aca..c3df657 100755
@@ -422,6 +422,7 @@ LIST_ARMV7="		\
 	am3517_evm		\
 	ca9x4_ct_vxp		\
 	devkit8000		\
+	dig297			\
 	igep0020		\
 	igep0030		\
 	mx51evk			\
board/comelit/dig297/Makefile new file +49 -0

49 lines not on this page · raw message

board/comelit/dig297/dig297.c new file +187 -0

187 lines not on this page · raw message

board/comelit/dig297/dig297.h new file +383 -0

383 lines not on this page · raw message

boards.cfg +1 -0
index f4c31e8..1d432e8 100644
@@ -119,6 +119,7 @@ igep0020                     arm         armv7       igep0020            isee
 igep0030                     arm         armv7       igep0030            isee           omap3
 am3517_crane                 arm         armv7       am3517crane         ti             omap3
 am3517_evm                   arm         armv7       am3517evm           logicpd        omap3
+dig297                       arm         armv7       dig297              comelit        omap3
 omap3_zoom1                  arm         armv7       zoom1               logicpd        omap3
 omap3_zoom2                  arm         armv7       zoom2               logicpd        omap3
 omap3_beagle                 arm         armv7       beagle              ti             omap3
include/configs/dig297.h new file +311 -0

311 lines not on this page · raw message

Signature · 1 line
1.7.1
#39 lore raw

PATCH v4 3/4 ARMV7: OMAP3: Add GPMC_CONFIGx register value definitions

In reply to Luca Ceresoli

---
Changes in v4:
- this patch is new in v4.

 arch/arm/include/asm/arch-omap3/omap3-regs.h |   95 ++++++++++++++++++++++++++
 1 files changed, 95 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-omap3/omap3-regs.h
arch/arm/include/asm/arch-omap3/omap3-regs.h new file +95 -0
new file mode 100644
index 0000000..818214f
@@ -0,0 +1,95 @@
+/*
+ * (c) 2011 Comelit Group SpA, Luca Ceresoli <[email protected]>
+ *
+ * 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
+ */
+
+#ifndef _OMAP3_REGS_H
+#define _OMAP3_REGS_H
+
+/*
+ * Register definitions for OMAP3 processors.
+ */
+
+/*
+ * GPMC_CONFIG1 - GPMC_CONFIG7
+ */
+
+/* Values for GPMC_CONFIG1 - signal control parameters */
+#define WRAPBURST                     (1 << 31)
+#define READMULTIPLE                  (1 << 30)
+#define READTYPE                      (1 << 29)
+#define WRITEMULTIPLE                 (1 << 28)
+#define WRITETYPE                     (1 << 27)
+#define CLKACTIVATIONTIME(x)          (((x) & 3) << 25)
+#define ATTACHEDDEVICEPAGELENGTH(x)   (((x) & 3) << 23)
+#define WAITREADMONITORING            (1 << 22)
+#define WAITWRITEMONITORING           (1 << 21)
+#define WAITMONITORINGTIME(x)         (((x) & 3) << 18)
+#define WAITPINSELECT(x)              (((x) & 3) << 16)
+#define DEVICESIZE(x)                 (((x) & 3) << 12)
+#define DEVICESIZE_8BIT               DEVICESIZE(0)
+#define DEVICESIZE_16BIT              DEVICESIZE(1)
+#define DEVICETYPE(x)                 (((x) & 3) << 10)
+#define DEVICETYPE_NOR                DEVICETYPE(0)
+#define DEVICETYPE_NAND               DEVICETYPE(2)
+#define MUXADDDATA                    (1 << 9)
+#define TIMEPARAGRANULARITY           (1 << 4)
+#define GPMCFCLKDIVIDER(x)            (((x) & 3) << 0)
+
+/* Values for GPMC_CONFIG2 - CS timing */
+#define CSWROFFTIME(x)   (((x) & 0x1f) << 16)
+#define CSRDOFFTIME(x)   (((x) & 0x1f) <<  8)
+#define CSEXTRADELAY     (1 << 7)
+#define CSONTIME(x)      (((x) &  0xf) <<  0)
+
+/* Values for GPMC_CONFIG3 - nADV timing */
+#define ADVWROFFTIME(x)  (((x) & 0x1f) << 16)
+#define ADVRDOFFTIME(x)  (((x) & 0x1f) <<  8)
+#define ADVEXTRADELAY    (1 << 7)
+#define ADVONTIME(x)     (((x) &  0xf) <<  0)
+
+/* Values for GPMC_CONFIG4 - nWE and nOE timing */
+#define WEOFFTIME(x)     (((x) & 0x1f) << 24)
+#define WEEXTRADELAY     (1 << 23)
+#define WEONTIME(x)      (((x) &  0xf) << 16)
+#define OEOFFTIME(x)     (((x) & 0x1f) <<  8)
+#define OEEXTRADELAY     (1 << 7)
+#define OEONTIME(x)      (((x) &  0xf) <<  0)
+
+/* Values for GPMC_CONFIG5 - RdAccessTime and CycleTime timing */
+#define PAGEBURSTACCESSTIME(x)  (((x) &  0xf) << 24)
+#define RDACCESSTIME(x)         (((x) & 0x1f) << 16)
+#define WRCYCLETIME(x)          (((x) & 0x1f) <<  8)
+#define RDCYCLETIME(x)          (((x) & 0x1f) <<  0)
+
+/* Values for GPMC_CONFIG6 - misc timings */
+#define WRACCESSTIME(x)        (((x) & 0x1f) << 24)
+#define WRDATAONADMUXBUS(x)    (((x) &  0xf) << 16)
+#define CYCLE2CYCLEDELAY(x)    (((x) &  0xf) <<  8)
+#define CYCLE2CYCLESAMECSEN    (1 << 7)
+#define CYCLE2CYCLEDIFFCSEN    (1 << 6)
+#define BUSTURNAROUND(x)       (((x) &  0xf) <<  0)
+
+/* Values for GPMC_CONFIG7 - CS address mapping configuration */
+#define MASKADDRESS(x)         (((x) &  0xf) <<  8)
+#define CSVALID                (1 << 6)
+#define BASEADDRESS(x)         (((x) & 0x3f) <<  0)
+
+#endif /* _OMAP3_REGS_H */
Signature · 1 line
1.7.1
#40 lore raw

PATCH v4 3/4 ARMV7: OMAP3: Add GPMC_CONFIGx register value definitions

Quoted 4 lines
Quoted 9 lines

---
Changes in v4:
- this patch is new in v4.

 arch/arm/include/asm/arch-omap3/omap3-regs.h |   95
++++++++++++++++++++++++++
 1 files changed, 95 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-omap3/omap3-regs.h

Thanks

Pushed to u-boot-ti

--Sandeep

#41 lore raw

PATCH v4 4/4 ARMV7: OMAP3: Add support for Comelit DIG297 board

In reply to Luca Ceresoli

Board support for the DIG297 board manufactured by Comelit Group SpA. It is a custom board based on the BeagleBoard <http://beagleboard.org/> by Texas Instruments.

The board support is based on the BeagleBoard implementation.

Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
Changes in v2:
- renamed board from CPS to DIG297;
- fixed all (relevant) issues raised by checkpatch.pl;
- removed config.mk from board dir;
- fixed coding style;
- minor cleanups.

Changes in v3: none.

Changes in v4:
- MAKEALL: keep it sorted alphabetically;
- Fixed multiline comments;
- Use enable_gpmc_cs_config() to initialize GPMC for the LAN chip;
- Remove useless #ifdef CONFIG_SMC911X;
- Fixed english translation;
- Removed "ro" flag from mtdparts;
- Updated prompt to board name ("DIG297# ").

 MAINTAINERS                   |    4 +
 MAKEALL                       |    1 +
 board/comelit/dig297/Makefile |   49 ++++++
 board/comelit/dig297/dig297.c |  187 ++++++++++++++++++++
 board/comelit/dig297/dig297.h |  383 +++++++++++++++++++++++++++++++++++++++++
 boards.cfg                    |    1 +
 include/configs/dig297.h      |  311 +++++++++++++++++++++++++++++++++
 7 files changed, 936 insertions(+), 0 deletions(-)
 create mode 100644 board/comelit/dig297/Makefile
 create mode 100644 board/comelit/dig297/dig297.c
 create mode 100644 board/comelit/dig297/dig297.h
 create mode 100644 include/configs/dig297.h
MAINTAINERS +4 -0
index 1299cbb..5feb6de 100644
@@ -599,6 +599,10 @@ Rick Bronson <[email protected]>
 
 	AT91RM9200DK	at91rm9200
 
+Luca Ceresoli <[email protected]>
+
+	dig297		ARM ARMV7 (OMAP3530 SoC)
+
 Po-Yu Chuang <[email protected]>
 
 	a320evb		FA526 (ARM920T-like) (a320 SoC)
MAKEALL +1 -0
index 6acece7..088b6bc 100755
@@ -421,6 +421,7 @@ LIST_ARMV7="		\
 	am3517_evm		\
 	ca9x4_ct_vxp		\
 	devkit8000		\
+	dig297			\
 	igep0020		\
 	igep0030		\
 	mx51evk			\
board/comelit/dig297/Makefile new file +49 -0

49 lines not on this page · raw message

board/comelit/dig297/dig297.c new file +187 -0

187 lines not on this page · raw message

board/comelit/dig297/dig297.h new file +383 -0

383 lines not on this page · raw message

boards.cfg +1 -0
index 554e06c..0d8dfd4 100644
@@ -117,6 +117,7 @@ omap3_pandora                arm         armv7       pandora             -
 igep0020                     arm         armv7       igep0020            isee           omap3
 igep0030                     arm         armv7       igep0030            isee           omap3
 am3517_evm                   arm         armv7       am3517evm           logicpd        omap3
+dig297                       arm         armv7       dig297              comelit        omap3
 omap3_zoom1                  arm         armv7       zoom1               logicpd        omap3
 omap3_zoom2                  arm         armv7       zoom2               logicpd        omap3
 omap3_beagle                 arm         armv7       beagle              ti             omap3
include/configs/dig297.h new file +311 -0

311 lines not on this page · raw message

Signature · 1 line
1.7.1
#42 lore raw

PATCH v4 4/4 ARMV7: OMAP3: Add support for Comelit DIG297 board

Quoted 23 lines

Board support for the DIG297 board manufactured by Comelit Group SpA. It is a custom board based on the BeagleBoard <http://beagleboard.org/> by Texas Instruments.

The board support is based on the BeagleBoard implementation.

Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
Changes in v2:
- renamed board from CPS to DIG297;
- fixed all (relevant) issues raised by checkpatch.pl;
- removed config.mk from board dir;
- fixed coding style;
- minor cleanups.

Changes in v3: none.

Quoted 8 lines

Changes in v4:
- MAKEALL: keep it sorted alphabetically;
- Fixed multiline comments;
- Use enable_gpmc_cs_config() to initialize GPMC for the LAN chip;
- Remove useless #ifdef CONFIG_SMC911X;
- Fixed english translation;
- Removed "ro" flag from mtdparts;
- Updated prompt to board name ("DIG297# ").

I'll apply this after you resend the patch

ARMV7: OMAP3: Cleanup extern variables in mem.c

--Sandeep

#43 lore raw

PATCH v4 4/4 ARMV7: OMAP3: Add support for Comelit DIG297 board

Quoted 10 lines · Sandeep
Quoted 4 lines

Board support for the DIG297 board manufactured by Comelit Group SpA. It is a custom board based on the BeagleBoard<http://beagleboard.org/> by Texas Instruments.
...

I'll apply this after you resend the patch

ARMV7: OMAP3: Cleanup extern variables in mem.c

--Sandeep

Ok, but while rebasing these two patches, I'll have to re-add MACH_TYPE_OMAP3_CPS to mach-types.h, as it has just been removed.

Luca

#44 lore raw

PATCH v4 4/4 ARMV7: OMAP3: Add support for Comelit DIG297 board

Quoted 11 lines
Quoted 2 lines · Sandeep
Quoted 2 lines

Board support for the DIG297 board manufactured by Comelit Group SpA. It is a custom board based on the BeagleBoard<http://beagleboard.org/>

by

Quoted 3 lines
Quoted 2 lines

Texas Instruments.
...

Quoted 8 lines
Quoted 5 lines

I'll apply this after you resend the patch

ARMV7: OMAP3: Cleanup extern variables in mem.c

--Sandeep

Ok, but while rebasing these two patches, I'll have to re-add MACH_TYPE_OMAP3_CPS to
mach-types.h, as it has just been removed.

I don't think you should modify the mach-types.h.

The mach types patch has not been formally accepted or rejected by Wolfgang or Albert. As Wolfgang suggested for the time being you can send a dummy value like 0.

Or define something like CONFIG_MACH_TYPE_OMAP3_CPS in your config header and then use this value.

--Sandeep

#45 lore raw

PATCH v2 1/4 ARMV7: OMAP3: Fix preprocessor check for CONFIG_OMAP34XX

In reply to Luca Ceresoli

CONFIG_OMAP34XX must be checked for existence, not value.

Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
Changes in v2:
- this patch is new in v2.

 arch/arm/cpu/armv7/start.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/cpu/armv7/start.S +1 -1
index cb4f92f..da054a1 100644
@@ -111,7 +111,7 @@ reset:
 	orr	r0, r0, #0xd3
 	msr	cpsr,r0
 
-#if (CONFIG_OMAP34XX)
+#if defined(CONFIG_OMAP34XX)
 	/* Copy vectors to mask ROM indirect addr */
 	adr	r0, _start		@ r0 <- current position of code
 	add	r0, r0, #4		@ skip reset vector
Signature · 1 line
1.7.1
#46 lore raw

PATCH v3 2/4 ARMV7: OMAP3: Remove unused variable boot_flash_env_addr

In reply to Luca Ceresoli
Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
Changes in v2:
- this patch is new in v2.

 include/configs/cm_t35.h        |    1 -
 include/configs/devkit8000.h    |    1 -
 include/configs/omap3_beagle.h  |    1 -
 include/configs/omap3_overo.h   |    1 -
 include/configs/omap3_pandora.h |    1 -
 include/configs/omap3_sdp3430.h |    1 -
 include/configs/omap3_zoom1.h   |    1 -
 include/configs/omap3_zoom2.h   |    1 -
 8 files changed, 0 insertions(+), 8 deletions(-)
include/configs/cm_t35.h +0 -1
index 510c6d4..2c5f13b 100644
@@ -326,7 +326,6 @@
 
 #ifndef __ASSEMBLY__
 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;
include/configs/devkit8000.h +0 -1
index d898b77..060d7a6 100644
@@ -301,7 +301,6 @@
 
 #ifndef __ASSEMBLY__
 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;
include/configs/omap3_beagle.h +0 -1
index 5cfa4cb..d010ff7 100644
@@ -322,7 +322,6 @@
 
 #ifndef __ASSEMBLY__
 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;
include/configs/omap3_overo.h +0 -1
index 1b3d439..1bf837e 100644
@@ -287,7 +287,6 @@
 
 #ifndef __ASSEMBLY__
 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;
include/configs/omap3_pandora.h +0 -1
index 72b0cc2..2561428 100644
@@ -276,7 +276,6 @@
 
 #ifndef __ASSEMBLY__
 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;
include/configs/omap3_sdp3430.h +0 -1
index 4708981..ad0d501 100644
@@ -362,7 +362,6 @@
 
 #ifndef __ASSEMBLY__
 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;
include/configs/omap3_zoom1.h +0 -1
index f7d0652..4cec6a9 100644
@@ -301,7 +301,6 @@
 
 #ifndef __ASSEMBLY__
 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;
include/configs/omap3_zoom2.h +0 -1
index 7377933..0736cef 100644
@@ -268,7 +268,6 @@
 
 #ifndef __ASSEMBLY__
 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;
Signature · 1 line
1.7.1
#47 lore raw

PATCH v3 3/4 ARMV7: OMAP3: boot_flash_env_addr should not be volatile

In reply to Luca Ceresoli
Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
Changes in v2:
- this patch is new in v2.

 arch/arm/cpu/armv7/omap3/mem.c |    2 +-
 include/configs/am3517_evm.h   |    2 +-
 include/configs/omap3_evm.h    |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/cpu/armv7/omap3/mem.c +1 -1
index bd914b0..e9de05d 100644
@@ -39,7 +39,7 @@ unsigned int boot_flash_base;
 unsigned int boot_flash_off;
 unsigned int boot_flash_sec;
 unsigned int boot_flash_type;
-volatile unsigned int boot_flash_env_addr;
+unsigned int boot_flash_env_addr;
 
 struct gpmc *gpmc_cfg;
 
include/configs/am3517_evm.h +1 -1
index 70e8f07..bc2e8bb 100644
@@ -325,7 +325,7 @@
 
 #ifndef __ASSEMBLY__
 extern unsigned int boot_flash_base;
-extern volatile unsigned int boot_flash_env_addr;
+extern unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
 extern unsigned int boot_flash_sec;
 extern unsigned int boot_flash_type;
include/configs/omap3_evm.h +1 -1
index 5bdb3fd..570e794 100644
@@ -320,7 +320,7 @@
 
 #ifndef __ASSEMBLY__
 extern unsigned int boot_flash_base;
-extern volatile unsigned int boot_flash_env_addr;
+extern unsigned int boot_flash_env_addr;
 extern unsigned int boot_flash_off;
 extern unsigned int boot_flash_sec;
 extern unsigned int boot_flash_type;
Signature · 1 line
1.7.1
#48 lore raw

PATCH v3 4/4 ARMV7: OMAP3: Add support for Comelit DIG297 board

In reply to Luca Ceresoli

Board support for the DIG297 board manufactured by Comelit Group SpA. It is a custom board baseed on the BeagleBoard <http://beagleboard.org/> by Texas Instruments.

The board support is based on the BeagleBoard implementation.

Cc Wolfgang Denk <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
Changes in v2:
- renamed board from CPS to DIG297;
- fixed all (relevant) issues raised by checkpatch.pl;
- removed config.mk from board dir;
- fixed coding style;
- minor cleanups.

 MAINTAINERS                   |    4 +
 MAKEALL                       |    1 +
 board/comelit/dig297/Makefile |   49 ++++++
 board/comelit/dig297/dig297.c |  174 +++++++++++++++++++
 board/comelit/dig297/dig297.h |  380 +++++++++++++++++++++++++++++++++++++++++
 boards.cfg                    |    1 +
 include/configs/dig297.h      |  318 ++++++++++++++++++++++++++++++++++
 7 files changed, 927 insertions(+), 0 deletions(-)
 create mode 100644 board/comelit/dig297/Makefile
 create mode 100644 board/comelit/dig297/dig297.c
 create mode 100644 board/comelit/dig297/dig297.h
 create mode 100644 include/configs/dig297.h
MAINTAINERS +4 -0
index 4756f14..d363710 100644
@@ -599,6 +599,10 @@ Rick Bronson <[email protected]>
 
 	AT91RM9200DK	at91rm9200
 
+Luca Ceresoli <[email protected]>
+
+	dig297		ARM ARMV7 (OMAP3530 SoC)
+
 Po-Yu Chuang <[email protected]>
 
 	a320evb		FA526 (ARM920T-like) (a320 SoC)
MAKEALL +1 -0
index a732e6a..3e28e64 100755
@@ -425,6 +425,7 @@ LIST_ARMV7="		\
 	igep0030		\
 	mx51evk			\
 	omap3_beagle		\
+	dig297			\
 	omap3_overo		\
 	omap3_evm		\
 	omap3_pandora		\
board/comelit/dig297/Makefile new file +49 -0

49 lines not on this page · raw message

board/comelit/dig297/dig297.c new file +174 -0

174 lines not on this page · raw message

board/comelit/dig297/dig297.h new file +380 -0

380 lines not on this page · raw message

boards.cfg +1 -0
index 45c3102..087a633 100644
@@ -117,6 +117,7 @@ omap3_pandora                arm         armv7       pandora             -
 igep0020                     arm         armv7       igep0020            isee           omap3
 igep0030                     arm         armv7       igep0030            isee           omap3
 am3517_evm                   arm         armv7       am3517evm           logicpd        omap3
+dig297                       arm         armv7       dig297              comelit        omap3
 omap3_zoom1                  arm         armv7       zoom1               logicpd        omap3
 omap3_zoom2                  arm         armv7       zoom2               logicpd        omap3
 omap3_beagle                 arm         armv7       beagle              ti             omap3
include/configs/dig297.h new file +318 -0

318 lines not on this page · raw message

Signature · 1 line
1.7.1