Commit 2d95378b authored by Fabio Estevam's avatar Fabio Estevam Committed by Sascha Hauer

ARM: mx53: Print silicon revision on boot

Having the silicon revision to appear on the boot log is a useful information.

MX31, MX35 and MX51 already show the silicon revision on boot.

Add support for displaying such information for MX53 as well.

Tested on a mx53loco board, where it shows:

CPU identified as i.MX53, silicon rev 2.0
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
LAKML-Reference: 1301068367-18937-1-git-send-email-fabio.estevam@freescale.com
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
parent 0575b4b8
...@@ -1563,6 +1563,7 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned long osc, ...@@ -1563,6 +1563,7 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned long osc,
clk_enable(&iim_clk); clk_enable(&iim_clk);
mx53_revision(); mx53_revision();
clk_disable(&iim_clk); clk_disable(&iim_clk);
mx53_display_revision();
/* Set SDHC parents to be PLL2 */ /* Set SDHC parents to be PLL2 */
clk_set_parent(&esdhc1_clk, &pll2_sw_clk); clk_set_parent(&esdhc1_clk, &pll2_sw_clk);
......
...@@ -166,6 +166,29 @@ int mx50_revision(void) ...@@ -166,6 +166,29 @@ int mx50_revision(void)
} }
EXPORT_SYMBOL(mx50_revision); EXPORT_SYMBOL(mx50_revision);
void mx53_display_revision(void)
{
int rev;
char *srev;
rev = mx53_revision();
switch (rev) {
case IMX_CHIP_REVISION_1_0:
srev = IMX_CHIP_REVISION_1_0_STRING;
break;
case IMX_CHIP_REVISION_2_0:
srev = IMX_CHIP_REVISION_2_0_STRING;
break;
case IMX_CHIP_REVISION_2_1:
srev = IMX_CHIP_REVISION_2_1_STRING;
break;
default:
srev = IMX_CHIP_REVISION_UNKNOWN_STRING;
}
printk(KERN_INFO "CPU identified as i.MX53, silicon rev %s\n", srev);
}
EXPORT_SYMBOL(mx53_display_revision);
static int __init post_cpu_init(void) static int __init post_cpu_init(void)
{ {
unsigned int reg; unsigned int reg;
......
...@@ -68,4 +68,5 @@ extern void mxc91231_arch_reset(int, const char *); ...@@ -68,4 +68,5 @@ extern void mxc91231_arch_reset(int, const char *);
extern void mxc91231_prepare_idle(void); extern void mxc91231_prepare_idle(void);
extern void mx51_efikamx_reset(void); extern void mx51_efikamx_reset(void);
extern int mx53_revision(void); extern int mx53_revision(void);
extern int mx53_display_revision(void);
#endif #endif
...@@ -337,17 +337,4 @@ ...@@ -337,17 +337,4 @@
#define MX53_INT_GPIO7_LOW 107 #define MX53_INT_GPIO7_LOW 107
#define MX53_INT_GPIO7_HIGH 108 #define MX53_INT_GPIO7_HIGH 108
/* silicon revisions specific to i.MX53 */
#define MX53_CHIP_REV_1_0 0x10
#define MX53_CHIP_REV_1_1 0x11
#define MX53_CHIP_REV_1_2 0x12
#define MX53_CHIP_REV_1_3 0x13
#define MX53_CHIP_REV_2_0 0x20
#define MX53_CHIP_REV_2_1 0x21
#define MX53_CHIP_REV_2_2 0x22
#define MX53_CHIP_REV_2_3 0x23
#define MX53_CHIP_REV_3_0 0x30
#define MX53_CHIP_REV_3_1 0x31
#define MX53_CHIP_REV_3_2 0x32
#endif /* ifndef __MACH_MX53_H__ */ #endif /* ifndef __MACH_MX53_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment