···4545 *4646 * 28-Jun-2005 Ben Dooks4747 * Mark IRQ_LCD valid4848+ *4949+ * 25-Jul-2005 Ben Dooks5050+ * Split the S3C2440 IRQ code to seperate file4851*/49525053#include <linux/init.h>···68656966#include "cpu.h"7067#include "pm.h"7171-7272-#define irqdbf(x...)7373-#define irqdbf2(x...)7474-7575-#define EXTINT_OFF (IRQ_EINT4 - 4)6868+#include "irq.h"76697770/* wakeup irq control */7871···180181 __raw_writel(mask, S3C2410_INTMSK);181182}182183183183-static struct irqchip s3c_irq_level_chip = {184184+struct irqchip s3c_irq_level_chip = {184185 .ack = s3c_irq_maskack,185186 .mask = s3c_irq_mask,186187 .unmask = s3c_irq_unmask,···369370#define INTMSK_UART2 (1UL << (IRQ_UART2 - IRQ_EINT0))370371#define INTMSK_ADCPARENT (1UL << (IRQ_ADCPARENT - IRQ_EINT0))371372372372-static inline void373373-s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit,374374- int subcheck)375375-{376376- unsigned long mask;377377- unsigned long submask;378378-379379- submask = __raw_readl(S3C2410_INTSUBMSK);380380- mask = __raw_readl(S3C2410_INTMSK);381381-382382- submask |= (1UL << (irqno - IRQ_S3CUART_RX0));383383-384384- /* check to see if we need to mask the parent IRQ */385385-386386- if ((submask & subcheck) == subcheck) {387387- __raw_writel(mask | parentbit, S3C2410_INTMSK);388388- }389389-390390- /* write back masks */391391- __raw_writel(submask, S3C2410_INTSUBMSK);392392-393393-}394394-395395-static inline void396396-s3c_irqsub_unmask(unsigned int irqno, unsigned int parentbit)397397-{398398- unsigned long mask;399399- unsigned long submask;400400-401401- submask = __raw_readl(S3C2410_INTSUBMSK);402402- mask = __raw_readl(S3C2410_INTMSK);403403-404404- submask &= ~(1UL << (irqno - IRQ_S3CUART_RX0));405405- mask &= ~parentbit;406406-407407- /* write back masks */408408- __raw_writel(submask, S3C2410_INTSUBMSK);409409- __raw_writel(mask, S3C2410_INTMSK);410410-}411411-412412-413413-static inline void414414-s3c_irqsub_maskack(unsigned int irqno, unsigned int parentmask, unsigned int group)415415-{416416- unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);417417-418418- s3c_irqsub_mask(irqno, parentmask, group);419419-420420- __raw_writel(bit, S3C2410_SUBSRCPND);421421-422422- /* only ack parent if we've got all the irqs (seems we must423423- * ack, all and hope that the irq system retriggers ok when424424- * the interrupt goes off again)425425- */426426-427427- if (1) {428428- __raw_writel(parentmask, S3C2410_SRCPND);429429- __raw_writel(parentmask, S3C2410_INTPND);430430- }431431-}432432-433433-static inline void434434-s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group)435435-{436436- unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);437437-438438- __raw_writel(bit, S3C2410_SUBSRCPND);439439-440440- /* only ack parent if we've got all the irqs (seems we must441441- * ack, all and hope that the irq system retriggers ok when442442- * the interrupt goes off again)443443- */444444-445445- if (1) {446446- __raw_writel(parentmask, S3C2410_SRCPND);447447- __raw_writel(parentmask, S3C2410_INTPND);448448- }449449-}450373451374/* UART0 */452375···715794716795 irqdbf("s3c2410: registered interrupt handlers\n");717796}718718-719719-/* s3c2440 irq code720720-*/721721-722722-#ifdef CONFIG_CPU_S3C2440723723-724724-/* WDT/AC97 */725725-726726-static void s3c_irq_demux_wdtac97(unsigned int irq,727727- struct irqdesc *desc,728728- struct pt_regs *regs)729729-{730730- unsigned int subsrc, submsk;731731- struct irqdesc *mydesc;732732-733733- /* read the current pending interrupts, and the mask734734- * for what it is available */735735-736736- subsrc = __raw_readl(S3C2410_SUBSRCPND);737737- submsk = __raw_readl(S3C2410_INTSUBMSK);738738-739739- subsrc &= ~submsk;740740- subsrc >>= 13;741741- subsrc &= 3;742742-743743- if (subsrc != 0) {744744- if (subsrc & 1) {745745- mydesc = irq_desc + IRQ_S3C2440_WDT;746746- mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs);747747- }748748- if (subsrc & 2) {749749- mydesc = irq_desc + IRQ_S3C2440_AC97;750750- mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs);751751- }752752- }753753-}754754-755755-756756-#define INTMSK_WDT (1UL << (IRQ_WDT - IRQ_EINT0))757757-758758-static void759759-s3c_irq_wdtac97_mask(unsigned int irqno)760760-{761761- s3c_irqsub_mask(irqno, INTMSK_WDT, 3<<13);762762-}763763-764764-static void765765-s3c_irq_wdtac97_unmask(unsigned int irqno)766766-{767767- s3c_irqsub_unmask(irqno, INTMSK_WDT);768768-}769769-770770-static void771771-s3c_irq_wdtac97_ack(unsigned int irqno)772772-{773773- s3c_irqsub_maskack(irqno, INTMSK_WDT, 3<<13);774774-}775775-776776-static struct irqchip s3c_irq_wdtac97 = {777777- .mask = s3c_irq_wdtac97_mask,778778- .unmask = s3c_irq_wdtac97_unmask,779779- .ack = s3c_irq_wdtac97_ack,780780-};781781-782782-/* camera irq */783783-784784-static void s3c_irq_demux_cam(unsigned int irq,785785- struct irqdesc *desc,786786- struct pt_regs *regs)787787-{788788- unsigned int subsrc, submsk;789789- struct irqdesc *mydesc;790790-791791- /* read the current pending interrupts, and the mask792792- * for what it is available */793793-794794- subsrc = __raw_readl(S3C2410_SUBSRCPND);795795- submsk = __raw_readl(S3C2410_INTSUBMSK);796796-797797- subsrc &= ~submsk;798798- subsrc >>= 11;799799- subsrc &= 3;800800-801801- if (subsrc != 0) {802802- if (subsrc & 1) {803803- mydesc = irq_desc + IRQ_S3C2440_CAM_C;804804- mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs);805805- }806806- if (subsrc & 2) {807807- mydesc = irq_desc + IRQ_S3C2440_CAM_P;808808- mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs);809809- }810810- }811811-}812812-813813-#define INTMSK_CAM (1UL << (IRQ_CAM - IRQ_EINT0))814814-815815-static void816816-s3c_irq_cam_mask(unsigned int irqno)817817-{818818- s3c_irqsub_mask(irqno, INTMSK_CAM, 3<<11);819819-}820820-821821-static void822822-s3c_irq_cam_unmask(unsigned int irqno)823823-{824824- s3c_irqsub_unmask(irqno, INTMSK_CAM);825825-}826826-827827-static void828828-s3c_irq_cam_ack(unsigned int irqno)829829-{830830- s3c_irqsub_maskack(irqno, INTMSK_CAM, 3<<11);831831-}832832-833833-static struct irqchip s3c_irq_cam = {834834- .mask = s3c_irq_cam_mask,835835- .unmask = s3c_irq_cam_unmask,836836- .ack = s3c_irq_cam_ack,837837-};838838-839839-static int s3c2440_irq_add(struct sys_device *sysdev)840840-{841841- unsigned int irqno;842842-843843- printk("S3C2440: IRQ Support\n");844844-845845- set_irq_chip(IRQ_NFCON, &s3c_irq_level_chip);846846- set_irq_handler(IRQ_NFCON, do_level_IRQ);847847- set_irq_flags(IRQ_NFCON, IRQF_VALID);848848-849849- /* add new chained handler for wdt, ac7 */850850-851851- set_irq_chip(IRQ_WDT, &s3c_irq_level_chip);852852- set_irq_handler(IRQ_WDT, do_level_IRQ);853853- set_irq_chained_handler(IRQ_WDT, s3c_irq_demux_wdtac97);854854-855855- for (irqno = IRQ_S3C2440_WDT; irqno <= IRQ_S3C2440_AC97; irqno++) {856856- set_irq_chip(irqno, &s3c_irq_wdtac97);857857- set_irq_handler(irqno, do_level_IRQ);858858- set_irq_flags(irqno, IRQF_VALID);859859- }860860-861861- /* add chained handler for camera */862862-863863- set_irq_chip(IRQ_CAM, &s3c_irq_level_chip);864864- set_irq_handler(IRQ_CAM, do_level_IRQ);865865- set_irq_chained_handler(IRQ_CAM, s3c_irq_demux_cam);866866-867867- for (irqno = IRQ_S3C2440_CAM_C; irqno <= IRQ_S3C2440_CAM_P; irqno++) {868868- set_irq_chip(irqno, &s3c_irq_cam);869869- set_irq_handler(irqno, do_level_IRQ);870870- set_irq_flags(irqno, IRQF_VALID);871871- }872872-873873- return 0;874874-}875875-876876-static struct sysdev_driver s3c2440_irq_driver = {877877- .add = s3c2440_irq_add,878878-};879879-880880-static int s3c24xx_irq_driver(void)881881-{882882- return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver);883883-}884884-885885-arch_initcall(s3c24xx_irq_driver);886886-887887-#endif /* CONFIG_CPU_S3C2440 */888888-
+99
arch/arm/mach-s3c2410/irq.h
···11+/* arch/arm/mach-s3c2410/irq.h22+ *33+ * Copyright (c) 2004-2005 Simtec Electronics44+ * Ben Dooks <ben@simtec.co.uk>55+ *66+ * Header file for S3C24XX CPU IRQ support77+ *88+ * This program is free software; you can redistribute it and/or modify99+ * it under the terms of the GNU General Public License version 2 as1010+ * published by the Free Software Foundation.1111+ *1212+ * Modifications:1313+*/1414+1515+#define irqdbf(x...)1616+#define irqdbf2(x...)1717+1818+#define EXTINT_OFF (IRQ_EINT4 - 4)1919+2020+extern struct irqchip s3c_irq_level_chip;2121+2222+static inline void2323+s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit,2424+ int subcheck)2525+{2626+ unsigned long mask;2727+ unsigned long submask;2828+2929+ submask = __raw_readl(S3C2410_INTSUBMSK);3030+ mask = __raw_readl(S3C2410_INTMSK);3131+3232+ submask |= (1UL << (irqno - IRQ_S3CUART_RX0));3333+3434+ /* check to see if we need to mask the parent IRQ */3535+3636+ if ((submask & subcheck) == subcheck) {3737+ __raw_writel(mask | parentbit, S3C2410_INTMSK);3838+ }3939+4040+ /* write back masks */4141+ __raw_writel(submask, S3C2410_INTSUBMSK);4242+4343+}4444+4545+static inline void4646+s3c_irqsub_unmask(unsigned int irqno, unsigned int parentbit)4747+{4848+ unsigned long mask;4949+ unsigned long submask;5050+5151+ submask = __raw_readl(S3C2410_INTSUBMSK);5252+ mask = __raw_readl(S3C2410_INTMSK);5353+5454+ submask &= ~(1UL << (irqno - IRQ_S3CUART_RX0));5555+ mask &= ~parentbit;5656+5757+ /* write back masks */5858+ __raw_writel(submask, S3C2410_INTSUBMSK);5959+ __raw_writel(mask, S3C2410_INTMSK);6060+}6161+6262+6363+static inline void6464+s3c_irqsub_maskack(unsigned int irqno, unsigned int parentmask, unsigned int group)6565+{6666+ unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);6767+6868+ s3c_irqsub_mask(irqno, parentmask, group);6969+7070+ __raw_writel(bit, S3C2410_SUBSRCPND);7171+7272+ /* only ack parent if we've got all the irqs (seems we must7373+ * ack, all and hope that the irq system retriggers ok when7474+ * the interrupt goes off again)7575+ */7676+7777+ if (1) {7878+ __raw_writel(parentmask, S3C2410_SRCPND);7979+ __raw_writel(parentmask, S3C2410_INTPND);8080+ }8181+}8282+8383+static inline void8484+s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group)8585+{8686+ unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);8787+8888+ __raw_writel(bit, S3C2410_SUBSRCPND);8989+9090+ /* only ack parent if we've got all the irqs (seems we must9191+ * ack, all and hope that the irq system retriggers ok when9292+ * the interrupt goes off again)9393+ */9494+9595+ if (1) {9696+ __raw_writel(parentmask, S3C2410_SRCPND);9797+ __raw_writel(parentmask, S3C2410_INTPND);9898+ }9999+}
···11+/* linux/arch/arm/mach-s3c2410/s3c2440-clock.c22+ *33+ * Copyright (c) 2004-2005 Simtec Electronics44+ * http://armlinux.simtec.co.uk/55+ * Ben Dooks <ben@simtec.co.uk>66+ *77+ * S3C2440 Clock support88+ *99+ * This program is free software; you can redistribute it and/or modify1010+ * it under the terms of the GNU General Public License as published by1111+ * the Free Software Foundation; either version 2 of the License, or1212+ * (at your option) any later version.1313+ *1414+ * This program is distributed in the hope that it will be useful,1515+ * but WITHOUT ANY WARRANTY; without even the implied warranty of1616+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1717+ * GNU General Public License for more details.1818+ *1919+ * You should have received a copy of the GNU General Public License2020+ * along with this program; if not, write to the Free Software2121+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA2222+*/2323+2424+#include <linux/init.h>2525+#include <linux/module.h>2626+#include <linux/kernel.h>2727+#include <linux/list.h>2828+#include <linux/errno.h>2929+#include <linux/err.h>3030+#include <linux/device.h>3131+#include <linux/sysdev.h>3232+3333+#include <linux/interrupt.h>3434+#include <linux/ioport.h>3535+3636+#include <asm/hardware.h>3737+#include <asm/atomic.h>3838+#include <asm/irq.h>3939+#include <asm/io.h>4040+4141+#include <asm/hardware/clock.h>4242+#include <asm/arch/regs-clock.h>4343+4444+#include "clock.h"4545+#include "cpu.h"4646+4747+/* S3C2440 extended clock support */4848+4949+static struct clk s3c2440_clk_upll = {5050+ .name = "upll",5151+ .id = -1,5252+};5353+5454+static struct clk s3c2440_clk_cam = {5555+ .name = "camif",5656+ .id = -1,5757+ .enable = s3c24xx_clkcon_enable,5858+ .ctrlbit = S3C2440_CLKCON_CAMERA,5959+};6060+6161+static struct clk s3c2440_clk_ac97 = {6262+ .name = "ac97",6363+ .id = -1,6464+ .enable = s3c24xx_clkcon_enable,6565+ .ctrlbit = S3C2440_CLKCON_CAMERA,6666+};6767+6868+static int s3c2440_clk_add(struct sys_device *sysdev)6969+{7070+ unsigned long upllcon = __raw_readl(S3C2410_UPLLCON);7171+ struct clk *clk_h;7272+ struct clk *clk_p;7373+ struct clk *clk_xtal;7474+7575+ clk_xtal = clk_get(NULL, "xtal");7676+ if (IS_ERR(clk_xtal)) {7777+ printk(KERN_ERR "S3C2440: Failed to get clk_xtal\n");7878+ return -EINVAL;7979+ }8080+8181+ s3c2440_clk_upll.rate = s3c2410_get_pll(upllcon, clk_xtal->rate);8282+8383+ printk("S3C2440: Clock Support, UPLL %ld.%03ld MHz\n",8484+ print_mhz(s3c2440_clk_upll.rate));8585+8686+ clk_p = clk_get(NULL, "pclk");8787+ clk_h = clk_get(NULL, "hclk");8888+8989+ if (IS_ERR(clk_p) || IS_ERR(clk_h)) {9090+ printk(KERN_ERR "S3C2440: Failed to get parent clocks\n");9191+ return -EINVAL;9292+ }9393+9494+ s3c2440_clk_cam.parent = clk_h;9595+ s3c2440_clk_ac97.parent = clk_p;9696+9797+ s3c24xx_register_clock(&s3c2440_clk_ac97);9898+ s3c24xx_register_clock(&s3c2440_clk_cam);9999+ s3c24xx_register_clock(&s3c2440_clk_upll);100100+101101+ clk_disable(&s3c2440_clk_ac97);102102+ clk_disable(&s3c2440_clk_cam);103103+104104+ return 0;105105+}106106+107107+static struct sysdev_driver s3c2440_clk_driver = {108108+ .add = s3c2440_clk_add,109109+};110110+111111+static __init int s3c24xx_clk_driver(void)112112+{113113+ return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_clk_driver);114114+}115115+116116+arch_initcall(s3c24xx_clk_driver);
+207
arch/arm/mach-s3c2410/s3c2440-irq.c
···11+/* linux/arch/arm/mach-s3c2410/s3c2440-irq.c22+ *33+ * Copyright (c) 2003,2004 Simtec Electronics44+ * Ben Dooks <ben@simtec.co.uk>55+ *66+ * This program is free software; you can redistribute it and/or modify77+ * it under the terms of the GNU General Public License as published by88+ * the Free Software Foundation; either version 2 of the License, or99+ * (at your option) any later version.1010+ *1111+ * This program is distributed in the hope that it will be useful,1212+ * but WITHOUT ANY WARRANTY; without even the implied warranty of1313+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1414+ * GNU General Public License for more details.1515+ *1616+ * You should have received a copy of the GNU General Public License1717+ * along with this program; if not, write to the Free Software1818+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA1919+ *2020+ * Changelog:2121+ * 25-Jul-2005 BJD Split from irq.c2222+ *2323+*/2424+2525+#include <linux/init.h>2626+#include <linux/module.h>2727+#include <linux/interrupt.h>2828+#include <linux/ioport.h>2929+#include <linux/ptrace.h>3030+#include <linux/sysdev.h>3131+3232+#include <asm/hardware.h>3333+#include <asm/irq.h>3434+#include <asm/io.h>3535+3636+#include <asm/mach/irq.h>3737+3838+#include <asm/arch/regs-irq.h>3939+#include <asm/arch/regs-gpio.h>4040+4141+#include "cpu.h"4242+#include "pm.h"4343+#include "irq.h"4444+4545+/* WDT/AC97 */4646+4747+static void s3c_irq_demux_wdtac97(unsigned int irq,4848+ struct irqdesc *desc,4949+ struct pt_regs *regs)5050+{5151+ unsigned int subsrc, submsk;5252+ struct irqdesc *mydesc;5353+5454+ /* read the current pending interrupts, and the mask5555+ * for what it is available */5656+5757+ subsrc = __raw_readl(S3C2410_SUBSRCPND);5858+ submsk = __raw_readl(S3C2410_INTSUBMSK);5959+6060+ subsrc &= ~submsk;6161+ subsrc >>= 13;6262+ subsrc &= 3;6363+6464+ if (subsrc != 0) {6565+ if (subsrc & 1) {6666+ mydesc = irq_desc + IRQ_S3C2440_WDT;6767+ mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs);6868+ }6969+ if (subsrc & 2) {7070+ mydesc = irq_desc + IRQ_S3C2440_AC97;7171+ mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs);7272+ }7373+ }7474+}7575+7676+7777+#define INTMSK_WDT (1UL << (IRQ_WDT - IRQ_EINT0))7878+7979+static void8080+s3c_irq_wdtac97_mask(unsigned int irqno)8181+{8282+ s3c_irqsub_mask(irqno, INTMSK_WDT, 3<<13);8383+}8484+8585+static void8686+s3c_irq_wdtac97_unmask(unsigned int irqno)8787+{8888+ s3c_irqsub_unmask(irqno, INTMSK_WDT);8989+}9090+9191+static void9292+s3c_irq_wdtac97_ack(unsigned int irqno)9393+{9494+ s3c_irqsub_maskack(irqno, INTMSK_WDT, 3<<13);9595+}9696+9797+static struct irqchip s3c_irq_wdtac97 = {9898+ .mask = s3c_irq_wdtac97_mask,9999+ .unmask = s3c_irq_wdtac97_unmask,100100+ .ack = s3c_irq_wdtac97_ack,101101+};102102+103103+/* camera irq */104104+105105+static void s3c_irq_demux_cam(unsigned int irq,106106+ struct irqdesc *desc,107107+ struct pt_regs *regs)108108+{109109+ unsigned int subsrc, submsk;110110+ struct irqdesc *mydesc;111111+112112+ /* read the current pending interrupts, and the mask113113+ * for what it is available */114114+115115+ subsrc = __raw_readl(S3C2410_SUBSRCPND);116116+ submsk = __raw_readl(S3C2410_INTSUBMSK);117117+118118+ subsrc &= ~submsk;119119+ subsrc >>= 11;120120+ subsrc &= 3;121121+122122+ if (subsrc != 0) {123123+ if (subsrc & 1) {124124+ mydesc = irq_desc + IRQ_S3C2440_CAM_C;125125+ mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs);126126+ }127127+ if (subsrc & 2) {128128+ mydesc = irq_desc + IRQ_S3C2440_CAM_P;129129+ mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs);130130+ }131131+ }132132+}133133+134134+#define INTMSK_CAM (1UL << (IRQ_CAM - IRQ_EINT0))135135+136136+static void137137+s3c_irq_cam_mask(unsigned int irqno)138138+{139139+ s3c_irqsub_mask(irqno, INTMSK_CAM, 3<<11);140140+}141141+142142+static void143143+s3c_irq_cam_unmask(unsigned int irqno)144144+{145145+ s3c_irqsub_unmask(irqno, INTMSK_CAM);146146+}147147+148148+static void149149+s3c_irq_cam_ack(unsigned int irqno)150150+{151151+ s3c_irqsub_maskack(irqno, INTMSK_CAM, 3<<11);152152+}153153+154154+static struct irqchip s3c_irq_cam = {155155+ .mask = s3c_irq_cam_mask,156156+ .unmask = s3c_irq_cam_unmask,157157+ .ack = s3c_irq_cam_ack,158158+};159159+160160+static int s3c2440_irq_add(struct sys_device *sysdev)161161+{162162+ unsigned int irqno;163163+164164+ printk("S3C2440: IRQ Support\n");165165+166166+ set_irq_chip(IRQ_NFCON, &s3c_irq_level_chip);167167+ set_irq_handler(IRQ_NFCON, do_level_IRQ);168168+ set_irq_flags(IRQ_NFCON, IRQF_VALID);169169+170170+ /* add new chained handler for wdt, ac7 */171171+172172+ set_irq_chip(IRQ_WDT, &s3c_irq_level_chip);173173+ set_irq_handler(IRQ_WDT, do_level_IRQ);174174+ set_irq_chained_handler(IRQ_WDT, s3c_irq_demux_wdtac97);175175+176176+ for (irqno = IRQ_S3C2440_WDT; irqno <= IRQ_S3C2440_AC97; irqno++) {177177+ set_irq_chip(irqno, &s3c_irq_wdtac97);178178+ set_irq_handler(irqno, do_level_IRQ);179179+ set_irq_flags(irqno, IRQF_VALID);180180+ }181181+182182+ /* add chained handler for camera */183183+184184+ set_irq_chip(IRQ_CAM, &s3c_irq_level_chip);185185+ set_irq_handler(IRQ_CAM, do_level_IRQ);186186+ set_irq_chained_handler(IRQ_CAM, s3c_irq_demux_cam);187187+188188+ for (irqno = IRQ_S3C2440_CAM_C; irqno <= IRQ_S3C2440_CAM_P; irqno++) {189189+ set_irq_chip(irqno, &s3c_irq_cam);190190+ set_irq_handler(irqno, do_level_IRQ);191191+ set_irq_flags(irqno, IRQF_VALID);192192+ }193193+194194+ return 0;195195+}196196+197197+static struct sysdev_driver s3c2440_irq_driver = {198198+ .add = s3c2440_irq_add,199199+};200200+201201+static int s3c24xx_irq_driver(void)202202+{203203+ return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver);204204+}205205+206206+arch_initcall(s3c24xx_irq_driver);207207+