All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 3/3] edmini: add IDE support
Date: Wed, 07 Jul 2010 12:50:12 +0200	[thread overview]
Message-ID: <4C345BE4.9060809@free.fr> (raw)
In-Reply-To: <F766E4F80769BD478052FB6533FA745D19A4A5CF90@SC-VEXCH4.marvell.com>

Le 07/07/2010 10:38, Prafulla Wadaskar a ?crit :

> don't you think it is better to add separate driver for Orion/Kirkwood/Marvell
> SATAC so that this code and even some configurations can be shared by other boards.

If you mean 'why use cmd_ide rather than the Marvell sata driver also 
posted recently', I have expressed my opinion there: 
<http://article.gmane.org/gmane.comp.boot-loaders.u-boot/80702>.

If you mean 'why not make this a standalone driver, e.g. 
driver/net/mvsata_ide.{ch} under a configuration option 
CONFIG_MVSATA_IDE' -- why not, but it would basically be empty of 
'driving' functionality (this is handled by cmd_ide) and would only 
provide initialization code, subject to board options (e.g. 
CONFIG_MVSATA_IDE_ENABLE_PORT{0,1}).

>> +	reg = readl(ORION5X_SATA_PORT1_SCONTROL_REG);
>> +	reg = (reg&  ~EDMINIV2_SCONTROL_MASK) | EDMINIV2_PORT_INIT;
>> +	writel(reg, ORION5X_SATA_PORT1_SCONTROL_REG);
>> +	reg = (reg&  ~EDMINIV2_SCONTROL_MASK) | EDMINIV2_PORT_USE;
>> +	writel(reg, ORION5X_SATA_PORT1_SCONTROL_REG);
>
> make use of c-structure for registers

Will do.

>> +#define CONFIG_SYS_ATA_DATA_OFFSET	(0x0100)
>> +#define CONFIG_SYS_ATA_REG_OFFSET	(0x0100)
>> +#define CONFIG_SYS_ATA_ALT_OFFSET	(0x0100)
>
> can you avoid magic numbers, if not some comments please

Will fix this.

Thanks Prafulla for your feedback.

Amicalement,
-- 
Albert.

  reply	other threads:[~2010-07-07 10:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-06 15:59 [U-Boot] [PATCH V2 1/3] ide: add configuration CONFIG_IDE_SWAP_IO Albert Aribaud
2010-07-06 15:59 ` [U-Boot] [PATCH V2 2/3] orion5x: add ide support for Marvell SATA Albert Aribaud
2010-07-06 15:59   ` [U-Boot] [PATCH V2 3/3] edmini: add IDE support Albert Aribaud
2010-07-07  8:38     ` Prafulla Wadaskar
2010-07-07 10:50       ` Albert ARIBAUD [this message]
2010-07-07 11:46         ` Prafulla Wadaskar
2010-07-07 14:08           ` Albert ARIBAUD
2010-07-08  6:01             ` Prafulla Wadaskar
2010-07-08  6:11               ` Albert ARIBAUD
2010-07-07  8:25   ` [U-Boot] [PATCH V2 2/3] orion5x: add ide support for Marvell SATA Prafulla Wadaskar
2010-07-07 11:23     ` Albert ARIBAUD
2010-07-07 11:37       ` Prafulla Wadaskar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C345BE4.9060809@free.fr \
    --to=albert.aribaud@free.fr \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.