Index: sys/arm/amlogic/aml8726/aml8726_machdep.c =================================================================== --- sys/arm/amlogic/aml8726/aml8726_machdep.c +++ sys/arm/amlogic/aml8726/aml8726_machdep.c @@ -39,6 +39,7 @@ #include #include +#include #include #include @@ -167,39 +168,22 @@ { NULL, NULL } }; +#ifndef SOC_AML_MULTICORE static int fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, int *pol) { /* - * The single core chips have just an Amlogic PIC. However the - * multi core chips also have a GIC. + * The single core chips have just an Amlogic PIC. */ -#ifdef SMP - if (!fdt_is_compatible_strict(node, "arm,cortex-a9-gic")) -#else if (!fdt_is_compatible_strict(node, "amlogic,aml8726-pic")) -#endif return (ENXIO); *interrupt = fdt32_to_cpu(intr[1]); *trig = INTR_TRIGGER_EDGE; *pol = INTR_POLARITY_HIGH; - switch (*interrupt) { - case 30: /* INT_USB_A */ - case 31: /* INT_USB_B */ - *trig = INTR_TRIGGER_LEVEL; - break; - default: - break; - } - -#ifdef SMP - *interrupt += 32; -#endif - return (0); } @@ -207,3 +191,9 @@ &fdt_pic_decode_ic, NULL }; +#else +fdt_pic_decode_t fdt_pic_table[] = { + &gic_decode_fdt, + NULL +}; +#endif Index: sys/arm/amlogic/aml8726/aml8726_pic.c =================================================================== --- sys/arm/amlogic/aml8726/aml8726_pic.c +++ sys/arm/amlogic/aml8726/aml8726_pic.c @@ -167,7 +167,7 @@ CSR_WRITE_4(sc, AML_PIC_0_FIRQ_SEL + i * 16, 0); } -#ifndef SMP +#ifndef SOC_AML_MULTICORE arm_post_filter = aml8726_pic_eoi; #else device_printf(dev, "disabled in favor of gic\n"); @@ -205,7 +205,7 @@ EARLY_DRIVER_MODULE(pic, simplebus, aml8726_pic_driver, aml8726_pic_devclass, 0, 0, BUS_PASS_INTERRUPT); -#ifndef SMP +#ifndef SOC_AML_MULTICORE int arm_get_next_irq(int last) { Index: sys/arm/amlogic/aml8726/files.aml8726 =================================================================== --- sys/arm/amlogic/aml8726/files.aml8726 +++ sys/arm/amlogic/aml8726/files.aml8726 @@ -5,12 +5,12 @@ arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard -arm/arm/gic.c standard +arm/arm/gic.c optional soc_aml_multicore arm/arm/pl310.c standard arm/amlogic/aml8726/aml8726_l2cache.c standard arm/amlogic/aml8726/aml8726_machdep.c standard -arm/amlogic/aml8726/aml8726_mp.c optional smp +arm/amlogic/aml8726/aml8726_mp.c optional soc_aml_multicore smp arm/amlogic/aml8726/aml8726_identsoc.c standard arm/amlogic/aml8726/aml8726_ccm.c standard arm/amlogic/aml8726/aml8726_clkmsr.c standard Index: sys/arm/conf/AML8726 =================================================================== --- sys/arm/conf/AML8726 +++ sys/arm/conf/AML8726 @@ -56,7 +56,6 @@ options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) options LINUX_BOOT_ABI options VFP # Enable floating point hardware support -options SMP # Enable multiple cores # Debugging makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols Index: sys/arm/conf/ODROIDC1 =================================================================== --- sys/arm/conf/ODROIDC1 +++ sys/arm/conf/ODROIDC1 @@ -22,5 +22,8 @@ include "AML8726" ident ODROIDC1 +options SOC_AML_MULTICORE +options SMP # Enable multiple cores + options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=odroidc1.dts Index: sys/arm/conf/VSATV102 =================================================================== --- sys/arm/conf/VSATV102 +++ sys/arm/conf/VSATV102 @@ -22,5 +22,8 @@ include "AML8726" ident VSATV102 +options SOC_AML_MULTICORE +options SMP # Enable multiple cores + options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=vsatv102-m6.dts Index: sys/conf/options.arm =================================================================== --- sys/conf/options.arm +++ sys/conf/options.arm @@ -38,6 +38,7 @@ SOCDEV_VA opt_global.h PV_STATS opt_pmap.h QEMU_WORKAROUNDS opt_global.h +SOC_AML_MULTICORE opt_global.h SOC_BCM2835 opt_global.h SOC_BCM2836 opt_global.h SOC_MV_ARMADAXP opt_global.h