From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [[PATCH v2 6/6] ARM: mx5: use generic function for displaying silicon revision
Date: Thu, 25 Aug 2011 16:51:47 +0200 [thread overview]
Message-ID: <20110825145147.GX31404@pengutronix.de> (raw)
In-Reply-To: <1314162277-2840-7-git-send-email-jason.hui@linaro.org>
On Wed, Aug 24, 2011 at 01:04:37PM +0800, Jason Liu wrote:
> Update to use generic function for displaying silicon revision
>
> Signed-off-by: Jason Liu <jason.hui@linaro.org>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> arch/arm/mach-mx5/clock-mx51-mx53.c | 6 +--
> arch/arm/mach-mx5/cpu.c | 74 ++++++++---------------------------
> 2 files changed, 19 insertions(+), 61 deletions(-)
>
> diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c
> index f7bf996..0e23e1d 100644
> --- a/arch/arm/mach-mx5/clock-mx51-mx53.c
> +++ b/arch/arm/mach-mx5/clock-mx51-mx53.c
> @@ -1548,9 +1548,8 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned long osc,
> clk_enable(&main_bus_clk);
>
> clk_enable(&iim_clk);
> - mx51_revision();
> + imx_print_silicon_rev("i.MX51", mx51_revision());
> clk_disable(&iim_clk);
> - mx51_display_revision();
>
> /* move usb_phy_clk to 24MHz */
> clk_set_parent(&usb_phy1_clk, &osc_clk);
> @@ -1592,9 +1591,8 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned long osc,
> clk_enable(&main_bus_clk);
>
> clk_enable(&iim_clk);
> - mx53_revision();
> + imx_print_silicon_rev("i.MX53", mx53_revision());
> clk_disable(&iim_clk);
> - mx53_display_revision();
>
> /* Set SDHC parents to be PLL2 */
> clk_set_parent(&esdhc1_clk, &pll2_sw_clk);
> diff --git a/arch/arm/mach-mx5/cpu.c b/arch/arm/mach-mx5/cpu.c
> index 86f87da..df46967 100644
> --- a/arch/arm/mach-mx5/cpu.c
> +++ b/arch/arm/mach-mx5/cpu.c
> @@ -18,7 +18,7 @@
> #include <mach/hardware.h>
> #include <asm/io.h>
>
> -static int cpu_silicon_rev = -1;
> +static int mx5_cpu_rev = -1;
>
> #define IIM_SREV 0x24
> #define MX50_HW_ADADIG_DIGPROG 0xB0
> @@ -28,11 +28,14 @@ static int get_mx51_srev(void)
> void __iomem *iim_base = MX51_IO_ADDRESS(MX51_IIM_BASE_ADDR);
> u32 rev = readl(iim_base + IIM_SREV) & 0xff;
>
> - if (rev == 0x0)
> + switch (rev) {
> + case 0x0:
> return IMX_CHIP_REVISION_2_0;
> - else if (rev == 0x10)
> + case 0x2:
> return IMX_CHIP_REVISION_3_0;
0x2 != 0x10
My babbage board now shows a unknown cpu revision.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2011-08-25 14:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 5:04 [[PATCH v2 0/6] imx soc revision clean up Jason Liu
2011-08-24 5:04 ` [[PATCH v2 1/6] ARM: imx: Introduce generic function for displaying silicon revision Jason Liu
2011-08-24 5:04 ` [[PATCH v2 2/6] ARM: mx25: Print silicon revision on boot Jason Liu
2011-08-24 5:04 ` [[PATCH v2 3/6] ARM: mx27: " Jason Liu
2011-08-24 5:04 ` [[PATCH v2 4/6] ARM: mx31: use generic function for displaying silicon revision Jason Liu
2011-08-25 10:22 ` Fabio Estevam
2011-08-26 5:44 ` Jason Hui
2011-08-24 5:04 ` [[PATCH v2 5/6] ARM: mx35: " Jason Liu
2011-08-24 5:04 ` [[PATCH v2 6/6] ARM: mx5: " Jason Liu
2011-08-25 14:51 ` Sascha Hauer [this message]
2011-08-25 15:20 ` Fabio Estevam
2011-08-24 16:33 ` [[PATCH v2 0/6] imx soc revision clean up Sascha Hauer
2011-08-26 5:38 ` Jason Hui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110825145147.GX31404@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).