OMAP3: Registering sgx device and it's platform data
Subsystems (3)
PATCH v4 1/1 OMAP3: Registering sgx device and it's platform data
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.
--- 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
arch/arm/mach-omap2/devices.c +19 -2
@@ -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);
arch/arm/mach-omap2/include/mach/omap_sgxdef.h new file +11 -0
@@ -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
Signature · 1 line
1.7.0.4
G, Manjunath Kondaiah had written, on 05/13/2010 12:06 AM, the following:
Quoted 54 lines
The SGX
powervr_deviceis registered with it's platform specific data to provide information about setting constraint throughomap_pm_set_min_bus_tput.Signed-off-by Preshit Agarwal <[email protected]>Signed-off-by Manjunatha GK <[email protected]>Cc Tony Lindgren <[email protected]>Cc Kevin Hilman <[email protected]>Cc Mike Turquette <[email protected]>Cc Hemanth V <[email protected]>--- 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.harch/arm/mach-omap2/devices.c +18
-1@@ -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 )
arch/arm/mach-omap2/devices.c static int __init omap2_init_devices(void) · line 820
Quoted 5 lines
arch/arm/mach-omap2/devices.c +1
-1@@ -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?
Quoted 20 lines
arch/arm/mach-omap2/devices.c +0
-0return 0 ; }arch_initcall (omap2_init_devices);arch/arm/mach-omap2/include/mach/omap_sgxdef.h new file +11
-0@@ -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
Signature · 2 lines
Regards, Nishanth Menon
Quoted 70 lines
-----Original Message-----
From: Menon, Nishanth
Sent: Thursday, May 13, 2010 9:02 PM
To: G, Manjunath Kondaiah
Cc: [email protected]; Agarwal, Preshit; Tony Lindgren; Kevin Hilman; Turquette, Mike; V, Hemanth
Subject: Re: [PATCH v4] OMAP3: Registering sgx device and it's platform dataG, Manjunath Kondaiah had written, on 05/13/2010 12:06 AM, the following:
Quoted 4 lines
The SGX
powervr_deviceis registered with it's platform specific data to provide information about setting constraint throughomap_pm_set_min_bus_tput.Quoted 8 lines
Signed-off-by Preshit Agarwal <[email protected]>Signed-off-by Manjunatha GK <[email protected]>Cc Tony Lindgren <[email protected]>Cc Kevin Hilman <[email protected]>Cc Mike Turquette <[email protected]>Cc Hemanth V <[email protected]>--- arch/arm/mach-omap2/devices.c | 21+++++++++++++++++++--
Review
Quoted 5 lines
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(quoted diff) +0
-0
b/arch/arm/mach-omap2/devices.carch/arm/mach-omap2/devices.c line 32
Quoted 12 lines
index 2271b9b..6349ee5 100644
arch/arm/mach-omap2/devices.c +1
-1@@ -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)Quoted 12 lines
arch/arm/mach-omap2/devices.c +8
-0@@ -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 = {arch/arm/mach-omap2/devices.c static inline void omap_hdq_init(void) · line 806
Quoted 10 lines
arch/arm/mach-omap2/devices.c +9
-0+ .platform_data = &omap_sgx_data, + } +}; + +static void omap_init_sgx (void ) +{ + (void )platform_device_register (&powervr_device); +} +/*------------------------------------------------------------ -------------*/
Quoted 1 line
Quoted 8 lines
arch/arm/mach-omap2/devices.c static int __init omap2_init_devices(void) · line 820
Quoted 7 lines
static int
__initomap2_init_devices(void)arch/arm/mach-omap2/devices.c +1
-1@@ -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
Quoted 3 lines · Manjunatha GK
The SGX
powervr_deviceis registered with it's platform specific data to provide information about setting constraint throughomap_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()...
Quoted 26 lines
Signed-off-by Preshit Agarwal <[email protected]>Signed-off-by Manjunatha GK <[email protected]>Cc Tony Lindgren <[email protected]>Cc Kevin Hilman <[email protected]>Cc Mike Turquette <[email protected]>Cc Hemanth V <[email protected]>--- 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.harch/arm/mach-omap2/devices.c +1
-1@@ -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 )
arch/arm/mach-omap2/devices.c static inline void omap_hdq_init(void) · line 791
Quoted 6 lines
arch/arm/mach-omap2/devices.c +3
-0@@ -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
Quoted 59 lines
-----Original Message-----
From: Kevin Hilman [mailto:[email protected]]
Sent: Friday, May 14, 2010 10:10 PM
To: G, Manjunath Kondaiah
Cc: [email protected]; Agarwal, Preshit; Tony Lindgren; Turquette, Mike; V, Hemanth
Subject: Re: [PATCH v4] OMAP3: Registering sgx device and it's platform dataQuoted 3 lines · Manjunatha GK
The SGX
powervr_deviceis registered with it's platform specific data to provide information about setting constraint throughomap_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()...Quoted 8 lines
Signed-off-by Preshit Agarwal <[email protected]>Signed-off-by Manjunatha GK <[email protected]>Cc Tony Lindgren <[email protected]>Cc Kevin Hilman <[email protected]>Cc Mike Turquette <[email protected]>Cc Hemanth V <[email protected]>--- arch/arm/mach-omap2/devices.c | 21+++++++++++++++++++--
Review
Quoted 5 lines
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(quoted diff) +0
-0
b/arch/arm/mach-omap2/devices.carch/arm/mach-omap2/devices.c line 32
Quoted 12 lines
index 2271b9b..6349ee5 100644
arch/arm/mach-omap2/devices.c +1
-1@@ -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)arch/arm/mach-omap2/devices.c static inline void omap_hdq_init(void) · line 791
Quoted 7 lines
arch/arm/mach-omap2/devices.c +3
-0@@ -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 theomap_pm_set_min_bus_tput()part.
Quoted 3 lines
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