* [U-Boot] [PATCH] mtd: nand: lpc32xx mlc: predefine number of NAND chips to support
@ 2018-10-19 0:21 Vladimir Zapolskiy
2018-10-29 9:29 ` Miquel Raynal
2018-11-17 13:32 ` [U-Boot] " Tom Rini
0 siblings, 2 replies; 4+ messages in thread
From: Vladimir Zapolskiy @ 2018-10-19 0:21 UTC (permalink / raw)
To: u-boot
Build option CONFIG_SYS_MAX_NAND_CHIPS is used by NXP LPC32xx NAND MLC
driver only, as a preparation for potential removal or replacement of
the option the change predefines CONFIG_SYS_MAX_NAND_CHIPS to 1, same
value is used by the single user Work Microwave Work 92105 board, thus
it will be safe now to remove the option as a board specific one.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
---
drivers/mtd/nand/raw/lpc32xx_nand_mlc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c b/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
index 5d4ffea608d9..79d1489dc72c 100644
--- a/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
+++ b/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
@@ -82,6 +82,10 @@ struct lpc32xx_nand_mlc_registers {
static struct lpc32xx_nand_mlc_registers __iomem *lpc32xx_nand_mlc_registers
= (struct lpc32xx_nand_mlc_registers __iomem *)MLC_NAND_BASE;
+#if !defined(CONFIG_SYS_MAX_NAND_CHIPS)
+#define CONFIG_SYS_MAX_NAND_CHIPS 1
+#endif
+
#define clkdiv(v, w, o) (((1+(clk/v)) & w) << o)
/**
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] mtd: nand: lpc32xx mlc: predefine number of NAND chips to support
2018-10-19 0:21 [U-Boot] [PATCH] mtd: nand: lpc32xx mlc: predefine number of NAND chips to support Vladimir Zapolskiy
@ 2018-10-29 9:29 ` Miquel Raynal
2018-10-29 16:58 ` Vladimir Zapolskiy
2018-11-17 13:32 ` [U-Boot] " Tom Rini
1 sibling, 1 reply; 4+ messages in thread
From: Miquel Raynal @ 2018-10-29 9:29 UTC (permalink / raw)
To: u-boot
Hi Vladimir,
Vladimir Zapolskiy <vz@mleia.com> wrote on Fri, 19 Oct 2018 03:21:05
+0300:
> Build option CONFIG_SYS_MAX_NAND_CHIPS is used by NXP LPC32xx NAND MLC
> driver only, as a preparation for potential removal or replacement of
> the option the change predefines CONFIG_SYS_MAX_NAND_CHIPS to 1, same
> value is used by the single user Work Microwave Work 92105 board, thus
> it will be safe now to remove the option as a board specific one.
>
> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
> ---
> drivers/mtd/nand/raw/lpc32xx_nand_mlc.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c b/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
> index 5d4ffea608d9..79d1489dc72c 100644
> --- a/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
> +++ b/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
> @@ -82,6 +82,10 @@ struct lpc32xx_nand_mlc_registers {
> static struct lpc32xx_nand_mlc_registers __iomem *lpc32xx_nand_mlc_registers
> = (struct lpc32xx_nand_mlc_registers __iomem *)MLC_NAND_BASE;
>
> +#if !defined(CONFIG_SYS_MAX_NAND_CHIPS)
> +#define CONFIG_SYS_MAX_NAND_CHIPS 1
> +#endif
> +
> #define clkdiv(v, w, o) (((1+(clk/v)) & w) << o)
>
> /**
If it is safe now, can you also remote the CONFIG_ option now?
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] mtd: nand: lpc32xx mlc: predefine number of NAND chips to support
2018-10-29 9:29 ` Miquel Raynal
@ 2018-10-29 16:58 ` Vladimir Zapolskiy
0 siblings, 0 replies; 4+ messages in thread
From: Vladimir Zapolskiy @ 2018-10-29 16:58 UTC (permalink / raw)
To: u-boot
Hi Miquel,
On 10/29/2018 11:29 AM, Miquel Raynal wrote:
> Hi Vladimir,
>
> Vladimir Zapolskiy <vz@mleia.com> wrote on Fri, 19 Oct 2018 03:21:05
> +0300:
>
>> Build option CONFIG_SYS_MAX_NAND_CHIPS is used by NXP LPC32xx NAND MLC
>> driver only, as a preparation for potential removal or replacement of
>> the option the change predefines CONFIG_SYS_MAX_NAND_CHIPS to 1, same
>> value is used by the single user Work Microwave Work 92105 board, thus
>> it will be safe now to remove the option as a board specific one.
>>
>> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
>> ---
>> drivers/mtd/nand/raw/lpc32xx_nand_mlc.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c b/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
>> index 5d4ffea608d9..79d1489dc72c 100644
>> --- a/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
>> +++ b/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
>> @@ -82,6 +82,10 @@ struct lpc32xx_nand_mlc_registers {
>> static struct lpc32xx_nand_mlc_registers __iomem *lpc32xx_nand_mlc_registers
>> = (struct lpc32xx_nand_mlc_registers __iomem *)MLC_NAND_BASE;
>>
>> +#if !defined(CONFIG_SYS_MAX_NAND_CHIPS)
>> +#define CONFIG_SYS_MAX_NAND_CHIPS 1
>> +#endif
>> +
>> #define clkdiv(v, w, o) (((1+(clk/v)) & w) << o)
>>
>> /**
>
>
> If it is safe now, can you also remote the CONFIG_ option now?
At the moment I plan to remove the CONFIG_SYS_MAX_NAND_CHIPS option
from include/configs/work_92105.h as a side activity (concentrate all
LPC32xx raw NAND options in arch/arm/include/asm/arch-lpc32xx/config.h,
the change is in my queue), and regarding total removal of the option,
it shall be considered separately.
For instance you can find it is mentioned in doc/README.nand :
if (nand_scan_ident(mtd, CONFIG_SYS_MAX_NAND_CHIPS, NULL))
error out
and commonly it would be expected to provide it as an argument to
nand_scan_ident(), however it is easy to notice that none drivers
but LPC32xx NAND MLC does it. Also note that sometimes NAND *chips*
number is substituted by a number of NAND *controllers* on SoC...
Generally it sounds like a proper change should be a tree-wide one.
So, while I clearly understand the rationale, I would prefer to shift
the task to the MTD maintainers ;)
>
> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Thank you for review!
--
Best wishes,
Vladimir
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] mtd: nand: lpc32xx mlc: predefine number of NAND chips to support
2018-10-19 0:21 [U-Boot] [PATCH] mtd: nand: lpc32xx mlc: predefine number of NAND chips to support Vladimir Zapolskiy
2018-10-29 9:29 ` Miquel Raynal
@ 2018-11-17 13:32 ` Tom Rini
1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2018-11-17 13:32 UTC (permalink / raw)
To: u-boot
On Fri, Oct 19, 2018 at 03:21:05AM +0300, Vladimir Zapolskiy wrote:
> Build option CONFIG_SYS_MAX_NAND_CHIPS is used by NXP LPC32xx NAND MLC
> driver only, as a preparation for potential removal or replacement of
> the option the change predefines CONFIG_SYS_MAX_NAND_CHIPS to 1, same
> value is used by the single user Work Microwave Work 92105 board, thus
> it will be safe now to remove the option as a board specific one.
>
> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181117/a30ab668/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-17 13:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-19 0:21 [U-Boot] [PATCH] mtd: nand: lpc32xx mlc: predefine number of NAND chips to support Vladimir Zapolskiy
2018-10-29 9:29 ` Miquel Raynal
2018-10-29 16:58 ` Vladimir Zapolskiy
2018-11-17 13:32 ` [U-Boot] " Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.