ARM: OMAP1: fix omap_udc registration
Subsystems (4)
Aaro Koskinen
maintainerPATCH RESEND v2 1/1 ARM: OMAP1: fix omap_udc registration
omap_udc platform device is not registered properly anymore:CONFIG_USB_GADGET_OMAP was deleted by 193ab2a6 (usb: gadget: allow multiple gadgets to be built) already in v3.1.
Fix by using CONFIG_USB_OMAP instead. Tested on Nokia 770 by checking that omap_udc is probed & working properly when built as a module.
---
Patch history: v2: http://marc.info/?t=136266319800006&r=1&w=2 - use IS_ENABLED() v1: http://marc.info/?t=136260886600006&r=1&w=2
arch/arm/mach-omap1/include/mach/usb.h | 2 +- arch/arm/mach-omap1/usb.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-omap1/include/mach/usb.h +1 -1
@@ -2,7 +2,7 @@* FIXME correct answer depends on hmc_mode, * as does (on omap1) any nonzero value for config->otg port number */ -#ifdef CONFIG_USB_GADGET_OMAP +#if IS_ENABLED (CONFIG_USB_OMAP )#define is_usb0_device (config) 1#else #define is_usb0_device (config) 0
arch/arm/mach-omap1/usb.c +3 -3
@@ -123,7 +123,7 @@ omap_otg_init(struct omap_usb_config *config) syscon =omap_readl (OTG_SYSCON_1 ); syscon |=HST_IDLE_EN |DEV_IDLE_EN |OTG_IDLE_EN ; -#ifdef CONFIG_USB_GADGET_OMAP +#if IS_ENABLED (CONFIG_USB_OMAP )if (config->otg || config->register_dev) {struct platform_device *udc_device = config->udc_device;int status;
@@ -169,7 +169,7 @@ omap_otg_init(struct omap_usb_config *config)void omap_otg_init (struct omap_usb_config *config) {}#endif -#ifdef CONFIG_USB_GADGET_OMAP +#if IS_ENABLED (CONFIG_USB_OMAP )static struct resource udc_resources[] = { /* order is significant! */
@@ -600,7 +600,7 @@ static void __init omap_1510_usb_init(struct omap_usb_config *config)while (!(omap_readw (ULPD_DPLL_CTRL ) &DPLL_LOCK ))cpu_relax (); -#ifdef CONFIG_USB_GADGET_OMAP +#if IS_ENABLED (CONFIG_USB_OMAP )if (config->register_dev) {int status;
Signature · 1 line
1.7.10.4
Tony Lindgren
reviewerPATCH RESEND v2 1/1 ARM: OMAP1: fix omap_udc registration
Quoted 6 lines · Aaro Koskinen
omap_udcplatform device is not registered properly anymore:CONFIG_USB_GADGET_OMAPwas deleted by193ab2a6(usb: gadget: allow multiple gadgets to be built) already in v3.1.Fix by using
CONFIG_USB_OMAPinstead. Tested on Nokia 770 by checking thatomap_udcis probed & working properly when built as a module.
Thanks, applying into omap-for-v3.10/board.
Tony
Quoted 66 lines
Acked-by Felipe Balbi <[email protected]>Signed-off-by Aaro Koskinen <[email protected]>---
Patch history: v2: http://marc.info/?t=136266319800006&r=1&w=2 - use IS_ENABLED() v1: http://marc.info/?t=136260886600006&r=1&w=2arch/arm/mach-omap1/include/mach/usb.h | 2 +- arch/arm/mach-omap1/usb.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)arch/arm/mach-omap1/include/mach/usb.h +1
-1@@ -2,7 +2,7 @@* FIXME correct answer depends on hmc_mode, * as does (on omap1) any nonzero value for config->otg port number */ -#ifdef CONFIG_USB_GADGET_OMAP +#if IS_ENABLED (CONFIG_USB_OMAP )#define is_usb0_device (config) 1#else #define is_usb0_device (config) 0arch/arm/mach-omap1/usb.c +3
-3@@ -123,7 +123,7 @@ omap_otg_init(struct omap_usb_config *config) syscon =omap_readl (OTG_SYSCON_1 ); syscon |=HST_IDLE_EN |DEV_IDLE_EN |OTG_IDLE_EN ; -#ifdef CONFIG_USB_GADGET_OMAP +#if IS_ENABLED (CONFIG_USB_OMAP )if (config->otg || config->register_dev) {struct platform_device *udc_device = config->udc_device;int status;@@ -169,7 +169,7 @@ omap_otg_init(struct omap_usb_config *config)void omap_otg_init (struct omap_usb_config *config) {}#endif -#ifdef CONFIG_USB_GADGET_OMAP +#if IS_ENABLED (CONFIG_USB_OMAP )static struct resource udc_resources[] = { /* order is significant! */@@ -600,7 +600,7 @@ static void __init omap_1510_usb_init(struct omap_usb_config *config)while (!(omap_readw (ULPD_DPLL_CTRL ) &DPLL_LOCK ))cpu_relax (); -#ifdef CONFIG_USB_GADGET_OMAP +#if IS_ENABLED (CONFIG_USB_OMAP )if (config->register_dev) {int status;Signature · 6 lines
1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html