public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] ARM: phytec: pcm051: select board revision by Kconfig
@ 2015-06-04  8:07 poeschel at lemonage.de
  2015-06-19 20:24 ` [U-Boot] [U-Boot, " Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: poeschel at lemonage.de @ 2015-06-04  8:07 UTC (permalink / raw)
  To: u-boot

From: Lars Poeschel <poeschel@lemonage.de>

This add a Kconfig entry that allows to set the board revision in
menuconfig. So the deprecated CONFIG_SYS_EXTRA_OPTIONS is no longer
needed for this boad.

Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
---
 arch/arm/Kconfig              | 19 +++++++++++++++++--
 board/phytec/pcm051/Kconfig   | 11 +++++++++--
 board/phytec/pcm051/board.c   |  2 +-
 configs/pcm051_rev1_defconfig |  3 +--
 configs/pcm051_rev3_defconfig |  3 +--
 5 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2985e6e..193a111 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -333,13 +333,28 @@ config TARGET_AM335X_IGEP0033
 	select DM_SERIAL
 	select DM_GPIO
 
-config TARGET_PCM051
-	bool "Support pcm051"
+config TARGET_PCM051_REV1
+	bool "Support pcm051 board revision 1 or 2"
 	select CPU_V7
 	select SUPPORT_SPL
 	select DM
 	select DM_SERIAL
 	select DM_GPIO
+	help
+	  If you have 1358.1 written on the pcb of your pcm051, you
+	  have a revision 1 board. Likewise if you have 1358.2 on your
+	  board, it is a revision 2 board and this entry is for you.
+
+config TARGET_PCM051_REV3
+	bool "Support pcm051 board revision 3"
+	select CPU_V7
+	select SUPPORT_SPL
+	select DM
+	select DM_SERIAL
+	select DM_GPIO
+	help
+	  If you have 1358.3 written on the pcb of your pcm051, you
+	  have a revision 3 board and you have to select this entry.
 
 config TARGET_DRACO
 	bool "Support draco"
diff --git a/board/phytec/pcm051/Kconfig b/board/phytec/pcm051/Kconfig
index 2cc0d88..5981c72 100644
--- a/board/phytec/pcm051/Kconfig
+++ b/board/phytec/pcm051/Kconfig
@@ -1,7 +1,14 @@
-if TARGET_PCM051
+if TARGET_PCM051_REV1 || TARGET_PCM051_REV3
 
+if TARGET_PCM051_REV1
 config SYS_BOARD
-	default "pcm051"
+	default "pcm051rev1"
+endif
+
+if TARGET_PCM051_REV3
+config SYS_BOARD
+	default "pcm051rev3"
+endif
 
 config SYS_VENDOR
 	default "phytec"
diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c
index 1bf9d73..3e01c01 100644
--- a/board/phytec/pcm051/board.c
+++ b/board/phytec/pcm051/board.c
@@ -49,7 +49,7 @@ const struct dpll_params *get_dpll_ddr_params(void)
 	return &dpll_ddr;
 }
 
-#ifdef CONFIG_REV1
+#ifdef CONFIG_TARGET_PCM051_REV1
 const struct ctrl_ioregs ioregs = {
 	.cm0ioctl		= MT41J256M8HX15E_IOCTRL_VALUE,
 	.cm1ioctl		= MT41J256M8HX15E_IOCTRL_VALUE,
diff --git a/configs/pcm051_rev1_defconfig b/configs/pcm051_rev1_defconfig
index 1ea9333..239ed70 100644
--- a/configs/pcm051_rev1_defconfig
+++ b/configs/pcm051_rev1_defconfig
@@ -1,5 +1,4 @@
 CONFIG_ARM=y
-CONFIG_TARGET_PCM051=y
+CONFIG_TARGET_PCM051_REV1=y
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="REV1"
 CONFIG_CMD_NET=y
diff --git a/configs/pcm051_rev3_defconfig b/configs/pcm051_rev3_defconfig
index a0a32f6..7992dc3 100644
--- a/configs/pcm051_rev3_defconfig
+++ b/configs/pcm051_rev3_defconfig
@@ -1,5 +1,4 @@
 CONFIG_ARM=y
-CONFIG_TARGET_PCM051=y
+CONFIG_TARGET_PCM051_REV3=y
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="REV3"
 CONFIG_CMD_NET=y
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [U-Boot, v2] ARM: phytec: pcm051: select board revision by Kconfig
  2015-06-04  8:07 [U-Boot] [PATCH v2] ARM: phytec: pcm051: select board revision by Kconfig poeschel at lemonage.de
@ 2015-06-19 20:24 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2015-06-19 20:24 UTC (permalink / raw)
  To: u-boot

On Thu, Jun 04, 2015 at 10:07:36AM +0200, Lars Poeschel wrote:

> From: Lars Poeschel <poeschel@lemonage.de>
> 
> This add a Kconfig entry that allows to set the board revision in
> menuconfig. So the deprecated CONFIG_SYS_EXTRA_OPTIONS is no longer
> needed for this boad.
> 
> Signed-off-by: Lars Poeschel <poeschel@lemonage.de>

Doesn't work for me:
       arm:  +   pcm051_rev3                               
+(pcm051_rev3) scripts/Makefile.build:56: board/phytec/pcm051rev3/Makefile: No such file or directory
+(pcm051_rev3) make[2]: *** No rule to make target `board/phytec/pcm051rev3/Makefile'.  Stop.
+(pcm051_rev3) make[1]: *** [board/phytec/pcm051rev3] Error 2
+(pcm051_rev3) make: *** [sub-make] Error 2
       arm:  +   am335x_boneblack_vboot        
+(am335x_boneblack_vboot) make[1]: *** [checkdtc] Error 1
+(am335x_boneblack_vboot) make: *** [sub-make] Error 2
       arm:  +   pcm051_rev1                              
+(pcm051_rev1) scripts/Makefile.build:56: board/phytec/pcm051rev1/Makefile: No such file or directory
+(pcm051_rev1) make[2]: *** No rule to make target `board/phytec/pcm051rev1/Makefile'.  Stop.
+(pcm051_rev1) make[1]: *** [board/phytec/pcm051rev1] Error 2
+(pcm051_rev1) make: *** [sub-make] Error 2


-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150619/608f7bf9/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-19 20:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-04  8:07 [U-Boot] [PATCH v2] ARM: phytec: pcm051: select board revision by Kconfig poeschel at lemonage.de
2015-06-19 20:24 ` [U-Boot] [U-Boot, " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox