usb: musb-new: CONFIG_MUSB prefix replacement with CONFIG_USB_MUSB
USB-related options are usually prefixed with CONFIG_USB and platform-specific
adaptation for the MUSB controller already have a CONFIG_USB_MUSB prefix, so
this switches all MUSB-related options to a CONFIG_USB_MUSB prefix, for
consistency.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h
index c859df2..e9811c3 100644
--- a/drivers/usb/gadget/gadget_chips.h
+++ b/drivers/usb/gadget/gadget_chips.h
@@ -125,7 +125,7 @@
#endif
/* Mentor high speed "dual role" controller, in peripheral role */
-#ifdef CONFIG_MUSB_GADGET
+#ifdef CONFIG_USB_MUSB_GADGET
#define gadget_is_musbhdrc(g) (!strcmp("musb-hdrc", (g)->name))
#else
#define gadget_is_musbhdrc(g) 0
diff --git a/drivers/usb/musb-new/Makefile b/drivers/usb/musb-new/Makefile
index 9edeece..fd9df72 100644
--- a/drivers/usb/musb-new/Makefile
+++ b/drivers/usb/musb-new/Makefile
@@ -2,9 +2,9 @@
# for USB OTG silicon based on Mentor Graphics INVENTRA designs
#
-obj-$(CONFIG_MUSB_GADGET) += musb_gadget.o musb_gadget_ep0.o musb_core.o
-obj-$(CONFIG_MUSB_GADGET) += musb_uboot.o
-obj-$(CONFIG_MUSB_HOST) += musb_host.o musb_core.o musb_uboot.o
+obj-$(CONFIG_USB_MUSB_GADGET) += musb_gadget.o musb_gadget_ep0.o musb_core.o
+obj-$(CONFIG_USB_MUSB_GADGET) += musb_uboot.o
+obj-$(CONFIG_USB_MUSB_HOST) += musb_host.o musb_core.o musb_uboot.o
obj-$(CONFIG_USB_MUSB_DSPS) += musb_dsps.o
obj-$(CONFIG_USB_MUSB_AM35X) += am35x.o
obj-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o
diff --git a/drivers/usb/musb-new/musb_core.c b/drivers/usb/musb-new/musb_core.c
index f530af4..411e5a0 100644
--- a/drivers/usb/musb-new/musb_core.c
+++ b/drivers/usb/musb-new/musb_core.c
@@ -1437,7 +1437,7 @@
strcat(aInfo, ", dyn FIFOs");
musb->dyn_fifo = true;
}
-#ifndef CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT
+#ifndef CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
if (reg & MUSB_CONFIGDATA_MPRXE) {
strcat(aInfo, ", bulk combine");
musb->bulk_combine = true;
@@ -1662,7 +1662,7 @@
}
EXPORT_SYMBOL_GPL(musb_interrupt);
-#ifndef CONFIG_MUSB_PIO_ONLY
+#ifndef CONFIG_USB_MUSB_PIO_ONLY
static bool __devinitdata use_dma = 1;
/* "modprobe ... use_dma=0" etc */
@@ -2011,7 +2011,7 @@
pm_runtime_get_sync(musb->controller);
-#ifndef CONFIG_MUSB_PIO_ONLY
+#ifndef CONFIG_USB_MUSB_PIO_ONLY
if (use_dma && dev->dma_mask) {
struct dma_controller *c;
@@ -2194,7 +2194,7 @@
* bridge to a platform device; this driver then suffices.
*/
-#ifndef CONFIG_MUSB_PIO_ONLY
+#ifndef CONFIG_USB_MUSB_PIO_ONLY
static u64 *orig_dma_mask;
#endif
@@ -2217,7 +2217,7 @@
return -ENOMEM;
}
-#ifndef CONFIG_MUSB_PIO_ONLY
+#ifndef CONFIG_USB_MUSB_PIO_ONLY
/* clobbered by use_dma=n */
orig_dma_mask = dev->dma_mask;
#endif
@@ -2244,7 +2244,7 @@
musb_free(musb);
iounmap(ctrl_base);
device_init_wakeup(&pdev->dev, 0);
-#ifndef CONFIG_MUSB_PIO_ONLY
+#ifndef CONFIG_USB_MUSB_PIO_ONLY
pdev->dev.dma_mask = orig_dma_mask;
#endif
return 0;
diff --git a/drivers/usb/musb-new/musb_core.h b/drivers/usb/musb-new/musb_core.h
index 8727f64..c818040 100644
--- a/drivers/usb/musb-new/musb_core.h
+++ b/drivers/usb/musb-new/musb_core.h
@@ -97,7 +97,7 @@
#ifndef __UBOOT__
#define is_peripheral_capable() (1)
#else
-#ifdef CONFIG_MUSB_GADGET
+#ifdef CONFIG_USB_MUSB_GADGET
#define is_peripheral_capable() (1)
#else
#define is_peripheral_capable() (0)
@@ -118,7 +118,7 @@
#ifndef __UBOOT__
#define is_host_capable() (1)
#else
-#ifdef CONFIG_MUSB_HOST
+#ifdef CONFIG_USB_MUSB_HOST
#define is_host_capable() (1)
#else
#define is_host_capable() (0)
diff --git a/drivers/usb/musb-new/musb_dma.h b/drivers/usb/musb-new/musb_dma.h
index 3a97c4e..17fe89f 100644
--- a/drivers/usb/musb-new/musb_dma.h
+++ b/drivers/usb/musb-new/musb_dma.h
@@ -62,7 +62,7 @@
#define DMA_ADDR_INVALID (~(dma_addr_t)0)
-#ifndef CONFIG_MUSB_PIO_ONLY
+#ifndef CONFIG_USB_MUSB_PIO_ONLY
#define is_dma_capable() (1)
#else
#define is_dma_capable() (0)
diff --git a/drivers/usb/musb-new/musb_gadget.c b/drivers/usb/musb-new/musb_gadget.c
index 97acf93..309dc7f 100644
--- a/drivers/usb/musb-new/musb_gadget.c
+++ b/drivers/usb/musb-new/musb_gadget.c
@@ -99,7 +99,7 @@
#define is_buffer_mapped(req) (is_dma_capable() && \
(req->map_state != UN_MAPPED))
-#ifndef CONFIG_MUSB_PIO_ONLY
+#ifndef CONFIG_USB_MUSB_PIO_ONLY
/* Maps the buffer to dma */
static inline void map_dma_buffer(struct musb_request *request,
@@ -382,7 +382,7 @@
epnum, musb_ep->packet_sz, fifo_count,
csr);
-#ifndef CONFIG_MUSB_PIO_ONLY
+#ifndef CONFIG_USB_MUSB_PIO_ONLY
if (is_buffer_mapped(req)) {
struct dma_controller *c = musb->dma_controller;
size_t request_size;
diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c
index 9b56e90..10f6b5d 100644
--- a/drivers/usb/musb-new/musb_uboot.c
+++ b/drivers/usb/musb-new/musb_uboot.c
@@ -15,7 +15,7 @@
#include "musb_gadget.h"
#include "musb_uboot.h"
-#ifdef CONFIG_MUSB_HOST
+#ifdef CONFIG_USB_MUSB_HOST
struct int_queue {
struct usb_host_endpoint hep;
struct urb urb;
@@ -368,9 +368,9 @@
.reset_root_port = musb_reset_root_port,
};
#endif /* CONFIG_DM_USB */
-#endif /* CONFIG_MUSB_HOST */
+#endif /* CONFIG_USB_MUSB_HOST */
-#ifdef CONFIG_MUSB_GADGET
+#ifdef CONFIG_USB_MUSB_GADGET
static struct musb *gadget;
int usb_gadget_handle_interrupts(int index)
@@ -420,7 +420,7 @@
driver->unbind(&gadget->g);
return 0;
}
-#endif /* CONFIG_MUSB_GADGET */
+#endif /* CONFIG_USB_MUSB_GADGET */
int musb_register(struct musb_hdrc_platform_data *plat, void *bdata,
void *ctl_regs)
@@ -428,12 +428,12 @@
struct musb **musbp;
switch (plat->mode) {
-#if defined(CONFIG_MUSB_HOST) && !defined(CONFIG_DM_USB)
+#if defined(CONFIG_USB_MUSB_HOST) && !defined(CONFIG_DM_USB)
case MUSB_HOST:
musbp = &musb_host.host;
break;
#endif
-#ifdef CONFIG_MUSB_GADGET
+#ifdef CONFIG_USB_MUSB_GADGET
case MUSB_PERIPHERAL:
musbp = &gadget;
break;
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index 3a29b18..85ac28d 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -286,7 +286,7 @@
};
static struct musb_hdrc_platform_data musb_plat = {
-#if defined(CONFIG_MUSB_HOST)
+#if defined(CONFIG_USB_MUSB_HOST)
.mode = MUSB_HOST,
#else
.mode = MUSB_PERIPHERAL,
@@ -296,7 +296,7 @@
.platform_ops = &sunxi_musb_ops,
};
-#ifdef CONFIG_MUSB_HOST
+#ifdef CONFIG_USB_MUSB_HOST
int musb_usb_probe(struct udevice *dev)
{
struct musb_host_data *host = dev_get_priv(dev);
@@ -341,7 +341,7 @@
void sunxi_musb_board_init(void)
{
-#ifdef CONFIG_MUSB_HOST
+#ifdef CONFIG_USB_MUSB_HOST
struct udevice *dev;
/*
diff --git a/drivers/usb/musb/Makefile b/drivers/usb/musb/Makefile
index 3c9ed98..bd2b7c5 100644
--- a/drivers/usb/musb/Makefile
+++ b/drivers/usb/musb/Makefile
@@ -5,8 +5,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-obj-$(CONFIG_MUSB_HCD) += musb_hcd.o musb_core.o
-obj-$(CONFIG_MUSB_UDC) += musb_udc.o musb_core.o
+obj-$(CONFIG_USB_MUSB_HCD) += musb_hcd.o musb_core.o
+obj-$(CONFIG_USB_MUSB_UDC) += musb_udc.o musb_core.o
obj-$(CONFIG_USB_BLACKFIN) += blackfin_usb.o
obj-$(CONFIG_USB_DAVINCI) += davinci.o
obj-$(CONFIG_USB_OMAP3) += omap3.o
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 786909f..ea3996a 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -19,7 +19,7 @@
*/
void musb_start(void)
{
-#if defined(CONFIG_MUSB_HCD)
+#if defined(CONFIG_USB_MUSB_HCD)
u8 devctl;
u8 busctl;
#endif
@@ -32,7 +32,7 @@
/* put into basic highspeed mode and start session */
writeb(MUSB_POWER_HSENAB, &musbr->power);
-#if defined(CONFIG_MUSB_HCD)
+#if defined(CONFIG_USB_MUSB_HCD)
/* Program PHY to use EXT VBUS if required */
if (musb_cfg.extvbus == 1) {
busctl = musb_read_ulpi_buscontrol(musbr);
@@ -81,7 +81,7 @@
config_fifo(tx, idx, fifoaddr);
csr = readw(&musbr->txcsr);
-#if defined(CONFIG_MUSB_HCD)
+#if defined(CONFIG_USB_MUSB_HCD)
/* clear the data toggle bit */
writew(csr | MUSB_TXCSR_CLRDATATOG, &musbr->txcsr);
#endif
@@ -94,7 +94,7 @@
config_fifo(rx, idx, fifoaddr);
csr = readw(&musbr->rxcsr);
-#if defined(CONFIG_MUSB_HCD)
+#if defined(CONFIG_USB_MUSB_HCD)
/* clear the data toggle bit */
writew(csr | MUSB_RXCSR_CLRDATATOG, &musbr->rxcsr);
#endif
diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c
index f0ba8aa..9a3b61a 100644
--- a/drivers/usb/musb/musb_hcd.c
+++ b/drivers/usb/musb/musb_hcd.c
@@ -117,7 +117,7 @@
{
u16 csr;
int result = 1;
- int timeout = CONFIG_MUSB_TIMEOUT;
+ int timeout = CONFIG_USB_MUSB_TIMEOUT;
while (result > 0) {
csr = readw(&musbr->txcsr);
@@ -179,7 +179,7 @@
static int wait_until_txep_ready(struct usb_device *dev, u8 ep)
{
u16 csr;
- int timeout = CONFIG_MUSB_TIMEOUT;
+ int timeout = CONFIG_USB_MUSB_TIMEOUT;
do {
if (check_stall(ep, 1)) {
@@ -211,7 +211,7 @@
static int wait_until_rxep_ready(struct usb_device *dev, u8 ep)
{
u16 csr;
- int timeout = CONFIG_MUSB_TIMEOUT;
+ int timeout = CONFIG_USB_MUSB_TIMEOUT;
do {
if (check_stall(ep, 0)) {
diff --git a/drivers/usb/musb/musb_hcd.h b/drivers/usb/musb/musb_hcd.h
index 0c8e75d..831957d 100644
--- a/drivers/usb/musb/musb_hcd.h
+++ b/drivers/usb/musb/musb_hcd.h
@@ -17,8 +17,8 @@
extern unsigned char new[];
#endif
-#ifndef CONFIG_MUSB_TIMEOUT
-# define CONFIG_MUSB_TIMEOUT 100000
+#ifndef CONFIG_USB_MUSB_TIMEOUT
+# define CONFIG_USB_MUSB_TIMEOUT 100000
#endif
/* This defines the endpoint number used for control transfers */