Page MenuHomeFreeBSD

D2432.id.diff
No OneTemporary

D2432.id.diff

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 <machine/bus.h>
#include <machine/devmap.h>
+#include <machine/intr.h>
#include <machine/machdep.h>
#include <machine/platform.h>
@@ -167,39 +182,22 @@
{ NULL, NULL }
};
+#ifndef DEV_GIC
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 +205,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
@@ -169,7 +169,7 @@
CSR_WRITE_4(sc, AML_PIC_0_FIRQ_SEL + i * 16, 0);
}
-#ifndef SMP
+#ifndef DEV_GIC
arm_post_filter = aml8726_pic_eoi;
#else
device_printf(dev, "disabled in favor of gic\n");
@@ -207,7 +207,7 @@
EARLY_DRIVER_MODULE(pic, simplebus, aml8726_pic_driver, aml8726_pic_devclass,
0, 0, BUS_PASS_INTERRUPT);
-#ifndef SMP
+#ifndef DEV_GIC
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
@@ -13,7 +13,7 @@
arm/amlogic/aml8726/aml8726_identsoc.c standard
arm/amlogic/aml8726/aml8726_ccm.c standard
arm/amlogic/aml8726/aml8726_clkmsr.c standard
-arm/amlogic/aml8726/aml8726_pic.c standard
+arm/amlogic/aml8726/aml8726_pic.c optional aml_pic
arm/amlogic/aml8726/aml8726_rtc.c standard
arm/amlogic/aml8726/aml8726_timer.c standard
arm/amlogic/aml8726/aml8726_wdt.c standard
Index: sys/arm/conf/AML8726
===================================================================
--- sys/arm/conf/AML8726
+++ sys/arm/conf/AML8726
@@ -27,7 +27,6 @@
options SCHED_ULE # ULE scheduler
options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed.
options LINUX_BOOT_ABI
-options SMP # Enable multiple cores
# Debugging
makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols
@@ -59,9 +58,6 @@
# Boot device is 2nd slice on MMC/SD card
options ROOTDEVNAME=\"ufs:mmcsd0s2\"
-# Interrupt controller
-device gic
-
# GPIO
device gpio
device gpioled
Index: sys/arm/conf/ODROIDC1
===================================================================
--- sys/arm/conf/ODROIDC1
+++ sys/arm/conf/ODROIDC1
@@ -22,5 +22,10 @@
include "AML8726"
ident ODROIDC1
+options SMP # Enable multiple cores
+
+# Interrupt controller
+device gic
+
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,10 @@
include "AML8726"
ident VSATV102
+options SMP # Enable multiple cores
+
+# Interrupt controller
+device gic
+
options FDT_DTB_STATIC
makeoptions FDT_DTS_FILE=vsatv102-m6.dts
Index: sys/conf/options.arm
===================================================================
--- sys/conf/options.arm
+++ sys/conf/options.arm
@@ -21,6 +21,7 @@
CPU_XSCALE_IXP425 opt_global.h
CPU_XSCALE_IXP435 opt_global.h
CPU_XSCALE_PXA2X0 opt_global.h
+DEV_GIC opt_global.h
FLASHADDR opt_global.h
GIC_DEFAULT_ICFGR_INIT opt_global.h
IPI_IRQ_START opt_smp.h

File Metadata

Mime Type
text/plain
Expires
Sat, Feb 1, 11:28 AM (18 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16381805
Default Alt Text
D2432.id.diff (4 KB)

Event Timeline