summaryrefslogtreecommitdiff
path: root/drivers/usb_ohci.c
diff options
context:
space:
mode:
authorMarkus Klotzbuecher <mk@denx.de>2007-09-17 17:12:45 +0200
committerMarkus Klotzbuecher <mk@pollux.denx.de>2007-09-17 17:12:45 +0200
commitf930922f061ea7bf585296859d1c14194c24b840 (patch)
treec46b9f120f7c55f5baf8b6ac3048ba759e10a512 /drivers/usb_ohci.c
parent97213f32416ead885deafea86774e912ffd60ad0 (diff)
parent67c31036acaaaa992fc346cc89db0909a7e733c4 (diff)
downloadu-boot-imx-f930922f061ea7bf585296859d1c14194c24b840.zip
u-boot-imx-f930922f061ea7bf585296859d1c14194c24b840.tar.gz
u-boot-imx-f930922f061ea7bf585296859d1c14194c24b840.tar.bz2
Merge with git://www.denx.de/git/u-boot.git
Diffstat (limited to 'drivers/usb_ohci.c')
-rw-r--r--drivers/usb_ohci.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/usb_ohci.c b/drivers/usb_ohci.c
index 388827f..7ddcab6 100644
--- a/drivers/usb_ohci.c
+++ b/drivers/usb_ohci.c
@@ -133,8 +133,6 @@ int got_rhsc;
/* device which was disconnected */
struct usb_device *devgone;
-
-
/*-------------------------------------------------------------------------*/
/* AMD-756 (D2 rev) reports corrupt register contents in some cases.
@@ -158,7 +156,6 @@ static inline u32 roothub_status (struct ohci *hc)
static u32 roothub_portstatus (struct ohci *hc, int i)
{ return read_roothub (hc, portstatus [i], 0xffe0fce0); }
-
/* forward declaration */
static int hc_interrupt (void);
static void
@@ -413,8 +410,6 @@ static void ohci_dump (ohci_t *controller, int verbose)
ep_print_int_eds (controller, "hcca");
dbg ("hcca frame #%04x", controller->hcca->frame_no);
ohci_dump_roothub (controller, 1);
-}
-
#endif /* DEBUG */
@@ -675,7 +670,7 @@ static int ep_link (ohci_t *ohci, ed_t *edi)
ed_p = &(((ed_t *)ed_p)->hwNextED))
inter = ep_rev (6, ((ed_t *)ed_p)->int_interval);
ed->hwNextED = *ed_p;
- *ed_p = m32_swap(ed);
+ *ed_p = m32_swap((unsigned long)ed);
}
break;
}
@@ -693,16 +688,15 @@ static void periodic_unlink ( struct ohci *ohci, volatile struct ed *ed,
/* ED might have been unlinked through another path */
while (*ed_p != 0) {
- if (((struct ed *)m32_swap (ed_p)) == ed) {
+ if (((struct ed *)m32_swap ((unsigned long)ed_p)) == ed) {
*ed_p = ed->hwNextED;
break;
}
- ed_p = & (((struct ed *)m32_swap (ed_p))->hwNextED);
+ ed_p = & (((struct ed *)m32_swap ((unsigned long)ed_p))->hwNextED);
}
}
}
-
/* unlink an ed from one of the HC chains.
* just the link to the ed is unlinked.
* the link from the ed still points to another operational ed or 0
@@ -760,7 +754,6 @@ static int ep_unlink (ohci_t *ohci, ed_t *edi)
return 0;
}
-
/*-------------------------------------------------------------------------*/
/* add/reinit an endpoint; this should be done once at the
@@ -940,7 +933,6 @@ static void td_submit_job (struct usb_device *dev, unsigned long pipe, void *buf
* Done List handling functions
*-------------------------------------------------------------------------*/
-
/* calculate the transfer length and update the urb */
static void dl_transfer_length(td_t * td)
@@ -952,7 +944,6 @@ static void dl_transfer_length(td_t * td)
tdBE = m32_swap (td->hwBE);
tdCBP = m32_swap (td->hwCBP);
-
if (!(usb_pipetype (lurb_priv->pipe) == PIPE_CONTROL &&
((td->index == 0) || (td->index == lurb_priv->length - 1)))) {
if (tdBE != 0) {
@@ -1095,7 +1086,6 @@ static __u8 root_hub_dev_des[] =
0x01 /* __u8 bNumConfigurations; */
};
-
/* Configuration descriptor */
static __u8 root_hub_config_des[] =
{
@@ -1173,7 +1163,6 @@ static unsigned char root_hub_str_index1[] =
/* Hub class-specific descriptor is constructed dynamically */
-
/*-------------------------------------------------------------------------*/
#define OK(x) len = (x); break