Re: Kernel panic when loading the IDE controller driver
Hi All, I finally got the FLASH controller driver working and it is now successfully reporting the presence of 2GB Flash in the board. I used the new "libata" driver code present in the new kernel source under drivers/ata/. Also did the required additions in the device tree to provide the IO port, IRQ and PIO mode details to the driver. However now I am getting the below errors. [4.200145] scsi host0: pata_of_platform [4.236999] ata1: PATA max PIO4 mmio cmd 0xe000 ctl 0xe20c irq 63 [4.439985] ata1.01: ATA-7: 2GB ATA Flash Disk, C A254G4, max UDMA/133 [4.463419] ata1.01: 3571344 sectors, multi 0: LBA48 [4.483384] ata1.01: configured for PIO [4.512936] scsi 0:0:1:0: Direct-Access ATA 2GB ATA Flash Di 54G4 PQ: 0 ANSI: 5 [4.555994] sd 0:0:1:0: [sda] 3571344 512-byte logical blocks: (1.83 GB/1.70 GiB) [4.591975] sd 0:0:1:0: [sda] Write Protect is off [4.611307] sd 0:0:1:0: [sda] Mode Sense: 00 3a 00 00 [4.629733] sd 0:0:1:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [4.823702] [4.823702] AT THE START OF CPU_STARTUP_ENTRY FUNCTION [4.823734] [4.823734] *INSIDE IDLE LOOP [ 36.163139] ata1: drained 65536 bytes to clear DRQ [ 36.185451] ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen [ 36.199598] ata1.01: cmd 20/00:08:00:00:00/00:00:00:00:00/f0 tag 0 pio 4096 in [ 36.199598] res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout) [ 36.229002] ata1: soft resetting link [ 36.559637] ata1.01: configured for PIO [ 36.567563] ata1.01: device reported invalid CHS sector 0 [ 36.578396] ata1: EH complete [ 68.919134] ata1: drained 65536 bytes to clear DRQ [ 68.928530] ata1.01: limiting speed to UDMA7:PIO5 [ 68.937856] ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen [ 68.952487] ata1.01: cmd 20/00:08:00:00:00/00:00:00:00:00/f0 tag 0 pio 4096 in [ 68.952487] res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout) [ 68.981876] ata1: soft resetting link [ 69.311683] ata1.01: configured for PIO [ 69.319304] ata1.01: device reported invalid CHS sector 0 [ 69.330274] ata1: EH complete [ 101.687134] ata1: drained 65536 bytes to clear DRQ [ 101.696646] ata1.01: limiting speed to PIO0 [ 101.704921] ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen [ 101.719288] ata1.01: cmd 20/00:08:00:00:00/00:00:00:00:00/f0 tag 0 pio 4096 in [ 101.719288] res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout) [ 101.748593] ata1: soft resetting link [ 102.079594] ata1.01: configured for PIO [ 102.087204] ata1.01: device reported invalid CHS sector 0 [ 102.098144] ata1: EH complete [ 132.407134] ata1: drained 65536 bytes to clear DRQ [ 132.416687] ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen [ 132.430752] ata1.01: cmd 20/00:08:00:00:00/00:00:00:00:00/f0 tag 0 pio 4096 in [ 132.430752] res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout) [ 132.460168] ata1: soft resetting link [ 132.791594] ata1.01: configured for PIO [ 132.799048] ata1.01: device reported invalid CHS sector 0 [ 132.810076] ata1: EH complete [ 165.175163] ata1: drained 65536 bytes to clear DRQ [ 165.186023] ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen [ 165.200192] ata1.01: cmd 20/00:08:00:00:00/00:00:00:00:00/f0 tag 0 pio 4096 in [ 165.200192] res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout) [ 165.229531] ata1: soft resetting link Can anyone suggest why I am getting the above errors? Thanks, Sachin. -- Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html
Re: Kernel panic when loading the IDE controller driver
Hi, > Hopefully there are examples of passing these values through ACPI. Are you suggesting here to look at the ide-acpi.c sourc file available as part of the driver code? In my original post I mentioned that I have modified the ide-generic.c source file to use the IO port addresses and IRQ number that we used in the older kernel. Also, added code in the kernel under arch/PowerPC/mm/init_32.c source to configure the addresses required by the driver as IO ports. But the error I am getting still continues to suggest that probably the required address range is still setup by the kernel as IO ports. How can we configure a set of virtual address as IO ports in the kernel version 4.15.13? Sachin -- Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html
Re: Kernel panic when loading the IDE controller driver
> Maybe look around > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/? > id=9a0e77f28b50128df0c9e26ae489e44e29a7270a >Also look at ide_platform.c. I imagine there must be some way to set it >up in your device tree. I have gone through this before and also tried the pata_platform driver but no success yet. I haven't found any example that passes the IO ports and IRQ information through the device tree to the driver code. Thanks, Sachin. -- Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html
Re: Kernel panic when loading the IDE controller driver
> Why using 4.15.13 which is obsolete instead of using one of the Long > Term Support versions which are still maintained, like 4.14 or 4.19 ? > (see the complete list at https://www.kernel.org/category/releases.html) Well, when I started this task 4.15.13 was probably the latest stable release and hence we decided to port this version. In the older kernel, we have the m8260_setup.c source file for our board where the function "io_block_mapping" was used to configure the non-standard IO port address starting at 0xe000 location. This address was passed as the base address followed by control address and IRQ number to the ide-core.ko module. In the new kernel we do not have an option to send these addresses and IRQ numbers as arguments to the driver. Instead the ide-generic.c source file in the new kernel uses the standard IO port values and IRQ values. I modified the code in the above file to used the addresses and IRQ number we used in the past. Also, added code in the "MMU_init" function call available under arch/PowerPC/init_32.c to setup the IO port address range by adding the "io_block_mapping" call and the required IO port address range. Is there anything else that needs to be added or how can we configure the desired IO address range in the new kernel? Thanks, Sachin -- Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html
Re: Kernel panic when loading the IDE controller driver
> What it the last linux version known to work properly? We have used it successfully in the Linux-2.6.17.6 version. Thanks, Sachin. -- Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html
Kernel panic when loading the IDE controller driver
Hi All, I have been working on porting Linux-4.15.13 kernel on our existing MPC8270 processor board. For this exercise, I have used pq2fads as a reference board, its associated device tree and used cuImage for building the kernel. I am facing an issue with the generic IDE flash controller driver in the new kernel source where it fails to detect the Flash controller connected to 2GB NAND flash available on the board. We have used non-standard IO port addresses for this driver in the older kernel and I have added the required code in the new kernel to setup the set of addresses that we need as IO ports. Also, modified the code in the drivers/ide/ source to use the non-standard IO port address. However, during boot up while inserting the module I continue to get the below errors. [4.116587] ide: forcing hda as a disk (3543/255/63) [4.184190] Probing IDE interface ide0... [4.226330] Machine check in kernel mode. [4.233809] Caused by (from SRR1=49030): [4.233826] Transfer error ack signal [4.249263] IN from bad port e00e at 004123ef I understand that this is an addressing issue but not sure exactly what am I missing to fix the problem. Can you provide me your inputs on debugging this issue? Thanks, Sachin. -- Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html
Re: Not able to boot cuImage for the target board with MPC8270 processor
Hi All, I debugged the bootwrapper code by printing messages in RAM using memcpy. The bootwrapper code appears to be executing correctly. I ensured that the "serial_console_init" function has executed successfully. But I am still not able to get any of the "printf" output in the wrapper code on the serial console. Can anybody suggests what else I need to look at? Thanks, Sachin -- Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html
Re: Not able to boot cuImage for the target board with MPC8270 processor
> Are you sure the device tree you're using is correct for your board, including > all addresses being where your U-Boot configured them? I actually created one for the target board I am using but had similar problem. So I decided to take the pq2fads.dts tree as a reference since it is based on the POWER QUICKII family and build the cuImage. I am sure I will get some errors here but I can debug and then build the device tree for my board. I will try to debug the boot wrapper code as suggested. Thanks for your support. Sachin. -- Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html
Re: Not able to boot cuImage for the target board with MPC8270 processor
Thanks for your reply. Yes, both the options are enabled in the kernel configuration for my board as seen below. CONFIG_PPC_EARLY_DEBUG=y CONFIG_PPC_EARLY_DEBUG_CPM=y # CONFIG_PPC_EARLY_DEBUG_MEMCONS is not set CONFIG_PPC_EARLY_DEBUG_CPM_ADDR=0x11a80 -- Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html
Re: Not able to boot cuImage for the target board with MPC8270 processor
Yes, both these config options are enabled as you can see from the below details from my .config file. CONFIG_PPC_EARLY_DEBUG=y CONFIG_PPC_EARLY_DEBUG_CPM=y # CONFIG_PPC_EARLY_DEBUG_MEMCONS is not set CONFIG_PPC_EARLY_DEBUG_CPM_ADDR=0x11a80 -- Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html
Not able to boot cuImage for the target board with MPC8270 processor
Hi Everyone, Recently I took up the activity of switching from Linux kernel version 2.16.17.6 to version 4.15.13 for our target board that supports MPC8270 PowerPC processor. As I understand the new kernel version mandates the use of a device tree in the kernel source to describe the target board. I took "pq2fads.dts" as a reference device tree file to port the kernel for our target board. The U-boot version 1.1.4 that we currently use does not support passing of device tree to kernel but passes the board information structure used by the older kernel version we have been using so far. As suggested in the new kernel documentation I created a "cuImage.pq2fads" kernel image which has the device tree and boot wrapper code embedded in the image to support booting the kernel with older U-boot. However I am unable to see any debug output after the dump from U-boot below. U-Boot 1.1.4 (Aug 2 2018 - 06:27:35) MPC8260 Reset Status: Check Stop, External Soft, External Hard MPC8260 Clock Configuration - Bus-to-Core Mult 4x, VCO Div 2, 60x Bus Freq 25-75 , Core Freq 100-300 - dfbrg 1, corecnf 0x1a, busdf 5, cpmdf 1, plldf 0, pllmf 5 - vco_out 394515000, scc_clk 98628750, brg_clk 24657187 - cpu_clk 26301, cpm_clk 197257500, bus_clk 65752500 CPU: MPC8260 (HiP7 Rev 14, Mask 1.0 1K49M) at 263.010 MHz Board: Emerson MPC8270 CCB Init SRAM, CAN, DOC... UPMA done. Setting up UPMB Rev B or Higher CPU Board I2C: ready DRAM: 128 MB FLASH: 16 MB In:serial Out: serial Err: serial Net: FCC1 ETHERNET, FCC2 ETHERNET Press to STOP AUTOBOOT!:autoboot in 2 seconds ## Booting image at ffc0 ... Image Name: Linux-4.15.13 Created: 2018-08-29 10:45:39 UTC Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size:1166748 Bytes = 1.1 MB Load Address: 0040 Entry Point: 004007a4 Verifying Checksum ... OK Uncompressing Kernel Image ... OK I also checked the kernel dump at location associated with "_log_buf" symbol in the System.map file in RAM but did not get any debug info. Please can anyone suggest if I am missing something here and how can I get the debug output on my serial console during bootup. Thanks, Sachin. -- Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html