AnsweredAssumed Answered

fsl-espi driver deprecated on linux-3.8 for BSC913x processor

Question asked by Siddharth Kabra on Dec 30, 2015

Hi

I am trying to port linux 3.8 on a BSC9132 target. I am having trouble with the espi interface as the drivers provided in linux for fsl_espi show error messages as being deprecated. I am trying to bring up an RF device on the espi interface but recieve the following log:-

 

## Booting kernel from Legacy Image at 01000000 ...
   Image Name:   Linux-3.8.13-rt9
   Created:      2015-12-30  10:48:51 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    3974901 Bytes = 3.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02000000 ...
   Image Name:   lwbj.rfs-lin3.8.VER2
   Created:      2015-12-28  10:26:58 UTC
   Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
   Data Size:    74524785 Bytes = 71.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 00c00000
   Booting using the fdt blob at 0xc00000
   Uncompressing Kernel Image ... OK
   Loading Ramdisk to 2b8ed000, end 2ffff871 ... OK
   Loading Device Tree to 03ffa000, end 03ffffff ... OK
WARNING: could not find compatible node fsl-usb2-dr: FDT_ERR_NOTFOUND.
Using BSC9132 QDS machine description
Memory CAM mapping: 256/256/256 Mb, residual: 112Mb
Linux version 3.8.13-rt9 (ltea@v-psg-mng) (gcc version 4.7.2 (GCC) ) #46 SMP Wed Dec 30 16:18:47 IST 2015
Found initrd at 0xeb8ed000:0xeffff871
CPU maps initialized for 1 thread per core
bootconsole [udbg0] enabled
setup_arch: bootmem
bsc913x_qds_setup_arch()
bsc913x board from Freescale Semiconductor
arch: exit
Zone ranges:
  DMA      [mem 0x00000000-0x2fffffff]
  Normal   empty
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x00000000-0x2fffffff]
MMU: Allocated 1088 bytes of context maps for 255 contexts
PERCPU: Embedded 7 pages/cpu @c0dc1000 s7040 r8192 d13440 u32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 195072
Kernel command line: root=/dev/ram rw console=ttyS0,115200 mem=880M ramdisk_size=600000 default_hugepagesz=256m hugepagesz=256m hugepages=10
64
16
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 370496k/786432k available (7508k kernel code, 415936k reserved, 280k data, 122k bss, 252k init)
Kernel virtual memory layout:
  * 0xfffdf000..0xfffff000  : fixmap
  * 0xfdffd000..0xfe000000  : early ioremap
  * 0xf1000000..0xfdffd000  : vmalloc & ioremap
Hierarchical RCU implementation.
NR_IRQS:512 nr_irqs:512 16
mpic: Setting up MPIC " OpenPIC  " version 1.2 at ff740000, max 2 CPUs
mpic: ISU size: 256, shift: 8, mask: ff
mpic: Initializing for 256 sources
clocksource: timebase mult[8000000] shift[23] registered
Console: colour dummy device 80x25
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
mpic: requesting IPIs...
Brought up 2 CPUs
xor: measuring software checksum speed
   8regs     :  1181.000 MB/sec
   8regs_prefetch:  1022.000 MB/sec
   32regs    :  1272.000 MB/sec
   32regs_prefetch:  1125.000 MB/sec
xor: using function: 32regs (1272.000 MB/sec)
NET: Registered protocol family 16
            
Found FSL PCI host bridge at 0x00000000ff70a000. Firmware bus number: 0->0
PCI host bridge /pcie@ff70a000 (primary) ranges:
MEM 0x0000000090000000..0x00000000afffffff -> 0x0000000090000000
  IO 0x00000000c0010000..0x00000000c001ffff -> 0x0000000000000000
/pcie@ff70a000: PCICSRBAR @ 0xfff00000
PCI: Probing PCI hardware
fsl-pci ff70a000.pcie: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
pci_bus 0000:00: root bus resource [mem 0x90000000-0xafffffff]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci 0000:00:00.0: ignoring class 0x0b2000 (doesn't match header type 01)
pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0000:00:00.0: PCI bridge to [bus 01-ff]
pci 0000:00:00.0: PCI bridge to [bus 01]
pci 0000:00:00.0:   bridge window [io  0x0000-0xffff]
pci 0000:00:00.0:   bridge window [mem 0x90000000-0xafffffff]
mpic-msgr ff741400.message: Found 0 message registers
mpic-msgr ff741400.message: Of-device full name /soc@ff700000/message@41400
mpic-msgr ff741400.message: Failed to find message register block alias
fsl-l2ctlr ff720000.l2-cache-controller: Entire L2 as cache, provide valid sram address and size
fsl-l2ctlr: probe of ff720000.l2-cache-controller failed with error -22
bio: create slab <bio-0> at 0
raid6: int32x1    154 MB/s
raid6: int32x2    250 MB/s
raid6: int32x4    372 MB/s
raid6: int32x8    299 MB/s
raid6: using algorithm int32x4 (372 MB/s)
raid6: using intx1 recovery algorithm
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
Switching to clocksource timebase
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP: reno registered
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 72780k freed
Freescale PMC driver
fsl-ifc ff71e000.ifc: Freescale Integrated Flash Controller
audit: initializing netlink socket (disabled)
type=2000 audit(0.868:1): initialized
HugeTLB registered 256 MB page size, pre-allocated 1 pages
HugeTLB registered 1 MB page size, pre-allocated 0 pages
HugeTLB registered 4 MB page size, pre-allocated 0 pages
HugeTLB registered 16 MB page size, pre-allocated 0 pages
HugeTLB registered 64 MB page size, pre-allocated 0 pages
HugeTLB registered 1 GB page size, pre-allocated 0 pages
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
NTFS driver 2.1.30 [Flags: R/O].
jffs2: version 2.2. (NAND) (SUMMARY)  �© 2001-2006 Red Hat, Inc.
SGI XFS with security attributes, large block/inode numbers, no debug enabled
msgmni has been set to 1506
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO 0xff704500 (irq = 18) is a 16550A
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled
serial8250.0: ttyS1 at MMIO 0xff704600 (irq = 18) is a 16550A
brd: module loaded
loop: module loaded
Het Mgr 251 0
IPC: dsp_shared_size - 0x1000000
IPC: dsp_private_addr - 0x10
IPC: dsp_private_size - 0x40000000
IPC: shared_ctrl_addr - 0x21000
IPC: shared_ctrl_size - 0x1000000
Initializing Shared control area
Shared Control area start address = 21000
IPC structure start address = 0
Smart DSP Debug start address = 37000048
Free Area starts from 0
virt addr = f1036100
Het Ipc 250 0
fsl_shm module installed successfully withmajor num : 249
st: Version 20101219, fixed bufsize 32768, s/g segs 256
88000000.nor: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x002801
Amd/Fujitsu Extended Query Table at 0x0040
  Amd/Fujitsu Extended Query version 1.3.
number of CFI chips: 1
4 ofpart partitions found on MTD device 88000000.nor
Creating 4 MTD partitions on "88000000.nor":
0x000000040000-0x000000080000 : "NOR DTB Image"
ftl_cs: FTL header not found.
0x000000080000-0x000000780000 : "NAND Linux Kernel Image"
ftl_cs: FTL header not found.
0x000000800000-0x000003f00000 : "NOR RFS Image"
ftl_cs: FTL header not found.
0x000003f00000-0x000004000000 : "NOR U-boot Image"
ftl_cs: FTL header not found.
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit), 128MiB, page size: 2048, OOB size: 64
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
nand_read_bbt: bad block at 0x000002560000
nand_read_bbt: bad block at 0x0000075c0000
4 ofpart partitions found on MTD device ff800000.flash
Creating 4 MTD partitions on "ff800000.flash":
0x000000000000-0x000000300000 : "NAND U-Boot Image"
ftl_cs: FTL header not found.
0x000000300000-0x000000400000 : "NAND DTB Image"
ftl_cs: FTL header not found.
0x000000400000-0x000000c00000 : "NAND Linux Kernel Image"
ftl_cs: FTL header not found.
0x000000c00000-0x000008000000 : "NAND RFS Image"
ftl_cs: FTL header not found.
fsl,ifc-nand ff800000.nand: IFC NAND device at 0xff800000, bank 0
fsl_espi ff707000.spi: master is unqueued, this is deprecated
fsl_espi ff707000.spi: at 0xf10c8000 (irq = 22)
fsl_espi ff706000.spi: master is unqueued, this is deprecated
fsl_espi ff706000.spi: at 0xf10ca000 (irq = 23)
libphy: Fixed MDIO Bus: probed
enic: Cisco VIC Ethernet NIC Driver, ver 2.1.1.39
libphy: Freescale PowerQUICC MII Bus: probed
libphy: Freescale PowerQUICC MII Bus: probed
fsl-gianfar ethernet.1 eth0: mac: 00:04:9f:02:61:31
fsl-gianfar ethernet.1 eth0: Running with NAPI enabled
fsl-gianfar ethernet.1 eth0: RX BD ring size for Q[0]: 256
fsl-gianfar ethernet.1 eth0: RX BD ring size for Q[1]: 256
fsl-gianfar ethernet.1 eth0: RX BD ring size for Q[2]: 256
fsl-gianfar ethernet.1 eth0: RX BD ring size for Q[3]: 256
fsl-gianfar ethernet.1 eth0: RX BD ring size for Q[4]: 256
fsl-gianfar ethernet.1 eth0: RX BD ring size for Q[5]: 256
fsl-gianfar ethernet.1 eth0: RX BD ring size for Q[6]: 256
fsl-gianfar ethernet.1 eth0: RX BD ring size for Q[7]: 256
fsl-gianfar ethernet.1 eth0: TX BD ring size for Q[0]: 256
fsl-gianfar ethernet.1 eth0: TX BD ring size for Q[1]: 256
fsl-gianfar ethernet.1 eth0: TX BD ring size for Q[2]: 256
fsl-gianfar ethernet.1 eth0: TX BD ring size for Q[3]: 256
fsl-gianfar ethernet.1 eth0: TX BD ring size for Q[4]: 256
fsl-gianfar ethernet.1 eth0: TX BD ring size for Q[5]: 256
fsl-gianfar ethernet.1 eth0: TX BD ring size for Q[6]: 256
fsl-gianfar ethernet.1 eth0: TX BD ring size for Q[7]: 256
fsl-gianfar ethernet.2 eth1: mac: 00:04:9f:02:61:32
fsl-gianfar ethernet.2 eth1: Running with NAPI enabled
fsl-gianfar ethernet.2 eth1: RX BD ring size for Q[0]: 256
fsl-gianfar ethernet.2 eth1: RX BD ring size for Q[1]: 256
fsl-gianfar ethernet.2 eth1: RX BD ring size for Q[2]: 256
fsl-gianfar ethernet.2 eth1: RX BD ring size for Q[3]: 256
fsl-gianfar ethernet.2 eth1: RX BD ring size for Q[4]: 256
fsl-gianfar ethernet.2 eth1: RX BD ring size for Q[5]: 256
fsl-gianfar ethernet.2 eth1: RX BD ring size for Q[6]: 256
fsl-gianfar ethernet.2 eth1: RX BD ring size for Q[7]: 256
fsl-gianfar ethernet.2 eth1: TX BD ring size for Q[0]: 256
fsl-gianfar ethernet.2 eth1: TX BD ring size for Q[1]: 256
fsl-gianfar ethernet.2 eth1: TX BD ring size for Q[2]: 256
fsl-gianfar ethernet.2 eth1: TX BD ring size for Q[3]: 256
fsl-gianfar ethernet.2 eth1: TX BD ring size for Q[4]: 256
fsl-gianfar ethernet.2 eth1: TX BD ring size for Q[5]: 256
fsl-gianfar ethernet.2 eth1: TX BD ring size for Q[6]: 256
fsl-gianfar ethernet.2 eth1: TX BD ring size for Q[7]: 256
PPP generic driver version 2.4.2
NET: Registered protocol family 24
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
fsl-ehci ff7055f0.usb: No platform data for ff7055f0.usb.
ehci-pci: EHCI PCI platform driver
fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
fsl-ehci fsl-ehci.0: irq 40, io mem 0xff7055f0
fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 0.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 0 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
i2c /dev entries driver
mpc-i2c ff703000.i2c: timeout 1000000 us
mpc-i2c ff703100.i2c: timeout 1000000 us
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
Unable to handle kernel paging request for data at address 0x00000000
Faulting instruction address: 0xc0345ea4
Oops: Kernel access of bad area, sig: 11 [#1]
SMP NR_CPUS=2 BSC9132 QDS
Modules linked in:
NIP: c0345ea4 LR: c046dc68 CTR: 00000000
REGS: ea059ca0 TRAP: 0300   Not tainted  (3.8.13-rt9)
MSR: 00029000 <CE,EE,ME>  CR: 22adbe22  XER: 20000000
DEAR: 00000000, ESR: 00000000
TASK = ea0469f0[1] 'swapper/0' THREAD: ea058000 CPU: 1
GPR00: c046dc68 ea059d50 ea0469f0 00000000 00000043 ea059d28 00000001 ea059d68
GPR08: 00000004 00000000 00000000 c06d35f4 22adbe24 00000000 c000278c 00000000
GPR16: 00000000 00000000 00000000 00000000 c06d33f8 ea059d90 c06d33a4 ea059d74
GPR24: 00000010 c8a03a00 00000000 c07b0000 c8a03a00 eb8e953c 00000000 c07a0000
NIP [c0345ea4] reset_phy_via_fpga+0x20/0x114
LR [c046dc68] ad_phy_probe+0x624/0x6a4
Call Trace:
[ea059d50] [eb8e953c] 0xeb8e953c (unreliable)
[ea059d60] [c046dc68] ad_phy_probe+0x624/0x6a4
[ea059e00] [c0335b34] driver_probe_device+0x88/0x23c
[ea059e20] [c0335da4] __driver_attach+0xbc/0xc0
[ea059e40] [c0333d70] bus_for_each_dev+0x5c/0xa8
[ea059e70] [c0335150] bus_add_driver+0x1a0/0x284
[ea059e90] [c03364f0] driver_register+0x88/0x1a0
[ea059ec0] [c0736a3c] ad_phy_init+0x1c/0x58
[ea059ed0] [c00021ec] do_one_initcall+0x150/0x1b8
[ea059f00] [c07168fc] kernel_init_freeable+0x12c/0x1e8
[ea059f30] [c00027a0] kernel_init+0x14/0x10c
[ea059f40] [c000e2fc] ret_from_kernel_thread+0x64/0x6c
Instruction dump:
4cc63182 4bfec469 3860ffea 4bfffeec 9421fff0 7c0802a6 38800043 bfc10008
3fe0c07a 813fb4bc 7c7e1b78 90010014 <80690000> 480e1985 2f9e0001 813fb4bc
---[ end trace 1ec3625d88b57ae5 ]---

 

Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

 

I am assuming the "reset_phy_via_fpga" which is called to reset the RF device is failing due to the espi driver not being properly recognised earlier on. Please help. The rf drivers I am using have been modified from the source code provided in the BSP1.5 for the same to work with structures and functions in linux-3.8 but I have not touched the espi device drivers.

Outcomes