summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Beisert <jbe@pengutronix.de>2011-11-24 13:43:44 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-11-28 09:23:24 +0100
commit0084116bcc281051fa756661579a17f374a6de0a (patch)
treecb4be03b225d6792bc1e23174aa8e47a4168cd0d
parentbda834847dd7570e0effc4762fbfc4e05d705a24 (diff)
downloadbarebox-0084116bcc281051fa756661579a17f374a6de0a.tar.gz
barebox-0084116bcc281051fa756661579a17f374a6de0a.tar.xz
ATA/DISK: The BIOS based disk driver is not an interface
Using the BIOS to access attached hard disks means a full disk driver, not only an interface to the drives. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/ata/Kconfig6
-rw-r--r--drivers/ata/Makefile2
-rw-r--r--drivers/ata/disk_bios_drive.c (renamed from drivers/ata/bios.c)0
-rw-r--r--drivers/ata/disk_drive.c10
4 files changed, 9 insertions, 9 deletions
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 025ff942b7..f3b29397c6 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -20,9 +20,7 @@ config DISK_DRIVE
of devices is using a partition table in the first sector. Say Y here
if you intend to work with disk drives (also CF cards and SD cards).
-comment "interface types"
-
-config ATA_BIOS
+config DISK_BIOS
bool "BIOS based"
select DISK_DRIVE
depends on X86_BIOS_BRINGUP
@@ -32,4 +30,6 @@ config ATA_BIOS
media to work on. Disadvantage is: Due to its 16 bit nature it is
slow.
+comment "interface types"
+
endif
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index c3260d70f8..10f3957453 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -1,7 +1,7 @@
# drive types
obj-$(CONFIG_DISK_DRIVE) += disk_drive.o
+obj-$(CONFIG_DISK_BIOS) += disk_bios_drive.o
# interface types
-obj-$(CONFIG_ATA_BIOS) += bios.o
diff --git a/drivers/ata/bios.c b/drivers/ata/disk_bios_drive.c
index 6e2377c7ea..6e2377c7ea 100644
--- a/drivers/ata/bios.c
+++ b/drivers/ata/disk_bios_drive.c
diff --git a/drivers/ata/disk_drive.c b/drivers/ata/disk_drive.c
index c2a6a5120d..c5c1ee9bfb 100644
--- a/drivers/ata/disk_drive.c
+++ b/drivers/ata/disk_drive.c
@@ -61,7 +61,7 @@ struct partition_entry {
* @param table partition table
* @return size in sectors
*/
-#ifdef CONFIG_ATA_BIOS
+#ifdef CONFIG_DISK_BIOS
static unsigned long disk_guess_size(struct device_d *dev, struct partition_entry *table)
{
int part_order[4] = {0, 1, 2, 3};
@@ -186,14 +186,14 @@ static int disk_probe(struct device_d *dev)
* the drive ordering must not correspond to the Linux drive order,
* use the 'biosdisk' name instead.
*/
-#ifdef CONFIG_ATA_BIOS
+#ifdef CONFIG_DISK_BIOS
if (strcmp(dev->driver->name, "biosdisk") == 0)
atablk->blk.cdev.name = asprintf("biosdisk%d", dev->id);
else
#endif
atablk->blk.cdev.name = asprintf("disk%d", dev->id);
-#ifdef CONFIG_ATA_BIOS
+#ifdef CONFIG_DISK_BIOS
/* On x86, BIOS based disks are coming without a valid .size field */
if (dev->resource[0].size == 0) {
/* guess the size of this drive if not otherwise given */
@@ -223,7 +223,7 @@ on_error:
return rc;
}
-#ifdef CONFIG_ATA_BIOS
+#ifdef CONFIG_DISK_BIOS
static struct driver_d biosdisk_driver = {
.name = "biosdisk",
.probe = disk_probe,
@@ -237,7 +237,7 @@ static struct driver_d disk_driver = {
static int disk_init(void)
{
-#ifdef CONFIG_ATA_BIOS
+#ifdef CONFIG_DISK_BIOS
register_driver(&biosdisk_driver);
#endif
register_driver(&disk_driver);