OMAP: Hwmod api changes
Subsystems (4)
PATCH v2 7/8 OMAP: Hwmod api changes
OMAP USBOTG modules has a requirement to set the auto idle bit only after setting smart idle bit. Modified the _sys_enable api to set the smart idle first and then the autoidle bit. Setting this will not have any impact on the other modules.
Added 2 wrapper APIs in the omap device layer for wakeup enable/disable and sidle/mstandby settings.
--- arch/arm/mach-omap2/omap_hwmod.c | 18 +++++++--- arch/arm/plat-omap/include/plat/omap_device.h | 2 + arch/arm/plat-omap/omap_device.c | 43 +++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 6 deletions(-)
arch/arm/mach-omap2/omap_hwmod.c +12 -6
@@ -654,12 +654,6 @@ static void _sysc_enable(struct omap_hwmod *oh)_set_master_standbymode (oh, idlemode, &v); } -if (sf &SYSC_HAS_AUTOIDLE ) { - idlemode = (oh->flags &HWMOD_NO_OCP_AUTOIDLE ) ? -0 :1 ; -_set_module_autoidle (oh, idlemode, &v); - } -/* XXX OCP ENAWAKEUP bit? */ /*
@@ -672,6 +666,18 @@ static void _sysc_enable(struct omap_hwmod *oh)_set_clockactivity (oh, oh->class->sysc->clockact, &v);_write_sysconfig (v, oh); + +/* Set the auto idle bit only after setting the smartidle bit +* as this is requirement for some modules like USBOTG +* setting this will not have any impact on the other modues. +*/ + +if (sf &SYSC_HAS_AUTOIDLE ) { + idlemode = (oh->flags &HWMOD_NO_OCP_AUTOIDLE ) ? +0 :1 ; +_set_module_autoidle (oh, idlemode, &v); + } +_write_sysconfig (v, oh); }/**
arch/arm/plat-omap/include/plat/omap_device.h +2 -0
@@ -116,6 +116,8 @@ int omap_device_enable_hwmods(struct omap_device *od);int omap_device_disable_clocks (struct omap_device *od);int omap_device_enable_clocks (struct omap_device *od); +int omap_device_enable_wakeup (struct platform_device *pdev); +int omap_device_disable_wakeup (struct platform_device *pdev);/* * Entries should be kept in latency order ascending
arch/arm/plat-omap/omap_device.c +43 -0
46 lines not on this page · raw message
Signature · 6 lines
1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Hema HK
OMAP USBOTG modules has a requirement to set the auto idle bit only after setting smart idle bit. Modified the
_sys_enableapi to set the smart idle first and then the autoidle bit. Setting this will not have any impact on the other modules.Added 2 wrapper APIs in the omap device layer for wakeup enable/disable and sidle/mstandby settings.
This should be a separate patch, with an description of who the users of this API would be and why.
Quoted 32 lines
Signed-off-by Hema HK <[email protected]>Signed-off-by Basak, Partha <[email protected]>Cc Felipe Balbi <[email protected]>Cc Tony Lindgren <[email protected]>Cc Kevin Hilman <[email protected]>Cc Cousson, Benoit <[email protected]>Cc Paul Walmsley <[email protected]>--- arch/arm/mach-omap2/omap_hwmod.c | 18 +++++++--- arch/arm/plat-omap/include/plat/omap_device.h | 2 + arch/arm/plat-omap/omap_device.c | 43 +++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 6 deletions(-)arch/arm/mach-omap2/omap_hwmod.c +0
-6@@ -654,12 +654,6 @@ static void _sysc_enable(struct omap_hwmod *oh)_set_master_standbymode (oh, idlemode, &v); } -if (sf &SYSC_HAS_AUTOIDLE ) { - idlemode = (oh->flags &HWMOD_NO_OCP_AUTOIDLE ) ? -0 :1 ; -_set_module_autoidle (oh, idlemode, &v); - } -/* XXX OCP ENAWAKEUP bit? */ /*
arch/arm/mach-omap2/omap_hwmod.c static void _sysc_enable(struct omap_hwmod *oh) · line 673
Quoted 8 lines
arch/arm/mach-omap2/omap_hwmod.c +5
-0@@ -672,6 +666,18 @@ static void _sysc_enable(struct omap_hwmod *oh)_set_clockactivity (oh, oh->class->sysc->clockact, &v);_write_sysconfig (v, oh); + +/* Set the auto idle bit only after setting the smartidle bit +* as this is requirement for some modules like USBOTG +* setting this will not have any impact on the other modues. +*/
Please fix multi-line comment style. (search for multi-line in Documentation/CodingStyle)
Kevin
Quoted 73 lines
arch/arm/mach-omap2/omap_hwmod.c +6
-0+if (sf &SYSC_HAS_AUTOIDLE ) { + idlemode = (oh->flags &HWMOD_NO_OCP_AUTOIDLE ) ? +0 :1 ; +_set_module_autoidle (oh, idlemode, &v); + } +_write_sysconfig (v, oh); }/** arch/arm/plat-omap/include/plat/omap_device.h +2
-0@@ -116,6 +116,8 @@ int omap_device_enable_hwmods(struct omap_device *od);int omap_device_disable_clocks (struct omap_device *od);int omap_device_enable_clocks (struct omap_device *od); +int omap_device_enable_wakeup (struct platform_device *pdev); +int omap_device_disable_wakeup (struct platform_device *pdev);/* * Entries should be kept in latency order ascending arch/arm/plat-omap/omap_device.c +43
-0@@ -757,3 +757,46 @@ int omap_device_enable_clocks(struct omap_device *od)/* XXX pass along return value here? */ return 0 ; } + +/** +* omap_device_enable_wakeup - Enable the wakeup bit +* @od: struct omap_device *od +* +* Enable the wakup bit for omap_hwmods associated +* with the omap_device. Returns 0. +*/ +int omap_device_enable_wakeup (struct platform_device *pdev) +{ +struct omap_hwmod *oh; +struct omap_device *od =_find_by_pdev (pdev); +int i; + +for (i =0 , oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) +omap_hwmod_enable_wakeup (oh); + +/* XXX pass along return value here? */ +return 0 ; +} + +/** +* omap_device_disable_wakeup -Disable the wakeup bit +* @od: struct omap_device *od +* +* Disable the wakup bit for omap_hwmods associated +* with the omap_device. Returns 0. +*/ + + +int omap_device_disable_wakeup (struct platform_device *pdev) +{ +struct omap_hwmod *oh; +struct omap_device *od =_find_by_pdev (pdev); +int i; + +for (i =0 , oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) +omap_hwmod_disable_wakeup (oh); + +/* XXX pass along return value here? */ +return 0 ; +} +
Hi,
Quoted 19 lines
-----Original Message-----
From: Kevin Hilman [mailto:[email protected]]
Sent: Thursday, August 26, 2010 5:12 AM
To: Kalliguddi, Hema
Cc: [email protected]; [email protected]; Basak, Partha; Felipe Balbi; Tony Lindgren; Cousson, Benoit;
Paul Walmsley
Subject: Re: [PATCH 7/8 v2] OMAP: Hwmod api changesQuoted 1 line · Hema HK
OMAP USBOTG modules has a requirement to set the auto idle
bit only after
Quoted 1 line
setting smart idle bit. Modified the
_sys_enableapi to setthe smart idle
Quoted 1 line
first and then the autoidle bit. Setting this will not have
any impact on the
Quoted 2 lines
other modules.
Quoted 8 lines
Quoted 1 line
Added 2 wrapper APIs in the omap device layer for wakeup
enable/disable
Quoted 1 line
and sidle/mstandby settings.
This should be a separate patch, with an description of who the users of
this API would be and why.
Ok. I can post it as separate patch also. But I think there was plan from Rajendra to Enable the wakeup as part of the sysc_enable() if smart idle/standby is configured. If that implementation is done then there is no need of this patch.
Quoted 36 lines
Quoted 8 lines
Signed-off-by Hema HK <[email protected]>Signed-off-by Basak, Partha <[email protected]>Cc Felipe Balbi <[email protected]>Cc Tony Lindgren <[email protected]>Cc Kevin Hilman <[email protected]>Cc Cousson, Benoit <[email protected]>Cc Paul Walmsley <[email protected]>Quoted 4 lines
--- arch/arm/mach-omap2/omap_hwmod.c | 18 +++++++--- arch/arm/plat-omap/include/plat/omap_device.h | 2 + arch/arm/plat-omap/omap_device.c | 43+++++++++++++++++++++++++
Review
Quoted 3 lines
3 files changed, 57 insertions(+), 6 deletions(-)(quoted diff) +0
-0
b/arch/arm/mach-omap2/omap_hwmod.cQuoted 19 lines
index 9bd99ad..55507a6 100644
arch/arm/mach-omap2/omap_hwmod.c +0
-6@@ -654,12 +654,6 @@ static void _sysc_enable(struct omap_hwmod *oh)_set_master_standbymode (oh, idlemode, &v); } -if (sf &SYSC_HAS_AUTOIDLE ) { - idlemode = (oh->flags &HWMOD_NO_OCP_AUTOIDLE ) ? -0 :1 ; -_set_module_autoidle (oh, idlemode, &v); - } -/* XXX OCP ENAWAKEUP bit? */ /* @@ -672,6 +666,18 @@ static void _sysc_enable(struct omap_hwmod *oh)_set_clockactivity (oh, oh->class->sysc->clockact, &v);
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod.c static void _sysc_enable(struct omap_hwmod *oh) · line 673
Quoted 6 lines
arch/arm/mach-omap2/omap_hwmod.c +5
-0_write_sysconfig (v, oh); + +/* Set the auto idle bit only after setting the smartidle bit +* as this is requirement for some modules like USBOTG +* setting this will not have any impact on the other modues. +*/ Please fix multi-line comment style. (search for multi-line in
Documentation/CodingStyle)
Sure I will fix it.
Quoted 72 lines
Kevin
Review
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod.c +6
-0+if (sf &SYSC_HAS_AUTOIDLE ) { + idlemode = (oh->flags &HWMOD_NO_OCP_AUTOIDLE ) ? +0 :1 ; +_set_module_autoidle (oh, idlemode, &v); + } +_write_sysconfig (v, oh); }/** (quoted diff) +0
-0
b/arch/arm/plat-omap/include/plat/omap_device.harch/arm/plat-omap/include/plat/omap_device.h int omap_device_enable_hwmods(struct
Quoted 4 lines
index 25cd9ac..c3eb07e 100644
arch/arm/plat-omap/include/plat/omap_device.h +0
-0@@ -116,6 +116,8 @@ int omap_device_enable_hwmods(struct
omap_device*od);Review
Quoted 9 lines
arch/arm/plat-omap/include/plat/omap_device.h +2
-0int omap_device_disable_clocks (struct omap_device *od);int omap_device_enable_clocks (struct omap_device *od); +int omap_device_enable_wakeup (struct platform_device *pdev); +int omap_device_disable_wakeup (struct platform_device *pdev);/* * Entries should be kept in latency order ascending (quoted diff) +0
-0
b/arch/arm/plat-omap/omap_device.carch/arm/plat-omap/omap_device.c int omap_device_enable_clocks(struct
Quoted 4 lines
index d2b1609..10182b1 100644
arch/arm/plat-omap/omap_device.c +0
-0@@ -757,3 +757,46 @@ int omap_device_enable_clocks(struct
omap_device*od)Quoted 39 lines
arch/arm/plat-omap/omap_device.c +36
-0/* XXX pass along return value here? */ return 0 ; } + +/** +* omap_device_enable_wakeup - Enable the wakeup bit +* @od: struct omap_device *od +* +* Enable the wakup bit for omap_hwmods associated +* with the omap_device. Returns 0. +*/ +int omap_device_enable_wakeup (struct platform_device *pdev) +{ +struct omap_hwmod *oh; +struct omap_device *od =_find_by_pdev (pdev); +int i; + +for (i =0 , oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) +omap_hwmod_enable_wakeup (oh); + +/* XXX pass along return value here? */ +return 0 ; +} + +/** +* omap_device_disable_wakeup -Disable the wakeup bit +* @od: struct omap_device *od +* +* Disable the wakup bit for omap_hwmods associated +* with the omap_device. Returns 0. +*/ + + +int omap_device_disable_wakeup (struct platform_device *pdev) +{ +struct omap_hwmod *oh; +struct omap_device *od =_find_by_pdev (pdev); +int i; +
Quoted 8 lines
arch/arm/plat-omap/omap_device.c int omap_device_enable_clocks(struct omap_device *od) · line 802
Quoted 7 lines
arch/arm/plat-omap/omap_device.c +7
-0+for (i =0 , oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) +omap_hwmod_disable_wakeup (oh); + +/* XXX pass along return value here? */ +return 0 ; +} +--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html