All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grzegorz Bernacki <gjb@semihalf.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v8 1/2] mpc52xx: Get rid of board-specific #ifdef's in cpu/mpc5xxx/ide.c
Date: Tue, 17 Mar 2009 10:06:39 +0100	[thread overview]
Message-ID: <12372808012245-git-send-email-gjb@semihalf.com> (raw)
In-Reply-To: <12372808002644-git-send-email-gjb@semihalf.com>

Total5200 and digsy MTC use I2C port 2 pins as a ATA chip select.
To avoid adding board-specific ifdefs to cpu/mpc5xxx/ide.c new 
define CONFIG_SYS_ATA_CS_ON_I2C2 was introduced. It is used by
Total5200 and will be used by digsy MTC and other boards with
ATA CS on I2C pins.

Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
---
 cpu/mpc5xxx/ide.c           |    2 +-
 include/configs/Total5200.h |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/cpu/mpc5xxx/ide.c b/cpu/mpc5xxx/ide.c
index df5b4ac..9e8f29b 100644
--- a/cpu/mpc5xxx/ide.c
+++ b/cpu/mpc5xxx/ide.c
@@ -42,7 +42,7 @@ int ide_preinit (void)
 	struct mpc5xxx_sdma *psdma = (struct mpc5xxx_sdma *) MPC5XXX_SDMA;
 
 	reg = *(vu_long *) MPC5XXX_GPS_PORT_CONFIG;
-#if defined(CONFIG_TOTAL5200)
+#if defined(CONFIG_SYS_ATA_CS_ON_I2C2)
 	/* ATA cs0/1 on i2c2 clk/io */
 	reg = (reg & ~0x03000000ul) | 0x02000000ul;
 #else
diff --git a/include/configs/Total5200.h b/include/configs/Total5200.h
index 9a75848..1daa574 100644
--- a/include/configs/Total5200.h
+++ b/include/configs/Total5200.h
@@ -397,6 +397,7 @@
 #define	CONFIG_IDE_RESET		/* reset for ide supported	*/
 #define CONFIG_IDE_PREINIT
 
+#define CONFIG_SYS_ATA_CS_ON_I2C2
 #define CONFIG_SYS_IDE_MAXBUS		1	/* max. 1 IDE bus		*/
 #define CONFIG_SYS_IDE_MAXDEVICE	1	/* max. 1 drive per IDE bus	*/
 
-- 
1.6.0.6

  reply	other threads:[~2009-03-17  9:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-17  9:06 [U-Boot] [PATCH v8 0/2] Add support for the digsy MTC board Grzegorz Bernacki
2009-03-17  9:06 ` Grzegorz Bernacki [this message]
2009-03-18 19:55   ` [U-Boot] [PATCH v8 1/2] mpc52xx: Get rid of board-specific #ifdef's in cpu/mpc5xxx/ide.c Wolfgang Denk
2009-03-17  9:06 ` [U-Boot] [PATCH v7 2/2] Add support for the digsy MTC board Grzegorz Bernacki
2009-03-18 19:56   ` Wolfgang Denk
2009-03-18 23:12   ` Wolfgang Denk
2009-03-19 14:29     ` Grzegorz Bernacki

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=12372808012245-git-send-email-gjb@semihalf.com \
    --to=gjb@semihalf.com \
    --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.