Re: [PATCH v2] Integrated Flash Controller support

2011-11-22 Thread Kumar Gala

On Oct 31, 2011, at 4:38 AM,   
wrote:

> From: Liu Shuo 
> 
> Integrated Flash Controller supports various flashes like NOR, NAND
> and other devices using NOR, NAND and GPCM Machine available on it.
> IFC supports four chip selects.
> 
> Signed-off-by: Dipen Dudhat 
> Signed-off-by: Scott Wood 
> Signed-off-by: Li Yang 
> Signed-off-by: Liu Shuo 
> ---
> arch/powerpc/Kconfig   |4 +
> arch/powerpc/include/asm/fsl_ifc.h |  834 
> arch/powerpc/sysdev/Makefile   |1 +
> arch/powerpc/sysdev/fsl_ifc.c  |  322 ++
> 4 files changed, 1161 insertions(+), 0 deletions(-)
> create mode 100644 arch/powerpc/include/asm/fsl_ifc.h
> create mode 100644 arch/powerpc/sysdev/fsl_ifc.c

Guys,

How are we handling this patchset since it touches drivers/mtd/nand?

- k
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v2] Integrated Flash Controller support

2011-11-24 Thread Kumar Gala

On Nov 22, 2011, at 9:41 PM, Kumar Gala wrote:

> 
> On Oct 31, 2011, at 4:38 AM,   
> wrote:
> 
>> From: Liu Shuo 
>> 
>> Integrated Flash Controller supports various flashes like NOR, NAND
>> and other devices using NOR, NAND and GPCM Machine available on it.
>> IFC supports four chip selects.
>> 
>> Signed-off-by: Dipen Dudhat 
>> Signed-off-by: Scott Wood 
>> Signed-off-by: Li Yang 
>> Signed-off-by: Liu Shuo 
>> ---
>> arch/powerpc/Kconfig   |4 +
>> arch/powerpc/include/asm/fsl_ifc.h |  834 
>> 
>> arch/powerpc/sysdev/Makefile   |1 +
>> arch/powerpc/sysdev/fsl_ifc.c  |  322 ++
>> 4 files changed, 1161 insertions(+), 0 deletions(-)
>> create mode 100644 arch/powerpc/include/asm/fsl_ifc.h
>> create mode 100644 arch/powerpc/sysdev/fsl_ifc.c
> 
> Guys,
> 
> How are we handling this patchset since it touches drivers/mtd/nand?

Artem,

thoughts?

- k
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v2] Integrated Flash Controller support

2011-11-29 Thread Artem Bityutskiy
On Mon, 2011-10-31 at 17:38 +0800, b35...@freescale.com wrote:
> +/*
> + * fsl_ifc_ctrl_probe
> + *
> + * called by device layer when it finds a device matching
> + * one our driver can handled. This code allocates all of
> + * the resources needed for the controller only.  The
> + * resources for the NAND banks themselves are allocated
> + * in the chip probe function.
> +*/
> +static int __devinit fsl_ifc_ctrl_probe(struct platform_device *dev)
> +{
> + int ret = 0;
> +
> +

... snip ...

I am concerned about the error path in this function

> + init_waitqueue_head(&fsl_ifc_ctrl_dev->nand_wait);
> +
> + ret = request_irq(fsl_ifc_ctrl_dev->irq, fsl_ifc_ctrl_irq, IRQF_SHARED,
> +   "fsl-ifc", fsl_ifc_ctrl_dev);
> + if (ret != 0) {
> + dev_err(&dev->dev, "failed to install irq (%d)\n",
> + fsl_ifc_ctrl_dev->irq);
> + goto err;
> + }

irq_dispose_mapping() on error path?

> +
> + ret = request_irq(fsl_ifc_ctrl_dev->nand_irq, fsl_ifc_nand_irq, 0,
> +   "fsl-ifc-nand", fsl_ifc_ctrl_dev);
> + if (ret != 0) {
> + dev_err(&dev->dev, "failed to install irq (%d)\n",
> + fsl_ifc_ctrl_dev->nand_irq);
> + goto err;

free_irq() on error path?
> + }
> +
> + return 0;
> +
> +err:
> + return ret;
> +}


> +static __init int fsl_ifc_init(void)
> +{
> + int ret;
> +
> + ret = platform_driver_register(&fsl_ifc_ctrl_driver);
> + if (ret)
> + printk(KERN_ERR "fsl-ifc: Failed to register platform"
> + "driver\n");
> +
> + return ret;
> +}
> +
> +static void __exit fsl_ifc_exit(void)
> +{
> + platform_driver_unregister(&fsl_ifc_ctrl_driver);
> +}
> +
> +module_init(fsl_ifc_init);
> +module_exit(fsl_ifc_exit);

How about using module_platform_driver() instead?


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v2] Integrated Flash Controller support

2011-11-29 Thread Artem Bityutskiy
On Thu, 2011-11-24 at 08:24 -0600, Kumar Gala wrote:
> On Nov 22, 2011, at 9:41 PM, Kumar Gala wrote:
> 
> > 
> > On Oct 31, 2011, at 4:38 AM,   
> > wrote:
> > 
> >> From: Liu Shuo 
> >> 
> >> Integrated Flash Controller supports various flashes like NOR, NAND
> >> and other devices using NOR, NAND and GPCM Machine available on it.
> >> IFC supports four chip selects.
> >> 
> >> Signed-off-by: Dipen Dudhat 
> >> Signed-off-by: Scott Wood 
> >> Signed-off-by: Li Yang 
> >> Signed-off-by: Liu Shuo 
> >> ---
> >> arch/powerpc/Kconfig   |4 +
> >> arch/powerpc/include/asm/fsl_ifc.h |  834 
> >> 
> >> arch/powerpc/sysdev/Makefile   |1 +
> >> arch/powerpc/sysdev/fsl_ifc.c  |  322 ++
> >> 4 files changed, 1161 insertions(+), 0 deletions(-)
> >> create mode 100644 arch/powerpc/include/asm/fsl_ifc.h
> >> create mode 100644 arch/powerpc/sysdev/fsl_ifc.c
> > 
> > Guys,
> > 
> > How are we handling this patchset since it touches drivers/mtd/nand?

I do not see it touching MTD from the diffstat above. I am a little bit
confused why a flash controller is added to
arch/powerpc/sysdev/fsl_ifc.c ?

Artem.

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v2] Integrated Flash Controller support

2011-11-29 Thread Scott Wood
On 11/29/2011 03:40 PM, Artem Bityutskiy wrote:
> On Thu, 2011-11-24 at 08:24 -0600, Kumar Gala wrote:
>> On Nov 22, 2011, at 9:41 PM, Kumar Gala wrote:
>>
>>>
>>> On Oct 31, 2011, at 4:38 AM,   
>>> wrote:
>>>
 From: Liu Shuo 

 Integrated Flash Controller supports various flashes like NOR, NAND
 and other devices using NOR, NAND and GPCM Machine available on it.
 IFC supports four chip selects.

 Signed-off-by: Dipen Dudhat 
 Signed-off-by: Scott Wood 
 Signed-off-by: Li Yang 
 Signed-off-by: Liu Shuo 
 ---
 arch/powerpc/Kconfig   |4 +
 arch/powerpc/include/asm/fsl_ifc.h |  834 
 
 arch/powerpc/sysdev/Makefile   |1 +
 arch/powerpc/sysdev/fsl_ifc.c  |  322 ++
 4 files changed, 1161 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/include/asm/fsl_ifc.h
 create mode 100644 arch/powerpc/sysdev/fsl_ifc.c
>>>
>>> Guys,
>>>
>>> How are we handling this patchset since it touches drivers/mtd/nand?
> 
> I do not see it touching MTD from the diffstat above. I am a little bit
> confused why a flash controller is added to
> arch/powerpc/sysdev/fsl_ifc.c ?

It's really a bus controller, with NOR, NAND, and general-purpose modes
settable per chipselect.  The actual NAND driver goes in
drivers/mtd/nand, and is apparently in a separate patch (probably due to
separate maintenance domains).

It's the same situation as arch/powerpc/sysdev/fsl_lbc.c versus
drivers/mtd/nand/fsl_elbc_nand.c and drivers/mtd/nand/fsl_upm.c.

-Scott

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v2] Integrated Flash Controller support

2011-11-29 Thread Kumar Gala

On Nov 29, 2011, at 3:48 PM, Scott Wood wrote:

> On 11/29/2011 03:40 PM, Artem Bityutskiy wrote:
>> On Thu, 2011-11-24 at 08:24 -0600, Kumar Gala wrote:
>>> On Nov 22, 2011, at 9:41 PM, Kumar Gala wrote:
>>> 
 
 On Oct 31, 2011, at 4:38 AM,   
 wrote:
 
> From: Liu Shuo 
> 
> Integrated Flash Controller supports various flashes like NOR, NAND
> and other devices using NOR, NAND and GPCM Machine available on it.
> IFC supports four chip selects.
> 
> Signed-off-by: Dipen Dudhat 
> Signed-off-by: Scott Wood 
> Signed-off-by: Li Yang 
> Signed-off-by: Liu Shuo 
> ---
> arch/powerpc/Kconfig   |4 +
> arch/powerpc/include/asm/fsl_ifc.h |  834 
> 
> arch/powerpc/sysdev/Makefile   |1 +
> arch/powerpc/sysdev/fsl_ifc.c  |  322 ++
> 4 files changed, 1161 insertions(+), 0 deletions(-)
> create mode 100644 arch/powerpc/include/asm/fsl_ifc.h
> create mode 100644 arch/powerpc/sysdev/fsl_ifc.c
 
 Guys,
 
 How are we handling this patchset since it touches drivers/mtd/nand?
>> 
>> I do not see it touching MTD from the diffstat above. I am a little bit
>> confused why a flash controller is added to
>> arch/powerpc/sysdev/fsl_ifc.c ?
> 
> It's really a bus controller, with NOR, NAND, and general-purpose modes
> settable per chipselect.  The actual NAND driver goes in
> drivers/mtd/nand, and is apparently in a separate patch (probably due to
> separate maintenance domains).
> 
> It's the same situation as arch/powerpc/sysdev/fsl_lbc.c versus
> drivers/mtd/nand/fsl_elbc_nand.c and drivers/mtd/nand/fsl_upm.c.
> 
> -Scott

As Scott said, I was more asking about the 2nd patch in the sequence which did 
touch MTD.  Since that one is dependent on this patch, wondering how we wanted 
to handle them.

- k

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v2] Integrated Flash Controller support

2011-11-30 Thread Artem Bityutskiy
On Tue, 2011-11-29 at 19:47 -0600, Kumar Gala wrote:
> As Scott said, I was more asking about the 2nd patch in the sequence
> which did touch MTD.  Since that one is dependent on this patch,
> wondering how we wanted to handle them.

I do not have time to review it, but it looks OK, so I'd suggest to
merge it vie the same tree as the rest of the patches.

-- 
Best Regards,
Artem Bityutskiy


signature.asc
Description: This is a digitally signed message part
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

RE: [PATCH v2] Integrated Flash Controller support

2011-12-14 Thread Li Yang-R58472
>-Original Message-
>From: Artem Bityutskiy [mailto:dedeki...@gmail.com]
>Sent: Wednesday, November 30, 2011 4:51 PM
>To: Kumar Gala
>Cc: Wood Scott-B07421; Li Yang-R58472; Liu Shuo-B35362; linux-
>ker...@vger.kernel.org Kernel; linux-...@lists.infradead.org; Andrew
>Morton; David Woodhouse; linuxppc-dev@lists.ozlabs.org list
>Subject: Re: [PATCH v2] Integrated Flash Controller support
>
>On Tue, 2011-11-29 at 19:47 -0600, Kumar Gala wrote:
>> As Scott said, I was more asking about the 2nd patch in the sequence
>> which did touch MTD.  Since that one is dependent on this patch,
>> wondering how we wanted to handle them.
>
>I do not have time to review it, but it looks OK, so I'd suggest to
>merge it vie the same tree as the rest of the patches.

Hi Artem,

So what is your suggestion on this patch?  Can we regard your previous email as 
an ACK and merge it through the powerpc tree?  Or do you prefer to merge them 
through the MTD tree with Kumar's ACK instead?

- Leo
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


RE: [PATCH v2] Integrated Flash Controller support

2011-12-17 Thread Artem Bityutskiy
On Wed, 2011-12-14 at 11:13 +, Li Yang-R58472 wrote:
> >-Original Message-
> >From: Artem Bityutskiy [mailto:dedeki...@gmail.com]
> >Sent: Wednesday, November 30, 2011 4:51 PM
> >To: Kumar Gala
> >Cc: Wood Scott-B07421; Li Yang-R58472; Liu Shuo-B35362; linux-
> >ker...@vger.kernel.org Kernel; linux-...@lists.infradead.org; Andrew
> >Morton; David Woodhouse; linuxppc-dev@lists.ozlabs.org list
> >Subject: Re: [PATCH v2] Integrated Flash Controller support
> >
> >On Tue, 2011-11-29 at 19:47 -0600, Kumar Gala wrote:
> >> As Scott said, I was more asking about the 2nd patch in the
> sequence
> >> which did touch MTD.  Since that one is dependent on this patch,
> >> wondering how we wanted to handle them.
> >
> >I do not have time to review it, but it looks OK, so I'd suggest to
> >merge it vie the same tree as the rest of the patches.
> 
> Hi Artem,
> 
> So what is your suggestion on this patch?  Can we regard your previous
> email as an ACK and merge it through the powerpc tree?  Or do you
> prefer to merge them through the MTD tree with Kumar's ACK instead?

I am fine if it is merged via PPC tree. I do not have bandwith to look
at it closely, so I cannot ack it, although I also do not have reasons
to nack it :-)

-- 
Best Regards,
Artem Bityutskiy


signature.asc
Description: This is a digitally signed message part
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev