OMAP2+: use control module mfd driver in omap_type
Subsystems (3)
PATCH v4 3/4 OMAP2+: use control module mfd driver in omap_type
OMAP system control module can be probed early, then omap_type is safe to use its APIs.
TODO: add support for other omap versions
--- arch/arm/mach-omap2/id.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
arch/arm/mach-omap2/id.c +6 -5
@@ -18,6 +18,7 @@#include <linux/kernel.h> #include <linux/init.h> #include <linux/io.h> +#include <linux/mfd/omap_control.h> #include <asm/cputype.h>
@@ -43,15 +44,15 @@ int omap_type(void)u32 val =0 ;if (cpu_is_omap24xx ()) { - val =omap_ctrl_readl (OMAP24XX_CONTROL_STATUS ); + val =omap_control_status_read (); }else if (soc_is_am33xx ()) { - val =omap_ctrl_readl (AM33XX_CONTROL_STATUS ); + val =omap_control_status_read (); }else if (cpu_is_omap34xx ()) { - val =omap_ctrl_readl (OMAP343X_CONTROL_STATUS ); + val =omap_control_status_read (); }else if (cpu_is_omap44xx ()) { - val =omap_ctrl_readl (OMAP4_CTRL_MODULE_CORE_STATUS ); + val =omap_control_status_read (); }else if (soc_is_omap54xx ()) { - val =omap_ctrl_readl (OMAP5XXX_CONTROL_STATUS ); + val =omap_control_status_read (); val &=OMAP5_DEVICETYPE_MASK ; val >>=6 ; goto out;
Signature · 1 line
1.7.7.6
PATCH v4 3/4 OMAP2+: use control module mfd driver in omap_type
Hello.
Quoted 15 lines · Konstantin Baydarov
OMAP system control module can be probed early, then
omap_typeis safe to use its APIs.TODO: add support for other omap versions
Signed-off-by Eduardo Valentin <[email protected]>Signed-off-by Konstantin Baydarov <[email protected]>--- arch/arm/mach-omap2/id.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)arch/arm/mach-omap2/id.c +0
-0
[...]
Quoted 5 lines
arch/arm/mach-omap2/id.c +0
-1@@ -43,15 +44,15 @@ int omap_type(void)u32 val =0 ;if (cpu_is_omap24xx ()) { - val =omap_ctrl_readl (OMAP24XX_CONTROL_STATUS );
arch/arm/mach-omap2/id.c int omap_type(void) · line 53
Quoted 10 lines
arch/arm/mach-omap2/id.c +4
-3+ val =omap_control_status_read (); }else if (soc_is_am33xx ()) { - val =omap_ctrl_readl (AM33XX_CONTROL_STATUS ); + val =omap_control_status_read (); }else if (cpu_is_omap34xx ()) { - val =omap_ctrl_readl (OMAP343X_CONTROL_STATUS ); + val =omap_control_status_read (); }else if (cpu_is_omap44xx ()) { - val =omap_ctrl_readl (OMAP4_CTRL_MODULE_CORE_STATUS ); + val =omap_control_status_read ();
Isn't it better to merge now identical code into one *if*?
WBR, Sergei
PATCH v4 3/4 OMAP2+: use control module mfd driver in omap_type
HI, Sergei.
Quoted 23 lines · Sergei Shtylyov
Hello.
Quoted 15 lines · Konstantin Baydarov
OMAP system control module can be probed early, then
omap_typeis safe to use its APIs.TODO: add support for other omap versions
Signed-off-by Eduardo Valentin <[email protected]>Signed-off-by Konstantin Baydarov <[email protected]>--- arch/arm/mach-omap2/id.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)arch/arm/mach-omap2/id.c +0
-0[...]
Quoted 3 lines
arch/arm/mach-omap2/id.c +0
-0@@ -43,15 +44,15 @@ int omap_type(void)u32 val =0 ;
Quoted 14 lines
arch/arm/mach-omap2/id.c int omap_type(void) · line 53
Quoted 12 lines
arch/arm/mach-omap2/id.c +4
-4if (cpu_is_omap24xx ()) { - val =omap_ctrl_readl (OMAP24XX_CONTROL_STATUS ); + val =omap_control_status_read (); }else if (soc_is_am33xx ()) { - val =omap_ctrl_readl (AM33XX_CONTROL_STATUS ); + val =omap_control_status_read (); }else if (cpu_is_omap34xx ()) { - val =omap_ctrl_readl (OMAP343X_CONTROL_STATUS ); + val =omap_control_status_read (); }else if (cpu_is_omap44xx ()) { - val =omap_ctrl_readl (OMAP4_CTRL_MODULE_CORE_STATUS ); + val =omap_control_status_read ();Isn't it better to merge now identical code into one *if*?
Good point.
Quoted 7 lines
WBR, Sergei
Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html