===================================================================
@@ -40,14 +40,9 @@
#ifdef CONFIG_USB_DISK
int usb_probe(int drive);
-int usb_read(int drive, sector_t sector, void *buffer);
+int usb_read(const int drive, const sector_t sector, const int size, void *buffer);
#endif
-#ifdef CONFIG_USB_NEW_DISK
-int usb_new_probe(int drive);
-int usb_new_read(const int drive, const sector_t sector, const int size, void *buffer);
-#endif
-
#ifdef CONFIG_FLASH_DISK
int flash_probe(int drive);
int flash_read(int drive, sector_t sector, void *buffer);
@@ -58,7 +53,6 @@
#define DISK_MEM 2
#define DISK_USB 3
#define DISK_FLASH 4
-#define DISK_NEW_USB 5
int devopen(const char *name, int *reopen);
void devclose(void);
===================================================================
@@ -73,9 +73,6 @@
relocate();
#if defined(CONFIG_USB_DISK)
- usb_initialize();
-#endif
-#if defined(CONFIG_USB_NEW_DISK)
#if defined(CONFIG_USB)
/* libpayload USB stack is there */
usb_initialize();
===================================================================
@@ -20,7 +20,7 @@
#
# CONFIG_IDE_DISK is not set
CONFIG_IDE_NEW_DISK=y
-CONFIG_USB_NEW_DISK=y
+CONFIG_USB_DISK=y
# CONFIG_FLASH_DISK is not set
CONFIG_SUPPORT_PCI=y
# CONFIG_PCI_BRUTE_SCAN is not set
===================================================================
@@ -166,7 +166,7 @@
*drive = *name - 'a';
name++;
} else if (memcmp(name, "ud", 2) == 0) {
- *type = DISK_NEW_USB;
+ *type = DISK_USB;
name += 2;
if (*name < 'a' || *name > 'z') {
printf("Invalid drive\n");
@@ -256,16 +256,6 @@
disk_size = (uint32_t) - 1; /* FIXME */
break;
#endif
-#if defined(CONFIG_USB_NEW_DISK) && defined(CONFIG_USB)
- case DISK_NEW_USB:
- if (usb_new_probe(drive) != 0) {
- debug("Failed to open USB.\n");
- return 0;
- }
- disk_size = (uint32_t) - 1; /* FIXME */
- break;
-#endif
-
#ifdef CONFIG_USB_DISK
case DISK_USB:
if (usb_probe(drive) != 0) {
@@ -406,11 +396,11 @@
break;
}
#endif
-#if defined(CONFIG_USB_NEW_DISK) && defined(CONFIG_USB)
- case DISK_NEW_USB:
+#ifdef CONFIG_USB_DISK
+ case DISK_USB:
{
int count = (NUM_CACHE-hash>8)?8:(NUM_CACHE-hash);
- if (usb_new_read(dev_drive, sector, count, buf) != 0)
+ if (usb_read(dev_drive, sector, count, buf) != 0)
goto readerr;
while (--count>0) {
cache_sect[hash+count] = sector + count;
@@ -418,12 +408,6 @@
break;
}
#endif
-#ifdef CONFIG_USB_DISK
- case DISK_USB:
- if (usb_read(dev_drive, sector, buf) != 0)
- goto readerr;
- break;
-#endif
#ifdef CONFIG_FLASH_DISK
case DISK_FLASH:
===================================================================
@@ -129,19 +129,12 @@
help
Jens Axboe's fine IDE driver
-config USB_NEW_DISK
+config USB_DISK
bool "USB Stack"
default y
help
Driver for USB Storage
-config USB_DISK
- bool "Old USB Stack (obsolete?)"
- default n
- depends on !USB_NEW_DISK
- help
- Driver for USB Storage
-
config FLASH_DISK
bool "NAND Flash support"
default n
===================================================================
@@ -72,7 +72,7 @@
BUILD-y := main/Makefile.inc main/grub/Makefile.inc fs/Makefile.inc
BUILD-y += drivers/Makefile.inc
-BUILD-y += drivers/usb/Makefile.inc drivers/newusb/Makefile.inc drivers/flash/Makefile.inc
+BUILD-y += drivers/flash/Makefile.inc
include $(PLATFORM-y) $(BUILD-y)
@@ -151,7 +151,7 @@
prepare:
$(Q)mkdir -p $(obj)/util/kconfig/lxdialog
- $(Q)mkdir -p $(obj)/i386 $(obj)/fs $(obj)/drivers/flash $(obj)/drivers/usb $(obj)/drivers/newusb
+ $(Q)mkdir -p $(obj)/i386 $(obj)/fs $(obj)/drivers/flash
$(Q)mkdir -p $(obj)/main/grub
clean:
===================================================================
===================================================================
===================================================================
@@ -19,5 +19,6 @@
TARGETS-$(CONFIG_IDE_DISK) += drivers/ide.o
TARGETS-$(CONFIG_IDE_NEW_DISK) += drivers/ide_new.o
TARGETS-$(CONFIG_VIA_SOUND) += drivers/via-sound.o
+TARGETS-$(CONFIG_USB_DISK) += drivers/usb.o
TARGETS-y += drivers/intel.o
===================================================================
===================================================================
===================================================================
===================================================================
===================================================================
===================================================================
===================================================================
===================================================================
===================================================================
===================================================================
===================================================================
===================================================================
===================================================================
===================================================================
===================================================================
===================================================================
@@ -54,7 +54,7 @@
}
}
-int usb_new_probe(int drive)
+int usb_probe(int drive)
{
/* FIXME: need a place to periodically poll usb_poll().
or at least at sensible times.
@@ -66,7 +66,7 @@
return -1;
}
-int usb_new_read(const int drive, const sector_t sector, const int size, void *buffer)
+int usb_read(const int drive, const sector_t sector, const int size, void *buffer)
{
if (count < drive) return -1;
int result = -readwrite_blocks_512(devs[drive], sector, size, cbw_direction_data_in, buffer);
Hi, attached patch removes the old USB driver from FILO and renames the "usb new" driver to just usb (so we don't end up with awkward situations in the future like with our old 'newconfig'). Given that the usb driver is only one file, I also dropped the drivers/usb/ directory. Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>