summaryrefslogtreecommitdiff
path: root/arch/x86/cpu/ivybridge/bd82x6x.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-01-17 16:11:37 -0700
committerBin Meng <bmeng.cn@gmail.com>2016-01-24 12:09:40 +0800
commit01a679084b1d98701f73f1344f6802f3d9ee1076 (patch)
treebf9f20a8a5ea82c3fa7b2821b7a83f4947750a98 /arch/x86/cpu/ivybridge/bd82x6x.c
parent82935b751b435cd1b6b7f38967121fc830717dd1 (diff)
x86: ivybridge: Use the SATA driver to do the init
Instead of manually initing the device, probe the SATA device and move the init there. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu/ivybridge/bd82x6x.c')
-rw-r--r--arch/x86/cpu/ivybridge/bd82x6x.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/x86/cpu/ivybridge/bd82x6x.c b/arch/x86/cpu/ivybridge/bd82x6x.c
index 1fe2ce13c8..188b7da4f7 100644
--- a/arch/x86/cpu/ivybridge/bd82x6x.c
+++ b/arch/x86/cpu/ivybridge/bd82x6x.c
@@ -22,7 +22,7 @@ static int bd82x6x_probe(struct udevice *dev)
{
const void *blob = gd->fdt_blob;
struct pci_controller *hose;
- int sata_node, gma_node;
+ int gma_node;
int ret;
if (!(gd->flags & GD_FLG_RELOC))
@@ -31,13 +31,10 @@ static int bd82x6x_probe(struct udevice *dev)
hose = pci_bus_to_hose(0);
lpc_enable(PCH_LPC_DEV);
lpc_init_extra(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);
+
+ /* Cause the SATA device to do its init */
+ uclass_first_device(UCLASS_DISK, &dev);
+
bd82x6x_usb_ehci_init(PCH_EHCI1_DEV);
bd82x6x_usb_ehci_init(PCH_EHCI2_DEV);