All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] OMAP3:Re-introduce omap_type()
@ 2009-06-12 20:58 Ulrik Bech Hald
  2009-06-12 22:12 ` Kevin Hilman
  0 siblings, 1 reply; 3+ messages in thread
From: Ulrik Bech Hald @ 2009-06-12 20:58 UTC (permalink / raw)
  To: linux-omap; +Cc: 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 <ubh@ti.com>
---
 arch/arm/mach-omap2/id.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 arch/arm/mach-omap2/id.c

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
old mode 100644
new mode 100755
index 458990e..9fa61b4
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -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
-- 
1.5.4.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] OMAP3:Re-introduce omap_type()
  2009-06-12 20:58 [PATCH 1/1] OMAP3:Re-introduce omap_type() Ulrik Bech Hald
@ 2009-06-12 22:12 ` Kevin Hilman
  2009-06-15 13:04   ` Hald, Ulrik Bech
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Hilman @ 2009-06-12 22:12 UTC (permalink / raw)
  To: Ulrik Bech Hald; +Cc: linux-omap

Ulrik Bech Hald <ubh@ti.com> writes:

> The functionality of omap_type() is needed for eg. watchdog
> device registration to distinguish different device types.
>
> Signed-off-by: Ulrik Bech Hald <ubh@ti.com>

Collision. :) I have an add-back of this in my fixes queue which I
just posted as well.

Kevin

> ---
>  arch/arm/mach-omap2/id.c |   21 +++++++++++++++++++++
>  1 files changed, 21 insertions(+), 0 deletions(-)
>  mode change 100644 => 100755 arch/arm/mach-omap2/id.c
>
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> old mode 100644
> new mode 100755
> index 458990e..9fa61b4
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -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
> -- 
> 1.5.4.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH 1/1] OMAP3:Re-introduce omap_type()
  2009-06-12 22:12 ` Kevin Hilman
@ 2009-06-15 13:04   ` Hald, Ulrik Bech
  0 siblings, 0 replies; 3+ messages in thread
From: Hald, Ulrik Bech @ 2009-06-15 13:04 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-omap

> -----Original Message-----
> From: Kevin Hilman [mailto:khilman@deeprootsystems.com]
> Sent: Friday, June 12, 2009 5:13 PM
> To: Hald, Ulrik Bech
> Cc: linux-omap@vger.kernel.org
> Subject: Re: [PATCH 1/1] OMAP3:Re-introduce omap_type()
> 
> Ulrik Bech Hald <ubh@ti.com> writes:
> 
> > The functionality of omap_type() is needed for eg. watchdog
> > device registration to distinguish different device types.
> >
> > Signed-off-by: Ulrik Bech Hald <ubh@ti.com>
> 
> 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

> Kevin
> 
> > ---
> >  arch/arm/mach-omap2/id.c |   21 +++++++++++++++++++++
> >  1 files changed, 21 insertions(+), 0 deletions(-)
> >  mode change 100644 => 100755 arch/arm/mach-omap2/id.c
> >
> > diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> > old mode 100644
> > new mode 100755
> > index 458990e..9fa61b4
> > --- a/arch/arm/mach-omap2/id.c
> > +++ b/arch/arm/mach-omap2/id.c
> > @@ -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
> > --
> > 1.5.4.3
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-15 13:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-12 20:58 [PATCH 1/1] OMAP3:Re-introduce omap_type() Ulrik Bech Hald
2009-06-12 22:12 ` Kevin Hilman
2009-06-15 13:04   ` Hald, Ulrik Bech

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.