[coreboot] [FILO] r137 - in trunk/filo: . configs drivers drivers/newusb drivers/usb fs include main
repository service
svn at coreboot.org
Tue Aug 24 13:36:52 CEST 2010
Author: oxygene
Date: Tue Aug 24 13:36:51 2010
New Revision: 137
URL: http://tracker.coreboot.org/trac/filo/changeset/137
Log:
Drop old USB driver, and remove the "new" moniker from the new USB driver.
Also move usb driver out of its own directory - it's just one file.
Signed-off-by: Patrick Georgi <patrick.georgi at coresystems.de>
Acked-by: Stefan Reinauer <stepan at coresystems.de>
Added:
trunk/filo/drivers/usb.c
- copied, changed from r136, trunk/filo/drivers/newusb/usb.c
Deleted:
trunk/filo/drivers/newusb/
trunk/filo/drivers/usb/
Modified:
trunk/filo/Config.in
trunk/filo/Makefile
trunk/filo/configs/defconfig
trunk/filo/drivers/Makefile.inc
trunk/filo/fs/blockdev.c
trunk/filo/include/fs.h
trunk/filo/main/filo.c
Modified: trunk/filo/Config.in
==============================================================================
--- trunk/filo/Config.in Tue Aug 17 12:14:40 2010 (r136)
+++ trunk/filo/Config.in Tue Aug 24 13:36:51 2010 (r137)
@@ -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
Modified: trunk/filo/Makefile
==============================================================================
--- trunk/filo/Makefile Tue Aug 17 12:14:40 2010 (r136)
+++ trunk/filo/Makefile Tue Aug 24 13:36:51 2010 (r137)
@@ -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:
Modified: trunk/filo/configs/defconfig
==============================================================================
--- trunk/filo/configs/defconfig Tue Aug 17 12:14:40 2010 (r136)
+++ trunk/filo/configs/defconfig Tue Aug 24 13:36:51 2010 (r137)
@@ -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
Modified: trunk/filo/drivers/Makefile.inc
==============================================================================
--- trunk/filo/drivers/Makefile.inc Tue Aug 17 12:14:40 2010 (r136)
+++ trunk/filo/drivers/Makefile.inc Tue Aug 24 13:36:51 2010 (r137)
@@ -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
Copied and modified: trunk/filo/drivers/usb.c (from r136, trunk/filo/drivers/newusb/usb.c)
==============================================================================
--- trunk/filo/drivers/newusb/usb.c Tue Aug 17 12:14:40 2010 (r136, copy source)
+++ trunk/filo/drivers/usb.c Tue Aug 24 13:36:51 2010 (r137)
@@ -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);
Modified: trunk/filo/fs/blockdev.c
==============================================================================
--- trunk/filo/fs/blockdev.c Tue Aug 17 12:14:40 2010 (r136)
+++ trunk/filo/fs/blockdev.c Tue Aug 24 13:36:51 2010 (r137)
@@ -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:
Modified: trunk/filo/include/fs.h
==============================================================================
--- trunk/filo/include/fs.h Tue Aug 17 12:14:40 2010 (r136)
+++ trunk/filo/include/fs.h Tue Aug 24 13:36:51 2010 (r137)
@@ -40,12 +40,7 @@
#ifdef CONFIG_USB_DISK
int usb_probe(int drive);
-int usb_read(int drive, sector_t sector, 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);
+int usb_read(const int drive, const sector_t sector, const int size, void *buffer);
#endif
#ifdef CONFIG_FLASH_DISK
@@ -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);
Modified: trunk/filo/main/filo.c
==============================================================================
--- trunk/filo/main/filo.c Tue Aug 17 12:14:40 2010 (r136)
+++ trunk/filo/main/filo.c Tue Aug 24 13:36:51 2010 (r137)
@@ -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();
More information about the coreboot
mailing list