OMAP3:Re-introduce omap_type()
Subsystems (3)
PATCH 1/1 OMAP3:Re-introduce omap_type()
The functionality of omap_type() is needed for eg. watchdog device registration to distinguish different device types.
--- arch/arm/mach-omap2/id.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) mode change 100644 => 100755 arch/arm/mach-omap2/id.c
arch/arm/mach-omap2/id.c +21 -0
@@ -48,6 +48,27 @@ int omap_chip_is(struct omap_chip_id oci) }EXPORT_SYMBOL (omap_chip_is); +int omap_type (void ) +{ +u32 val =0 ; + +if (cpu_is_omap24xx ()) { + val =omap_ctrl_readl (OMAP24XX_CONTROL_STATUS ); + }else if (cpu_is_omap34xx ()) { + val =omap_ctrl_readl (OMAP343X_CONTROL_STATUS ); + }else { +pr_err ("Cannot detect omap type!\n" ); + goto out; + } + + val &=OMAP2_DEVICETYPE_MASK ; + val >>=8 ; + +out: +return val; +} +EXPORT_SYMBOL (omap_type); +/*----------------------------------------------------------------------------*/ #define OMAP_TAP_IDCODE 0x0204
Signature · 1 line
1.5.4.3
Quoted 4 lines · Ulrik Bech Hald
The functionality of
omap_type()is needed for eg. watchdog device registration to distinguish different device types.Signed-off-by Ulrik Bech Hald <[email protected]>
Collision. :) I have an add-back of this in my fixes queue which I just posted as well.
Kevin
Quoted 46 lines
--- arch/arm/mach-omap2/id.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) mode change 100644 => 100755 arch/arm/mach-omap2/id.carch/arm/mach-omap2/id.c +21
-0@@ -48,6 +48,27 @@ int omap_chip_is(struct omap_chip_id oci) }EXPORT_SYMBOL (omap_chip_is); +int omap_type (void ) +{ +u32 val =0 ; + +if (cpu_is_omap24xx ()) { + val =omap_ctrl_readl (OMAP24XX_CONTROL_STATUS ); + }else if (cpu_is_omap34xx ()) { + val =omap_ctrl_readl (OMAP343X_CONTROL_STATUS ); + }else { +pr_err ("Cannot detect omap type!\n" ); + goto out; + } + + val &=OMAP2_DEVICETYPE_MASK ; + val >>=8 ; + +out: +return val; +} +EXPORT_SYMBOL (omap_type); +/*----------------------------------------------------------------------------*/ #define OMAP_TAP_IDCODE 0x0204Signature · 6 lines
1.5.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 9 lines
-----Original Message-----
From: Kevin Hilman [mailto:[email protected]]
Sent: Friday, June 12, 2009 5:13 PM
To: Hald, Ulrik Bech
Cc: [email protected]
Subject: Re: [PATCH 1/1] OMAP3:Re-introduceomap_type()Ulrik Bech Hald <[email protected]> writes:
Quoted 8 lines
Quoted 4 lines
The functionality of
omap_type()is needed for eg. watchdog device registration to distinguish different device types.Signed-off-by Ulrik Bech Hald <[email protected]>Collision. :) I have an add-back of this in my fixes queue which I just posted as well.
Ok, well, as long as we get it back in there :)
/Ulrik
Quoted 49 lines
Kevin
Quoted 27 lines
--- arch/arm/mach-omap2/id.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) mode change 100644 => 100755 arch/arm/mach-omap2/id.carch/arm/mach-omap2/id.c +12
-0@@ -48,6 +48,27 @@ int omap_chip_is(struct omap_chip_id oci) }EXPORT_SYMBOL (omap_chip_is); +int omap_type (void ) +{ +u32 val =0 ; + +if (cpu_is_omap24xx ()) { + val =omap_ctrl_readl (OMAP24XX_CONTROL_STATUS ); + }else if (cpu_is_omap34xx ()) { + val =omap_ctrl_readl (OMAP343X_CONTROL_STATUS ); + }else { +pr_err ("Cannot detect omap type!\n" ); + goto out; + }arch/arm/mach-omap2/id.c int omap_chip_is(struct omap_chip_id oci) · line 72
Quoted 10 lines
arch/arm/mach-omap2/id.c +9
-0+ + val &=OMAP2_DEVICETYPE_MASK ; + val >>=8 ; + +out: +return val; +} +EXPORT_SYMBOL (omap_type); +/*--------------------------------------------------------------------- -------*/
Quoted 9 lines
arch/arm/mach-omap2/id.c +0
-1#define OMAP_TAP_IDCODE 0x0204 --1.5.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html