Commit fc843a02 authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

Kconfig: Add a CONFIG_IDE option



At present IDE support is controlled by CONFIG_CMD_IDE. Add a separate
CONFIG_IDE option so that IDE support can be enabled without requiring
the 'ide' command.

Update existing users and move the ide driver into drivers/block since
it should not be in common/.
Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
parent 75eb9976
......@@ -1081,7 +1081,7 @@ The following options need to be configured:
disk/part_efi.c
CONFIG_MTD_PARTITIONS Memory Technology Device partition table.
If IDE or SCSI support is enabled (CONFIG_CMD_IDE or
If IDE or SCSI support is enabled (CONFIG_IDE or
CONFIG_SCSI) you must configure support for at
least one non-MTD partition type as well.
......
......@@ -46,7 +46,7 @@ static struct stor_spec specs[ENUM_MAX] = { { 0, 0, 0, 0, NULL }, };
void dev_stor_init(void)
{
#if defined(CONFIG_CMD_IDE)
#if defined(CONFIG_IDE)
specs[ENUM_IDE].max_dev = CONFIG_SYS_IDE_MAXDEVICE;
specs[ENUM_IDE].enum_started = 0;
specs[ENUM_IDE].enum_ended = 0;
......
......@@ -95,7 +95,7 @@
/*
* IDE Support on SATA ports
*/
#ifdef CONFIG_CMD_IDE
#ifdef CONFIG_IDE
#define __io
#define CONFIG_MVSATA_IDE
#define CONFIG_IDE_PREINIT
......@@ -110,12 +110,12 @@
#define CONFIG_SYS_ATA_STRIDE 4
/* Controller supports 48-bits LBA addressing */
#define CONFIG_LBA48
/* CONFIG_CMD_IDE requires some #defines for ATA registers */
/* CONFIG_IDE requires some #defines for ATA registers */
#define CONFIG_SYS_IDE_MAXBUS 2
#define CONFIG_SYS_IDE_MAXDEVICE 2
/* ATA registers base is at SATA controller base */
#define CONFIG_SYS_ATA_BASE_ADDR MV_SATA_BASE
#endif /* CONFIG_CMD_IDE */
#endif /* CONFIG_IDE */
/*
* I2C related stuff
......
......@@ -8,7 +8,7 @@
*/
#include <common.h>
#if defined(CONFIG_CMD_IDE)
#if defined(CONFIG_IDE)
#include <mpc5xxx.h>
DECLARE_GLOBAL_DATA_PTR;
......
......@@ -35,7 +35,7 @@ obj-y += cache.o
obj-y += extable.o
obj-y += interrupts.o
obj-$(CONFIG_CMD_KGDB) += kgdb.o
obj-$(CONFIG_CMD_IDE) += ide.o
obj-$(CONFIG_IDE) += ide.o
obj-y += stack.o
obj-y += time.o
......
......@@ -88,7 +88,7 @@ int testdram(void)
return (0);
}
#ifdef CONFIG_CMD_IDE
#ifdef CONFIG_IDE
#include <ata.h>
int ide_preinit(void)
{
......@@ -133,7 +133,7 @@ void ide_set_reset(int idereset)
setbits_8(&ata->cr, 0x01);
}
}
#endif /* CONFIG_CMD_IDE */
#endif /* CONFIG_IDE */
#ifdef CONFIG_DRIVER_DM9000
......
......@@ -81,7 +81,7 @@ int testdram(void)
return (0);
}
#ifdef CONFIG_CMD_IDE
#ifdef CONFIG_IDE
#include <ata.h>
int ide_preinit(void)
{
......@@ -126,4 +126,4 @@ void ide_set_reset(int idereset)
setbits_8(&ata->cr, 0x01);
}
}
#endif /* CONFIG_CMD_IDE */
#endif /* CONFIG_IDE */
......@@ -88,7 +88,7 @@ int testdram(void)
return (0);
}
#if defined(CONFIG_CMD_IDE)
#if defined(CONFIG_IDE)
#include <ata.h>
int ide_preinit(void)
......
......@@ -325,7 +325,7 @@ void pci_init_board(void)
}
#endif
#ifdef CONFIG_CMD_IDE
#ifdef CONFIG_IDE
#ifdef CONFIG_IDE_RESET
......@@ -369,7 +369,7 @@ void ide_set_reset(int idereset)
setbits_be32((void *)MPC5XXX_WU_GPIO_ENABLE, (1 << 25));
}
#endif /* CONFIG_IDE_RESET */
#endif /* CONFIG_CMD_IDE */
#endif /* CONFIG_IDE */
#ifdef CONFIG_OF_BOARD_SETUP
static void ft_delete_node(void *fdt, const char *compat)
......
......@@ -259,7 +259,7 @@ void pci_init_board(void)
}
#endif
#if defined(CONFIG_CMD_IDE) && defined(CONFIG_IDE_RESET)
#if defined(CONFIG_IDE) && defined(CONFIG_IDE_RESET)
void init_ide_reset (void)
{
......
......@@ -176,7 +176,7 @@ int ft_board_setup(void *blob, bd_t *bd)
}
#endif /* CONFIG_OF_BOARD_SETUP */
#if defined(CONFIG_CMD_IDE) && defined(CONFIG_IDE_RESET)
#if defined(CONFIG_IDE) && defined(CONFIG_IDE_RESET)
#define GPIO_PSC2_4 0x02000000UL
......@@ -206,4 +206,4 @@ void ide_set_reset(int idereset)
} else
setbits_be32(&wu_gpio->dvo, GPIO_PSC2_4);
}
#endif /* defined(CONFIG_CMD_IDE) && defined(CONFIG_IDE_RESET) */
#endif /* defined(CONFIG_IDE) && defined(CONFIG_IDE_RESET) */
......@@ -312,7 +312,7 @@ void pci_init_board(void)
}
#endif
#if defined(CONFIG_CMD_IDE) && defined(CONFIG_IDE_RESET)
#if defined(CONFIG_IDE) && defined(CONFIG_IDE_RESET)
#if defined (CONFIG_MINIFAP)
#define SM501_POWER_MODE0_GATE 0x00000040UL
......
......@@ -224,7 +224,7 @@ int misc_init_r(void)
return 0;
}
#if defined(CONFIG_CMD_IDE) && defined(CONFIG_IDE_RESET)
#if defined(CONFIG_IDE) && defined(CONFIG_IDE_RESET)
void init_ide_reset(void)
{
debug("init_ide_reset\n");
......
......@@ -486,6 +486,7 @@ config CMD_DEMO
config CMD_IDE
bool "ide - Support for IDE drivers"
select IDE
help
Provides an 'ide' command which allows accessing the IDE drive,
reseting the IDE interface, printing the partition table and
......
......@@ -83,7 +83,7 @@ U_BOOT_CMD(
#undef CHECK_IDE_DEVICE
#if defined(CONFIG_CMD_IDE) && defined(CONFIG_IDE_8xx_PCCARD)
#if defined(CONFIG_IDE) && defined(CONFIG_IDE_8xx_PCCARD)
#define CHECK_IDE_DEVICE
#endif
......
......@@ -145,7 +145,6 @@ obj-y += dlmalloc.o
ifdef CONFIG_SYS_MALLOC_F_LEN
obj-y += malloc_simple.o
endif
obj-$(CONFIG_CMD_IDE) += ide.o
obj-y += image.o
obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o
obj-$(CONFIG_$(SPL_)OF_LIBFDT) += image-fdt.o
......
......@@ -23,9 +23,7 @@
#include <dm.h>
#include <environment.h>
#include <fdtdec.h>
#if defined(CONFIG_CMD_IDE)
#include <ide.h>
#endif
#include <initcall.h>
#include <init_helpers.h>
#ifdef CONFIG_PS2KBD
......@@ -611,7 +609,7 @@ static int initr_post(void)
}
#endif
#if defined(CONFIG_CMD_PCMCIA) && !defined(CONFIG_CMD_IDE)
#if defined(CONFIG_CMD_PCMCIA) && !defined(CONFIG_IDE)
static int initr_pcmcia(void)
{
puts("PCMCIA:");
......@@ -620,7 +618,7 @@ static int initr_pcmcia(void)
}
#endif
#if defined(CONFIG_CMD_IDE)
#if defined(CONFIG_IDE)
static int initr_ide(void)
{
#ifdef CONFIG_IDE_8xx_PCCARD
......@@ -870,10 +868,10 @@ static init_fnc_t init_sequence_r[] = {
#ifdef CONFIG_POST
initr_post,
#endif
#if defined(CONFIG_CMD_PCMCIA) && !defined(CONFIG_CMD_IDE)
#if defined(CONFIG_CMD_PCMCIA) && !defined(CONFIG_IDE)
initr_pcmcia,
#endif
#if defined(CONFIG_CMD_IDE)
#if defined(CONFIG_IDE)
initr_ide,
#endif
#ifdef CONFIG_LAST_STAGE_INIT
......
......@@ -59,3 +59,11 @@ config DWC_AHCI
Synopsys DWC AHCI module.
endmenu
config IDE
bool "Support IDE controllers"
help
Enables support for IDE (Integrated Drive Electronics) hard drives.
This allows access to raw blocks and filesystems on an IDE drive
from U-Boot. See also CMD_IDE which provides an 'ide' command for
performing various IDE operations.
......@@ -17,6 +17,7 @@ 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment