diff options
author | Simon Glass <sjg@chromium.org> | 2014-11-14 18:18:38 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-11-25 06:34:01 -0700 |
commit | 3ac839352db2fb464e1e6e6a4bc50f06fb29cdb0 (patch) | |
tree | fc4597857ff5299dbbb4abeb752ad3027000655b /arch/x86/cpu/ivybridge/bd82x6x.c | |
parent | 05efc3961cf01916b32ef58a3965d46a11636e68 (diff) | |
download | u-boot-imx-3ac839352db2fb464e1e6e6a4bc50f06fb29cdb0.zip u-boot-imx-3ac839352db2fb464e1e6e6a4bc50f06fb29cdb0.tar.gz u-boot-imx-3ac839352db2fb464e1e6e6a4bc50f06fb29cdb0.tar.bz2 |
x86: ivybridge: Add SATA init
Add code to set up the SATA interfaces on boot.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/cpu/ivybridge/bd82x6x.c')
-rw-r--r-- | arch/x86/cpu/ivybridge/bd82x6x.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/x86/cpu/ivybridge/bd82x6x.c b/arch/x86/cpu/ivybridge/bd82x6x.c index be4db74..b54f5c7 100644 --- a/arch/x86/cpu/ivybridge/bd82x6x.c +++ b/arch/x86/cpu/ivybridge/bd82x6x.c @@ -88,18 +88,38 @@ void bd82x6x_pci_bus_enable_resources(pci_dev_t dev) int bd82x6x_init_pci_devices(void) { + const void *blob = gd->fdt_blob; struct pci_controller *hose; + int sata_node; hose = pci_bus_to_hose(0); lpc_enable(PCH_LPC_DEV); lpc_init(hose, PCH_LPC_DEV); + sata_node = fdtdec_next_compatible(blob, 0, + COMPAT_INTEL_PANTHERPOINT_AHCI); + if (sata_node < 0) { + debug("%s: Cannot find SATA node\n", __func__); + return -EINVAL; + } + bd82x6x_sata_init(PCH_SATA_DEV, blob, sata_node); return 0; } int bd82x6x_init(void) { + const void *blob = gd->fdt_blob; + int sata_node; + + sata_node = fdtdec_next_compatible(blob, 0, + COMPAT_INTEL_PANTHERPOINT_AHCI); + if (sata_node < 0) { + debug("%s: Cannot find SATA node\n", __func__); + return -EINVAL; + } + bd82x6x_pci_init(PCH_DEV); + bd82x6x_sata_enable(PCH_SATA_DEV, blob, sata_node); return 0; } |