ARM: LPC313X: Removing watchdog IRQ from the driver. The watchdog will reset the...
authorSrinivas Bakki <srinivas.bakki@nxp.com>
Mon, 7 Feb 2011 10:00:03 +0000 (15:00 +0530)
committerSrinivas Bakki <srinivas.bakki@nxp.com>
Mon, 7 Feb 2011 10:00:03 +0000 (15:00 +0530)
Signed-off-by: Widyanto <daniel.widyanto@nxp.com>

arch/arm/mach-lpc313x/wdt.c
drivers/watchdog/wdt_lpc313x.c

index be32b33..0cf5d37 100644 (file)
@@ -30,10 +30,6 @@ static struct resource watchdog_resources[] = {
                .end = WDT_PHYS + SZ_4K - 1,
                .flags = IORESOURCE_MEM,
        },
-       {
-               .start = IRQ_WDT,
-               .flags = IORESOURCE_IRQ,
-       },
 };
 
 static struct platform_device watchdog_device = {
index 6162f03..e8fcfdf 100644 (file)
@@ -70,7 +70,6 @@ static struct lpc313x_wdt
 {
        spinlock_t lock;
        void __iomem * base;
-       int irq;
        unsigned long status;
        unsigned long boot_status;
        struct device * dev;
@@ -255,37 +254,6 @@ static struct miscdevice lpc313x_wdt_misc = {
        .fops   = &lpc313x_wdt_fops,
 };
 
-/**
- *     lpc313x_wdt_isr:
- *     @irq:           Interrupt number
- *     @dev_id:        Unused as we don't allow multiple devices.
- *
- *     Handle an interrupt from the board. These are raised when the status
- *     map changes in what the board considers an interesting way. That means
- *     a failure condition occurring.
- */
-
-static irqreturn_t lpc313x_wdt_isr(int irq, void *dev_id)
-{
-       /*
-        *      Read the status register see what is up and
-        *      then printk it.
-        */
-       uint32_t status;
-       struct lpc313x_wdt * wdt = &lpc313x_wdt;
-
-       spin_lock(&wdt->lock);
-       status = readl(wdt->base + LPC313x_WDT_IR);
-
-       dev_vdbg(wdt->dev, "WDT status %d\n", status);
-
-       dev_crit(wdt->dev, "WDT timedout\n");
-
-       writel(status, wdt->base + LPC313x_WDT_IR);
-       spin_unlock(&wdt->lock);
-       return IRQ_HANDLED;
-}
-
 static int lpc313x_wdt_probe(struct platform_device *pdev)
 {
        int ret;
@@ -295,12 +263,6 @@ static int lpc313x_wdt_probe(struct platform_device *pdev)
 
        spin_lock_init(&wdt->lock);
        wdt->dev = &pdev->dev;
-       wdt->irq = platform_get_irq(pdev, 0);
-       if (wdt->irq < 0) {
-               dev_err(&pdev->dev, "No IRQ resource found\n");
-               return -ENXIO;
-       }
-
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (res == NULL) {
                dev_err(&pdev->dev, "Unable to get resources.\n");
@@ -320,13 +282,6 @@ static int lpc313x_wdt_probe(struct platform_device *pdev)
                return -ENOMEM;
        }
 
-       ret = devm_request_irq(&pdev->dev, wdt->irq, lpc313x_wdt_isr, 
-                       IRQF_DISABLED, pdev->name, NULL);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "Unable to request IRQ%d\n", wdt->irq);
-               return ret;
-       }
-
        ret = misc_register(&lpc313x_wdt_misc);
        if (ret < 0) {
                dev_err(&pdev->dev, " lpc313x_wdt : failed to register\n");