From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Wed, 04 Aug 2010 09:23:48 +0200 Subject: [U-Boot] [PATCH V5 4/4] edminiv2: add mvsata_ide and cmd_ide support In-Reply-To: References: <1279022559-15772-1-git-send-email-albert.aribaud@free.fr> <1279022559-15772-2-git-send-email-albert.aribaud@free.fr> <1279022559-15772-3-git-send-email-albert.aribaud@free.fr> <1279022559-15772-4-git-send-email-albert.aribaud@free.fr> <4C49740D.3020003@free.fr> <4C55B043.3020604@free.fr> <4C5661FE.506@free.fr> <4C58051A.30606@free.fr> Message-ID: <4C591584.4020709@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Le 04/08/2010 08:08, Prafulla Wadaskar a ?crit : > > >> -----Original Message----- >> From: Prafulla Wadaskar >> Sent: Tuesday, August 03, 2010 5:40 PM >> To: 'Albert ARIBAUD' >> Cc: u-boot at lists.denx.de; tanmay.upadhyay at einfochips.com; >> Prabhanjan Sarnaik; Ashish Karkare >> Subject: RE: [PATCH V5 4/4] edminiv2: add mvsata_ide and >> cmd_ide support >> > ...snip... >>> >>> Actually two things were necessary to get ide reset to work >> reliably: >>> >>> 1) adding a delay between the writes to SControl. >>> Experimentation showed >>> this delay should be at least 41 us on my board. I have set >>> it to 50 us >>> to play safe on possible HW characteristics dispersions. >>> >>> 2) moving the call(s) to mvsata_ide_initialize_port() from >>> board_init() >>> function to function ide_preinit(), which is called just >>> before an IDE >>> reset if CONFIG_IDE_INIT is set -- accordingly, I added >>> ide_preinit() to >>> openrd_base.c and defined CONFIG_IDE_INIT in kirkwood.h. >>> >>> Prafulla, can you try the patch attached above yours? >> >> Sure, I will try this and let you know > > Hi Albert > > It worked for me. Great! > You may post V7, then I will post my patches for Kirkwood sata support Will do. > I have two more suggestion, > 1. put ide_preinit function in mvsata driver, define CONFIG_IDE_PREINIT in board config file > > 2. pls remove the blank lines between each command in function mvsata_ide_initialize_port, it looks ugly. Ok for 1 and 2. > 3. Instead of adding fixed 41/50 usec delay between the writes to Scontrol > It would be good if you can check/poll some status bit associated with IDE controller, this will make mvsata driver rock solid on any platform. I've looked up the marvell kirkwood and orion docs for such a control bit but found none. I'll look it up again, however it might help if you can find someone inside Marvell who would, and could, provide the info. > Regards.. > Prafulla . . Amicalement, -- Albert.