Re: [PATCH v2 3/3] ARM: OMAP: ocp2scp: create omap device for ocp2scp
On Saturday 27 October 2012 01:46 AM, Tony Lindgren wrote: * Felipe Balbi [121026 13:07]: On Fri, Oct 26, 2012 at 10:21:41AM -0700, Tony Lindgren wrote: * Arnd Bergmann [121026 00:48]: On Friday 26 October 2012, Felipe Balbi wrote: +static void omap_init_ocp2scp(void) +{ + struct omap_hwmod *oh; + struct platform_device *pdev; + int bus_id = -1, dev_cnt = 0, i; + struct omap_ocp2scp_dev *ocp2scp_dev; + const char *oh_name, *name; + struct omap_ocp2scp_platform_data *pdata; + + oh_name = "ocp2scp_usb_phy"; + name= "omap-ocp2scp"; how about adding checks here to return early case we're not running on OMAP4 or OMAP5 ?? I suppose even OMAP4-only, since OMAP5 always has DT enabled. Hmm yes, currently omap_hwmod_lookup(oh_name) produces bogus errors for other omaps as the hwmod data is only there for omap4. shouldn't that be fixed too ? I mean, if data isn't just return -ENODEV or something similar. Yes some kind of checking is needed here. Ok. I'll fix and send. Thanks Kishon -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 3/3] ARM: OMAP: ocp2scp: create omap device for ocp2scp
On Saturday 27 October 2012 01:46 AM, Tony Lindgren wrote: * Felipe Balbi ba...@ti.com [121026 13:07]: On Fri, Oct 26, 2012 at 10:21:41AM -0700, Tony Lindgren wrote: * Arnd Bergmann a...@arndb.de [121026 00:48]: On Friday 26 October 2012, Felipe Balbi wrote: +static void omap_init_ocp2scp(void) +{ + struct omap_hwmod *oh; + struct platform_device *pdev; + int bus_id = -1, dev_cnt = 0, i; + struct omap_ocp2scp_dev *ocp2scp_dev; + const char *oh_name, *name; + struct omap_ocp2scp_platform_data *pdata; + + oh_name = ocp2scp_usb_phy; + name= omap-ocp2scp; how about adding checks here to return early case we're not running on OMAP4 or OMAP5 ?? I suppose even OMAP4-only, since OMAP5 always has DT enabled. Hmm yes, currently omap_hwmod_lookup(oh_name) produces bogus errors for other omaps as the hwmod data is only there for omap4. shouldn't that be fixed too ? I mean, if data isn't just return -ENODEV or something similar. Yes some kind of checking is needed here. Ok. I'll fix and send. Thanks Kishon -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 3/3] ARM: OMAP: ocp2scp: create omap device for ocp2scp
* Felipe Balbi [121026 13:07]: > On Fri, Oct 26, 2012 at 10:21:41AM -0700, Tony Lindgren wrote: > > * Arnd Bergmann [121026 00:48]: > > > On Friday 26 October 2012, Felipe Balbi wrote: > > > > > +static void omap_init_ocp2scp(void) > > > > > +{ > > > > > + struct omap_hwmod *oh; > > > > > + struct platform_device *pdev; > > > > > + int bus_id = -1, dev_cnt = 0, i; > > > > > + struct omap_ocp2scp_dev *ocp2scp_dev; > > > > > + const char *oh_name, *name; > > > > > + struct omap_ocp2scp_platform_data *pdata; > > > > > + > > > > > + oh_name = "ocp2scp_usb_phy"; > > > > > + name= "omap-ocp2scp"; > > > > > > > > how about adding checks here to return early case we're not running on > > > > OMAP4 or OMAP5 ?? > > > > > > > > > > I suppose even OMAP4-only, since OMAP5 always has DT enabled. > > > > Hmm yes, currently omap_hwmod_lookup(oh_name) produces > > bogus errors for other omaps as the hwmod data is only > > there for omap4. > > shouldn't that be fixed too ? I mean, if data isn't just return -ENODEV > or something similar. Yes some kind of checking is needed here. Regards, Tony -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 3/3] ARM: OMAP: ocp2scp: create omap device for ocp2scp
On Fri, Oct 26, 2012 at 10:21:41AM -0700, Tony Lindgren wrote: > * Arnd Bergmann [121026 00:48]: > > On Friday 26 October 2012, Felipe Balbi wrote: > > > > +static void omap_init_ocp2scp(void) > > > > +{ > > > > + struct omap_hwmod *oh; > > > > + struct platform_device *pdev; > > > > + int bus_id = -1, dev_cnt = 0, i; > > > > + struct omap_ocp2scp_dev *ocp2scp_dev; > > > > + const char *oh_name, *name; > > > > + struct omap_ocp2scp_platform_data *pdata; > > > > + > > > > + oh_name = "ocp2scp_usb_phy"; > > > > + name= "omap-ocp2scp"; > > > > > > how about adding checks here to return early case we're not running on > > > OMAP4 or OMAP5 ?? > > > > > > > I suppose even OMAP4-only, since OMAP5 always has DT enabled. > > Hmm yes, currently omap_hwmod_lookup(oh_name) produces > bogus errors for other omaps as the hwmod data is only > there for omap4. shouldn't that be fixed too ? I mean, if data isn't just return -ENODEV or something similar. -- balbi signature.asc Description: Digital signature
Re: [PATCH v2 3/3] ARM: OMAP: ocp2scp: create omap device for ocp2scp
* Arnd Bergmann [121026 00:48]: > On Friday 26 October 2012, Felipe Balbi wrote: > > > +static void omap_init_ocp2scp(void) > > > +{ > > > + struct omap_hwmod *oh; > > > + struct platform_device *pdev; > > > + int bus_id = -1, dev_cnt = 0, i; > > > + struct omap_ocp2scp_dev *ocp2scp_dev; > > > + const char *oh_name, *name; > > > + struct omap_ocp2scp_platform_data *pdata; > > > + > > > + oh_name = "ocp2scp_usb_phy"; > > > + name= "omap-ocp2scp"; > > > > how about adding checks here to return early case we're not running on > > OMAP4 or OMAP5 ?? > > > > I suppose even OMAP4-only, since OMAP5 always has DT enabled. Hmm yes, currently omap_hwmod_lookup(oh_name) produces bogus errors for other omaps as the hwmod data is only there for omap4. Regards, Tony -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 3/3] ARM: OMAP: ocp2scp: create omap device for ocp2scp
On Friday 26 October 2012, Felipe Balbi wrote: > > +static void omap_init_ocp2scp(void) > > +{ > > + struct omap_hwmod *oh; > > + struct platform_device *pdev; > > + int bus_id = -1, dev_cnt = 0, i; > > + struct omap_ocp2scp_dev *ocp2scp_dev; > > + const char *oh_name, *name; > > + struct omap_ocp2scp_platform_data *pdata; > > + > > + oh_name = "ocp2scp_usb_phy"; > > + name= "omap-ocp2scp"; > > how about adding checks here to return early case we're not running on > OMAP4 or OMAP5 ?? > I suppose even OMAP4-only, since OMAP5 always has DT enabled. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 3/3] ARM: OMAP: ocp2scp: create omap device for ocp2scp
Hi, On Mon, Oct 08, 2012 at 11:29:43AM +0530, Kishon Vijay Abraham I wrote: > Platfrom device for ocp2scp is created using omap_device_build in > devices file. This is used for both omap4(musb) and omap5(dwc3). > > Signed-off-by: Kishon Vijay Abraham I > --- > arch/arm/mach-omap2/devices.c | 76 > + > 1 file changed, 76 insertions(+) > > diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c > index c8c2117..ac2bfce 100644 > --- a/arch/arm/mach-omap2/devices.c > +++ b/arch/arm/mach-omap2/devices.c > @@ -19,6 +19,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -613,6 +614,80 @@ static void omap_init_vout(void) > static inline void omap_init_vout(void) {} > #endif > > +#if defined(CONFIG_OMAP_OCP2SCP) || defined(CONFIG_OMAP_OCP2SCP_MODULE) > +static int count_ocp2scp_devices(struct omap_ocp2scp_dev *ocp2scp_dev) > +{ > + int cnt = 0; > + > + while (ocp2scp_dev->drv_name != NULL) { > + cnt++; > + ocp2scp_dev++; > + } > + > + return cnt; > +} > + > +static void omap_init_ocp2scp(void) > +{ > + struct omap_hwmod *oh; > + struct platform_device *pdev; > + int bus_id = -1, dev_cnt = 0, i; > + struct omap_ocp2scp_dev *ocp2scp_dev; > + const char *oh_name, *name; > + struct omap_ocp2scp_platform_data *pdata; > + > + oh_name = "ocp2scp_usb_phy"; > + name= "omap-ocp2scp"; how about adding checks here to return early case we're not running on OMAP4 or OMAP5 ?? -- balbi signature.asc Description: Digital signature
Re: [PATCH v2 3/3] ARM: OMAP: ocp2scp: create omap device for ocp2scp
Hi, On Mon, Oct 08, 2012 at 11:29:43AM +0530, Kishon Vijay Abraham I wrote: Platfrom device for ocp2scp is created using omap_device_build in devices file. This is used for both omap4(musb) and omap5(dwc3). Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- arch/arm/mach-omap2/devices.c | 76 + 1 file changed, 76 insertions(+) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index c8c2117..ac2bfce 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -19,6 +19,7 @@ #include linux/of.h #include linux/pinctrl/machine.h #include linux/platform_data/omap4-keypad.h +#include linux/platform_data/omap_ocp2scp.h #include asm/mach-types.h #include asm/mach/map.h @@ -613,6 +614,80 @@ static void omap_init_vout(void) static inline void omap_init_vout(void) {} #endif +#if defined(CONFIG_OMAP_OCP2SCP) || defined(CONFIG_OMAP_OCP2SCP_MODULE) +static int count_ocp2scp_devices(struct omap_ocp2scp_dev *ocp2scp_dev) +{ + int cnt = 0; + + while (ocp2scp_dev-drv_name != NULL) { + cnt++; + ocp2scp_dev++; + } + + return cnt; +} + +static void omap_init_ocp2scp(void) +{ + struct omap_hwmod *oh; + struct platform_device *pdev; + int bus_id = -1, dev_cnt = 0, i; + struct omap_ocp2scp_dev *ocp2scp_dev; + const char *oh_name, *name; + struct omap_ocp2scp_platform_data *pdata; + + oh_name = ocp2scp_usb_phy; + name= omap-ocp2scp; how about adding checks here to return early case we're not running on OMAP4 or OMAP5 ?? -- balbi signature.asc Description: Digital signature
Re: [PATCH v2 3/3] ARM: OMAP: ocp2scp: create omap device for ocp2scp
On Friday 26 October 2012, Felipe Balbi wrote: +static void omap_init_ocp2scp(void) +{ + struct omap_hwmod *oh; + struct platform_device *pdev; + int bus_id = -1, dev_cnt = 0, i; + struct omap_ocp2scp_dev *ocp2scp_dev; + const char *oh_name, *name; + struct omap_ocp2scp_platform_data *pdata; + + oh_name = ocp2scp_usb_phy; + name= omap-ocp2scp; how about adding checks here to return early case we're not running on OMAP4 or OMAP5 ?? I suppose even OMAP4-only, since OMAP5 always has DT enabled. Arnd -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 3/3] ARM: OMAP: ocp2scp: create omap device for ocp2scp
* Arnd Bergmann a...@arndb.de [121026 00:48]: On Friday 26 October 2012, Felipe Balbi wrote: +static void omap_init_ocp2scp(void) +{ + struct omap_hwmod *oh; + struct platform_device *pdev; + int bus_id = -1, dev_cnt = 0, i; + struct omap_ocp2scp_dev *ocp2scp_dev; + const char *oh_name, *name; + struct omap_ocp2scp_platform_data *pdata; + + oh_name = ocp2scp_usb_phy; + name= omap-ocp2scp; how about adding checks here to return early case we're not running on OMAP4 or OMAP5 ?? I suppose even OMAP4-only, since OMAP5 always has DT enabled. Hmm yes, currently omap_hwmod_lookup(oh_name) produces bogus errors for other omaps as the hwmod data is only there for omap4. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 3/3] ARM: OMAP: ocp2scp: create omap device for ocp2scp
On Fri, Oct 26, 2012 at 10:21:41AM -0700, Tony Lindgren wrote: * Arnd Bergmann a...@arndb.de [121026 00:48]: On Friday 26 October 2012, Felipe Balbi wrote: +static void omap_init_ocp2scp(void) +{ + struct omap_hwmod *oh; + struct platform_device *pdev; + int bus_id = -1, dev_cnt = 0, i; + struct omap_ocp2scp_dev *ocp2scp_dev; + const char *oh_name, *name; + struct omap_ocp2scp_platform_data *pdata; + + oh_name = ocp2scp_usb_phy; + name= omap-ocp2scp; how about adding checks here to return early case we're not running on OMAP4 or OMAP5 ?? I suppose even OMAP4-only, since OMAP5 always has DT enabled. Hmm yes, currently omap_hwmod_lookup(oh_name) produces bogus errors for other omaps as the hwmod data is only there for omap4. shouldn't that be fixed too ? I mean, if data isn't just return -ENODEV or something similar. -- balbi signature.asc Description: Digital signature
Re: [PATCH v2 3/3] ARM: OMAP: ocp2scp: create omap device for ocp2scp
* Felipe Balbi ba...@ti.com [121026 13:07]: On Fri, Oct 26, 2012 at 10:21:41AM -0700, Tony Lindgren wrote: * Arnd Bergmann a...@arndb.de [121026 00:48]: On Friday 26 October 2012, Felipe Balbi wrote: +static void omap_init_ocp2scp(void) +{ + struct omap_hwmod *oh; + struct platform_device *pdev; + int bus_id = -1, dev_cnt = 0, i; + struct omap_ocp2scp_dev *ocp2scp_dev; + const char *oh_name, *name; + struct omap_ocp2scp_platform_data *pdata; + + oh_name = ocp2scp_usb_phy; + name= omap-ocp2scp; how about adding checks here to return early case we're not running on OMAP4 or OMAP5 ?? I suppose even OMAP4-only, since OMAP5 always has DT enabled. Hmm yes, currently omap_hwmod_lookup(oh_name) produces bogus errors for other omaps as the hwmod data is only there for omap4. shouldn't that be fixed too ? I mean, if data isn't just return -ENODEV or something similar. Yes some kind of checking is needed here. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/