linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: festevam@gmail.com (Fabio Estevam)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: mach-pca100: Add CONFIG_USB_ULPI dependency
Date: Tue, 19 Mar 2013 22:39:12 -0300	[thread overview]
Message-ID: <1363743553-17295-1-git-send-email-festevam@gmail.com> (raw)

From: Fabio Estevam <fabio.estevam@freescale.com>

Since commit edc7cb2e955f (usb: phy: make it a menuconfig) CONFIG_USB_ULPI can 
only be enabled if CONFIG_USB_PHY is selected.

CONFIG_USB_ULPI is selected in the imx_v4_v5_defconfig, but CONFIG_USB_PHY is 
not, which causes the following error:

arch/arm/mach-imx/built-in.o: In function `pca100_init':
platform-mx2-emma.c:(.init.text+0x6788): undefined reference to `otg_ulpi_create'
platform-mx2-emma.c:(.init.text+0x682c): undefined reference to `mxc_ulpi_access_ops'

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 arch/arm/mach-imx/mach-pca100.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
index b8b15bb..aa4fffe 100644
--- a/arch/arm/mach-imx/mach-pca100.c
+++ b/arch/arm/mach-imx/mach-pca100.c
@@ -278,6 +278,7 @@ static struct mxc_usbh_platform_data otg_pdata __initdata = {
 	.portsc	= MXC_EHCI_MODE_ULPI,
 };
 
+#if IS_ENABLED(CONFIG_USB_ULPI)
 static int usbh2_phy_init(struct platform_device *pdev)
 {
 	gpio_set_value(USBH2_PHY_CS_GPIO, 0);
@@ -291,6 +292,7 @@ static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
 	.init	= usbh2_phy_init,
 	.portsc	= MXC_EHCI_MODE_ULPI,
 };
+#endif
 
 static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
 	.operating_mode = FSL_USB2_DR_DEVICE,
@@ -398,11 +400,13 @@ static void __init pca100_init(void)
 		imx27_add_fsl_usb2_udc(&otg_device_pdata);
 	}
 
+#if IS_ENABLED(CONFIG_USB_ULPI)
 	usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
 				ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
 	if (usbh2_pdata.otg)
 		imx27_add_mxc_ehci_hs(2, &usbh2_pdata);
+#endif
 
 	imx27_add_imx_fb(&pca100_fb_data);
 
-- 
1.7.9.5

             reply	other threads:[~2013-03-20  1:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20  1:39 Fabio Estevam [this message]
2013-03-20  1:39 ` [PATCH 2/2] ARM: imx_v4_v5_defconfig: Select CONFIG_USB_PHY Fabio Estevam
2013-03-20  6:20   ` Felipe Balbi
2013-03-20  6:20 ` [PATCH 1/2] ARM: mach-pca100: Add CONFIG_USB_ULPI dependency Felipe Balbi
2013-03-20 13:36   ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1363743553-17295-1-git-send-email-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).