public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 02/11] IDE: Don't assume there are always two devices per bus
Date: Mon, 25 Apr 2011 23:31:21 +0200	[thread overview]
Message-ID: <20110425213121.C7ABED52702@gemini.denx.de> (raw)
In-Reply-To: <1300435500-4909-3-git-send-email-rogan@dawes.za.net>

Dear rogan at dawes.za.net,

In message <1300435500-4909-3-git-send-email-rogan@dawes.za.net> you wrote:
> From: Rogan Dawes <rogan@dawes.za.net>
> 
> Some SATA controllers can operate in an IDE compatible mode (e.g. mvsata)
> but will only ever have a single device per bus.
> 
> This allows the upcoming DNS323 port to properly identify and use
> a drive on both SATA interfaces.
> ---
>  include/ide.h |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/include/ide.h b/include/ide.h
> index 6a1b7ae..c812b28 100644
> --- a/include/ide.h
> +++ b/include/ide.h
> @@ -24,7 +24,8 @@
>  #ifndef	_IDE_H
>  #define _IDE_H
>  
> -#define	IDE_BUS(dev)	(dev >> 1)
> +#define	IDE_BUS(dev)	(dev >> ((CONFIG_SYS_IDE_MAXDEVICE / \
> +				CONFIG_SYS_IDE_MAXBUS) - 1))

I am still not convinced this is a correct approach.  Can we not have
mixed configurations, with 1 device on one controller (bus) and 2
devices on another controller (bus) ?

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
Q:  How many IBM CPU's does it take to execute a job?
A:  Four; three to hold it down, and one to rip its head off.

  reply	other threads:[~2011-04-25 21:31 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-17 12:28 [U-Boot] Trying again: DNS323 Rogan Dawes
2011-03-18  8:04 ` [U-Boot] Working DNS323 config rogan at dawes.za.net
2011-03-18 19:34   ` Rogan Dawes
2011-03-18  8:04 ` [U-Boot] [PATCH 01/11] Orion5x: Correct DRAM bank detection rogan at dawes.za.net
2011-03-18  8:04 ` [U-Boot] [PATCH 02/11] IDE: Don't assume there are always two devices per bus rogan at dawes.za.net
2011-04-25 21:31   ` Wolfgang Denk [this message]
2011-03-18  8:04 ` [U-Boot] [PATCH 03/11] Align linebuf to avoid misaligned aliases of it rogan at dawes.za.net
2011-03-18  8:04 ` [U-Boot] [PATCH 04/11] Orion5x: bugfix: window size (mis)calculation rogan at dawes.za.net
2011-03-18 11:00   ` Prafulla Wadaskar
2011-03-18  8:04 ` [U-Boot] [PATCH 05/11] I2C: add Marvell TWSI simple driver rogan at dawes.za.net
2011-03-18  8:29   ` Heiko Schocher
2011-03-18  8:41     ` Rogan Dawes
2011-03-18  9:22       ` Heiko Schocher
2011-03-18 11:14         ` Rogan Dawes
2011-03-18 16:19       ` Wolfgang Denk
2011-03-18  8:04 ` [U-Boot] [PATCH 06/11] edminiv2: add I2C support using mvtwsi driver rogan at dawes.za.net
2011-03-18 10:57   ` Prafulla Wadaskar
2011-03-18 11:16     ` Rogan Dawes
2011-03-18  8:04 ` [U-Boot] [PATCH 07/11] Allow setting CONFIG_NR_DRAM_BANKS to a larger value rogan at dawes.za.net
2011-04-25 21:38   ` Wolfgang Denk
2011-03-18  8:04 ` [U-Boot] [PATCH 08/11] DNS323 CFI driver changes (hacks, testing only) rogan at dawes.za.net
2011-03-18  8:04 ` [U-Boot] [PATCH 09/11] Support passing a Marvell-specific ATAG rogan at dawes.za.net
2011-04-25 21:43   ` Wolfgang Denk
2011-03-18  8:04 ` [U-Boot] [PATCH 10/11] Copy the ramdisk from flash for the DNS323 rogan at dawes.za.net
2011-04-25 21:44   ` Wolfgang Denk
2011-04-26  7:09     ` Rogan Dawes
2011-03-18  8:09 ` [U-Boot] Non-working Relocated DNS323 config rogan at dawes.za.net
2011-03-18 10:53   ` Prafulla Wadaskar
2011-03-18 11:36     ` Rogan Dawes
2011-03-18  8:09 ` [U-Boot] [PATCH 1/7] Orion5x: Correct DRAM bank detection rogan at dawes.za.net
2011-03-18 10:52   ` Prafulla Wadaskar
2011-03-18 11:40     ` Rogan Dawes
2011-04-13 14:41   ` Prafulla Wadaskar
2011-03-18  8:09 ` [U-Boot] [PATCH 2/7] IDE: Don't assume there are always two devices per bus rogan at dawes.za.net
2011-03-18  8:09 ` [U-Boot] [PATCH 3/7] Allow setting CONFIG_NR_DRAM_BANKS to a larger value rogan at dawes.za.net
2011-03-18  8:10 ` [U-Boot] [PATCH 4/7] DNS323 CFI driver changes (hacks, testing only) rogan at dawes.za.net
2011-03-18  8:10 ` [U-Boot] [PATCH 5/7] Support passing a Marvell-specific ATAG rogan at dawes.za.net
2011-03-18 10:44   ` Prafulla Wadaskar
2011-03-18 11:44     ` Rogan Dawes
2011-03-18  8:10 ` [U-Boot] [PATCH 6/7] Copy the ramdisk from flash for the DNS323 rogan at dawes.za.net
2011-03-18 19:31 ` [U-Boot] [Working configuration, not for application 11/11] DNS323 configuration rogan at dawes.za.net
2011-03-18 19:39 ` [U-Boot] [non-working configuraton, post relocation 7/7] " rogan at dawes.za.net
2011-03-19  7:19   ` Heiko Schocher
2011-03-19 11:51     ` Rogan Dawes
2011-03-27 20:54       ` Rogan Dawes
2011-03-28  5:32         ` Heiko Schocher
2011-03-31  9:43         ` [U-Boot] how does Linux call the function from u-boot? sywang
2011-03-31 10:01           ` Wolfgang Denk
2011-03-31 23:59             ` sywang
2011-04-01  5:21               ` 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=20110425213121.C7ABED52702@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