* [PATCH v2 1/2] ARM: imx: Introduce generic function for displaying silicon revision
@ 2011-08-22 18:17 Fabio Estevam
2011-08-22 18:17 ` [PATCH v2 2/2] ARM: mx27: Print silicon revision on boot Fabio Estevam
2011-08-23 6:31 ` [PATCH v2 1/2] ARM: imx: Introduce generic function for displaying silicon revision Sascha Hauer
0 siblings, 2 replies; 4+ messages in thread
From: Fabio Estevam @ 2011-08-22 18:17 UTC (permalink / raw)
To: linux-arm-kernel
Currently each i.MX processor has its own function for displaying the silicon
revision.
Introduce a generic function for this purpose, so that all i.MX processors can
reuse it.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- Introduce this generic function as suggested by Sascha Hauer.
Sascha,
If these 2 patches are merged, then I will convert the other i.MX processors
to use this new method.
arch/arm/plat-mxc/cpu.c | 10 ++++++++++
arch/arm/plat-mxc/include/mach/common.h | 1 +
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-mxc/cpu.c b/arch/arm/plat-mxc/cpu.c
index 386e0d5..f081ef0 100644
--- a/arch/arm/plat-mxc/cpu.c
+++ b/arch/arm/plat-mxc/cpu.c
@@ -1,5 +1,6 @@
#include <linux/module.h>
+#include <mach/hardware.h>
unsigned int __mxc_cpu_type;
EXPORT_SYMBOL(__mxc_cpu_type);
@@ -9,3 +10,12 @@ void mxc_set_cpu_type(unsigned int type)
__mxc_cpu_type = type;
}
+void imx_print_silicon_rev(const char *cpu, int srev)
+{
+ if (srev == IMX_CHIP_REVISION_UNKNOWN)
+ pr_info("CPU identified as %s, unknown revision\n", cpu);
+ else
+ pr_info("CPU identified as %s, silicon rev %d.%d\n",
+ cpu, (srev >> 4) & 0xf, srev & 0xf);
+}
+EXPORT_SYMBOL(imx_print_silicon_rev);
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
index 91fa263..e427f63 100644
--- a/arch/arm/plat-mxc/include/mach/common.h
+++ b/arch/arm/plat-mxc/include/mach/common.h
@@ -72,4 +72,5 @@ extern void mxc_arch_reset_init(void __iomem *);
extern void mx51_efikamx_reset(void);
extern int mx53_revision(void);
extern int mx53_display_revision(void);
+extern void imx_print_silicon_rev(const char *cpu, int srev);
#endif
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] ARM: mx27: Print silicon revision on boot
2011-08-22 18:17 [PATCH v2 1/2] ARM: imx: Introduce generic function for displaying silicon revision Fabio Estevam
@ 2011-08-22 18:17 ` Fabio Estevam
2011-08-23 6:31 ` [PATCH v2 1/2] ARM: imx: Introduce generic function for displaying silicon revision Sascha Hauer
1 sibling, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2011-08-22 18:17 UTC (permalink / raw)
To: linux-arm-kernel
Silicon revision is useful information to have during kernel boot.
Print the MX27 silicon revision.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- Use generic imx function to print silicon revision.
arch/arm/mach-imx/clock-imx27.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-imx/clock-imx27.c b/arch/arm/mach-imx/clock-imx27.c
index 583f251..a1ca276 100644
--- a/arch/arm/mach-imx/clock-imx27.c
+++ b/arch/arm/mach-imx/clock-imx27.c
@@ -754,6 +754,7 @@ int __init mx27_clocks_init(unsigned long fref)
#if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC)
clk_enable(&uart1_clk);
#endif
+ imx_print_silicon_rev("MX27", mx27_revision());
mxc_timer_init(&gpt1_clk, MX27_IO_ADDRESS(MX27_GPT1_BASE_ADDR),
MX27_INT_GPT1);
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] ARM: imx: Introduce generic function for displaying silicon revision
2011-08-22 18:17 [PATCH v2 1/2] ARM: imx: Introduce generic function for displaying silicon revision Fabio Estevam
2011-08-22 18:17 ` [PATCH v2 2/2] ARM: mx27: Print silicon revision on boot Fabio Estevam
@ 2011-08-23 6:31 ` Sascha Hauer
2011-08-23 11:03 ` Jason Liu
1 sibling, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2011-08-23 6:31 UTC (permalink / raw)
To: linux-arm-kernel
Hi Fabio,
On Mon, Aug 22, 2011 at 03:17:03PM -0300, Fabio Estevam wrote:
> Currently each i.MX processor has its own function for displaying the silicon
> revision.
>
> Introduce a generic function for this purpose, so that all i.MX processors can
> reuse it.
Looks good, thanks. Do you care to update the other SoCs aswell?
Sascha
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> Changes since v1:
>
> - Introduce this generic function as suggested by Sascha Hauer.
>
> Sascha,
>
> If these 2 patches are merged, then I will convert the other i.MX processors
> to use this new method.
>
> arch/arm/plat-mxc/cpu.c | 10 ++++++++++
> arch/arm/plat-mxc/include/mach/common.h | 1 +
> 2 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-mxc/cpu.c b/arch/arm/plat-mxc/cpu.c
> index 386e0d5..f081ef0 100644
> --- a/arch/arm/plat-mxc/cpu.c
> +++ b/arch/arm/plat-mxc/cpu.c
> @@ -1,5 +1,6 @@
>
> #include <linux/module.h>
> +#include <mach/hardware.h>
>
> unsigned int __mxc_cpu_type;
> EXPORT_SYMBOL(__mxc_cpu_type);
> @@ -9,3 +10,12 @@ void mxc_set_cpu_type(unsigned int type)
> __mxc_cpu_type = type;
> }
>
> +void imx_print_silicon_rev(const char *cpu, int srev)
> +{
> + if (srev == IMX_CHIP_REVISION_UNKNOWN)
> + pr_info("CPU identified as %s, unknown revision\n", cpu);
> + else
> + pr_info("CPU identified as %s, silicon rev %d.%d\n",
> + cpu, (srev >> 4) & 0xf, srev & 0xf);
> +}
> +EXPORT_SYMBOL(imx_print_silicon_rev);
> diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
> index 91fa263..e427f63 100644
> --- a/arch/arm/plat-mxc/include/mach/common.h
> +++ b/arch/arm/plat-mxc/include/mach/common.h
> @@ -72,4 +72,5 @@ extern void mxc_arch_reset_init(void __iomem *);
> extern void mx51_efikamx_reset(void);
> extern int mx53_revision(void);
> extern int mx53_display_revision(void);
> +extern void imx_print_silicon_rev(const char *cpu, int srev);
> #endif
> --
> 1.7.1
>
>
>
--
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 |
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] ARM: imx: Introduce generic function for displaying silicon revision
2011-08-23 6:31 ` [PATCH v2 1/2] ARM: imx: Introduce generic function for displaying silicon revision Sascha Hauer
@ 2011-08-23 11:03 ` Jason Liu
0 siblings, 0 replies; 4+ messages in thread
From: Jason Liu @ 2011-08-23 11:03 UTC (permalink / raw)
To: linux-arm-kernel
Hi, Sascha, Fabio,
2011/8/23 Sascha Hauer <s.hauer@pengutronix.de>:
> Hi Fabio,
>
> On Mon, Aug 22, 2011 at 03:17:03PM -0300, Fabio Estevam wrote:
>> Currently each i.MX processor has its own function for displaying the silicon
>> revision.
>>
>> Introduce a generic function for this purpose, so that all i.MX processors can
>> reuse it.
>
> Looks good, thanks. Do you care to update the other SoCs aswell?
I have already started to updated all other SoCs, I will send out patch soon.
Jason
>
> Sascha
>
>>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>> ---
>> Changes since v1:
>>
>> - Introduce this generic function as suggested by Sascha Hauer.
>>
>> Sascha,
>>
>> If these 2 patches are merged, then I will convert the other i.MX processors
>> to use this new method.
>>
>> ?arch/arm/plat-mxc/cpu.c ? ? ? ? ? ? ? ? | ? 10 ++++++++++
>> ?arch/arm/plat-mxc/include/mach/common.h | ? ?1 +
>> ?2 files changed, 11 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/plat-mxc/cpu.c b/arch/arm/plat-mxc/cpu.c
>> index 386e0d5..f081ef0 100644
>> --- a/arch/arm/plat-mxc/cpu.c
>> +++ b/arch/arm/plat-mxc/cpu.c
>> @@ -1,5 +1,6 @@
>>
>> ?#include <linux/module.h>
>> +#include <mach/hardware.h>
>>
>> ?unsigned int __mxc_cpu_type;
>> ?EXPORT_SYMBOL(__mxc_cpu_type);
>> @@ -9,3 +10,12 @@ void mxc_set_cpu_type(unsigned int type)
>> ? ? ? __mxc_cpu_type = type;
>> ?}
>>
>> +void imx_print_silicon_rev(const char *cpu, int srev)
>> +{
>> + ? ? if (srev == IMX_CHIP_REVISION_UNKNOWN)
>> + ? ? ? ? ? ? pr_info("CPU identified as %s, unknown revision\n", cpu);
>> + ? ? else
>> + ? ? ? ? ? ? pr_info("CPU identified as %s, silicon rev %d.%d\n",
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? cpu, (srev >> 4) & 0xf, srev & 0xf);
>> +}
>> +EXPORT_SYMBOL(imx_print_silicon_rev);
>> diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
>> index 91fa263..e427f63 100644
>> --- a/arch/arm/plat-mxc/include/mach/common.h
>> +++ b/arch/arm/plat-mxc/include/mach/common.h
>> @@ -72,4 +72,5 @@ extern void mxc_arch_reset_init(void __iomem *);
>> ?extern void mx51_efikamx_reset(void);
>> ?extern int mx53_revision(void);
>> ?extern int mx53_display_revision(void);
>> +extern void imx_print_silicon_rev(const char *cpu, int srev);
>> ?#endif
>> --
>> 1.7.1
>>
>>
>>
>
> --
> 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 |
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-08-23 11:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-22 18:17 [PATCH v2 1/2] ARM: imx: Introduce generic function for displaying silicon revision Fabio Estevam
2011-08-22 18:17 ` [PATCH v2 2/2] ARM: mx27: Print silicon revision on boot Fabio Estevam
2011-08-23 6:31 ` [PATCH v2 1/2] ARM: imx: Introduce generic function for displaying silicon revision Sascha Hauer
2011-08-23 11:03 ` Jason Liu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.