diff options
| -rw-r--r-- | arch/arm/mach-shmobile/Makefile | 2 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/intc-r8a7740.c | 54 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7740.c | 32 |
3 files changed, 33 insertions, 55 deletions
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index f6881f9b7d5f..74181314fded 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
| @@ -9,7 +9,7 @@ obj-y := timer.o console.o clock.o | |||
| 9 | obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o clock-sh7372.o intc-sh7372.o | 9 | obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o clock-sh7372.o intc-sh7372.o |
| 10 | obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o clock-sh73a0.o intc-sh73a0.o | 10 | obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o clock-sh73a0.o intc-sh73a0.o |
| 11 | obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o clock-r8a73a4.o | 11 | obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o clock-r8a73a4.o |
| 12 | obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o clock-r8a7740.o intc-r8a7740.o | 12 | obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o clock-r8a7740.o |
| 13 | obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o clock-r8a7778.o | 13 | obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o clock-r8a7778.o |
| 14 | obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o clock-r8a7779.o intc-r8a7779.o | 14 | obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o clock-r8a7779.o intc-r8a7779.o |
| 15 | obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o clock-r8a7790.o | 15 | obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o clock-r8a7790.o |
diff --git a/arch/arm/mach-shmobile/intc-r8a7740.c b/arch/arm/mach-shmobile/intc-r8a7740.c deleted file mode 100644 index 75193539b541..000000000000 --- a/arch/arm/mach-shmobile/intc-r8a7740.c +++ /dev/null | |||
| @@ -1,54 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * R8A7740 processor support | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011 Renesas Solutions Corp. | ||
| 5 | * Copyright (C) 2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; version 2 of the License. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <linux/init.h> | ||
| 22 | #include <linux/io.h> | ||
| 23 | #include <linux/irqchip.h> | ||
| 24 | #include <linux/irqchip/arm-gic.h> | ||
| 25 | |||
| 26 | void __init r8a7740_init_irq_of(void) | ||
| 27 | { | ||
| 28 | void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10); | ||
| 29 | void __iomem *intc_msk_base = ioremap_nocache(0xe6900040, 0x10); | ||
| 30 | void __iomem *pfc_inta_ctrl = ioremap_nocache(0xe605807c, 0x4); | ||
| 31 | |||
| 32 | irqchip_init(); | ||
| 33 | |||
| 34 | /* route signals to GIC */ | ||
| 35 | iowrite32(0x0, pfc_inta_ctrl); | ||
| 36 | |||
| 37 | /* | ||
| 38 | * To mask the shared interrupt to SPI 149 we must ensure to set | ||
| 39 | * PRIO *and* MASK. Else we run into IRQ floods when registering | ||
| 40 | * the intc_irqpin devices | ||
| 41 | */ | ||
| 42 | iowrite32(0x0, intc_prio_base + 0x0); | ||
| 43 | iowrite32(0x0, intc_prio_base + 0x4); | ||
| 44 | iowrite32(0x0, intc_prio_base + 0x8); | ||
| 45 | iowrite32(0x0, intc_prio_base + 0xc); | ||
| 46 | iowrite8(0xff, intc_msk_base + 0x0); | ||
| 47 | iowrite8(0xff, intc_msk_base + 0x4); | ||
| 48 | iowrite8(0xff, intc_msk_base + 0x8); | ||
| 49 | iowrite8(0xff, intc_msk_base + 0xc); | ||
| 50 | |||
| 51 | iounmap(intc_prio_base); | ||
| 52 | iounmap(intc_msk_base); | ||
| 53 | iounmap(pfc_inta_ctrl); | ||
| 54 | } | ||
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 21026b349b96..b7d4b2c3bc29 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c | |||
| @@ -22,6 +22,8 @@ | |||
| 22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
| 23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
| 24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
| 25 | #include <linux/irqchip.h> | ||
| 26 | #include <linux/irqchip/arm-gic.h> | ||
| 25 | #include <linux/platform_data/irq-renesas-intc-irqpin.h> | 27 | #include <linux/platform_data/irq-renesas-intc-irqpin.h> |
| 26 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
| 27 | #include <linux/of_platform.h> | 29 | #include <linux/of_platform.h> |
| @@ -1019,6 +1021,36 @@ void __init r8a7740_init_delay(void) | |||
| 1019 | shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */ | 1021 | shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */ |
| 1020 | }; | 1022 | }; |
| 1021 | 1023 | ||
| 1024 | void __init r8a7740_init_irq_of(void) | ||
| 1025 | { | ||
| 1026 | void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10); | ||
| 1027 | void __iomem *intc_msk_base = ioremap_nocache(0xe6900040, 0x10); | ||
| 1028 | void __iomem *pfc_inta_ctrl = ioremap_nocache(0xe605807c, 0x4); | ||
| 1029 | |||
| 1030 | irqchip_init(); | ||
| 1031 | |||
| 1032 | /* route signals to GIC */ | ||
| 1033 | iowrite32(0x0, pfc_inta_ctrl); | ||
| 1034 | |||
| 1035 | /* | ||
| 1036 | * To mask the shared interrupt to SPI 149 we must ensure to set | ||
| 1037 | * PRIO *and* MASK. Else we run into IRQ floods when registering | ||
| 1038 | * the intc_irqpin devices | ||
| 1039 | */ | ||
| 1040 | iowrite32(0x0, intc_prio_base + 0x0); | ||
| 1041 | iowrite32(0x0, intc_prio_base + 0x4); | ||
| 1042 | iowrite32(0x0, intc_prio_base + 0x8); | ||
| 1043 | iowrite32(0x0, intc_prio_base + 0xc); | ||
| 1044 | iowrite8(0xff, intc_msk_base + 0x0); | ||
| 1045 | iowrite8(0xff, intc_msk_base + 0x4); | ||
| 1046 | iowrite8(0xff, intc_msk_base + 0x8); | ||
| 1047 | iowrite8(0xff, intc_msk_base + 0xc); | ||
| 1048 | |||
| 1049 | iounmap(intc_prio_base); | ||
| 1050 | iounmap(intc_msk_base); | ||
| 1051 | iounmap(pfc_inta_ctrl); | ||
| 1052 | } | ||
| 1053 | |||
| 1022 | static void __init r8a7740_generic_init(void) | 1054 | static void __init r8a7740_generic_init(void) |
| 1023 | { | 1055 | { |
| 1024 | r8a7740_clock_init(0); | 1056 | r8a7740_clock_init(0); |
