summaryrefslogtreecommitdiff
path: root/drivers/usb/musb-new
diff options
context:
space:
mode:
authorSven Schwermer <sven@svenschwermer.de>2018-11-21 10:43:56 +0300
committerMarek Vasut <marex@denx.de>2018-11-26 23:19:03 +0300
commitfd09c205fc57b90a782cac33449ef172575d0a8c (patch)
treeb23d462a78db88ec589c50d769fa6522b3f16c63 /drivers/usb/musb-new
parentab5817027f9b4fce25f5f2a3e20577ac55bbd7e0 (diff)
downloadu-boot-fd09c205fc57b90a782cac33449ef172575d0a8c.tar.xz
usb: s/CONFIG_DM_USB/CONFIG_IS_ENABLED(DM_USB)/
This allows to disable the USB driver model in SPL because it checks the CONFIG_SPL_DM_USB variable for SPL builds. Nothing changes for regular non-SPL builds. Signed-off-by: Sven Schwermer <sven@svenschwermer.de>
Diffstat (limited to 'drivers/usb/musb-new')
-rw-r--r--drivers/usb/musb-new/musb_uboot.c12
-rw-r--r--drivers/usb/musb-new/omap2430.c4
-rw-r--r--drivers/usb/musb-new/ti-musb.c4
-rw-r--r--drivers/usb/musb-new/usb-compat.h2
4 files changed, 11 insertions, 11 deletions
diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c
index 2bf918eab4..d40772b1aa 100644
--- a/drivers/usb/musb-new/musb_uboot.c
+++ b/drivers/usb/musb-new/musb_uboot.c
@@ -19,7 +19,7 @@ struct int_queue {
struct urb urb;
};
-#ifndef CONFIG_DM_USB
+#if !CONFIG_IS_ENABLED(DM_USB)
struct musb_host_data musb_host;
#endif
@@ -243,7 +243,7 @@ int musb_lowlevel_init(struct musb_host_data *host)
return 0;
}
-#ifndef CONFIG_DM_USB
+#if !CONFIG_IS_ENABLED(DM_USB)
int usb_lowlevel_stop(int index)
{
if (!musb_host.host) {
@@ -300,9 +300,9 @@ int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
{
return musb_lowlevel_init(&musb_host);
}
-#endif /* !CONFIG_DM_USB */
+#endif /* !CONFIG_IS_ENABLED(DM_USB) */
-#ifdef CONFIG_DM_USB
+#if CONFIG_IS_ENABLED(DM_USB)
static int musb_submit_control_msg(struct udevice *dev, struct usb_device *udev,
unsigned long pipe, void *buffer, int length,
struct devrequest *setup)
@@ -364,7 +364,7 @@ struct dm_usb_ops musb_usb_ops = {
.destroy_int_queue = musb_destroy_int_queue,
.reset_root_port = musb_reset_root_port,
};
-#endif /* CONFIG_DM_USB */
+#endif /* CONFIG_IS_ENABLED(DM_USB) */
#endif /* CONFIG_USB_MUSB_HOST */
#ifdef CONFIG_USB_MUSB_GADGET
@@ -425,7 +425,7 @@ struct musb *musb_register(struct musb_hdrc_platform_data *plat, void *bdata,
struct musb **musbp;
switch (plat->mode) {
-#if defined(CONFIG_USB_MUSB_HOST) && !defined(CONFIG_DM_USB)
+#if defined(CONFIG_USB_MUSB_HOST) && !CONFIG_IS_ENABLED(DM_USB)
case MUSB_HOST:
musbp = &musb_host.host;
break;
diff --git a/drivers/usb/musb-new/omap2430.c b/drivers/usb/musb-new/omap2430.c
index 342d76bd6f..58aed72b7d 100644
--- a/drivers/usb/musb-new/omap2430.c
+++ b/drivers/usb/musb-new/omap2430.c
@@ -135,7 +135,7 @@ const struct musb_platform_ops omap2430_ops = {
.disable = omap2430_musb_disable,
};
-#if defined(CONFIG_DM_USB)
+#if CONFIG_IS_ENABLED(DM_USB)
struct omap2430_musb_platdata {
void *base;
@@ -276,4 +276,4 @@ U_BOOT_DRIVER(omap2430_musb) = {
.priv_auto_alloc_size = sizeof(struct musb_host_data),
};
-#endif /* CONFIG_DM_USB */
+#endif /* CONFIG_IS_ENABLED(DM_USB) */
diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
index 9fbe2d6861..ee0960704a 100644
--- a/drivers/usb/musb-new/ti-musb.c
+++ b/drivers/usb/musb-new/ti-musb.c
@@ -19,7 +19,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#ifdef CONFIG_DM_USB
+#if CONFIG_IS_ENABLED(DM_USB)
/* USB 2.0 PHY Control */
#define CM_PHY_PWRDN (1 << 0)
@@ -251,4 +251,4 @@ U_BOOT_DRIVER(ti_musb_wrapper) = {
.bind = ti_musb_wrapper_bind,
};
-#endif /* CONFIG_DM_USB */
+#endif /* CONFIG_IS_ENABLED(DM_USB) */
diff --git a/drivers/usb/musb-new/usb-compat.h b/drivers/usb/musb-new/usb-compat.h
index 760bd787bc..f2c18ad3a2 100644
--- a/drivers/usb/musb-new/usb-compat.h
+++ b/drivers/usb/musb-new/usb-compat.h
@@ -67,7 +67,7 @@ static inline int usb_hcd_unmap_urb_for_dma(struct usb_hcd *hcd,
return 0;
}
-#ifdef CONFIG_DM_USB
+#if CONFIG_IS_ENABLED(DM_USB)
static inline struct usb_device *usb_dev_get_parent(struct usb_device *udev)
{
struct udevice *parent = udev->dev->parent;