* Re: [PATCH 3/4] Enable ecc-mode selection in the driver [not found] ` <2d08c4c072fd4922a6056362adb96a455307d583.1358242644.git.s.peter-R0yVo0h44Ow@public.gmane.org> @ 2013-01-15 12:33 ` Jason Cooper [not found] ` <20130115123307.GA13433-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org> 2013-01-15 12:51 ` Andrew Lunn 1 sibling, 1 reply; 6+ messages in thread From: Jason Cooper @ 2013-01-15 12:33 UTC (permalink / raw) To: Stefan Peter Cc: andrew-g2DYL2Zd6BY, linux-lFZ/pmaqli7XmaaqVzeoHQ, iwamatsu-+mkmVskJBflAfugRpC6u6w, nico-QSEj5FYQhm4dnm+yROfE0A, artem.bityutskiy-VuQAYsv1563Yd54FQh9/CA, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E, linux-kernel-u79uwXL29TY76Z2rM5mHXA, rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, wfp5p-4Ng6DfrEGID2fBVCVOL8/A, linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ, jm-Pj/HzkgeCk7QXOPxS62xeg, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, mchehab-H+wXaHxf7aLQT0dZR+AlfA Stefan, This is a good-looking patch series, nice and small! A few comments: On Tue, Jan 15, 2013 at 01:13:12PM +0100, Stefan Peter wrote: > In order to be able to use the ecc-mode, add the bch module to the default > settings for the kirwood boards and enable the activation in orin-nand.c s/orin-nand/orion-nand/ > > Signed-off-by: Stefan Peter <s.peter-R0yVo0h44Ow@public.gmane.org> > --- > diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig > index 93f3794..4a9d3f7 100644 > --- a/arch/arm/configs/kirkwood_defconfig > +++ b/arch/arm/configs/kirkwood_defconfig > @@ -84,6 +84,7 @@ CONFIG_MTD_CFI_STAA=y > CONFIG_MTD_PHYSMAP=y > CONFIG_MTD_M25P80=y > CONFIG_MTD_NAND=y > +CONFIG_MTD_NAND_ECC_BCH=y > CONFIG_MTD_NAND_ORION=y > CONFIG_BLK_DEV_LOOP=y > # CONFIG_SCSI_PROC_FS is not set Please make the defconfig change a separate patch. As a general note (this series shouldn't be a problem), please sort the series so that you add the driver feature first, then enable it in defconfig, then use it in DT. This way, a future bisection won't run into any nasty surprises, other than what they're looking for. ;-) thx, Jason. ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20130115123307.GA13433-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>]
* Re: [PATCH 3/4] Enable ecc-mode selection in the driver [not found] ` <20130115123307.GA13433-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org> @ 2013-01-16 11:44 ` Stefan Peter 0 siblings, 0 replies; 6+ messages in thread From: Stefan Peter @ 2013-01-16 11:44 UTC (permalink / raw) To: Jason Cooper Cc: andrew-g2DYL2Zd6BY, linux-lFZ/pmaqli7XmaaqVzeoHQ, iwamatsu-+mkmVskJBflAfugRpC6u6w, nico-QSEj5FYQhm4dnm+yROfE0A, artem.bityutskiy-VuQAYsv1563Yd54FQh9/CA, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E, linux-kernel-u79uwXL29TY76Z2rM5mHXA, rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, wfp5p-4Ng6DfrEGID2fBVCVOL8/A, linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ, jm-Pj/HzkgeCk7QXOPxS62xeg, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, mchehab-H+wXaHxf7aLQT0dZR+AlfA Hi Jason on 15.01.2013 13:33, Jason Cooper wrote: > Stefan, > > This is a good-looking patch series, nice and small! A few comments: > > On Tue, Jan 15, 2013 at 01:13:12PM +0100, Stefan Peter wrote: >> In order to be able to use the ecc-mode, add the bch module to the default >> settings for the kirwood boards and enable the activation in orin-nand.c > > s/orin-nand/orion-nand/ Will fix. > >> >> Signed-off-by: Stefan Peter <s.peter-R0yVo0h44Ow@public.gmane.org> >> --- >> diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig >> index 93f3794..4a9d3f7 100644 >> --- a/arch/arm/configs/kirkwood_defconfig >> +++ b/arch/arm/configs/kirkwood_defconfig >> @@ -84,6 +84,7 @@ CONFIG_MTD_CFI_STAA=y >> CONFIG_MTD_PHYSMAP=y >> CONFIG_MTD_M25P80=y >> CONFIG_MTD_NAND=y >> +CONFIG_MTD_NAND_ECC_BCH=y >> CONFIG_MTD_NAND_ORION=y >> CONFIG_BLK_DEV_LOOP=y >> # CONFIG_SCSI_PROC_FS is not set > > Please make the defconfig change a separate patch. Will do. > > As a general note (this series shouldn't be a problem), please sort the > series so that you add the driver feature first, then enable it in > defconfig, then use it in DT. This way, a future bisection won't run > into any nasty surprises, other than what they're looking for. ;-) Will do. Thank you very much for your review. Stefan Peter -- MPL AG, Switzerland http://www.mpl.ch Tel. +41 (0)56 483 34 34 Fax: +41(0)56 493 30 20 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/4] Enable ecc-mode selection in the driver [not found] ` <2d08c4c072fd4922a6056362adb96a455307d583.1358242644.git.s.peter-R0yVo0h44Ow@public.gmane.org> 2013-01-15 12:33 ` [PATCH 3/4] Enable ecc-mode selection in the driver Jason Cooper @ 2013-01-15 12:51 ` Andrew Lunn 2013-01-16 11:43 ` Stefan Peter 1 sibling, 1 reply; 6+ messages in thread From: Andrew Lunn @ 2013-01-15 12:51 UTC (permalink / raw) To: Stefan Peter Cc: andrew-g2DYL2Zd6BY, linux-lFZ/pmaqli7XmaaqVzeoHQ, jason-NLaQJdtUoK4Be96aLqz0jA, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, iwamatsu-+mkmVskJBflAfugRpC6u6w, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E, linux-kernel-u79uwXL29TY76Z2rM5mHXA, rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, wfp5p-4Ng6DfrEGID2fBVCVOL8/A, linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, nico-QSEj5FYQhm4dnm+yROfE0A, artem.bityutskiy-VuQAYsv1563Yd54FQh9/CA, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ, jm-Pj/HzkgeCk7QXOPxS62xeg, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, mchehab-H+wXaHxf7aLQT0dZR+AlfA On Tue, Jan 15, 2013 at 01:13:12PM +0100, Stefan Peter wrote: > In order to be able to use the ecc-mode, add the bch module to the default > settings for the kirwood boards and enable the activation in orin-nand.c > > Signed-off-by: Stefan Peter <s.peter-R0yVo0h44Ow@public.gmane.org> > --- > diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig > index 93f3794..4a9d3f7 100644 > --- a/arch/arm/configs/kirkwood_defconfig > +++ b/arch/arm/configs/kirkwood_defconfig > @@ -84,6 +84,7 @@ CONFIG_MTD_CFI_STAA=y > CONFIG_MTD_PHYSMAP=y > CONFIG_MTD_M25P80=y > CONFIG_MTD_NAND=y > +CONFIG_MTD_NAND_ECC_BCH=y > CONFIG_MTD_NAND_ORION=y > CONFIG_BLK_DEV_LOOP=y > # CONFIG_SCSI_PROC_FS is not set > diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c > index cd72b92..1a35257 100644 > --- a/drivers/mtd/nand/orion_nand.c > +++ b/drivers/mtd/nand/orion_nand.c > @@ -14,6 +14,7 @@ > #include <linux/module.h> > #include <linux/platform_device.h> > #include <linux/of.h> > +#include <linux/of_mtd.h> > #include <linux/mtd/mtd.h> > #include <linux/mtd/nand.h> > #include <linux/mtd/partitions.h> > @@ -130,6 +131,7 @@ static int __init orion_nand_probe(struct platform_device *pdev) > if (!of_property_read_u32(pdev->dev.of_node, > "chip-delay", &val)) > board->chip_delay = (u8)val; > + board->ecc_mode = of_get_nand_ecc_mode(pdev->dev.of_node); > } else > board = pdev->dev.platform_data; > > @@ -140,7 +142,8 @@ static int __init orion_nand_probe(struct platform_device *pdev) > nc->IO_ADDR_R = nc->IO_ADDR_W = io_base; > nc->cmd_ctrl = orion_nand_cmd_ctrl; > nc->read_buf = orion_nand_read_buf; > - nc->ecc.mode = NAND_ECC_SOFT; > + nc->ecc.mode = board->ecc_mode == NAND_ECC_SOFT_BCH ? > + NAND_ECC_SOFT_BCH : NAND_ECC_SOFT; Hi Stefan What about a user that wants one of the other valid values? NAND_ECC_OOB_FIRST, NAND_ECC_HW_SYNDROME, etc. Would: if (IS_ERR(board->ecc_mode)) { nc->ecc.mode = NAND_ECC_SOFT; dev_info(&pdev->dev, "Defaulting to NAND_ECC_SOFT"); } else nc->ecc.mode = board->ecc_mode be better? Andrew ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/4] Enable ecc-mode selection in the driver 2013-01-15 12:51 ` Andrew Lunn @ 2013-01-16 11:43 ` Stefan Peter 2013-01-16 13:24 ` Andrew Lunn 2013-01-18 7:27 ` Artem Bityutskiy 0 siblings, 2 replies; 6+ messages in thread From: Stefan Peter @ 2013-01-16 11:43 UTC (permalink / raw) To: Andrew Lunn Cc: devicetree-discuss, linux-kernel, linux-arm-kernel, linux-mtd, grant.likely, rob.herring, rob, linux, jason, dwmw2, jm, arnd, sebastian.hesselbarth, iwamatsu, artem.bityutskiy, wfp5p, gregkh, broonie, mchehab, nico Hi Andrew on 15.01.2013 13:51, Andrew Lunn wrote: > On Tue, Jan 15, 2013 at 01:13:12PM +0100, Stefan Peter wrote: >> In order to be able to use the ecc-mode, add the bch module to the default >> settings for the kirwood boards and enable the activation in orin-nand.c >> >> Signed-off-by: Stefan Peter <s.peter@mpl.ch> >> --- >> diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig >> index 93f3794..4a9d3f7 100644 >> --- a/arch/arm/configs/kirkwood_defconfig >> +++ b/arch/arm/configs/kirkwood_defconfig >> @@ -84,6 +84,7 @@ CONFIG_MTD_CFI_STAA=y >> CONFIG_MTD_PHYSMAP=y >> CONFIG_MTD_M25P80=y >> CONFIG_MTD_NAND=y >> +CONFIG_MTD_NAND_ECC_BCH=y >> CONFIG_MTD_NAND_ORION=y >> CONFIG_BLK_DEV_LOOP=y >> # CONFIG_SCSI_PROC_FS is not set >> diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c >> index cd72b92..1a35257 100644 >> --- a/drivers/mtd/nand/orion_nand.c >> +++ b/drivers/mtd/nand/orion_nand.c >> @@ -14,6 +14,7 @@ >> #include <linux/module.h> >> #include <linux/platform_device.h> >> #include <linux/of.h> >> +#include <linux/of_mtd.h> >> #include <linux/mtd/mtd.h> >> #include <linux/mtd/nand.h> >> #include <linux/mtd/partitions.h> >> @@ -130,6 +131,7 @@ static int __init orion_nand_probe(struct platform_device *pdev) >> if (!of_property_read_u32(pdev->dev.of_node, >> "chip-delay", &val)) >> board->chip_delay = (u8)val; >> + board->ecc_mode = of_get_nand_ecc_mode(pdev->dev.of_node); > >> } else >> board = pdev->dev.platform_data; >> >> @@ -140,7 +142,8 @@ static int __init orion_nand_probe(struct platform_device *pdev) >> nc->IO_ADDR_R = nc->IO_ADDR_W = io_base; >> nc->cmd_ctrl = orion_nand_cmd_ctrl; >> nc->read_buf = orion_nand_read_buf; >> - nc->ecc.mode = NAND_ECC_SOFT; >> + nc->ecc.mode = board->ecc_mode == NAND_ECC_SOFT_BCH ? >> + NAND_ECC_SOFT_BCH : NAND_ECC_SOFT; > > Hi Stefan > > What about a user that wants one of the other valid values? > NAND_ECC_OOB_FIRST, NAND_ECC_HW_SYNDROME, etc. As far as I understand, NAND_ECC_NONE, NAND_ECC_SOFT and NAND_ECC_SOFT_BCH are the only ECC modes that do not require corresponding hardware support which is missing in the marvell 88F6180/88F619x/88F628x. From my point of view, NAND_ECC_NONE does not make sense, too, because MLC NAND Flash requires ECC to be usable. > > Would: > > if (IS_ERR(board->ecc_mode)) { > nc->ecc.mode = NAND_ECC_SOFT; > dev_info(&pdev->dev, "Defaulting to NAND_ECC_SOFT"); > } else > nc->ecc.mode = board->ecc_mode > > be better? I feel safer by limiting the modes to what I could test. Regards Stefan Peter -- MPL AG, Switzerland http://www.mpl.ch Tel. +41 (0)56 483 34 34 Fax: +41(0)56 493 30 20 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/4] Enable ecc-mode selection in the driver 2013-01-16 11:43 ` Stefan Peter @ 2013-01-16 13:24 ` Andrew Lunn 2013-01-18 7:27 ` Artem Bityutskiy 1 sibling, 0 replies; 6+ messages in thread From: Andrew Lunn @ 2013-01-16 13:24 UTC (permalink / raw) To: Stefan Peter Cc: Andrew Lunn, devicetree-discuss, linux-kernel, linux-arm-kernel, linux-mtd, grant.likely, rob.herring, rob, linux, jason, dwmw2, jm, arnd, sebastian.hesselbarth, iwamatsu, artem.bityutskiy, wfp5p, gregkh, broonie, mchehab, nico On Wed, Jan 16, 2013 at 12:43:57PM +0100, Stefan Peter wrote: > Hi Andrew > > on 15.01.2013 13:51, Andrew Lunn wrote: > > On Tue, Jan 15, 2013 at 01:13:12PM +0100, Stefan Peter wrote: > >> In order to be able to use the ecc-mode, add the bch module to the default > >> settings for the kirwood boards and enable the activation in orin-nand.c > >> > >> Signed-off-by: Stefan Peter <s.peter@mpl.ch> > >> --- > >> diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig > >> index 93f3794..4a9d3f7 100644 > >> --- a/arch/arm/configs/kirkwood_defconfig > >> +++ b/arch/arm/configs/kirkwood_defconfig > >> @@ -84,6 +84,7 @@ CONFIG_MTD_CFI_STAA=y > >> CONFIG_MTD_PHYSMAP=y > >> CONFIG_MTD_M25P80=y > >> CONFIG_MTD_NAND=y > >> +CONFIG_MTD_NAND_ECC_BCH=y > >> CONFIG_MTD_NAND_ORION=y > >> CONFIG_BLK_DEV_LOOP=y > >> # CONFIG_SCSI_PROC_FS is not set > >> diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c > >> index cd72b92..1a35257 100644 > >> --- a/drivers/mtd/nand/orion_nand.c > >> +++ b/drivers/mtd/nand/orion_nand.c > >> @@ -14,6 +14,7 @@ > >> #include <linux/module.h> > >> #include <linux/platform_device.h> > >> #include <linux/of.h> > >> +#include <linux/of_mtd.h> > >> #include <linux/mtd/mtd.h> > >> #include <linux/mtd/nand.h> > >> #include <linux/mtd/partitions.h> > >> @@ -130,6 +131,7 @@ static int __init orion_nand_probe(struct platform_device *pdev) > >> if (!of_property_read_u32(pdev->dev.of_node, > >> "chip-delay", &val)) > >> board->chip_delay = (u8)val; > >> + board->ecc_mode = of_get_nand_ecc_mode(pdev->dev.of_node); > > > >> } else > >> board = pdev->dev.platform_data; > >> > >> @@ -140,7 +142,8 @@ static int __init orion_nand_probe(struct platform_device *pdev) > >> nc->IO_ADDR_R = nc->IO_ADDR_W = io_base; > >> nc->cmd_ctrl = orion_nand_cmd_ctrl; > >> nc->read_buf = orion_nand_read_buf; > >> - nc->ecc.mode = NAND_ECC_SOFT; > >> + nc->ecc.mode = board->ecc_mode == NAND_ECC_SOFT_BCH ? > >> + NAND_ECC_SOFT_BCH : NAND_ECC_SOFT; > > > > Hi Stefan > > > > What about a user that wants one of the other valid values? > > NAND_ECC_OOB_FIRST, NAND_ECC_HW_SYNDROME, etc. > > As far as I understand, NAND_ECC_NONE, NAND_ECC_SOFT and > NAND_ECC_SOFT_BCH are the only ECC modes that do not require > corresponding hardware support which is missing in the marvell > 88F6180/88F619x/88F628x. From my point of view, NAND_ECC_NONE does not > make sense, too, because MLC NAND Flash requires ECC to be usable. > > > > > Would: > > > > if (IS_ERR(board->ecc_mode)) { > > nc->ecc.mode = NAND_ECC_SOFT; > > dev_info(&pdev->dev, "Defaulting to NAND_ECC_SOFT"); > > } else > > nc->ecc.mode = board->ecc_mode > > > > be better? > > I feel safer by limiting the modes to what I could test. Hi Stefan O.K, but i still think a warning message would be useful when board->ecc_mode is an error code. Andrew ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/4] Enable ecc-mode selection in the driver 2013-01-16 11:43 ` Stefan Peter 2013-01-16 13:24 ` Andrew Lunn @ 2013-01-18 7:27 ` Artem Bityutskiy 1 sibling, 0 replies; 6+ messages in thread From: Artem Bityutskiy @ 2013-01-18 7:27 UTC (permalink / raw) To: Stefan Peter Cc: Andrew Lunn, devicetree-discuss, linux-kernel, linux-arm-kernel, linux-mtd, grant.likely, rob.herring, rob, linux, jason, dwmw2, jm, arnd, sebastian.hesselbarth, iwamatsu, wfp5p, gregkh, broonie, mchehab, nico [-- Attachment #1: Type: text/plain, Size: 194 bytes --] On Wed, 2013-01-16 at 12:43 +0100, Stefan Peter wrote: > Hi Andrew For some reasons I do not see your patches in the mailing lists which are in CC. -- Best Regards, Artem Bityutskiy [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-01-18 7:27 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <cover.1358242644.git.s.peter@mpl.ch> [not found] ` <2d08c4c072fd4922a6056362adb96a455307d583.1358242644.git.s.peter@mpl.ch> [not found] ` <2d08c4c072fd4922a6056362adb96a455307d583.1358242644.git.s.peter-R0yVo0h44Ow@public.gmane.org> 2013-01-15 12:33 ` [PATCH 3/4] Enable ecc-mode selection in the driver Jason Cooper [not found] ` <20130115123307.GA13433-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org> 2013-01-16 11:44 ` Stefan Peter 2013-01-15 12:51 ` Andrew Lunn 2013-01-16 11:43 ` Stefan Peter 2013-01-16 13:24 ` Andrew Lunn 2013-01-18 7:27 ` Artem Bityutskiy
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).