Define local-intc for BCM2836 platform (RPI2) and make BCM2835 intc

a child of it. This is done in conformity with Linux dts files and
as preparation for rework of BCM2836 interrupt controller for INTRNG.

Reviewed by:	gonzo
Differential Revision:	https://reviews.freebsd.org/D5807
This commit is contained in:
Svatopluk Kraus 2016-04-04 09:41:22 +00:00
parent 2df5562d0c
commit fa64321bba
2 changed files with 29 additions and 11 deletions

View File

@ -56,14 +56,21 @@ fdt_intc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
int *pol)
{
if (!fdt_is_compatible(node, "broadcom,bcm2835-armctrl-ic"))
return (ENXIO);
*interrupt = fdt32_to_cpu(intr[0]);
*trig = INTR_TRIGGER_CONFORM;
*pol = INTR_POLARITY_CONFORM;
return (0);
if (fdt_is_compatible(node, "broadcom,bcm2835-armctrl-ic")) {
*interrupt = fdt32_to_cpu(intr[0]);
*trig = INTR_TRIGGER_CONFORM;
*pol = INTR_POLARITY_CONFORM;
return (0);
}
#ifdef SOC_BCM2836
if (fdt_is_compatible(node, "brcm,bcm2836-l1-intc")) {
*interrupt = fdt32_to_cpu(intr[0]) + 72;
*trig = INTR_TRIGGER_CONFORM;
*pol = INTR_POLARITY_CONFORM;
return (0);
}
#endif
return (ENXIO);
}

View File

@ -32,8 +32,8 @@
timer {
compatible = "arm,armv7-timer";
clock-frequency = <19200000>;
interrupts = <72 73 75 74>;
interrupt-parent = <&intc>;
interrupts = <0 1 3 2>;
interrupt-parent = <&local_intc>;
};
SOC: axi {
@ -41,12 +41,23 @@
#address-cells = <1>;
#size-cells = <1>;
reg = <0x3f000000 0x01000000>;
ranges = <0 0x3f000000 0x01000000>;
ranges = <0 0x3f000000 0x01000000>,
<0x40000000 0x40000000 0x00001000>;
local_intc: local_intc {
compatible = "brcm,bcm2836-l1-intc";
reg = <0x40000000 0x100>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&local_intc>;
};
intc: interrupt-controller {
compatible = "broadcom,bcm2835-armctrl-ic",
"broadcom,bcm2708-armctrl-ic";
reg = <0xB200 0x200>;
interrupt-parent = <&local_intc>;
interrupts = <8>;
interrupt-controller;
#interrupt-cells = <1>;