diff options
Diffstat (limited to 'arch/sh/boards/renesas')
-rw-r--r-- | arch/sh/boards/renesas/hs7751rvoip/io.c | 2 | ||||
-rw-r--r-- | arch/sh/boards/renesas/hs7751rvoip/irq.c | 2 | ||||
-rw-r--r-- | arch/sh/boards/renesas/hs7751rvoip/setup.c | 7 | ||||
-rw-r--r-- | arch/sh/boards/renesas/r7780rp/io.c | 2 | ||||
-rw-r--r-- | arch/sh/boards/renesas/r7780rp/irq.c | 108 | ||||
-rw-r--r-- | arch/sh/boards/renesas/r7780rp/setup.c | 2 | ||||
-rw-r--r-- | arch/sh/boards/renesas/rts7751r2d/io.c | 4 | ||||
-rw-r--r-- | arch/sh/boards/renesas/rts7751r2d/irq.c | 6 | ||||
-rw-r--r-- | arch/sh/boards/renesas/rts7751r2d/led.c | 15 | ||||
-rw-r--r-- | arch/sh/boards/renesas/rts7751r2d/setup.c | 2 |
10 files changed, 36 insertions, 114 deletions
diff --git a/arch/sh/boards/renesas/hs7751rvoip/io.c b/arch/sh/boards/renesas/hs7751rvoip/io.c index 51f3f657421..bb9aa0d6285 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/io.c +++ b/arch/sh/boards/renesas/hs7751rvoip/io.c @@ -15,7 +15,7 @@ #include <linux/module.h> #include <linux/pci.h> #include <asm/io.h> -#include <asm/hs7751rvoip/hs7751rvoip.h> +#include <asm/hs7751rvoip.h> #include <asm/addrspace.h> extern void *area6_io8_base; /* Area 6 8bit I/O Base address */ diff --git a/arch/sh/boards/renesas/hs7751rvoip/irq.c b/arch/sh/boards/renesas/hs7751rvoip/irq.c index c617b188258..943f93aa605 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/irq.c +++ b/arch/sh/boards/renesas/hs7751rvoip/irq.c @@ -14,7 +14,7 @@ #include <linux/irq.h> #include <asm/io.h> #include <asm/irq.h> -#include <asm/hs7751rvoip/hs7751rvoip.h> +#include <asm/hs7751rvoip.h> static int mask_pos[] = {8, 9, 10, 11, 12, 13, 0, 1, 2, 3, 4, 5, 6, 7}; diff --git a/arch/sh/boards/renesas/hs7751rvoip/setup.c b/arch/sh/boards/renesas/hs7751rvoip/setup.c index 0414c15c345..1d997ffd793 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/setup.c +++ b/arch/sh/boards/renesas/hs7751rvoip/setup.c @@ -10,15 +10,10 @@ #include <linux/init.h> #include <linux/irq.h> #include <linux/mm.h> -#include <linux/vmalloc.h> -#include <linux/hdreg.h> -#include <linux/ide.h> #include <linux/pm.h> +#include <asm/hs7751rvoip.h> #include <asm/io.h> -#include <asm/hs7751rvoip/hs7751rvoip.h> #include <asm/machvec.h> -#include <asm/rtc.h> -#include <asm/irq.h> static void __init hs7751rvoip_init_irq(void) { diff --git a/arch/sh/boards/renesas/r7780rp/io.c b/arch/sh/boards/renesas/r7780rp/io.c index db92d6e6ae9..311ccccba71 100644 --- a/arch/sh/boards/renesas/r7780rp/io.c +++ b/arch/sh/boards/renesas/r7780rp/io.c @@ -11,7 +11,7 @@ #include <linux/pci.h> #include <linux/kernel.h> #include <linux/types.h> -#include <asm/r7780rp/r7780rp.h> +#include <asm/r7780rp.h> #include <asm/addrspace.h> #include <asm/io.h> diff --git a/arch/sh/boards/renesas/r7780rp/irq.c b/arch/sh/boards/renesas/r7780rp/irq.c index 2d960e9a314..aa15ec5bc69 100644 --- a/arch/sh/boards/renesas/r7780rp/irq.c +++ b/arch/sh/boards/renesas/r7780rp/irq.c @@ -1,18 +1,17 @@ /* - * linux/arch/sh/boards/renesas/r7780rp/irq.c - * - * Copyright (C) 2000 Kazumoto Kojima - * * Renesas Solutions Highlander R7780RP-1 Support. * - * Modified for R7780RP-1 by - * Atom Create Engineering Co., Ltd. 2002. + * Copyright (C) 2002 Atom Create Engineering Co., Ltd. + * Copyright (C) 2006 Paul Mundt + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. */ #include <linux/init.h> #include <linux/irq.h> -#include <asm/io.h> -#include <asm/irq.h> -#include <asm/r7780rp/r7780rp.h> +#include <linux/io.h> +#include <asm/r7780rp.h> #ifdef CONFIG_SH_R7780MP static int mask_pos[] = {12, 11, 9, 14, 15, 8, 13, 6, 5, 4, 3, 2, 0, 0, 1, 0}; @@ -20,71 +19,26 @@ static int mask_pos[] = {12, 11, 9, 14, 15, 8, 13, 6, 5, 4, 3, 2, 0, 0, 1, 0}; static int mask_pos[] = {15, 14, 13, 12, 11, 10, 9, 8, 7, 5, 6, 4, 0, 1, 2, 0}; #endif -static void enable_r7780rp_irq(unsigned int irq); -static void disable_r7780rp_irq(unsigned int irq); - -/* shutdown is same as "disable" */ -#define shutdown_r7780rp_irq disable_r7780rp_irq - -static void ack_r7780rp_irq(unsigned int irq); -static void end_r7780rp_irq(unsigned int irq); - -static unsigned int startup_r7780rp_irq(unsigned int irq) -{ - enable_r7780rp_irq(irq); - return 0; /* never anything pending */ -} - -static void disable_r7780rp_irq(unsigned int irq) -{ - unsigned short val; - unsigned short mask = 0xffff ^ (0x0001 << mask_pos[irq]); - - /* Set the priority in IPR to 0 */ - val = ctrl_inw(IRLCNTR1); - val &= mask; - ctrl_outw(val, IRLCNTR1); -} - static void enable_r7780rp_irq(unsigned int irq) { - unsigned short val; - unsigned short value = (0x0001 << mask_pos[irq]); - /* Set priority in IPR back to original value */ - val = ctrl_inw(IRLCNTR1); - val |= value; - ctrl_outw(val, IRLCNTR1); -} - -static void ack_r7780rp_irq(unsigned int irq) -{ - disable_r7780rp_irq(irq); + ctrl_outw(ctrl_inw(IRLCNTR1) | (1 << mask_pos[irq]), IRLCNTR1); } -static void end_r7780rp_irq(unsigned int irq) +static void disable_r7780rp_irq(unsigned int irq) { - if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) - enable_r7780rp_irq(irq); + /* Set the priority in IPR to 0 */ + ctrl_outw(ctrl_inw(IRLCNTR1) & (0xffff ^ (1 << mask_pos[irq])), + IRLCNTR1); } -static struct hw_interrupt_type r7780rp_irq_type = { - .typename = "R7780RP-IRQ", - .startup = startup_r7780rp_irq, - .shutdown = shutdown_r7780rp_irq, - .enable = enable_r7780rp_irq, - .disable = disable_r7780rp_irq, - .ack = ack_r7780rp_irq, - .end = end_r7780rp_irq, +static struct irq_chip r7780rp_irq_chip __read_mostly = { + .name = "R7780RP", + .mask = disable_r7780rp_irq, + .unmask = enable_r7780rp_irq, + .mask_ack = disable_r7780rp_irq, }; -static void make_r7780rp_irq(unsigned int irq) -{ - disable_irq_nosync(irq); - irq_desc[irq].chip = &r7780rp_irq_type; - disable_r7780rp_irq(irq); -} - /* * Initialize IRQ setting */ @@ -92,24 +46,10 @@ void __init init_r7780rp_IRQ(void) { int i; - /* IRL0=PCI Slot #A - * IRL1=PCI Slot #B - * IRL2=PCI Slot #C - * IRL3=PCI Slot #D - * IRL4=CF Card - * IRL5=CF Card Insert - * IRL6=M66596 - * IRL7=SD Card - * IRL8=Touch Panel - * IRL9=SCI - * IRL10=Serial - * IRL11=Extention #A - * IRL11=Extention #B - * IRL12=Debug LAN - * IRL13=Push Switch - * IRL14=ZiggBee IO - */ - - for (i=0; i<15; i++) - make_r7780rp_irq(i); + for (i = 0; i < 15; i++) { + disable_irq_nosync(i); + set_irq_chip_and_handler_name(i, &r7780rp_irq_chip, + handle_level_irq, "level"); + enable_r7780rp_irq(i); + } } diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c index b941aa0aa34..c331caeb694 100644 --- a/arch/sh/boards/renesas/r7780rp/setup.c +++ b/arch/sh/boards/renesas/r7780rp/setup.c @@ -13,7 +13,7 @@ #include <linux/init.h> #include <linux/platform_device.h> #include <asm/machvec.h> -#include <asm/r7780rp/r7780rp.h> +#include <asm/r7780rp.h> #include <asm/clock.h> #include <asm/io.h> diff --git a/arch/sh/boards/renesas/rts7751r2d/io.c b/arch/sh/boards/renesas/rts7751r2d/io.c index 135aa0b5e62..f2507a80497 100644 --- a/arch/sh/boards/renesas/rts7751r2d/io.c +++ b/arch/sh/boards/renesas/rts7751r2d/io.c @@ -11,8 +11,8 @@ #include <linux/kernel.h> #include <linux/types.h> #include <linux/pci.h> -#include <asm/rts7751r2d/rts7751r2d.h> -#include <asm/io.h> +#include <linux/io.h> +#include <asm/rts7751r2d.h> #include <asm/addrspace.h> /* diff --git a/arch/sh/boards/renesas/rts7751r2d/irq.c b/arch/sh/boards/renesas/rts7751r2d/irq.c index c915e7a3693..cb0eb20d1b4 100644 --- a/arch/sh/boards/renesas/rts7751r2d/irq.c +++ b/arch/sh/boards/renesas/rts7751r2d/irq.c @@ -8,12 +8,10 @@ * Modified for RTS7751R2D by * Atom Create Engineering Co., Ltd. 2002. */ - #include <linux/init.h> #include <linux/irq.h> -#include <asm/io.h> -#include <asm/irq.h> -#include <asm/rts7751r2d/rts7751r2d.h> +#include <linux/io.h> +#include <asm/rts7751r2d.h> #if defined(CONFIG_RTS7751R2D_REV11) static int mask_pos[] = {11, 9, 8, 12, 10, 6, 5, 4, 7, 14, 13, 0, 0, 0, 0}; diff --git a/arch/sh/boards/renesas/rts7751r2d/led.c b/arch/sh/boards/renesas/rts7751r2d/led.c index a7ce66c1e4f..509f548bdce 100644 --- a/arch/sh/boards/renesas/rts7751r2d/led.c +++ b/arch/sh/boards/renesas/rts7751r2d/led.c @@ -8,13 +8,9 @@ * * This file contains Renesas Technology Sales RTS7751R2D specific LED code. */ - -#include <asm/io.h> -#include <asm/rts7751r2d/rts7751r2d.h> - -#ifdef CONFIG_HEARTBEAT - +#include <linux/io.h> #include <linux/sched.h> +#include <asm/rts7751r2d.h> /* Cycle the LED's in the clasic Knightriger/Sun pattern */ void heartbeat_rts7751r2d(void) @@ -46,10 +42,3 @@ void heartbeat_rts7751r2d(void) else bit--; } -#endif /* CONFIG_HEARTBEAT */ - -void rts7751r2d_led(unsigned short value) -{ - ctrl_outw(value, PA_OUTPORT); -} - diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c index 20597a6e670..5c042d35ec9 100644 --- a/arch/sh/boards/renesas/rts7751r2d/setup.c +++ b/arch/sh/boards/renesas/rts7751r2d/setup.c @@ -12,9 +12,9 @@ #include <linux/platform_device.h> #include <linux/serial_8250.h> #include <linux/pm.h> -#include <asm/io.h> #include <asm/machvec.h> #include <asm/mach/rts7751r2d.h> +#include <asm/io.h> #include <asm/voyagergx.h> extern void heartbeat_rts7751r2d(void); |