Skip to contentSkip to conversation

ARM: phytec: pcm051: select board revision by Kconfig

PATCH New poeschel at lemonage.de 2 participants 2 messages Jun 4, 2015 – Jun 19, 2015 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: phytec: pcm051: select board revision by Kconfig

From: Lars Poeschel <[email protected]>

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.

---
 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(-)
arch/arm/Kconfig +17 -2
index 2985e6e..193a111 100644
@@ -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"
board/phytec/pcm051/Kconfig +9 -2
index 2cc0d88..5981c72 100644
@@ -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"
board/phytec/pcm051/board.c +1 -1
index 1bf9d73..3e01c01 100644
@@ -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,
configs/pcm051_rev1_defconfig +1 -2
index 1ea9333..239ed70 100644
@@ -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
configs/pcm051_rev3_defconfig +1 -2
index a0a32f6..7992dc3 100644
@@ -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
Signature · 1 line
2.1.4
#1 lore raw

PATCH v2 1/1 ARM: phytec: pcm051: select board revision by Kconfig

Quoted 7 lines · Lars Poeschel

From: Lars Poeschel <[email protected]>

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.

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

Signature · 8 lines
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>