Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372399
b: refs/heads/master
c: 658dc8f
h: refs/heads/master
i:
  372397: e0d8909
  372395: c46f179
  372391: 55d7480
  372383: c5cb60f
v: v3
  • Loading branch information
Heiko Stuebner authored and Kukjin Kim committed Apr 4, 2013
1 parent 4c78d14 commit 76badd7
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 50 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bd7c0da2c1590ea292052b873f93d2c1dbbf7d28
refs/heads/master: 658dc8fb9cbc7712b1518ce79211ffadcabd1c9e
99 changes: 50 additions & 49 deletions trunk/drivers/irqchip/irq-s3c24xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ struct s3c_irq_intc {
struct s3c_irq_data *irqs;
};

/*
* Array holding pointers to the global controller structs
* [0] ... main_intc
* [1] ... sub_intc
* [2] ... main_intc2 on s3c2416
*/
static struct s3c_irq_intc *s3c_intc[3];

static void s3c_irq_mask(struct irq_data *data)
{
struct s3c_irq_intc *intc = data->domain->host_data;
Expand Down Expand Up @@ -307,9 +315,6 @@ static void s3c_irq_demux(unsigned int irq, struct irq_desc *desc)
chained_irq_exit(chip, desc);
}

static struct s3c_irq_intc *main_intc;
static struct s3c_irq_intc *main_intc2;

static inline int s3c24xx_handle_intc(struct s3c_irq_intc *intc,
struct pt_regs *regs)
{
Expand Down Expand Up @@ -345,12 +350,12 @@ static inline int s3c24xx_handle_intc(struct s3c_irq_intc *intc,
asmlinkage void __exception_irq_entry s3c24xx_handle_irq(struct pt_regs *regs)
{
do {
if (likely(main_intc))
if (s3c24xx_handle_intc(main_intc, regs))
if (likely(s3c_intc[0]))
if (s3c24xx_handle_intc(s3c_intc[0], regs))
continue;

if (main_intc2)
if (s3c24xx_handle_intc(main_intc2, regs))
if (s3c_intc[2])
if (s3c24xx_handle_intc(s3c_intc[2], regs))
continue;

break;
Expand Down Expand Up @@ -577,11 +582,6 @@ static struct s3c_irq_intc *s3c24xx_init_intc(struct device_node *np,
goto err;
}

if (address == 0x4a000000)
main_intc = intc;
else if (address == 0x4a000040)
main_intc2 = intc;

set_handle_irq(s3c24xx_handle_irq);

return intc;
Expand Down Expand Up @@ -670,20 +670,20 @@ static struct s3c_irq_data init_s3c2410subint[32] = {

void __init s3c2410_init_irq(void)
{
struct s3c_irq_intc *main_intc;

#ifdef CONFIG_FIQ
init_FIQ(FIQ_START);
#endif

main_intc = s3c24xx_init_intc(NULL, &init_s3c2410base[0], NULL, 0x4a000000);
if (IS_ERR(main_intc)) {
s3c_intc[0] = s3c24xx_init_intc(NULL, &init_s3c2410base[0], NULL,
0x4a000000);
if (IS_ERR(s3c_intc[0])) {
pr_err("irq: could not create main interrupt controller\n");
return;
}

s3c24xx_init_intc(NULL, &init_s3c2410subint[0], main_intc, 0x4a000018);
s3c24xx_init_intc(NULL, &init_eint[0], main_intc, 0x560000a4);
s3c_intc[1] = s3c24xx_init_intc(NULL, &init_s3c2410subint[0],
s3c_intc[0], 0x4a000018);
s3c24xx_init_intc(NULL, &init_eint[0], s3c_intc[0], 0x560000a4);
}
#endif

Expand Down Expand Up @@ -770,22 +770,22 @@ static struct s3c_irq_data init_s3c2412subint[32] = {

void s3c2412_init_irq(void)
{
struct s3c_irq_intc *main_intc;

pr_info("S3C2412: IRQ Support\n");

#ifdef CONFIG_FIQ
init_FIQ(FIQ_START);
#endif

main_intc = s3c24xx_init_intc(NULL, &init_s3c2412base[0], NULL, 0x4a000000);
if (IS_ERR(main_intc)) {
s3c_intc[0] = s3c24xx_init_intc(NULL, &init_s3c2412base[0], NULL,
0x4a000000);
if (IS_ERR(s3c_intc[0])) {
pr_err("irq: could not create main interrupt controller\n");
return;
}

s3c24xx_init_intc(NULL, &init_s3c2412eint[0], main_intc, 0x560000a4);
s3c24xx_init_intc(NULL, &init_s3c2412subint[0], main_intc, 0x4a000018);
s3c24xx_init_intc(NULL, &init_s3c2412eint[0], s3c_intc[0], 0x560000a4);
s3c_intc[1] = s3c24xx_init_intc(NULL, &init_s3c2412subint[0],
s3c_intc[0], 0x4a000018);
}
#endif

Expand Down Expand Up @@ -869,24 +869,25 @@ static struct s3c_irq_data init_s3c2416_second[32] = {

void __init s3c2416_init_irq(void)
{
struct s3c_irq_intc *main_intc;

pr_info("S3C2416: IRQ Support\n");

#ifdef CONFIG_FIQ
init_FIQ(FIQ_START);
#endif

main_intc = s3c24xx_init_intc(NULL, &init_s3c2416base[0], NULL, 0x4a000000);
if (IS_ERR(main_intc)) {
s3c_intc[0] = s3c24xx_init_intc(NULL, &init_s3c2416base[0], NULL,
0x4a000000);
if (IS_ERR(s3c_intc[0])) {
pr_err("irq: could not create main interrupt controller\n");
return;
}

s3c24xx_init_intc(NULL, &init_eint[0], main_intc, 0x560000a4);
s3c24xx_init_intc(NULL, &init_s3c2416subint[0], main_intc, 0x4a000018);
s3c24xx_init_intc(NULL, &init_eint[0], s3c_intc[0], 0x560000a4);
s3c_intc[1] = s3c24xx_init_intc(NULL, &init_s3c2416subint[0],
s3c_intc[0], 0x4a000018);

s3c24xx_init_intc(NULL, &init_s3c2416_second[0], NULL, 0x4a000040);
s3c_intc[2] = s3c24xx_init_intc(NULL, &init_s3c2416_second[0],
NULL, 0x4a000040);
}

#endif
Expand Down Expand Up @@ -947,22 +948,22 @@ static struct s3c_irq_data init_s3c2440subint[32] = {

void __init s3c2440_init_irq(void)
{
struct s3c_irq_intc *main_intc;

pr_info("S3C2440: IRQ Support\n");

#ifdef CONFIG_FIQ
init_FIQ(FIQ_START);
#endif

main_intc = s3c24xx_init_intc(NULL, &init_s3c2440base[0], NULL, 0x4a000000);
if (IS_ERR(main_intc)) {
s3c_intc[0] = s3c24xx_init_intc(NULL, &init_s3c2440base[0], NULL,
0x4a000000);
if (IS_ERR(s3c_intc[0])) {
pr_err("irq: could not create main interrupt controller\n");
return;
}

s3c24xx_init_intc(NULL, &init_eint[0], main_intc, 0x560000a4);
s3c24xx_init_intc(NULL, &init_s3c2440subint[0], main_intc, 0x4a000018);
s3c24xx_init_intc(NULL, &init_eint[0], s3c_intc[0], 0x560000a4);
s3c_intc[1] = s3c24xx_init_intc(NULL, &init_s3c2440subint[0],
s3c_intc[0], 0x4a000018);
}
#endif

Expand Down Expand Up @@ -1020,22 +1021,22 @@ static struct s3c_irq_data init_s3c2442subint[32] = {

void __init s3c2442_init_irq(void)
{
struct s3c_irq_intc *main_intc;

pr_info("S3C2442: IRQ Support\n");

#ifdef CONFIG_FIQ
init_FIQ(FIQ_START);
#endif

main_intc = s3c24xx_init_intc(NULL, &init_s3c2442base[0], NULL, 0x4a000000);
if (IS_ERR(main_intc)) {
s3c_intc[0] = s3c24xx_init_intc(NULL, &init_s3c2442base[0], NULL,
0x4a000000);
if (IS_ERR(s3c_intc[0])) {
pr_err("irq: could not create main interrupt controller\n");
return;
}

s3c24xx_init_intc(NULL, &init_eint[0], main_intc, 0x560000a4);
s3c24xx_init_intc(NULL, &init_s3c2442subint[0], main_intc, 0x4a000018);
s3c24xx_init_intc(NULL, &init_eint[0], s3c_intc[0], 0x560000a4);
s3c_intc[1] = s3c24xx_init_intc(NULL, &init_s3c2442subint[0],
s3c_intc[0], 0x4a000018);
}
#endif

Expand Down Expand Up @@ -1110,21 +1111,21 @@ static struct s3c_irq_data init_s3c2443subint[32] = {

void __init s3c2443_init_irq(void)
{
struct s3c_irq_intc *main_intc;

pr_info("S3C2443: IRQ Support\n");

#ifdef CONFIG_FIQ
init_FIQ(FIQ_START);
#endif

main_intc = s3c24xx_init_intc(NULL, &init_s3c2443base[0], NULL, 0x4a000000);
if (IS_ERR(main_intc)) {
s3c_intc[0] = s3c24xx_init_intc(NULL, &init_s3c2443base[0], NULL,
0x4a000000);
if (IS_ERR(s3c_intc[0])) {
pr_err("irq: could not create main interrupt controller\n");
return;
}

s3c24xx_init_intc(NULL, &init_eint[0], main_intc, 0x560000a4);
s3c24xx_init_intc(NULL, &init_s3c2443subint[0], main_intc, 0x4a000018);
s3c24xx_init_intc(NULL, &init_eint[0], s3c_intc[0], 0x560000a4);
s3c_intc[1] = s3c24xx_init_intc(NULL, &init_s3c2443subint[0],
s3c_intc[0], 0x4a000018);
}
#endif

0 comments on commit 76badd7

Please sign in to comment.