All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4] OMAP3: Registering sgx device and it's platform data
@ 2010-05-13  5:06 Manjunatha GK
  2010-05-13 15:32 ` Nishanth Menon
  2010-05-14 16:40 ` Kevin Hilman
  0 siblings, 2 replies; 5+ messages in thread
From: Manjunatha GK @ 2010-05-13  5:06 UTC (permalink / raw)
  To: linux-omap
  Cc: Preshit Agarwal, Tony Lindgren, Kevin Hilman, Mike Turquette,
	Hemanth V

The SGX powervr_device is registered with it's platform specific
data to provide information about setting constraint through
omap_pm_set_min_bus_tput.

Signed-off-by: Preshit Agarwal <preshit.agarwal@ti.com>
Signed-off-by: Manjunatha GK <manjugk@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Mike Turquette <mturquette@ti.com>
Cc: Hemanth V <hemanthv@ti.com>
---
 arch/arm/mach-omap2/devices.c                  |   21 +++++++++++++++++++--
 arch/arm/mach-omap2/include/mach/omap_sgxdef.h |   11 +++++++++++
 2 files changed, 30 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/mach-omap2/include/mach/omap_sgxdef.h

diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 2271b9b..6349ee5 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -26,7 +26,7 @@
 #include <plat/mux.h>
 #include <mach/gpio.h>
 #include <plat/mmc.h>
-
+#include <mach/omap_sgxdef.h>
 #include "mux.h"
 
 #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
@@ -786,6 +786,23 @@ static inline void omap_hdq_init(void)
 static inline void omap_hdq_init(void) {}
 #endif
 
+struct sgx_platform_data omap_sgx_data = {
+	.set_min_bus_tput = NULL,
+};
+
+static struct platform_device powervr_device = {
+	.name            = "pvrsrvkm",
+	.id              = -1,
+	.dev            = {
+	.platform_data = &omap_sgx_data,
+       }
+};
+
+static void omap_init_sgx(void)
+{
+       (void) platform_device_register(&powervr_device);
+}
+
 /*-------------------------------------------------------------------------*/
 
 static int __init omap2_init_devices(void)
@@ -800,7 +817,7 @@ static int __init omap2_init_devices(void)
 	omap_hdq_init();
 	omap_init_sti();
 	omap_init_sha1_md5();
-
+	omap_init_sgx();
 	return 0;
 }
 arch_initcall(omap2_init_devices);
diff --git a/arch/arm/mach-omap2/include/mach/omap_sgxdef.h b/arch/arm/mach-omap2/include/mach/omap_sgxdef.h
new file mode 100644
index 0000000..e03ad8b
--- /dev/null
+++ b/arch/arm/mach-omap2/include/mach/omap_sgxdef.h
@@ -0,0 +1,11 @@
+#ifndef OMAP_SGXDEF_H
+#define OMAP_SGXDEF_H
+
+#include <plat/omap-pm.h>
+
+struct sgx_platform_data {
+	void (*set_min_bus_tput)(struct device *dev, u8 agent_id,
+				unsigned long r);
+};
+
+#endif
-- 
1.7.0.4


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

* Re: [PATCH v4] OMAP3: Registering sgx device and it's platform data
  2010-05-13  5:06 [PATCH v4] OMAP3: Registering sgx device and it's platform data Manjunatha GK
@ 2010-05-13 15:32 ` Nishanth Menon
  2010-05-20 14:02   ` G, Manjunath Kondaiah
  2010-05-14 16:40 ` Kevin Hilman
  1 sibling, 1 reply; 5+ messages in thread
From: Nishanth Menon @ 2010-05-13 15:32 UTC (permalink / raw)
  To: G, Manjunath Kondaiah
  Cc: linux-omap@vger.kernel.org, Agarwal, Preshit, Tony Lindgren,
	Kevin Hilman, Turquette, Mike, V, Hemanth

G, Manjunath Kondaiah had written, on 05/13/2010 12:06 AM, the following:
> The SGX powervr_device is registered with it's platform specific
> data to provide information about setting constraint through
> omap_pm_set_min_bus_tput.
> 
> Signed-off-by: Preshit Agarwal <preshit.agarwal@ti.com>
> Signed-off-by: Manjunatha GK <manjugk@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Mike Turquette <mturquette@ti.com>
> Cc: Hemanth V <hemanthv@ti.com>
> ---
>  arch/arm/mach-omap2/devices.c                  |   21 +++++++++++++++++++--
>  arch/arm/mach-omap2/include/mach/omap_sgxdef.h |   11 +++++++++++
>  2 files changed, 30 insertions(+), 2 deletions(-)
>  create mode 100644 arch/arm/mach-omap2/include/mach/omap_sgxdef.h
> 
> diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
> index 2271b9b..6349ee5 100644
> --- a/arch/arm/mach-omap2/devices.c
> +++ b/arch/arm/mach-omap2/devices.c
> @@ -26,7 +26,7 @@
>  #include <plat/mux.h>
>  #include <mach/gpio.h>
>  #include <plat/mmc.h>
> -
> +#include <mach/omap_sgxdef.h>
>  #include "mux.h"
>  
>  #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
> @@ -786,6 +786,23 @@ static inline void omap_hdq_init(void)
>  static inline void omap_hdq_init(void) {}
>  #endif
>  
> +struct sgx_platform_data omap_sgx_data = {
> +	.set_min_bus_tput = NULL,
> +};
> +
> +static struct platform_device powervr_device = {
> +	.name            = "pvrsrvkm",
> +	.id              = -1,
> +	.dev            = {
> +	.platform_data = &omap_sgx_data,
> +       }
> +};
> +
> +static void omap_init_sgx(void)
> +{
> +       (void) platform_device_register(&powervr_device);
> +}
> +
>  /*-------------------------------------------------------------------------*/
>  
>  static int __init omap2_init_devices(void)
> @@ -800,7 +817,7 @@ static int __init omap2_init_devices(void)
>  	omap_hdq_init();
>  	omap_init_sti();
>  	omap_init_sha1_md5();
> -
> +	omap_init_sgx();
should'nt we depend on has_sgx_feature?
>  	return 0;
>  }
>  arch_initcall(omap2_init_devices);
> diff --git a/arch/arm/mach-omap2/include/mach/omap_sgxdef.h b/arch/arm/mach-omap2/include/mach/omap_sgxdef.h
> new file mode 100644
> index 0000000..e03ad8b
> --- /dev/null
> +++ b/arch/arm/mach-omap2/include/mach/omap_sgxdef.h
> @@ -0,0 +1,11 @@
> +#ifndef OMAP_SGXDEF_H
> +#define OMAP_SGXDEF_H
> +
> +#include <plat/omap-pm.h>
> +
> +struct sgx_platform_data {
> +	void (*set_min_bus_tput)(struct device *dev, u8 agent_id,
> +				unsigned long r);
> +};
> +
> +#endif


-- 
Regards,
Nishanth Menon

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

* Re: [PATCH v4] OMAP3: Registering sgx device and it's platform data
  2010-05-13  5:06 [PATCH v4] OMAP3: Registering sgx device and it's platform data Manjunatha GK
  2010-05-13 15:32 ` Nishanth Menon
@ 2010-05-14 16:40 ` Kevin Hilman
  2010-05-20 14:20   ` G, Manjunath Kondaiah
  1 sibling, 1 reply; 5+ messages in thread
From: Kevin Hilman @ 2010-05-14 16:40 UTC (permalink / raw)
  To: Manjunatha GK
  Cc: linux-omap, Preshit Agarwal, Tony Lindgren, Mike Turquette,
	Hemanth V

Manjunatha GK <manjugk@ti.com> writes:

> The SGX powervr_device is registered with it's platform specific
> data to provide information about setting constraint through
> omap_pm_set_min_bus_tput.

Now the patch content doesn't match the description as you no
longer call omap_pm_set_min_bus_tput()...

> Signed-off-by: Preshit Agarwal <preshit.agarwal@ti.com>
> Signed-off-by: Manjunatha GK <manjugk@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Mike Turquette <mturquette@ti.com>
> Cc: Hemanth V <hemanthv@ti.com>
> ---
>  arch/arm/mach-omap2/devices.c                  |   21 +++++++++++++++++++--
>  arch/arm/mach-omap2/include/mach/omap_sgxdef.h |   11 +++++++++++
>  2 files changed, 30 insertions(+), 2 deletions(-)
>  create mode 100644 arch/arm/mach-omap2/include/mach/omap_sgxdef.h
>
> diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
> index 2271b9b..6349ee5 100644
> --- a/arch/arm/mach-omap2/devices.c
> +++ b/arch/arm/mach-omap2/devices.c
> @@ -26,7 +26,7 @@
>  #include <plat/mux.h>
>  #include <mach/gpio.h>
>  #include <plat/mmc.h>
> -
> +#include <mach/omap_sgxdef.h>
>  #include "mux.h"
>  
>  #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
> @@ -786,6 +786,23 @@ static inline void omap_hdq_init(void)
>  static inline void omap_hdq_init(void) {}
>  #endif
>  
> +struct sgx_platform_data omap_sgx_data = {
> +	.set_min_bus_tput = NULL,
> +};

When I suggested you remove the #ifdef CONFIG_PM, I was expecting
you to leave the omap_pm_set_min_bus_tput() part.

The point was that the driver itself should choose whether or not to call
pdata->set_min_bus_tput() using #ifdef or other runtime decisions.

Kevin

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

* RE: [PATCH v4] OMAP3: Registering sgx device and it's platform data
  2010-05-13 15:32 ` Nishanth Menon
@ 2010-05-20 14:02   ` G, Manjunath Kondaiah
  0 siblings, 0 replies; 5+ messages in thread
From: G, Manjunath Kondaiah @ 2010-05-20 14:02 UTC (permalink / raw)
  To: Menon, Nishanth
  Cc: linux-omap@vger.kernel.org, Agarwal, Preshit, Tony Lindgren,
	Kevin Hilman, Turquette, Mike, V, Hemanth

 

> -----Original Message-----
> From: Menon, Nishanth 
> Sent: Thursday, May 13, 2010 9:02 PM
> To: G, Manjunath Kondaiah
> Cc: linux-omap@vger.kernel.org; Agarwal, Preshit; Tony 
> Lindgren; Kevin Hilman; Turquette, Mike; V, Hemanth
> Subject: Re: [PATCH v4] OMAP3: Registering sgx device and 
> it's platform data
> 
> G, Manjunath Kondaiah had written, on 05/13/2010 12:06 AM, 
> the following:
> > The SGX powervr_device is registered with it's platform specific
> > data to provide information about setting constraint through
> > omap_pm_set_min_bus_tput.
> > 
> > Signed-off-by: Preshit Agarwal <preshit.agarwal@ti.com>
> > Signed-off-by: Manjunatha GK <manjugk@ti.com>
> > Cc: Tony Lindgren <tony@atomide.com>
> > Cc: Kevin Hilman <khilman@deeprootsystems.com>
> > Cc: Mike Turquette <mturquette@ti.com>
> > Cc: Hemanth V <hemanthv@ti.com>
> > ---
> >  arch/arm/mach-omap2/devices.c                  |   21 
> +++++++++++++++++++--
> >  arch/arm/mach-omap2/include/mach/omap_sgxdef.h |   11 +++++++++++
> >  2 files changed, 30 insertions(+), 2 deletions(-)
> >  create mode 100644 arch/arm/mach-omap2/include/mach/omap_sgxdef.h
> > 
> > diff --git a/arch/arm/mach-omap2/devices.c 
> b/arch/arm/mach-omap2/devices.c
> > index 2271b9b..6349ee5 100644
> > --- a/arch/arm/mach-omap2/devices.c
> > +++ b/arch/arm/mach-omap2/devices.c
> > @@ -26,7 +26,7 @@
> >  #include <plat/mux.h>
> >  #include <mach/gpio.h>
> >  #include <plat/mmc.h>
> > -
> > +#include <mach/omap_sgxdef.h>
> >  #include "mux.h"
> >  
> >  #if defined(CONFIG_VIDEO_OMAP2) || 
> defined(CONFIG_VIDEO_OMAP2_MODULE)
> > @@ -786,6 +786,23 @@ static inline void omap_hdq_init(void)
> >  static inline void omap_hdq_init(void) {}
> >  #endif
> >  
> > +struct sgx_platform_data omap_sgx_data = {
> > +	.set_min_bus_tput = NULL,
> > +};
> > +
> > +static struct platform_device powervr_device = {
> > +	.name            = "pvrsrvkm",
> > +	.id              = -1,
> > +	.dev            = {
> > +	.platform_data = &omap_sgx_data,
> > +       }
> > +};
> > +
> > +static void omap_init_sgx(void)
> > +{
> > +       (void) platform_device_register(&powervr_device);
> > +}
> > +
> >  
> /*------------------------------------------------------------
> -------------*/
> >  
> >  static int __init omap2_init_devices(void)
> > @@ -800,7 +817,7 @@ static int __init omap2_init_devices(void)
> >  	omap_hdq_init();
> >  	omap_init_sti();
> >  	omap_init_sha1_md5();
> > -
> > +	omap_init_sgx();
> should'nt we depend on has_sgx_feature?

I will change it to: "if (omap3_has_sgx) omap_init_sgx();"

-Manjunath

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

* RE: [PATCH v4] OMAP3: Registering sgx device and it's platform data
  2010-05-14 16:40 ` Kevin Hilman
@ 2010-05-20 14:20   ` G, Manjunath Kondaiah
  0 siblings, 0 replies; 5+ messages in thread
From: G, Manjunath Kondaiah @ 2010-05-20 14:20 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: linux-omap@vger.kernel.org, Agarwal, Preshit, Tony Lindgren,
	Turquette, Mike, V, Hemanth



> -----Original Message-----
> From: Kevin Hilman [mailto:khilman@deeprootsystems.com] 
> Sent: Friday, May 14, 2010 10:10 PM
> To: G, Manjunath Kondaiah
> Cc: linux-omap@vger.kernel.org; Agarwal, Preshit; Tony 
> Lindgren; Turquette, Mike; V, Hemanth
> Subject: Re: [PATCH v4] OMAP3: Registering sgx device and 
> it's platform data
> 
> Manjunatha GK <manjugk@ti.com> writes:
> 
> > The SGX powervr_device is registered with it's platform specific
> > data to provide information about setting constraint through
> > omap_pm_set_min_bus_tput.
> 
> Now the patch content doesn't match the description as you no
> longer call omap_pm_set_min_bus_tput()...
> 
> > Signed-off-by: Preshit Agarwal <preshit.agarwal@ti.com>
> > Signed-off-by: Manjunatha GK <manjugk@ti.com>
> > Cc: Tony Lindgren <tony@atomide.com>
> > Cc: Kevin Hilman <khilman@deeprootsystems.com>
> > Cc: Mike Turquette <mturquette@ti.com>
> > Cc: Hemanth V <hemanthv@ti.com>
> > ---
> >  arch/arm/mach-omap2/devices.c                  |   21 
> +++++++++++++++++++--
> >  arch/arm/mach-omap2/include/mach/omap_sgxdef.h |   11 +++++++++++
> >  2 files changed, 30 insertions(+), 2 deletions(-)
> >  create mode 100644 arch/arm/mach-omap2/include/mach/omap_sgxdef.h
> >
> > diff --git a/arch/arm/mach-omap2/devices.c 
> b/arch/arm/mach-omap2/devices.c
> > index 2271b9b..6349ee5 100644
> > --- a/arch/arm/mach-omap2/devices.c
> > +++ b/arch/arm/mach-omap2/devices.c
> > @@ -26,7 +26,7 @@
> >  #include <plat/mux.h>
> >  #include <mach/gpio.h>
> >  #include <plat/mmc.h>
> > -
> > +#include <mach/omap_sgxdef.h>
> >  #include "mux.h"
> >  
> >  #if defined(CONFIG_VIDEO_OMAP2) || 
> defined(CONFIG_VIDEO_OMAP2_MODULE)
> > @@ -786,6 +786,23 @@ static inline void omap_hdq_init(void)
> >  static inline void omap_hdq_init(void) {}
> >  #endif
> >  
> > +struct sgx_platform_data omap_sgx_data = {
> > +	.set_min_bus_tput = NULL,
> > +};
> 
> When I suggested you remove the #ifdef CONFIG_PM, I was expecting
> you to leave the omap_pm_set_min_bus_tput() part.
> 
> The point was that the driver itself should choose whether or 
> not to call
> pdata->set_min_bus_tput() using #ifdef or other runtime decisions.

I agree with your point. I will have only:
.set_min_bus_tput = omap_pm_set_min_bus_tput,

Let driver decide calling this using #ifdef or other runtime decisions.

-Manjunath

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

end of thread, other threads:[~2010-05-20 14:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-13  5:06 [PATCH v4] OMAP3: Registering sgx device and it's platform data Manjunatha GK
2010-05-13 15:32 ` Nishanth Menon
2010-05-20 14:02   ` G, Manjunath Kondaiah
2010-05-14 16:40 ` Kevin Hilman
2010-05-20 14:20   ` G, Manjunath Kondaiah

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.