[U-Boot] Missing SCSI block device connected to SATA adapter

Hello,
I am trying to use the new SCSI code with CONFIG_BLK=y on a Marvell board. I added CONFIG_DM_SCSI=y to my default configuration too. However "scsi reset" does not detect the connected hard disk since the execution flow never entered the "uclass_foreach_dev" loop in scsi_scan() function. My device is "UCLASS_AHCI" (arch/arm/mach-mvebu/sata.c) and calls ahci_init(). Should I take any additional steps for being registered as a SCSI device too?
Thank you for help! Konstantin
U-Boot 2016.11-00446-g7b1402b-dirty (Dec 29 2016 - 17:44:24 +0200)
DRAM: 2 GiB Pre-reloc malloc() used 0x218 bytes (0 KB) Now running in RAM - U-Boot at: 7ff39000 Comphy chip #0: Comphy-0: PEX0 Comphy-1: PEX0 Comphy-2: PEX0 Comphy-3: PEX0 Comphy-4: KR Comphy-5: SATA1 Comphy chip #1: Comphy-0: SGMII2 1.25 Gbps Comphy-1: SATA0 Comphy-2: USB3_HOST0 Comphy-3: SATA1 Comphy-4: KR Comphy-5: SGMII3 1.25 Gbps UTMI PHY 0 initialized to USB Host0 UTMI PHY 1 initialized to USB Host1 UTMI PHY 2 initialized to USB Host0 SATA link 0 timeout. Target spinup took 0 ms. AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl SATA mode flags: 64bit ncq led only pmp fbss pio slum part sxs MMC: sdhci@6e0000: 0 SF: Detected w25q32bv with page size 256 Bytes, erase size 4 KiB, total 4 MiB Model: MACCHIATOBin-8040 Net: No ethernet found. => => scsi reset
Reset SCSI scanning bus for devices (DM)... Get UCLASS_SCSI - OK => dm tree Class Probed Name ---------------------------------------- root [ + ] root_driver simple_bus [ + ] |-- ap806 simple_bus [ + ] | `-- config-space pinctrl [ + ] | |-- ap-pinctl@6F4000 pinconfig [ ] | | |-- i2c-pins-0 pinconfig [ + ] | | `-- emmc-pins-0 gpio [ ] | |-- gpio@6F5040 serial [ + ] | |-- serial@512000 mmc [ + ] | `-- sdhci@6e0000 blk [ ] | `-- sdhci@6e0000.blk simple_bus [ + ] |-- cp110-master simple_bus [ + ] | |-- config-space pinctrl [ ] | | |-- cpm-pinctl@440000 pinconfig [ ] | | | |-- cpm-i2c-pins-0 pinconfig [ ] | | | |-- cpm-i2c-pins-1 pinconfig [ ] | | | |-- cpm-ge-rgmii-pins-0 pinconfig [ ] | | | |-- cpm-pca0_pins pinconfig [ ] | | | |-- cpm-sdhi-pins-0 pinconfig [ ] | | | `-- cpm-spi-pins-0 gpio [ ] | | |-- gpio@440100 gpio [ ] | | |-- gpio@440140 ahci [ + ] | | |-- sata@540000 i2c [ ] | | |-- i2c@701000 i2c [ ] | | |-- i2c@701100 misc [ + ] | | `-- comphy@441000 pci [ ] | `-- pcie@f2600000 simple_bus [ + ] `-- cp110-slave simple_bus [ + ] `-- config-space pinctrl [ + ] |-- cps-pinctl@440000 pinconfig [ ] | |-- cps-ge-rgmii-pins-0 pinconfig [ + ] | `-- cps-spi-pins-1 gpio [ ] |-- gpio@440100 gpio [ ] |-- gpio@440140 ahci [ ] |-- sata@540000 usb [ ] |-- usb3@500000 spi [ + ] |-- spi@700680 spi_flash [ ] | `-- spi_flash@0:0 misc [ + ] `-- comphy@441000

Hi Konstantin, + Ken
your colleague contacted me privately regarding similar stuff and he has DM based driver. I think you should get in touch together to discuss this.
Thanks, Michal
On 29.12.2016 16:45, Kostya Porotchkin wrote:
Hello,
I am trying to use the new SCSI code with CONFIG_BLK=y on a Marvell board. I added CONFIG_DM_SCSI=y to my default configuration too. However "scsi reset" does not detect the connected hard disk since the execution flow never entered the "uclass_foreach_dev" loop in scsi_scan() function. My device is "UCLASS_AHCI" (arch/arm/mach-mvebu/sata.c) and calls ahci_init(). Should I take any additional steps for being registered as a SCSI device too?
Thank you for help! Konstantin
U-Boot 2016.11-00446-g7b1402b-dirty (Dec 29 2016 - 17:44:24 +0200)
DRAM: 2 GiB Pre-reloc malloc() used 0x218 bytes (0 KB) Now running in RAM - U-Boot at: 7ff39000 Comphy chip #0: Comphy-0: PEX0 Comphy-1: PEX0 Comphy-2: PEX0 Comphy-3: PEX0 Comphy-4: KR Comphy-5: SATA1 Comphy chip #1: Comphy-0: SGMII2 1.25 Gbps Comphy-1: SATA0 Comphy-2: USB3_HOST0 Comphy-3: SATA1 Comphy-4: KR Comphy-5: SGMII3 1.25 Gbps UTMI PHY 0 initialized to USB Host0 UTMI PHY 1 initialized to USB Host1 UTMI PHY 2 initialized to USB Host0 SATA link 0 timeout. Target spinup took 0 ms. AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl SATA mode flags: 64bit ncq led only pmp fbss pio slum part sxs MMC: sdhci@6e0000: 0 SF: Detected w25q32bv with page size 256 Bytes, erase size 4 KiB, total 4 MiB Model: MACCHIATOBin-8040 Net: No ethernet found. => => scsi reset
Reset SCSI scanning bus for devices (DM)... Get UCLASS_SCSI - OK => dm tree Class Probed Name
root [ + ] root_driver simple_bus [ + ] |-- ap806 simple_bus [ + ] | `-- config-space pinctrl [ + ] | |-- ap-pinctl@6F4000 pinconfig [ ] | | |-- i2c-pins-0 pinconfig [ + ] | | `-- emmc-pins-0 gpio [ ] | |-- gpio@6F5040 serial [ + ] | |-- serial@512000 mmc [ + ] | `-- sdhci@6e0000 blk [ ] | `-- sdhci@6e0000.blk simple_bus [ + ] |-- cp110-master simple_bus [ + ] | |-- config-space pinctrl [ ] | | |-- cpm-pinctl@440000 pinconfig [ ] | | | |-- cpm-i2c-pins-0 pinconfig [ ] | | | |-- cpm-i2c-pins-1 pinconfig [ ] | | | |-- cpm-ge-rgmii-pins-0 pinconfig [ ] | | | |-- cpm-pca0_pins pinconfig [ ] | | | |-- cpm-sdhi-pins-0 pinconfig [ ] | | | `-- cpm-spi-pins-0 gpio [ ] | | |-- gpio@440100 gpio [ ] | | |-- gpio@440140 ahci [ + ] | | |-- sata@540000 i2c [ ] | | |-- i2c@701000 i2c [ ] | | |-- i2c@701100 misc [ + ] | | `-- comphy@441000 pci [ ] | `-- pcie@f2600000 simple_bus [ + ] `-- cp110-slave simple_bus [ + ] `-- config-space pinctrl [ + ] |-- cps-pinctl@440000 pinconfig [ ] | |-- cps-ge-rgmii-pins-0 pinconfig [ + ] | `-- cps-spi-pins-1 gpio [ ] |-- gpio@440100 gpio [ ] |-- gpio@440140 ahci [ ] |-- sata@540000 usb [ ] |-- usb3@500000 spi [ + ] |-- spi@700680 spi_flash [ ] | `-- spi_flash@0:0 misc [ + ] `-- comphy@441000
participants (2)
-
Kostya Porotchkin
-
Michal Simek