]> Pileus Git - ~andy/linux/blobdiff - drivers/rtc/rtc-pl031.c
Merge tag 'pci-v3.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
[~andy/linux] / drivers / rtc / rtc-pl031.c
index 10c1a3454e48ecce74c595d5cd3a33a7b3f4af1d..8900ea784817a66d12300f844a162026580e42c0 100644 (file)
@@ -350,7 +350,9 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
        /* Enable the clockwatch on ST Variants */
        if (vendor->clockwatch)
                data |= RTC_CR_CWEN;
-       writel(data | RTC_CR_EN, ldata->base + RTC_CR);
+       else
+               data |= RTC_CR_EN;
+       writel(data, ldata->base + RTC_CR);
 
        /*
         * On ST PL031 variants, the RTC reset value does not provide correct
@@ -382,6 +384,8 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
                goto out_no_irq;
        }
 
+       device_init_wakeup(&adev->dev, 1);
+
        return 0;
 
 out_no_irq: