]> git.sur5r.net Git - u-boot/blobdiff - arch/x86/cpu/ivybridge/lpc.c
Merge git://git.denx.de/u-boot-net
[u-boot] / arch / x86 / cpu / ivybridge / lpc.c
index 33b11a1799d350da421a1a3285a347d165b8862c..af5d4a89089bad99778d5aef6799af6781143e86 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
 #include <rtc.h>
@@ -239,19 +240,9 @@ static void pch_rtc_init(pci_dev_t dev)
        }
        debug("rtc_failed = 0x%x\n", rtc_failed);
 
-#if CONFIG_HAVE_ACPI_RESUME
-       /* Avoid clearing pending interrupts and resetting the RTC control
-        * register in the resume path because the Linux kernel relies on
-        * this to know if it should restart the RTC timerqueue if the wake
-        * was due to the RTC alarm.
-        */
-       if (acpi_get_slp_type() == 3)
-               return;
-#endif
        /* TODO: Handle power failure */
        if (rtc_failed)
                printf("RTC power failed\n");
-       rtc_init();
 }
 
 /* CougarPoint PCH Power Management init */
@@ -509,7 +500,7 @@ int lpc_init(struct pci_controller *hose, pci_dev_t dev)
        pci_write_bar32(hose, dev, 3, 0x800);
        pci_write_bar32(hose, dev, 4, 0x900);
 
-       node = fdtdec_next_compatible(blob, 0, COMPAT_INTEL_LPC);
+       node = fdtdec_next_compatible(blob, 0, COMPAT_INTEL_PCH);
        if (node < 0)
                return -ENOENT;
 
@@ -567,3 +558,14 @@ void lpc_enable(pci_dev_t dev)
        writew(0x0010, RCB_REG(DISPBDF));
        setbits_le32(RCB_REG(FD2), PCH_ENABLE_DBDF);
 }
+
+static const struct udevice_id bd82x6x_lpc_ids[] = {
+       { .compatible = "intel,bd82x6x-lpc" },
+       { }
+};
+
+U_BOOT_DRIVER(bd82x6x_lpc_drv) = {
+       .name           = "lpc",
+       .id             = UCLASS_LPC,
+       .of_match       = bd82x6x_lpc_ids,
+};