projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SPDX: Convert all of our single license tags to Linux Kernel style
[platform/kernel/u-boot.git]
/
drivers
/
usb
/
host
/
ohci-hcd.c
diff --git
a/drivers/usb/host/ohci-hcd.c
b/drivers/usb/host/ohci-hcd.c
index
ccbfc02
..
6ea9f10
100644
(file)
--- a/
drivers/usb/host/ohci-hcd.c
+++ b/
drivers/usb/host/ohci-hcd.c
@@
-1,3
+1,4
@@
+// SPDX-License-Identifier: GPL-2.0+
/*
* URB OHCI HCD (Host Controller Driver) for USB on the AT91RM9200 and PCI bus.
*
/*
* URB OHCI HCD (Host Controller Driver) for USB on the AT91RM9200 and PCI bus.
*
@@
-16,8
+17,6
@@
*
* Modified for the MP2USB by (C) Copyright 2005 Eric Benard
* ebenard@eukrea.com - based on s3c24x0's driver
*
* Modified for the MP2USB by (C) Copyright 2005 Eric Benard
* ebenard@eukrea.com - based on s3c24x0's driver
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
/*
* IMPORTANT NOTES
*/
/*
* IMPORTANT NOTES
@@
-51,10
+50,7
@@
#endif
#if defined(CONFIG_CPU_ARM920T) || \
#endif
#if defined(CONFIG_CPU_ARM920T) || \
- defined(CONFIG_S3C24X0) || \
- defined(CONFIG_440EP) || \
defined(CONFIG_PCI_OHCI) || \
defined(CONFIG_PCI_OHCI) || \
- defined(CONFIG_MPC5200) || \
defined(CONFIG_SYS_OHCI_USE_NPS)
# define OHCI_USE_NPS /* force NoPowerSwitching mode */
#endif
defined(CONFIG_SYS_OHCI_USE_NPS)
# define OHCI_USE_NPS /* force NoPowerSwitching mode */
#endif
@@
-682,7
+678,7
@@
static int ep_link(ohci_t *ohci, ed_t *edi)
ed->hwNextED = 0;
flush_dcache_ed(ed);
if (ohci->ed_controltail == NULL)
ed->hwNextED = 0;
flush_dcache_ed(ed);
if (ohci->ed_controltail == NULL)
- ohci_writel(ed, &ohci->regs->ed_controlhead);
+ ohci_writel(
(uintptr_t)
ed, &ohci->regs->ed_controlhead);
else
ohci->ed_controltail->hwNextED =
m32_swap((unsigned long)ed);
else
ohci->ed_controltail->hwNextED =
m32_swap((unsigned long)ed);
@@
-700,7
+696,7
@@
static int ep_link(ohci_t *ohci, ed_t *edi)
ed->hwNextED = 0;
flush_dcache_ed(ed);
if (ohci->ed_bulktail == NULL)
ed->hwNextED = 0;
flush_dcache_ed(ed);
if (ohci->ed_bulktail == NULL)
- ohci_writel(ed, &ohci->regs->ed_bulkhead);
+ ohci_writel(
(uintptr_t)
ed, &ohci->regs->ed_bulkhead);
else
ohci->ed_bulktail->hwNextED =
m32_swap((unsigned long)ed);
else
ohci->ed_bulktail->hwNextED =
m32_swap((unsigned long)ed);
@@
-753,7
+749,7
@@
static void periodic_unlink(struct ohci *ohci, volatile struct ed *ed,
/* ED might have been unlinked through another path */
while (*ed_p != 0) {
/* ED might have been unlinked through another path */
while (*ed_p != 0) {
- if (((struct ed *)
+ if (((struct ed *)
(uintptr_t)
m32_swap((unsigned long)ed_p)) == ed) {
*ed_p = ed->hwNextED;
aligned_ed_p = (unsigned long)ed_p;
m32_swap((unsigned long)ed_p)) == ed) {
*ed_p = ed->hwNextED;
aligned_ed_p = (unsigned long)ed_p;
@@
-762,7
+758,7
@@
static void periodic_unlink(struct ohci *ohci, volatile struct ed *ed,
aligned_ed_p + ARCH_DMA_MINALIGN);
break;
}
aligned_ed_p + ARCH_DMA_MINALIGN);
break;
}
- ed_p = &(((struct ed *)
+ ed_p = &(((struct ed *)
(uintptr_t)
m32_swap((unsigned long)ed_p))->hwNextED);
}
}
m32_swap((unsigned long)ed_p))->hwNextED);
}
}
@@
-798,7
+794,7
@@
static int ep_unlink(ohci_t *ohci, ed_t *edi)
if (ohci->ed_controltail == ed) {
ohci->ed_controltail = ed->ed_prev;
} else {
if (ohci->ed_controltail == ed) {
ohci->ed_controltail = ed->ed_prev;
} else {
- ((ed_t *)m32_swap(
+ ((ed_t *)
(uintptr_t)
m32_swap(
*((__u32 *)&ed->hwNextED)))->ed_prev = ed->ed_prev;
}
break;
*((__u32 *)&ed->hwNextED)))->ed_prev = ed->ed_prev;
}
break;
@@
-819,7
+815,7
@@
static int ep_unlink(ohci_t *ohci, ed_t *edi)
if (ohci->ed_bulktail == ed) {
ohci->ed_bulktail = ed->ed_prev;
} else {
if (ohci->ed_bulktail == ed) {
ohci->ed_bulktail = ed->ed_prev;
} else {
- ((ed_t *)m32_swap(
+ ((ed_t *)
(uintptr_t)
m32_swap(
*((__u32 *)&ed->hwNextED)))->ed_prev = ed->ed_prev;
}
break;
*((__u32 *)&ed->hwNextED)))->ed_prev = ed->ed_prev;
}
break;
@@
-914,12
+910,13
@@
static void td_fill(ohci_t *ohci, unsigned int info,
/* fill the old dummy TD */
td = urb_priv->td [index] =
/* fill the old dummy TD */
td = urb_priv->td [index] =
- (td_t *)(m32_swap(urb_priv->ed->hwTailP) & ~0xf);
+ (td_t *)(uintptr_t)
+ (m32_swap(urb_priv->ed->hwTailP) & ~0xf);
td->ed = urb_priv->ed;
td->next_dl_td = NULL;
td->index = index;
td->ed = urb_priv->ed;
td->next_dl_td = NULL;
td->index = index;
- td->data = (
__u32
)data;
+ td->data = (
uintptr_t
)data;
#ifdef OHCI_FILL_TRACE
if (usb_pipebulk(urb_priv->pipe) && usb_pipeout(urb_priv->pipe)) {
for (i = 0; i < len; i++)
#ifdef OHCI_FILL_TRACE
if (usb_pipebulk(urb_priv->pipe) && usb_pipeout(urb_priv->pipe)) {
for (i = 0; i < len; i++)
@@
-963,7
+960,7
@@
static void td_submit_job(ohci_t *ohci, struct usb_device *dev,
flush_dcache_buffer(buffer, data_len);
/* OHCI handles the DATA-toggles itself, we just use the USB-toggle
flush_dcache_buffer(buffer, data_len);
/* OHCI handles the DATA-toggles itself, we just use the USB-toggle
- * bits for reseting */
+ * bits for reset
t
ing */
if (usb_gettoggle(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe))) {
toggle = TD_T_TOGGLE;
} else {
if (usb_gettoggle(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe))) {
toggle = TD_T_TOGGLE;
} else {
@@
-1088,10
+1085,6
@@
static void check_status(td_t *td_list)
*phwHeadP &= m32_swap(0xfffffff2);
flush_dcache_ed(td_list->ed);
}
*phwHeadP &= m32_swap(0xfffffff2);
flush_dcache_ed(td_list->ed);
}
-#ifdef CONFIG_MPC5200
- td_list->hwNextTD = 0;
- flush_dcache_td(td_list);
-#endif
}
}
}
}
@@
-1099,7
+1092,7
@@
static void check_status(td_t *td_list)
* we reverse the reversed done-list */
static td_t *dl_reverse_done_list(ohci_t *ohci)
{
* we reverse the reversed done-list */
static td_t *dl_reverse_done_list(ohci_t *ohci)
{
-
__u32
td_list_hc;
+
uintptr_t
td_list_hc;
td_t *td_rev = NULL;
td_t *td_list = NULL;
td_t *td_rev = NULL;
td_t *td_list = NULL;
@@
-1862,7
+1855,7
@@
static int hc_start(ohci_t *ohci)
ohci_writel(0, &ohci->regs->ed_controlhead);
ohci_writel(0, &ohci->regs->ed_bulkhead);
ohci_writel(0, &ohci->regs->ed_controlhead);
ohci_writel(0, &ohci->regs->ed_bulkhead);
- ohci_writel((
__u32
)ohci->hcca,
+ ohci_writel((
uintptr_t
)ohci->hcca,
&ohci->regs->hcca); /* reset clears this */
fminterval = 0x2edf;
&ohci->regs->hcca); /* reset clears this */
fminterval = 0x2edf;