On Sun, 09 November 2014 Ian Campbell <[email protected]> wrote: > On Sat, 2014-11-08 at 20:34 +0100, Bruno Prémont wrote: > > Since updating my cubietruck to u-boot-2014.10 the SATA hard drive > > connected to it performs emergency head parking around the time > > uboot hands over control to kernel (or kernel is booting). > > I think that probably explains the click I've been wondering about.
To be more precise, it's in the middle of kernel booting. Though I had no time to identify more precisely at what time it was, kernel output on serial console flying by too quickly. > > Could u-boot put SATA drive into standby (or at least ask it to sync > > and park its heads) prior to handing control over to kernel? > > Yes, this would be great, thanks. Maybe in addition to stopping the disk(s), delaying SATA initialization until first use would be helpful as well. So when booting from SD card without trying to fetch anything from SATA drive the SATApower could be left untouched/disabled and AHCI not enabled at all (avoids spinning up the disk to immediately stop it again). In any case, if/when u-boot gets support for a power-off command it would be polite for it to stop the disk before powering off (and as needed in case of reset/reboot). > > On the other hand it would be nice if SATApower could be preserved > > along the different steps of boot process. > > I suppose something is resetting the GPIO controller and therefore the > power GPIO before the SATA drivers come along and configure it. I've no > idea if there exists any infrastructure in the kernel to preserve > initial setup of the GPIO (I expected there is). It would be useful to > investigate. Thanks, Bruno
signature.asc
Description: PGP signature
