From: Simon Glass Date: Thu, 15 Jun 2017 03:28:25 +0000 (-0600) Subject: Kconfig: Add CONFIG_SATA to enable SATA X-Git-Tag: v2017.09-rc1~214^2~69 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=10e40d54b38b9b1916c35fc5c4ed2eff4b4bf117;p=u-boot Kconfig: Add CONFIG_SATA to enable SATA 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 Reviewed-by: Bin Meng --- diff --git a/api/api_storage.c b/api/api_storage.c index 8bed2f3c91..6fc6f44925 100644 --- a/api/api_storage.c +++ b/api/api_storage.c @@ -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; diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c index 84bc2134fe..1f2739e864 100644 --- a/arch/arm/cpu/armv7/mx6/clock.c +++ b/arch/arm/cpu/armv7/mx6/clock.c @@ -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(); diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile index b7cb434bd7..fc69172b0b 100644 --- a/arch/arm/imx-common/Makefile +++ b/arch/arm/imx-common/Makefile @@ -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 diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c index 74bdd24ed1..9e83b4221e 100644 --- a/arch/arm/imx-common/cpu.c +++ b/arch/arm/imx-common/cpu.c @@ -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(); diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c index f5bf67c990..388fe2b4ef 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c @@ -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)) diff --git a/board/advantech/dms-ba16/dms-ba16.c b/board/advantech/dms-ba16/dms-ba16.c index 91e96ab096..2dab906f44 100644 --- a/board/advantech/dms-ba16/dms-ba16.c +++ b/board/advantech/dms-ba16/dms-ba16.c @@ -609,7 +609,7 @@ int board_late_init(void) pwm_enable(0); #endif -#ifdef CONFIG_CMD_SATA +#ifdef CONFIG_SATA setup_ba16_sata(); #endif diff --git a/board/bachmann/ot1200/ot1200.c b/board/bachmann/ot1200/ot1200.c index c0a8b6423e..74f652e025 100644 --- a/board/bachmann/ot1200/ot1200.c +++ b/board/bachmann/ot1200/ot1200.c @@ -338,7 +338,7 @@ int board_init(void) leds_on(); -#ifdef CONFIG_CMD_SATA +#ifdef CONFIG_SATA setup_sata(); #endif diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index ab8b2be19b..1145af53d7 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -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 diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c b/board/congatec/cgtqmx6eval/cgtqmx6eval.c index 24956a8a94..fe7db91dd8 100644 --- a/board/congatec/cgtqmx6eval/cgtqmx6eval.c +++ b/board/congatec/cgtqmx6eval/cgtqmx6eval.c @@ -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 diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index 6b950eeb21..40ee1b61e9 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -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) */ diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c index f6972c2d14..17c2b13ef2 100644 --- a/board/kosagi/novena/novena.c +++ b/board/kosagi/novena/novena.c @@ -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 diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index 7c49ddfc4b..166b93f0c5 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -784,7 +784,7 @@ int board_init(void) (void) pmic_init(); #endif -#ifdef CONFIG_CMD_SATA +#ifdef CONFIG_SATA setup_sata(); #endif diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index 69467ca895..87e24471ce 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -657,7 +657,7 @@ int board_init(void) (void) pmic_init(); #endif -#ifdef CONFIG_CMD_SATA +#ifdef CONFIG_SATA setup_sata(); #endif diff --git a/board/udoo/udoo.c b/board/udoo/udoo.c index eb7ab657ec..d2cbbaa23e 100644 --- a/board/udoo/udoo.c +++ b/board/udoo/udoo.c @@ -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 diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c index 2c9dc8b7c5..438bc0e743 100644 --- a/board/wandboard/wandboard.c +++ b/board/wandboard/wandboard.c @@ -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(); diff --git a/cmd/Kconfig b/cmd/Kconfig index 90d93379c3..c80ac364ea 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -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. diff --git a/common/Makefile b/common/Makefile index 8540fbc9fa..fdf5c31b1c 100644 --- a/common/Makefile +++ b/common/Makefile @@ -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 diff --git a/common/splash_source.c b/common/splash_source.c index d1647c8300..ee055ddf15 100644 --- a/common/splash_source.c +++ b/common/splash_source.c @@ -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(); diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index 4c2aaa0a0b..ed7fa88bf5 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig @@ -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 diff --git a/fs/fat/fat.c b/fs/fat/fat.c index a71bad1cbc..9ad18f96ff 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -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) diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index 4b2c493ae3..d8dab8e46a 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -149,16 +149,16 @@ #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 diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h index 2656c75b30..d1411f0550 100644 --- a/include/config_fallbacks.h +++ b/include/config_fallbacks.h @@ -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) || \