diff options
author | Tony Lindgren <tony@atomide.com> | 2014-11-24 14:05:06 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-25 09:47:07 -0500 |
commit | ebf3992061db1f7b3aa093f37fb308acc74fbc82 (patch) | |
tree | 7eadbb089c31ffe0030a72992d8dedcf8658d95a | |
parent | 82c02f58ba3a1ee0a067c0f90513e826d6152ba6 (diff) |
usb: musb: Use IS_ENABLED for tusb6010
This removes the ifdef clutter a bit and saves few lines.
It also makes it easier to detect the remaining places
where we have conditional building of code done based
on if defined for things like DMA.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/musb/musb_core.c | 2 | ||||
-rw-r--r-- | drivers/usb/musb/musb_core.h | 9 | ||||
-rw-r--r-- | drivers/usb/musb/musb_regs.h | 3 |
3 files changed, 4 insertions, 10 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 1388d99b39e0..55fe0ff6fd87 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -1527,7 +1527,7 @@ static int musb_core_init(u16 musb_type, struct musb *musb) | |||
1527 | struct musb_hw_ep *hw_ep = musb->endpoints + i; | 1527 | struct musb_hw_ep *hw_ep = musb->endpoints + i; |
1528 | 1528 | ||
1529 | hw_ep->fifo = musb->io.fifo_offset(i) + mbase; | 1529 | hw_ep->fifo = musb->io.fifo_offset(i) + mbase; |
1530 | #if defined(CONFIG_USB_MUSB_TUSB6010) || defined (CONFIG_USB_MUSB_TUSB6010_MODULE) | 1530 | #if IS_ENABLED(CONFIG_USB_MUSB_TUSB6010) |
1531 | if (musb->io.quirks & MUSB_IN_TUSB) { | 1531 | if (musb->io.quirks & MUSB_IN_TUSB) { |
1532 | hw_ep->fifo_async = musb->async + 0x400 + | 1532 | hw_ep->fifo_async = musb->async + 0x400 + |
1533 | musb->io.fifo_offset(i); | 1533 | musb->io.fifo_offset(i); |
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index d9248fdd9158..5e65958f7915 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h | |||
@@ -216,8 +216,7 @@ struct musb_hw_ep { | |||
216 | void __iomem *fifo; | 216 | void __iomem *fifo; |
217 | void __iomem *regs; | 217 | void __iomem *regs; |
218 | 218 | ||
219 | #if defined(CONFIG_USB_MUSB_TUSB6010) || \ | 219 | #if IS_ENABLED(CONFIG_USB_MUSB_TUSB6010) |
220 | defined(CONFIG_USB_MUSB_TUSB6010_MODULE) | ||
221 | void __iomem *conf; | 220 | void __iomem *conf; |
222 | #endif | 221 | #endif |
223 | 222 | ||
@@ -234,8 +233,7 @@ struct musb_hw_ep { | |||
234 | struct dma_channel *tx_channel; | 233 | struct dma_channel *tx_channel; |
235 | struct dma_channel *rx_channel; | 234 | struct dma_channel *rx_channel; |
236 | 235 | ||
237 | #if defined(CONFIG_USB_MUSB_TUSB6010) || \ | 236 | #if IS_ENABLED(CONFIG_USB_MUSB_TUSB6010) |
238 | defined(CONFIG_USB_MUSB_TUSB6010_MODULE) | ||
239 | /* TUSB has "asynchronous" and "synchronous" dma modes */ | 237 | /* TUSB has "asynchronous" and "synchronous" dma modes */ |
240 | dma_addr_t fifo_async; | 238 | dma_addr_t fifo_async; |
241 | dma_addr_t fifo_sync; | 239 | dma_addr_t fifo_sync; |
@@ -339,8 +337,7 @@ struct musb { | |||
339 | void __iomem *ctrl_base; | 337 | void __iomem *ctrl_base; |
340 | void __iomem *mregs; | 338 | void __iomem *mregs; |
341 | 339 | ||
342 | #if defined(CONFIG_USB_MUSB_TUSB6010) || \ | 340 | #if IS_ENABLED(CONFIG_USB_MUSB_TUSB6010) |
343 | defined(CONFIG_USB_MUSB_TUSB6010_MODULE) | ||
344 | dma_addr_t async; | 341 | dma_addr_t async; |
345 | dma_addr_t sync; | 342 | dma_addr_t sync; |
346 | void __iomem *sync_va; | 343 | void __iomem *sync_va; |
diff --git a/drivers/usb/musb/musb_regs.h b/drivers/usb/musb/musb_regs.h index 92b4c3df9ffa..11f0be07491e 100644 --- a/drivers/usb/musb/musb_regs.h +++ b/drivers/usb/musb/musb_regs.h | |||
@@ -287,10 +287,7 @@ | |||
287 | #define MUSB_FIFOSIZE 0x0F | 287 | #define MUSB_FIFOSIZE 0x0F |
288 | #define MUSB_CONFIGDATA MUSB_FIFOSIZE /* Re-used for EP0 */ | 288 | #define MUSB_CONFIGDATA MUSB_FIFOSIZE /* Re-used for EP0 */ |
289 | 289 | ||
290 | #if defined(CONFIG_USB_MUSB_TUSB6010) || \ | ||
291 | defined(CONFIG_USB_MUSB_TUSB6010_MODULE) | ||
292 | #include "tusb6010.h" /* Needed "only" for TUSB_EP0_CONF */ | 290 | #include "tusb6010.h" /* Needed "only" for TUSB_EP0_CONF */ |
293 | #endif | ||
294 | 291 | ||
295 | #define MUSB_TXCSR_MODE 0x2000 | 292 | #define MUSB_TXCSR_MODE 0x2000 |
296 | 293 | ||