* [PATCH v4 1/3] AM35x: Using OMAP3 generic hwmods
@ 2011-09-22 13:26 ` Abhilash K V
0 siblings, 0 replies; 22+ messages in thread
From: Abhilash K V @ 2011-09-22 13:26 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel, linux-kernel
Cc: tony, linux, b-cousson, paul, aneesh, khilman, santosh.shilimkar,
christian.gmeiner, Abhilash K V
This patch enables AM35x SoCs to use generic OMAP3 hwmods
(i,e. omap3xxx_hwmods) by allowing am35xx_init_early() to
disable the modules which are not present in AM3517.
Reviewed-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
---
arch/arm/mach-omap2/io.c | 11 +++++++++++
arch/arm/mach-omap2/omap_hwmod.c | 2 ++
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 18 ++++++++++++++++++
arch/arm/plat-omap/include/plat/omap_hwmod.h | 3 +++
4 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 15f91c4..6a6e2cc 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -240,6 +240,16 @@ static struct map_desc omap44xx_io_desc[] __initdata = {
};
#endif
+static char *am3517_unused_hwmods[] = {
+ "iva",
+ "sr1_hwmod",
+ "sr2_hwmod",
+ "mailbox",
+ "usb_otg_hs",
+ NULL,
+};
+
+
static void __init _omap2_map_common_io(void)
{
/* Normally devicemaps_init() would flush caches and tlb after
@@ -432,6 +442,7 @@ void __init omap3630_init_early(void)
void __init am35xx_init_early(void)
{
+ omap2_disable_unused_hwmods(am3517_unused_hwmods);
omap2_init_common_infrastructure();
}
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index d713807..c7b0395 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1954,6 +1954,8 @@ int __init omap_hwmod_register(struct omap_hwmod **ohs)
i = 0;
do {
+ if (ohs[i]->flags & HWMOD_UNUSED)
+ continue;
r = _register(ohs[i]);
WARN(r, "omap_hwmod: %s: _register returned %d\n", ohs[i]->name,
r);
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 3008e16..682171c 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -3259,6 +3259,24 @@ static __initdata struct omap_hwmod *am35xx_hwmods[] = {
NULL
};
+void __init omap2_disable_unused_hwmods(char *unused_hwmods[])
+{
+ int index;
+
+ for (index = 0; omap3xxx_hwmods[index]; index++) {
+ char **hwmods = unused_hwmods;
+ while (*hwmods) {
+ if (strcmp(omap3xxx_hwmods[index]->name,
+ *hwmods) == 0) {
+ omap3xxx_hwmods[index]->flags
+ = HWMOD_UNUSED;
+ break;
+ }
+ hwmods++;
+ }
+ }
+}
+
int __init omap3xxx_hwmod_init(void)
{
int r;
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 5419f1a..96650f3 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -398,6 +398,7 @@ struct omap_hwmod_omap4_prcm {
* in order to complete the reset. Optional clocks will be disabled
* again after the reset.
* HWMOD_16BIT_REG: Module has 16bit registers
+ * HWMOD_UNUSED: The IP for this module is unused or disabled on current SoC
*/
#define HWMOD_SWSUP_SIDLE (1 << 0)
#define HWMOD_SWSUP_MSTANDBY (1 << 1)
@@ -408,6 +409,7 @@ struct omap_hwmod_omap4_prcm {
#define HWMOD_NO_IDLEST (1 << 6)
#define HWMOD_CONTROL_OPT_CLKS_IN_RESET (1 << 7)
#define HWMOD_16BIT_REG (1 << 8)
+#define HWMOD_UNUSED (1 << 9)
/*
* omap_hwmod._int_flags definitions
@@ -612,5 +614,6 @@ extern int omap2420_hwmod_init(void);
extern int omap2430_hwmod_init(void);
extern int omap3xxx_hwmod_init(void);
extern int omap44xx_hwmod_init(void);
+extern void omap2_disable_unused_hwmods(char *unused_hwmods[]);
#endif
--
1.7.1
^ permalink raw reply related [flat|nested] 22+ messages in thread* [PATCH v4 1/3] AM35x: Using OMAP3 generic hwmods
@ 2011-09-22 13:26 ` Abhilash K V
0 siblings, 0 replies; 22+ messages in thread
From: Abhilash K V @ 2011-09-22 13:26 UTC (permalink / raw)
To: linux-arm-kernel
This patch enables AM35x SoCs to use generic OMAP3 hwmods
(i,e. omap3xxx_hwmods) by allowing am35xx_init_early() to
disable the modules which are not present in AM3517.
Reviewed-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
---
arch/arm/mach-omap2/io.c | 11 +++++++++++
arch/arm/mach-omap2/omap_hwmod.c | 2 ++
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 18 ++++++++++++++++++
arch/arm/plat-omap/include/plat/omap_hwmod.h | 3 +++
4 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 15f91c4..6a6e2cc 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -240,6 +240,16 @@ static struct map_desc omap44xx_io_desc[] __initdata = {
};
#endif
+static char *am3517_unused_hwmods[] = {
+ "iva",
+ "sr1_hwmod",
+ "sr2_hwmod",
+ "mailbox",
+ "usb_otg_hs",
+ NULL,
+};
+
+
static void __init _omap2_map_common_io(void)
{
/* Normally devicemaps_init() would flush caches and tlb after
@@ -432,6 +442,7 @@ void __init omap3630_init_early(void)
void __init am35xx_init_early(void)
{
+ omap2_disable_unused_hwmods(am3517_unused_hwmods);
omap2_init_common_infrastructure();
}
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index d713807..c7b0395 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1954,6 +1954,8 @@ int __init omap_hwmod_register(struct omap_hwmod **ohs)
i = 0;
do {
+ if (ohs[i]->flags & HWMOD_UNUSED)
+ continue;
r = _register(ohs[i]);
WARN(r, "omap_hwmod: %s: _register returned %d\n", ohs[i]->name,
r);
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 3008e16..682171c 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -3259,6 +3259,24 @@ static __initdata struct omap_hwmod *am35xx_hwmods[] = {
NULL
};
+void __init omap2_disable_unused_hwmods(char *unused_hwmods[])
+{
+ int index;
+
+ for (index = 0; omap3xxx_hwmods[index]; index++) {
+ char **hwmods = unused_hwmods;
+ while (*hwmods) {
+ if (strcmp(omap3xxx_hwmods[index]->name,
+ *hwmods) == 0) {
+ omap3xxx_hwmods[index]->flags
+ = HWMOD_UNUSED;
+ break;
+ }
+ hwmods++;
+ }
+ }
+}
+
int __init omap3xxx_hwmod_init(void)
{
int r;
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 5419f1a..96650f3 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -398,6 +398,7 @@ struct omap_hwmod_omap4_prcm {
* in order to complete the reset. Optional clocks will be disabled
* again after the reset.
* HWMOD_16BIT_REG: Module has 16bit registers
+ * HWMOD_UNUSED: The IP for this module is unused or disabled on current SoC
*/
#define HWMOD_SWSUP_SIDLE (1 << 0)
#define HWMOD_SWSUP_MSTANDBY (1 << 1)
@@ -408,6 +409,7 @@ struct omap_hwmod_omap4_prcm {
#define HWMOD_NO_IDLEST (1 << 6)
#define HWMOD_CONTROL_OPT_CLKS_IN_RESET (1 << 7)
#define HWMOD_16BIT_REG (1 << 8)
+#define HWMOD_UNUSED (1 << 9)
/*
* omap_hwmod._int_flags definitions
@@ -612,5 +614,6 @@ extern int omap2420_hwmod_init(void);
extern int omap2430_hwmod_init(void);
extern int omap3xxx_hwmod_init(void);
extern int omap44xx_hwmod_init(void);
+extern void omap2_disable_unused_hwmods(char *unused_hwmods[]);
#endif
--
1.7.1
^ permalink raw reply related [flat|nested] 22+ messages in thread* [PATCH v4 2/3] omap_twl: Prevent SR to enable for am3517/am3505 devices
2011-09-22 13:26 ` Abhilash K V
(?)
@ 2011-09-22 13:26 ` Abhilash K V
-1 siblings, 0 replies; 22+ messages in thread
From: Abhilash K V @ 2011-09-22 13:26 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel, linux-kernel
Cc: tony, linux, b-cousson, paul, aneesh, khilman, santosh.shilimkar,
christian.gmeiner, Abhilash K V, Vaibhav Hiremath
In case of AM3517 & AM3505, SmartReflex is not applicable so
we must not enable it. So omap3_twl_init() is now not called
when the processor does not support SR.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
---
arch/arm/mach-omap2/id.c | 2 +-
arch/arm/mach-omap2/pm.c | 3 ++-
arch/arm/plat-omap/include/plat/cpu.h | 2 ++
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index d27daf9..b7e3082 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -188,7 +188,7 @@ static void __init omap3_check_features(void)
if (cpu_is_omap3630())
omap_features |= OMAP3_HAS_192MHZ_CLK;
if (!cpu_is_omap3505() && !cpu_is_omap3517())
- omap_features |= OMAP3_HAS_IO_WAKEUP;
+ omap_features |= (OMAP3_HAS_IO_WAKEUP | OMAP3_HAS_SR);
omap_features |= OMAP3_HAS_SDRC;
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index d34fc52..da71abc 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -252,7 +252,8 @@ postcore_initcall(omap2_common_pm_init);
static int __init omap2_common_pm_late_init(void)
{
/* Init the OMAP TWL parameters */
- omap3_twl_init();
+ if (omap3_has_sr())
+ omap3_twl_init();
omap4_twl_init();
/* Init the voltage layer */
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 2f90269..cc6fcd3 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -413,6 +413,7 @@ extern u32 omap_features;
#define OMAP4_HAS_MPU_1GHZ BIT(8)
#define OMAP4_HAS_MPU_1_2GHZ BIT(9)
#define OMAP4_HAS_MPU_1_5GHZ BIT(10)
+#define OMAP3_HAS_SR BIT(11)
#define OMAP3_HAS_FEATURE(feat,flag) \
@@ -429,6 +430,7 @@ OMAP3_HAS_FEATURE(isp, ISP)
OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP)
OMAP3_HAS_FEATURE(sdrc, SDRC)
+OMAP3_HAS_FEATURE(sr, SR)
/*
* Runtime detection of OMAP4 features
--
1.7.1
^ permalink raw reply related [flat|nested] 22+ messages in thread* [PATCH v4 2/3] omap_twl: Prevent SR to enable for am3517/am3505 devices
@ 2011-09-22 13:26 ` Abhilash K V
0 siblings, 0 replies; 22+ messages in thread
From: Abhilash K V @ 2011-09-22 13:26 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel, linux-kernel
Cc: tony, linux, b-cousson, paul, aneesh, khilman, santosh.shilimkar,
christian.gmeiner, Abhilash K V, Vaibhav Hiremath
In case of AM3517 & AM3505, SmartReflex is not applicable so
we must not enable it. So omap3_twl_init() is now not called
when the processor does not support SR.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
---
arch/arm/mach-omap2/id.c | 2 +-
arch/arm/mach-omap2/pm.c | 3 ++-
arch/arm/plat-omap/include/plat/cpu.h | 2 ++
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index d27daf9..b7e3082 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -188,7 +188,7 @@ static void __init omap3_check_features(void)
if (cpu_is_omap3630())
omap_features |= OMAP3_HAS_192MHZ_CLK;
if (!cpu_is_omap3505() && !cpu_is_omap3517())
- omap_features |= OMAP3_HAS_IO_WAKEUP;
+ omap_features |= (OMAP3_HAS_IO_WAKEUP | OMAP3_HAS_SR);
omap_features |= OMAP3_HAS_SDRC;
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index d34fc52..da71abc 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -252,7 +252,8 @@ postcore_initcall(omap2_common_pm_init);
static int __init omap2_common_pm_late_init(void)
{
/* Init the OMAP TWL parameters */
- omap3_twl_init();
+ if (omap3_has_sr())
+ omap3_twl_init();
omap4_twl_init();
/* Init the voltage layer */
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 2f90269..cc6fcd3 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -413,6 +413,7 @@ extern u32 omap_features;
#define OMAP4_HAS_MPU_1GHZ BIT(8)
#define OMAP4_HAS_MPU_1_2GHZ BIT(9)
#define OMAP4_HAS_MPU_1_5GHZ BIT(10)
+#define OMAP3_HAS_SR BIT(11)
#define OMAP3_HAS_FEATURE(feat,flag) \
@@ -429,6 +430,7 @@ OMAP3_HAS_FEATURE(isp, ISP)
OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP)
OMAP3_HAS_FEATURE(sdrc, SDRC)
+OMAP3_HAS_FEATURE(sr, SR)
/*
* Runtime detection of OMAP4 features
--
1.7.1
^ permalink raw reply related [flat|nested] 22+ messages in thread* [PATCH v4 2/3] omap_twl: Prevent SR to enable for am3517/am3505 devices
@ 2011-09-22 13:26 ` Abhilash K V
0 siblings, 0 replies; 22+ messages in thread
From: Abhilash K V @ 2011-09-22 13:26 UTC (permalink / raw)
To: linux-arm-kernel
In case of AM3517 & AM3505, SmartReflex is not applicable so
we must not enable it. So omap3_twl_init() is now not called
when the processor does not support SR.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
---
arch/arm/mach-omap2/id.c | 2 +-
arch/arm/mach-omap2/pm.c | 3 ++-
arch/arm/plat-omap/include/plat/cpu.h | 2 ++
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index d27daf9..b7e3082 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -188,7 +188,7 @@ static void __init omap3_check_features(void)
if (cpu_is_omap3630())
omap_features |= OMAP3_HAS_192MHZ_CLK;
if (!cpu_is_omap3505() && !cpu_is_omap3517())
- omap_features |= OMAP3_HAS_IO_WAKEUP;
+ omap_features |= (OMAP3_HAS_IO_WAKEUP | OMAP3_HAS_SR);
omap_features |= OMAP3_HAS_SDRC;
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index d34fc52..da71abc 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -252,7 +252,8 @@ postcore_initcall(omap2_common_pm_init);
static int __init omap2_common_pm_late_init(void)
{
/* Init the OMAP TWL parameters */
- omap3_twl_init();
+ if (omap3_has_sr())
+ omap3_twl_init();
omap4_twl_init();
/* Init the voltage layer */
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 2f90269..cc6fcd3 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -413,6 +413,7 @@ extern u32 omap_features;
#define OMAP4_HAS_MPU_1GHZ BIT(8)
#define OMAP4_HAS_MPU_1_2GHZ BIT(9)
#define OMAP4_HAS_MPU_1_5GHZ BIT(10)
+#define OMAP3_HAS_SR BIT(11)
#define OMAP3_HAS_FEATURE(feat,flag) \
@@ -429,6 +430,7 @@ OMAP3_HAS_FEATURE(isp, ISP)
OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP)
OMAP3_HAS_FEATURE(sdrc, SDRC)
+OMAP3_HAS_FEATURE(sr, SR)
/*
* Runtime detection of OMAP4 features
--
1.7.1
^ permalink raw reply related [flat|nested] 22+ messages in thread* [PATCH v4 3/3] OMAP2+: voltage: add check for missing PMIC info in vp init
2011-09-22 13:26 ` Abhilash K V
(?)
@ 2011-09-22 13:26 ` Abhilash K V
-1 siblings, 0 replies; 22+ messages in thread
From: Abhilash K V @ 2011-09-22 13:26 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel, linux-kernel
Cc: tony, linux, b-cousson, paul, aneesh, khilman, santosh.shilimkar,
christian.gmeiner, Abhilash K V
If PMIC info is not available in omap_vp_init(), abort.
Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
---
arch/arm/mach-omap2/vp.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
index 66bd700..2c99837 100644
--- a/arch/arm/mach-omap2/vp.c
+++ b/arch/arm/mach-omap2/vp.c
@@ -41,6 +41,13 @@ void __init omap_vp_init(struct voltagedomain *voltdm)
u32 val, sys_clk_rate, timeout, waittime;
u32 vddmin, vddmax, vstepmin, vstepmax;
+ if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) {
+ pr_err("%s: PMIC info requried to configure vp for"
+ "vdd_%s not populated.Hence cannot initialize vp\n",
+ __func__, voltdm->name);
+ return;
+ }
+
if (!voltdm->read || !voltdm->write) {
pr_err("%s: No read/write API for accessing vdd_%s regs\n",
__func__, voltdm->name);
--
1.7.1
^ permalink raw reply related [flat|nested] 22+ messages in thread* [PATCH v4 3/3] OMAP2+: voltage: add check for missing PMIC info in vp init
@ 2011-09-22 13:26 ` Abhilash K V
0 siblings, 0 replies; 22+ messages in thread
From: Abhilash K V @ 2011-09-22 13:26 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel, linux-kernel
Cc: tony, linux, b-cousson, paul, aneesh, khilman, santosh.shilimkar,
christian.gmeiner, Abhilash K V
If PMIC info is not available in omap_vp_init(), abort.
Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
---
arch/arm/mach-omap2/vp.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
index 66bd700..2c99837 100644
--- a/arch/arm/mach-omap2/vp.c
+++ b/arch/arm/mach-omap2/vp.c
@@ -41,6 +41,13 @@ void __init omap_vp_init(struct voltagedomain *voltdm)
u32 val, sys_clk_rate, timeout, waittime;
u32 vddmin, vddmax, vstepmin, vstepmax;
+ if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) {
+ pr_err("%s: PMIC info requried to configure vp for"
+ "vdd_%s not populated.Hence cannot initialize vp\n",
+ __func__, voltdm->name);
+ return;
+ }
+
if (!voltdm->read || !voltdm->write) {
pr_err("%s: No read/write API for accessing vdd_%s regs\n",
__func__, voltdm->name);
--
1.7.1
^ permalink raw reply related [flat|nested] 22+ messages in thread* [PATCH v4 3/3] OMAP2+: voltage: add check for missing PMIC info in vp init
@ 2011-09-22 13:26 ` Abhilash K V
0 siblings, 0 replies; 22+ messages in thread
From: Abhilash K V @ 2011-09-22 13:26 UTC (permalink / raw)
To: linux-arm-kernel
If PMIC info is not available in omap_vp_init(), abort.
Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
---
arch/arm/mach-omap2/vp.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
index 66bd700..2c99837 100644
--- a/arch/arm/mach-omap2/vp.c
+++ b/arch/arm/mach-omap2/vp.c
@@ -41,6 +41,13 @@ void __init omap_vp_init(struct voltagedomain *voltdm)
u32 val, sys_clk_rate, timeout, waittime;
u32 vddmin, vddmax, vstepmin, vstepmax;
+ if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) {
+ pr_err("%s: PMIC info requried to configure vp for"
+ "vdd_%s not populated.Hence cannot initialize vp\n",
+ __func__, voltdm->name);
+ return;
+ }
+
if (!voltdm->read || !voltdm->write) {
pr_err("%s: No read/write API for accessing vdd_%s regs\n",
__func__, voltdm->name);
--
1.7.1
^ permalink raw reply related [flat|nested] 22+ messages in thread* Re: [PATCH v4 3/3] OMAP2+: voltage: add check for missing PMIC info in vp init
2011-09-22 13:26 ` Abhilash K V
(?)
@ 2011-09-22 21:39 ` Kevin Hilman
-1 siblings, 0 replies; 22+ messages in thread
From: Kevin Hilman @ 2011-09-22 21:39 UTC (permalink / raw)
To: Abhilash K V
Cc: linux-omap, linux-arm-kernel, linux-kernel, paul, linux,
b-cousson, tony, christian.gmeiner, aneesh, santosh.shilimkar
Abhilash K V <abhilash.kv@ti.com> writes:
> If PMIC info is not available in omap_vp_init(), abort.
>
> Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
Looks good, some minor nitpicking below...
> ---
> arch/arm/mach-omap2/vp.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
> index 66bd700..2c99837 100644
> --- a/arch/arm/mach-omap2/vp.c
> +++ b/arch/arm/mach-omap2/vp.c
> @@ -41,6 +41,13 @@ void __init omap_vp_init(struct voltagedomain *voltdm)
> u32 val, sys_clk_rate, timeout, waittime;
> u32 vddmin, vddmax, vstepmin, vstepmax;
>
> + if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) {
> + pr_err("%s: PMIC info requried to configure vp for"
nit 1: s/vp/VP/
nit 2: need a space at the end of this string, otherwise the "vdd_" will
be right after the "for" with no spaces.
> + "vdd_%s not populated.Hence cannot initialize vp\n",
nit 3: Add space after '.'
Kevin
> + __func__, voltdm->name);
> + return;
> + }
> +
> if (!voltdm->read || !voltdm->write) {
> pr_err("%s: No read/write API for accessing vdd_%s regs\n",
> __func__, voltdm->name);
^ permalink raw reply [flat|nested] 22+ messages in thread* Re: [PATCH v4 3/3] OMAP2+: voltage: add check for missing PMIC info in vp init
@ 2011-09-22 21:39 ` Kevin Hilman
0 siblings, 0 replies; 22+ messages in thread
From: Kevin Hilman @ 2011-09-22 21:39 UTC (permalink / raw)
To: Abhilash K V
Cc: linux-omap, linux-arm-kernel, linux-kernel, paul, linux,
b-cousson, tony, christian.gmeiner, aneesh, santosh.shilimkar
Abhilash K V <abhilash.kv@ti.com> writes:
> If PMIC info is not available in omap_vp_init(), abort.
>
> Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
Looks good, some minor nitpicking below...
> ---
> arch/arm/mach-omap2/vp.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
> index 66bd700..2c99837 100644
> --- a/arch/arm/mach-omap2/vp.c
> +++ b/arch/arm/mach-omap2/vp.c
> @@ -41,6 +41,13 @@ void __init omap_vp_init(struct voltagedomain *voltdm)
> u32 val, sys_clk_rate, timeout, waittime;
> u32 vddmin, vddmax, vstepmin, vstepmax;
>
> + if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) {
> + pr_err("%s: PMIC info requried to configure vp for"
nit 1: s/vp/VP/
nit 2: need a space at the end of this string, otherwise the "vdd_" will
be right after the "for" with no spaces.
> + "vdd_%s not populated.Hence cannot initialize vp\n",
nit 3: Add space after '.'
Kevin
> + __func__, voltdm->name);
> + return;
> + }
> +
> if (!voltdm->read || !voltdm->write) {
> pr_err("%s: No read/write API for accessing vdd_%s regs\n",
> __func__, voltdm->name);
^ permalink raw reply [flat|nested] 22+ messages in thread* [PATCH v4 3/3] OMAP2+: voltage: add check for missing PMIC info in vp init
@ 2011-09-22 21:39 ` Kevin Hilman
0 siblings, 0 replies; 22+ messages in thread
From: Kevin Hilman @ 2011-09-22 21:39 UTC (permalink / raw)
To: linux-arm-kernel
Abhilash K V <abhilash.kv@ti.com> writes:
> If PMIC info is not available in omap_vp_init(), abort.
>
> Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
Looks good, some minor nitpicking below...
> ---
> arch/arm/mach-omap2/vp.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
> index 66bd700..2c99837 100644
> --- a/arch/arm/mach-omap2/vp.c
> +++ b/arch/arm/mach-omap2/vp.c
> @@ -41,6 +41,13 @@ void __init omap_vp_init(struct voltagedomain *voltdm)
> u32 val, sys_clk_rate, timeout, waittime;
> u32 vddmin, vddmax, vstepmin, vstepmax;
>
> + if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) {
> + pr_err("%s: PMIC info requried to configure vp for"
nit 1: s/vp/VP/
nit 2: need a space at the end of this string, otherwise the "vdd_" will
be right after the "for" with no spaces.
> + "vdd_%s not populated.Hence cannot initialize vp\n",
nit 3: Add space after '.'
Kevin
> + __func__, voltdm->name);
> + return;
> + }
> +
> if (!voltdm->read || !voltdm->write) {
> pr_err("%s: No read/write API for accessing vdd_%s regs\n",
> __func__, voltdm->name);
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v4 2/3] omap_twl: Prevent SR to enable for am3517/am3505 devices
2011-09-22 13:26 ` Abhilash K V
(?)
@ 2011-09-22 21:35 ` Kevin Hilman
-1 siblings, 0 replies; 22+ messages in thread
From: Kevin Hilman @ 2011-09-22 21:35 UTC (permalink / raw)
To: Abhilash K V
Cc: linux-omap, linux-arm-kernel, linux-kernel, tony, linux,
b-cousson, paul, aneesh, santosh.shilimkar, christian.gmeiner,
Vaibhav Hiremath
Abhilash K V <abhilash.kv@ti.com> writes:
> In case of AM3517 & AM3505, SmartReflex is not applicable so
> we must not enable it.
This part is fine, but...
> So omap3_twl_init() is now not called when the processor does not
> support SR.
...I don't think this is right. DVFS using the PMIC is still doable
without SR.
Are you assuming that no DVFS is done on these devices?
Kevin
> Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
> Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
> ---
> arch/arm/mach-omap2/id.c | 2 +-
> arch/arm/mach-omap2/pm.c | 3 ++-
> arch/arm/plat-omap/include/plat/cpu.h | 2 ++
> 3 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index d27daf9..b7e3082 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -188,7 +188,7 @@ static void __init omap3_check_features(void)
> if (cpu_is_omap3630())
> omap_features |= OMAP3_HAS_192MHZ_CLK;
> if (!cpu_is_omap3505() && !cpu_is_omap3517())
> - omap_features |= OMAP3_HAS_IO_WAKEUP;
> + omap_features |= (OMAP3_HAS_IO_WAKEUP | OMAP3_HAS_SR);
>
> omap_features |= OMAP3_HAS_SDRC;
>
> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
> index d34fc52..da71abc 100644
> --- a/arch/arm/mach-omap2/pm.c
> +++ b/arch/arm/mach-omap2/pm.c
> @@ -252,7 +252,8 @@ postcore_initcall(omap2_common_pm_init);
> static int __init omap2_common_pm_late_init(void)
> {
> /* Init the OMAP TWL parameters */
> - omap3_twl_init();
> + if (omap3_has_sr())
> + omap3_twl_init();
> omap4_twl_init();
>
> /* Init the voltage layer */
> diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
> index 2f90269..cc6fcd3 100644
> --- a/arch/arm/plat-omap/include/plat/cpu.h
> +++ b/arch/arm/plat-omap/include/plat/cpu.h
> @@ -413,6 +413,7 @@ extern u32 omap_features;
> #define OMAP4_HAS_MPU_1GHZ BIT(8)
> #define OMAP4_HAS_MPU_1_2GHZ BIT(9)
> #define OMAP4_HAS_MPU_1_5GHZ BIT(10)
> +#define OMAP3_HAS_SR BIT(11)
>
>
> #define OMAP3_HAS_FEATURE(feat,flag) \
> @@ -429,6 +430,7 @@ OMAP3_HAS_FEATURE(isp, ISP)
> OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
> OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP)
> OMAP3_HAS_FEATURE(sdrc, SDRC)
> +OMAP3_HAS_FEATURE(sr, SR)
>
> /*
> * Runtime detection of OMAP4 features
^ permalink raw reply [flat|nested] 22+ messages in thread* Re: [PATCH v4 2/3] omap_twl: Prevent SR to enable for am3517/am3505 devices
@ 2011-09-22 21:35 ` Kevin Hilman
0 siblings, 0 replies; 22+ messages in thread
From: Kevin Hilman @ 2011-09-22 21:35 UTC (permalink / raw)
To: Abhilash K V
Cc: linux-omap, linux-arm-kernel, linux-kernel, tony, linux,
b-cousson, paul, aneesh, santosh.shilimkar, christian.gmeiner,
Vaibhav Hiremath
Abhilash K V <abhilash.kv@ti.com> writes:
> In case of AM3517 & AM3505, SmartReflex is not applicable so
> we must not enable it.
This part is fine, but...
> So omap3_twl_init() is now not called when the processor does not
> support SR.
...I don't think this is right. DVFS using the PMIC is still doable
without SR.
Are you assuming that no DVFS is done on these devices?
Kevin
> Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
> Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
> ---
> arch/arm/mach-omap2/id.c | 2 +-
> arch/arm/mach-omap2/pm.c | 3 ++-
> arch/arm/plat-omap/include/plat/cpu.h | 2 ++
> 3 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index d27daf9..b7e3082 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -188,7 +188,7 @@ static void __init omap3_check_features(void)
> if (cpu_is_omap3630())
> omap_features |= OMAP3_HAS_192MHZ_CLK;
> if (!cpu_is_omap3505() && !cpu_is_omap3517())
> - omap_features |= OMAP3_HAS_IO_WAKEUP;
> + omap_features |= (OMAP3_HAS_IO_WAKEUP | OMAP3_HAS_SR);
>
> omap_features |= OMAP3_HAS_SDRC;
>
> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
> index d34fc52..da71abc 100644
> --- a/arch/arm/mach-omap2/pm.c
> +++ b/arch/arm/mach-omap2/pm.c
> @@ -252,7 +252,8 @@ postcore_initcall(omap2_common_pm_init);
> static int __init omap2_common_pm_late_init(void)
> {
> /* Init the OMAP TWL parameters */
> - omap3_twl_init();
> + if (omap3_has_sr())
> + omap3_twl_init();
> omap4_twl_init();
>
> /* Init the voltage layer */
> diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
> index 2f90269..cc6fcd3 100644
> --- a/arch/arm/plat-omap/include/plat/cpu.h
> +++ b/arch/arm/plat-omap/include/plat/cpu.h
> @@ -413,6 +413,7 @@ extern u32 omap_features;
> #define OMAP4_HAS_MPU_1GHZ BIT(8)
> #define OMAP4_HAS_MPU_1_2GHZ BIT(9)
> #define OMAP4_HAS_MPU_1_5GHZ BIT(10)
> +#define OMAP3_HAS_SR BIT(11)
>
>
> #define OMAP3_HAS_FEATURE(feat,flag) \
> @@ -429,6 +430,7 @@ OMAP3_HAS_FEATURE(isp, ISP)
> OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
> OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP)
> OMAP3_HAS_FEATURE(sdrc, SDRC)
> +OMAP3_HAS_FEATURE(sr, SR)
>
> /*
> * Runtime detection of OMAP4 features
^ permalink raw reply [flat|nested] 22+ messages in thread* [PATCH v4 2/3] omap_twl: Prevent SR to enable for am3517/am3505 devices
@ 2011-09-22 21:35 ` Kevin Hilman
0 siblings, 0 replies; 22+ messages in thread
From: Kevin Hilman @ 2011-09-22 21:35 UTC (permalink / raw)
To: linux-arm-kernel
Abhilash K V <abhilash.kv@ti.com> writes:
> In case of AM3517 & AM3505, SmartReflex is not applicable so
> we must not enable it.
This part is fine, but...
> So omap3_twl_init() is now not called when the processor does not
> support SR.
...I don't think this is right. DVFS using the PMIC is still doable
without SR.
Are you assuming that no DVFS is done on these devices?
Kevin
> Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
> Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
> ---
> arch/arm/mach-omap2/id.c | 2 +-
> arch/arm/mach-omap2/pm.c | 3 ++-
> arch/arm/plat-omap/include/plat/cpu.h | 2 ++
> 3 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index d27daf9..b7e3082 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -188,7 +188,7 @@ static void __init omap3_check_features(void)
> if (cpu_is_omap3630())
> omap_features |= OMAP3_HAS_192MHZ_CLK;
> if (!cpu_is_omap3505() && !cpu_is_omap3517())
> - omap_features |= OMAP3_HAS_IO_WAKEUP;
> + omap_features |= (OMAP3_HAS_IO_WAKEUP | OMAP3_HAS_SR);
>
> omap_features |= OMAP3_HAS_SDRC;
>
> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
> index d34fc52..da71abc 100644
> --- a/arch/arm/mach-omap2/pm.c
> +++ b/arch/arm/mach-omap2/pm.c
> @@ -252,7 +252,8 @@ postcore_initcall(omap2_common_pm_init);
> static int __init omap2_common_pm_late_init(void)
> {
> /* Init the OMAP TWL parameters */
> - omap3_twl_init();
> + if (omap3_has_sr())
> + omap3_twl_init();
> omap4_twl_init();
>
> /* Init the voltage layer */
> diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
> index 2f90269..cc6fcd3 100644
> --- a/arch/arm/plat-omap/include/plat/cpu.h
> +++ b/arch/arm/plat-omap/include/plat/cpu.h
> @@ -413,6 +413,7 @@ extern u32 omap_features;
> #define OMAP4_HAS_MPU_1GHZ BIT(8)
> #define OMAP4_HAS_MPU_1_2GHZ BIT(9)
> #define OMAP4_HAS_MPU_1_5GHZ BIT(10)
> +#define OMAP3_HAS_SR BIT(11)
>
>
> #define OMAP3_HAS_FEATURE(feat,flag) \
> @@ -429,6 +430,7 @@ OMAP3_HAS_FEATURE(isp, ISP)
> OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
> OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP)
> OMAP3_HAS_FEATURE(sdrc, SDRC)
> +OMAP3_HAS_FEATURE(sr, SR)
>
> /*
> * Runtime detection of OMAP4 features
^ permalink raw reply [flat|nested] 22+ messages in thread* RE: [PATCH v4 2/3] omap_twl: Prevent SR to enable for am3517/am3505 devices
2011-09-22 21:35 ` Kevin Hilman
@ 2011-09-23 12:51 ` Koyamangalath, Abhilash
-1 siblings, 0 replies; 22+ messages in thread
From: Koyamangalath, Abhilash @ 2011-09-23 12:51 UTC (permalink / raw)
To: Hilman, Kevin
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, tony@atomide.com,
linux@arm.linux.org.uk, Cousson, Benoit, paul@pwsan.com,
V, Aneesh, Shilimkar, Santosh, christian.gmeiner@gmail.com,
Hiremath, Vaibhav
hi Kevin,
On Fri, Sep 23, 2011 at 3:05 PM, Hilman, Kevin wrote:
>
> Abhilash K V <abhilash.kv@ti.com> writes:
>
>> In case of AM3517 & AM3505, SmartReflex is not applicable so
>> we must not enable it.
>
> This part is fine, but...
>
>> So omap3_twl_init() is now not called when the processor does not
>> support SR.
>
> ...I don't think this is right. DVFS using the PMIC is still doable
> without SR.
>
> Are you assuming that no DVFS is done on these devices?
[Abhilash K V] yes, I just verified (in sprugr0b), that DVFS is not supported on am35xx
DPS however is supported, though I'm unsure of how or whether it needs
software control.
-Abhilash
>
> Kevin
>
>
>> Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
>> Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
>> ---
>> arch/arm/mach-omap2/id.c | 2 +-
>> arch/arm/mach-omap2/pm.c | 3 ++-
>> arch/arm/plat-omap/include/plat/cpu.h | 2 ++
>> 3 files changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
>> index d27daf9..b7e3082 100644
>> --- a/arch/arm/mach-omap2/id.c
>> +++ b/arch/arm/mach-omap2/id.c
>> @@ -188,7 +188,7 @@ static void __init omap3_check_features(void)
>> if (cpu_is_omap3630())
>> omap_features |= OMAP3_HAS_192MHZ_CLK;
>> if (!cpu_is_omap3505() && !cpu_is_omap3517())
>> - omap_features |= OMAP3_HAS_IO_WAKEUP;
>> + omap_features |= (OMAP3_HAS_IO_WAKEUP | OMAP3_HAS_SR);
>>
>> omap_features |= OMAP3_HAS_SDRC;
>>
>> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
>> index d34fc52..da71abc 100644
>> --- a/arch/arm/mach-omap2/pm.c
>> +++ b/arch/arm/mach-omap2/pm.c
>> @@ -252,7 +252,8 @@ postcore_initcall(omap2_common_pm_init);
>> static int __init omap2_common_pm_late_init(void)
>> {
>> /* Init the OMAP TWL parameters */
>> - omap3_twl_init();
>> + if (omap3_has_sr())
>> + omap3_twl_init();
>> omap4_twl_init();
>>
>> /* Init the voltage layer */
>> diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
>> index 2f90269..cc6fcd3 100644
>> --- a/arch/arm/plat-omap/include/plat/cpu.h
>> +++ b/arch/arm/plat-omap/include/plat/cpu.h
>> @@ -413,6 +413,7 @@ extern u32 omap_features;
>> #define OMAP4_HAS_MPU_1GHZ BIT(8)
>> #define OMAP4_HAS_MPU_1_2GHZ BIT(9)
>> #define OMAP4_HAS_MPU_1_5GHZ BIT(10)
>> +#define OMAP3_HAS_SR BIT(11)
>>
>>
>> #define OMAP3_HAS_FEATURE(feat,flag) \
>> @@ -429,6 +430,7 @@ OMAP3_HAS_FEATURE(isp, ISP)
>> OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
>> OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP)
>> OMAP3_HAS_FEATURE(sdrc, SDRC)
>> +OMAP3_HAS_FEATURE(sr, SR)
>>
>> /*
>> * Runtime detection of OMAP4 features
>
^ permalink raw reply [flat|nested] 22+ messages in thread* [PATCH v4 2/3] omap_twl: Prevent SR to enable for am3517/am3505 devices
@ 2011-09-23 12:51 ` Koyamangalath, Abhilash
0 siblings, 0 replies; 22+ messages in thread
From: Koyamangalath, Abhilash @ 2011-09-23 12:51 UTC (permalink / raw)
To: linux-arm-kernel
hi Kevin,
On Fri, Sep 23, 2011 at 3:05 PM, Hilman, Kevin wrote:
>
> Abhilash K V <abhilash.kv@ti.com> writes:
>
>> In case of AM3517 & AM3505, SmartReflex is not applicable so
>> we must not enable it.
>
> This part is fine, but...
>
>> So omap3_twl_init() is now not called when the processor does not
>> support SR.
>
> ...I don't think this is right. DVFS using the PMIC is still doable
> without SR.
>
> Are you assuming that no DVFS is done on these devices?
[Abhilash K V] yes, I just verified (in sprugr0b), that DVFS is not supported on am35xx
DPS however is supported, though I'm unsure of how or whether it needs
software control.
-Abhilash
>
> Kevin
>
>
>> Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
>> Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
>> ---
>> arch/arm/mach-omap2/id.c | 2 +-
>> arch/arm/mach-omap2/pm.c | 3 ++-
>> arch/arm/plat-omap/include/plat/cpu.h | 2 ++
>> 3 files changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
>> index d27daf9..b7e3082 100644
>> --- a/arch/arm/mach-omap2/id.c
>> +++ b/arch/arm/mach-omap2/id.c
>> @@ -188,7 +188,7 @@ static void __init omap3_check_features(void)
>> if (cpu_is_omap3630())
>> omap_features |= OMAP3_HAS_192MHZ_CLK;
>> if (!cpu_is_omap3505() && !cpu_is_omap3517())
>> - omap_features |= OMAP3_HAS_IO_WAKEUP;
>> + omap_features |= (OMAP3_HAS_IO_WAKEUP | OMAP3_HAS_SR);
>>
>> omap_features |= OMAP3_HAS_SDRC;
>>
>> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
>> index d34fc52..da71abc 100644
>> --- a/arch/arm/mach-omap2/pm.c
>> +++ b/arch/arm/mach-omap2/pm.c
>> @@ -252,7 +252,8 @@ postcore_initcall(omap2_common_pm_init);
>> static int __init omap2_common_pm_late_init(void)
>> {
>> /* Init the OMAP TWL parameters */
>> - omap3_twl_init();
>> + if (omap3_has_sr())
>> + omap3_twl_init();
>> omap4_twl_init();
>>
>> /* Init the voltage layer */
>> diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
>> index 2f90269..cc6fcd3 100644
>> --- a/arch/arm/plat-omap/include/plat/cpu.h
>> +++ b/arch/arm/plat-omap/include/plat/cpu.h
>> @@ -413,6 +413,7 @@ extern u32 omap_features;
>> #define OMAP4_HAS_MPU_1GHZ BIT(8)
>> #define OMAP4_HAS_MPU_1_2GHZ BIT(9)
>> #define OMAP4_HAS_MPU_1_5GHZ BIT(10)
>> +#define OMAP3_HAS_SR BIT(11)
>>
>>
>> #define OMAP3_HAS_FEATURE(feat,flag) \
>> @@ -429,6 +430,7 @@ OMAP3_HAS_FEATURE(isp, ISP)
>> OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
>> OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP)
>> OMAP3_HAS_FEATURE(sdrc, SDRC)
>> +OMAP3_HAS_FEATURE(sr, SR)
>>
>> /*
>> * Runtime detection of OMAP4 features
>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v4 1/3] AM35x: Using OMAP3 generic hwmods
2011-09-22 13:26 ` Abhilash K V
@ 2011-09-22 19:10 ` Paul Walmsley
-1 siblings, 0 replies; 22+ messages in thread
From: Paul Walmsley @ 2011-09-22 19:10 UTC (permalink / raw)
To: Abhilash K V
Cc: linux-omap, Maupin, Chase, linux-arm-kernel, linux-kernel, tony,
linux, b-cousson, aneesh, khilman, santosh.shilimkar,
christian.gmeiner
+ Chase
Hi
On Thu, 22 Sep 2011, Abhilash K V wrote:
> This patch enables AM35x SoCs to use generic OMAP3 hwmods
> (i,e. omap3xxx_hwmods) by allowing am35xx_init_early() to
> disable the modules which are not present in AM3517.
>
> Reviewed-by: Sanjeev Premi <premi@ti.com>
> Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
We now use a different approach for registering hwmods that are
device-specific. Could you please take a look at the approach that's in
Tony's master branch and use it instead to handle AM3517 hwmod
registration?
- Paul
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH v4 1/3] AM35x: Using OMAP3 generic hwmods
@ 2011-09-22 19:10 ` Paul Walmsley
0 siblings, 0 replies; 22+ messages in thread
From: Paul Walmsley @ 2011-09-22 19:10 UTC (permalink / raw)
To: linux-arm-kernel
+ Chase
Hi
On Thu, 22 Sep 2011, Abhilash K V wrote:
> This patch enables AM35x SoCs to use generic OMAP3 hwmods
> (i,e. omap3xxx_hwmods) by allowing am35xx_init_early() to
> disable the modules which are not present in AM3517.
>
> Reviewed-by: Sanjeev Premi <premi@ti.com>
> Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
We now use a different approach for registering hwmods that are
device-specific. Could you please take a look at the approach that's in
Tony's master branch and use it instead to handle AM3517 hwmod
registration?
- Paul
^ permalink raw reply [flat|nested] 22+ messages in thread