linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Vitaly Bordug <vitb@kernel.crashing.org>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 2/2] [POWERPC] MPC8349E-mITX: use platform IDE driver for CF	interface
Date: Wed, 25 Jul 2007 12:29:23 -0500	[thread overview]
Message-ID: <46A78873.6010107@freescale.com> (raw)
In-Reply-To: <20070725165326.5331.19920.stgit@localhost.localdomain>

Vitaly Bordug wrote:
> diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
> index db0d003..f8f0e8a 100644
> --- a/arch/powerpc/boot/dts/mpc8349emitx.dts
> +++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
> @@ -37,6 +37,15 @@
>  		reg = <00000000 10000000>;
>  	};
>  
> +	ide@f0000000 {
> +		compatible = "mmio-ide";
> +		device_type = "ide";
> +		reg = <f0000000 10 f000020c 4>;
> +		ioport_shift = <1>;
> +		interrupts = <17 8>;
> +		interrupt-parent = < &ipic >;
> +	};
> +

Is this binding documented anywhere?  If it's a new binding, could we 
use reg-shift instead of ioport_shift?  This is what ns16550 uses, and 
in general dashes are preferable to underscores in device trees 
(device_type is an ugly, historical exception).

> diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
> index 40a0194..d63a104 100644
> --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
> +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
> @@ -23,6 +23,7 @@
>  #include <linux/delay.h>
>  #include <linux/seq_file.h>
>  #include <linux/root_dev.h>
> +#include <linux/pata_platform.h>
>  
>  #include <asm/system.h>
>  #include <asm/atomic.h>
> @@ -43,6 +44,75 @@ unsigned long isa_io_base = 0;
>  unsigned long isa_mem_base = 0;
>  #endif
>  
> +static int __init mmio_ide_of_init(void)
> +{
> +	struct device_node *np;
> +	unsigned int i;
> +
> +	for (np = NULL, i = 0;
> +	     (np = of_find_compatible_node(np, "ide", "mmio-ide")) != NULL;
> +	     i++) {
> +		int ret = 0;
> +		struct resource res[3];
> +		struct platform_device *pdev = NULL;
> +		static struct pata_platform_info pdata;

We really don't want code like this for every board with an MMIO IDE 
controller.  At the very least, make it a generic function in sysdev; 
better would be to make the driver also support of_platform devices.

-Scott

  parent reply	other threads:[~2007-07-25 17:29 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-25 16:53 [PATCH 1/2] [IDE] Platform IDE driver (was: MMIO IDE driver) Vitaly Bordug
2007-07-25 16:53 ` [PATCH 2/2] [POWERPC] MPC8349E-mITX: use platform IDE driver for CF interface Vitaly Bordug
2007-07-25 17:06   ` Sergei Shtylyov
2007-07-25 17:54     ` Sergei Shtylyov
2007-07-25 18:01       ` Scott Wood
2007-07-25 18:19         ` Sergei Shtylyov
2007-07-25 18:39           ` Scott Wood
2007-07-25 19:30             ` Sergei Shtylyov
2007-07-26 16:24               ` Sergei Shtylyov
2007-07-31 22:47             ` Segher Boessenkool
2007-07-25 18:29         ` Sergei Shtylyov
2007-07-25 18:46           ` Scott Wood
2007-07-26 17:21             ` Vitaly Bordug
2007-07-26 17:45               ` Sergei Shtylyov
2007-07-31 22:36       ` Segher Boessenkool
2007-07-31 23:56         ` Alan Cox
2007-08-06 17:19           ` Segher Boessenkool
2007-08-01 13:11         ` Sergei Shtylyov
2007-07-26 17:12     ` Vitaly Bordug
2007-07-25 17:29   ` Scott Wood [this message]
2007-07-25 17:43 ` [PATCH 1/2] [IDE] Platform IDE driver (was: MMIO IDE driver) Alan Cox
2007-07-26 19:28   ` Bartlomiej Zolnierkiewicz
2007-07-25 17:59 ` Kumar Gala
2007-07-25 19:00 ` Sergei Shtylyov
2007-07-25 19:05   ` Scott Wood
2007-07-25 19:16     ` Sergei Shtylyov
2007-07-25 19:17       ` [PATCH 1/2] [IDE] Platform IDE driver Scott Wood
2007-07-25 19:35         ` Sergei Shtylyov
2007-07-31 22:31           ` Segher Boessenkool
2007-08-01 12:39             ` Sergei Shtylyov
2007-08-06 17:16               ` Segher Boessenkool
2007-07-25 19:37 ` [PATCH 1/2] [IDE] Platform IDE driver (was: MMIO IDE driver) Guennadi Liakhovetski
2007-07-25 19:48   ` Sergei Shtylyov
2007-07-25 19:54     ` Guennadi Liakhovetski
2007-07-25 20:01       ` Sergei Shtylyov
2007-07-25 20:09         ` Guennadi Liakhovetski
2007-07-25 20:39   ` Alan Cox
2007-07-26 19:41     ` Guennadi Liakhovetski
2007-07-26 19:52       ` Sergei Shtylyov
2007-07-26 20:13         ` Guennadi Liakhovetski
2007-07-26 20:11       ` Bartlomiej Zolnierkiewicz
2007-07-26 19:28 ` Bartlomiej Zolnierkiewicz

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=46A78873.6010107@freescale.com \
    --to=scottwood@freescale.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=vitb@kernel.crashing.org \
    /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;
as well as URLs for NNTP newsgroup(s).