* [PATCH v1 2/2] ARM: vf610: Add SoC bus support for Vybrid
@ 2015-05-18 6:20 ` Sanchayan Maity
0 siblings, 0 replies; 15+ messages in thread
From: Sanchayan Maity @ 2015-05-18 6:20 UTC (permalink / raw)
To: shawn.guo
Cc: kernel, stefan, linux-arm-kernel, devicetree, linux-kernel,
Sanchayan Maity
Implements SoC bus support to export SoC specific information. Read
the unique SoC ID from the Vybrid On Chip One Time Programmable
(OCOTP) controller, SoC specific information from the Miscellaneous
System Control Module (MSCM), revision from the ROM revision register
and expose it via the SoC bus infrastructure.
Sample Output:
root@vf:/sys/devices/soc0# cat soc_id
df63c12a2e2161d4
root@vf:/sys/devices/soc0# cat family
Freescale Vybrid VF500
root@vf:/sys/devices/soc0# cat revision
00000013
root@vf:/sys/devices/soc0# cat machine
Freescale Vybrid
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
---
arch/arm/mach-imx/mach-vf610.c | 81 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)
diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c
index 2e7c75b..64c78e4 100644
--- a/arch/arm/mach-imx/mach-vf610.c
+++ b/arch/arm/mach-imx/mach-vf610.c
@@ -11,6 +11,86 @@
#include <linux/irqchip.h>
#include <asm/mach/arch.h>
#include <asm/hardware/cache-l2x0.h>
+#include <linux/slab.h>
+#include <linux/sys_soc.h>
+#include <linux/mfd/syscon.h>
+#include <linux/regmap.h>
+#include <linux/random.h>
+
+#define OCOTP_CFG0_OFFSET 0x00000410
+#define OCOTP_CFG1_OFFSET 0x00000420
+#define MSCM_CPxCOUNT_OFFSET 0x0000002C
+#define MSCM_CPxCFG1_OFFSET 0x00000014
+#define ROM_REVISION_OFFSET 0x00000080
+
+static void __init vf610_init_machine(void)
+{
+ struct regmap *ocotp_regmap, *mscm_regmap, *rom_regmap;
+ struct soc_device_attribute *soc_dev_attr;
+ struct device *parent = NULL;
+ struct soc_device *soc_dev;
+ char soc_type[] = "xx0";
+ u32 cpxcount, cpxcfg1;
+ u32 soc_id1, soc_id2, rom_rev;
+ u64 soc_id;
+
+ ocotp_regmap = syscon_regmap_lookup_by_compatible("fsl,vf610-ocotp");
+ if (IS_ERR(ocotp_regmap)) {
+ pr_err("regmap lookup for octop failed\n");
+ goto out;
+ }
+
+ mscm_regmap = syscon_regmap_lookup_by_compatible("fsl,vf610-mscm-cpucfg");
+ if (IS_ERR(mscm_regmap)) {
+ pr_err("regmap lookup for mscm failed");
+ goto out;
+ }
+
+ rom_regmap = syscon_regmap_lookup_by_compatible("fsl,vf610-ocrom");
+ if (IS_ERR(rom_regmap)) {
+ pr_err("regmap lookup for ocrom failed");
+ goto out;
+ }
+
+ regmap_read(ocotp_regmap, OCOTP_CFG0_OFFSET, &soc_id1);
+ regmap_read(ocotp_regmap, OCOTP_CFG1_OFFSET, &soc_id2);
+
+ soc_id = (u64) soc_id1 << 32 | soc_id2;
+ add_device_randomness(&soc_id, sizeof(soc_id));
+
+ regmap_read(mscm_regmap, MSCM_CPxCOUNT_OFFSET, &cpxcount);
+ regmap_read(mscm_regmap, MSCM_CPxCFG1_OFFSET, &cpxcfg1);
+
+ soc_type[0] = cpxcount ? '6' : '5'; /* Dual Core => VF6x0 */
+ soc_type[1] = cpxcfg1 ? '1' : '0'; /* L2 Cache => VFx10 */
+
+ regmap_read(rom_regmap, ROM_REVISION_OFFSET, &rom_rev);
+
+ soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
+ if (!soc_dev_attr)
+ goto out;
+
+ soc_dev_attr->machine = kasprintf(GFP_KERNEL, "Freescale Vybrid");
+ soc_dev_attr->soc_id = kasprintf(GFP_KERNEL, "%016llx", soc_id);
+ soc_dev_attr->family = kasprintf(GFP_KERNEL, "Freescale Vybrid VF%s",
+ soc_type);
+ soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%08x", rom_rev);
+
+ soc_dev = soc_device_register(soc_dev_attr);
+ if (IS_ERR(soc_dev)) {
+ kfree(soc_dev_attr->revision);
+ kfree(soc_dev_attr->family);
+ kfree(soc_dev_attr->soc_id);
+ kfree(soc_dev_attr->machine);
+ kfree(soc_dev_attr);
+ goto out;
+ }
+
+ parent = soc_device_to_device(soc_dev);
+
+out:
+ of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
+}
static const char * const vf610_dt_compat[] __initconst = {
"fsl,vf500",
@@ -23,5 +103,6 @@ static const char * const vf610_dt_compat[] __initconst = {
DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF5xx/VF6xx (Device Tree)")
.l2c_aux_val = 0,
.l2c_aux_mask = ~0,
+ .init_machine = vf610_init_machine,
.dt_compat = vf610_dt_compat,
MACHINE_END
--
2.4.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v1 2/2] ARM: vf610: Add SoC bus support for Vybrid
@ 2015-05-18 6:20 ` Sanchayan Maity
0 siblings, 0 replies; 15+ messages in thread
From: Sanchayan Maity @ 2015-05-18 6:20 UTC (permalink / raw)
To: shawn.guo-QSEj5FYQhm4dnm+yROfE0A
Cc: kernel-bIcnvbaLZ9MEGnE8C9+IrQ, stefan-XLVq0VzYD2Y,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Sanchayan Maity
Implements SoC bus support to export SoC specific information. Read
the unique SoC ID from the Vybrid On Chip One Time Programmable
(OCOTP) controller, SoC specific information from the Miscellaneous
System Control Module (MSCM), revision from the ROM revision register
and expose it via the SoC bus infrastructure.
Sample Output:
root@vf:/sys/devices/soc0# cat soc_id
df63c12a2e2161d4
root@vf:/sys/devices/soc0# cat family
Freescale Vybrid VF500
root@vf:/sys/devices/soc0# cat revision
00000013
root@vf:/sys/devices/soc0# cat machine
Freescale Vybrid
Signed-off-by: Sanchayan Maity <maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
arch/arm/mach-imx/mach-vf610.c | 81 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)
diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c
index 2e7c75b..64c78e4 100644
--- a/arch/arm/mach-imx/mach-vf610.c
+++ b/arch/arm/mach-imx/mach-vf610.c
@@ -11,6 +11,86 @@
#include <linux/irqchip.h>
#include <asm/mach/arch.h>
#include <asm/hardware/cache-l2x0.h>
+#include <linux/slab.h>
+#include <linux/sys_soc.h>
+#include <linux/mfd/syscon.h>
+#include <linux/regmap.h>
+#include <linux/random.h>
+
+#define OCOTP_CFG0_OFFSET 0x00000410
+#define OCOTP_CFG1_OFFSET 0x00000420
+#define MSCM_CPxCOUNT_OFFSET 0x0000002C
+#define MSCM_CPxCFG1_OFFSET 0x00000014
+#define ROM_REVISION_OFFSET 0x00000080
+
+static void __init vf610_init_machine(void)
+{
+ struct regmap *ocotp_regmap, *mscm_regmap, *rom_regmap;
+ struct soc_device_attribute *soc_dev_attr;
+ struct device *parent = NULL;
+ struct soc_device *soc_dev;
+ char soc_type[] = "xx0";
+ u32 cpxcount, cpxcfg1;
+ u32 soc_id1, soc_id2, rom_rev;
+ u64 soc_id;
+
+ ocotp_regmap = syscon_regmap_lookup_by_compatible("fsl,vf610-ocotp");
+ if (IS_ERR(ocotp_regmap)) {
+ pr_err("regmap lookup for octop failed\n");
+ goto out;
+ }
+
+ mscm_regmap = syscon_regmap_lookup_by_compatible("fsl,vf610-mscm-cpucfg");
+ if (IS_ERR(mscm_regmap)) {
+ pr_err("regmap lookup for mscm failed");
+ goto out;
+ }
+
+ rom_regmap = syscon_regmap_lookup_by_compatible("fsl,vf610-ocrom");
+ if (IS_ERR(rom_regmap)) {
+ pr_err("regmap lookup for ocrom failed");
+ goto out;
+ }
+
+ regmap_read(ocotp_regmap, OCOTP_CFG0_OFFSET, &soc_id1);
+ regmap_read(ocotp_regmap, OCOTP_CFG1_OFFSET, &soc_id2);
+
+ soc_id = (u64) soc_id1 << 32 | soc_id2;
+ add_device_randomness(&soc_id, sizeof(soc_id));
+
+ regmap_read(mscm_regmap, MSCM_CPxCOUNT_OFFSET, &cpxcount);
+ regmap_read(mscm_regmap, MSCM_CPxCFG1_OFFSET, &cpxcfg1);
+
+ soc_type[0] = cpxcount ? '6' : '5'; /* Dual Core => VF6x0 */
+ soc_type[1] = cpxcfg1 ? '1' : '0'; /* L2 Cache => VFx10 */
+
+ regmap_read(rom_regmap, ROM_REVISION_OFFSET, &rom_rev);
+
+ soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
+ if (!soc_dev_attr)
+ goto out;
+
+ soc_dev_attr->machine = kasprintf(GFP_KERNEL, "Freescale Vybrid");
+ soc_dev_attr->soc_id = kasprintf(GFP_KERNEL, "%016llx", soc_id);
+ soc_dev_attr->family = kasprintf(GFP_KERNEL, "Freescale Vybrid VF%s",
+ soc_type);
+ soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%08x", rom_rev);
+
+ soc_dev = soc_device_register(soc_dev_attr);
+ if (IS_ERR(soc_dev)) {
+ kfree(soc_dev_attr->revision);
+ kfree(soc_dev_attr->family);
+ kfree(soc_dev_attr->soc_id);
+ kfree(soc_dev_attr->machine);
+ kfree(soc_dev_attr);
+ goto out;
+ }
+
+ parent = soc_device_to_device(soc_dev);
+
+out:
+ of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
+}
static const char * const vf610_dt_compat[] __initconst = {
"fsl,vf500",
@@ -23,5 +103,6 @@ static const char * const vf610_dt_compat[] __initconst = {
DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF5xx/VF6xx (Device Tree)")
.l2c_aux_val = 0,
.l2c_aux_mask = ~0,
+ .init_machine = vf610_init_machine,
.dt_compat = vf610_dt_compat,
MACHINE_END
--
2.4.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v1 2/2] ARM: vf610: Add SoC bus support for Vybrid
2015-05-18 6:20 ` Sanchayan Maity
@ 2015-05-19 6:24 ` Shawn Guo
-1 siblings, 0 replies; 15+ messages in thread
From: Shawn Guo @ 2015-05-19 6:24 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, May 18, 2015 at 11:50:07AM +0530, Sanchayan Maity wrote:
> Implements SoC bus support to export SoC specific information. Read
> the unique SoC ID from the Vybrid On Chip One Time Programmable
> (OCOTP) controller, SoC specific information from the Miscellaneous
> System Control Module (MSCM), revision from the ROM revision register
> and expose it via the SoC bus infrastructure.
>
> Sample Output:
>
> root at vf:/sys/devices/soc0# cat soc_id
> df63c12a2e2161d4
> root at vf:/sys/devices/soc0# cat family
> Freescale Vybrid VF500
> root at vf:/sys/devices/soc0# cat revision
> 00000013
> root at vf:/sys/devices/soc0# cat machine
> Freescale Vybrid
>
> Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
> ---
> arch/arm/mach-imx/mach-vf610.c | 81 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 81 insertions(+)
>
> diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c
> index 2e7c75b..64c78e4 100644
> --- a/arch/arm/mach-imx/mach-vf610.c
> +++ b/arch/arm/mach-imx/mach-vf610.c
> @@ -11,6 +11,86 @@
> #include <linux/irqchip.h>
> #include <asm/mach/arch.h>
> #include <asm/hardware/cache-l2x0.h>
> +#include <linux/slab.h>
> +#include <linux/sys_soc.h>
> +#include <linux/mfd/syscon.h>
> +#include <linux/regmap.h>
> +#include <linux/random.h>
Please group <linux/*> headers together and sort alphabetically.
Shawn
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v1 2/2] ARM: vf610: Add SoC bus support for Vybrid
@ 2015-05-19 6:24 ` Shawn Guo
0 siblings, 0 replies; 15+ messages in thread
From: Shawn Guo @ 2015-05-19 6:24 UTC (permalink / raw)
To: Sanchayan Maity
Cc: shawn.guo, kernel, stefan, linux-arm-kernel, devicetree,
linux-kernel
On Mon, May 18, 2015 at 11:50:07AM +0530, Sanchayan Maity wrote:
> Implements SoC bus support to export SoC specific information. Read
> the unique SoC ID from the Vybrid On Chip One Time Programmable
> (OCOTP) controller, SoC specific information from the Miscellaneous
> System Control Module (MSCM), revision from the ROM revision register
> and expose it via the SoC bus infrastructure.
>
> Sample Output:
>
> root@vf:/sys/devices/soc0# cat soc_id
> df63c12a2e2161d4
> root@vf:/sys/devices/soc0# cat family
> Freescale Vybrid VF500
> root@vf:/sys/devices/soc0# cat revision
> 00000013
> root@vf:/sys/devices/soc0# cat machine
> Freescale Vybrid
>
> Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
> ---
> arch/arm/mach-imx/mach-vf610.c | 81 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 81 insertions(+)
>
> diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c
> index 2e7c75b..64c78e4 100644
> --- a/arch/arm/mach-imx/mach-vf610.c
> +++ b/arch/arm/mach-imx/mach-vf610.c
> @@ -11,6 +11,86 @@
> #include <linux/irqchip.h>
> #include <asm/mach/arch.h>
> #include <asm/hardware/cache-l2x0.h>
> +#include <linux/slab.h>
> +#include <linux/sys_soc.h>
> +#include <linux/mfd/syscon.h>
> +#include <linux/regmap.h>
> +#include <linux/random.h>
Please group <linux/*> headers together and sort alphabetically.
Shawn
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v1 2/2] ARM: vf610: Add SoC bus support for Vybrid
2015-05-19 6:24 ` Shawn Guo
@ 2015-05-19 9:42 ` maitysanchayan
-1 siblings, 0 replies; 15+ messages in thread
From: maitysanchayan at gmail.com @ 2015-05-19 9:42 UTC (permalink / raw)
To: linux-arm-kernel
Hello Shawn,
On 15-05-19 14:24:13, Shawn Guo wrote:
> On Mon, May 18, 2015 at 11:50:07AM +0530, Sanchayan Maity wrote:
> > Implements SoC bus support to export SoC specific information. Read
> > the unique SoC ID from the Vybrid On Chip One Time Programmable
> > (OCOTP) controller, SoC specific information from the Miscellaneous
> > System Control Module (MSCM), revision from the ROM revision register
> > and expose it via the SoC bus infrastructure.
> >
> > Sample Output:
> >
> > root at vf:/sys/devices/soc0# cat soc_id
> > df63c12a2e2161d4
> > root at vf:/sys/devices/soc0# cat family
> > Freescale Vybrid VF500
> > root at vf:/sys/devices/soc0# cat revision
> > 00000013
> > root at vf:/sys/devices/soc0# cat machine
> > Freescale Vybrid
> >
> > Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
> > ---
> > arch/arm/mach-imx/mach-vf610.c | 81 ++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 81 insertions(+)
> >
> > diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c
> > index 2e7c75b..64c78e4 100644
> > --- a/arch/arm/mach-imx/mach-vf610.c
> > +++ b/arch/arm/mach-imx/mach-vf610.c
> > @@ -11,6 +11,86 @@
> > #include <linux/irqchip.h>
> > #include <asm/mach/arch.h>
> > #include <asm/hardware/cache-l2x0.h>
> > +#include <linux/slab.h>
> > +#include <linux/sys_soc.h>
> > +#include <linux/mfd/syscon.h>
> > +#include <linux/regmap.h>
> > +#include <linux/random.h>
>
> Please group <linux/*> headers together and sort alphabetically.
Ok. Will fix this and send out a v2. The rest is acceptable?
>
> Shawn
Thanks & Regards,
Sanchayan Maity.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v1 2/2] ARM: vf610: Add SoC bus support for Vybrid
@ 2015-05-19 9:42 ` maitysanchayan
0 siblings, 0 replies; 15+ messages in thread
From: maitysanchayan @ 2015-05-19 9:42 UTC (permalink / raw)
To: Shawn Guo
Cc: shawn.guo, kernel, stefan, linux-arm-kernel, devicetree,
linux-kernel
Hello Shawn,
On 15-05-19 14:24:13, Shawn Guo wrote:
> On Mon, May 18, 2015 at 11:50:07AM +0530, Sanchayan Maity wrote:
> > Implements SoC bus support to export SoC specific information. Read
> > the unique SoC ID from the Vybrid On Chip One Time Programmable
> > (OCOTP) controller, SoC specific information from the Miscellaneous
> > System Control Module (MSCM), revision from the ROM revision register
> > and expose it via the SoC bus infrastructure.
> >
> > Sample Output:
> >
> > root@vf:/sys/devices/soc0# cat soc_id
> > df63c12a2e2161d4
> > root@vf:/sys/devices/soc0# cat family
> > Freescale Vybrid VF500
> > root@vf:/sys/devices/soc0# cat revision
> > 00000013
> > root@vf:/sys/devices/soc0# cat machine
> > Freescale Vybrid
> >
> > Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
> > ---
> > arch/arm/mach-imx/mach-vf610.c | 81 ++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 81 insertions(+)
> >
> > diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c
> > index 2e7c75b..64c78e4 100644
> > --- a/arch/arm/mach-imx/mach-vf610.c
> > +++ b/arch/arm/mach-imx/mach-vf610.c
> > @@ -11,6 +11,86 @@
> > #include <linux/irqchip.h>
> > #include <asm/mach/arch.h>
> > #include <asm/hardware/cache-l2x0.h>
> > +#include <linux/slab.h>
> > +#include <linux/sys_soc.h>
> > +#include <linux/mfd/syscon.h>
> > +#include <linux/regmap.h>
> > +#include <linux/random.h>
>
> Please group <linux/*> headers together and sort alphabetically.
Ok. Will fix this and send out a v2. The rest is acceptable?
>
> Shawn
Thanks & Regards,
Sanchayan Maity.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v1 2/2] ARM: vf610: Add SoC bus support for Vybrid
2015-05-19 9:42 ` maitysanchayan
@ 2015-05-20 1:01 ` Shawn Guo
-1 siblings, 0 replies; 15+ messages in thread
From: Shawn Guo @ 2015-05-20 1:01 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, May 19, 2015 at 03:12:23PM +0530, maitysanchayan at gmail.com wrote:
> Hello Shawn,
>
> On 15-05-19 14:24:13, Shawn Guo wrote:
> > On Mon, May 18, 2015 at 11:50:07AM +0530, Sanchayan Maity wrote:
> > > Implements SoC bus support to export SoC specific information. Read
> > > the unique SoC ID from the Vybrid On Chip One Time Programmable
> > > (OCOTP) controller, SoC specific information from the Miscellaneous
> > > System Control Module (MSCM), revision from the ROM revision register
> > > and expose it via the SoC bus infrastructure.
> > >
> > > Sample Output:
> > >
> > > root at vf:/sys/devices/soc0# cat soc_id
> > > df63c12a2e2161d4
> > > root at vf:/sys/devices/soc0# cat family
> > > Freescale Vybrid VF500
> > > root at vf:/sys/devices/soc0# cat revision
> > > 00000013
> > > root at vf:/sys/devices/soc0# cat machine
> > > Freescale Vybrid
> > >
> > > Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
> > > ---
> > > arch/arm/mach-imx/mach-vf610.c | 81 ++++++++++++++++++++++++++++++++++++++++++
> > > 1 file changed, 81 insertions(+)
> > >
> > > diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c
> > > index 2e7c75b..64c78e4 100644
> > > --- a/arch/arm/mach-imx/mach-vf610.c
> > > +++ b/arch/arm/mach-imx/mach-vf610.c
> > > @@ -11,6 +11,86 @@
> > > #include <linux/irqchip.h>
> > > #include <asm/mach/arch.h>
> > > #include <asm/hardware/cache-l2x0.h>
> > > +#include <linux/slab.h>
> > > +#include <linux/sys_soc.h>
> > > +#include <linux/mfd/syscon.h>
> > > +#include <linux/regmap.h>
> > > +#include <linux/random.h>
> >
> > Please group <linux/*> headers together and sort alphabetically.
>
> Ok. Will fix this and send out a v2. The rest is acceptable?
I'm fine with the rest, but would need an ACK from Stefan to apply the
patch.
Shawn
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v1 2/2] ARM: vf610: Add SoC bus support for Vybrid
@ 2015-05-20 1:01 ` Shawn Guo
0 siblings, 0 replies; 15+ messages in thread
From: Shawn Guo @ 2015-05-20 1:01 UTC (permalink / raw)
To: maitysanchayan
Cc: shawn.guo, kernel, stefan, linux-arm-kernel, devicetree,
linux-kernel
On Tue, May 19, 2015 at 03:12:23PM +0530, maitysanchayan@gmail.com wrote:
> Hello Shawn,
>
> On 15-05-19 14:24:13, Shawn Guo wrote:
> > On Mon, May 18, 2015 at 11:50:07AM +0530, Sanchayan Maity wrote:
> > > Implements SoC bus support to export SoC specific information. Read
> > > the unique SoC ID from the Vybrid On Chip One Time Programmable
> > > (OCOTP) controller, SoC specific information from the Miscellaneous
> > > System Control Module (MSCM), revision from the ROM revision register
> > > and expose it via the SoC bus infrastructure.
> > >
> > > Sample Output:
> > >
> > > root@vf:/sys/devices/soc0# cat soc_id
> > > df63c12a2e2161d4
> > > root@vf:/sys/devices/soc0# cat family
> > > Freescale Vybrid VF500
> > > root@vf:/sys/devices/soc0# cat revision
> > > 00000013
> > > root@vf:/sys/devices/soc0# cat machine
> > > Freescale Vybrid
> > >
> > > Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
> > > ---
> > > arch/arm/mach-imx/mach-vf610.c | 81 ++++++++++++++++++++++++++++++++++++++++++
> > > 1 file changed, 81 insertions(+)
> > >
> > > diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c
> > > index 2e7c75b..64c78e4 100644
> > > --- a/arch/arm/mach-imx/mach-vf610.c
> > > +++ b/arch/arm/mach-imx/mach-vf610.c
> > > @@ -11,6 +11,86 @@
> > > #include <linux/irqchip.h>
> > > #include <asm/mach/arch.h>
> > > #include <asm/hardware/cache-l2x0.h>
> > > +#include <linux/slab.h>
> > > +#include <linux/sys_soc.h>
> > > +#include <linux/mfd/syscon.h>
> > > +#include <linux/regmap.h>
> > > +#include <linux/random.h>
> >
> > Please group <linux/*> headers together and sort alphabetically.
>
> Ok. Will fix this and send out a v2. The rest is acceptable?
I'm fine with the rest, but would need an ACK from Stefan to apply the
patch.
Shawn
^ permalink raw reply [flat|nested] 15+ messages in thread