projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://git.denx.de/u-boot-spi
[oweals/u-boot.git]
/
drivers
/
usb
/
musb-new
/
musb_core.h
diff --git
a/drivers/usb/musb-new/musb_core.h
b/drivers/usb/musb-new/musb_core.h
index 26957420981774ff4858ec71cc396202a50b5dce..c8180404811fa6146a5893a6514455a67d920641 100644
(file)
--- a/
drivers/usb/musb-new/musb_core.h
+++ b/
drivers/usb/musb-new/musb_core.h
@@
-97,7
+97,7
@@
struct musb_ep;
#ifndef __UBOOT__
#define is_peripheral_capable() (1)
#else
#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)
#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
#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)
#define is_host_capable() (1)
#else
#define is_host_capable() (0)
@@
-231,7
+231,11
@@
struct musb_platform_ops {
int (*init)(struct musb *musb);
int (*exit)(struct musb *musb);
int (*init)(struct musb *musb);
int (*exit)(struct musb *musb);
+#ifndef __UBOOT__
void (*enable)(struct musb *musb);
void (*enable)(struct musb *musb);
+#else
+ int (*enable)(struct musb *musb);
+#endif
void (*disable)(struct musb *musb);
int (*set_mode)(struct musb *musb, u8 mode);
void (*disable)(struct musb *musb);
int (*set_mode)(struct musb *musb, u8 mode);
@@
-546,7
+550,11
@@
static inline void musb_configure_ep0(struct musb *musb)
extern const char musb_driver_name[];
extern const char musb_driver_name[];
+#ifndef __UBOOT__
extern void musb_start(struct musb *musb);
extern void musb_start(struct musb *musb);
+#else
+extern int musb_start(struct musb *musb);
+#endif
extern void musb_stop(struct musb *musb);
extern void musb_write_fifo(struct musb_hw_ep *ep, u16 len, const u8 *src);
extern void musb_stop(struct musb *musb);
extern void musb_write_fifo(struct musb_hw_ep *ep, u16 len, const u8 *src);
@@
-564,11
+572,21
@@
static inline void musb_platform_set_vbus(struct musb *musb, int is_on)
musb->ops->set_vbus(musb, is_on);
}
musb->ops->set_vbus(musb, is_on);
}
+#ifndef __UBOOT__
static inline void musb_platform_enable(struct musb *musb)
{
if (musb->ops->enable)
musb->ops->enable(musb);
}
static inline void musb_platform_enable(struct musb *musb)
{
if (musb->ops->enable)
musb->ops->enable(musb);
}
+#else
+static inline int musb_platform_enable(struct musb *musb)
+{
+ if (!musb->ops->enable)
+ return 0;
+
+ return musb->ops->enable(musb);
+}
+#endif
static inline void musb_platform_disable(struct musb *musb)
{
static inline void musb_platform_disable(struct musb *musb)
{