summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authoramartin@nvidia.com <amartin@nvidia.com>2011-12-20 14:56:16 +0000
committerWolfgang Denk <wd@denx.de>2012-03-03 16:56:29 +0100
commitf9636e8d38abde096fbb32fee5a36bbdb02b7cae (patch)
tree7b09e54faa06756e07ae31a7a9c08ee4b780492d /drivers
parentfb3ef649ed5cf3e5e73aea6ed161cdde37cb7a5f (diff)
downloadu-boot-imx-f9636e8d38abde096fbb32fee5a36bbdb02b7cae.zip
u-boot-imx-f9636e8d38abde096fbb32fee5a36bbdb02b7cae.tar.gz
u-boot-imx-f9636e8d38abde096fbb32fee5a36bbdb02b7cae.tar.bz2
USB: move keyboard polling into kbd driver
This moves keyboard polling logic from USB HCD drivers into USB keyboard driver. Remove usb_event_poll() as keyboard polling was the only user of this API. With this patch USB keyboard works with EHCI controllers again. Tested on a tegra2 seaboard. Signed-off-by: Allen Martin <amartin@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/ehci-hcd.c30
-rw-r--r--drivers/usb/host/ohci-hcd.c6
-rw-r--r--drivers/usb/host/r8a66597-hcd.c6
-rw-r--r--drivers/usb/musb/musb_hcd.c28
4 files changed, 0 insertions, 70 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 3f7bc2c..d6fee81 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -26,10 +26,6 @@
#include <asm/io.h>
#include <malloc.h>
#include <watchdog.h>
-#ifdef CONFIG_USB_KEYBOARD
-#include <stdio_dev.h>
-extern unsigned char new[];
-#endif
#include "ehci.h"
@@ -910,29 +906,3 @@ submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
return ehci_submit_async(dev, pipe, buffer, length, NULL);
}
-#ifdef CONFIG_SYS_USB_EVENT_POLL
-/*
- * This function polls for USB keyboard data.
- */
-void usb_event_poll()
-{
- struct stdio_dev *dev;
- struct usb_device *usb_kbd_dev;
- struct usb_interface *iface;
- struct usb_endpoint_descriptor *ep;
- int pipe;
- int maxp;
-
- /* Get the pointer to USB Keyboard device pointer */
- dev = stdio_get_by_name("usbkbd");
- usb_kbd_dev = (struct usb_device *)dev->priv;
- iface = &usb_kbd_dev->config.if_desc[0];
- ep = &iface->ep_desc[0];
- pipe = usb_rcvintpipe(usb_kbd_dev, ep->bEndpointAddress);
-
- /* Submit a interrupt transfer request */
- maxp = usb_maxpacket(usb_kbd_dev, pipe);
- usb_submit_int_msg(usb_kbd_dev, pipe, &new[0],
- maxp > 8 ? 8 : maxp, ep->bInterval);
-}
-#endif /* CONFIG_SYS_USB_EVENT_POLL */
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index cf906b4..1a428e9 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1771,12 +1771,6 @@ static int hc_start(ohci_t *ohci)
/*-------------------------------------------------------------------------*/
-/* Poll USB interrupt. */
-void usb_event_poll(void)
-{
- hc_interrupt();
-}
-
/* an interrupt happens */
static int hc_interrupt(void)
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index db611b6..aa753d8 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -908,12 +908,6 @@ int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
return 0;
}
-void usb_event_poll(void)
-{
- /* no implement */
- R8A66597_DPRINT("%s\n", __func__);
-}
-
int usb_lowlevel_init(void)
{
struct r8a66597 *r8a66597 = &gr8a66597;
diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c
index 325edb9..db7161f 100644
--- a/drivers/usb/musb/musb_hcd.c
+++ b/drivers/usb/musb/musb_hcd.c
@@ -1265,31 +1265,3 @@ int submit_int_msg(struct usb_device *dev, unsigned long pipe,
dev->act_len = len;
return 0;
}
-
-
-#ifdef CONFIG_SYS_USB_EVENT_POLL
-/*
- * This function polls for USB keyboard data.
- */
-void usb_event_poll()
-{
- struct stdio_dev *dev;
- struct usb_device *usb_kbd_dev;
- struct usb_interface *iface;
- struct usb_endpoint_descriptor *ep;
- int pipe;
- int maxp;
-
- /* Get the pointer to USB Keyboard device pointer */
- dev = stdio_get_by_name("usbkbd");
- usb_kbd_dev = (struct usb_device *)dev->priv;
- iface = &usb_kbd_dev->config.if_desc[0];
- ep = &iface->ep_desc[0];
- pipe = usb_rcvintpipe(usb_kbd_dev, ep->bEndpointAddress);
-
- /* Submit a interrupt transfer request */
- maxp = usb_maxpacket(usb_kbd_dev, pipe);
- usb_submit_int_msg(usb_kbd_dev, pipe, &new[0],
- maxp > 8 ? 8 : maxp, ep->bInterval);
-}
-#endif /* CONFIG_SYS_USB_EVENT_POLL */