i tried to dig more inside mpic_alloc fails. the function of_find_matching_node calls inside from mpic_alloc() should return the node at which pic is connected but it returns NULL. but why? In device tree i am using the following.. may be it will helpful.
/dts-v1/;
/ {
model = "MPC8641HPCN";
compatible = "fsl,mpc8641hpcn";
#address-cells = <0x1>;
#size-cells = <0x1>;
aliases {
ethernet0 = "/soc8641@f8000000/ethernet@24000";
ethernet1 = "/soc8641@f8000000/ethernet@25000";
ethernet2 = "/soc8641@f8000000/ethernet@26000";
ethernet3 = "/soc8641@f8000000/ethernet@27000";
serial0 = "/soc8641@f8000000/serial@4500";
};
cpus {
#address-cells = <0x1>;
#size-cells = <0x0>;
PowerPC,8641@0 {
device_type = "cpu";
reg = <0x0>;
d-cache-line-size = <0x20>;
i-cache-line-size = <0x20>;
d-cache-size = <0x8000>;
i-cache-size = <0x8000>;
timebase-frequency = <0x0>;
bus-frequency = <0x0>;
clock-frequency = <0x0>;
};
};
memory {
device_type = "memory";
reg = <0x0 0x20000000>;
};
localbus@f8005000 {
#address-cells = <0x2>;
#size-cells = <0x1>;
compatible = "fsl,mpc8641-localbus", "simple-bus";
reg = <0xf8005000 0x1000>;
interrupts = <0x13 0x2>;
interrupt-parent = <0x1>;
ranges = <0x0 0x0 0xff000000 0x1000000>;
flash@0,0 {
compatible = "cfi-flash";
reg = <0x0 0x0 0x800000>;
bank-width = <0x2>;
device-width = <0x2>;
#address-cells = <0x1>;
#size-cells = <0x1>;
};
};
soc8641@f8000000 {
#address-cells = <0x1>;
#size-cells = <0x1>;
device_type = "soc";
compatible = "simple-bus";
ranges = <0x0 0xf8000000 0x100000>;
bus-frequency = <0x0>;
mcm-law@0 {
compatible = "fsl,mcm-law";
reg = <0x0 0x1000>;
fsl,num-laws = <0xa>;
};
mcm@1000 {
compatible = "fsl,mpc8641-mcm", "fsl,mcm";
reg = <0x1000 0x1000>;
interrupts = <0x11 0x2>;
interrupt-parent = <0x1>;
};
dma@21300 {
#address-cells = <0x1>;
#size-cells = <0x1>;
compatible = "fsl,mpc8641-dma", "fsl,eloplus-dma";
reg = <0x21300 0x4>;
ranges = <0x0 0x21100 0x200>;
cell-index = <0x0>;
dma-channel@0 {
compatible = "fsl,mpc8641-dma-channel", "fsl,eloplus-dma-channel";
reg = <0x0 0x80>;
cell-index = <0x0>;
interrupt-parent = <0x1>;
interrupts = <0x14 0x2>;
};
dma-channel@80 {
compatible = "fsl,mpc8641-dma-channel", "fsl,eloplus-dma-channel";
reg = <0x80 0x80>;
cell-index = <0x1>;
interrupt-parent = <0x1>;
interrupts = <0x15 0x2>;
};
dma-channel@100 {
compatible = "fsl,mpc8641-dma-channel", "fsl,eloplus-dma-channel";
reg = <0x100 0x80>;
cell-index = <0x2>;
interrupt-parent = <0x1>;
interrupts = <0x16 0x2>;
};
dma-channel@180 {
compatible = "fsl,mpc8641-dma-channel", "fsl,eloplus-dma-channel";
reg = <0x180 0x80>;
cell-index = <0x3>;
interrupt-parent = <0x1>;
interrupts = <0x17 0x2>;
};
};
ethernet@24000 {
#address-cells = <0x1>;
#size-cells = <0x1>;
cell-index = <0x0>;
device_type = "network";
model = "TSEC";
compatible = "gianfar";
reg = <0x24000 0x1000>;
ranges = <0x0 0x24000 0x1000>;
local-mac-address = [00 00 00 00 00 00];
interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;
interrupt-parent = <0x1>;
tbi-handle = <0x2>;
phy-handle = <0x3>;
phy-connection-type = "rgmii-id";
mdio@520 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "fsl,gianfar-mdio";
reg = <0x520 0x20>;
ethernet-phy@0 {
interrupt-parent = <0x1>;
interrupts = <0xa 0x1>;
reg = <0x0>;
device_type = "ethernet-phy";
linux,phandle = <0x3>;
};
ethernet-phy@1 {
interrupt-parent = <0x1>;
interrupts = <0xa 0x1>;
reg = <0x1>;
device_type = "ethernet-phy";
linux,phandle = <0x5>;
};
ethernet-phy@2 {
interrupt-parent = <0x1>;
interrupts = <0xa 0x1>;
reg = <0x2>;
device_type = "ethernet-phy";
linux,phandle = <0x7>;
};
ethernet-phy@3 {
interrupt-parent = <0x1>;
interrupts = <0xa 0x1>;
reg = <0x3>;
device_type = "ethernet-phy";
linux,phandle = <0x9>;
};
tbi-phy@11 {
reg = <0x11>;
device_type = "tbi-phy";
linux,phandle = <0x2>;
};
};
};
ethernet@25000 {
#address-cells = <0x1>;
#size-cells = <0x1>;
cell-index = <0x1>;
device_type = "network";
model = "TSEC";
compatible = "gianfar";
reg = <0x25000 0x1000>;
ranges = <0x0 0x25000 0x1000>;
local-mac-address = [00 00 00 00 00 00];
interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>;
interrupt-parent = <0x1>;
tbi-handle = <0x4>;
phy-handle = <0x5>;
phy-connection-type = "rgmii-id";
mdio@520 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "fsl,gianfar-tbi";
reg = <0x520 0x20>;
tbi-phy@11 {
reg = <0x11>;
device_type = "tbi-phy";
linux,phandle = <0x4>;
};
};
};
ethernet@26000 {
#address-cells = <0x1>;
#size-cells = <0x1>;
cell-index = <0x2>;
device_type = "network";
model = "TSEC";
compatible = "gianfar";
reg = <0x26000 0x1000>;
ranges = <0x0 0x26000 0x1000>;
local-mac-address = [00 00 00 00 00 00];
interrupts = <0x1f 0x2 0x20 0x2 0x21 0x2>;
interrupt-parent = <0x1>;
tbi-handle = <0x6>;
phy-handle = <0x7>;
phy-connection-type = "rgmii-id";
mdio@520 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "fsl,gianfar-tbi";
reg = <0x520 0x20>;
tbi-phy@11 {
reg = <0x11>;
device_type = "tbi-phy";
linux,phandle = <0x6>;
};
};
};
ethernet@27000 {
#address-cells = <0x1>;
#size-cells = <0x1>;
cell-index = <0x3>;
device_type = "network";
model = "TSEC";
compatible = "gianfar";
reg = <0x27000 0x1000>;
ranges = <0x0 0x27000 0x1000>;
local-mac-address = [00 00 00 00 00 00];
interrupts = <0x25 0x2 0x26 0x2 0x27 0x2>;
interrupt-parent = <0x1>;
tbi-handle = <0x8>;
phy-handle = <0x9>;
phy-connection-type = "rgmii-id";
mdio@520 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "fsl,gianfar-tbi";
reg = <0x520 0x20>;
tbi-phy@11 {
reg = <0x11>;
device_type = "tbi-phy";
linux,phandle = <0x8>;
};
};
};
serial@4500 {
cell-index = <0x0>;
device_type = "serial";
compatible = "ns16550";
reg = <0x4500 0x100>;
clock-frequency = <0x0>;
interrupts = <0x2a 0x2>;
interrupt-parent = <0x1>;
};
pic@40000 {
interrupt-controller;
#address-cells = <0x0>;
#interrupt-cells = <0x2>;
reg = <0x40000 0x40000>;
compatible = "chrp,open-pic";
device_type = "open-pic";
linux,phandle = <0x1>;
phandle = <0x1>;
};
global-utilities@e0000 {
compatible = "fsl,mpc8641-guts";
reg = <0xe0000 0x1000>;
fsl,has-rstcr;
};
};
chosen {
linux,stdout-path = "/soc8641/serial0: serial@4500";
};
};