[U-Boot] u-boot-x86 sf probe fail
Bin Meng
bmeng.cn at gmail.com
Fri Jun 17 04:38:18 CEST 2016
Hi Hilbert,
On Thu, Jun 16, 2016 at 3:46 PM, Hilbert Tu(杜睿哲_Pegatron)
<Hilbert_Tu at pegatroncorp.com> wrote:
> Hi Bin,
>
> Sorry for the top-posting.
>
> After check the datasheet, I think my SPI address was wrong due to null ops->read_config in pci_bus_read_config().
I don't think pci_bus_read_config() has null ops->read_config,
otherwise you won't get PCI bus probed.
> My dts file:
> spi: spi {
> #address-cells = <1>;
> #size-cells = <0>;
> compatible = "intel,ich9-spi";
> spi-flash at 0 {
> #address-cells = <1>;
> #size-cells = <1>;
> reg = <0>;
> compatible = "winbond,w25q128bv", "spi-flash";
> memory-map = <0xff000000 0x01000000>;
> rw-mrc-cache {
> label = "rw-mrc-cache";
> reg = <0xffe10000 0x00010000>;
> };
> };
> };
>
> And also bind the node as following:
>
> bind node spi
> ##device_bind: driver id:50, driver name:ich_spi
> Looking for 'spi' at 1140, name spi
> Looking for 'spi' at 1140, name spi
> - spi0, /pci/pch at 1f,0/spi
> - spi0, /pci/pch at 1f,0/spi
> Found seq 0
> Found seq 0
> bind node spi-flash at 0
> ##device_bind: driver id:52, driver name:spi_flash_std
> fdtdec_get_bool: spi-cpol
> fdtdec_get_bool: spi-cpha
> fdtdec_get_bool: spi-cs-high
> fdtdec_get_bool: spi-3wire
> fdtdec_get_bool: spi-half-duplex
>
> The "dm tree" is as following:
> Class Probed Name
> ----------------------------------------
> root [ + ] root_driver
> serial [ + ] |-- serial
> keyboard [ + ] |-- keyboard
> rtc [ ] |-- rtc
> timer [ + ] |-- tsc-timer
> pci [ + ] `-- pci
> pch [ + ] |-- pch at 1f,0
> irq [ + ] | |-- irq-router
> spi [ + ] | `-- spi
> spi_flash [ ] | `-- spi-flash at 0
> pci_generic [ ] |-- pci_0:0.0
> pci [ + ] |-- pci_0:1.0
> pci_generic [ ] | `-- pci_1:0.0
> pci [ + ] |-- pci_0:3.0
> pci_generic [ ] |-- pci_0:e.0
> pci_generic [ ] |-- pci_0:f.0
> pci_generic [ ] |-- pci_0:13.0
> usb [ ] |-- ehci_pci
> pci_generic [ ] |-- pci_0:17.0
> pci_generic [ ] |-- pci_0:18.0
> pci_generic [ ] `-- pci_0:1f.3
>
> So I think the initialization is ok. But when I execute "sf probe", I got following wrong result:
>
> ##uclass_find_device_by_seq: find_req_seq=0 seq_or_req_seq=0
> ##uclass_find_device_by_seq: id=50, ret=0
> ##uclass_find_device_by_seq: dev req bus=0 dev bus=-1
> device not found
> ##spi_flash_probe_bus_cs: bus=0, num=0
> ##uclass_find_device_by_seq: find_req_seq=0 seq_or_req_seq=0
> ##uclass_find_device_by_seq: id=50, ret=0
> ##uclass_find_device_by_seq: dev req bus=0 dev bus=-1
> device not found
> ##uclass_get_device_by_seq: id=50, bus=0, ret=-19
> ##uclass_find_device_by_seq: find_req_seq=1 seq_or_req_seq=0
> ##uclass_find_device_by_seq: id=50, ret=0
> ##uclass_find_device_by_seq: dev req bus=0 dev bus=-1
> device found
> ##uclass_find_device_by_seq: find_req_seq=0 seq_or_req_seq=0
> ##uclass_find_device_by_seq: id=50, ret=0
> ##uclass_find_device_by_seq: dev req bus=0 dev bus=-1
> device not found
> ##uclass_resolve_seq: Device 'spi': seq 0 dup name:'<NULL>', ret=-19
> ###ops->read_config is null
> ##ich_init_controller: sbasep:2143514112, sbase_addr:7fc36ed2
> ich_init_controller: sbase=7fc36e00
>
> The node "spi" does not have correct operations to read config. Is it due to wrong device model or wrong dts file?
>
Can you paste your full dts file for inspecting?
Regards,
Bin
More information about the U-Boot
mailing list