Re: [U-Boot] u-boot driver model

+U-Boot
Hi Marco,
On 20 October 2015 at 06:56, Hoefle Marco Marco.Hoefle@nanotronic.ch wrote:
Hello Simon, I read your presentation regarding driver model for u-boot. We want to port our old u-boot for Microblaze to an up to date one. I am struggling with the device tree -> driver model mapping.
The problem is identical to the thread here: http://lists.denx.de/pipermail/u-boot/2015-April/210754.html Invalid bus 0 (err=-19) *** Warning - spi_flash_probe() failed, using default environment
Unfortunately dm tree crashes so it is hard to debug further: U-Boot> dm tree Hardware exception at 0x4 address Return address from exception 0x8 Illegal op-code exception Unaligned halfword access Unaligned load access Register R0 ### ERROR ### Please RESET the board ###
This is the device tree compiled into u-boot:
U-Boot> bdinfo DRAM bank = 0x00000000 -> start = 0x80000000 -> size = 0x10000000 flash start = 0x00000000 flash size = 0x00000000 flash offset = 0x00000000 eth0name = Xelite.40e00000 ethaddr = 00:0A:35:02:C7:19 current eth = Xelite.40e00000 ip_addr = 192.168.0.3 baudrate = 115200 bps relocaddr = 0x8FF9B000 reloc off = 0x00F9B000 fdt_blob = 0x8FEB8A7C new_fdt = 0x8FEB8A7C fdt_size = 0x000024A0
U-Boot> fdt addr 0x8FEB8A7C U-Boot> fdt print / { #address-cells = <0x00000001>; #size-cells = <0x00000001>; aliases { serial0 = "serial@40600000"; spi0 = "/axi_quad_spi@44a00000"; }; memory { device_type = "memory"; reg = <0x80000000 0x10000000>; }; axi_quad_spi@44a00000 { compatible = "xlnx,xps-spi-2.00.a"; reg = <0x44a00000 0x00010000>; spi-max-frequency = <0x423a35c7>; #address-cells = <0x00000001>; #size-cells = <0x00000000>; status = "okay"; is-dual = <0x00000000>; num-cs = <0x00000001>; flash@0 { compatible = "n25q128a11"; reg = <0x00000000>; spi-tx-bus-width = <0x00000001>; spi-rx-bus-width = <0x00000004>; spi-max-frequency = <0x0d3ed78e>; #address-cells = <0x00000001>; #size-cells = <0x00000001>; partition@qspi-fsbl-uboot { label = "qspi-fsbl-uboot"; reg = <0x00000000 0x00100000>; }; partition@qspi-linux { label = "qspi-linux"; reg = <0x00100000 0x00500000>; }; partition@qspi-device-tree { label = "qspi-device-tree"; reg = <0x00600000 0x00020000>; }; partition@qspi-rootfs { label = "qspi-rootfs"; reg = <0x00620000 0x005e0000>; }; partition@qspi-bitstream { label = "qspi-bitstream"; reg = <0x00c00000 0x00400000>; }; }; }; };
Do you have any hint on how to debug this further?
Can you try with no SPI and see if you can get 'dm tree' to work? If that doesn't work it isn't worth trying to figure out SPI.
I suggest starting with what access is happening in 'dm tree' that causes a problem. You can probably add some debugging to drivers/core/dump.c.
Thanks and best regards, Marco
Regards, Simon
participants (1)
-
Simon Glass