ARM: phytec: pcm051: select board revision by Kconfig
PATCH 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.
--- board/phytec/pcm051/Kconfig | 19 +++++++++++++++++++ configs/pcm051_rev1_defconfig | 2 +- configs/pcm051_rev3_defconfig | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-)
board/phytec/pcm051/Kconfig +19 -0
@@ -12,4 +12,23 @@ config SYS_SOC config SYS_CONFIG_NAME default "pcm051" +choice +prompt "pcm051 revision select" +default REV3 + +config REV1 + bool "pcm051 revision 1 or 2" + 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 REV3 + bool "pcm051 revision 3" + 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. + +endchoice + endif
configs/pcm051_rev1_defconfig +1 -1
@@ -1,4 +1,4 @@ CONFIG_ARM=y CONFIG_TARGET_PCM051=y CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="REV1" +CONFIG_REV1=y
configs/pcm051_rev3_defconfig +1 -1
@@ -1,4 +1,4 @@ CONFIG_ARM=y CONFIG_TARGET_PCM051=y CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="REV3" +CONFIG_REV3=y
Signature · 1 line
2.1.4
PATCH 1/1 ARM: phytec: pcm051: select board revision by Kconfig
Quoted 7 lines · poeschel at lemonage.de
From: Lars Poeschel <[email protected]>
This add a
Kconfigentry that allows to set the board revision in menuconfig. So the deprecatedCONFIG_SYS_EXTRA_OPTIONSis no longer needed for this boad.Signed-off-by Lars Poeschel <[email protected]>
I like the concept but CONFIG_REVx is way too generic. Can we maybe re-work things as CONFIG_TARGET_PCM051_REV1 / CONFIG_TARGET_PCM051_REV3 (and those select CONFIG_TARGET_PCM051) ? Masahiro? Thanks!
Quoted 61 lines
--- board/phytec/pcm051/Kconfig | 19 +++++++++++++++++++ configs/pcm051_rev1_defconfig | 2 +- configs/pcm051_rev3_defconfig | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-)board/phytec/pcm051/Kconfig +19
-0@@ -12,4 +12,23 @@ config SYS_SOC config SYS_CONFIG_NAME default "pcm051" +choice +prompt "pcm051 revision select" +default REV3 + +config REV1 + bool "pcm051 revision 1 or 2" + 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 REV3 + bool "pcm051 revision 3" + 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. + +endchoice + endifconfigs/pcm051_rev1_defconfig +1
-1@@ -1,4 +1,4 @@ CONFIG_ARM=y CONFIG_TARGET_PCM051=y CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="REV1" +CONFIG_REV1=yconfigs/pcm051_rev3_defconfig +1
-1@@ -1,4 +1,4 @@ CONFIG_ARM=y CONFIG_TARGET_PCM051=y CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="REV3" +CONFIG_REV3=ySignature · 6 lines
2.1.4 _______________________________________________ U-Boot mailing list U-Boot at lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
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/20150602/c23f007a/attachment.sig>
PATCH 1/1 ARM: phytec: pcm051: select board revision by Kconfig
Quoted 8 lines · Tom Rini
Quoted 6 lines · poeschel at lemonage.de
From: Lars Poeschel <[email protected]>
This add a
Kconfigentry that allows to set the board revision in menuconfig. So the deprecatedCONFIG_SYS_EXTRA_OPTIONSis no longer needed for this boad.
Quoted 5 lines
Quoted 1 line
Signed-off-by Lars Poeschel <[email protected]>I like the concept but
CONFIG_REVxis way too generic. Can we maybe re-work things asCONFIG_TARGET_PCM051_REV1/CONFIG_TARGET_PCM051_REV3(and those selectCONFIG_TARGET_PCM051) ? Masahiro? Thanks!
Agree: CONFIG_REVx is too generic. I will send a version 2 of the patch, but I don't understand why you want CONFIG_TARGET_PCM051_REV1 / CONFIG_TARGET_PCM051_REV3 to select CONFIG_TARGET_PCM051. The CONFIG_TARGET_PCM051_REVx's are inside an
if TARGET_PCM051
...
endif
That means, that CONFIG_TARGET_PCM051 must already be selected to make the *_REVx's visible and selectable.
Quoted 57 lines
Quoted 57 lines
--- board/phytec/pcm051/Kconfig | 19 +++++++++++++++++++ configs/pcm051_rev1_defconfig | 2 +- configs/pcm051_rev3_defconfig | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-)board/phytec/pcm051/Kconfig +19
-0@@ -12,4 +12,23 @@ config SYS_SOC config SYS_CONFIG_NAME default "pcm051" +choice +prompt "pcm051 revision select" +default REV3 + +config REV1 + bool "pcm051 revision 1 or 2" + 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 REV3 + bool "pcm051 revision 3" + 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. + +endchoice + endifconfigs/pcm051_rev1_defconfig +1
-1@@ -1,4 +1,4 @@ CONFIG_ARM=y CONFIG_TARGET_PCM051=y CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="REV1" +CONFIG_REV1=yconfigs/pcm051_rev3_defconfig +1
-1@@ -1,4 +1,4 @@ CONFIG_ARM=y CONFIG_TARGET_PCM051=y CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS="REV3" +CONFIG_REV3=ySignature · 1 line
2.1.4
Quoted 7 lines
Quoted 4 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-bootSignature · 1 line
Tom
Regards,
Lars
PATCH 1/1 ARM: phytec: pcm051: select board revision by Kconfig
Quoted 20 lines · Lars Poeschel
Quoted 8 lines · Tom Rini
Quoted 6 lines · poeschel at lemonage.de
From: Lars Poeschel <[email protected]>
This add a
Kconfigentry that allows to set the board revision in menuconfig. So the deprecatedCONFIG_SYS_EXTRA_OPTIONSis no longer needed for this boad.Quoted 5 lines
Quoted 1 line
Signed-off-by Lars Poeschel <[email protected]>I like the concept but
CONFIG_REVxis way too generic. Can we maybe re-work things asCONFIG_TARGET_PCM051_REV1/CONFIG_TARGET_PCM051_REV3(and those selectCONFIG_TARGET_PCM051) ? Masahiro? Thanks!Agree:
CONFIG_REVxis too generic. I will send a version 2 of the patch, but I don't understand why you wantCONFIG_TARGET_PCM051_REV1/CONFIG_TARGET_PCM051_REV3to selectCONFIG_TARGET_PCM051. The CONFIG_TARGET_PCM051_REVx's are inside an
Quoted 6 lines
if
TARGET_PCM051
...
endifThat means, that
CONFIG_TARGET_PCM051must already be selected to make the *_REVx's visible and selectable.
Right. I mean since we must select one of these boards at build-time, why not just ask about them up-front in arch/arm/Kconfig as rev1/rev3, and then have the main symbol be a hidden one, ie roughly:
config TARGET_PCM051
bool
config TARGET_PCM051_REV1
bool "Enable pcm051 rev1"
select TARGET_PCM051
help
...
config TARGET_PCM051_REV3
bool "Enable pcm051 rev3"
select TARGET_PCM051
help
...
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/20150603/f5b43e85/attachment.sig>
PATCH 1/1 ARM: phytec: pcm051: select board revision by Kconfig
Quoted 25 lines · Tom Rini
Quoted 24 lines · Lars Poeschel
Quoted 8 lines · Tom Rini
Quoted 6 lines · poeschel at lemonage.de
From: Lars Poeschel <[email protected]>
This add a
Kconfigentry that allows to set the board revision in menuconfig. So the deprecatedCONFIG_SYS_EXTRA_OPTIONSis no longer needed for this boad.Quoted 5 lines
Quoted 1 line
Signed-off-by Lars Poeschel <[email protected]>I like the concept but
CONFIG_REVxis way too generic. Can we maybe re-work things asCONFIG_TARGET_PCM051_REV1/CONFIG_TARGET_PCM051_REV3(and those selectCONFIG_TARGET_PCM051) ? Masahiro? Thanks!Agree:
CONFIG_REVxis too generic. I will send a version 2 of the patch, but I don't understand why you wantCONFIG_TARGET_PCM051_REV1/CONFIG_TARGET_PCM051_REV3to selectCONFIG_TARGET_PCM051. The CONFIG_TARGET_PCM051_REVx's are inside anif
TARGET_PCM051
...
endif
Quoted 5 lines
Quoted 2 lines
That means, that
CONFIG_TARGET_PCM051must already be selected to make the *_REVx's visible and selectable.Right. I mean since we must select one of these boards at build-time, why not just ask about them up-front in
arch/arm/Kconfigas rev1/rev3,
I wanted the initial list you choose your board from not to grow too big. The (unsorted) list you scroll in menuconfig is already huge! I like the aproach "Atmel AT91" takes more, and I'd propably even go one step further an select a manufacturer as a first step and then in a second step select a specific board from this manufacturer. But if you prefer the other way - no problem. I tried that:
Quoted 9 lines
and then have the main symbol be a hidden one, ie roughly:
config
TARGET_PCM051
boolconfig
TARGET_PCM051_REV1
bool "Enable pcm051 rev1"
selectTARGET_PCM051
help
Quoted 7 lines
...config
TARGET_PCM051_REV3
bool "Enable pcm051 rev3"
selectTARGET_PCM051
help...
I could not get this approach to work. It seems Kconfig does not support hidden config options. I took a slightly different approach. I'll send a PATCH V2 in a second. Please have a look, if that is what what you mean.
Lars
PATCH 1/1 ARM: phytec: pcm051: select board revision by Kconfig
Hi.
Sorry for my late reply.
2015-06-04 17:07 GMT+09:00 Lars Poeschel <[email protected]>:
Quoted 29 lines · Tom Rini
Quoted 28 lines · Lars Poeschel
Quoted 26 lines · Tom Rini
Quoted 8 lines · poeschel at lemonage.de
Quoted 7 lines
From: Lars Poeschel <[email protected]>
This add a
Kconfigentry that allows to set the board revision in menuconfig. So the deprecatedCONFIG_SYS_EXTRA_OPTIONSis no longer needed for this boad.Quoted 5 lines
Quoted 1 line
Signed-off-by Lars Poeschel <[email protected]>I like the concept but
CONFIG_REVxis way too generic. Can we maybe re-work things asCONFIG_TARGET_PCM051_REV1/CONFIG_TARGET_PCM051_REV3(and those selectCONFIG_TARGET_PCM051) ? Masahiro? Thanks!Agree:
CONFIG_REVxis too generic. I will send a version 2 of the patch, but I don't understand why you wantCONFIG_TARGET_PCM051_REV1/CONFIG_TARGET_PCM051_REV3to selectCONFIG_TARGET_PCM051. The CONFIG_TARGET_PCM051_REVx's are inside anif
TARGET_PCM051
...
endifThat means, that
CONFIG_TARGET_PCM051must already be selected to make the *_REVx's visible and selectable.
Quoted 8 lines
Quoted 2 lines
Right. I mean since we must select one of these boards at build-time, why not just ask about them up-front in
arch/arm/Kconfigas rev1/rev3,I wanted the initial list you choose your board from not to grow too big. The (unsorted) list you scroll in menuconfig is already huge! I like the aproach "Atmel AT91" takes more, and I'd propably even go one step further an select a manufacturer as a first step and then in a second step select a specific board from this manufacturer.
Right.
Refactoring arch/arm/Kconfig is still under way.
I think the biggest part of the remainder is Freescale boards.
Quoted 19 lines
But if you prefer the other way - no problem. I tried that:
Quoted 9 lines
and then have the main symbol be a hidden one, ie roughly:
config
TARGET_PCM051
boolconfig
TARGET_PCM051_REV1
bool "Enable pcm051 rev1"
selectTARGET_PCM051
helpQuoted 7 lines
...config
TARGET_PCM051_REV3
bool "Enable pcm051 rev3"
selectTARGET_PCM051
help...
Quoted 3 lines
I could not get this approach to work. It seems
Kconfigdoes not support hidden config options. I took a slightly different approach. I'll send a PATCH V2 in a second. Please have a look, if that is what what you mean.
Why do we need to "select" the board?
The problem here is that CONFIG_REV1/_REV3 are too generic, so I think just renaming them into CONFIG_PCM051_REV1/_REV3 is enough and better.
choice
prompt "pcm051 revision select"
default REV3
config PCM051_REV1
bool "pcm051 revision 1 or 2"
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 PCM051_REV3
bool "pcm051 revision 3"
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.
endchoice
Signature · 2 lines
Best Regards Masahiro Yamada