* [PATCH v3] [NAND] driver extension to support NAND on TQM85xx modules
@ 2008-06-09 8:19 Wolfgang Grandegger
2008-07-02 8:18 ` Wolfgang Grandegger
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Grandegger @ 2008-06-09 8:19 UTC (permalink / raw)
To: Linuxppc-dev; +Cc: linux-mtd
This patch extends the FSL UPM NAND driver from Anton Vorontsov to
support hardware which does not have the R/B pin of the NAND chip
connected, like the TQM8548 module:
- The OF_GPIO dependency has been removed from the Kconfig option
because GPIO is not needed. The relevant gpio_* function are then
stubbed out in <linux/gpio.h>.
- It re-introduces the chip-delay property to define an appropriate
maximum delay time (tR) required for read operations. The binding
will be documented in a separate patch.
Note: this patch is based on a patch from Anton Vorontsov aöready
posted to this list:
http://ozlabs.org/pipermail/linuxppc-dev/2008-April/055587.html.
http://ozlabs.org/pipermail/linuxppc-dev/2008-May/057158.html
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
---
drivers/mtd/nand/Kconfig | 2 +-
drivers/mtd/nand/fsl_upm.c | 17 +++++++++++++----
2 files changed, 14 insertions(+), 5 deletions(-)
Index: linux-2.6-galak/drivers/mtd/nand/Kconfig
===================================================================
--- linux-2.6-galak.orig/drivers/mtd/nand/Kconfig
+++ linux-2.6-galak/drivers/mtd/nand/Kconfig
@@ -380,7 +380,7 @@ config MTD_NAND_FSL_ELBC
config MTD_NAND_FSL_UPM
tristate "Support for NAND on Freescale UPM"
- depends on MTD_NAND && OF_GPIO && (PPC_83xx || PPC_85xx)
+ depends on MTD_NAND && (PPC_83xx || PPC_85xx)
select FSL_LBC
help
Enables support for NAND Flash chips wired onto Freescale PowerPC
Index: linux-2.6-galak/drivers/mtd/nand/fsl_upm.c
===================================================================
--- linux-2.6-galak.orig/drivers/mtd/nand/fsl_upm.c
+++ linux-2.6-galak/drivers/mtd/nand/fsl_upm.c
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/delay.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/nand_ecc.h>
#include <linux/mtd/partitions.h>
@@ -36,6 +37,7 @@ struct fsl_upm_nand {
uint8_t upm_cmd_offset;
void __iomem *io_base;
int rnb_gpio;
+ int chip_delay;
};
#define to_fsl_upm_nand(mtd) container_of(mtd, struct fsl_upm_nand, mtd)
@@ -58,10 +60,11 @@ static void fun_wait_rnb(struct fsl_upm_
if (fun->rnb_gpio >= 0) {
while (--cnt && !fun_chip_ready(&fun->mtd))
cpu_relax();
+ if (!cnt)
+ dev_err(fun->dev, "tired waiting for RNB\n");
+ } else {
+ ndelay(100);
}
-
- if (!cnt)
- dev_err(fun->dev, "tired waiting for RNB\n");
}
static void fun_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
@@ -129,7 +132,7 @@ static int __devinit fun_chip_init(struc
fun->chip.IO_ADDR_R = fun->io_base;
fun->chip.IO_ADDR_W = fun->io_base;
fun->chip.cmd_ctrl = fun_cmd_ctrl;
- fun->chip.chip_delay = 50;
+ fun->chip.chip_delay = fun->chip_delay;
fun->chip.read_byte = fun_read_byte;
fun->chip.read_buf = fun_read_buf;
fun->chip.write_buf = fun_write_buf;
@@ -233,6 +236,12 @@ static int __devinit fun_probe(struct of
goto err2;
}
+ prop = of_get_property(ofdev->node, "chip-delay", NULL);
+ if (prop)
+ fun->chip_delay = *prop;
+ else
+ fun->chip_delay = 50;
+
fun->io_base = devm_ioremap_nocache(&ofdev->dev, io_res.start,
io_res.end - io_res.start + 1);
if (!fun->io_base) {
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] [NAND] driver extension to support NAND on TQM85xx modules
2008-06-09 8:19 [PATCH v3] [NAND] driver extension to support NAND on TQM85xx modules Wolfgang Grandegger
@ 2008-07-02 8:18 ` Wolfgang Grandegger
2008-10-09 19:42 ` Wolfgang Grandegger
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Grandegger @ 2008-07-02 8:18 UTC (permalink / raw)
To: Linuxppc-dev; +Cc: David Woodhouse, linux-mtd
Hello,
I would like to ask for the status of the patch below and the related
ones. Any chance to get them in for 2.6.27.
TIA,
Wolfgang.
Wolfgang Grandegger wrote:
> This patch extends the FSL UPM NAND driver from Anton Vorontsov to
> support hardware which does not have the R/B pin of the NAND chip
> connected, like the TQM8548 module:
>
> - The OF_GPIO dependency has been removed from the Kconfig option
> because GPIO is not needed. The relevant gpio_* function are then
> stubbed out in <linux/gpio.h>.
>
> - It re-introduces the chip-delay property to define an appropriate
> maximum delay time (tR) required for read operations. The binding
> will be documented in a separate patch.
>
> Note: this patch is based on a patch from Anton Vorontsov aöready
> posted to this list:
>
> http://ozlabs.org/pipermail/linuxppc-dev/2008-April/055587.html.
> http://ozlabs.org/pipermail/linuxppc-dev/2008-May/057158.html
>
> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
> ---
> drivers/mtd/nand/Kconfig | 2 +-
> drivers/mtd/nand/fsl_upm.c | 17 +++++++++++++----
> 2 files changed, 14 insertions(+), 5 deletions(-)
>
> Index: linux-2.6-galak/drivers/mtd/nand/Kconfig
> ===================================================================
> --- linux-2.6-galak.orig/drivers/mtd/nand/Kconfig
> +++ linux-2.6-galak/drivers/mtd/nand/Kconfig
> @@ -380,7 +380,7 @@ config MTD_NAND_FSL_ELBC
>
> config MTD_NAND_FSL_UPM
> tristate "Support for NAND on Freescale UPM"
> - depends on MTD_NAND && OF_GPIO && (PPC_83xx || PPC_85xx)
> + depends on MTD_NAND && (PPC_83xx || PPC_85xx)
> select FSL_LBC
> help
> Enables support for NAND Flash chips wired onto Freescale PowerPC
> Index: linux-2.6-galak/drivers/mtd/nand/fsl_upm.c
> ===================================================================
> --- linux-2.6-galak.orig/drivers/mtd/nand/fsl_upm.c
> +++ linux-2.6-galak/drivers/mtd/nand/fsl_upm.c
> @@ -13,6 +13,7 @@
>
> #include <linux/kernel.h>
> #include <linux/module.h>
> +#include <linux/delay.h>
> #include <linux/mtd/nand.h>
> #include <linux/mtd/nand_ecc.h>
> #include <linux/mtd/partitions.h>
> @@ -36,6 +37,7 @@ struct fsl_upm_nand {
> uint8_t upm_cmd_offset;
> void __iomem *io_base;
> int rnb_gpio;
> + int chip_delay;
> };
>
> #define to_fsl_upm_nand(mtd) container_of(mtd, struct fsl_upm_nand, mtd)
> @@ -58,10 +60,11 @@ static void fun_wait_rnb(struct fsl_upm_
> if (fun->rnb_gpio >= 0) {
> while (--cnt && !fun_chip_ready(&fun->mtd))
> cpu_relax();
> + if (!cnt)
> + dev_err(fun->dev, "tired waiting for RNB\n");
> + } else {
> + ndelay(100);
> }
> -
> - if (!cnt)
> - dev_err(fun->dev, "tired waiting for RNB\n");
> }
>
> static void fun_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
> @@ -129,7 +132,7 @@ static int __devinit fun_chip_init(struc
> fun->chip.IO_ADDR_R = fun->io_base;
> fun->chip.IO_ADDR_W = fun->io_base;
> fun->chip.cmd_ctrl = fun_cmd_ctrl;
> - fun->chip.chip_delay = 50;
> + fun->chip.chip_delay = fun->chip_delay;
> fun->chip.read_byte = fun_read_byte;
> fun->chip.read_buf = fun_read_buf;
> fun->chip.write_buf = fun_write_buf;
> @@ -233,6 +236,12 @@ static int __devinit fun_probe(struct of
> goto err2;
> }
>
> + prop = of_get_property(ofdev->node, "chip-delay", NULL);
> + if (prop)
> + fun->chip_delay = *prop;
> + else
> + fun->chip_delay = 50;
> +
> fun->io_base = devm_ioremap_nocache(&ofdev->dev, io_res.start,
> io_res.end - io_res.start + 1);
> if (!fun->io_base) {
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] [NAND] driver extension to support NAND on TQM85xx modules
2008-07-02 8:18 ` Wolfgang Grandegger
@ 2008-10-09 19:42 ` Wolfgang Grandegger
2008-10-09 22:10 ` Anton Vorontsov
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Grandegger @ 2008-10-09 19:42 UTC (permalink / raw)
To: Linuxppc-dev; +Cc: David Woodhouse, linux-mtd
Wolfgang Grandegger wrote:
> Hello,
>
> I would like to ask for the status of the patch below and the related
> ones. Any chance to get them in for 2.6.27.
Already sometime ago I asked for the status of these patches but I never
got an answer and they did make it into 2.6.27, like the related patches
from Anton. That's really disappointing. What do I need to do to get
them finally accepted?
Thanks,
Wolfgang.
> Wolfgang Grandegger wrote:
>> This patch extends the FSL UPM NAND driver from Anton Vorontsov to
>> support hardware which does not have the R/B pin of the NAND chip
>> connected, like the TQM8548 module:
>>
>> - The OF_GPIO dependency has been removed from the Kconfig option
>> because GPIO is not needed. The relevant gpio_* function are then
>> stubbed out in <linux/gpio.h>.
>>
>> - It re-introduces the chip-delay property to define an appropriate
>> maximum delay time (tR) required for read operations. The binding
>> will be documented in a separate patch.
>>
>> Note: this patch is based on a patch from Anton Vorontsov aöready
>> posted to this list:
>>
>> http://ozlabs.org/pipermail/linuxppc-dev/2008-April/055587.html.
>> http://ozlabs.org/pipermail/linuxppc-dev/2008-May/057158.html
>>
>> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
>> ---
>> drivers/mtd/nand/Kconfig | 2 +-
>> drivers/mtd/nand/fsl_upm.c | 17 +++++++++++++----
>> 2 files changed, 14 insertions(+), 5 deletions(-)
>>
>> Index: linux-2.6-galak/drivers/mtd/nand/Kconfig
>> ===================================================================
>> --- linux-2.6-galak.orig/drivers/mtd/nand/Kconfig
>> +++ linux-2.6-galak/drivers/mtd/nand/Kconfig
>> @@ -380,7 +380,7 @@ config MTD_NAND_FSL_ELBC
>>
>> config MTD_NAND_FSL_UPM
>> tristate "Support for NAND on Freescale UPM"
>> - depends on MTD_NAND && OF_GPIO && (PPC_83xx || PPC_85xx)
>> + depends on MTD_NAND && (PPC_83xx || PPC_85xx)
>> select FSL_LBC
>> help
>> Enables support for NAND Flash chips wired onto Freescale PowerPC
>> Index: linux-2.6-galak/drivers/mtd/nand/fsl_upm.c
>> ===================================================================
>> --- linux-2.6-galak.orig/drivers/mtd/nand/fsl_upm.c
>> +++ linux-2.6-galak/drivers/mtd/nand/fsl_upm.c
>> @@ -13,6 +13,7 @@
>>
>> #include <linux/kernel.h>
>> #include <linux/module.h>
>> +#include <linux/delay.h>
>> #include <linux/mtd/nand.h>
>> #include <linux/mtd/nand_ecc.h>
>> #include <linux/mtd/partitions.h>
>> @@ -36,6 +37,7 @@ struct fsl_upm_nand {
>> uint8_t upm_cmd_offset;
>> void __iomem *io_base;
>> int rnb_gpio;
>> + int chip_delay;
>> };
>>
>> #define to_fsl_upm_nand(mtd) container_of(mtd, struct fsl_upm_nand, mtd)
>> @@ -58,10 +60,11 @@ static void fun_wait_rnb(struct fsl_upm_
>> if (fun->rnb_gpio >= 0) {
>> while (--cnt && !fun_chip_ready(&fun->mtd))
>> cpu_relax();
>> + if (!cnt)
>> + dev_err(fun->dev, "tired waiting for RNB\n");
>> + } else {
>> + ndelay(100);
>> }
>> -
>> - if (!cnt)
>> - dev_err(fun->dev, "tired waiting for RNB\n");
>> }
>>
>> static void fun_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int
>> ctrl)
>> @@ -129,7 +132,7 @@ static int __devinit fun_chip_init(struc
>> fun->chip.IO_ADDR_R = fun->io_base;
>> fun->chip.IO_ADDR_W = fun->io_base;
>> fun->chip.cmd_ctrl = fun_cmd_ctrl;
>> - fun->chip.chip_delay = 50;
>> + fun->chip.chip_delay = fun->chip_delay;
>> fun->chip.read_byte = fun_read_byte;
>> fun->chip.read_buf = fun_read_buf;
>> fun->chip.write_buf = fun_write_buf;
>> @@ -233,6 +236,12 @@ static int __devinit fun_probe(struct of
>> goto err2;
>> }
>>
>> + prop = of_get_property(ofdev->node, "chip-delay", NULL);
>> + if (prop)
>> + fun->chip_delay = *prop;
>> + else
>> + fun->chip_delay = 50;
>> +
>> fun->io_base = devm_ioremap_nocache(&ofdev->dev, io_res.start,
>> io_res.end - io_res.start + 1);
>> if (!fun->io_base) {
>> _______________________________________________
>> Linuxppc-dev mailing list
>> Linuxppc-dev@ozlabs.org
>> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>>
>>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] [NAND] driver extension to support NAND on TQM85xx modules
2008-10-09 19:42 ` Wolfgang Grandegger
@ 2008-10-09 22:10 ` Anton Vorontsov
2008-10-10 6:29 ` David Woodhouse
0 siblings, 1 reply; 5+ messages in thread
From: Anton Vorontsov @ 2008-10-09 22:10 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: Linuxppc-dev, linux-mtd, David Woodhouse
On Thu, Oct 09, 2008 at 09:42:38PM +0200, Wolfgang Grandegger wrote:
> Wolfgang Grandegger wrote:
> > Hello,
> >
> > I would like to ask for the status of the patch below and the related
> > ones. Any chance to get them in for 2.6.27.
>
> Already sometime ago I asked for the status of these patches but I never
> got an answer and they did make it into 2.6.27, like the related patches
> from Anton. That's really disappointing. What do I need to do to get
> them finally accepted?
You should keep resending the patches till somebody merge them. ;-)
As for my patches... David, could you please apply that patch:
http://lists.infradead.org/pipermail/linux-mtd/2008-September/023038.html
?
IIRC Wolfgang's patches depend on it.
Thanks,
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] [NAND] driver extension to support NAND on TQM85xx modules
2008-10-09 22:10 ` Anton Vorontsov
@ 2008-10-10 6:29 ` David Woodhouse
0 siblings, 0 replies; 5+ messages in thread
From: David Woodhouse @ 2008-10-10 6:29 UTC (permalink / raw)
To: avorontsov; +Cc: Linuxppc-dev, linux-mtd
On Fri, 2008-10-10 at 02:10 +0400, Anton Vorontsov wrote:
> You should keep resending the patches till somebody merge them. ;-)
>
> As for my patches... David, could you please apply that patch:
> http://lists.infradead.org/pipermail/linux-mtd/2008-September/023038.html
Applied, along with $SUBJECT.
--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-10-10 6:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-09 8:19 [PATCH v3] [NAND] driver extension to support NAND on TQM85xx modules Wolfgang Grandegger
2008-07-02 8:18 ` Wolfgang Grandegger
2008-10-09 19:42 ` Wolfgang Grandegger
2008-10-09 22:10 ` Anton Vorontsov
2008-10-10 6:29 ` David Woodhouse
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).