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>
This commit is contained in:
parent
3bf926c0dd
commit
10e40d54b3
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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))
|
||||
|
@ -609,7 +609,7 @@ int board_late_init(void)
|
||||
pwm_enable(0);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CMD_SATA
|
||||
#ifdef CONFIG_SATA
|
||||
setup_ba16_sata();
|
||||
#endif
|
||||
|
||||
|
@ -338,7 +338,7 @@ int board_init(void)
|
||||
|
||||
leds_on();
|
||||
|
||||
#ifdef CONFIG_CMD_SATA
|
||||
#ifdef CONFIG_SATA
|
||||
setup_sata();
|
||||
#endif
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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) */
|
||||
|
@ -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
|
||||
|
||||
|
@ -784,7 +784,7 @@ int board_init(void)
|
||||
(void) pmic_init();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CMD_SATA
|
||||
#ifdef CONFIG_SATA
|
||||
setup_sata();
|
||||
#endif
|
||||
|
||||
|
@ -657,7 +657,7 @@ int board_init(void)
|
||||
(void) pmic_init();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CMD_SATA
|
||||
#ifdef CONFIG_SATA
|
||||
setup_sata();
|
||||
#endif
|
||||
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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) || \
|
||||
|
Loading…
Reference in New Issue
Block a user