aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2024-09-01 16:26:17 -0600
committerTom Rini <trini@konsulko.com>2024-09-18 13:00:59 -0600
commit4048219957fec6da92def7ca88ebf3836574856e (patch)
treee7974c25c4092cf50fec212bcb8e7e690fbf2927 /common
parenta3fab7d1fb5d8daf762c9d6bfae3069f742c579e (diff)
downloadu-boot-4048219957fec6da92def7ca88ebf3836574856e.tar.gz
usb: Drop old non-DM code
The driver model deadline for USB was in 2019, so drop the old USB keyboard code, to avoid needing to deal with the extra code path. Drop the unnecessary #ifdef around USB_KBD_BOOT_REPORT_SIZE while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/usb_kbd.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index f3b4a3c94e6..b834b2f703d 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -643,71 +643,6 @@ static int probe_usb_keyboard(struct usb_device *dev)
return 0;
}
-#if !CONFIG_IS_ENABLED(DM_USB)
-/* Search for keyboard and register it if found. */
-int drv_usb_kbd_init(void)
-{
- int error, i;
-
- debug("%s: Probing for keyboard\n", __func__);
- /* Scan all USB Devices */
- for (i = 0; i < USB_MAX_DEVICE; i++) {
- struct usb_device *dev;
-
- /* Get USB device. */
- dev = usb_get_dev_index(i);
- if (!dev)
- break;
-
- if (dev->devnum == -1)
- continue;
-
- error = probe_usb_keyboard(dev);
- if (!error)
- return 1;
- if (error && error != -ENOENT)
- return error;
- }
-
- /* No USB Keyboard found */
- return -1;
-}
-
-/* Deregister the keyboard. */
-int usb_kbd_deregister(int force)
-{
-#if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER)
- struct stdio_dev *dev;
- struct usb_device *usb_kbd_dev;
- struct usb_kbd_pdata *data;
-
- dev = stdio_get_by_name(DEVNAME);
- if (dev) {
- usb_kbd_dev = (struct usb_device *)dev->priv;
- data = usb_kbd_dev->privptr;
-#if CONFIG_IS_ENABLED(CONSOLE_MUX)
- if (iomux_replace_device(stdin, DEVNAME, force ? "nulldev" : ""))
- return 1;
-#endif
- if (stdio_deregister_dev(dev, force) != 0)
- return 1;
-#ifdef CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
- destroy_int_queue(usb_kbd_dev, data->intq);
-#endif
- free(data->new);
- free(data);
- }
-
- return 0;
-#else
- return 1;
-#endif
-}
-
-#endif
-
-#if CONFIG_IS_ENABLED(DM_USB)
-
static int usb_kbd_probe(struct udevice *dev)
{
struct usb_device *udev = dev_get_parent_priv(dev);
@@ -788,5 +723,3 @@ static const struct usb_device_id kbd_id_table[] = {
};
U_BOOT_USB_DEVICE(usb_kbd, kbd_id_table);
-
-#endif