From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from az33egw01.freescale.net (az33egw01.freescale.net [192.88.158.102]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "az33egw01.freescale.net", Issuer "Thawte Premium Server CA" (verified OK)) by ozlabs.org (Postfix) with ESMTP id 10D83DDEB7 for ; Thu, 26 Jul 2007 03:29:34 +1000 (EST) Message-ID: <46A78873.6010107@freescale.com> Date: Wed, 25 Jul 2007 12:29:23 -0500 From: Scott Wood MIME-Version: 1.0 To: Vitaly Bordug Subject: Re: [PATCH 2/2] [POWERPC] MPC8349E-mITX: use platform IDE driver for CF interface References: <20070725165318.5331.23795.stgit@localhost.localdomain> <20070725165326.5331.19920.stgit@localhost.localdomain> In-Reply-To: <20070725165326.5331.19920.stgit@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 = ; > + 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 > #include > #include > +#include > > #include > #include > @@ -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