]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
Kconfig: Add CONFIG_SATA to enable SATA
authorSimon Glass <sjg@chromium.org>
Thu, 15 Jun 2017 03:28:25 +0000 (21:28 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 11 Jul 2017 16:08:19 +0000 (10:08 -0600)
At present CONFIG_CMD_SATA enables the 'sata' command which also brings
in SATA support. Some boards may wish to enable SATA without the command.
Add a separate CONFIG to permit this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
22 files changed:
api/api_storage.c
arch/arm/cpu/armv7/mx6/clock.c
arch/arm/imx-common/Makefile
arch/arm/imx-common/cpu.c
arch/powerpc/cpu/mpc85xx/cpu_init.c
board/advantech/dms-ba16/dms-ba16.c
board/bachmann/ot1200/ot1200.c
board/boundary/nitrogen6x/nitrogen6x.c
board/congatec/cgtqmx6eval/cgtqmx6eval.c
board/gateworks/gw_ventana/gw_ventana.c
board/kosagi/novena/novena.c
board/toradex/apalis_imx6/apalis_imx6.c
board/toradex/colibri_imx6/colibri_imx6.c
board/udoo/udoo.c
board/wandboard/wandboard.c
cmd/Kconfig
common/Makefile
common/splash_source.c
drivers/block/Kconfig
fs/fat/fat.c
include/config_distro_bootcmd.h
include/config_fallbacks.h

index 8bed2f3c91fd37a400c793d03cfae4d0669a3373..6fc6f44925ccecbc863a50cc3263d6710b63fd31 100644 (file)
@@ -63,7 +63,7 @@ void dev_stor_init(void)
        specs[ENUM_MMC].type = DEV_TYP_STOR | DT_STOR_MMC;
        specs[ENUM_MMC].name = "mmc";
 #endif
-#if defined(CONFIG_CMD_SATA)
+#if defined(CONFIG_SATA)
        specs[ENUM_SATA].max_dev = CONFIG_SYS_SATA_MAX_DEVICE;
        specs[ENUM_SATA].enum_started = 0;
        specs[ENUM_SATA].enum_ended = 0;
index 84bc2134fefaa78f86de4d981545c080d0efb694..1f2739e8645e7806ae4fbaa8b5d614f2e0b20f4e 100644 (file)
@@ -1042,7 +1042,7 @@ u32 imx_get_fecclk(void)
        return mxc_get_clock(MXC_IPG_CLK);
 }
 
-#if defined(CONFIG_CMD_SATA) || defined(CONFIG_PCIE_IMX)
+#if defined(CONFIG_SATA) || defined(CONFIG_PCIE_IMX)
 static int enable_enet_pll(uint32_t en)
 {
        struct mxc_ccm_reg *const imx_ccm
@@ -1069,7 +1069,7 @@ static int enable_enet_pll(uint32_t en)
 }
 #endif
 
-#ifdef CONFIG_CMD_SATA
+#ifdef CONFIG_SATA
 static void ungate_sata_clock(void)
 {
        struct mxc_ccm_reg *const imx_ccm =
@@ -1143,7 +1143,7 @@ int enable_pcie_clock(void)
        clrbits_le32(&ccm_regs->cbcmr, MXC_CCM_CBCMR_PCIE_AXI_CLK_SEL);
 
        /* Party time! Ungate the clock to the PCIe. */
-#ifdef CONFIG_CMD_SATA
+#ifdef CONFIG_SATA
        ungate_sata_clock();
 #endif
        ungate_pcie_clock();
index b7cb434bd7ab019a5b91fa67b10a47a1821e5d50..fc69172b0ba16827b2455cf23e708b4914486511 100644 (file)
@@ -25,7 +25,7 @@ obj-$(CONFIG_SYSCOUNTER_TIMER) += syscounter.o
 endif
 ifeq ($(SOC),$(filter $(SOC),mx6 mx7))
 obj-y  += cache.o init.o
-obj-$(CONFIG_CMD_SATA) += sata.o
+obj-$(CONFIG_SATA) += sata.o
 obj-$(CONFIG_IMX_VIDEO_SKIP) += video.o
 obj-$(CONFIG_IMX_RDC) += rdc-sema.o
 obj-$(CONFIG_IMX_BOOTAUX) += imx_bootaux.o
index 74bdd24ed1e9698b913ab6b3d5a18aa6c589fc09..9e83b4221e025e1a8004fc4fba6ff3ea1e26394f 100644 (file)
@@ -278,7 +278,7 @@ void arch_preboot_os(void)
 #if defined(CONFIG_PCIE_IMX)
        imx_pcie_remove();
 #endif
-#if defined(CONFIG_CMD_SATA)
+#if defined(CONFIG_SATA)
        sata_stop();
 #if defined(CONFIG_MX6)
        disable_sata_clock();
index f5bf67c990325764775565c26715a7dc854c68c7..388fe2b4ef55cd291b54771c30957dff342a88bb 100644 (file)
@@ -1024,7 +1024,7 @@ void arch_preboot_os(void)
        mtmsr(msr);
 }
 
-#if defined(CONFIG_CMD_SATA) && defined(CONFIG_FSL_SATA)
+#if defined(CONFIG_SATA) && defined(CONFIG_FSL_SATA)
 int sata_initialize(void)
 {
        if (is_serdes_configured(SATA1) || is_serdes_configured(SATA2))
index 91e96ab0961145e589de2f1102f16c4657d8a147..2dab906f445d4c67534ed8ff8a57144d6c162000 100644 (file)
@@ -609,7 +609,7 @@ int board_late_init(void)
        pwm_enable(0);
 #endif
 
-#ifdef CONFIG_CMD_SATA
+#ifdef CONFIG_SATA
        setup_ba16_sata();
 #endif
 
index c0a8b6423ee1882ae044333515b3b0d757455aa9..74f652e025aacd955d8e7d1948329d24b67f4a29 100644 (file)
@@ -338,7 +338,7 @@ int board_init(void)
 
        leds_on();
 
-#ifdef CONFIG_CMD_SATA
+#ifdef CONFIG_SATA
        setup_sata();
 #endif
 
index ab8b2be19b690cca9dd38537c5addf5a2f4ede55..1145af53d7365242147c19c73e6e4445ec239640 100644 (file)
@@ -903,7 +903,7 @@ int board_init(void)
        setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
        setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
 
-#ifdef CONFIG_CMD_SATA
+#ifdef CONFIG_SATA
        setup_sata();
 #endif
 
index 24956a8a94e515e43c261e5aa8f9902e7bd87536..fe7db91dd8d0186457778aff000510830f915f78 100644 (file)
@@ -702,7 +702,7 @@ int board_init(void)
        else
                setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info1);
 
-#ifdef CONFIG_CMD_SATA
+#ifdef CONFIG_SATA
        setup_sata();
 #endif
 
index 6b950eeb218a288b29f2d5503a6af3e02f651781..40ee1b61e95f021c47a8a15e14de0f5e97ef0d1e 100644 (file)
@@ -633,7 +633,7 @@ int board_init(void)
 #endif
        setup_ventana_i2c();
 
-#ifdef CONFIG_CMD_SATA
+#ifdef CONFIG_SATA
        setup_sata();
 #endif
        /* read Gateworks EEPROM into global struct (used later) */
index f6972c2d149dfa3097db3097665046a3a5257133..17c2b13ef2ed31bd32573cf944b171ae998a1d8d 100644 (file)
@@ -167,7 +167,7 @@ int board_init(void)
        /* address of boot parameters */
        gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
-#ifdef CONFIG_CMD_SATA
+#ifdef CONFIG_SATA
        setup_sata();
 #endif
 
index 7c49ddfc4b8f8c60241fe00e0e16aa6992a13348..166b93f0c5288bb1d6a7e6e0cc082da516717e6d 100644 (file)
@@ -784,7 +784,7 @@ int board_init(void)
        (void) pmic_init();
 #endif
 
-#ifdef CONFIG_CMD_SATA
+#ifdef CONFIG_SATA
        setup_sata();
 #endif
 
index 69467ca895853bd05f40f31fc3b20ea81319f9df..87e24471ceaef999ee3f67d70d1acaf0c71c30bc 100644 (file)
@@ -657,7 +657,7 @@ int board_init(void)
        (void) pmic_init();
 #endif
 
-#ifdef CONFIG_CMD_SATA
+#ifdef CONFIG_SATA
        setup_sata();
 #endif
 
index eb7ab657ec620a2b85f6a663f9ea90bf22deaba1..d2cbbaa23e6e819a742220819e09ac36fe49c654 100644 (file)
@@ -244,7 +244,7 @@ int board_init(void)
        /* address of boot parameters */
        gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
-#ifdef CONFIG_CMD_SATA
+#ifdef CONFIG_SATA
        if (is_cpu_type(MXC_CPU_MX6Q))
                setup_sata();
 #endif
index 2c9dc8b7c557d733b8ea3c585072cec9dac6c653..438bc0e7431b368ddb81628859e9f66589d7cd25 100644 (file)
@@ -379,7 +379,7 @@ int board_early_init_f(void)
 #if defined(CONFIG_VIDEO_IPUV3)
        setup_display();
 #endif
-#ifdef CONFIG_CMD_SATA
+#ifdef CONFIG_SATA
        /* Only mx6q wandboard has SATA */
        if (is_cpu_type(MXC_CPU_MX6Q))
                setup_sata();
index 90d93379c31adfc7b1ef423d53fe22ebf7591965..c80ac364ead6929c1f7aa6216d63fc5cd290bc65 100644 (file)
@@ -736,6 +736,7 @@ config CMD_FDC
 
 config CMD_SATA
        bool "sata - Access SATA subsystem"
+       select SATA
        help
          SATA (Serial Advanced Technology Attachment) is a serial bus
          standard for connecting to hard drives and other storage devices.
index 8540fbc9fa6dc44dc0a7bc39d7fc6bdf05d99603..fdf5c31b1c90f762f599fb6c238d4d897042d490 100644 (file)
@@ -79,7 +79,7 @@ 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_CMD_SATA) += sata.o
+obj-$(CONFIG_SATA) += sata.o
 obj-$(CONFIG_SCSI) += scsi.o
 obj-$(CONFIG_UPDATE_TFTP) += update.o
 obj-$(CONFIG_DFU_TFTP) += update.o
index d1647c8300629d529444f2b053ac53e5735525e2..ee055ddf155ed96bbd84c88bf34c31530c43daf4 100644 (file)
@@ -162,7 +162,7 @@ static inline int splash_init_usb(void)
 }
 #endif
 
-#ifdef CONFIG_CMD_SATA
+#ifdef CONFIG_SATA
 static int splash_init_sata(void)
 {
        return sata_initialize();
index 4c2aaa0a0b1bcc31ef2b290bfeeeffdf3fdaf722..ed7fa88bf5f3f99641c2bc5d4be86535add7b11b 100644 (file)
@@ -19,6 +19,19 @@ config AHCI
          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
index a71bad1cbcf75ce44ba28968293929dca70479cb..9ad18f96ff072c21f623a4f66b838143c86b5863 100644 (file)
@@ -1251,7 +1251,7 @@ int file_fat_detectfs(void)
        }
 
 #if defined(CONFIG_IDE) || \
-    defined(CONFIG_CMD_SATA) || \
+    defined(CONFIG_SATA) || \
     defined(CONFIG_SCSI) || \
     defined(CONFIG_CMD_USB) || \
     defined(CONFIG_MMC)
index 4b2c493ae302bcd3e42e1992f4182a5de7c24f5d..d8dab8e46a4a61027131b43452e629be8bcd14b8 100644 (file)
 #define SCAN_DEV_FOR_EFI
 #endif
 
-#ifdef CONFIG_CMD_SATA
+#ifdef CONFIG_SATA
 #define BOOTENV_SHARED_SATA    BOOTENV_SHARED_BLKDEV(sata)
 #define BOOTENV_DEV_SATA       BOOTENV_DEV_BLKDEV
 #define BOOTENV_DEV_NAME_SATA  BOOTENV_DEV_NAME_BLKDEV
 #else
 #define BOOTENV_SHARED_SATA
 #define BOOTENV_DEV_SATA \
-       BOOT_TARGET_DEVICES_references_SATA_without_CONFIG_CMD_SATA
+       BOOT_TARGET_DEVICES_references_SATA_without_CONFIG_SATA
 #define BOOTENV_DEV_NAME_SATA \
-       BOOT_TARGET_DEVICES_references_SATA_without_CONFIG_CMD_SATA
+       BOOT_TARGET_DEVICES_references_SATA_without_CONFIG_SATA
 #endif
 
 #ifdef CONFIG_SCSI
index 2656c75b3005a8fcb2c1593a79564167224b310b..d1411f055083d7d5422bb95e719b5ad4bb38dfac 100644 (file)
@@ -48,7 +48,7 @@
 
 /* Rather than repeat this expression each time, add a define for it */
 #if defined(CONFIG_IDE) || \
-       defined(CONFIG_CMD_SATA) || \
+       defined(CONFIG_SATA) || \
        defined(CONFIG_SCSI) || \
        defined(CONFIG_CMD_USB) || \
        defined(CONFIG_CMD_PART) || \