From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] IDE: Don't assume there are always two devices per bus
Date: Mon, 06 Sep 2010 14:50:39 +0200 [thread overview]
Message-ID: <20100906125039.26BDBB7164@gemini.denx.de> (raw)
In-Reply-To: <4C84D13C.8040702@free.fr>
Dear Albert ARIBAUD,
In message <4C84D13C.8040702@free.fr> you wrote:
>
> Er... no, it isn't. cmd_ide can support no more than two busses, the
> offsets of which are defined by CONFIG_SYS_ATA_IDE0_OFFSET, and optional
> CONFIG_SYS_ATA_IDE1_OFFSET if CONFIG_SYS_IDE_MAXBUS > 0 (note that these
> have _IDE in their names although they are not IDE per se).
>
> So you cannot have more than two busses.
I see.
> Moreover, the way it is done, if you want a third bus you have to modify
> cmd_ide.c to introduce CONFIG_SYS_ATA_IDE2_OFFSET, and once again later
> if you need a fourth one -- this does not scale well.
Agreed.
> OTOH, my proposal to group offsets in CONFIG_SYS_ATA_IDE_OFFSETS ("IDE"
> kept in name to match the original CONFIG_SYS_ATA_IDEx_OFFSET names, but
> I can live without this "IDE") makes it scalable: the config option
> provides both the number of busses and their offsets, and the cmd_ide
> code would need no change to accomodate any number of busses.
I'm not sure about the IDE in the name (it's offset of IDE register
structures, isn't it?), but that's not really important. I agree about
the rest.
> I meant that neither IDE or ATA standards restrict the maximum number of
> busses that can coexist in a given system; only the system designer can
> introduce such a limit.
OK.
> I don't mean 'hack' in any negative way; what I mean is that restricting
> the number of devices to less than twice the number of busses is not
> mandated by any standard, and aims not at providing functionality but
> at reducing footprint.
Agreed.
> 2) as for ide_bus_offset[] and ide_dev_desc[], and any other existing
> array based on CONFIG_SYS_IDE_MAXBUS or CONFIG_SYS_IDE_MAXDEVICE, they
> are not going to grow any bigger with my proposal since neither config
> option will increase.
We might chnage this to dynamically allocated structures. maybe that
would make more sense then?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"One planet is all you get."
next prev parent reply other threads:[~2010-09-06 12:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-14 10:41 [U-Boot] IDE_BUS unconditionally expects 2 devices per bus Rogan Dawes
2010-08-14 10:46 ` Rogan Dawes
2010-08-14 11:45 ` Albert ARIBAUD
2010-08-15 20:35 ` [U-Boot] [PATCH] IDE: Don't assume there are always two " Rogan Dawes
2010-08-15 21:30 ` Wolfgang Denk
2010-08-16 5:47 ` [U-Boot] [PATCH v2] " Rogan Dawes
2010-08-16 5:47 ` [U-Boot] [PATCH] " Rogan Dawes
2010-08-26 13:16 ` Rogan Dawes
2010-09-04 8:22 ` Albert ARIBAUD
2010-09-04 9:07 ` Albert ARIBAUD
2010-09-05 21:23 ` Rogan Dawes
2010-09-05 22:19 ` Wolfgang Denk
2010-09-06 5:54 ` Albert ARIBAUD
2010-09-06 6:03 ` Rogan Dawes
2010-09-06 6:05 ` Wolfgang Denk
2010-09-06 6:45 ` Albert ARIBAUD
2010-09-06 8:18 ` Wolfgang Denk
2010-09-06 11:32 ` Albert ARIBAUD
2010-09-06 12:50 ` Wolfgang Denk [this message]
2010-09-06 17:15 ` Albert ARIBAUD
2010-09-06 19:35 ` Wolfgang Denk
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=20100906125039.26BDBB7164@gemini.denx.de \
--to=wd@denx.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox