diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/board_info.c | 7 | ||||
-rw-r--r-- | common/cmd_fastboot.c | 33 | ||||
-rw-r--r-- | common/cmd_fdt.c | 2 | ||||
-rw-r--r-- | common/cmd_mp.c | 22 | ||||
-rw-r--r-- | common/cmd_pxe.c | 8 | ||||
-rw-r--r-- | common/cmd_tsi148.c | 8 | ||||
-rw-r--r-- | common/cmd_usb.c | 28 | ||||
-rw-r--r-- | common/console.c | 25 | ||||
-rw-r--r-- | common/exports.c | 7 | ||||
-rw-r--r-- | common/fdt_support.c | 3 | ||||
-rw-r--r-- | common/image.c | 58 | ||||
-rw-r--r-- | common/spl/spl.c | 36 | ||||
-rw-r--r-- | common/spl/spl_mmc.c | 31 | ||||
-rw-r--r-- | common/usb.c | 20 | ||||
-rw-r--r-- | common/usb_hub.c | 2 | ||||
-rw-r--r-- | common/usb_kbd.c | 4 | ||||
-rw-r--r-- | common/usb_storage.c | 2 |
17 files changed, 203 insertions, 93 deletions
diff --git a/common/board_info.c b/common/board_info.c index 42d0641294a..4e5a1f78081 100644 --- a/common/board_info.c +++ b/common/board_info.c @@ -14,8 +14,7 @@ int __weak checkboard(void) /* * If the root node of the DTB has a "model" property, show it. - * If CONFIG_OF_CONTROL is disabled or the "model" property is missing, - * fall back to checkboard(). + * Then call checkboard(). */ int show_board_info(void) { @@ -25,10 +24,8 @@ int show_board_info(void) model = fdt_getprop(gd->fdt_blob, 0, "model", NULL); - if (model) { + if (model) printf("Model: %s\n", model); - return 0; - } #endif return checkboard(); diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index d52ccfb3100..b9d1c8c02bd 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -10,11 +10,26 @@ #include <common.h> #include <command.h> #include <g_dnl.h> +#include <usb.h> static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { + int controller_index; + char *usb_controller; int ret; + if (argc < 2) + return CMD_RET_USAGE; + + usb_controller = argv[1]; + controller_index = simple_strtoul(usb_controller, NULL, 0); + + ret = board_usb_init(controller_index, USB_INIT_DEVICE); + if (ret) { + error("USB init failed: %d", ret); + return CMD_RET_FAILURE; + } + g_dnl_clear_detach(); ret = g_dnl_register("usb_dnl_fastboot"); if (ret) @@ -23,9 +38,8 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) if (!g_dnl_board_usb_cable_connected()) { puts("\rUSB cable not detected.\n" \ "Command exit.\n"); - g_dnl_unregister(); - g_dnl_clear_detach(); - return CMD_RET_FAILURE; + ret = CMD_RET_FAILURE; + goto exit; } while (1) { @@ -33,17 +47,22 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) break; if (ctrlc()) break; - usb_gadget_handle_interrupts(0); + usb_gadget_handle_interrupts(controller_index); } + ret = CMD_RET_SUCCESS; + +exit: g_dnl_unregister(); g_dnl_clear_detach(); - return CMD_RET_SUCCESS; + board_usb_cleanup(controller_index, USB_INIT_DEVICE); + + return ret; } U_BOOT_CMD( - fastboot, 1, 0, do_fastboot, + fastboot, 2, 1, do_fastboot, "use USB Fastboot protocol", - "\n" + "<USB_controller>\n" " - run as a fastboot usb device" ); diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c index 682b6553958..4c18962d853 100644 --- a/common/cmd_fdt.c +++ b/common/cmd_fdt.c @@ -45,7 +45,7 @@ void set_working_fdt_addr(ulong addr) buf = map_sysmem(addr, 0); working_fdt = buf; - setenv_ulong("fdtaddr", addr); + setenv_hex("fdtaddr", addr); } /* diff --git a/common/cmd_mp.c b/common/cmd_mp.c index 328b338068b..a80c6421575 100644 --- a/common/cmd_mp.c +++ b/common/cmd_mp.c @@ -7,11 +7,32 @@ #include <common.h> #include <command.h> +static int cpu_status_all(void) +{ + unsigned long cpuid; + + for (cpuid = 0; ; cpuid++) { + if (!is_core_valid(cpuid)) { + if (cpuid == 0) { + printf("Core num: %lu is not valid\n", cpuid); + return 1; + } + break; + } + cpu_status(cpuid); + } + + return 0; +} + static int cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { unsigned long cpuid; + if (argc == 2 && strncmp(argv[1], "status", 6) == 0) + return cpu_status_all(); + if (argc < 3) return CMD_RET_USAGE; @@ -48,6 +69,7 @@ cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #ifdef CONFIG_SYS_LONGHELP static char cpu_help_text[] = "<num> reset - Reset cpu <num>\n" + "cpu status - Status of all cpus\n" "cpu <num> status - Status of cpu <num>\n" "cpu <num> disable - Disable cpu <num>\n" "cpu <num> release <addr> [args] - Release cpu <num> at <addr> with [args]" diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c index abf0941b579..080b3760de0 100644 --- a/common/cmd_pxe.c +++ b/common/cmd_pxe.c @@ -793,8 +793,12 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label) /* Try bootm for legacy and FIT format image */ if (genimg_get_format(buf) != IMAGE_FORMAT_INVALID) do_bootm(cmdtp, 0, bootm_argc, bootm_argv); -#ifdef CONFIG_CMD_BOOTZ - /* Try booting a zImage */ +#ifdef CONFIG_CMD_BOOTI + /* Try booting an AArch64 Linux kernel image */ + else + do_booti(cmdtp, 0, bootm_argc, bootm_argv); +#elif defined(CONFIG_CMD_BOOTZ) + /* Try booting a Image */ else do_bootz(cmdtp, 0, bootm_argc, bootm_argv); #endif diff --git a/common/cmd_tsi148.c b/common/cmd_tsi148.c index dc488b2b3e5..ea96d0ffb0a 100644 --- a/common/cmd_tsi148.c +++ b/common/cmd_tsi148.c @@ -16,8 +16,8 @@ #include <tsi148.h> -#define PCI_VENDOR PCI_VENDOR_ID_TUNDRA -#define PCI_DEVICE PCI_DEVICE_ID_TUNDRA_TSI148 +#define LPCI_VENDOR PCI_VENDOR_ID_TUNDRA +#define LPCI_DEVICE PCI_DEVICE_ID_TUNDRA_TSI148 typedef struct _TSI148_DEV TSI148_DEV; @@ -41,7 +41,7 @@ int tsi148_init(void) pci_dev_t busdevfn; unsigned int val; - busdevfn = pci_find_device(PCI_VENDOR, PCI_DEVICE, 0); + busdevfn = pci_find_device(LPCI_VENDOR, LPCI_DEVICE, 0); if (busdevfn == -1) { puts("Tsi148: No Tundra Tsi148 found!\n"); return -1; @@ -68,7 +68,7 @@ int tsi148_init(void) /* check mapping */ debug("Tsi148: Read via mapping, PCI_ID = %08X\n", readl(&dev->uregs->pci_id)); - if (((PCI_DEVICE << 16) | PCI_VENDOR) != readl(&dev->uregs->pci_id)) { + if (((LPCI_DEVICE << 16) | LPCI_VENDOR) != readl(&dev->uregs->pci_id)) { printf("Tsi148: Cannot read PCI-ID via Mapping: %08x\n", readl(&dev->uregs->pci_id)); result = -1; diff --git a/common/cmd_usb.c b/common/cmd_usb.c index eab55cd6743..0ade7759f08 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -22,8 +22,8 @@ #ifdef CONFIG_USB_STORAGE static int usb_stor_curr_dev = -1; /* current device */ #endif -#ifdef CONFIG_USB_HOST_ETHER -static int usb_ether_curr_dev = -1; /* current ethernet device */ +#if defined(CONFIG_USB_HOST_ETHER) && !defined(CONFIG_DM_ETH) +static int __maybe_unused usb_ether_curr_dev = -1; /* current ethernet device */ #endif /* some display routines (info command) */ @@ -355,12 +355,12 @@ static void usb_show_tree_graph(struct usb_device *dev, char *pre) #endif /* check if we are the last one */ #ifdef CONFIG_DM_USB - last_child = device_is_last_sibling(dev->dev); + /* Not the root of the usb tree? */ + if (device_get_uclass_id(dev->dev->parent) != UCLASS_USB) { + last_child = device_is_last_sibling(dev->dev); #else - last_child = (dev->parent != NULL); -#endif - if (last_child) { -#ifndef CONFIG_DM_USB + if (dev->parent != NULL) { /* not root? */ + last_child = 1; for (i = 0; i < dev->parent->maxchild; i++) { /* search for children */ if (dev->parent->children[i] == dev) { @@ -530,11 +530,14 @@ static void do_usb_start(void) /* try to recognize storage devices immediately */ usb_stor_curr_dev = usb_stor_scan(1); #endif -#endif #ifdef CONFIG_USB_HOST_ETHER +# ifdef CONFIG_DM_ETH +# error "You must use CONFIG_DM_USB if you want to use CONFIG_USB_HOST_ETHER with CONFIG_DM_ETH" +# endif /* try to recognize ethernet devices immediately */ usb_ether_curr_dev = usb_host_eth_scan(1); #endif +#endif #ifdef CONFIG_USB_KEYBOARD drv_usb_kbd_init(); #endif @@ -630,12 +633,11 @@ static int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) bus; uclass_next_device(&bus)) { struct usb_device *udev; - struct udevice *hub; + struct udevice *dev; - device_find_first_child(bus, &hub); - if (device_get_uclass_id(hub) == UCLASS_USB_HUB && - device_active(hub)) { - udev = dev_get_parentdata(hub); + device_find_first_child(bus, &dev); + if (dev && device_active(dev)) { + udev = dev_get_parentdata(dev); usb_show_tree(udev); } } diff --git a/common/console.c b/common/console.c index 00582224d46..ace206ca4ff 100644 --- a/common/console.c +++ b/common/console.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <debug_uart.h> #include <stdarg.h> #include <iomux.h> #include <malloc.h> @@ -455,11 +456,19 @@ static inline void print_pre_console_buffer(int flushpoint) {} void putc(const char c) { #ifdef CONFIG_SANDBOX + /* sandbox can send characters to stdout before it has a console */ if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) { os_putc(c); return; } #endif +#ifdef CONFIG_DEBUG_UART + /* if we don't have a console yet, use the debug UART */ + if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) { + printch(c); + return; + } +#endif #ifdef CONFIG_SILENT_CONSOLE if (gd->flags & GD_FLG_SILENT) return; @@ -491,7 +500,18 @@ void puts(const char *s) return; } #endif +#ifdef CONFIG_DEBUG_UART + if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) { + while (*s) { + int ch = *s++; + printch(ch); + if (ch == '\n') + printch('\r'); + } + return; + } +#endif #ifdef CONFIG_SILENT_CONSOLE if (gd->flags & GD_FLG_SILENT) return; @@ -521,11 +541,6 @@ int printf(const char *fmt, ...) uint i; char printbuffer[CONFIG_SYS_PBSIZE]; -#if !defined(CONFIG_SANDBOX) && !defined(CONFIG_PRE_CONSOLE_BUFFER) - if (!gd->have_console) - return 0; -#endif - va_start(args, fmt); /* For this to work, printbuffer must be larger than diff --git a/common/exports.c b/common/exports.c index 333107c74c3..b4f1f7af152 100644 --- a/common/exports.c +++ b/common/exports.c @@ -16,6 +16,13 @@ unsigned long get_version(void) #define EXPORT_FUNC(f, a, x, ...) gd->jt->x = f; +#ifndef CONFIG_PHY_AQUANTIA +# define mdio_get_current_dev dummy +# define phy_find_by_mask dummy +# define mdio_phydev_for_ethname dummy +# define miiphy_set_current_dev dummy +#endif + void jumptable_init(void) { gd->jt = malloc(sizeof(struct jt_funcs)); diff --git a/common/fdt_support.c b/common/fdt_support.c index 10648b5a4a8..f86365e8f0d 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -454,6 +454,9 @@ int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks) return err; } + if (!banks) + return 0; + len = fdt_pack_reg(blob, tmp, start, size, banks); err = fdt_setprop(blob, nodeoffset, "reg", tmp, len); diff --git a/common/image.c b/common/image.c index f0f01351fe5..9efacf8b89e 100644 --- a/common/image.c +++ b/common/image.c @@ -543,6 +543,15 @@ void genimg_print_time(time_t timestamp) } #endif +const table_entry_t *get_table_entry(const table_entry_t *table, int id) +{ + for (; table->id >= 0; ++table) { + if (table->id == id) + return table; + } + return NULL; +} + /** * get_table_entry_name - translate entry id to long name * @table: pointer to a translation table for entries of a specific type @@ -559,15 +568,14 @@ void genimg_print_time(time_t timestamp) */ char *get_table_entry_name(const table_entry_t *table, char *msg, int id) { - for (; table->id >= 0; ++table) { - if (table->id == id) + table = get_table_entry(table, id); + if (!table) + return msg; #if defined(USE_HOSTCC) || !defined(CONFIG_NEEDS_MANUAL_RELOC) - return table->lname; + return table->lname; #else - return table->lname + gd->reloc_off; + return table->lname + gd->reloc_off; #endif - } - return (msg); } const char *genimg_get_os_name(uint8_t os) @@ -586,6 +594,20 @@ const char *genimg_get_type_name(uint8_t type) return (get_table_entry_name(uimage_type, "Unknown Image", type)); } +const char *genimg_get_type_short_name(uint8_t type) +{ + const table_entry_t *table; + + table = get_table_entry(uimage_type, type); + if (!table) + return "unknown"; +#if defined(USE_HOSTCC) || !defined(CONFIG_NEEDS_MANUAL_RELOC) + return table->sname; +#else + return table->sname + gd->reloc_off; +#endif +} + const char *genimg_get_comp_name(uint8_t comp) { return (get_table_entry_name(uimage_comp, "Unknown Compression", @@ -610,34 +632,18 @@ int get_table_entry_id(const table_entry_t *table, const char *table_name, const char *name) { const table_entry_t *t; -#ifdef USE_HOSTCC - int first = 1; - - for (t = table; t->id >= 0; ++t) { - if (t->sname && strcasecmp(t->sname, name) == 0) - return(t->id); - } - fprintf(stderr, "\nInvalid %s Type - valid names are", table_name); - for (t = table; t->id >= 0; ++t) { - if (t->sname == NULL) - continue; - fprintf(stderr, "%c %s", (first) ? ':' : ',', t->sname); - first = 0; - } - fprintf(stderr, "\n"); -#else for (t = table; t->id >= 0; ++t) { #ifdef CONFIG_NEEDS_MANUAL_RELOC - if (t->sname && strcmp(t->sname + gd->reloc_off, name) == 0) + if (t->sname && strcasecmp(t->sname + gd->reloc_off, name) == 0) #else - if (t->sname && strcmp(t->sname, name) == 0) + if (t->sname && strcasecmp(t->sname, name) == 0) #endif return (t->id); } debug("Invalid %s Type: %s\n", table_name, name); -#endif /* USE_HOSTCC */ - return (-1); + + return -1; } int genimg_get_os_id(const char *name) diff --git a/common/spl/spl.c b/common/spl/spl.c index aeb0645eda4..94b01da56ce 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -148,18 +148,12 @@ static void spl_ram_load_image(void) } #endif -void board_init_r(gd_t *dummy1, ulong dummy2) +int spl_init(void) { - u32 boot_device; int ret; - debug(">>spl:board_init_r()\n"); - -#if defined(CONFIG_SYS_SPL_MALLOC_START) - mem_malloc_init(CONFIG_SYS_SPL_MALLOC_START, - CONFIG_SYS_SPL_MALLOC_SIZE); - gd->flags |= GD_FLG_FULL_MALLOC_INIT; -#elif defined(CONFIG_SYS_MALLOC_F_LEN) + debug("spl_init()\n"); +#if defined(CONFIG_SYS_MALLOC_F_LEN) gd->malloc_limit = CONFIG_SYS_MALLOC_F_LEN; gd->malloc_ptr = 0; #endif @@ -168,17 +162,36 @@ void board_init_r(gd_t *dummy1, ulong dummy2) ret = fdtdec_setup(); if (ret) { debug("fdtdec_setup() returned error %d\n", ret); - hang(); + return ret; } } if (IS_ENABLED(CONFIG_SPL_DM)) { ret = dm_init_and_scan(true); if (ret) { debug("dm_init_and_scan() returned error %d\n", ret); - hang(); + return ret; } } + gd->flags |= GD_FLG_SPL_INIT; + + return 0; +} +void board_init_r(gd_t *dummy1, ulong dummy2) +{ + u32 boot_device; + + debug(">>spl:board_init_r()\n"); + +#if defined(CONFIG_SYS_SPL_MALLOC_START) + mem_malloc_init(CONFIG_SYS_SPL_MALLOC_START, + CONFIG_SYS_SPL_MALLOC_SIZE); + gd->flags |= GD_FLG_FULL_MALLOC_INIT; +#endif + if (!(gd->flags & GD_FLG_SPL_INIT)) { + if (spl_init()) + hang(); + } #ifndef CONFIG_PPC /* * timer_init() does not exist on PPC systems. The timer is initialized @@ -285,6 +298,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2) gd->malloc_ptr / 1024); #endif + debug("loaded - jumping to U-Boot..."); jump_to_image_no_args(&spl_image); } diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index 552f80d1e3d..494f683b0aa 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -7,6 +7,7 @@ * SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> +#include <dm.h> #include <spl.h> #include <linux/compiler.h> #include <asm/u-boot.h> @@ -26,11 +27,14 @@ static int mmc_load_image_raw_sector(struct mmc *mmc, unsigned long sector) /* read image header to find the image size & load address */ count = mmc->block_dev.block_read(0, sector, 1, header); + debug("read sector %lx, count=%lu\n", sector, count); if (count == 0) goto end; - if (image_get_magic(header) != IH_MAGIC) + if (image_get_magic(header) != IH_MAGIC) { + puts("bad magic\n"); return -1; + } spl_parse_image_header(header); @@ -40,7 +44,9 @@ static int mmc_load_image_raw_sector(struct mmc *mmc, unsigned long sector) /* Read the header too to avoid extra memcpy */ count = mmc->block_dev.block_read(0, sector, image_size_sectors, - (void *) spl_image.load_addr); + (void *)spl_image.load_addr); + debug("read %x sectors to %x\n", image_size_sectors, + spl_image.load_addr); end: if (count == 0) { @@ -67,7 +73,12 @@ static int mmc_load_image_raw_partition(struct mmc *mmc, int partition) return -1; } +#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR + return mmc_load_image_raw_sector(mmc, info.start + + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR); +#else return mmc_load_image_raw_sector(mmc, info.start); +#endif } #endif @@ -96,9 +107,18 @@ void spl_mmc_load_image(void) { struct mmc *mmc; u32 boot_mode; - int err; + int err = 0; __maybe_unused int part; +#ifdef CONFIG_DM_MMC + struct udevice *dev; + + mmc_initialize(NULL); + err = uclass_get_device(UCLASS_MMC, 0, &dev); + mmc = NULL; + if (!err) + mmc = mmc_get_mmc_dev(dev); +#else mmc_initialize(gd->bd); /* We register only one device. So, the dev id is always 0 */ @@ -109,8 +129,11 @@ void spl_mmc_load_image(void) #endif hang(); } +#endif + + if (!err) + err = mmc_init(mmc); - err = mmc_init(mmc); if (err) { #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT printf("spl: mmc init failed with error: %d\n", err); diff --git a/common/usb.c b/common/usb.c index 7ff8ac5df36..fbaf8ecbe23 100644 --- a/common/usb.c +++ b/common/usb.c @@ -911,26 +911,24 @@ __weak int usb_alloc_device(struct usb_device *udev) } #endif /* !CONFIG_DM_USB */ -#ifndef CONFIG_DM_USB -int usb_legacy_port_reset(struct usb_device *hub, int portnr) +static int usb_hub_port_reset(struct usb_device *dev, struct usb_device *hub) { if (hub) { unsigned short portstatus; int err; /* reset the port for the second time */ - err = legacy_hub_port_reset(hub, portnr - 1, &portstatus); + err = legacy_hub_port_reset(hub, dev->portnr - 1, &portstatus); if (err < 0) { - printf("\n Couldn't reset port %i\n", portnr); + printf("\n Couldn't reset port %i\n", dev->portnr); return err; } } else { - usb_reset_root_port(); + usb_reset_root_port(dev); } return 0; } -#endif static int get_descriptor_len(struct usb_device *dev, int len, int expect_len) { @@ -1032,7 +1030,7 @@ static int usb_setup_descriptor(struct usb_device *dev, bool do_read) } static int usb_prepare_device(struct usb_device *dev, int addr, bool do_read, - struct usb_device *parent, int portnr) + struct usb_device *parent) { int err; @@ -1050,7 +1048,7 @@ static int usb_prepare_device(struct usb_device *dev, int addr, bool do_read, err = usb_setup_descriptor(dev, do_read); if (err) return err; - err = usb_legacy_port_reset(parent, portnr); + err = usb_hub_port_reset(dev, parent); if (err) return err; @@ -1128,7 +1126,7 @@ int usb_select_config(struct usb_device *dev) } int usb_setup_device(struct usb_device *dev, bool do_read, - struct usb_device *parent, int portnr) + struct usb_device *parent) { int addr; int ret; @@ -1137,7 +1135,7 @@ int usb_setup_device(struct usb_device *dev, bool do_read, addr = dev->devnum; dev->devnum = 0; - ret = usb_prepare_device(dev, addr, do_read, parent, portnr); + ret = usb_prepare_device(dev, addr, do_read, parent); if (ret) return ret; ret = usb_select_config(dev); @@ -1167,7 +1165,7 @@ int usb_new_device(struct usb_device *dev) #ifdef CONFIG_USB_XHCI do_read = false; #endif - err = usb_setup_device(dev, do_read, dev->parent, dev->portnr); + err = usb_setup_device(dev, do_read, dev->parent); if (err) return err; diff --git a/common/usb_hub.c b/common/usb_hub.c index be01f4f257d..f621ddb9ab5 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -652,6 +652,6 @@ static const struct usb_device_id hub_id_table[] = { { } /* Terminating entry */ }; -USB_DEVICE(usb_generic_hub, hub_id_table); +U_BOOT_USB_DEVICE(usb_generic_hub, hub_id_table); #endif diff --git a/common/usb_kbd.c b/common/usb_kbd.c index e2af67d2f0a..02270244417 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -540,8 +540,8 @@ int drv_usb_kbd_init(void) debug("%s: Probing for keyboard\n", __func__); #ifdef CONFIG_DM_USB /* - * TODO: We should add USB_DEVICE() declarations to each USB ethernet - * driver and then most of this file can be removed. + * TODO: We should add U_BOOT_USB_DEVICE() declarations to each USB + * keyboard driver and then most of this file can be removed. */ struct udevice *bus; struct uclass *uc; diff --git a/common/usb_storage.c b/common/usb_storage.c index cc9b3e37a1c..b9784304086 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1442,6 +1442,6 @@ static const struct usb_device_id mass_storage_id_table[] = { { } /* Terminating entry */ }; -USB_DEVICE(usb_mass_storage, mass_storage_id_table); +U_BOOT_USB_DEVICE(usb_mass_storage, mass_storage_id_table); #endif |