ARM: OMAP3+: am33xx id: Add new am33xx specific function to check dev_feature
Subsystems (3)
PATCH 1/1 ARM: OMAP3+: am33xx id: Add new am33xx specific function to check dev_feature
Layout of DEV_FEATURE register (offset = 0x604) is different between TI81xx and AM33xx device, so create separate function which will check for features available on specific AM33xx SoC and set the flags accordingly.
--- arch/arm/mach-omap2/control.h | 5 +++++ arch/arm/mach-omap2/id.c | 13 +++++++++++++ arch/arm/mach-omap2/io.c | 2 +- arch/arm/mach-omap2/soc.h | 1 + 4 files changed, 20 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/control.h +5 -0
@@ -358,6 +358,11 @@#define AM33XX_CONTROL_STATUS_SYSBOOT1_WIDTH 0x2#define AM33XX_CONTROL_STATUS_SYSBOOT1_MASK (0x3 << 22) +/* DEV Feature register to identify AM33XX features */ +#define AM33XX_DEV_FEATURE 0x604 +#define AM33XX_SGX_SHIFT 29 +#define AM33XX_SGX_MASK (1 << AM33XX_SGX_SHIFT) +/* CONTROL OMAP STATUS register to identify OMAP3 features */ #define OMAP3_CONTROL_OMAP_STATUS 0x044c
arch/arm/mach-omap2/id.c +13 -0
@@ -302,6 +302,19 @@ void __init ti81xx_check_features(void)omap3_cpuinfo (); } +void __init am33xx_check_features (void ) +{ +u32 status; + + omap_features =OMAP3_HAS_NEON ; + + status =omap_ctrl_readl (AM33XX_DEV_FEATURE ); +if (status &AM33XX_SGX_MASK ) + omap_features |=OMAP3_HAS_SGX ; + +omap3_cpuinfo (); +} +void __init omap3xxx_check_revision (void ) {const char *cpu_rev;
arch/arm/mach-omap2/io.c +1 -1
@@ -576,7 +576,7 @@ void __init am33xx_init_early(void)omap2_set_globals_prm (AM33XX_L4_WK_IO_ADDRESS (AM33XX_PRCM_BASE ));omap2_set_globals_cm (AM33XX_L4_WK_IO_ADDRESS (AM33XX_PRCM_BASE ),NULL );omap3xxx_check_revision (); -ti81xx_check_features (); +am33xx_check_features ();am33xx_voltagedomains_init ();am33xx_powerdomains_init ();am33xx_clockdomains_init ();
arch/arm/mach-omap2/soc.h +1 -0
@@ -424,6 +424,7 @@ void omap4xxx_check_revision(void);void omap5xxx_check_revision (void );void omap3xxx_check_features (void );void ti81xx_check_features (void ); +void am33xx_check_features (void );void omap4xxx_check_features (void );/*
Signature · 1 line
1.7.0.4
PATCH 1/1 ARM: OMAP3+: am33xx id: Add new am33xx specific function to check dev_feature
Quoted 6 lines · Vaibhav Hiremath
Layout of
DEV_FEATUREregister (offset =0x604) is different between TI81xx and AM33xx device, so create separate function which will check for features available on specific AM33xx SoC and set the flags accordingly.Signed-off-by Vaibhav Hiremath <[email protected]>
Minor nit below, otherwise...
Quoted 12 lines
--- arch/arm/mach-omap2/control.h | 5 +++++ arch/arm/mach-omap2/id.c | 13 +++++++++++++ arch/arm/mach-omap2/io.c | 2 +- arch/arm/mach-omap2/soc.h | 1 + 4 files changed, 20 insertions(+), 1 deletions(-)arch/arm/mach-omap2/control.h +0
-0
arch/arm/mach-omap2/control.h line 363
Quoted 6 lines
arch/arm/mach-omap2/control.h +3
-0@@ -358,6 +358,11 @@#define AM33XX_CONTROL_STATUS_SYSBOOT1_WIDTH 0x2#define AM33XX_CONTROL_STATUS_SYSBOOT1_MASK (0x3 << 22) +/* DEV Feature register to identify AM33XX features */ +#define AM33XX_DEV_FEATURE 0x604 +#define AM33XX_SGX_SHIFT 29
You don't need the shift value anywhere in the code, so...
arch/arm/mach-omap2/control.h line 364
Quoted 1 line
arch/arm/mach-omap2/control.h +1
-0+#define AM33XX_SGX_MASK (1 << AM33XX_SGX_SHIFT)
#define AM33XX_SGX_MASK BIT(29)
instead?
Otherwise, rest of patch looks fine.
Kevin
PATCH 1/1 ARM: OMAP3+: am33xx id: Add new am33xx specific function to check dev_feature
Quoted 45 lines
-----Original Message-----
From: Kevin Hilman [mailto:khilman at linaro.org]
Sent: Tuesday, May 14, 2013 3:23 AM
To: Hiremath, Vaibhav
Cc: linux-omap at vger.kernel.org; tony at atomide.com; linux-arm- kernel at lists.infradead.org
Subject: Re: [PATCH] ARM: OMAP3+: am33xx id: Add new am33xx specific function to checkdev_featureQuoted 6 lines · Vaibhav Hiremath
Layout of
DEV_FEATUREregister (offset =0x604) is different between TI81xx and AM33xx device, so create separate function which will check for features available on specific AM33xx SoC and set the flags accordingly.Signed-off-by Vaibhav Hiremath <[email protected]>Minor nit below, otherwise...
Reviewed-by Kevin Hilman <[email protected]>arch/arm/mach-
Quoted 8 lines
--- arch/arm/mach-omap2/control.h | 5 +++++ arch/arm/mach-omap2/id.c | 13 +++++++++++++ arch/arm/mach-omap2/io.c | 2 +- arch/arm/mach-omap2/soc.h | 1 + 4 files changed, 20 insertions(+), 1 deletions(-)arch/arm/mach- renamed from arch/arm/mach-omap2/control.h +0
-0
omap2/control.harch/arm/mach-omap2/control.h line 363
Quoted 10 lines
index e6c3281..4acdfc5 100644
arch/arm/mach-omap2/control.h +3
-0@@ -358,6 +358,11 @@#define AM33XX_CONTROL_STATUS_SYSBOOT1_WIDTH 0x2#define AM33XX_CONTROL_STATUS_SYSBOOT1_MASK (0x3 << 22) +/* DEV Feature register to identify AM33XX features */ +#define AM33XX_DEV_FEATURE 0x604 +#define AM33XX_SGX_SHIFT 29You don't need the shift value anywhere in the code, so...
Quoted 8 lines
arch/arm/mach-omap2/control.h line 364
Quoted 1 line
arch/arm/mach-omap2/control.h +1
-0+#define AM33XX_SGX_MASK (1 << AM33XX_SGX_SHIFT)#define
AM33XX_SGX_MASKBIT(29)instead?
Otherwise, rest of patch looks fine.
Thanks for the review Kevin.
I just sent out V2 version of the patch with your reviewed-by With changes you mentioned.
Thanks,
Vaibhav