From: Tom Rini Date: Tue, 2 Jun 2015 10:34:34 -0400 Subject: [U-Boot] [PATCH] ARM: phytec: pcm051: select board revision by Kconfig In-Reply-To: <1433171351-20418-1-git-send-email-poeschel@lemonage.de> References: <1433171351-20418-1-git-send-email-poeschel@lemonage.de> Message-ID: <20150602143434.GQ1728@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Jun 01, 2015 at 05:09:11PM +0200, poeschel at lemonage.de wrote: > From: Lars Poeschel > > 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 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! > --- > board/phytec/pcm051/Kconfig | 19 +++++++++++++++++++ > configs/pcm051_rev1_defconfig | 2 +- > configs/pcm051_rev3_defconfig | 2 +- > 3 files changed, 21 insertions(+), 2 deletions(-) > > diff --git a/board/phytec/pcm051/Kconfig b/board/phytec/pcm051/Kconfig > index 2cc0d88..c1071c6 100644 > --- a/board/phytec/pcm051/Kconfig > +++ b/board/phytec/pcm051/Kconfig > @@ -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 > diff --git a/configs/pcm051_rev1_defconfig b/configs/pcm051_rev1_defconfig > index af02b2f..0a28195 100644 > --- a/configs/pcm051_rev1_defconfig > +++ b/configs/pcm051_rev1_defconfig > @@ -1,4 +1,4 @@ > CONFIG_ARM=y > CONFIG_TARGET_PCM051=y > CONFIG_SPL=y > -CONFIG_SYS_EXTRA_OPTIONS="REV1" > +CONFIG_REV1=y > diff --git a/configs/pcm051_rev3_defconfig b/configs/pcm051_rev3_defconfig > index 2a907d7..4ad49df 100644 > --- a/configs/pcm051_rev3_defconfig > +++ b/configs/pcm051_rev3_defconfig > @@ -1,4 +1,4 @@ > CONFIG_ARM=y > CONFIG_TARGET_PCM051=y > CONFIG_SPL=y > -CONFIG_SYS_EXTRA_OPTIONS="REV3" > +CONFIG_REV3=y > -- > 2.1.4 > > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: