[U-Boot] [PATCH RFC 0/2] u-boot: arndale: Support for SATA controller.

Ian Campbell ijc at hellion.org.uk
Tue Oct 7 15:56:12 CEST 2014


Hello,

The following series ports over Taylor Hutt's patches to enable SATA for
the Chromeos smdk5250 u-boot and enables it for arndale (but not
smdk5250 since I don't have one).

In terms of basic access from u-boot it works for me but there is a
strange issue once booted Linux, which is that it will fail to detect
the disk if the PMU bit for the SATA is not disabled prior to launching
Linux, see the second patch for a hack which helps, but not completely.
Even with that hack it still fails to detect the disk some fraction of
the time, in both failure cases the output is essentially the same:

[    2.380814] ahci 122f0000.sata: SSS flag set, parallel bus scan disabled
[    2.386096] ahci 122f0000.sata: AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl platform mode
[    2.394583] ahci 122f0000.sata: flags: ncq sntf stag pm led clo only pmp pio slum part ccc apst 
[    2.424239] scsi0 : ahci_platform
[    2.427650] ata1: SATA max UDMA/133 mmio [mem 0x122f0000-0x122f01fe] port 0x100 irq 147
[   12.433897] ata1: softreset failed (1st FIS failed)
[   22.433896] ata1: softreset failed (1st FIS failed)
[   57.433895] ata1: softreset failed (1st FIS failed)
[   57.437299] ata1: limiting SATA link speed to 1.5 Gbps
[   62.629902] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[   62.634623] ata1.00: link online but device misclassified
[   62.634632] ata1: link online but 1 devices misclassified, device detection might fail

Usually a warm reset will succeed, although sometimes it seems a hard
reset is required. When it works I see instead:

[    2.337636] ahci 122f0000.sata: SSS flag set, parallel bus scan disabled
[    2.342901] ahci 122f0000.sata: AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl platform mode
[    2.351392] ahci 122f0000.sata: flags: ncq sntf stag pm led clo only pmp pio slum part ccc apst 
[    2.364181] scsi0 : ahci_platform
[    2.368469] ata1: SATA max UDMA/133 mmio [mem 0x122f0000-0x122f01fe] port 0x100 irq 147
[    2.865454] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    2.870972] ata1.00: ATA-8: HGST HTS545050A7E380, GG2OAC90, max UDMA/133
[    2.876867] ata1.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32)
[    2.884496] ata1.00: configured for UDMA/133
[    2.888172] scsi 0:0:0:0: Direct-Access     ATA      HGST HTS545050A7 AC90 PQ: 0 ANSI: 5
[    3.277166] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.286625] sd 0:0:0:0: Attached scsi generic sg0 type 0

My suspicion is that the SATA PHY is not being properly reset by Linux,
but I've mucked around with it in various ways (on the u-boot side only)
to no avail. The u-boot and Linux code here is identical AFAICT (modulo
my mucking around and the use of clr/setbits in u-boot, but Linux open
codes the same thing).

Kukjin & Yuvaraj, I've included you in the CC line in case you can shed
any light on the issue from the Linux side.

Thanks,
Ian.



More information about the U-Boot mailing list