usb: musb: remove readl/writel from struct musb_platform_ops

Now Blackfin support is removed, we no longer need function pointers for
musb_readl() and musb_writel().

Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Bin Liu 2018-05-21 08:42:10 -05:00 committed by Greg Kroah-Hartman
parent 78fba982db
commit 42e990ea80
3 changed files with 14 additions and 28 deletions

View File

@ -274,20 +274,6 @@ static void musb_default_writew(void __iomem *addr, unsigned offset, u16 data)
__raw_writew(data, addr + offset);
}
static u32 musb_default_readl(const void __iomem *addr, unsigned offset)
{
u32 data = __raw_readl(addr + offset);
trace_musb_readl(__builtin_return_address(0), addr, offset, data);
return data;
}
static void musb_default_writel(void __iomem *addr, unsigned offset, u32 data)
{
trace_musb_writel(__builtin_return_address(0), addr, offset, data);
__raw_writel(data, addr + offset);
}
/*
* Load an endpoint's FIFO
*/
@ -390,10 +376,20 @@ EXPORT_SYMBOL_GPL(musb_readw);
void (*musb_writew)(void __iomem *addr, unsigned offset, u16 data);
EXPORT_SYMBOL_GPL(musb_writew);
u32 (*musb_readl)(const void __iomem *addr, unsigned offset);
u32 musb_readl(const void __iomem *addr, unsigned offset)
{
u32 data = __raw_readl(addr + offset);
trace_musb_readl(__builtin_return_address(0), addr, offset, data);
return data;
}
EXPORT_SYMBOL_GPL(musb_readl);
void (*musb_writel)(void __iomem *addr, unsigned offset, u32 data);
void musb_writel(void __iomem *addr, unsigned offset, u32 data)
{
trace_musb_writel(__builtin_return_address(0), addr, offset, data);
__raw_writel(data, addr + offset);
}
EXPORT_SYMBOL_GPL(musb_writel);
#ifndef CONFIG_MUSB_PIO_ONLY
@ -2158,8 +2154,6 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
musb_writeb = musb_default_writeb;
musb_readw = musb_default_readw;
musb_writew = musb_default_writew;
musb_readl = musb_default_readl;
musb_writel = musb_default_writel;
/* The musb_platform_init() call:
* - adjusts musb->mregs
@ -2226,10 +2220,6 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
musb_readw = musb->ops->readw;
if (musb->ops->writew)
musb_writew = musb->ops->writew;
if (musb->ops->readl)
musb_readl = musb->ops->readl;
if (musb->ops->writel)
musb_writel = musb->ops->writel;
#ifndef CONFIG_MUSB_PIO_ONLY
if (!musb->ops->dma_init || !musb->ops->dma_exit) {

View File

@ -127,8 +127,6 @@ struct musb_io;
* @writeb: write 8 bits
* @readw: read 16 bits
* @writew: write 16 bits
* @readl: read 32 bits
* @writel: write 32 bits
* @read_fifo: reads the fifo
* @write_fifo: writes to fifo
* @dma_init: platform specific dma init function
@ -174,8 +172,6 @@ struct musb_platform_ops {
void (*writeb)(void __iomem *addr, unsigned offset, u8 data);
u16 (*readw)(const void __iomem *addr, unsigned offset);
void (*writew)(void __iomem *addr, unsigned offset, u16 data);
u32 (*readl)(const void __iomem *addr, unsigned offset);
void (*writel)(void __iomem *addr, unsigned offset, u32 data);
void (*read_fifo)(struct musb_hw_ep *hw_ep, u16 len, u8 *buf);
void (*write_fifo)(struct musb_hw_ep *hw_ep, u16 len, const u8 *buf);
struct dma_controller *

View File

@ -39,7 +39,7 @@ extern u8 (*musb_readb)(const void __iomem *addr, unsigned offset);
extern void (*musb_writeb)(void __iomem *addr, unsigned offset, u8 data);
extern u16 (*musb_readw)(const void __iomem *addr, unsigned offset);
extern void (*musb_writew)(void __iomem *addr, unsigned offset, u16 data);
extern u32 (*musb_readl)(const void __iomem *addr, unsigned offset);
extern void (*musb_writel)(void __iomem *addr, unsigned offset, u32 data);
extern u32 musb_readl(const void __iomem *addr, unsigned offset);
extern void musb_writel(void __iomem *addr, unsigned offset, u32 data);
#endif