arm: iproc: add NAND driver
Subsystems (4)
PATCH 1/4 arm: iproc: add NAND driver
From: Jiandong Zheng <[email protected]>
Add support for the iproc NAND, and enable on Cygnus and NSP boards.
---
There was a previous attempt to implement this "iproc NAND" (see: http://patchwork.ozlabs.org/patch/505399), however, due to the amount of changes required, it seemed better to implement the code in a series of steps. This is the first step, where the "iproc_nand.c" is essentially an empty file (with one function required to allow this commit to build successfully).
arch/arm/include/asm/arch-bcmcygnus/configs.h | 11 +++ arch/arm/include/asm/arch-bcmnsp/configs.h | 11 +++ drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/iproc_nand.c | 11 +++ drivers/mtd/nand/iproc_nand_cygnus.h | 111 +++++++++++++++++++++++++ drivers/mtd/nand/iproc_nand_ns_plus.h | 113 ++++++++++++++++++++++++++ 6 files changed, 258 insertions(+) create mode 100644 drivers/mtd/nand/iproc_nand.c create mode 100644 drivers/mtd/nand/iproc_nand_cygnus.h create mode 100644 drivers/mtd/nand/iproc_nand_ns_plus.h
arch/arm/include/asm/arch-bcmcygnus/configs.h +11 -0
@@ -10,6 +10,7 @@#include <asm/iproc-common/configs.h> /* uArchitecture specifics */ +#include <../../../drivers/mtd/nand/iproc_nand_cygnus.h> /* Serial Info */ /* Post pad 3 bytes after each reg addr */
@@ -33,4 +34,14 @@#define CONFIG_CMD_PING #define CONFIG_CMD_MII +/* NAND configuration */ +#define CONFIG_CMD_NAND +#define CONFIG_NAND_IPROC +#define CONFIG_SYS_NAND_IPROC_TIMING_MODE 5 +#define CONFIG_SYS_NAND_BASE 0 +#define CONFIG_SYS_MAX_NAND_DEVICE 1 +#define CONFIG_SYS_MAX_NAND_CHIPS 1 +#define CONFIG_SYS_NAND_SELF_INIT +#define CONFIG_SYS_NAND_ONFI_DETECTION +#endif /* __ARCH_CONFIGS_H */
arch/arm/include/asm/arch-bcmnsp/configs.h +11 -0
@@ -10,6 +10,7 @@#include <asm/iproc-common/configs.h> /* uArchitecture specifics */ +#include <../../../drivers/mtd/nand/iproc_nand_ns_plus.h> /* Serial Info */ /* no padding */
@@ -19,4 +20,14 @@#define CONFIG_CONS_INDEX 1#define CONFIG_SYS_NS16550_COM1 0x18000300 +/* NAND configuration */ +#define CONFIG_CMD_NAND +#define CONFIG_NAND_IPROC +#define CONFIG_SYS_NAND_IPROC_TIMING_MODE 5 +#define CONFIG_SYS_NAND_BASE 0 +#define CONFIG_SYS_MAX_NAND_DEVICE 1 +#define CONFIG_SYS_MAX_NAND_CHIPS 1 +#define CONFIG_SYS_NAND_SELF_INIT +#define CONFIG_SYS_NAND_ONFI_DETECTION +#endif /* __ARCH_CONFIGS_H */
drivers/mtd/nand/Makefile +1 -0
@@ -50,6 +50,7 @@ obj-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o obj-$(CONFIG_NAND_FSL_IFC) += fsl_ifc_nand.o obj-$(CONFIG_NAND_FSL_UPM) += fsl_upm.o obj-$(CONFIG_NAND_FSMC) += fsmc_nand.o +obj-$(CONFIG_NAND_IPROC) += iproc_nand.o obj-$(CONFIG_NAND_JZ4740) += jz4740_nand.o obj-$(CONFIG_NAND_KB9202) += kb9202_nand.o obj-$(CONFIG_NAND_KIRKWOOD) += kirkwood_nand.o
drivers/mtd/nand/iproc_nand.c new file +11 -0
@@ -0,0 +1,11 @@ +/* +* Copyright 2015 Broadcom Corporation. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> + +void board_nand_init (void ) +{ +}
drivers/mtd/nand/iproc_nand_cygnus.h new file +111 -0
111 lines not on this page · raw message
drivers/mtd/nand/iproc_nand_ns_plus.h new file +113 -0
113 lines not on this page · raw message
Signature · 1 line
1.8.5
PATCH 2/4 mtd: fix compiler warnings
- add missing declaration
- update debug output format specifiers
---
the checkpatch warning:
warning: cmd/mtdparts.c,1494: quoted string split across lines
is for the existing code; it is not introduced with this change...
cmd/mtdparts.c | 4 ++-- include/linux/mtd/mtd.h | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-)
cmd/mtdparts.c +2 -2
@@ -1491,7 +1491,7 @@ static int spread_partitions(void) part = list_entry(pentry, struct part_info, link);debug ("spread_partitions: device = %s%d, partition %d =" -" (%s) 0x%08x at 0x%08x\n" , +" (%s) 0x%08llx at 0x%08llx\n" ,MTD_DEV_TYPE (dev->id->type), dev->id->num, part_num, part->name, part->size, part->offset);
@@ -2009,7 +2009,7 @@ static int do_mtdparts(cmd_tbl_t *cmdtp, int flag, int argc,if (!strcmp (&argv[1 ][3 ],".spread" )) {spread_partition (mtd, p, &next_offset); -debug ("increased %s to %d bytes\n" , p->name, p->size); +debug ("increased %s to %llu bytes\n" , p->name, p->size); }#endif
include/linux/mtd/mtd.h +8 -0
@@ -495,5 +495,13 @@ int mtd_arg_off(const char *arg, int *idx, loff_t *off, loff_t *size,int mtd_arg_off_size (int argc,char *const argv[],int *idx,loff_t *off,loff_t *size,loff_t *maxsize,int devtype,uint64_t chipsize); + +#ifdef CONFIG_CMD_MTDPARTS_SPREAD +/* drivers/mtd/mtdcore.c */ +void mtd_get_len_incl_bad (struct mtd_info *mtd,uint64_t offset, +const uint64_t length,uint64_t *len_incl_bad, +int *truncated); +#endif /* CONFIG_CMD_MTDPARTS_SPREAD */ +#endif #endif /* __MTD_MTD_H__ */
Signature · 1 line
1.8.5
PATCH 3/4 arm: bcm: enable MTD support
In reply to Steve RaeEnable MTD support on Cygnus and NSP boards.
---
arch/arm/include/asm/arch-bcmcygnus/configs.h | 6 ++++++ arch/arm/include/asm/arch-bcmnsp/configs.h | 6 ++++++ 2 files changed, 12 insertions(+)
arch/arm/include/asm/arch-bcmcygnus/configs.h +6 -0
@@ -44,4 +44,10 @@#define CONFIG_SYS_NAND_SELF_INIT #define CONFIG_SYS_NAND_ONFI_DETECTION +/* MTD configuration */ +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#define CONFIG_CMD_MTDPARTS_SPREAD +#endif /* __ARCH_CONFIGS_H */
arch/arm/include/asm/arch-bcmnsp/configs.h +6 -0
@@ -30,4 +30,10 @@#define CONFIG_SYS_NAND_SELF_INIT #define CONFIG_SYS_NAND_ONFI_DETECTION +/* MTD configuration */ +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#define CONFIG_CMD_MTDPARTS_SPREAD +#endif /* __ARCH_CONFIGS_H */
Signature · 1 line
1.8.5
PATCH 4/4 arm: bcm: configure NAND device and environment
In reply to Steve RaeConfigure the NAND device, define partition sizes, and create the environment space for Cygnus and NSP boards.
---
arch/arm/include/asm/arch-bcmcygnus/configs.h | 33 +++++++++++++++++++++++++++ arch/arm/include/asm/arch-bcmnsp/configs.h | 33 +++++++++++++++++++++++++++ include/configs/bcm_ep_board.h | 3 --- 3 files changed, 66 insertions(+), 3 deletions(-)
arch/arm/include/asm/arch-bcmcygnus/configs.h +33 -0
@@ -44,6 +44,39 @@#define CONFIG_SYS_NAND_SELF_INIT #define CONFIG_SYS_NAND_ONFI_DETECTION +/* Configuration for Micron MT29F8G08ABACA */ +#define CONFIG_NAND_CHIPSIZE (1 << 30)/* 1GB */ +#define CONFIG_NAND_BLOCKSIZE (1 << 18)/* 256KB */ +#define CONFIG_NAND_PAGE_SHIFT 12/* 4KiB */ +#define CONFIG_NAND_BLOCK_SHIFT 18/* 256 KiB */ + +/* Configure the Environment and the u-boot-env partition */ +#define MTD_PART_BOOT1_SIZE 0x00200000 +#define MTD_PART_GPT_SIZE 0x00100000 +#define MTD_PART_SSB_SIZE 0x00200000 +#define MTD_PART_UBOOT_SIZE 0x00200000 +#define MTD_PART_UBOOT_ENV_SIZE 0x00200000 +#define MTD_PART_DTB_SIZE 0x00100000 +#define MTD_PART_KERNEL_SIZE 0x01000000 +#define MTD_PART_ROOT_SIZE 0x1c000000 +/* +* WARNING: When changing the order of the partitions, make sure you update +* CONFIG_ENV_OFFSET accordingly. +*/ +#define CONFIG_ENV_IS_IN_NAND +#define CONFIG_ENV_SIZE 0x2000 +#define CONFIG_ENV_RANGE (2 * CONFIG_NAND_BLOCKSIZE) +#define CONFIG_ENV_OFFSET (MTD_PART_BOOT1_SIZE + MTD_PART_GPT_SIZE + \ + MTD_PART_SSB_SIZE + MTD_PART_UBOOT_SIZE) +#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE) +/* +* Check that the u-boot-env partition is big enough to accomodate the +* u-boot environment data and its redundant copy +*/ +#if ((2 *CONFIG_ENV_RANGE ) >MTD_PART_UBOOT_ENV_SIZE ) +#error u-boot-env partition size is to small +#endif +/* MTD configuration */ #define CONFIG_MTD_DEVICE #define CONFIG_MTD_PARTITIONS
arch/arm/include/asm/arch-bcmnsp/configs.h +33 -0
@@ -30,6 +30,39 @@#define CONFIG_SYS_NAND_SELF_INIT #define CONFIG_SYS_NAND_ONFI_DETECTION +/* Configuration for Micron MT29F8G08ABACA */ +#define CONFIG_NAND_CHIPSIZE (1 << 30)/* 1GB */ +#define CONFIG_NAND_BLOCKSIZE (1 << 18)/* 256KB */ +#define CONFIG_NAND_PAGE_SHIFT 12/* 4KiB */ +#define CONFIG_NAND_BLOCK_SHIFT 18/* 256 KiB */ + +/* Configure the Environment and the u-boot-env partition */ +#define MTD_PART_BOOT1_SIZE 0x00200000 +#define MTD_PART_GPT_SIZE 0x00100000 +#define MTD_PART_SSB_SIZE 0x00200000 +#define MTD_PART_UBOOT_SIZE 0x00200000 +#define MTD_PART_UBOOT_ENV_SIZE 0x00200000 +#define MTD_PART_DTB_SIZE 0x00100000 +#define MTD_PART_KERNEL_SIZE 0x01000000 +#define MTD_PART_ROOT_SIZE 0x0c000000 +/* +* WARNING: When changing the order of the partitions, make sure you update +* CONFIG_ENV_OFFSET accordingly. +*/ +#define CONFIG_ENV_IS_IN_NAND +#define CONFIG_ENV_SIZE 0x2000 +#define CONFIG_ENV_RANGE (2 * CONFIG_NAND_BLOCKSIZE) +#define CONFIG_ENV_OFFSET (MTD_PART_BOOT1_SIZE + MTD_PART_GPT_SIZE + \ + MTD_PART_SSB_SIZE + MTD_PART_UBOOT_SIZE) +#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE) +/* +* Check that the u-boot-env partition is big enough to accomodate the +* u-boot environment data and its redundant copy +*/ +#if ((2 *CONFIG_ENV_RANGE ) >MTD_PART_UBOOT_ENV_SIZE ) +#error u-boot-env partition size is to small +#endif +/* MTD configuration */ #define CONFIG_MTD_DEVICE #define CONFIG_MTD_PARTITIONS
include/configs/bcm_ep_board.h +0 -3
@@ -50,9 +50,6 @@#define CONFIG_BAUDRATE 115200 -#define CONFIG_ENV_SIZE 0x2000 -#define CONFIG_ENV_IS_NOWHERE -#define CONFIG_SYS_NO_FLASH /* Not using NAND/NOR unmanaged flash */ /* console configuration */
Signature · 1 line
1.8.5
PATCH 1/4 arm: iproc: add NAND driver
In reply to Steve RaeQuoted 14 lines · Steve Rae
From: Jiandong Zheng <[email protected]>
Add support for the iproc NAND, and enable on Cygnus and NSP boards.
Signed-off-by Jiandong Zheng <[email protected]>Signed-off-by Steve Rae <[email protected]>---
There was a previous attempt to implement this "iproc NAND" (see: http://patchwork.ozlabs.org/patch/505399), however, due to the amount of changes required, it seemed better to implement the code in a series of steps. This is the first step, where the "iproc_nand.c" is essentially an empty file (with one function required to allow this commit to build successfully).
Quoted 7 lines
arch/arm/include/asm/arch-bcmcygnus/configs.h | 11 +++ arch/arm/include/asm/arch-bcmnsp/configs.h | 11 +++ drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/iproc_nand.c | 11 +++ drivers/mtd/nand/iproc_nand_cygnus.h | 111 +++++++++++++++++++++++++ drivers/mtd/nand/iproc_nand_ns_plus.h | 113 ++++++++++++++++++++++++++ 6 files changed, 258 insertions(+)
We need to be adding Kconfig entries here at a minimum.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160311/873b2ee9/attachment.sig>
PATCH 1/4 arm: iproc: add NAND driver
Is it expected the _every_ CONFIG_* and CONFIG_SYS_* will be moved to Kconfig? What about #defines that will absolutely never used by anyone else? for example, I (may) have a code fragment that distinguishes between "CONFIG_CYGNUS" and "CONFIG_NSPLUS"...
Would these need to be Kconfig? or would that just clutter Kconfig with useless entries?
Thanks for clarifying!
Quoted 28 lines · Tom Rini
Quoted 14 lines · Steve Rae
From: Jiandong Zheng <[email protected]>
Add support for the iproc NAND, and enable on Cygnus and NSP boards.
Signed-off-by Jiandong Zheng <[email protected]>Signed-off-by Steve Rae <[email protected]>---
There was a previous attempt to implement this "iproc NAND" (see: http://patchwork.ozlabs.org/patch/505399), however, due to the amount of changes required, it seemed better to implement the code in a series of steps. This is the first step, where the "iproc_nand.c" is essentially an empty file (with one function required to allow this commit to build successfully).Quoted 7 lines
arch/arm/include/asm/arch-bcmcygnus/configs.h | 11 +++ arch/arm/include/asm/arch-bcmnsp/configs.h | 11 +++ drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/iproc_nand.c | 11 +++ drivers/mtd/nand/iproc_nand_cygnus.h | 111 +++++++++++++++++++++++++ drivers/mtd/nand/iproc_nand_ns_plus.h | 113 ++++++++++++++++++++++++++ 6 files changed, 258 insertions(+)We need to be adding
Kconfigentries here at a minimum.--
Tom
PATCH 1/4 arm: iproc: add NAND driver
Quoted 6 lines · Steve Rae
Is it expected the _every_ CONFIG_* and CONFIG_SYS_* will be moved to
Kconfig? What about #defines that will absolutely never used by anyone else? for example, I (may) have a code fragment that distinguishes between "CONFIG_CYGNUS" and "CONFIG_NSPLUS"...
Would these need to beKconfig? or would that just clutterKconfigwith useless entries?
Well, at some point yes, pretty much everything will be in Kconfig, like the Linux Kernel does. I suppose one way to think of it is that if it's not something that should be configured but is rather a property of the device, it doesn't belong as CONFIG_ it should just be a define in the header. Take a look at the other NAND drivers which have been converted and be at least as converted as they are. More conversions are always appreciated but we have to keep at least a minimal level :) Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160311/e0ec50ee/attachment.sig>
PATCH 1/4 arm: iproc: add NAND driver
Thanks for this clarification...
Quoted 19 lines · Tom Rini
Quoted 6 lines · Steve Rae
Is it expected the _every_ CONFIG_* and CONFIG_SYS_* will be moved to
Kconfig? What about #defines that will absolutely never used by anyone else? for example, I (may) have a code fragment that distinguishes between "CONFIG_CYGNUS" and "CONFIG_NSPLUS"...
Would these need to beKconfig? or would that just clutterKconfigwith useless entries?Well, at some point yes, pretty much everything will be in
Kconfig, like the Linux Kernel does. I suppose one way to think of it is that if it's not something that should be configured but is rather a property of the device, it doesn't belong asCONFIG_it should just be a define in the header. Take a look at the other NAND drivers which have been converted and be at least as converted as they are. More conversions are always appreciated but we have to keep at least a minimal level :) Thanks!--
Tom
PATCH 1/4 arm: iproc: add NAND driver
In reply to Steve RaeQuoted 6 lines · Steve Rae
From: Jiandong Zheng <[email protected]>
Add support for the iproc NAND, and enable on Cygnus and NSP boards.
Signed-off-by Jiandong Zheng <[email protected]>Signed-off-by Steve Rae <[email protected]>
Quoted 7 lines
---
There was a previous attempt to implement this "iproc NAND" (see: http://patchwork.ozlabs.org/patch/505399), however, due to the amount of changes required, it seemed better to implement the code in a series of steps. This is the first step, where the "iproc_nand.c" is essentially an empty file (with one function required to allow this commit to build successfully).
I don't see the value of applying a such a do-nothing patch. It's fine to leave out unnecessary features, things that improve performance, etc. but to be applied a patchset should accomplish something useful and correct, not just be a staging area for future patches.
arch/arm/include/asm/arch-bcmcygnus/configs.h line 13
Quoted 10 lines
arch/arm/include/asm/arch-bcmcygnus/configs.h +1
-0@@ -10,6 +10,7 @@#include <asm/iproc-common/configs.h> /* uArchitecture specifics */ +#include <../../../drivers/mtd/nand/iproc_nand_cygnus.h>
No.
-Scott
A message that is not in the archive (sent off-list or not yet received): CAM7GXo=myANwdVRABqC2GcZa5visj=57hLp+SG9QSt7oDNSMLA@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/4 arm: iproc: add NAND driver
Quoted 30 lines · Scott Wood
Quoted 23 lines · Steve Rae
Quoted 15 lines · Scott Wood
Quoted 6 lines · Steve Rae
From: Jiandong Zheng <[email protected]>
Add support for the iproc NAND, and enable on Cygnus and NSP boards.
Signed-off-by Jiandong Zheng <[email protected]>Signed-off-by Steve Rae <[email protected]>Quoted 7 lines
---
There was a previous attempt to implement this "iproc NAND" (see: http://patchwork.ozlabs.org/patch/505399), however, due to the amount of changes required, it seemed better to implement the code in a series of steps. This is the first step, where the "iproc_nand.c" is essentially an empty file (with one function required to allow this commit to build successfully).Quoted 6 lines
I don't see the value of applying a such a do-nothing patch. It's fine to leave out unnecessary features, things that improve performance, etc. but to
be applied a patchset should accomplish something useful and correct, not just
be a staging area for future patches.Quoted 5 lines
I agree -- but with the previous attempt, there where so many things that went wrong, that I cannot comprehend what is needed.
So, I wanted to break it down into pieces, so that I could get clear responses to help me get it right.
right now, I understand that I need to move certain defines toKconfig....
Quoted 4 lines
Go through the previous comments and address (or respond to) them one by one, then submit again. If you want to break it into multiple patches, that's fine as long as the intermediate states are sane, but it should all be submitted at once as part of a patchset (again, except for unnecessary features).
OK - that was my plan (to address every previous comment)... I was hoping to get "incremental" comments to indicate that I was resolving them acceptably...
My plan was to increment v2, v3, vxxx until it was acceptable. Would this be OK?
Quoted 3 lines
Also, please keep discussion on the mailing list.
Sorry....
Quoted 17 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
arch/arm/include/asm/arch-bcmcygnus/configs.h +0
-0@@ -10,6 +10,7 @@#include <asm/iproc-common/configs.h> Quoted 6 lines
Quoted 4 lines
arch/arm/include/asm/arch-bcmcygnus/configs.h line 13
Quoted 2 lines
arch/arm/include/asm/arch-bcmcygnus/configs.h +1
-0/* uArchitecture specifics */ +#include <../../../drivers/mtd/nand/iproc_nand_cygnus.h> No.
this "include" line is unacceptable?
Quoted 7 lines
Using "../../.." to reach into a code directory's private headers is unacceptable, yes.
Quoted 1 line
could you propose something that would work?
If you want the info to be in the driver directory, use an ifdef there, based on a config symbol. This seems like the better approach.
Maybe I misinterpreted the comments related to:
+#if defined(CONFIG_CYGNUS)
+#include "iproc_nand_cygnus.h"
+#elif defined(CONFIG_NS_PLUS)
+#include "iproc_nand_ns_plus.h"
+#else
+#error "Unsupported configuration"
+#endif
Scott - I thought the you did not like this logic -- now I am thinking you didn't like the "CONFIG_*" names....
I'm guessing that the names should be:CONFIG_SYS_BCM_CYGNUSCONFIG_SYS_BCM_NSPLUS
and that they should be added to Kconfig?
Quoted 6 lines
If you want the info to come via the config header, move it to someplace the config header can properly include.
-Scott
PATCH 1/4 arm: iproc: add NAND driver
Quoted 45 lines · Steve Rae
Quoted 36 lines · Scott Wood
Quoted 28 lines · Steve Rae
Quoted 17 lines · Scott Wood
Quoted 6 lines · Steve Rae
From: Jiandong Zheng <[email protected]>
Add support for the iproc NAND, and enable on Cygnus and NSP boards.
Signed-off-by Jiandong Zheng <[email protected]>Signed-off-by Steve Rae <[email protected]>Quoted 9 lines
---
There was a previous attempt to implement this "iproc NAND" (see: http://patchwork.ozlabs.org/patch/505399), however, due to the amount of changes required, it seemed better to implement the code in a series of steps. This is the first step, where the "iproc_nand.c"
is essentially an empty file (with one function required to allow this
commit to build successfully).Quoted 9 lines
I don't see the value of applying a such a do-nothing patch. It's fine to
leave out unnecessary features, things that improve performance, etc. but
to
be applied a patchset should accomplish something useful and correct, not
just
be a staging area for future patches.Quoted 6 lines
I agree -- but with the previous attempt, there where so many things that went wrong, that I cannot comprehend what is needed. So, I wanted to break it down into pieces, so that I could get clear responses to help me get it right.
right now, I understand that I need to move certain defines toKconfig
....Quoted 7 lines
Go through the previous comments and address (or respond to) them one by one,
then submit again. If you want to break it into multiple patches, that's fine
as long as the intermediate states are sane, but it should all be submitted at
once as part of a patchset (again, except for unnecessary features).
Quoted 5 lines
OK - that was my plan (to address every previous comment)... I was hoping to get "incremental" comments to indicate that I was resolving them acceptably...
My plan was to increment v2, v3, vxxx until it was acceptable. Would this be OK?
It's OK if you mark them as [RFC PATCH] so it's clear that you don't mean them to be applied, only commented on -- and include a TODO list so we know what you plan to address before dropping the "RFC".
Or just include a code fragment when replying to feedback, with a comment like, "Is this what you're looking for?"
Quoted 34 lines
Quoted 15 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
arch/arm/include/asm/arch-bcmcygnus/configs.h +0
-0@@ -10,6 +10,7 @@#include <asm/iproc-common/configs.h> Quoted 6 lines
Quoted 4 lines
arch/arm/include/asm/arch-bcmcygnus/configs.h line 13
Quoted 2 lines
arch/arm/include/asm/arch-bcmcygnus/configs.h +1
-0/* uArchitecture specifics */ +#include <../../../drivers/mtd/nand/iproc_nand_cygnus.h> No.
this "include" line is unacceptable?
Quoted 8 lines
Using "../../.." to reach into a code directory's private headers is unacceptable, yes.
Quoted 1 line
could you propose something that would work?
If you want the info to be in the driver directory, use an ifdef there, based
on a config symbol. This seems like the better approach.Maybe I misinterpreted the comments related to:
(quoted diff) +7
-0+#if defined(CONFIG_CYGNUS) +#include "iproc_nand_cygnus.h" +#elif defined(CONFIG_NS_PLUS) +#include "iproc_nand_ns_plus.h" +#else +#error "Unsupported configuration" +#endif
Quoted 6 lines
Scott - I thought the you did not like this logic -- now I am thinking you didn't like the "CONFIG_*" names....
I'm guessing that the names should be:CONFIG_SYS_BCM_CYGNUSCONFIG_SYS_BCM_NSPLUS
and that they should be added toKconfig?
Correct.
-Scott
PATCH 1/4 arm: iproc: add NAND driver
Quoted 52 lines · Scott Wood
Quoted 45 lines · Steve Rae
Quoted 36 lines · Scott Wood
Quoted 28 lines · Steve Rae
Quoted 17 lines · Scott Wood
Quoted 6 lines · Steve Rae
From: Jiandong Zheng <[email protected]>
Add support for the iproc NAND, and enable on Cygnus and NSP boards.
Signed-off-by Jiandong Zheng <[email protected]>Signed-off-by Steve Rae <[email protected]>Quoted 9 lines
---
There was a previous attempt to implement this "iproc NAND" (see: http://patchwork.ozlabs.org/patch/505399), however, due to the amount of changes required, it seemed better to implement the code in a series of steps. This is the first step, where the "iproc_nand.c"
is essentially an empty file (with one function required to allow this
commit to build successfully).Quoted 9 lines
I don't see the value of applying a such a do-nothing patch. It's fine to
leave out unnecessary features, things that improve performance, etc. but
to
be applied a patchset should accomplish something useful and correct, not
just
be a staging area for future patches.Quoted 6 lines
I agree -- but with the previous attempt, there where so many things that went wrong, that I cannot comprehend what is needed. So, I wanted to break it down into pieces, so that I could get clear responses to help me get it right.
right now, I understand that I need to move certain defines toKconfig
....Quoted 7 lines
Go through the previous comments and address (or respond to) them one by one,
then submit again. If you want to break it into multiple patches, that's fine
as long as the intermediate states are sane, but it should all be submitted at
once as part of a patchset (again, except for unnecessary features).Quoted 5 lines
OK - that was my plan (to address every previous comment)... I was hoping to get "incremental" comments to indicate that I was resolving them acceptably...
My plan was to increment v2, v3, vxxx until it was acceptable. Would this be OK?
Quoted 7 lines
It's OK if you mark them as [RFC PATCH] so it's clear that you don't mean them to be applied, only commented on -- and include a TODO list so we know what you plan to address before dropping the "RFC".
Or just include a code fragment when replying to feedback, with a comment like, "Is this what you're looking for?"
I understand - I think I can proceed now -- THANKS!
Quoted 45 lines
Quoted 34 lines
Quoted 15 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
arch/arm/include/asm/arch-bcmcygnus/configs.h +0
-0@@ -10,6 +10,7 @@#include <asm/iproc-common/configs.h> Quoted 6 lines
Quoted 4 lines
arch/arm/include/asm/arch-bcmcygnus/configs.h line 13
Quoted 2 lines
arch/arm/include/asm/arch-bcmcygnus/configs.h +1
-0/* uArchitecture specifics */ +#include <../../../drivers/mtd/nand/iproc_nand_cygnus.h> No.
this "include" line is unacceptable?
Quoted 8 lines
Using "../../.." to reach into a code directory's private headers is unacceptable, yes.
Quoted 1 line
could you propose something that would work?
If you want the info to be in the driver directory, use an ifdef there, based
on a config symbol. This seems like the better approach.Maybe I misinterpreted the comments related to:
(quoted diff) +7
-0+#if defined(CONFIG_CYGNUS) +#include "iproc_nand_cygnus.h" +#elif defined(CONFIG_NS_PLUS) +#include "iproc_nand_ns_plus.h" +#else +#error "Unsupported configuration" +#endifQuoted 6 lines
Scott - I thought the you did not like this logic -- now I am thinking you didn't like the "CONFIG_*" names....
I'm guessing that the names should be:CONFIG_SYS_BCM_CYGNUSCONFIG_SYS_BCM_NSPLUS
and that they should be added toKconfig?Correct.
-Scott
PATCH 1/4 arm: iproc: add NAND driver
In reply to Scott WoodQuoted 102 lines · Scott Wood
Quoted 45 lines · Steve Rae
Quoted 36 lines · Scott Wood
Quoted 28 lines · Steve Rae
Quoted 17 lines · Scott Wood
Quoted 6 lines · Steve Rae
From: Jiandong Zheng <[email protected]>
Add support for the iproc NAND, and enable on Cygnus and NSP boards.
Signed-off-by Jiandong Zheng <[email protected]>Signed-off-by Steve Rae <[email protected]>Quoted 9 lines
---
There was a previous attempt to implement this "iproc NAND" (see: http://patchwork.ozlabs.org/patch/505399), however, due to the amount of changes required, it seemed better to implement the code in a series of steps. This is the first step, where the "iproc_nand.c"
is essentially an empty file (with one function required to allow this
commit to build successfully).Quoted 9 lines
I don't see the value of applying a such a do-nothing patch. It's fine to
leave out unnecessary features, things that improve performance, etc. but
to
be applied a patchset should accomplish something useful and correct, not
just
be a staging area for future patches.Quoted 6 lines
I agree -- but with the previous attempt, there where so many things that went wrong, that I cannot comprehend what is needed. So, I wanted to break it down into pieces, so that I could get clear responses to help me get it right.
right now, I understand that I need to move certain defines toKconfig
....Quoted 7 lines
Go through the previous comments and address (or respond to) them one by one,
then submit again. If you want to break it into multiple patches, that's fine
as long as the intermediate states are sane, but it should all be submitted at
once as part of a patchset (again, except for unnecessary features).Quoted 5 lines
OK - that was my plan (to address every previous comment)... I was hoping to get "incremental" comments to indicate that I was resolving them acceptably...
My plan was to increment v2, v3, vxxx until it was acceptable. Would this be OK?It's OK if you mark them as [RFC PATCH] so it's clear that you don't mean them to be applied, only commented on -- and include a TODO list so we know what you plan to address before dropping the "RFC".
Or just include a code fragment when replying to feedback, with a comment like, "Is this what you're looking for?"
Quoted 34 lines
Quoted 15 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
arch/arm/include/asm/arch-bcmcygnus/configs.h +0
-0@@ -10,6 +10,7 @@#include <asm/iproc-common/configs.h> Quoted 6 lines
Quoted 4 lines
arch/arm/include/asm/arch-bcmcygnus/configs.h line 13
Quoted 2 lines
arch/arm/include/asm/arch-bcmcygnus/configs.h +1
-0/* uArchitecture specifics */ +#include <../../../drivers/mtd/nand/iproc_nand_cygnus.h> No.
this "include" line is unacceptable?
Quoted 8 lines
Using "../../.." to reach into a code directory's private headers is unacceptable, yes.
Quoted 1 line
could you propose something that would work?
If you want the info to be in the driver directory, use an ifdef there, based
on a config symbol. This seems like the better approach.Maybe I misinterpreted the comments related to:
(quoted diff) +7
-0+#if defined(CONFIG_CYGNUS) +#include "iproc_nand_cygnus.h" +#elif defined(CONFIG_NS_PLUS) +#include "iproc_nand_ns_plus.h" +#else +#error "Unsupported configuration" +#endifQuoted 6 lines
Scott - I thought the you did not like this logic -- now I am thinking you didn't like the "CONFIG_*" names....
I'm guessing that the names should be:CONFIG_SYS_BCM_CYGNUSCONFIG_SYS_BCM_NSPLUS
and that they should be added toKconfig?Correct.
Quoted 1 line
-Scott
Hi Steve,
Where did this get to? I find myself in need of a NAND driver for a BCM58525 and this seems to be relevant.
PATCH 1/4 arm: iproc: add NAND driver
(trying newer address for Steve, sorry for the spam)
Quoted 103 lines · Scott Wood
Quoted 102 lines · Steve Rae
Quoted 45 lines · Scott Wood
Quoted 36 lines · Steve Rae
Quoted 28 lines · Scott Wood
Quoted 17 lines · Steve Rae
Quoted 6 lines
From: Jiandong Zheng <[email protected]>
Add support for the iproc NAND, and enable on Cygnus and NSP boards.
Signed-off-by Jiandong Zheng <[email protected]>Signed-off-by Steve Rae <[email protected]>Quoted 9 lines
---
There was a previous attempt to implement this "iproc NAND" (see: http://patchwork.ozlabs.org/patch/505399), however, due to the amount of changes required, it seemed better to implement the code in a series of steps. This is the first step, where the "iproc_nand.c"
is essentially an empty file (with one function required to allow this
commit to build successfully).Quoted 9 lines
I don't see the value of applying a such a do-nothing patch. It's fine to
leave out unnecessary features, things that improve performance, etc. but
to
be applied a patchset should accomplish something useful and correct, not
just
be a staging area for future patches.Quoted 6 lines
I agree -- but with the previous attempt, there where so many things that went wrong, that I cannot comprehend what is needed. So, I wanted to break it down into pieces, so that I could get clear responses to help me get it right.
right now, I understand that I need to move certain defines toKconfig
....Quoted 7 lines
Go through the previous comments and address (or respond to) them one by one,
then submit again. If you want to break it into multiple patches, that's fine
as long as the intermediate states are sane, but it should all be submitted at
once as part of a patchset (again, except for unnecessary features).Quoted 5 lines
OK - that was my plan (to address every previous comment)... I was hoping to get "incremental" comments to indicate that I was resolving them acceptably...
My plan was to increment v2, v3, vxxx until it was acceptable. Would this be OK?It's OK if you mark them as [RFC PATCH] so it's clear that you don't mean them to be applied, only commented on -- and include a TODO list so we know what you plan to address before dropping the "RFC".
Or just include a code fragment when replying to feedback, with a comment like, "Is this what you're looking for?"
Quoted 34 lines
Quoted 15 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
arch/arm/include/asm/arch-bcmcygnus/configs.h +0
-0@@ -10,6 +10,7 @@#include <asm/iproc-common/configs.h> Quoted 6 lines
Quoted 4 lines
arch/arm/include/asm/arch-bcmcygnus/configs.h line 13
Quoted 2 lines
arch/arm/include/asm/arch-bcmcygnus/configs.h +1
-0/* uArchitecture specifics */ +#include <../../../drivers/mtd/nand/iproc_nand_cygnus.h> No.
this "include" line is unacceptable?
Quoted 8 lines
Using "../../.." to reach into a code directory's private headers is unacceptable, yes.
Quoted 1 line
could you propose something that would work?
If you want the info to be in the driver directory, use an ifdef there, based
on a config symbol. This seems like the better approach.Maybe I misinterpreted the comments related to:
(quoted diff) +7
-0+#if defined(CONFIG_CYGNUS) +#include "iproc_nand_cygnus.h" +#elif defined(CONFIG_NS_PLUS) +#include "iproc_nand_ns_plus.h" +#else +#error "Unsupported configuration" +#endifQuoted 6 lines
Scott - I thought the you did not like this logic -- now I am thinking you didn't like the "CONFIG_*" names....
I'm guessing that the names should be:CONFIG_SYS_BCM_CYGNUSCONFIG_SYS_BCM_NSPLUS
and that they should be added toKconfig?Correct.
Quoted 1 line
Quoted 1 line
-Scott
Hi Steve,
Where did this get to? I find myself in need of a NAND driver for a BCM58525 and this seems to be relevant.