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 <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
master
Simon Glass 8 years ago
parent 3bf926c0dd
commit 10e40d54b3
  1. 2
      api/api_storage.c
  2. 6
      arch/arm/cpu/armv7/mx6/clock.c
  3. 2
      arch/arm/imx-common/Makefile
  4. 2
      arch/arm/imx-common/cpu.c
  5. 2
      arch/powerpc/cpu/mpc85xx/cpu_init.c
  6. 2
      board/advantech/dms-ba16/dms-ba16.c
  7. 2
      board/bachmann/ot1200/ot1200.c
  8. 2
      board/boundary/nitrogen6x/nitrogen6x.c
  9. 2
      board/congatec/cgtqmx6eval/cgtqmx6eval.c
  10. 2
      board/gateworks/gw_ventana/gw_ventana.c
  11. 2
      board/kosagi/novena/novena.c
  12. 2
      board/toradex/apalis_imx6/apalis_imx6.c
  13. 2
      board/toradex/colibri_imx6/colibri_imx6.c
  14. 2
      board/udoo/udoo.c
  15. 2
      board/wandboard/wandboard.c
  16. 1
      cmd/Kconfig
  17. 2
      common/Makefile
  18. 2
      common/splash_source.c
  19. 13
      drivers/block/Kconfig
  20. 2
      fs/fat/fat.c
  21. 6
      include/config_distro_bootcmd.h
  22. 2
      include/config_fallbacks.h

@ -63,7 +63,7 @@ void dev_stor_init(void)
specs[ENUM_MMC].type = DEV_TYP_STOR | DT_STOR_MMC; specs[ENUM_MMC].type = DEV_TYP_STOR | DT_STOR_MMC;
specs[ENUM_MMC].name = "mmc"; specs[ENUM_MMC].name = "mmc";
#endif #endif
#if defined(CONFIG_CMD_SATA) #if defined(CONFIG_SATA)
specs[ENUM_SATA].max_dev = CONFIG_SYS_SATA_MAX_DEVICE; specs[ENUM_SATA].max_dev = CONFIG_SYS_SATA_MAX_DEVICE;
specs[ENUM_SATA].enum_started = 0; specs[ENUM_SATA].enum_started = 0;
specs[ENUM_SATA].enum_ended = 0; specs[ENUM_SATA].enum_ended = 0;

@ -1042,7 +1042,7 @@ u32 imx_get_fecclk(void)
return mxc_get_clock(MXC_IPG_CLK); 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) static int enable_enet_pll(uint32_t en)
{ {
struct mxc_ccm_reg *const imx_ccm struct mxc_ccm_reg *const imx_ccm
@ -1069,7 +1069,7 @@ static int enable_enet_pll(uint32_t en)
} }
#endif #endif
#ifdef CONFIG_CMD_SATA #ifdef CONFIG_SATA
static void ungate_sata_clock(void) static void ungate_sata_clock(void)
{ {
struct mxc_ccm_reg *const imx_ccm = 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); clrbits_le32(&ccm_regs->cbcmr, MXC_CCM_CBCMR_PCIE_AXI_CLK_SEL);
/* Party time! Ungate the clock to the PCIe. */ /* Party time! Ungate the clock to the PCIe. */
#ifdef CONFIG_CMD_SATA #ifdef CONFIG_SATA
ungate_sata_clock(); ungate_sata_clock();
#endif #endif
ungate_pcie_clock(); ungate_pcie_clock();

@ -25,7 +25,7 @@ obj-$(CONFIG_SYSCOUNTER_TIMER) += syscounter.o
endif endif
ifeq ($(SOC),$(filter $(SOC),mx6 mx7)) ifeq ($(SOC),$(filter $(SOC),mx6 mx7))
obj-y += cache.o init.o 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_VIDEO_SKIP) += video.o
obj-$(CONFIG_IMX_RDC) += rdc-sema.o obj-$(CONFIG_IMX_RDC) += rdc-sema.o
obj-$(CONFIG_IMX_BOOTAUX) += imx_bootaux.o obj-$(CONFIG_IMX_BOOTAUX) += imx_bootaux.o

@ -278,7 +278,7 @@ void arch_preboot_os(void)
#if defined(CONFIG_PCIE_IMX) #if defined(CONFIG_PCIE_IMX)
imx_pcie_remove(); imx_pcie_remove();
#endif #endif
#if defined(CONFIG_CMD_SATA) #if defined(CONFIG_SATA)
sata_stop(); sata_stop();
#if defined(CONFIG_MX6) #if defined(CONFIG_MX6)
disable_sata_clock(); disable_sata_clock();

@ -1024,7 +1024,7 @@ void arch_preboot_os(void)
mtmsr(msr); mtmsr(msr);
} }
#if defined(CONFIG_CMD_SATA) && defined(CONFIG_FSL_SATA) #if defined(CONFIG_SATA) && defined(CONFIG_FSL_SATA)
int sata_initialize(void) int sata_initialize(void)
{ {
if (is_serdes_configured(SATA1) || is_serdes_configured(SATA2)) if (is_serdes_configured(SATA1) || is_serdes_configured(SATA2))

@ -609,7 +609,7 @@ int board_late_init(void)
pwm_enable(0); pwm_enable(0);
#endif #endif
#ifdef CONFIG_CMD_SATA #ifdef CONFIG_SATA
setup_ba16_sata(); setup_ba16_sata();
#endif #endif

@ -338,7 +338,7 @@ int board_init(void)
leds_on(); leds_on();
#ifdef CONFIG_CMD_SATA #ifdef CONFIG_SATA
setup_sata(); setup_sata();
#endif #endif

@ -903,7 +903,7 @@ int board_init(void)
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2); setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
#ifdef CONFIG_CMD_SATA #ifdef CONFIG_SATA
setup_sata(); setup_sata();
#endif #endif

@ -702,7 +702,7 @@ int board_init(void)
else else
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info1); setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info1);
#ifdef CONFIG_CMD_SATA #ifdef CONFIG_SATA
setup_sata(); setup_sata();
#endif #endif

@ -633,7 +633,7 @@ int board_init(void)
#endif #endif
setup_ventana_i2c(); setup_ventana_i2c();
#ifdef CONFIG_CMD_SATA #ifdef CONFIG_SATA
setup_sata(); setup_sata();
#endif #endif
/* read Gateworks EEPROM into global struct (used later) */ /* read Gateworks EEPROM into global struct (used later) */

@ -167,7 +167,7 @@ int board_init(void)
/* address of boot parameters */ /* address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
#ifdef CONFIG_CMD_SATA #ifdef CONFIG_SATA
setup_sata(); setup_sata();
#endif #endif

@ -784,7 +784,7 @@ int board_init(void)
(void) pmic_init(); (void) pmic_init();
#endif #endif
#ifdef CONFIG_CMD_SATA #ifdef CONFIG_SATA
setup_sata(); setup_sata();
#endif #endif

@ -657,7 +657,7 @@ int board_init(void)
(void) pmic_init(); (void) pmic_init();
#endif #endif
#ifdef CONFIG_CMD_SATA #ifdef CONFIG_SATA
setup_sata(); setup_sata();
#endif #endif

@ -244,7 +244,7 @@ int board_init(void)
/* address of boot parameters */ /* address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
#ifdef CONFIG_CMD_SATA #ifdef CONFIG_SATA
if (is_cpu_type(MXC_CPU_MX6Q)) if (is_cpu_type(MXC_CPU_MX6Q))
setup_sata(); setup_sata();
#endif #endif

@ -379,7 +379,7 @@ int board_early_init_f(void)
#if defined(CONFIG_VIDEO_IPUV3) #if defined(CONFIG_VIDEO_IPUV3)
setup_display(); setup_display();
#endif #endif
#ifdef CONFIG_CMD_SATA #ifdef CONFIG_SATA
/* Only mx6q wandboard has SATA */ /* Only mx6q wandboard has SATA */
if (is_cpu_type(MXC_CPU_MX6Q)) if (is_cpu_type(MXC_CPU_MX6Q))
setup_sata(); setup_sata();

@ -736,6 +736,7 @@ config CMD_FDC
config CMD_SATA config CMD_SATA
bool "sata - Access SATA subsystem" bool "sata - Access SATA subsystem"
select SATA
help help
SATA (Serial Advanced Technology Attachment) is a serial bus SATA (Serial Advanced Technology Attachment) is a serial bus
standard for connecting to hard drives and other storage devices. standard for connecting to hard drives and other storage devices.

@ -79,7 +79,7 @@ obj-$(CONFIG_LCD_ROTATION) += lcd_console_rotation.o
obj-$(CONFIG_LCD_DT_SIMPLEFB) += lcd_simplefb.o obj-$(CONFIG_LCD_DT_SIMPLEFB) += lcd_simplefb.o
obj-$(CONFIG_LYNXKDI) += lynxkdi.o obj-$(CONFIG_LYNXKDI) += lynxkdi.o
obj-$(CONFIG_MENU) += menu.o obj-$(CONFIG_MENU) += menu.o
obj-$(CONFIG_CMD_SATA) += sata.o obj-$(CONFIG_SATA) += sata.o
obj-$(CONFIG_SCSI) += scsi.o obj-$(CONFIG_SCSI) += scsi.o
obj-$(CONFIG_UPDATE_TFTP) += update.o obj-$(CONFIG_UPDATE_TFTP) += update.o
obj-$(CONFIG_DFU_TFTP) += update.o obj-$(CONFIG_DFU_TFTP) += update.o

@ -162,7 +162,7 @@ static inline int splash_init_usb(void)
} }
#endif #endif
#ifdef CONFIG_CMD_SATA #ifdef CONFIG_SATA
static int splash_init_sata(void) static int splash_init_sata(void)
{ {
return sata_initialize(); return sata_initialize();

@ -19,6 +19,19 @@ config AHCI
operations at present. The block device interface has not been converted operations at present. The block device interface has not been converted
to driver model. 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 config SCSI
bool "Support SCSI controllers" bool "Support SCSI controllers"
help help

@ -1251,7 +1251,7 @@ int file_fat_detectfs(void)
} }
#if defined(CONFIG_IDE) || \ #if defined(CONFIG_IDE) || \
defined(CONFIG_CMD_SATA) || \ defined(CONFIG_SATA) || \
defined(CONFIG_SCSI) || \ defined(CONFIG_SCSI) || \
defined(CONFIG_CMD_USB) || \ defined(CONFIG_CMD_USB) || \
defined(CONFIG_MMC) defined(CONFIG_MMC)

@ -149,16 +149,16 @@
#define SCAN_DEV_FOR_EFI #define SCAN_DEV_FOR_EFI
#endif #endif
#ifdef CONFIG_CMD_SATA #ifdef CONFIG_SATA
#define BOOTENV_SHARED_SATA BOOTENV_SHARED_BLKDEV(sata) #define BOOTENV_SHARED_SATA BOOTENV_SHARED_BLKDEV(sata)
#define BOOTENV_DEV_SATA BOOTENV_DEV_BLKDEV #define BOOTENV_DEV_SATA BOOTENV_DEV_BLKDEV
#define BOOTENV_DEV_NAME_SATA BOOTENV_DEV_NAME_BLKDEV #define BOOTENV_DEV_NAME_SATA BOOTENV_DEV_NAME_BLKDEV
#else #else
#define BOOTENV_SHARED_SATA #define BOOTENV_SHARED_SATA
#define BOOTENV_DEV_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 \ #define BOOTENV_DEV_NAME_SATA \
BOOT_TARGET_DEVICES_references_SATA_without_CONFIG_CMD_SATA BOOT_TARGET_DEVICES_references_SATA_without_CONFIG_SATA
#endif #endif
#ifdef CONFIG_SCSI #ifdef CONFIG_SCSI

@ -48,7 +48,7 @@
/* Rather than repeat this expression each time, add a define for it */ /* Rather than repeat this expression each time, add a define for it */
#if defined(CONFIG_IDE) || \ #if defined(CONFIG_IDE) || \
defined(CONFIG_CMD_SATA) || \ defined(CONFIG_SATA) || \
defined(CONFIG_SCSI) || \ defined(CONFIG_SCSI) || \
defined(CONFIG_CMD_USB) || \ defined(CONFIG_CMD_USB) || \
defined(CONFIG_CMD_PART) || \ defined(CONFIG_CMD_PART) || \

Loading…
Cancel
Save