ARM: at91: remove useless at91_sysirq_mask_rtx
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Mon, 12 Jan 2015 18:42:13 +0000 (19:42 +0100)
committerNicolas Ferre <nicolas.ferre@atmel.com>
Thu, 15 Jan 2015 14:24:05 +0000 (15:24 +0100)
The irq fixup from at91_sysirq_mask_rtc and at91_sysirq_mask_rtt is now handled
by aic_common_rtc_irq_fixup and aic_common_rtt_irq_fixup. Remove those useless
functions.
Also remove the now unused mach/at91_rtt.h header.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 files changed:
arch/arm/mach-at91/Makefile
arch/arm/mach-at91/at91sam9260.c
arch/arm/mach-at91/at91sam9261.c
arch/arm/mach-at91/at91sam9263.c
arch/arm/mach-at91/at91sam9g45.c
arch/arm/mach-at91/at91sam9n12.c
arch/arm/mach-at91/at91sam9rl.c
arch/arm/mach-at91/at91sam9x5.c
arch/arm/mach-at91/generic.h
arch/arm/mach-at91/include/mach/at91_rtt.h [deleted file]
arch/arm/mach-at91/sama5d3.c
arch/arm/mach-at91/sysirq_mask.c [deleted file]

index 9165a4aa7f0d1d49215ee4bfde595ba186066bf2..8ef7d9a2e8557463e88e382ee81b48820969c509 100644 (file)
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-obj-y          := setup.o sysirq_mask.o
+obj-y          := setup.o
 
 obj-$(CONFIG_SOC_AT91SAM9)     += sam9_smc.o
 
index 78137c24d90b9dddfd0d5a1be75a267a5402768d..34e2abe82ae41a4723320a0ed0026aa045864e7e 100644 (file)
@@ -51,8 +51,6 @@ static void __init at91sam9260_map_io(void)
 static void __init at91sam9260_initialize(void)
 {
        arm_pm_idle = at91sam9_idle;
-
-       at91_sysirq_mask_rtt(AT91SAM9260_BASE_RTT);
 }
 
 AT91_SOC_START(at91sam9260)
index d29953ecb0c441aa7fcdf814a708df3c8ba10a53..47878b8499757bf20bb06c78767ba6702def13da 100644 (file)
@@ -32,8 +32,6 @@ static void __init at91sam9261_map_io(void)
 static void __init at91sam9261_initialize(void)
 {
        arm_pm_idle = at91sam9_idle;
-
-       at91_sysirq_mask_rtt(AT91SAM9261_BASE_RTT);
 }
 
 AT91_SOC_START(at91sam9261)
index e7ad148640837d45a9038e58cf7610e3cf35e2a6..aabcb66145d0ff0bbebf2cb17a1ad0b7c895443d 100644 (file)
@@ -29,9 +29,6 @@ static void __init at91sam9263_map_io(void)
 static void __init at91sam9263_initialize(void)
 {
        arm_pm_idle = at91sam9_idle;
-
-       at91_sysirq_mask_rtt(AT91SAM9263_BASE_RTT0);
-       at91_sysirq_mask_rtt(AT91SAM9263_BASE_RTT1);
 }
 
 AT91_SOC_START(at91sam9263)
index 3d225105e0d11e12911284735d5976df64a59eba..000166777a8d2b5376ddffba74689e5d474c0b7a 100644 (file)
@@ -28,9 +28,6 @@ static void __init at91sam9g45_map_io(void)
 static void __init at91sam9g45_initialize(void)
 {
        arm_pm_idle = at91sam9_idle;
-
-       at91_sysirq_mask_rtc(AT91SAM9G45_BASE_RTC);
-       at91_sysirq_mask_rtt(AT91SAM9G45_BASE_RTT);
 }
 
 AT91_SOC_START(at91sam9g45)
index dee569b1987ee7c8f5dee1f08fa4e1d99a8927cb..0135f868ea4f1070d6b456ea6563275a8835bcc3 100644 (file)
@@ -21,12 +21,6 @@ static void __init at91sam9n12_map_io(void)
        at91_init_sram(0, AT91SAM9N12_SRAM_BASE, AT91SAM9N12_SRAM_SIZE);
 }
 
-static void __init at91sam9n12_initialize(void)
-{
-       at91_sysirq_mask_rtc(AT91SAM9N12_BASE_RTC);
-}
-
 AT91_SOC_START(at91sam9n12)
        .map_io = at91sam9n12_map_io,
-       .init = at91sam9n12_initialize,
 AT91_SOC_END
index bd7e56889b43d1a10cffa079791cf55a36a1de76..1babfb27694a18fb6e2aeb6e28b90148b16a2a04 100644 (file)
@@ -41,9 +41,6 @@ static void __init at91sam9rl_map_io(void)
 static void __init at91sam9rl_initialize(void)
 {
        arm_pm_idle = at91sam9_idle;
-
-       at91_sysirq_mask_rtc(AT91SAM9RL_BASE_RTC);
-       at91_sysirq_mask_rtt(AT91SAM9RL_BASE_RTT);
 }
 
 AT91_SOC_START(at91sam9rl)
index f0d5a69a7237d66b5936906bb7196546d0a1b48e..aa17520ccb0a96aaf4945ab492270cebf90fb2b2 100644 (file)
@@ -21,16 +21,6 @@ static void __init at91sam9x5_map_io(void)
        at91_init_sram(0, AT91SAM9X5_SRAM_BASE, AT91SAM9X5_SRAM_SIZE);
 }
 
-static void __init at91sam9x5_initialize(void)
-{
-       at91_sysirq_mask_rtc(AT91SAM9X5_BASE_RTC);
-}
-
-/* --------------------------------------------------------------------
- *  Interrupt initialization
- * -------------------------------------------------------------------- */
-
 AT91_SOC_START(at91sam9x5)
        .map_io = at91sam9x5_map_io,
-       .init = at91sam9x5_initialize,
 AT91_SOC_END
index d53324210adf62310d15a191380eed7b3e2e6e9e..e0368aa063908e988ffe9066526b215a30b8b287 100644 (file)
@@ -25,10 +25,6 @@ extern void __init at91rm9200_set_type(int type);
 extern void __init at91rm9200_dt_initialize(void);
 extern void __init at91_dt_initialize(void);
 
- /* Interrupts */
-extern void __init at91_sysirq_mask_rtc(u32 rtc_base);
-extern void __init at91_sysirq_mask_rtt(u32 rtt_base);
-
  /* Timer */
 extern void at91rm9200_timer_init(void);
 
diff --git a/arch/arm/mach-at91/include/mach/at91_rtt.h b/arch/arm/mach-at91/include/mach/at91_rtt.h
deleted file mode 100644 (file)
index 7ec75de..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * arch/arm/mach-at91/include/mach/at91_rtt.h
- *
- * Copyright (C) 2007 Andrew Victor
- * Copyright (C) 2007 Atmel Corporation.
- *
- * Real-time Timer (RTT) - System peripherals regsters.
- * Based on AT91SAM9261 datasheet revision D.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-#ifndef AT91_RTT_H
-#define AT91_RTT_H
-
-#define AT91_RTT_MR            0x00                    /* Real-time Mode Register */
-#define                AT91_RTT_RTPRES         (0xffff << 0)           /* Real-time Timer Prescaler Value */
-#define                AT91_RTT_ALMIEN         (1 << 16)               /* Alarm Interrupt Enable */
-#define                AT91_RTT_RTTINCIEN      (1 << 17)               /* Real Time Timer Increment Interrupt Enable */
-#define                AT91_RTT_RTTRST         (1 << 18)               /* Real Time Timer Restart */
-
-#define AT91_RTT_AR            0x04                    /* Real-time Alarm Register */
-#define                AT91_RTT_ALMV           (0xffffffff)            /* Alarm Value */
-
-#define AT91_RTT_VR            0x08                    /* Real-time Value Register */
-#define                AT91_RTT_CRTV           (0xffffffff)            /* Current Real-time Value */
-
-#define AT91_RTT_SR            0x0c                    /* Real-time Status Register */
-#define                AT91_RTT_ALMS           (1 << 0)                /* Real-time Alarm Status */
-#define                AT91_RTT_RTTINC         (1 << 1)                /* Real-time Timer Increment */
-
-#endif
index 3d775d08de08def15011e449bca421fe19dc0f95..ae58feada72ba5d0d0fba420ce743a9168ef6e8e 100644 (file)
@@ -30,12 +30,6 @@ static void __init sama5d3_map_io(void)
        at91_init_sram(0, SAMA5D3_SRAM_BASE, SAMA5D3_SRAM_SIZE);
 }
 
-static void __init sama5d3_initialize(void)
-{
-       at91_sysirq_mask_rtc(SAMA5D3_BASE_RTC);
-}
-
 AT91_SOC_START(sama5d3)
        .map_io = sama5d3_map_io,
-       .init = sama5d3_initialize,
 AT91_SOC_END
diff --git a/arch/arm/mach-at91/sysirq_mask.c b/arch/arm/mach-at91/sysirq_mask.c
deleted file mode 100644 (file)
index f8bc351..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * sysirq_mask.c - System-interrupt masking
- *
- * Copyright (C) 2013 Johan Hovold <jhovold@gmail.com>
- *
- * Functions to disable system interrupts from backup-powered peripherals.
- *
- * The RTC and RTT-peripherals are generally powered by backup power (VDDBU)
- * and are not reset on wake-up, user, watchdog or software reset. This means
- * that their interrupts may be enabled during early boot (e.g. after a user
- * reset).
- *
- * As the RTC and RTT share the system-interrupt line with the PIT, an
- * interrupt occurring before a handler has been installed would lead to the
- * system interrupt being disabled and prevent the system from booting.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-#include <linux/io.h>
-#include <mach/at91_rtt.h>
-
-#include "generic.h"
-
-#define AT91_RTC_IDR           0x24    /* Interrupt Disable Register */
-#define AT91_RTC_IMR           0x28    /* Interrupt Mask Register */
-#define AT91_RTC_IRQ_MASK      0x1f    /* Available IRQs mask */
-
-void __init at91_sysirq_mask_rtc(u32 rtc_base)
-{
-       void __iomem *base;
-
-       base = ioremap(rtc_base, 64);
-       if (!base)
-               return;
-
-       /*
-        * sam9x5 SoCs have the following errata:
-        * "RTC: Interrupt Mask Register cannot be used
-        *  Interrupt Mask Register read always returns 0."
-        *
-        * Hence we're not relying on IMR values to disable
-        * interrupts.
-        */
-       writel_relaxed(AT91_RTC_IRQ_MASK, base + AT91_RTC_IDR);
-       (void)readl_relaxed(base + AT91_RTC_IMR);       /* flush */
-
-       iounmap(base);
-}
-
-void __init at91_sysirq_mask_rtt(u32 rtt_base)
-{
-       void __iomem *base;
-       void __iomem *reg;
-       u32 mode;
-
-       base = ioremap(rtt_base, 16);
-       if (!base)
-               return;
-
-       reg = base + AT91_RTT_MR;
-
-       mode = readl_relaxed(reg);
-       if (mode & (AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN)) {
-               pr_info("AT91: Disabling rtt irq\n");
-               mode &= ~(AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN);
-               writel_relaxed(mode, reg);
-               (void)readl_relaxed(reg);                       /* flush */
-       }
-
-       iounmap(base);
-}