diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-05-06 00:56:09 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-05-06 21:48:35 +0300 |
commit | 3c5497d831fe2450b47eead2c8b57602028ecdea (patch) | |
tree | a9a6ca7598a374c10a173de3f3d66813f2df0727 /drivers/usb/host/ohci-hcd.c | |
parent | 19d95d57299d1f9395934cd365625bebef399748 (diff) | |
download | u-boot-3c5497d831fe2450b47eead2c8b57602028ecdea.tar.xz |
usb: ohci: Move the td array struct to inside the ohci_dev struct
This is a preparation patch for adding driver-model support.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers/usb/host/ohci-hcd.c')
-rw-r--r-- | drivers/usb/host/ohci-hcd.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 745825cd32..b5676ab05d 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -447,7 +447,7 @@ int sohci_submit_job(ohci_t *ohci, ohci_dev_t *ohci_dev, urb_priv_t *urb, /* allocate the TDs */ /* note that td[0] was allocated in ep_add_ed */ for (i = 0; i < size; i++) { - purb_priv->td[i] = td_alloc(dev); + purb_priv->td[i] = td_alloc(ohci_dev, dev); if (!purb_priv->td[i]) { purb_priv->length = i; urb_free_priv(purb_priv); @@ -760,7 +760,7 @@ static ed_t *ep_add_ed(ohci_dev_t *ohci_dev, struct usb_device *usb_dev, if (ed->state == ED_NEW) { /* dummy td; end of td list for ed */ - td = td_alloc(usb_dev); + td = td_alloc(ohci_dev, usb_dev); ed->hwTailP = m32_swap((unsigned long)td); ed->hwHeadP = ed->hwTailP; ed->state = ED_UNLINK; @@ -1762,12 +1762,6 @@ int usb_lowlevel_init(int index, enum usb_init_type init, void **controller) } phcca = &ghcca[0]; info("aligned ghcca %p", phcca); - memset(gtd, 0, sizeof(td_t) * (NUM_TD + 1)); - if ((__u32)gtd & 0x7) { - err("TDs not aligned!!"); - return -1; - } - ptd = gtd; gohci.hcca = phcca; memset(phcca, 0, sizeof(struct ohci_hcca)); |