Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77844
b: refs/heads/master
c: 7f3edee
h: refs/heads/master
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Jan 28, 2008
1 parent a579cb9 commit b4cc9a3
Show file tree
Hide file tree
Showing 20 changed files with 43 additions and 156 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: b62ad83d91ebf1368e9e72d476b18698ac67bef9
refs/heads/master: 7f3edee81fbd49114c28057512906f169caa0bed
2 changes: 1 addition & 1 deletion trunk/arch/sh/boards/renesas/r7780rp/irq-r7780mp.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static unsigned char irl2irq[HL_NR_IRL] __initdata = {
};

static DECLARE_INTC_DESC(intc_desc, "r7780mp", vectors,
NULL, NULL, mask_registers, NULL, NULL);
NULL, mask_registers, NULL, NULL);

unsigned char * __init highlander_init_irq_r7780mp(void)
{
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static unsigned char irl2irq[HL_NR_IRL] __initdata = {
};

static DECLARE_INTC_DESC(intc_desc, "r7785rp", vectors,
NULL, NULL, mask_registers, NULL, NULL);
NULL, mask_registers, NULL, NULL);

unsigned char * __init highlander_init_irq_r7785rp(void)
{
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/sh/boards/renesas/rts7751r2d/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static unsigned char irl2irq_r2d_1[R2D_NR_IRL] __initdata = {
};

static DECLARE_INTC_DESC(intc_desc_r2d_1, "r2d-1", vectors_r2d_1,
NULL, NULL, mask_registers_r2d_1, NULL, NULL);
NULL, mask_registers_r2d_1, NULL, NULL);

#endif /* CONFIG_RTS7751R2D_1 */

Expand Down Expand Up @@ -109,7 +109,7 @@ static unsigned char irl2irq_r2d_plus[R2D_NR_IRL] __initdata = {
};

static DECLARE_INTC_DESC(intc_desc_r2d_plus, "r2d-plus", vectors_r2d_plus,
NULL, NULL, mask_registers_r2d_plus, NULL, NULL);
NULL, mask_registers_r2d_plus, NULL, NULL);

#endif /* CONFIG_RTS7751R2D_PLUS */

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/cchips/voyagergx/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static struct intc_mask_reg mask_registers[] __initdata = {
};

static DECLARE_INTC_DESC(intc_desc, "voyagergx", vectors,
NULL, NULL, mask_registers, NULL, NULL);
NULL, mask_registers, NULL, NULL);

static unsigned int voyagergx_stat2irq[32] = {
IRQ_SM501_CI, IRQ_SM501_PV, IRQ_SM501_ZD, IRQ_SM501_2D,
Expand Down
31 changes: 4 additions & 27 deletions trunk/arch/sh/kernel/cpu/irq/intc.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,31 +335,6 @@ static intc_enum __init intc_grp_id(struct intc_desc *desc,
return 0;
}

static unsigned int __init intc_prio_value(struct intc_desc *desc,
intc_enum enum_id, int do_grps)
{
struct intc_prio *p = desc->priorities;
unsigned int i;

for (i = 0; p && enum_id && i < desc->nr_priorities; i++) {
p = desc->priorities + i;

if (p->enum_id != enum_id)
continue;

return p->priority;
}

if (do_grps)
return intc_prio_value(desc, intc_grp_id(desc, enum_id), 0);

/* default to the lowest priority possible if no priority is set
* - this needs to be at least 2 for 5-bit priorities on 7780
*/

return 2;
}

static unsigned int __init intc_mask_data(struct intc_desc *desc,
struct intc_desc_int *d,
intc_enum enum_id, int do_grps)
Expand Down Expand Up @@ -518,8 +493,10 @@ static void __init intc_register_irq(struct intc_desc *desc,
handle_level_irq, "level");
set_irq_chip_data(irq, (void *)data[primary]);

/* record the desired priority level */
intc_prio_level[irq] = intc_prio_value(desc, enum_id, 1);
/* set priority level
* - this needs to be at least 2 for 5-bit priorities on 7780
*/
intc_prio_level[irq] = 2;

/* enable secondary masking method if present */
if (data[!primary])
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/kernel/cpu/sh2/setup-sh7619.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static struct intc_prio_reg prio_registers[] __initdata = {
};

static DECLARE_INTC_DESC(intc_desc, "sh7619", vectors, groups,
NULL, NULL, prio_registers, NULL);
NULL, prio_registers, NULL);

static struct plat_sci_port sci_platform_data[] = {
{
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ static struct intc_mask_reg mask_registers[] __initdata = {
};

static DECLARE_INTC_DESC(intc_desc, "sh7203", vectors, groups,
NULL, mask_registers, prio_registers, NULL);
mask_registers, prio_registers, NULL);

static struct plat_sci_port sci_platform_data[] = {
{
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static struct intc_mask_reg mask_registers[] __initdata = {
};

static DECLARE_INTC_DESC(intc_desc, "sh7206", vectors, groups,
NULL, mask_registers, prio_registers, NULL);
mask_registers, prio_registers, NULL);

static struct plat_sci_port sci_platform_data[] = {
{
Expand Down
10 changes: 2 additions & 8 deletions trunk/arch/sh/kernel/cpu/sh3/setup-sh7705.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@ static struct intc_group groups[] __initdata = {
INTC_GROUP(SCIF2, SCIF2_ERI, SCIF2_RXI, SCIF2_TXI),
};

static struct intc_prio priorities[] __initdata = {
INTC_PRIO(DMAC, 7),
INTC_PRIO(SCIF2, 3),
INTC_PRIO(SCIF0, 3),
};

static struct intc_prio_reg prio_registers[] __initdata = {
{ 0xfffffee2, 0, 16, 4, /* IPRA */ { TMU0, TMU1, TMU2, RTC } },
{ 0xfffffee4, 0, 16, 4, /* IPRB */ { WDT, REF_RCMI, 0, 0 } },
Expand All @@ -85,15 +79,15 @@ static struct intc_prio_reg prio_registers[] __initdata = {
};

static DECLARE_INTC_DESC(intc_desc, "sh7705", vectors, groups,
priorities, NULL, prio_registers, NULL);
NULL, prio_registers, NULL);

static struct intc_vect vectors_irq[] __initdata = {
INTC_VECT(IRQ0, 0x600), INTC_VECT(IRQ1, 0x620),
INTC_VECT(IRQ2, 0x640), INTC_VECT(IRQ3, 0x660),
};

static DECLARE_INTC_DESC(intc_desc_irq, "sh7705-irq", vectors_irq, NULL,
priorities, NULL, prio_registers, NULL);
NULL, prio_registers, NULL);

static struct plat_sci_port sci_platform_data[] = {
{
Expand Down
11 changes: 2 additions & 9 deletions trunk/arch/sh/kernel/cpu/sh3/setup-sh770x.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,6 @@ static struct intc_group groups[] __initdata = {
INTC_GROUP(SCIF2, SCIF2_ERI, SCIF2_RXI, SCIF2_BRI, SCIF2_TXI),
};

static struct intc_prio priorities[] __initdata = {
INTC_PRIO(DMAC, 7),
INTC_PRIO(SCI, 3),
INTC_PRIO(SCIF2, 3),
INTC_PRIO(SCIF0, 3),
};

static struct intc_prio_reg prio_registers[] __initdata = {
{ 0xfffffee2, 0, 16, 4, /* IPRA */ { TMU0, TMU1, TMU2, RTC } },
{ 0xfffffee4, 0, 16, 4, /* IPRB */ { WDT, REF, SCI, 0 } },
Expand All @@ -109,7 +102,7 @@ static struct intc_prio_reg prio_registers[] __initdata = {
};

static DECLARE_INTC_DESC(intc_desc, "sh770x", vectors, groups,
priorities, NULL, prio_registers, NULL);
NULL, prio_registers, NULL);

#if defined(CONFIG_CPU_SUBTYPE_SH7706) || \
defined(CONFIG_CPU_SUBTYPE_SH7707) || \
Expand All @@ -120,7 +113,7 @@ static struct intc_vect vectors_irq[] __initdata = {
};

static DECLARE_INTC_DESC(intc_desc_irq, "sh770x-irq", vectors_irq, NULL,
priorities, NULL, prio_registers, NULL);
NULL, prio_registers, NULL);
#endif

static struct resource rtc_resources[] = {
Expand Down
16 changes: 2 additions & 14 deletions trunk/arch/sh/kernel/cpu/sh3/setup-sh7710.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,6 @@ static struct intc_group groups[] __initdata = {
INTC_GROUP(SIOF1, SIOF1_ERI, SIOF1_TXI, SIOF1_RXI, SIOF1_CCI),
};

static struct intc_prio priorities[] __initdata = {
INTC_PRIO(DMAC1, 7),
INTC_PRIO(DMAC2, 7),
INTC_PRIO(SCIF0, 3),
INTC_PRIO(SCIF1, 3),
INTC_PRIO(SIOF0, 3),
INTC_PRIO(SIOF1, 3),
INTC_PRIO(EDMAC0, 5),
INTC_PRIO(EDMAC1, 5),
INTC_PRIO(EDMAC2, 5),
};

static struct intc_prio_reg prio_registers[] __initdata = {
{ 0xfffffee2, 0, 16, 4, /* IPRA */ { TMU0, TMU1, TMU2, RTC } },
{ 0xfffffee4, 0, 16, 4, /* IPRB */ { WDT, REF, 0, 0 } },
Expand All @@ -101,15 +89,15 @@ static struct intc_prio_reg prio_registers[] __initdata = {
};

static DECLARE_INTC_DESC(intc_desc, "sh7710", vectors, groups,
priorities, NULL, prio_registers, NULL);
NULL, prio_registers, NULL);

static struct intc_vect vectors_irq[] __initdata = {
INTC_VECT(IRQ0, 0x600), INTC_VECT(IRQ1, 0x620),
INTC_VECT(IRQ2, 0x640), INTC_VECT(IRQ3, 0x660),
};

static DECLARE_INTC_DESC(intc_desc_irq, "sh7710-irq", vectors_irq, NULL,
priorities, NULL, prio_registers, NULL);
NULL, prio_registers, NULL);

static struct resource rtc_resources[] = {
[0] = {
Expand Down
14 changes: 2 additions & 12 deletions trunk/arch/sh/kernel/cpu/sh3/setup-sh7720.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,6 @@ static struct intc_group groups[] __initdata = {
INTC_GROUP(MMC, MMCI0, MMCI1, MMCI2, MMCI3),
};

static struct intc_prio priorities[] __initdata = {
INTC_PRIO(SCIF0, 2),
INTC_PRIO(SCIF1, 2),
INTC_PRIO(DMAC1, 1),
INTC_PRIO(DMAC2, 1),
INTC_PRIO(RTC, 2),
INTC_PRIO(TMU, 2),
INTC_PRIO(TPU, 2),
};

static struct intc_prio_reg prio_registers[] __initdata = {
{ 0xA414FEE2UL, 0, 16, 4, /* IPRA */ { TMU0, TMU1, TMU2, RTC } },
{ 0xA414FEE4UL, 0, 16, 4, /* IPRB */ { WDT, REF_RCMI, SIM, 0 } },
Expand All @@ -184,7 +174,7 @@ static struct intc_prio_reg prio_registers[] __initdata = {
};

static DECLARE_INTC_DESC(intc_desc, "sh7720", vectors, groups,
priorities, NULL, prio_registers, NULL);
NULL, prio_registers, NULL);

static struct intc_sense_reg sense_registers[] __initdata = {
{ INTC_ICR1, 16, 2, { 0, 0, IRQ5, IRQ4, IRQ3, IRQ2, IRQ1, IRQ0 } },
Expand All @@ -197,7 +187,7 @@ static struct intc_vect vectors_irq[] __initdata = {
};

static DECLARE_INTC_DESC(intc_irq_desc, "sh7720-irq", vectors_irq,
NULL, priorities, NULL, prio_registers, sense_registers);
NULL, NULL, prio_registers, sense_registers);

void __init plat_irq_setup_pins(int mode)
{
Expand Down
18 changes: 6 additions & 12 deletions trunk/arch/sh/kernel/cpu/sh4/setup-sh7750.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,6 @@ static struct intc_group groups[] __initdata = {
INTC_GROUP(REF, REF_RCMI, REF_ROVI),
};

static struct intc_prio priorities[] __initdata = {
INTC_PRIO(SCIF, 3),
INTC_PRIO(SCI1, 3),
INTC_PRIO(DMAC, 7),
};

static struct intc_prio_reg prio_registers[] __initdata = {
{ 0xffd00004, 0, 16, 4, /* IPRA */ { TMU0, TMU1, TMU2, RTC } },
{ 0xffd00008, 0, 16, 4, /* IPRB */ { WDT, REF, SCI1, 0 } },
Expand All @@ -143,7 +137,7 @@ static struct intc_prio_reg prio_registers[] __initdata = {
};

static DECLARE_INTC_DESC(intc_desc, "sh7750", vectors, groups,
priorities, NULL, prio_registers, NULL);
NULL, prio_registers, NULL);

/* SH7750, SH7750S, SH7751 and SH7091 all have 4-channel DMA controllers */
#if defined(CONFIG_CPU_SUBTYPE_SH7750) || \
Expand All @@ -163,7 +157,7 @@ static struct intc_group groups_dma4[] __initdata = {

static DECLARE_INTC_DESC(intc_desc_dma4, "sh7750_dma4",
vectors_dma4, groups_dma4,
priorities, NULL, prio_registers, NULL);
NULL, prio_registers, NULL);
#endif

/* SH7750R and SH7751R both have 8-channel DMA controllers */
Expand All @@ -184,7 +178,7 @@ static struct intc_group groups_dma8[] __initdata = {

static DECLARE_INTC_DESC(intc_desc_dma8, "sh7750_dma8",
vectors_dma8, groups_dma8,
priorities, NULL, prio_registers, NULL);
NULL, prio_registers, NULL);
#endif

/* SH7750R, SH7751 and SH7751R all have two extra timer channels */
Expand All @@ -205,7 +199,7 @@ static struct intc_mask_reg mask_registers[] __initdata = {
};

static DECLARE_INTC_DESC(intc_desc_tmu34, "sh7750_tmu34",
vectors_tmu34, NULL, priorities,
vectors_tmu34, NULL,
mask_registers, prio_registers, NULL);
#endif

Expand All @@ -216,7 +210,7 @@ static struct intc_vect vectors_irlm[] __initdata = {
};

static DECLARE_INTC_DESC(intc_desc_irlm, "sh7750_irlm", vectors_irlm, NULL,
priorities, NULL, prio_registers, NULL);
NULL, prio_registers, NULL);

/* SH7751 and SH7751R both have PCI */
#if defined(CONFIG_CPU_SUBTYPE_SH7751) || defined(CONFIG_CPU_SUBTYPE_SH7751R)
Expand All @@ -233,7 +227,7 @@ static struct intc_group groups_pci[] __initdata = {
};

static DECLARE_INTC_DESC(intc_desc_pci, "sh7750_pci", vectors_pci, groups_pci,
priorities, mask_registers, prio_registers, NULL);
mask_registers, prio_registers, NULL);
#endif

#if defined(CONFIG_CPU_SUBTYPE_SH7750) || \
Expand Down
13 changes: 2 additions & 11 deletions trunk/arch/sh/kernel/cpu/sh4/setup-sh7760.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,6 @@ static struct intc_group groups[] __initdata = {
INTC_GROUP(REF, REF_RCMI, REF_ROVI),
};

static struct intc_prio priorities[] __initdata = {
INTC_PRIO(SCIF0, 3),
INTC_PRIO(SCIF1, 3),
INTC_PRIO(SCIF2, 3),
INTC_PRIO(SIM, 3),
INTC_PRIO(DMAC, 7),
INTC_PRIO(DMABRG, 13),
};

static struct intc_mask_reg mask_registers[] __initdata = {
{ 0xfe080040, 0xfe080060, 32, /* INTMSK00 / INTMSKCLR00 */
{ IRQ4, IRQ5, IRQ6, IRQ7, 0, 0, HCAN20, HCAN21,
Expand Down Expand Up @@ -132,15 +123,15 @@ static struct intc_prio_reg prio_registers[] __initdata = {
};

static DECLARE_INTC_DESC(intc_desc, "sh7760", vectors, groups,
priorities, mask_registers, prio_registers, NULL);
mask_registers, prio_registers, NULL);

static struct intc_vect vectors_irq[] __initdata = {
INTC_VECT(IRL0, 0x240), INTC_VECT(IRL1, 0x2a0),
INTC_VECT(IRL2, 0x300), INTC_VECT(IRL3, 0x360),
};

static DECLARE_INTC_DESC(intc_desc_irq, "sh7760-irq", vectors_irq, groups,
priorities, mask_registers, prio_registers, NULL);
mask_registers, prio_registers, NULL);

static struct plat_sci_port sci_platform_data[] = {
{
Expand Down
10 changes: 1 addition & 9 deletions trunk/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,6 @@ static struct intc_group groups[] __initdata = {
INTC_GROUP(SDHI, SDHI0, SDHI1, SDHI2, SDHI3),
};

static struct intc_prio priorities[] __initdata = {
INTC_PRIO(SCIF0, 3),
INTC_PRIO(SCIF1, 3),
INTC_PRIO(SCIF2, 3),
INTC_PRIO(TMU0, 2),
INTC_PRIO(TMU1, 2),
};

static struct intc_mask_reg mask_registers[] __initdata = {
{ 0xa4080080, 0xa40800c0, 8, /* IMR0 / IMCR0 */
{ } },
Expand Down Expand Up @@ -217,7 +209,7 @@ static struct intc_sense_reg sense_registers[] __initdata = {
{ IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
};

static DECLARE_INTC_DESC(intc_desc, "sh7722", vectors, groups, priorities,
static DECLARE_INTC_DESC(intc_desc, "sh7722", vectors, groups,
mask_registers, prio_registers, sense_registers);

void __init plat_irq_setup(void)
Expand Down
Loading

0 comments on commit b4cc9a3

Please sign in to comment.