From: Mike Frysinger Date: Thu, 11 Dec 2008 15:56:22 -0500 Subject: [U-Boot] [PATCH] SATA: do not auto-initialize during boot In-Reply-To: <3B24DCFA-1309-4B92-A4AE-D9943D33269B@kernel.crashing.org> References: <20081211101257.29464834B020@gemini.denx.de> <200812111503.54148.vapier@gentoo.org> <3B24DCFA-1309-4B92-A4AE-D9943D33269B@kernel.crashing.org> Message-ID: <200812111556.23044.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday 11 December 2008 15:51:32 Kumar Gala wrote: > On Dec 11, 2008, at 2:03 PM, Mike Frysinger wrote: > > On Thursday 11 December 2008 11:17:56 Kumar Gala wrote: > >> On Dec 11, 2008, at 4:32 AM, Mike Frysinger wrote: > >>> Rather than have the board code initialize SATA automatically during > >>> boot, > >>> make the user manually run "sata init". This brings the SATA > >>> subsystem in > >>> line with common U-Boot policy. > >>> > >>> Along these lines, the "is_sata_supported()" hook is no longer > >>> needed, so > >>> scrub it from the tree. > >>> > >>> Signed-off-by: Mike Frysinger > >>> --- > >>> board/freescale/mpc8536ds/mpc8536ds.c | 11 ----------- > >>> common/cmd_sata.c | 7 +++++-- > >>> include/sata.h | 2 -- > >>> lib_ppc/board.c | 20 -------------------- > >>> 4 files changed, 5 insertions(+), 35 deletions(-) > >> > >> Why should we make the user have to do 'sata init'? That seems > >> annoying and easy to forget. > > > > it's already standard behavior with most mass storage things (like > > mmc and sf and ...), so it isnt a big deal imo. i asked if Wolfgang > > wanted it automated and he preferred making the user do it themselves. > > This seems backwards to me.. > > 'sata init' isn't safe. It seems like you should only be able to call > it once. However I think we can keep issuing it and cause bad things > to happen. i dont think so. the SATA driver should be doing the right thing: init_sata() should get the hardware into a usable state regardless of how it was before. > Also, in the code you removed we do a runtime check on 8536 to see if > SATA is even available. That check is still valid. why ? if the hardware doesnt support it, then the user shouldnt be attempting to use it. if they do, that's their fault for doing something stupid. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20081211/43638103/attachment.pgp