Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67305
b: refs/heads/master
c: 0d72ba9
h: refs/heads/master
i:
  67303: 9267dbf
v: v3
  • Loading branch information
Olof Johansson authored and Paul Mackerras committed Sep 13, 2007
1 parent f1486e5 commit 51bc4a0
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 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: 2099172d61abda1b793b499bb8edcaac4de2cdae
refs/heads/master: 0d72ba930cbc9140a584af7e4e65041b6c7a7d18
10 changes: 10 additions & 0 deletions trunk/arch/powerpc/platforms/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,16 @@ config MPIC_U3_HT_IRQS
depends on PPC_MAPLE
default y

config MPIC_BROKEN_REGREAD
bool
depends on MPIC
help
This option enables a MPIC driver workaround for some chips
that have a bug that causes some interrupt source information
to not read back properly. It is safe to use on other chips as
well, but enabling it uses about 8KB of memory to keep copies
of the register contents in software.

config IBMVIO
depends on PPC_PSERIES || PPC_ISERIES
bool
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/platforms/pasemi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ config PPC_PASEMI
select MPIC
select PPC_UDBG_16550
select PPC_NATIVE
select MPIC_BROKEN_REGREAD
help
This option enables support for PA Semi's PWRficient line
of SoC processors, including PA6T-1682M
Expand Down
14 changes: 12 additions & 2 deletions trunk/arch/powerpc/sysdev/mpic.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,13 @@ static inline u32 _mpic_irq_read(struct mpic *mpic, unsigned int src_no, unsigne
unsigned int isu = src_no >> mpic->isu_shift;
unsigned int idx = src_no & mpic->isu_mask;

return _mpic_read(mpic->reg_type, &mpic->isus[isu],
reg + (idx * MPIC_INFO(IRQ_STRIDE)));
#ifdef CONFIG_MPIC_BROKEN_REGREAD
if (reg == 0)
return mpic->isu_reg0_shadow[idx];
else
#endif
return _mpic_read(mpic->reg_type, &mpic->isus[isu],
reg + (idx * MPIC_INFO(IRQ_STRIDE)));
}

static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no,
Expand All @@ -240,6 +245,11 @@ static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no,

_mpic_write(mpic->reg_type, &mpic->isus[isu],
reg + (idx * MPIC_INFO(IRQ_STRIDE)), value);

#ifdef CONFIG_MPIC_BROKEN_REGREAD
if (reg == 0)
mpic->isu_reg0_shadow[idx] = value;
#endif
}

#define mpic_read(b,r) _mpic_read(mpic->reg_type,&(b),(r))
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/asm-powerpc/mpic.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ struct mpic
unsigned long *hwirq_bitmap;
#endif

#ifdef CONFIG_MPIC_BROKEN_REGREAD
u32 isu_reg0_shadow[MPIC_MAX_IRQ_SOURCES];
#endif

/* link */
struct mpic *next;

Expand Down

0 comments on commit 51bc4a0

Please sign in to comment.