svn commit: r297545 - in head/sys: arm/broadcom/bcm2835 boot/fdt/dts/arm

Svatopluk Kraus skra at FreeBSD.org
Mon Apr 4 09:41:23 UTC 2016


Author: skra
Date: Mon Apr  4 09:41:22 2016
New Revision: 297545
URL: https://svnweb.freebsd.org/changeset/base/297545

Log:
  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

Modified:
  head/sys/arm/broadcom/bcm2835/bcm2835_common.c
  head/sys/boot/fdt/dts/arm/bcm2836.dtsi

Modified: head/sys/arm/broadcom/bcm2835/bcm2835_common.c
==============================================================================
--- head/sys/arm/broadcom/bcm2835/bcm2835_common.c	Mon Apr  4 09:36:56 2016	(r297544)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_common.c	Mon Apr  4 09:41:22 2016	(r297545)
@@ -56,14 +56,21 @@ fdt_intc_decode_ic(phandle_t node, pcell
     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);
 }
 
 

Modified: head/sys/boot/fdt/dts/arm/bcm2836.dtsi
==============================================================================
--- head/sys/boot/fdt/dts/arm/bcm2836.dtsi	Mon Apr  4 09:36:56 2016	(r297544)
+++ head/sys/boot/fdt/dts/arm/bcm2836.dtsi	Mon Apr  4 09:41:22 2016	(r297545)
@@ -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>;


More information about the svn-src-head mailing list