[U-Boot] [PATCH] ARM: mx31: Print the silicon version

Jason Liu liu.h.jason at gmail.com
Fri Mar 11 04:23:14 CET 2011


Hi, Fabio,

2011/3/11 Fabio Estevam <fabio.estevam at freescale.com>:
> Use the same method of the Linux kernel to print the MX31 silicon version on boot.
>
> Tested on a MX31PDK with a 2.0 silicon, where it shows:
>
> CPU:   Freescale i.MX31 at 531 MHz
> MX31 silicon rev 2.0
>
> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
> ---
>  arch/arm/cpu/arm1136/mx31/generic.c        |   18 ++++++++++++
>  arch/arm/include/asm/arch-mx31/mx31-regs.h |    4 ++
>  arch/arm/include/asm/imx_soc_revision.h    |   42 ++++++++++++++++++++++++++++
>  3 files changed, 64 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/include/asm/imx_soc_revision.h
>
> diff --git a/arch/arm/cpu/arm1136/mx31/generic.c b/arch/arm/cpu/arm1136/mx31/generic.c
> index 8bd23ee..4791449 100644
> --- a/arch/arm/cpu/arm1136/mx31/generic.c
> +++ b/arch/arm/cpu/arm1136/mx31/generic.c
> @@ -24,6 +24,7 @@
>  #include <common.h>
>  #include <asm/arch/mx31-regs.h>
>  #include <asm/io.h>
> +#include <asm/imx_soc_revision.h>
>
>  static u32 mx31_decode_pll(u32 reg, u32 infreq)
>  {
> @@ -106,11 +107,28 @@ void mx31_set_pad(enum iomux_pins pin, u32 config)
>
>  }
>
> +void mx31_read_cpu_rev(void)
> +{
> +       u32 i, srev;
> +
> +       /* read SREV register from IIM module */
> +       srev = __raw_readl(MX31_IIM_BASE_ADDR + MXC_IIMSREV);

Need use struct way to access srev.

[code snip]
> 1.6.0.4
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>


More information about the U-Boot mailing list