<div dir="ltr">Why do not you use deconfig from linux kernel tree. Modify only base address of CCSR (soc node) for child nodes of root in device tree.<div>arch/powerpc/boot/dts/mpc8641_hpcn.dts. <br></div><div><br></div><div>
Sri</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 26, 2013 at 3:48 AM, Ashish Khetan <span dir="ltr"><<a href="mailto:curieux.khetan@gmail.com" target="_blank">curieux.khetan@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>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.<br>
/dts-v1/;<br><br>/ {<br> model = "MPC8641HPCN";<br> compatible = "fsl,mpc8641hpcn";<br> #address-cells = <0x1>;<br> #size-cells = <0x1>;<br><br> aliases {<br> ethernet0 = "/soc8641@f8000000/ethernet@24000";<br>
ethernet1 = "/soc8641@f8000000/ethernet@25000";<br> ethernet2 = "/soc8641@f8000000/ethernet@26000";<br> ethernet3 = "/soc8641@f8000000/ethernet@27000";<br> serial0 = "/soc8641@f8000000/serial@4500";<br>
};<br><br> cpus {<br> #address-cells = <0x1>;<br> #size-cells = <0x0>;<br><br> PowerPC,8641@0 {<br> device_type = "cpu";<br> reg = <0x0>;<br> d-cache-line-size = <0x20>;<br>
i-cache-line-size = <0x20>;<br> d-cache-size = <0x8000>;<br> i-cache-size = <0x8000>;<br> timebase-frequency = <0x0>;<br> bus-frequency = <0x0>;<br>
clock-frequency = <0x0>;<br> };<br> };<br><br> memory {<br> device_type = "memory";<br> reg = <0x0 0x20000000>;<br> };<br><br> localbus@f8005000 {<br> #address-cells = <0x2>;<br>
#size-cells = <0x1>;<br> compatible = "fsl,mpc8641-localbus", "simple-bus";<br> reg = <0xf8005000 0x1000>;<br> interrupts = <0x13 0x2>;<br> interrupt-parent = <0x1>;<br>
ranges = <0x0 0x0 0xff000000 0x1000000>;<br><br> flash@0,0 {<br> compatible = "cfi-flash";<br> reg = <0x0 0x0 0x800000>;<br> bank-width = <0x2>;<br>
device-width = <0x2>;<br> #address-cells = <0x1>;<br> #size-cells = <0x1>;<br> };<br> };<br><br> soc8641@f8000000 {<br> #address-cells = <0x1>;<br>
#size-cells = <0x1>;<br> device_type = "soc";<br> compatible = "simple-bus";<br> ranges = <0x0 0xf8000000 0x100000>;<br> bus-frequency = <0x0>;<br>
<br> mcm-law@0 {<br> compatible = "fsl,mcm-law";<br> reg = <0x0 0x1000>;<br> fsl,num-laws = <0xa>;<br> };<br><br> mcm@1000 {<br> compatible = "fsl,mpc8641-mcm", "fsl,mcm";<br>
reg = <0x1000 0x1000>;<br> interrupts = <0x11 0x2>;<br> interrupt-parent = <0x1>;<br> };<br><br> dma@21300 {<br> #address-cells = <0x1>;<br>
#size-cells = <0x1>;<br> compatible = "fsl,mpc8641-dma", "fsl,eloplus-dma";<br> reg = <0x21300 0x4>;<br> ranges = <0x0 0x21100 0x200>;<br>
cell-index = <0x0>;<br><br> dma-channel@0 {<br> compatible = "fsl,mpc8641-dma-channel", "fsl,eloplus-dma-channel";<br> reg = <0x0 0x80>;<br>
cell-index = <0x0>;<br> interrupt-parent = <0x1>;<br> interrupts = <0x14 0x2>;<br> };<br><br> dma-channel@80 {<br> compatible = "fsl,mpc8641-dma-channel", "fsl,eloplus-dma-channel";<br>
reg = <0x80 0x80>;<br> cell-index = <0x1>;<br> interrupt-parent = <0x1>;<br> interrupts = <0x15 0x2>;<br> };<br><br> dma-channel@100 {<br>
compatible = "fsl,mpc8641-dma-channel", "fsl,eloplus-dma-channel";<br> reg = <0x100 0x80>;<br> cell-index = <0x2>;<br> interrupt-parent = <0x1>;<br>
interrupts = <0x16 0x2>;<br> };<br><br> dma-channel@180 {<br> compatible = "fsl,mpc8641-dma-channel", "fsl,eloplus-dma-channel";<br> reg = <0x180 0x80>;<br>
cell-index = <0x3>;<br> interrupt-parent = <0x1>;<br> interrupts = <0x17 0x2>;<br> };<br> };<br><br> ethernet@24000 {<br> #address-cells = <0x1>;<br>
#size-cells = <0x1>;<br> cell-index = <0x0>;<br> device_type = "network";<br> model = "TSEC";<br> compatible = "gianfar";<br>
reg = <0x24000 0x1000>;<br> ranges = <0x0 0x24000 0x1000>;<br> local-mac-address = [00 00 00 00 00 00];<br> interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;<br> interrupt-parent = <0x1>;<br>
tbi-handle = <0x2>;<br> phy-handle = <0x3>;<br> phy-connection-type = "rgmii-id";<br><br> mdio@520 {<br> #address-cells = <0x1>;<br>
#size-cells = <0x0>;<br>
compatible = "fsl,gianfar-mdio";<br> reg = <0x520 0x20>;<br><br> ethernet-phy@0 {<br> interrupt-parent = <0x1>;<br> interrupts = <0xa 0x1>;<br>
reg = <0x0>;<br> device_type = "ethernet-phy";<br> linux,phandle = <0x3>;<br> };<br><br> ethernet-phy@1 {<br> interrupt-parent = <0x1>;<br>
interrupts = <0xa 0x1>;<br> reg = <0x1>;<br> device_type = "ethernet-phy";<br> linux,phandle = <0x5>;<br> };<br>
<br> ethernet-phy@2 {<br> interrupt-parent = <0x1>;<br> interrupts = <0xa 0x1>;<br> reg = <0x2>;<br> device_type = "ethernet-phy";<br>
linux,phandle = <0x7>;<br> };<br><br> ethernet-phy@3 {<br> interrupt-parent = <0x1>;<br> interrupts = <0xa 0x1>;<br>
reg = <0x3>;<br> device_type = "ethernet-phy";<br> linux,phandle = <0x9>;<br> };<br><br> tbi-phy@11 {<br> reg = <0x11>;<br>
device_type = "tbi-phy";<br> linux,phandle = <0x2>;<br> };<br> };<br> };<br><br> ethernet@25000 {<br> #address-cells = <0x1>;<br>
#size-cells = <0x1>;<br> cell-index = <0x1>;<br> device_type = "network";<br> model = "TSEC";<br> compatible = "gianfar";<br>
reg = <0x25000 0x1000>;<br> ranges = <0x0 0x25000 0x1000>;<br> local-mac-address = [00 00 00 00 00 00];<br> interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>;<br> interrupt-parent = <0x1>;<br>
tbi-handle = <0x4>;<br> phy-handle = <0x5>;<br> phy-connection-type = "rgmii-id";<br><br> mdio@520 {<br> #address-cells = <0x1>;<br>
#size-cells = <0x0>;<br>
compatible = "fsl,gianfar-tbi";<br> reg = <0x520 0x20>;<br><br> tbi-phy@11 {<br> reg = <0x11>;<br> device_type = "tbi-phy";<br>
linux,phandle = <0x4>;<br> };<br> };<br> };<br><br> ethernet@26000 {<br> #address-cells = <0x1>;<br> #size-cells = <0x1>;<br>
cell-index = <0x2>;<br> device_type = "network";<br> model = "TSEC";<br> compatible = "gianfar";<br> reg = <0x26000 0x1000>;<br>
ranges = <0x0 0x26000 0x1000>;<br> local-mac-address = [00 00 00 00 00 00];<br> interrupts = <0x1f 0x2 0x20 0x2 0x21 0x2>;<br> interrupt-parent = <0x1>;<br> tbi-handle = <0x6>;<br>
phy-handle = <0x7>;<br> phy-connection-type = "rgmii-id";<br><br> mdio@520 {<br> #address-cells = <0x1>;<br> #size-cells = <0x0>;<br>
compatible = "fsl,gianfar-tbi";<br> reg = <0x520 0x20>;<br><br> tbi-phy@11 {<br> reg = <0x11>;<br> device_type = "tbi-phy";<br>
linux,phandle = <0x6>;<br> };<br> };<br> };<br><br> ethernet@27000 {<br> #address-cells = <0x1>;<br> #size-cells = <0x1>;<br>
cell-index = <0x3>;<br> device_type = "network";<br> model = "TSEC";<br> compatible = "gianfar";<br> reg = <0x27000 0x1000>;<br>
ranges = <0x0 0x27000 0x1000>;<br> local-mac-address = [00 00 00 00 00 00];<br> interrupts = <0x25 0x2 0x26 0x2 0x27 0x2>;<br> interrupt-parent = <0x1>;<br> tbi-handle = <0x8>;<br>
phy-handle = <0x9>;<br> phy-connection-type = "rgmii-id";<br><br> mdio@520 {<br> #address-cells = <0x1>;<br> #size-cells = <0x0>;<br>
compatible = "fsl,gianfar-tbi";<br> reg = <0x520 0x20>;<br><br> tbi-phy@11 {<br> reg = <0x11>;<br> device_type = "tbi-phy";<br>
linux,phandle = <0x8>;<br> };<br> };<br> };<br><br> serial@4500 {<br> cell-index = <0x0>;<br> device_type = "serial";<br>
compatible = "ns16550";<br> reg = <0x4500 0x100>;<br> clock-frequency = <0x0>;<br> interrupts = <0x2a 0x2>;<br> interrupt-parent = <0x1>;<br>
};<br><br> pic@40000 {<br> interrupt-controller;<br> #address-cells = <0x0>;<br> #interrupt-cells = <0x2>;<br> reg = <0x40000 0x40000>;<br> compatible = "chrp,open-pic";<br>
device_type = "open-pic";<br> linux,phandle = <0x1>;<br> phandle = <0x1>;<br> };<br><br> global-utilities@e0000 {<br> compatible = "fsl,mpc8641-guts";<br>
reg = <0xe0000 0x1000>;<br> fsl,has-rstcr;<br> };<br> };<br><br> chosen {<br> linux,stdout-path = "/soc8641/serial0: serial@4500";<br> };<br>};<br><br></div><br>
<div><div><div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 26, 2013 at 2:37 PM, wyang <span dir="ltr"><<a href="mailto:w90p710@gmail.com" target="_blank">w90p710@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><div><div class="h5"><div><div>
<div>On 12/26/2013 01:09 PM, Ashish Khetan
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>Hi,<br>
</div>
I was trying to port Linux-3.12 for MPC8641 based custom
designed board for evaluation purpose. I have been facing a
kernel bug at mpic initialization. Is somebody have faced
this kind of bugs or can give me any pointer for further
steps how to solve kernel bugs will be really helpful. here
is the snapshot for the bug that may be helpful to address
the bug.<br>
Using MPC86xx HPCN machine description<br>
Total memory = 512MB; using 1024kB for hash table (at
cff00000)<br>
Linux version 3.12.0 (ashish@ashish-VirtualBox) (gcc version
4.7.2 (GCC) ) #2 We<br>
d Dec 25 16:04:36 IST 2013<br>
Found initrd at 0xde975000:0xdfec428a<br>
bootconsole [udbg0] enabled<br>
setup_arch: bootmem<br>
mpc86xx_hpcn_setup_arch()<br>
MPC86xx HPCN board from Freescale Semiconductor<br>
arch: exit<br>
Zone ranges:<br>
DMA [mem 0x00000000-0x1fffffff]<br>
Normal empty<br>
HighMem empty<br>
Movable zone start for each node<br>
Early memory node ranges<br>
node 0: [mem 0x00000000-0x1fffffff]<br>
Built 1 zonelists in Zone order, mobility grouping on.
Total pages: 130048<br>
Kernel command line: root=/dev/ram0 rw rootfs
console=ttyS0,115200<br>
PID hash table entries: 2048 (order: 1, 8192 bytes)<br>
Dentry cache hash table entries: 65536 (order: 6, 262144
bytes)<br>
Inode-cache hash table entries: 32768 (order: 5, 131072
bytes)<br>
Sorting __ex_table...<br>
Memory: 424980K/524288K available (4172K kernel code, 208K
rwdata, 1304K rodata,<br>
196K init, 149K bss, 99308K reserved, 0K highmem)<br>
Kernel virtual memory layout:<br>
* 0xfffcf000..0xfffff000 : fixmap<br>
* 0xff800000..0xffc00000 : highmem PTEs<br>
* 0xff7fe000..0xff800000 : early ioremap<br>
* 0xe1000000..0xff7fe000 : vmalloc & ioremap<br>
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1<br>
NR_IRQS:512 nr_irqs:512 16<br>
------------[ cut here ]------------<br>
kernel BUG at arch/powerpc/platforms/86xx/pic.c:42!<br>
</div>
</div>
</div>
</blockquote>
<br></div></div></div></div>
It hints that mpic_alloc() fails. Maybe, you should spend some time
investigating why it fails.<span><span> :-) </span></span><br>
<br>
Thanks<br>
Wei<br>
<blockquote type="cite"><div><div class="h5"><div><div>
<div dir="ltr">
<div>
<div>Oops: Exception in kernel mode, sig: 5 [#1]<br>
MPC86xx HPCN<br>
Modules linked in:<br>
CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.0 #2<br>
task: c05903e0 ti: c05b4000 task.ti: c05b4000<br>
NIP: c0567438 LR: c0567430 CTR: c0567400<br>
REGS: c05b5ee0 TRAP: 0700 Not tainted (3.12.0)<br>
MSR: 00021032 <ME,IR,DR,RI> CR: 24000042 XER:
20000000<br>
<br>
GPR00: c0567430 c05b5f90 c05903e0 00000000 c04e4ff8 c051e588
0000008f 00000002<br>
GPR08: c042789c 00000001 0000006f 00000000 22000048 bebffffd
11a7b4e5 200c8000<br>
GPR16: ffbeffff ffffffff 00000000 00000024 00000000 1fec56f8
1fec59a7 00000000<br>
GPR24: 00000000 1fff97e8 40000000 1ffcc6a0 c0bff080 c05c2490
c05c2628 c0585b60<br>
NIP [c0567438] mpc86xx_init_irq+0x38/0x108<br>
LR [c0567430] mpc86xx_init_irq+0x30/0x108<br>
Call Trace:<br>
[c05b5f90] [c0567430] mpc86xx_init_irq+0x30/0x108
(unreliable)<br>
[c05b5fb0] [c0562784] init_IRQ+0x24/0x38<br>
[c05b5fc0] [c055fde4] start_kernel+0x1bc/0x2ec<br>
[c05b5ff0] [00003444] 0x3444<br>
Instruction dump:<br>
3d00c04f 38800000 38a01002 38c00000 38e00100 39088f8c
38600000 90010024<br>
bfa10014 4bffec35 7c690034 5529d97e <0f090000>
3fa0c04f 4bfff391 38600000<br>
---[ end trace 31fd0ba7d8756001 ]---<br>
<br>
Kernel panic - not syncing: Attempted to kill the idle task!<br>
Rebooting in 180 seconds..<br>
<br>
<br>
</div>
Thanks & Regards<br>
</div>
Ashish Khetan<br>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div></div></div><pre>_______________________________________________
Linuxppc-dev mailing list
<a href="mailto:Linuxppc-dev@lists.ozlabs.org" target="_blank">Linuxppc-dev@lists.ozlabs.org</a>
<a href="https://lists.ozlabs.org/listinfo/linuxppc-dev" target="_blank">https://lists.ozlabs.org/listinfo/linuxppc-dev</a></pre>
</blockquote>
<br>
</div>
</blockquote></div><br></div>
<br>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards,<div>Sri.</div>
</div>