[PATCH 05/13] ATA/DISK: Reorganize file structure and names for future updates

Juergen Beisert jbe at pengutronix.de
Wed Nov 16 04:24:19 EST 2011


'ATA' means more an interface than a disk drive. Change the names to reflect
their real meaning.

Signed-off-by: Juergen Beisert <jbe at pengutronix.de>
---
 drivers/Makefile         |    2 +-
 drivers/ata/Kconfig      |   23 +++++++++++++----------
 drivers/ata/Makefile     |    2 +-
 drivers/ata/disk_drive.c |    4 ++--
 drivers/mci/Kconfig      |    4 ++--
 5 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 16b3bb1..592c39e 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -4,7 +4,7 @@ obj-y	+= serial/
 obj-y	+= mtd/
 obj-y	+= nor/
 obj-y	+= usb/
-obj-$(CONFIG_ATA) += ata/
+obj-$(CONFIG_DISK) += ata/
 obj-$(CONFIG_SPI) += spi/
 obj-$(CONFIG_I2C) += i2c/
 obj-$(CONFIG_MCI) += mci/
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 5be1805..025ff94 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -1,27 +1,30 @@
-menuconfig ATA
+menuconfig DISK
 	select BLOCK
-	bool "ATA                           "
+	bool "Disk support                  "
 	help
-	  Add support for ATA types of drives like harddisks and CDROMs.
+	  Add support for disk like drives like harddisks, CDROMs, SD cards and
+	  CF cards.
 
-if ATA
+if DISK
 
-config ATA_WRITE
+config DISK_WRITE
 	select BLOCK_WRITE
-	bool "support writing to ATA drives"
+	bool "support writing to disk drives"
 
 comment "drive types"
 
-config ATA_DISK
-	bool "disk drives"
+config DISK_DRIVE
+	bool "Generic disk drives"
 	help
-	  Add support for regular disk drives
+	  Add support for generic disk drives. Common behaviour for this kind
+	  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
 	bool "BIOS based"
-	select ATA_DISK
+	select DISK_DRIVE
 	depends on X86_BIOS_BRINGUP
 	help
 	  Gain disk drive access via int13 calls to the standard PC-BIOS.
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index 30d15cc..c3260d7 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -1,6 +1,6 @@
 # drive types
 
-obj-$(CONFIG_ATA_DISK) += disk_drive.o
+obj-$(CONFIG_DISK_DRIVE) += disk_drive.o
 
 # interface types
 
diff --git a/drivers/ata/disk_drive.c b/drivers/ata/disk_drive.c
index 6a5dc87..c2a6a51 100644
--- a/drivers/ata/disk_drive.c
+++ b/drivers/ata/disk_drive.c
@@ -144,7 +144,7 @@ static int atablk_read(struct block_device *blk, void *buf, int block,
 	return atablk->intf->read(atablk->dev, block, num_blocks, buf);
 }
 
-#ifdef CONFIG_ATA_WRITE
+#ifdef CONFIG_DISK_WRITE
 static int atablk_write(struct block_device *blk, const void *buf, int block,
 		int num_blocks)
 {
@@ -156,7 +156,7 @@ static int atablk_write(struct block_device *blk, const void *buf, int block,
 
 static struct block_device_ops ataops = {
 	.read = atablk_read,
-#ifdef CONFIG_ATA_WRITE
+#ifdef CONFIG_DISK_WRITE
 	.write = atablk_write,
 #endif
 };
diff --git a/drivers/mci/Kconfig b/drivers/mci/Kconfig
index 0d5a0e0..d24e606 100644
--- a/drivers/mci/Kconfig
+++ b/drivers/mci/Kconfig
@@ -1,7 +1,7 @@
 menuconfig MCI
 	bool "MCI drivers                   "
-	select ATA
-	select ATA_DISK
+	select DISK
+	select DISK_DRIVE
 	help
 	  Add support for MCI drivers, used to handle MMC and SD cards
 
-- 
1.7.7.1




More information about the barebox mailing list