diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2009-02-19 20:31:35 -0500 |
---|---|---|
committer | Nicolas Pitre <nico@cam.org> | 2009-02-19 22:36:42 -0500 |
commit | cfdeb6376e439c58c2d37de492d2a8c763621022 (patch) | |
tree | 19243c67ec6411797028cbe538ea88410516049d /arch/arm/mach-mv78xx0/common.c | |
parent | 12f4815b425b26a610e5dd9a5a5e02872f0f52c5 (diff) |
[ARM] mv78xx0: distinguish between different chip steppings
During boot, identify which chip stepping we're running on (determined
by looking at the first PCIe unit's device ID and revision registers),
and print a message with the details about what we found.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Diffstat (limited to 'arch/arm/mach-mv78xx0/common.c')
-rw-r--r-- | arch/arm/mach-mv78xx0/common.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c index b0e4e0d8f506..538f8f4d4f23 100644 --- a/arch/arm/mach-mv78xx0/common.c +++ b/arch/arm/mach-mv78xx0/common.c | |||
@@ -719,6 +719,32 @@ struct sys_timer mv78xx0_timer = { | |||
719 | /***************************************************************************** | 719 | /***************************************************************************** |
720 | * General | 720 | * General |
721 | ****************************************************************************/ | 721 | ****************************************************************************/ |
722 | static char * __init mv78xx0_id(void) | ||
723 | { | ||
724 | u32 dev, rev; | ||
725 | |||
726 | mv78xx0_pcie_id(&dev, &rev); | ||
727 | |||
728 | if (dev == MV78X00_Z0_DEV_ID) { | ||
729 | if (rev == MV78X00_REV_Z0) | ||
730 | return "MV78X00-Z0"; | ||
731 | else | ||
732 | return "MV78X00-Rev-Unsupported"; | ||
733 | } else if (dev == MV78100_DEV_ID) { | ||
734 | if (rev == MV78100_REV_A0) | ||
735 | return "MV78100-A0"; | ||
736 | else | ||
737 | return "MV78100-Rev-Unsupported"; | ||
738 | } else if (dev == MV78200_DEV_ID) { | ||
739 | if (rev == MV78100_REV_A0) | ||
740 | return "MV78200-A0"; | ||
741 | else | ||
742 | return "MV78200-Rev-Unsupported"; | ||
743 | } else { | ||
744 | return "Device-Unknown"; | ||
745 | } | ||
746 | } | ||
747 | |||
722 | static int __init is_l2_writethrough(void) | 748 | static int __init is_l2_writethrough(void) |
723 | { | 749 | { |
724 | return !!(readl(CPU_CONTROL) & L2_WRITETHROUGH); | 750 | return !!(readl(CPU_CONTROL) & L2_WRITETHROUGH); |
@@ -737,7 +763,8 @@ void __init mv78xx0_init(void) | |||
737 | get_pclk_l2clk(hclk, core_index, &pclk, &l2clk); | 763 | get_pclk_l2clk(hclk, core_index, &pclk, &l2clk); |
738 | tclk = get_tclk(); | 764 | tclk = get_tclk(); |
739 | 765 | ||
740 | printk(KERN_INFO "MV78xx0 core #%d, ", core_index); | 766 | printk(KERN_INFO "%s ", mv78xx0_id()); |
767 | printk("core #%d, ", core_index); | ||
741 | printk("PCLK = %dMHz, ", (pclk + 499999) / 1000000); | 768 | printk("PCLK = %dMHz, ", (pclk + 499999) / 1000000); |
742 | printk("L2 = %dMHz, ", (l2clk + 499999) / 1000000); | 769 | printk("L2 = %dMHz, ", (l2clk + 499999) / 1000000); |
743 | printk("HCLK = %dMHz, ", (hclk + 499999) / 1000000); | 770 | printk("HCLK = %dMHz, ", (hclk + 499999) / 1000000); |