Index: sys/arm/mv/mv_common.c =================================================================== --- sys/arm/mv/mv_common.c +++ sys/arm/mv/mv_common.c @@ -45,6 +45,7 @@ #include #include +#include #include #include @@ -105,6 +106,11 @@ static int fdt_get_ranges(const char *, void *, int, int *, int *); +#ifdef SOC_MV_ARMADA38X +int gic_decode_fdt(phandle_t iparent, pcell_t *intr, int *interrupt, + int *trig, int *pol); +#endif + static int win_cpu_from_dt(void); static int fdt_win_setup(void); @@ -2178,15 +2184,23 @@ int *pol) { - if (!fdt_is_compatible(node, "mrvl,pic") && - !fdt_is_compatible(node, "mrvl,mpic")) - return (ENXIO); +#ifdef SOC_MV_ARMADA38X + if (fdt_is_compatible(node, "arm,cortex-a9-gic")) + return (gic_decode_fdt(node, intr, interrupt, trig, pol)); +#endif - *interrupt = fdt32_to_cpu(intr[0]); - *trig = INTR_TRIGGER_CONFORM; - *pol = INTR_POLARITY_CONFORM; + if (fdt_is_compatible(node, "mrvl,pic") || + fdt_is_compatible(node, "mrvl,mpic")) { - return (0); + *interrupt = fdt32_to_cpu(intr[0]); + *trig = INTR_TRIGGER_CONFORM; + *pol = INTR_POLARITY_CONFORM; + return (0); + + } else { + /* Unsupported IC */ + return (ENXIO); + } } fdt_pic_decode_t fdt_pic_table[] = {