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-cfi-flash
[oweals/u-boot.git]
/
cpu
/
ppc4xx
/
usb_ohci.c
diff --git
a/cpu/ppc4xx/usb_ohci.c
b/cpu/ppc4xx/usb_ohci.c
index ab852c525cf73403483cf0159e1ff18e75324d0b..2607ed650c6487fc4d5bb131110cba93957d8410 100644
(file)
--- a/
cpu/ppc4xx/usb_ohci.c
+++ b/
cpu/ppc4xx/usb_ohci.c
@@
-56,8
+56,8
@@
#define OHCI_CONTROL_INIT \
(OHCI_CTRL_CBSR & 0x3) | OHCI_CTRL_IE | OHCI_CTRL_PLE
#define OHCI_CONTROL_INIT \
(OHCI_CTRL_CBSR & 0x3) | OHCI_CTRL_IE | OHCI_CTRL_PLE
-#define readl(a) (*((v
u_long
*)(a)))
-#define writel(a, b) (*((v
u_long *)(b)) = ((vu_long
)a))
+#define readl(a) (*((v
olatile u32
*)(a)))
+#define writel(a, b) (*((v
olatile u32 *)(b)) = ((volatile u32
)a))
#define min_t(type,x,y) ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
#define min_t(type,x,y) ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
@@
-76,7
+76,7
@@
#define m16_swap(x) swap_16(x)
#define m32_swap(x) swap_32(x)
#define m16_swap(x) swap_16(x)
#define m32_swap(x) swap_32(x)
-#if defined(CONFIG_440EP) || defined(CONFIG_440EPX)
+#if defined(CONFIG_4
05EZ) || defined(CONFIG_4
40EP) || defined(CONFIG_440EPX)
#define ohci_cpu_to_le16(x) (x)
#define ohci_cpu_to_le32(x) (x)
#else
#define ohci_cpu_to_le16(x) (x)
#define ohci_cpu_to_le32(x) (x)
#else
@@
-660,7
+660,7
@@
static void td_fill (ohci_t *ohci, unsigned int info,
td->index = index;
td->data = (__u32)data;
#ifdef OHCI_FILL_TRACE
td->index = index;
td->data = (__u32)data;
#ifdef OHCI_FILL_TRACE
- if (
(usb_pipetype(urb_priv->pipe) == PIPE_BULK
) && usb_pipeout(urb_priv->pipe)) {
+ if (
usb_pipebulk(urb_priv->pipe
) && usb_pipeout(urb_priv->pipe)) {
for (i = 0; i < len; i++)
printf("td->data[%d] %#2x ",i, ((unsigned char *)td->data)[i]);
printf("\n");
for (i = 0; i < len; i++)
printf("td->data[%d] %#2x ",i, ((unsigned char *)td->data)[i]);
printf("\n");
@@
-761,7
+761,7
@@
static void dl_transfer_length(td_t * td)
tdCBP = ohci_cpu_to_le32 (td->hwCBP);
tdCBP = ohci_cpu_to_le32 (td->hwCBP);
- if (!(usb_pipe
type (lurb_priv->pipe) == PIPE_CONTROL
&&
+ if (!(usb_pipe
control(lurb_priv->pipe)
&&
((td->index == 0) || (td->index == lurb_priv->length - 1)))) {
if (tdBE != 0) {
if (td->hwCBP == 0)
((td->index == 0) || (td->index == lurb_priv->length - 1)))) {
if (tdBE != 0) {
if (td->hwCBP == 0)
@@
-1023,7
+1023,7
@@
static int ohci_submit_rh_msg(struct usb_device *dev, unsigned long pipe,
urb_priv.actual_length = 0;
pkt_print(dev, pipe, buffer, transfer_len, cmd, "SUB(rh)", usb_pipein(pipe));
#endif
urb_priv.actual_length = 0;
pkt_print(dev, pipe, buffer, transfer_len, cmd, "SUB(rh)", usb_pipein(pipe));
#endif
- if (
(pipe & PIPE_INTERRUPT) == PIPE_INTERRUPT
) {
+ if (
usb_pipeint(pipe)
) {
info("Root-Hub submit IRQ: NOT implemented");
return 0;
}
info("Root-Hub submit IRQ: NOT implemented");
return 0;
}
@@
-1248,7
+1248,7
@@
int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
/* allow more time for a BULK device to react - some are slow */
#define BULK_TO 5000 /* timeout in milliseconds */
/* allow more time for a BULK device to react - some are slow */
#define BULK_TO 5000 /* timeout in milliseconds */
- if (usb_pipe
type (pipe) == PIPE_BULK
)
+ if (usb_pipe
bulk(pipe)
)
timeout = BULK_TO;
else
timeout = 100;
timeout = BULK_TO;
else
timeout = 100;
@@
-1600,9
+1600,9
@@
int usb_lowlevel_init(void)
gohci.sleeping = 0;
gohci.irq = -1;
#if defined(CONFIG_440EP)
gohci.sleeping = 0;
gohci.irq = -1;
#if defined(CONFIG_440EP)
- gohci.regs = (struct ohci_regs *)(C
FG
_PERIPHERAL_BASE | 0x1000);
-#elif defined(CONFIG_440EPX)
- gohci.regs = (struct ohci_regs *)(C
FG
_USB_HOST);
+ gohci.regs = (struct ohci_regs *)(C
ONFIG_SYS
_PERIPHERAL_BASE | 0x1000);
+#elif defined(CONFIG_440EPX)
|| defined(CONFIG_SYS_USB_HOST)
+ gohci.regs = (struct ohci_regs *)(C
ONFIG_SYS
_USB_HOST);
#endif
gohci.flags = 0;
#endif
gohci.flags = 0;
@@
-1625,8
+1625,10
@@
int usb_lowlevel_init(void)
ohci_inited = 1;
urb_finished = 1;
ohci_inited = 1;
urb_finished = 1;
+#if defined(CONFIG_440EP) || defined(CONFIG_440EPX)
/* init the device driver */
usb_dev_init();
/* init the device driver */
usb_dev_init();
+#endif
return 0;
}
return 0;
}