From 1cac34ce161ae010d3f9ffd3f664e70206638ebc Mon Sep 17 00:00:00 2001 From: Mugunthan V N Date: Thu, 17 Nov 2016 14:38:10 +0530 Subject: drivers: usb: musb: adopt musb backend driver to driver model Currently all backend driver ops uses hard coded physical address, so to adopt the driver to DM, add device pointer to ops call backs so that drivers can get physical addresses from the usb driver priv/plat data. Signed-off-by: Mugunthan V N Reviewed-by: Tom Rini --- arch/arm/include/asm/arch-omap3/musb.h | 6 +++--- arch/arm/include/asm/omap_musb.h | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'arch/arm/include') diff --git a/arch/arm/include/asm/arch-omap3/musb.h b/arch/arm/include/asm/arch-omap3/musb.h index cee4ed3..d06a758 100644 --- a/arch/arm/include/asm/arch-omap3/musb.h +++ b/arch/arm/include/asm/arch-omap3/musb.h @@ -7,7 +7,7 @@ #ifndef __ASM_ARCH_OMAP3_MUSB_H #define __ASM_ARCH_OMAP3_MUSB_H -extern void am35x_musb_reset(void); -extern void am35x_musb_phy_power(u8 on); -extern void am35x_musb_clear_irq(void); +void am35x_musb_reset(struct udevice *dev); +void am35x_musb_phy_power(struct udevice *dev, u8 on); +void am35x_musb_clear_irq(struct udevice *dev); #endif diff --git a/arch/arm/include/asm/omap_musb.h b/arch/arm/include/asm/omap_musb.h index 8b9cb0e..7c5fb40 100644 --- a/arch/arm/include/asm/omap_musb.h +++ b/arch/arm/include/asm/omap_musb.h @@ -15,9 +15,10 @@ extern const struct musb_platform_ops omap2430_ops; struct omap_musb_board_data { u8 interface_type; - void (*set_phy_power)(u8 on); - void (*clear_irq)(void); - void (*reset)(void); + struct udevice *dev; + void (*set_phy_power)(struct udevice *dev, u8 on); + void (*clear_irq)(struct udevice *dev); + void (*reset)(struct udevice *dev); }; enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI}; -- cgit v1.1