Lines Matching +full:dts +full:- +full:node

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
67 * interrupt controller, which is for use when the chip is in deep-sleep mode.
68 * We don't support deep sleep or have a GPC-PIC driver; we need all interrupts
72 * parent for the soc node and letting that get inherited by all other devices
74 * set the world right by just changing the interrupt-parent property of the soc
75 * node to refer to GIC instead of GPC. This will get us by until we write our
79 * node, so for them to use interrupts we need to apply the same fix as we do
80 * for the soc node.
83 * - SOC node exists and has GPC as its interrupt parent.
84 * - GPC node exists and has GIC as its interrupt parent.
85 * - GIC node exists and is its own interrupt parent or has no parent.
89 * per-soc logic. We handle this at platform attach time rather than via the
93 * This just in: as of the import of dts files from linux 4.15 on 2018-02-10,
94 * they appear to have applied a new style rule to the dts which forbids leading
95 * zeroes in the @address qualifiers on node names. Since we have to find those
96 * nodes by string matching we now have to search for both flavors of each node
103 static const char *propname = "interrupt-parent"; in fix_node_iparent()
104 phandle_t node, iparent; in fix_node_iparent() local
106 if ((node = OF_finddevice(nodepath)) == -1) in fix_node_iparent()
108 if (OF_getencprop(node, propname, &iparent, sizeof(iparent)) <= 0) in fix_node_iparent()
113 OF_setprop(node, propname, &gicxref, sizeof(gicxref)); in fix_node_iparent()
123 /* GIC node may be child of soc node, or appear directly at root. */ in fix_fdt_interrupt_data()
124 gicnode = OF_finddevice("/soc/interrupt-controller@00a01000"); in fix_fdt_interrupt_data()
125 if (gicnode == -1) in fix_fdt_interrupt_data()
126 gicnode = OF_finddevice("/soc/interrupt-controller@a01000"); in fix_fdt_interrupt_data()
127 if (gicnode == -1) { in fix_fdt_interrupt_data()
128 gicnode = OF_finddevice("/interrupt-controller@00a01000"); in fix_fdt_interrupt_data()
129 if (gicnode == -1) in fix_fdt_interrupt_data()
130 gicnode = OF_finddevice("/interrupt-controller@a01000"); in fix_fdt_interrupt_data()
131 if (gicnode == -1) in fix_fdt_interrupt_data()
136 /* If gic node has no parent, pretend it is its own parent. */ in fix_fdt_interrupt_data()
137 result = OF_getencprop(gicnode, "interrupt-parent", &gicipar, in fix_fdt_interrupt_data()
142 gpcnode = OF_finddevice("/soc/aips-bus@02000000/gpc@020dc000"); in fix_fdt_interrupt_data()
143 if (gpcnode == -1) in fix_fdt_interrupt_data()
144 gpcnode = OF_finddevice("/soc/aips-bus@2000000/gpc@20dc000"); in fix_fdt_interrupt_data()
145 if (gpcnode == -1) in fix_fdt_interrupt_data()
147 if (gpcnode == -1) in fix_fdt_interrupt_data()
149 result = OF_getencprop(gpcnode, "interrupt-parent", &gpcipar, in fix_fdt_interrupt_data()
167 phandle_t node; in fix_fdt_iomuxc_data() local
170 * The linux dts defines two nodes with the same mmio address range, in fix_fdt_iomuxc_data()
171 * iomuxc-gpr and the regular iomuxc. The -grp node is a simple_mfd and in fix_fdt_iomuxc_data()
176 * range because it partially overlaps with the -gpr range. in fix_fdt_iomuxc_data()
179 * just disable the iomuxc-gpr node because we don't have a driver for in fix_fdt_iomuxc_data()
182 * If we ever write a -gpr driver, this code should probably switch to in fix_fdt_iomuxc_data()
184 * regs, then the -gpr driver can be a regular syscon driver that iomuxc in fix_fdt_iomuxc_data()
187 node = OF_finddevice("/soc/aips-bus@2000000/iomuxc-gpr@20e0000"); in fix_fdt_iomuxc_data()
188 if (node == -1) in fix_fdt_iomuxc_data()
189 node = OF_finddevice("/soc/bus@2000000/iomuxc-gpr@20e0000"); in fix_fdt_iomuxc_data()
190 if (node != -1) in fix_fdt_iomuxc_data()
191 OF_setprop(node, "status", "disabled", sizeof("disabled")); in fix_fdt_iomuxc_data()
198 /* Fix soc interrupt-parent property. */ in imx6_attach()
201 /* Fix iomuxc-gpr and iomuxc nodes both using the same mmio range. */ in imx6_attach()
221 * This attempts to cover the most-used devices with 1MB section mappings, which
227 * AIPS1/AIPS2 cover most of the on-chip devices such as uart, spi, i2c, etc.
262 * This code is based on the way u-boot does it. Information found on the web
268 * (non-lite flavor). However, Freescale doesn't seem to have assigned it a
274 * register may be ncpu-1.
276 * This hasn't been tested yet on a dual[-lite].