Skip to content

Commit 9c4c374

Browse files
Ivan Mikhaylovmpe
authored andcommitted
powerpc/44x/fsp2: Interrupt handling setup
* clear out any possible plb6 errors * board interrupt handling setup within l2 reg set * fsp2 parity error setup All those points are needed for correct interrupt handling on board level including error handling report. Reviewed-by: Alistair Popple <[email protected]> Signed-off-by: Ivan Mikhaylov <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent 494d82c commit 9c4c374

File tree

1 file changed

+37
-0
lines changed
  • arch/powerpc/platforms/44x

1 file changed

+37
-0
lines changed

arch/powerpc/platforms/44x/fsp2.c

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
#include <asm/time.h>
2828
#include <asm/uic.h>
2929
#include <asm/ppc4xx.h>
30+
#include <asm/dcr.h>
31+
#include "fsp2.h"
3032

3133
static __initdata struct of_device_id fsp2_of_bus[] = {
3234
{ .compatible = "ibm,plb4", },
@@ -44,10 +46,45 @@ machine_device_initcall(fsp2, fsp2_device_probe);
4446

4547
static int __init fsp2_probe(void)
4648
{
49+
u32 val;
4750
unsigned long root = of_get_flat_dt_root();
4851

4952
if (!of_flat_dt_is_compatible(root, "ibm,fsp2"))
5053
return 0;
54+
55+
/* Clear BC_ERR and mask snoopable request plb errors. */
56+
val = mfdcr(DCRN_PLB6_CR0);
57+
val |= 0x20000000;
58+
mtdcr(DCRN_PLB6_BASE, val);
59+
mtdcr(DCRN_PLB6_HD, 0xffff0000);
60+
mtdcr(DCRN_PLB6_SHD, 0xffff0000);
61+
62+
/* L2 machine checks */
63+
mtl2(L2PLBMCKEN0, 0xffffffff);
64+
mtl2(L2PLBMCKEN1, 0x0000ffff);
65+
mtl2(L2ARRMCKEN0, 0xffffffff);
66+
mtl2(L2ARRMCKEN1, 0xffffffff);
67+
mtl2(L2ARRMCKEN2, 0xfffff000);
68+
mtl2(L2CPUMCKEN, 0xffffffff);
69+
mtl2(L2RACMCKEN0, 0xffffffff);
70+
mtl2(L2WACMCKEN0, 0xffffffff);
71+
mtl2(L2WACMCKEN1, 0xffffffff);
72+
mtl2(L2WACMCKEN2, 0xffffffff);
73+
mtl2(L2WDFMCKEN, 0xffffffff);
74+
75+
/* L2 interrupts */
76+
mtl2(L2PLBINTEN1, 0xffff0000);
77+
78+
/*
79+
* At a global level, enable all L2 machine checks and interrupts
80+
* reported by the L2 subsystems, except for the external machine check
81+
* input (UIC0.1).
82+
*/
83+
mtl2(L2MCKEN, 0x000007ff);
84+
mtl2(L2INTEN, 0x000004ff);
85+
86+
/* Enable FSP-2 configuration logic parity errors */
87+
mtdcr(DCRN_CONF_EIR_RS, 0x80000000);
5188
return 1;
5289
}
5390

0 commit comments

Comments
 (0)