mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] Remove PPC support for IDE.
@ 2009-12-21 14:06 Robert P. J. Day
  2009-12-21 14:26 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2009-12-21 14:06 UTC (permalink / raw)
  To: U-Boot Version 2 (barebox)


Based on a suggestion from S. Hauer, we don't currently need any IDE
support, but we can always add it back later if we choose.  There
don't appear to be any other IDE-related source files in the tree.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>

---

diff --git a/arch/ppc/mach-mpc5xxx/ide.c b/arch/ppc/mach-mpc5xxx/ide.c
deleted file mode 100644
index 29b99f6..0000000
--- a/arch/ppc/mach-mpc5xxx/ide.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * (C) Copyright 2004
- * Pierre AUBERT, Staubli Faverges, <p.aubert@staubli.com>
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- * Init is derived from Linux code.
- */
-#include <common.h>
-
-#ifdef CFG_CMD_IDE
-#include <mpc5xxx.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-#define CALC_TIMING(t) (t + period - 1) / period
-
-#ifdef CONFIG_IDE_RESET
-extern void init_ide_reset (void);
-#endif
-
-int ide_preinit (void)
-{
-	long period, t0, t1, t2_8, t2_16, t4, ta;
-	vu_long reg;
-	struct mpc5xxx_sdma *psdma = (struct mpc5xxx_sdma *) MPC5XXX_SDMA;
-
-	reg = *(vu_long *) MPC5XXX_GPS_PORT_CONFIG;
-#if defined(CONFIG_TOTAL5200)
-	/* ATA cs0/1 on i2c2 clk/io */
-	reg = (reg & ~0x03000000ul) | 0x02000000ul;
-#else
-	/* ATA cs0/1 on Local Plus cs4/5 */
-	reg = (reg & ~0x03000000ul) | 0x01000000ul;
-#endif	/* CONFIG_TOTAL5200 */
-	*(vu_long *) MPC5XXX_GPS_PORT_CONFIG = reg;
-
-	/* All sample codes do that... */
-	*(vu_long *) MPC5XXX_ATA_SHARE_COUNT = 0;
-
-	/* Configure and reset host */
-	*(vu_long *) MPC5XXX_ATA_HOST_CONFIG = MPC5xxx_ATA_HOSTCONF_IORDY |
-		MPC5xxx_ATA_HOSTCONF_SMR | MPC5xxx_ATA_HOSTCONF_FR;
-	udelay (10);
-	*(vu_long *) MPC5XXX_ATA_HOST_CONFIG = MPC5xxx_ATA_HOSTCONF_IORDY;
-
-	/* Disable prefetch on Commbus */
-	psdma->PtdCntrl |= 1;
-
-	/* Init timings : we use PIO mode 0 timings */
-	period = 1000000000 / gd->ipb_clk;	/* period in ns */
-
-	t0 = CALC_TIMING (600);
-	t2_8 = CALC_TIMING (290);
-	t2_16 = CALC_TIMING (165);
-	reg = (t0 << 24) | (t2_8 << 16) | (t2_16 << 8);
-	*(vu_long *) MPC5XXX_ATA_PIO1 = reg;
-
-	t4 = CALC_TIMING (30);
-	t1 = CALC_TIMING (70);
-	ta = CALC_TIMING (35);
-	reg = (t4 << 24) | (t1 << 16) | (ta << 8);
-
-	*(vu_long *) MPC5XXX_ATA_PIO2 = reg;
-
-#ifdef CONFIG_IDE_RESET
-	init_ide_reset ();
-#endif /* CONFIG_IDE_RESET */
-
-	return (0);
-}
-#endif /* CFG_CMD_IDE */

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

            Linux Consulting, Training and Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
========================================================================

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Remove PPC support for IDE.
  2009-12-21 14:06 [PATCH] Remove PPC support for IDE Robert P. J. Day
@ 2009-12-21 14:26 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2009-12-21 14:26 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: U-Boot Version 2 (barebox)

On Mon, Dec 21, 2009 at 09:06:45AM -0500, Robert P. J. Day wrote:
> 
> Based on a suggestion from S. Hauer, we don't currently need any IDE
> support, but we can always add it back later if we choose.  There
> don't appear to be any other IDE-related source files in the tree.
> 
> Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>


Ok, applied

Sascha

> 
> ---
> 
> diff --git a/arch/ppc/mach-mpc5xxx/ide.c b/arch/ppc/mach-mpc5xxx/ide.c
> deleted file mode 100644
> index 29b99f6..0000000
> --- a/arch/ppc/mach-mpc5xxx/ide.c
> +++ /dev/null
> @@ -1,88 +0,0 @@
> -/*
> - * (C) Copyright 2004
> - * Pierre AUBERT, Staubli Faverges, <p.aubert@staubli.com>
> - *
> - * See file CREDITS for list of people who contributed to this
> - * project.
> - *
> - * This program is free software; you can redistribute it and/or
> - * modify it under the terms of the GNU General Public License as
> - * published by the Free Software Foundation; either version 2 of
> - * the License, or (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> - * MA 02111-1307 USA
> - *
> - * Init is derived from Linux code.
> - */
> -#include <common.h>
> -
> -#ifdef CFG_CMD_IDE
> -#include <mpc5xxx.h>
> -
> -DECLARE_GLOBAL_DATA_PTR;
> -
> -#define CALC_TIMING(t) (t + period - 1) / period
> -
> -#ifdef CONFIG_IDE_RESET
> -extern void init_ide_reset (void);
> -#endif
> -
> -int ide_preinit (void)
> -{
> -	long period, t0, t1, t2_8, t2_16, t4, ta;
> -	vu_long reg;
> -	struct mpc5xxx_sdma *psdma = (struct mpc5xxx_sdma *) MPC5XXX_SDMA;
> -
> -	reg = *(vu_long *) MPC5XXX_GPS_PORT_CONFIG;
> -#if defined(CONFIG_TOTAL5200)
> -	/* ATA cs0/1 on i2c2 clk/io */
> -	reg = (reg & ~0x03000000ul) | 0x02000000ul;
> -#else
> -	/* ATA cs0/1 on Local Plus cs4/5 */
> -	reg = (reg & ~0x03000000ul) | 0x01000000ul;
> -#endif	/* CONFIG_TOTAL5200 */
> -	*(vu_long *) MPC5XXX_GPS_PORT_CONFIG = reg;
> -
> -	/* All sample codes do that... */
> -	*(vu_long *) MPC5XXX_ATA_SHARE_COUNT = 0;
> -
> -	/* Configure and reset host */
> -	*(vu_long *) MPC5XXX_ATA_HOST_CONFIG = MPC5xxx_ATA_HOSTCONF_IORDY |
> -		MPC5xxx_ATA_HOSTCONF_SMR | MPC5xxx_ATA_HOSTCONF_FR;
> -	udelay (10);
> -	*(vu_long *) MPC5XXX_ATA_HOST_CONFIG = MPC5xxx_ATA_HOSTCONF_IORDY;
> -
> -	/* Disable prefetch on Commbus */
> -	psdma->PtdCntrl |= 1;
> -
> -	/* Init timings : we use PIO mode 0 timings */
> -	period = 1000000000 / gd->ipb_clk;	/* period in ns */
> -
> -	t0 = CALC_TIMING (600);
> -	t2_8 = CALC_TIMING (290);
> -	t2_16 = CALC_TIMING (165);
> -	reg = (t0 << 24) | (t2_8 << 16) | (t2_16 << 8);
> -	*(vu_long *) MPC5XXX_ATA_PIO1 = reg;
> -
> -	t4 = CALC_TIMING (30);
> -	t1 = CALC_TIMING (70);
> -	ta = CALC_TIMING (35);
> -	reg = (t4 << 24) | (t1 << 16) | (ta << 8);
> -
> -	*(vu_long *) MPC5XXX_ATA_PIO2 = reg;
> -
> -#ifdef CONFIG_IDE_RESET
> -	init_ide_reset ();
> -#endif /* CONFIG_IDE_RESET */
> -
> -	return (0);
> -}
> -#endif /* CFG_CMD_IDE */
> 
> ========================================================================
> Robert P. J. Day                               Waterloo, Ontario, CANADA
> 
>             Linux Consulting, Training and Kernel Pedantry.
> 
> Web page:                                          http://crashcourse.ca
> Twitter:                                       http://twitter.com/rpjday
> ========================================================================
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-12-21 14:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-21 14:06 [PATCH] Remove PPC support for IDE Robert P. J. Day
2009-12-21 14:26 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox