]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
sata: Move drivers into new drivers/ata directory
authorSimon Glass <sjg@chromium.org>
Thu, 15 Jun 2017 03:28:26 +0000 (21:28 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 11 Jul 2017 16:08:19 +0000 (10:08 -0600)
At present we have the SATA and PATA drivers mixed up in the drivers/block
directory. It is better to split them out into their own place. Use
drivers/ata which is what Linux does.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
28 files changed:
arch/powerpc/cpu/mpc85xx/cpu_init.c
common/Makefile
drivers/Kconfig
drivers/Makefile
drivers/ata/Kconfig [new file with mode: 0644]
drivers/ata/Makefile [new file with mode: 0644]
drivers/ata/ahci-uclass.c [moved from drivers/block/ahci-uclass.c with 100% similarity]
drivers/ata/ahci.c [moved from drivers/block/ahci.c with 100% similarity]
drivers/ata/dwc_ahci.c [moved from drivers/block/dwc_ahci.c with 100% similarity]
drivers/ata/dwc_ahsata.c [moved from drivers/block/dwc_ahsata.c with 100% similarity]
drivers/ata/dwc_ahsata.h [moved from drivers/block/dwc_ahsata.h with 100% similarity]
drivers/ata/fsl_sata.c [moved from drivers/block/fsl_sata.c with 100% similarity]
drivers/ata/fsl_sata.h [moved from drivers/block/fsl_sata.h with 100% similarity]
drivers/ata/libata.c [moved from drivers/block/libata.c with 100% similarity]
drivers/ata/mvsata_ide.c [moved from drivers/block/mvsata_ide.c with 100% similarity]
drivers/ata/mxc_ata.c [moved from drivers/block/mxc_ata.c with 100% similarity]
drivers/ata/sata.c [moved from common/sata.c with 100% similarity]
drivers/ata/sata_ceva.c [moved from drivers/block/sata_ceva.c with 100% similarity]
drivers/ata/sata_dwc.c [moved from drivers/block/sata_dwc.c with 100% similarity]
drivers/ata/sata_dwc.h [moved from drivers/block/sata_dwc.h with 100% similarity]
drivers/ata/sata_mv.c [moved from drivers/block/sata_mv.c with 100% similarity]
drivers/ata/sata_sandbox.c [moved from drivers/block/sata_sandbox.c with 100% similarity]
drivers/ata/sata_sil.c [moved from drivers/block/sata_sil.c with 100% similarity]
drivers/ata/sata_sil.h [moved from drivers/block/sata_sil.h with 100% similarity]
drivers/ata/sata_sil3114.c [moved from drivers/block/sata_sil3114.c with 100% similarity]
drivers/ata/sata_sil3114.h [moved from drivers/block/sata_sil3114.h with 100% similarity]
drivers/block/Kconfig
drivers/block/Makefile

index 388fe2b4ef55cd291b54771c30957dff342a88bb..a3076d8d71005a16d0d166d9c8c9ea55b78c0d83 100644 (file)
@@ -48,7 +48,7 @@
 #ifndef CONFIG_ARCH_QEMU_E500
 #include <fsl_ddr.h>
 #endif
-#include "../../../../drivers/block/fsl_sata.h"
+#include "../../../../drivers/ata/fsl_sata.h"
 #ifdef CONFIG_U_QE
 #include <fsl_qe.h>
 #endif
index fdf5c31b1c90f762f599fb6c238d4d897042d490..f04ddc8352128a2e8293177c576c4c044b1d5366 100644 (file)
@@ -79,7 +79,6 @@ obj-$(CONFIG_LCD_ROTATION) += lcd_console_rotation.o
 obj-$(CONFIG_LCD_DT_SIMPLEFB) += lcd_simplefb.o
 obj-$(CONFIG_LYNXKDI) += lynxkdi.o
 obj-$(CONFIG_MENU) += menu.o
-obj-$(CONFIG_SATA) += sata.o
 obj-$(CONFIG_SCSI) += scsi.o
 obj-$(CONFIG_UPDATE_TFTP) += update.o
 obj-$(CONFIG_DFU_TFTP) += update.o
index a736386a0d54631dca82c5c7558653965f74b633..63e4034c5653b34dd53bd0c080ebc22a6b3edaaf 100644 (file)
@@ -6,6 +6,8 @@ source "drivers/core/Kconfig"
 
 source "drivers/adc/Kconfig"
 
+source "drivers/ata/Kconfig"
+
 source "drivers/block/Kconfig"
 
 source "drivers/clk/Kconfig"
index 058bccb761d71a5c8383e57b4efd5e159c960aa5..9bbcc7bf9c9cbb7704fa6f898817dc8cf689f38f 100644 (file)
@@ -45,7 +45,7 @@ obj-$(CONFIG_SPL_DFU_SUPPORT) += dfu/
 obj-$(CONFIG_SPL_WATCHDOG_SUPPORT) += watchdog/
 obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += usb/host/
 obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/
-obj-$(CONFIG_SPL_SATA_SUPPORT) += block/
+obj-$(CONFIG_SPL_SATA_SUPPORT) += ata/
 obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += block/
 obj-$(CONFIG_SPL_MMC_SUPPORT) += block/
 endif
@@ -66,6 +66,7 @@ endif
 ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)
 
 obj-y += adc/
+obj-y += ata/
 obj-$(CONFIG_DM_DEMO) += demo/
 obj-$(CONFIG_BIOSEMU) += bios_emulator/
 obj-y += block/
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
new file mode 100644 (file)
index 0000000..6427f1b
--- /dev/null
@@ -0,0 +1,62 @@
+config AHCI
+       bool "Support SATA controllers with driver model"
+       depends on DM
+       help
+         This enables a uclass for disk controllers in U-Boot. Various driver
+         types can use this, such as AHCI/SATA. It does not provide any standard
+         operations at present. The block device interface has not been converted
+         to driver model.
+
+config SATA
+       bool "Support SATA controllers"
+       help
+         This enables support for SATA (Serial Advanced Technology
+         Attachment), a serial bus standard for connecting to hard drives and
+         other storage devices.
+
+         SATA replaces PATA (originally just ATA), which stands for Parallel AT
+         Attachment, where AT refers to an IBM AT (Advanced Technology)
+         computer released in 1984.
+
+         See also CMD_SATA which provides command-line support.
+
+config SCSI
+       bool "Support SCSI controllers"
+       help
+         This enables support for SCSI (Small Computer System Interface),
+         a parallel interface widely used with storage peripherals such as
+         hard drives and optical drives. The SCSI standards define physical
+         interfaces as well as protocols for controlling devices and
+         tranferring data.
+
+config DM_SCSI
+       bool "Support SCSI controllers with driver model"
+       depends on BLK
+       help
+         This option enables the SCSI (Small Computer System Interface) uclass
+         which supports SCSI and SATA HDDs. For every device configuration
+         (IDs/LUNs) a block device is created with RAW read/write and
+         filesystem support.
+
+menu "SATA/SCSI device support"
+
+config SATA_CEVA
+       bool "Ceva Sata controller"
+       depends on AHCI
+       depends on DM_SCSI
+       help
+         This option enables Ceva Sata controller hard IP available on Xilinx
+         ZynqMP. Support up to 2 external devices. Complient with SATA 3.1 and
+         AHCI 1.3 specifications with hot-plug detect feature.
+
+
+config DWC_AHCI
+       bool "Enable Synopsys DWC AHCI driver support"
+       select SCSI_AHCI
+       select PHY
+       depends on DM_SCSI
+       help
+         Enable this driver to support Sata devices through
+         Synopsys DWC AHCI module.
+
+endmenu
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
new file mode 100644 (file)
index 0000000..c48184c
--- /dev/null
@@ -0,0 +1,22 @@
+#
+# (C) Copyright 2000-2007
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-$(CONFIG_DWC_AHCI) += dwc_ahci.o
+obj-$(CONFIG_AHCI) += ahci-uclass.o
+obj-$(CONFIG_SCSI_AHCI) += ahci.o
+obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o
+obj-$(CONFIG_FSL_SATA) += fsl_sata.o
+obj-$(CONFIG_LIBATA) += libata.o
+obj-$(CONFIG_MVSATA_IDE) += mvsata_ide.o
+obj-$(CONFIG_MX51_PATA) += mxc_ata.o
+obj-$(CONFIG_SATA) += sata.o
+obj-$(CONFIG_SATA_CEVA) += sata_ceva.o
+obj-$(CONFIG_SATA_DWC) += sata_dwc.o
+obj-$(CONFIG_SATA_MV) += sata_mv.o
+obj-$(CONFIG_SATA_SIL3114) += sata_sil3114.o
+obj-$(CONFIG_SATA_SIL) += sata_sil.o
+obj-$(CONFIG_SANDBOX) += sata_sandbox.o
similarity index 100%
rename from drivers/block/ahci.c
rename to drivers/ata/ahci.c
similarity index 100%
rename from drivers/block/libata.c
rename to drivers/ata/libata.c
similarity index 100%
rename from common/sata.c
rename to drivers/ata/sata.c
index ed7fa88bf5f3f99641c2bc5d4be86535add7b11b..1ddd6508e40da4ed347c4cb010c2eb42bea03ece 100644 (file)
@@ -10,28 +10,6 @@ config BLK
          be partitioned into several areas, called 'partitions' in U-Boot.
          A filesystem can be placed in each partition.
 
-config AHCI
-       bool "Support SATA controllers with driver model"
-       depends on DM
-       help
-         This enables a uclass for disk controllers in U-Boot. Various driver
-         types can use this, such as AHCI/SATA. It does not provide any standard
-         operations at present. The block device interface has not been converted
-         to driver model.
-
-config SATA
-       bool "Support SATA controllers"
-       help
-         This enables support for SATA (Serial Advanced Technology
-         Attachment), a serial bus standard for connecting to hard drives and
-         other storage devices.
-
-         SATA replaces PATA (originally just ATA), which stands for Parallel AT
-         Attachment, where AT refers to an IBM AT (Advanced Technology)
-         computer released in 1984.
-
-         See also CMD_SATA which provides command-line support.
-
 config SCSI
        bool "Support SCSI controllers"
        help
@@ -59,29 +37,6 @@ config BLOCK_CACHE
          it will prevent repeated reads from directory structures and other
          filesystem data structures.
 
-menu "SATA/SCSI device support"
-
-config SATA_CEVA
-       bool "Ceva Sata controller"
-       depends on AHCI
-       depends on DM_SCSI
-       help
-         This option enables Ceva Sata controller hard IP available on Xilinx
-         ZynqMP. Support up to 2 external devices. Complient with SATA 3.1 and
-         AHCI 1.3 specifications with hot-plug detect feature.
-
-
-config DWC_AHCI
-       bool "Enable Synopsys DWC AHCI driver support"
-       select SCSI_AHCI
-       select PHY
-       depends on DM_SCSI
-       help
-         Enable this driver to support Sata devices through
-         Synopsys DWC AHCI module.
-
-endmenu
-
 config IDE
        bool "Support IDE controllers"
        help
index 035e078f814de24fa945168b9fd272ad2d4ebb19..064c76fc98a9f9a7efefece8c12e80681cd91ad6 100644 (file)
@@ -11,22 +11,8 @@ ifndef CONFIG_BLK
 obj-y += blk_legacy.o
 endif
 
-obj-$(CONFIG_DWC_AHCI) += dwc_ahci.o
-obj-$(CONFIG_AHCI) += ahci-uclass.o
-obj-$(CONFIG_DM_SCSI) += scsi-uclass.o
-obj-$(CONFIG_SCSI_AHCI) += ahci.o
-obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o
-obj-$(CONFIG_FSL_SATA) += fsl_sata.o
 obj-$(CONFIG_IDE) += ide.o
 obj-$(CONFIG_IDE_FTIDE020) += ftide020.o
-obj-$(CONFIG_LIBATA) += libata.o
-obj-$(CONFIG_MVSATA_IDE) += mvsata_ide.o
-obj-$(CONFIG_MX51_PATA) += mxc_ata.o
-obj-$(CONFIG_SATA_CEVA) += sata_ceva.o
-obj-$(CONFIG_SATA_DWC) += sata_dwc.o
-obj-$(CONFIG_SATA_MV) += sata_mv.o
-obj-$(CONFIG_SATA_SIL3114) += sata_sil3114.o
-obj-$(CONFIG_SATA_SIL) += sata_sil.o
-obj-$(CONFIG_SANDBOX) += sandbox.o sandbox_scsi.o sata_sandbox.o
+obj-$(CONFIG_SANDBOX) += sandbox.o sandbox_scsi.o
 obj-$(CONFIG_SYSTEMACE) += systemace.o
 obj-$(CONFIG_BLOCK_CACHE) += blkcache.o