Commit 95de1e2f authored by Paul Kocialkowski's avatar Paul Kocialkowski Committed by Marek Vasut
Browse files

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: default avatarPaul Kocialkowski <contact@paulk.fr>
parent 68f7c5db
......@@ -124,7 +124,7 @@ int cpu_mmc_init(bd_t *bis)
#endif
/* AM33XX has two MUSB controllers which can be host or gadget */
#if (defined(CONFIG_MUSB_GADGET) || defined(CONFIG_MUSB_HOST)) && \
#if (defined(CONFIG_USB_MUSB_GADGET) || defined(CONFIG_USB_MUSB_HOST)) && \
(defined(CONFIG_AM335X_USB0) || defined(CONFIG_AM335X_USB1))
static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
......
......@@ -21,7 +21,7 @@ int sunxi_usb_phy_id_detect(int index);
void sunxi_usb_phy_enable_squelch_detect(int index, int enable);
/* Not really phy related, but we have to declare this somewhere ... */
#if defined(CONFIG_MUSB_HOST) || defined(CONFIG_MUSB_GADGET)
#if defined(CONFIG_USB_MUSB_HOST) || defined(CONFIG_USB_MUSB_GADGET)
void sunxi_musb_board_init(void);
#else
#define sunxi_musb_board_init()
......
......@@ -363,7 +363,7 @@ static struct cpsw_platform_data cpsw_data = {
#if ((defined(CONFIG_SPL_ETH_SUPPORT) || defined(CONFIG_SPL_USBETH_SUPPORT)) &&\
defined(CONFIG_SPL_BUILD)) || \
((defined(CONFIG_DRIVER_TI_CPSW) || \
defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET)) && \
defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET)) && \
!defined(CONFIG_SPL_BUILD))
int board_eth_init(bd_t *bis)
{
......
......@@ -50,12 +50,12 @@ static struct omap_musb_board_data cm_t3517_musb_board_data = {
};
static struct musb_hdrc_platform_data cm_t3517_musb_pdata = {
#if defined(CONFIG_MUSB_HOST)
#if defined(CONFIG_USB_MUSB_HOST)
.mode = MUSB_HOST,
#elif defined(CONFIG_MUSB_GADGET)
#elif defined(CONFIG_USB_MUSB_GADGET)
.mode = MUSB_PERIPHERAL,
#else
#error "Please define either CONFIG_MUSB_HOST or CONFIG_MUSB_GADGET"
#error "Please define either CONFIG_USB_MUSB_HOST or CONFIG_USB_MUSB_GADGET"
#endif
.config = &cm_t3517_musb_config,
.power = 250,
......
......@@ -65,12 +65,12 @@ static struct omap_musb_board_data musb_board_data = {
};
static struct musb_hdrc_platform_data musb_plat = {
#if defined(CONFIG_MUSB_HOST)
#if defined(CONFIG_USB_MUSB_HOST)
.mode = MUSB_HOST,
#elif defined(CONFIG_MUSB_GADGET)
#elif defined(CONFIG_USB_MUSB_GADGET)
.mode = MUSB_PERIPHERAL,
#else
#error "Please define either CONFIG_MUSB_HOST or CONFIG_MUSB_GADGET"
#error "Please define either CONFIG_USB_MUSB_HOST or CONFIG_USB_MUSB_GADGET"
#endif
.config = &musb_config,
.power = 250,
......@@ -159,7 +159,7 @@ int board_mmc_init(bd_t *bis)
}
#endif
#if defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET)
#if defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET)
int board_eth_init(bd_t *bis)
{
int rv, n = 0;
......
......@@ -208,7 +208,7 @@ static struct cpsw_platform_data cpsw_data = {
#endif
#if defined(CONFIG_DRIVER_TI_CPSW) || \
(defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET))
(defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET))
int board_eth_init(bd_t *bis)
{
int rv, n = 0;
......
......@@ -267,7 +267,7 @@ static struct cpsw_platform_data cpsw_data = {
};
#if defined(CONFIG_DRIVER_TI_CPSW) || \
(defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET))
(defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET))
int board_eth_init(bd_t *bis)
{
struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
......
......@@ -213,7 +213,7 @@ static struct cpsw_platform_data cpsw_data = {
#endif /* #if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) */
#if defined(CONFIG_DRIVER_TI_CPSW) || \
(defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET))
(defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET))
int board_eth_init(bd_t *bis)
{
int n = 0;
......
......@@ -174,7 +174,7 @@ static struct cpsw_platform_data cpsw_data = {
};
#if defined(CONFIG_DRIVER_TI_CPSW) || \
(defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET))
(defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET))
int board_eth_init(bd_t *bis)
{
struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
......
......@@ -569,7 +569,7 @@ static struct cpsw_platform_data cpsw_data = {
#if ((defined(CONFIG_SPL_ETH_SUPPORT) || defined(CONFIG_SPL_USBETH_SUPPORT)) \
&& defined(CONFIG_SPL_BUILD)) || \
((defined(CONFIG_DRIVER_TI_CPSW) || \
defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET)) && \
defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET)) && \
!defined(CONFIG_SPL_BUILD))
int board_eth_init(bd_t *bis)
{
......
......@@ -306,12 +306,12 @@ static struct omap_musb_board_data musb_board_data = {
};
static struct musb_hdrc_platform_data musb_plat = {
#if defined(CONFIG_MUSB_HOST)
#if defined(CONFIG_USB_MUSB_HOST)
.mode = MUSB_HOST,
#elif defined(CONFIG_MUSB_GADGET)
#elif defined(CONFIG_USB_MUSB_GADGET)
.mode = MUSB_PERIPHERAL,
#else
#error "Please define either CONFIG_MUSB_HOST or CONFIG_MUSB_GADGET"
#error "Please define either CONFIG_USB_MUSB_HOST or CONFIG_USB_MUSB_GADGET"
#endif
.config = &musb_config,
.power = 100,
......@@ -568,7 +568,7 @@ int ehci_hcd_stop(int index)
#endif /* CONFIG_USB_EHCI */
#if defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET)
#if defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET)
int board_eth_init(bd_t *bis)
{
return usb_eth_initialize(bis);
......
......@@ -407,7 +407,7 @@ static struct cpsw_platform_data cpsw_data = {
#if ((defined(CONFIG_SPL_ETH_SUPPORT) || defined(CONFIG_SPL_USBETH_SUPPORT)) \
&& defined(CONFIG_SPL_BUILD)) || \
((defined(CONFIG_DRIVER_TI_CPSW) || \
defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET)) && \
defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET)) && \
!defined(CONFIG_SPL_BUILD))
int board_eth_init(bd_t *bis)
{
......
......@@ -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
......
......@@ -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
......
......@@ -1437,7 +1437,7 @@ static int __devinit musb_core_init(u16 musb_type, struct musb *musb)
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 @@ irqreturn_t musb_interrupt(struct musb *musb)
}
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 @@ musb_init_controller(struct musb_hdrc_platform_data *plat, struct device *dev,
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 @@ fail0:
* 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 @@ static int __devinit musb_probe(struct platform_device *pdev)
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 @@ static int __devexit musb_remove(struct platform_device *pdev)
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;
......
......@@ -97,7 +97,7 @@ struct musb_ep;
#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 @@ extern void musb_g_disconnect(struct musb *);
#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)
......
......@@ -62,7 +62,7 @@ struct musb_hw_ep;
#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)
......
......@@ -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 @@ static void txstate(struct musb *musb, struct musb_request *req)
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;
......
......@@ -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 @@ struct dm_usb_ops musb_usb_ops = {
.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 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
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 @@ int musb_register(struct musb_hdrc_platform_data *plat, void *bdata,
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;
......
......@@ -286,7 +286,7 @@ static struct musb_hdrc_config musb_config = {
};
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 @@ static struct musb_hdrc_platform_data musb_plat = {
.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 @@ U_BOOT_DRIVER(usb_musb) = {
void sunxi_musb_board_init(void)
{
#ifdef CONFIG_MUSB_HOST
#ifdef CONFIG_USB_MUSB_HOST
struct udevice *dev;
/*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment