9
0
Fork 0

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>
This commit is contained in:
Juergen Beisert 2011-11-24 13:43:44 +01:00 committed by Sascha Hauer
parent bda834847d
commit 0084116bcc
4 changed files with 9 additions and 9 deletions

View File

@ -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

View File

@ -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

View File

@ -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);