Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm/broadcom/bcm2835/bcm2835_common.c
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
#ifndef ARM_INTRNG | #ifndef ARM_INTRNG | ||||
static int | static int | ||||
fdt_intc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, | fdt_intc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, | ||||
int *pol) | int *pol) | ||||
{ | { | ||||
if (!fdt_is_compatible(node, "broadcom,bcm2835-armctrl-ic")) | if (fdt_is_compatible(node, "broadcom,bcm2835-armctrl-ic")) { | ||||
return (ENXIO); | |||||
*interrupt = fdt32_to_cpu(intr[0]); | *interrupt = fdt32_to_cpu(intr[0]); | ||||
*trig = INTR_TRIGGER_CONFORM; | *trig = INTR_TRIGGER_CONFORM; | ||||
*pol = INTR_POLARITY_CONFORM; | *pol = INTR_POLARITY_CONFORM; | ||||
return (0); | 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); | |||||
} | } | ||||
fdt_pic_decode_t fdt_pic_table[] = { | fdt_pic_decode_t fdt_pic_table[] = { | ||||
&fdt_intc_decode_ic, | &fdt_intc_decode_ic, | ||||
NULL | NULL | ||||
}; | }; | ||||
#endif /* ARM_INTRNG */ | #endif /* ARM_INTRNG */ |