gt; @@ -2157,8 +2162,7 @@ static int cfi_intelext_lock(struct mtd_info *mtd,
> loff_t ofs, uint64_t len)
> ofs, len, DO_XXLOCK_ONEBLOCK_LOCK);
>
> #ifdef DEBUG_LOCK_BITS
> - printk(KERN_DEBUG "%s: lock status after, ret=%d\n",
> -
ecc(mtd, section, &oobregion);
> + ret = mtd_ooblayout_ecc(mtd, section++, &oobregion);
> if (ret < 0) {
> if (ret != -ERANGE)
> return ret;
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
_flash_pin);
> - kfree(state);
> - return -ENXIO;
> - }
> -
> - mtd_device_parse_register(state->mtd, part_probe_types, NULL,
> - pdata->parts, pdata->nr_parts);
> -
> - platform_set_drvdata(pdev, state);
> -
> - return 0;
> -}
> -
> -static int bfin_flash_remove(struct platform_device *pdev)
> -{
> - struct async_state *state = platform_get_drvdata(pdev);
> - gpio_free(state->enet_flash_pin);
> - mtd_device_unregister(state->mtd);
> - map_destroy(state->mtd);
> - kfree(state);
> - return 0;
> -}
> -
> -static struct platform_driver bfin_flash_driver = {
> - .probe = bfin_flash_probe,
> - .remove = bfin_flash_remove,
> - .driver = {
> - .name = DRIVER_NAME,
> - },
> -};
> -
> -module_platform_driver(bfin_flash_driver);
> -
> -MODULE_LICENSE("GPL");
> -MODULE_DESCRIPTION("MTD map driver for Blackfins with flash/ethernet on same
> async bank");
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
ck2mtd_dev *add_device(char *devname,
> int erase_size,
> int i;
> #endif
> const fmode_t mode = FMODE_READ | FMODE_WRITE | FMODE_EXCL;
> - struct block_device *bdev = ERR_PTR(-ENODEV);
> + struct block_device *bdev;
> struct block2mtd_dev *dev;
>
return -EFAULT;
> - }
> -
> - info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
> - if (info == NULL) {
> - err = -ENOMEM;
> - goto out_err;
> - }
> -
> - platform_set_drvdata(pdev, info);
> -
> - nand_hw_control_init(&info->controller);
> -
> - info->device = &pdev->dev;
> - info->platform = plat;
> -
> - /* initialise chip data struct */
> - chip = &info->chip;
> - mtd = nand_to_mtd(&info->chip);
> -
> - if (plat->data_width)
> - chip->options |= NAND_BUSWIDTH_16;
> -
> - chip->options |= NAND_CACHEPRG | NAND_SKIP_BBTSCAN;
> -
> - chip->read_buf = (plat->data_width) ?
> - bf5xx_nand_read_buf16 : bf5xx_nand_read_buf;
> - chip->write_buf = (plat->data_width) ?
> - bf5xx_nand_write_buf16 : bf5xx_nand_write_buf;
> -
> - chip->read_byte= bf5xx_nand_read_byte;
> -
> - chip->cmd_ctrl = bf5xx_nand_hwcontrol;
> - chip->dev_ready= bf5xx_nand_devready;
> -
> - nand_set_controller_data(chip, mtd);
> - chip->controller = &info->controller;
> -
> - chip->IO_ADDR_R= (void __iomem *) NFC_READ;
> - chip->IO_ADDR_W= (void __iomem *) NFC_DATA_WR;
> -
> - chip->chip_delay = 0;
> -
> - /* initialise mtd info data struct */
> - mtd->dev.parent = &pdev->dev;
> -
> - /* initialise the hardware */
> - err = bf5xx_nand_hw_init(info);
> - if (err)
> - goto out_err;
> -
> - /* setup hardware ECC data struct */
> - if (hardware_ecc) {
> -#ifdef CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC
> - mtd_set_ooblayout(mtd, &bootrom_ooblayout_ops);
> -#endif
> - chip->read_buf = bf5xx_nand_dma_read_buf;
> - chip->write_buf = bf5xx_nand_dma_write_buf;
> - chip->ecc.calculate = bf5xx_nand_calculate_ecc;
> - chip->ecc.correct = bf5xx_nand_correct_data;
> - chip->ecc.mode = NAND_ECC_HW;
> - chip->ecc.hwctl = bf5xx_nand_enable_hwecc;
> - chip->ecc.read_page_raw = bf5xx_nand_read_page_raw;
> - chip->ecc.write_page_raw = bf5xx_nand_write_page_raw;
> - } else {
> - chip->ecc.mode = NAND_ECC_SOFT;
> - chip->ecc.algo = NAND_ECC_HAMMING;
> - }
> -
> - /* scan hardware nand chip and setup mtd info data struct */
> - if (bf5xx_nand_scan(mtd)) {
> - err = -ENXIO;
> - goto out_err_nand_scan;
> - }
> -
> -#ifdef CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC
> - chip->badblockpos = 63;
> -#endif
> -
> - /* add NAND partition */
> - bf5xx_nand_add_partition(info);
> -
> - dev_dbg(&pdev->dev, "initialised ok\n");
> - return 0;
> -
> -out_err_nand_scan:
> - bf5xx_nand_dma_remove(info);
> -out_err:
> - peripheral_free_list(bfin_nfc_pin_req);
> -
> - return err;
> -}
> -
> -/* driver device registration */
> -static struct platform_driver bf5xx_nand_driver = {
> - .probe = bf5xx_nand_probe,
> - .remove = bf5xx_nand_remove,
> - .driver = {
> - .name = DRV_NAME,
> - },
> -};
> -
> -module_platform_driver(bf5xx_nand_driver);
> -
> -MODULE_LICENSE("GPL");
> -MODULE_AUTHOR(DRV_AUTHOR);
> -MODULE_DESCRIPTION(DRV_DESC);
> -MODULE_ALIAS("platform:" DRV_NAME);
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-
> -#define MODULE_LICENSE(x)/* x */
> -#define MODULE_AUTHOR(x) /* x */
> -#define MODULE_DESCRIPTION(x) /* x */
> -
> -#define pr_err printf
> -#endif
>
> /*
> * invparity is a 256 byte table that contains the odd parity
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
d.
Thanks,
Boris
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
> - printk(KERN_WARNING "INFTL: allocation of ANACtable "
> - "failed (%zd bytes)\n",
> - s->nb_blocks * sizeof(u8));
> + if (!ANACtable)
> return -ENOMEM;
> - }
>
> /*
>
up = kzalloc(sizeof(struct uflash_dev), GFP_KERNEL);
> - if (!up) {
> - printk(KERN_ERR PFX "Cannot allocate struct uflash_dev\n");
> + if (!up)
> return -ENOMEM;
> - }
>
> /* copy defaults and tweak parameters */
>
printk (KERN_WARNING "Unable to allocate E3 NAND MTD device
> structure.\n");
> err = -ENOMEM;
> goto out;
> }
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
chip->ecc.size);
> +
> if ((of_property_read_bool(this->dev->of_node, "fsl,use-minimum-ecc"))
> - || legacy_set_geometry(this))
> - return set_geometry_by_ecc_info(this);
> +
o take the mtd patches through the MTD
tree. As you've probably noticed, nand code has been moved around and
it's easier for me to carry those 2 simple changes in my tree than
creating an immutable branch.
Let me know if this is a problem.
Regards,
Boris
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
>
> out_cdev:
> + put_device(&vol->dev);
> cdev_del(&vol->cdev);
use-after-free bug here: put_device() has freed the vol obj, and you're
dereferencing the pointer just after that.
> return err;
> }
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
ill looks
wrong. It's probably better to move the of_node_put() and the below
idr_remove() call in the ->release() hook if you want to use
put_device().
> idr_remove(&mtd_idr, i);
> fail_locked:
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
uch presumptuous
statements (you can have a look at these slides if you want some details
about why this is not so simple [1]).
I'm definitely not saying supporting MLC NANDs in Linux is impossible,
and if you're interested in working on this topic I'd be happy to help.
But please don
support for hardware that "only works by mistake" may be good
> idea, but maybe it is slightly too surprising for a -stable.
I wouldn't say "work by mistake" but "seems to work at first but in the
end breaks", so definitely a candidate for -stable IMO.
Regards,
Boris
[1]https://github.com/bbrezillon/linux/tree/nand/mlc
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
doesn't appear to do any harm.
I wonder why the fix was backported to stable releases in the first
place. AFAICS, there's no Cc-stable or Fixes tag in the original
commit. It's probably something in the backport-to-stable process I'm
not aware of.
Anyway, not an issues since the changes seems to be harmless.
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
{ \
> [...]
>
> The right-hand side of this comparison is now using val2 instead of
> val3. (This bug seems to be unfixed upstream.)
Indeed. This being said, it's not buggy since all users of
map_word_andequal() pass the same value to val2 and val3.
Maybe we should just patch the macro and all call-sites to remove val3.
>
> Ben.
>
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
(mtd, section, &oobregion);
> + ret = mtd_ooblayout_ecc(mtd, section++, &oobregion);
> if (ret < 0) {
> if (ret != -ERANGE)
> return ret;
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
ion);
> + ret = mtd_ooblayout_ecc(mtd, i, &oobregion);
Ditto.
> if (ret < 0) {
> if (ret != -ERANGE)
> return ret;
Thanks,
Boris
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
o MLC
> NAND.
>
> Cc: sta...@vger.kernel.org
> Signed-off-by: Richard Weinberger
Acked-by: Boris Brezillon
> ---
> drivers/mtd/ubi/build.c | 11 +++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
&g
it cannot be considered as utility to
> define priorities for all devices before ENTDAA.
We have SETNEWDA for other use cases: say you want one of your device to
have an higher priority, you can just manually set a new dynamic
address that is lower than any other devices on the bus (I plan to
expose that through sysfs, by making the address file writable).
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
; As we can see 2nd approach is more generic and do not see any reason to add
> special handling for SETDASA unless there is any reasonable reason to do
> otherwise.
I agree on one thing: as long as you don't have to reserve a specific
dynamic address, SETDASA is not required. At least, that's my
understanding.
Regards,
Boris
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
ority (WRT IBIs). But honestly, that's the only
use case I can think of, and to me, it sounds like an advanced feature
we may want to support at some point, but don't need in the initial
implementation.
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
e can automate things even more
> > and completely implement DAA from the core? I doubt it, because the way
> > the core will trigger DAA, expose discovered devices or allow you to
> > declare manually assigned addresses is likely to be
> > controller-dependent.
>
> Please refer to figure 90 of public specification. As you can see the DAA
> process should start with SETDASA command.
Only if devices with a static address needs to be assigned a specific
dynamic address. At least, that's my understanding. Are there plans to
create devices that would only reply to SETDASA commands but ignore
ENTDAA ones?
>
> With the current flow of this patch the DAA process is limited to ENTDAA
> command
> only.
As a first step, yes. But again, nothing is set in stone, and the
SETDASA step can be added afterwards. As said above, I fail to see a
use case where it's really required (note that I said required, not
useful).
>
> > When I designed the framework I took the decision to base my work on the
> > spec rather than focusing on the I3C master controller I had to support
> > (Cadence). This is the reason I decided to keep the interface as simple
> > as possible at the risk of encouraging code-duplication (at first)
> > rather than coming up with an interface that is designed with a single
> > controller in mind and having to break things every time a new
> > controller comes out.
> >
> > Thank you for you comments, but I'd like to know if some of my design
> > choices are blocking you to support your controller. What I've seen so
> > far is a collection of things that might be relevant to fix (though
> > most of them are subject to interpretation and/or a matter of taste),
> > but nothing that should really block you.
> >
> > Can you clarify that, and maybe come back with a list of things that you
> > think are preventing you from properly supporting the Synopsys
> > controller?
> >
> > Thanks,
> >
> > Boris
>
> As you can check from my comments my concerns are about the i3c specification
> without the controller in mind.
Okay, then we're on the same page.
Regards,
Boris
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
On Mon, 26 Feb 2018 21:40:32 +0100
Boris Brezillon wrote:
> On Mon, 26 Feb 2018 21:36:07 +0100
> Boris Brezillon wrote:
>
> > > >>> +
> > > >>> +/**
> > > >>> + * struct i3c_master_controller_ops - I3C master methods
> >
On Mon, 26 Feb 2018 21:36:07 +0100
Boris Brezillon wrote:
> > >>> +
> > >>> +/**
> > >>> + * struct i3c_master_controller_ops - I3C master methods
> > >>> + * @bus_init: hook responsible for the I3C bus initialization. This
> >
d that be okay if we pass an
i3c_device object to ->priv_xfers()?
> >
> >> This could be also applied to i2c transfers.
> > Not really. The max SCL frequency is something that applies to the
> > whole bus, because all I2C devices have to decode the addres
hat is the addr?
It's the payload passed to SETDASA and SETNEWDA, hence the generic
_setda suffix. addr is the new dynamic address assigned to the
device.
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
Hi Vitor,
On Fri, 23 Feb 2018 16:56:14 +
Vitor Soares wrote:
> Hi Boris,
>
> Às 3:16 PM de 12/14/2017, Boris Brezillon escreveu:
> > +
> > +enum i3c_addr_slot_status i3c_bus_get_addr_slot_status(struct i3c_bus *bus,
> > +
d *p is printed as 0x%08x or alike.
But specifier fixes should be done separately, and I'm not sure I
want to receive yet another bunch of cosmestic patches changing that, at
least not now.
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
so I should apply it soon.
If you're okay, and Julia and Ezequiel are okay too, I'd like to move
to the next step and have you work on an ->exec_op() conversion
(jz4780?).
Of course, that does not prevent you from continuing the
printk()/dev_xx() conversion.
--
Boris Brezillon, Boo
nd', basically all those that don't have a
KERN_ in it. I know your commit log explicitly says that only
printks embedding a log level are converted to pr_xxx(), but it's
probably worth patching those printks as well (choosing the appropriate
log level between info, err and warn and u
RR(args...) \
> - do { printk(KERN_ERR NS_OUTPUT_PREFIX " error: " args); } while(0)
> + do { pr_err(" error: " args); } while(0)
> #define NS_INFO(args...) \
> - do { printk(KERN_INFO NS_OUTPUT_PREFIX " " args); } while(0)
> + do { pr_info(" " args); } while(0)
>
> /* Busy-wait delay macros (microseconds, milliseconds) */
> #define NS_UDELAY(us) \
> diff --git a/drivers/mtd/nand/r852.c b/drivers/mtd/nand/r852.c
> index fc9287a..cd3cd1c 100644
> --- a/drivers/mtd/nand/r852.c
> +++ b/drivers/mtd/nand/r852.c
> @@ -7,6 +7,9 @@
> * published by the Free Software Foundation.
> */
>
> +#define DRV_NAME "r852"
> +#define pr_fmt(fmt) DRV_NAME fmt
> +
> #include
> #include
> #include
> @@ -935,7 +938,7 @@ static int r852_probe(struct pci_dev *pci_dev, const
> struct pci_device_id *id)
> &dev->card_detect_work, 0);
>
>
> - printk(KERN_NOTICE DRV_NAME ": driver loaded successfully\n");
> + pr_notice(": driver loaded successfully\n");
> return 0;
>
> error10:
> diff --git a/drivers/mtd/nand/r852.h b/drivers/mtd/nand/r852.h
> index 8713c57..709eced 100644
> --- a/drivers/mtd/nand/r852.h
> +++ b/drivers/mtd/nand/r852.h
> @@ -145,16 +145,16 @@ struct r852_device {
> };
>
> #define DRV_NAME "r852"
> -
> +#define pr_fmt(fmt) DRV_NAME fmt
>
> #define dbg(format, ...) \
> if (debug) \
> - printk(KERN_DEBUG DRV_NAME ": " format "\n", ## __VA_ARGS__)
> + pr_debug(": " format "\n", ## __VA_ARGS__)
>
> #define dbg_verbose(format, ...) \
> if (debug > 1) \
> - printk(KERN_DEBUG DRV_NAME ": " format "\n", ## __VA_ARGS__)
> + pr_debug(": " format "\n", ## __VA_ARGS__)
>
>
> #define message(format, ...) \
> - printk(KERN_INFO DRV_NAME ": " format "\n", ## __VA_ARGS__)
> + pr_info(": " format "\n", ## __VA_ARGS__)
> diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
> index e7f3c98..493f6b2 100644
> --- a/drivers/mtd/nand/sh_flctl.c
> +++ b/drivers/mtd/nand/sh_flctl.c
> @@ -877,7 +877,7 @@ static void flctl_cmdfunc(struct mtd_info *mtd, unsigned
> int command,
> else if (!flctl->seqin_column)
> execmd_write_page_sector(mtd);
> else
> - printk(KERN_ERR "Invalid address !?\n");
> + pr_err("Invalid address !?\n");
> break;
> }
> set_cmd_regs(mtd, command, (command << 8) | NAND_CMD_SEQIN);
> diff --git a/drivers/mtd/nand/sm_common.c b/drivers/mtd/nand/sm_common.c
> index c378705..7f5044a 100644
> --- a/drivers/mtd/nand/sm_common.c
> +++ b/drivers/mtd/nand/sm_common.c
> @@ -119,9 +119,8 @@ static int sm_block_markbad(struct mtd_info *mtd, loff_t
> ofs)
>
> ret = mtd_write_oob(mtd, ofs, &ops);
> if (ret < 0 || ops.oobretlen != SM_OOB_SIZE) {
> - printk(KERN_NOTICE
> - "sm_common: can't mark sector at %i as bad\n",
> - (int)ofs);
> + pr_notice("sm_common: can't mark sector at %i as bad\n",
> + (int)ofs);
> return -EIO;
> }
>
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
don't prefer pr_debug for drivers, instead we use dev_dbg.
> But as Boris told me that it will be better to first having changed all
> printks to pr_*() macro and then think about dev_*() macros.
pr_xx() vs dev_xx() is yet another story ;-).
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
se(format, ...) \
> if (debug > 1) \
> - printk(KERN_DEBUG DRV_NAME ": " format "\n", ## __VA_ARGS__)
> + pr_debug(": " format "\n", ## __VA_ARGS__)
With the pr_fmt() definition modified as suggested it should be:
pr_debug(format "\n", ## __VA_ARGS__)
Regards,
Boris
[1]https://01.org/linuxgraphics/gfx-docs/drm/admin-guide/dynamic-debug-howto.html
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
On Fri, 16 Feb 2018 11:44:49 +0100
Boris Brezillon wrote:
> Free Electrons is now Bootlin.
>
> Signed-off-by: Boris Brezillon
> ---
> Note that I'm planning to take this patch through the MTD tree.
Applied to the nand/next branch of the MTD tree.
>
l
> +M: Miquel Raynal
> L: linux-...@lists.infradead.org
> S: Maintained
> F: drivers/mtd/nand/raw/marvell_nand.c
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
Hi Greg,
On Tue, 19 Dec 2017 10:36:43 +0100
Greg Kroah-Hartman wrote:
> On Tue, Dec 19, 2017 at 10:28:58AM +0100, Boris Brezillon wrote:
> > On Tue, 19 Dec 2017 10:21:19 +0100
> > Greg Kroah-Hartman wrote:
> >
> > > On Tue, Dec 19, 2017 at 10:13:36A
On Tue, 20 Feb 2018 23:07:18 +0530
Shreeya Patel wrote:
> On Tue, 2018-02-20 at 18:16 +0100, Boris Brezillon wrote:
> > On Tue, 20 Feb 2018 22:36:41 +0530
> > Shreeya Patel wrote:
> >
> > >
> > > On Mon, 2018-02-19 at 15:51 +0100, Boris Brezill
On Tue, 20 Feb 2018 22:36:41 +0530
Shreeya Patel wrote:
> On Mon, 2018-02-19 at 15:51 +0100, Boris Brezillon wrote:
> > Hi Shreeya,
> >
> > On Mon, 19 Feb 2018 18:43:45 +0530
> > Shreeya Patel wrote:
> >
> > >
> > > The log levels embedd
/drivers/mtd/nand/sh_flctl.c
> +++ b/drivers/mtd/nand/sh_flctl.c
> @@ -877,7 +877,7 @@ static void flctl_cmdfunc(struct mtd_info *mtd, unsigned
> int command,
> else if (!flctl->seqin_column)
> execmd_write_page_sector(mtd);
>
Oh, and in the subject 'pr_*macro()' -> 'pr_*() macro'
On Mon, 19 Feb 2018 15:51:15 +0100
Boris Brezillon wrote:
> Hi Shreeya,
>
> On Mon, 19 Feb 2018 18:43:45 +0530
> Shreeya Patel wrote:
>
> > The log levels embedded with the name are more
+++ b/drivers/mtd/nand/r852.h
> @@ -149,12 +149,12 @@ struct r852_device {
>
> #define dbg(format, ...) \
> if (debug) \
> - printk(KERN_DEBUG DRV_NAME ": " format "\n", ## __VA_ARGS__)
> + pr_debug(DRV_NAME ": " format "\n", ## __VA_ARGS__)
>
> #define dbg_verbose(format, ...) \
> if (debug > 1) \
> - printk(KERN_DEBUG DRV_NAME ": " format "\n", ## __VA_ARGS__)
> + pr_debug(DRV_NAME ": " format "\n", ## __VA_ARGS__)
>
And here as well.
Regards,
Boris
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
.name = "davinci-nand",
Another side-effect of this change you should be aware of: by doing
that you also break all users that were defining partitions through the
cmdline using mtdparts=davinci_nand.0:.
Not sure this is a good idea ;-).
> .of_match_table = of
nci_ntosd2_nandflash_device = {
> > - .name = "davinci_nand",
> > + .name = "davinci-nand",
> > .id = 0,
> > .dev= {
> > .platform_data = &davinci_ntosd2_nandflash_data,
> > diff --git a/arch/arm/mach-davinci/board-sffsdr.c
> > b/arch/arm/mach-davinci/board-sffsdr.c
> > index d85accf7f760..c8569c8aa6e3 100644
> > --- a/arch/arm/mach-davinci/board-sffsdr.c
> > +++ b/arch/arm/mach-davinci/board-sffsdr.c
> > @@ -83,7 +83,7 @@ static struct resource
> > davinci_sffsdr_nandflash_resource[] = {
> > };
> >
> > static struct platform_device davinci_sffsdr_nandflash_device = {
> > - .name = "davinci_nand", /* Name of driver */
> > + .name = "davinci-nand", /* Name of driver */
> > .id = 0,
> > .dev= {
> > .platform_data = &davinci_sffsdr_nandflash_data,
> >
>
>
> Getting out of scope of this patch, but...
>
> If there is only one nand device per board, then the id should probably
> be -1 instead of 0 for all of these boards.
>
Note that doing that is also breaking mtdparts users, because the
mtdparts definition expected by the kernel would become
mtdparts=davinci-nand: instead of
mtdparts=davinci_nand.0:.
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
On Fri, 16 Feb 2018 19:33:07 +0100
Boris Brezillon wrote:
> On Fri, 16 Feb 2018 17:47:08 +0100
> Bartosz Golaszewski wrote:
>
> > From: Bartosz Golaszewski
> >
> > Since commit d8e22fb4ccac ("ARM: da850: add the nand dev_id to the clock
> > lookup tab
d2_nandflash_device = {
> - .name = "davinci_nand",
> + .name = "davinci-nand",
> .id = 0,
> .dev= {
> .platform_data = &davinci_ntosd2_nandflash_data,
> diff --git a/arch/arm/mac
ove,
> .driver = {
> - .name = "davinci_nand",
> + .name = "davinci-nand",
And by doing that you're breaking C board files which are using the
name with an underscore.
> .of_match_table = of_match_ptr(davinc
On Fri, 16 Feb 2018 16:35:27 +0100
Kamil Konieczny wrote:
> On 16.02.2018 15:54, Boris Brezillon wrote:
> > Adding back all the people that were Cc-ed on the initial email.
> >
> > On Fri, 16 Feb 2018 15:18:21 +0100
> > Kamil Konieczny wrote:
> >
> >
Adding back all the people that were Cc-ed on the initial email.
On Fri, 16 Feb 2018 15:18:21 +0100
Kamil Konieczny wrote:
> On 16.02.2018 15:00, Boris Brezillon wrote:
> > On Fri, 16 Feb 2018 12:21:53 +0100
> > Kamil Konieczny wrote:
> >
> >> On 16.02.201
Free Electrons is now Bootlin.
Signed-off-by: Boris Brezillon
---
Note that I'm planning to take this patch through the MTD tree.
---
.mailmap| 7 ---
MAINTAINERS | 10 +-
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/.mailmap b/.mailmap
index e18cab7
On Wed, 14 Feb 2018 20:15:41 +0100
Boris Brezillon wrote:
> -linux-mmc
> +linux-mtd
>
> On Thu, 15 Feb 2018 00:35:06 +0900
> KOBAYASHI Yoshitake wrote:
>
> > This patch enables support to read the ECC strength and size from the
> > NAND flash using Toshiba Mem
case 0x6:
> + chip->ecc_strength_ds = 8;
> + break;
> + default:
> + WARN(1, "Could not get ECC info");
> + chip->ecc_step_ds = 0;
> + break;
> + }
> + }
> }
>
> static int toshiba_nand_init(struct nand_chip *chip)
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
Both u-boot and Linux have to support using strength/step information
passed through the DT before you can start patching dts files. Anyway,
users will have to change their DT (add the nand-ecc-strength/step-size
properties) to use this feature, so they should quickly notice that
something is g
quot;)
>
> are missing a Signed-off-by from their committer.
>
Should be fixed now. Thanks for this report. Time for me to add an
applypatch-msg hook :-).
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
l() as Boris Brezillon noted.
> v3: Rename error labels, remove of_node_put() per Boris Brezillon request.
> v4: Separate fix in to 3 patches.
>
> Alexey Khoroshilov (3):
> mtd: nand: vf610: remove the unnecessary of_node_put()
> mtd: nand: vf610: improve readability of error lab
> COMPILE_TEST
> - depends on HAS_IOMEM
> + depends on HAS_IOMEM && HAS_DMA
> help
> This enables the NAND flash controller driver for Marvell boards,
> including:
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
chip->ecc.size);
> +
> if ((of_property_read_bool(this->dev->of_node, "fsl,use-minimum-ecc"))
> - || legacy_set_geometry(this))
> - return set_geometry_by_ecc_info(this);
> +
|| legacy_set_geometry(this)) {
> + if (!(chip->ecc_strength_ds > 0 && chip->ecc_step_ds > 0))
> + return -EINVAL;
> +
> + return set_geometry_by_ecc_info(this, chip->ecc_strength_ds,
> + chip->ecc_step_ds);
> + }
>
> return 0;
> }
Both patches look good to me. Han, could review them and add your Ack
if you're happy with the changes.
Thanks,
Boris
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
On Mon, 05 Feb 2018 23:16:57 +0100
ste...@agner.ch wrote:
> Hi Boris,
>
> [Also adding Huang]
>
> On 31.01.2018 22:18, ste...@agner.ch wrote:
> > I accidentally removed ML/cc before, re-adding.
> >
> > On 31.01.2018 10:57, Boris Brezillon wrote:
> &
On Tue, 30 Jan 2018 14:46:47 +0100
Miquel Raynal wrote:
> Hi Geert,
>
> On Tue, 30 Jan 2018 14:23:21 +0100
> Geert Uytterhoeven wrote:
>
> > If NO_DMA=y:
> >
> > ERROR: "bad_dma_ops" [drivers/mtd/nand/marvell_nand.ko] undefined!
> >
> > Add a dependency on HAS_DMA to fix this.
> >
> > F
Hi Stefan,
On Mon, 29 Jan 2018 15:44:40 +0100
Stefan Agner wrote:
> In case fsl,use-minimum-ecc is set, the driver tries to determine
> ECC layout by using the ECC information provided by the MTD stack.
> However, in case the NAND chip does not provide any information,
> the driver currently fai
Alexey Khoroshilov
> ---
> v2: Add nand_cleanup() to undone nand_scan_tail() as Boris Brezillon noted.
> v3: Rename error labels, remove of_node_put() per Boris Brezillon request.
Should be separated in 3 patches IMO:
1/ remove the unnecessary of_node_put()
2/ rename error label in
On Tue, 30 Jan 2018 08:44:30 +0900
KOBAYASHI Yoshitake wrote:
> On 2017/12/27 15:06, KOBAYASHI Yoshitake wrote:
> > On 2017/12/19 20:56, Boris Brezillon wrote:
> >> On Tue, 19 Dec 2017 20:42:36 +0900
> >> KOBAYASHI Yoshitake wrote:
> >>
> >&g
cron memories
Boris Brezillon (15):
mtd: nand: hynix: Don't wait after applying new read-retry params
mtd: nand: provide several helpers to do common NAND operations
mtd: nand: force drivers to explicitly send READ/PROG commands
mtd: nand: denali: Avoid using ecc->co
Hi Rob,
On Sun, 7 Jan 2018 15:14:25 +0100
Boris Brezillon wrote:
> Hi Rob,
>
> On Tue, 26 Dec 2017 12:29:34 -0600
> Rob Herring wrote:
>
> > >> > > > +Optional properties
> > >> > > > +---
> > >>
On Fri, 19 Jan 2018 07:59:54 +
Colin King wrote:
> From: Colin Ian King
>
> Variable oob_len is assigned and never read, hence it is redundant and
> can be removed.
>
> Cleans up clang warnings:
>
> drivers/mtd/nand/marvell_nand.c:1356:6: warning: Value stored to 'oob_len'
> during its in
On Fri, 19 Jan 2018 07:55:31 +
Colin King wrote:
> From: Colin Ian King
>
> Trivial fix to spelling mistakes in dev_err error message text.
Applied.
Thanks,
Boris
>
> Signed-off-by: Colin Ian King
> ---
> drivers/mtd/nand/marvell_nand.c | 2 +-
> 1 file changed, 1 insertion(+), 1 del
On Wed, 17 Jan 2018 11:25:33 +
Wei Yongjun wrote:
> There is a error message within devm_ioremap_resource
> already, so remove the dev_err call to avoid redundant
> error message.
Applied.
Thanks,
Boris
>
> Signed-off-by: Wei Yongjun
> ---
> drivers/mtd/onenand/omap2.c | 4 +---
> 1 fi
On Thu, 18 Jan 2018 15:11:32 +0100
Boris Brezillon wrote:
> On Thu, 18 Jan 2018 15:08:01 +0100
> Boris Brezillon wrote:
>
> > On Thu, 18 Jan 2018 14:05:05 +
> > Wei Yongjun wrote:
> >
> > > Fix to return error code -ENOMEM from the kmem_cache_alloc
On Thu, 18 Jan 2018 15:08:01 +0100
Boris Brezillon wrote:
> On Thu, 18 Jan 2018 14:05:05 +
> Wei Yongjun wrote:
>
> > Fix to return error code -ENOMEM from the kmem_cache_alloc() error
> > handling case instead of 0, as done elsewhere in this function.
>
> I
On Thu, 18 Jan 2018 14:05:05 +
Wei Yongjun wrote:
> Fix to return error code -ENOMEM from the kmem_cache_alloc() error
> handling case instead of 0, as done elsewhere in this function.
I guess you've used a static analysis code to detect this problem, can
you name it in the commit message, a
g each RCL job to make sure that the sampling of the
> previous RCL's output is correct.
>
> Fixes flickering in the top left of 3DMMES Taiji.
>
> Signed-off-by: Eric Anholt
> Fixes: ca26d28bbaa3 ("drm/vc4: improve throughput by pipelining binning and
>
On Tue, 16 Jan 2018 16:02:35 +0100
Peter Rosin wrote:
> On 2018-01-16 15:21, Boris Brezillon wrote:
> > On Tue, 16 Jan 2018 14:56:52 +0100
> > Peter Rosin wrote:
> >
> >> Hmmm, I guess the question is if the command line should override the
> >> device
On Tue, 16 Jan 2018 14:56:52 +0100
Peter Rosin wrote:
> On 2018-01-16 14:36, Boris Brezillon wrote:
> > Hi Peter,
> >
> > On Tue, 16 Jan 2018 14:28:38 +0100
> > Peter Rosin wrote:
> >
> >> Hi!
> >>
> >> When trying next-20180116 I
> Author: Rafał Miłecki
> Date: Thu Jan 4 08:05:34 2018 +0100
>
> mtd: ofpart: add of_match_table with "fixed-partitions"
>
> This allows using this parser with any flash driver that takes care of
> setting of_node (using mtd_set_of_node helper) correct
On Tue, 16 Jan 2018 08:43:40 +0100
Arnd Bergmann wrote:
> The omap2 onenand driver is now available for compile-testing, which
> uncovers a warning in configurations that have a 64-bit resource_size_t:
>
> drivers/mtd/onenand/omap2.c: In function 'omap2_onenand_probe':
> drivers/mtd/onenand/omap
On Sat, 13 Jan 2018 17:56:16 +0100
Christophe JAILLET wrote:
> 'page_buf' and 'oob_buf' are allocated with 'devm_kzalloc()' and should not
> have __iommem decoration.
>
> Remove these decorations and some useless casting.
>
Applied.
Thanks,
Boris
> Signed-off-by: Christophe JAILLET
> ---
>
On Sat, 13 Jan 2018 17:56:16 +0100
Christophe JAILLET wrote:
> 'page_buf' and 'oob_buf' are allocated with 'devm_kzalloc()' and should not
> have __iommem decoration.
^ __iomem
No need to send a new version, I'll fix it when applying.
>
> Remove these decorations and some useless cast
On Thu, 11 Jan 2018 17:26:59 +0100
Nicolas Ferre wrote:
> Update Wenyou Yang email address.
> Take advantage of this update to move this entry to the MICROCHIP / ATMEL
> location and add the DT binding documentation link.
>
> Signed-off-by: Nicolas Ferre
> Acked-by: Wenyou Yang
Applied.
Than
On Fri, 12 Jan 2018 11:57:55 +0100
Arnd Bergmann wrote:
> On Fri, Jan 12, 2018 at 11:49 AM, Olof's autobuilder wrote:
> > Here are the build results from automated periodic testing.
> >
> > The tree being built was stable-rc, found at:
> >
> > URL:
> > git://git.kernel.org/pub/scm/linux/kernel/
Hi Christoph,
On Wed, 10 Jan 2018 16:48:17 +0100
Christoph Hellwig wrote:
> On Wed, Jan 10, 2018 at 04:25:22PM +0100, Boris Brezillon wrote:
> > On Wed, 10 Jan 2018 15:15:43 +
> > Robin Murphy wrote:
> >
> > > phys_to_dma() is an internal helper for c
didn't exist when the offending code was first merged, but it does now.
>
> Signed-off-by: Robin Murphy
Acked-by: Boris Brezillon
> ---
>
> Found by inspection and compile-tested only
>
> drivers/crypto/marvell/cesa.c | 19 ---
> 1 file changed, 1
On Tue, 9 Jan 2018 11:56:26 +0100
Maxime Ripard wrote:
> Now that we have support for per-plane alpha in the core, let's use it.
>
> Cc: Boris Brezillon
Acked-by: Boris Brezillon
> Signed-off-by: Maxime Ripard
> ---
> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
On Tue, 9 Jan 2018 11:56:25 +0100
Maxime Ripard wrote:
> Some drivers duplicate the logic to create a property to store a per-plane
> alpha.
>
> Let's create a helper in order to move that to the core.
>
> Cc: Boris Brezillon
Reviewed-by: Boris Brezillon
> Cc:
On Tue, 9 Jan 2018 11:56:21 +0100
Maxime Ripard wrote:
> Now that the core has a drm format helper to tell if a format embeds an
> alpha component in it, let's use it.
>
> Cc: Boris Brezillon
Acked-by: Boris Brezillon
> Signed-off-by: Maxime Ripard
> ---
> d
On Tue, 9 Jan 2018 11:56:20 +0100
Maxime Ripard wrote:
> There's a bunch of drivers that duplicate the same function to know if a
> particular format embeds an alpha component or not.
>
> Let's create a helper to avoid duplicating that logic.
>
> Cc: Boris Br
On Mon, 8 Jan 2018 15:01:38 +0100
Arnd Bergmann wrote:
> On Mon, Jan 8, 2018 at 2:44 PM, gregkh wrote:
> > On Mon, Jan 08, 2018 at 02:16:25PM +0100, Arnd Bergmann wrote:
> >> On Mon, Jan 8, 2018 at 12:25 PM, kernelci.org bot
> >> wrote:
> >> >
> >> > stable-rc/linux-4.4.y build: 178 builds
Hi Arnd,
On Mon, 8 Jan 2018 14:16:25 +0100
Arnd Bergmann wrote:
> On Mon, Jan 8, 2018 at 12:25 PM, kernelci.org bot wrote:
> >
> > stable-rc/linux-4.4.y build: 178 builds: 4 failed, 174 passed, 8 errors
> > (v4.4.110-18-g5da3d9af3a4b)
> > Full Build Summary:
> > https://kernelci.org/build/sta
On Mon, 8 Jan 2018 08:23:02 +0100
Daniel Lezcano wrote:
> On 07/01/2018 19:44, Alexandre Belloni wrote:
> > On 07/01/2018 at 19:07:13 +0100, Daniel Lezcano wrote:
> >> On 05/01/2018 15:30, Alexandre Belloni wrote:
> >>> With the new TCB clocksource driver, atmel platforms are now able to boot
Hi Cyrille,
On Sun, 24 Dec 2017 05:36:04 +0100
Cyrille Pitchen wrote:
> This patch has two purposes:
>
> 1 - To fix the compatible issue between the MTD and SPI sub-systems
>
> The MTD sub-system has no particular requirement about the memory areas it
> uses. Especially, ubifs is well known fo
On Tue, 26 Dec 2017 14:59:00 +0100
Cyrille Pitchen wrote:
> Hi Vignesh
>
> Le 26/12/2017 à 14:42, Vignesh R a écrit :
> > Hi Cyrille,
> >
> > Thanks for doing this series! One comment below.
> >
> > On 24-Dec-17 10:06 AM, Cyrille Pitchen wrote:
> > [...]
> >> diff --git a/drivers/mtd/spi-nor
Hi Rob,
On Tue, 26 Dec 2017 12:29:34 -0600
Rob Herring wrote:
> >> > > > +Optional properties
> >> > > > +---
> >> > > > +- reg: static address. Only valid is the device has a static
> >> > > > address.
> >> > > > +- i3c-dynamic-address: dynamic address to be assigned to this
>
On Fri, 22 Dec 2017 11:09:15 +0100
Andrea Adami wrote:
> On Wed, Dec 20, 2017 at 6:45 AM, Wei Yongjun wrote:
> > Fixes the following sparse warnings:
> >
> > drivers/mtd/parsers/sharpslpart.c:222:6: warning:
> > symbol 'sharpsl_nand_cleanup_ftl' was not declared. Should it be static?
> >
> > Si
undone nand_scan_tail() as Boris Brezillon noted.
>
> drivers/mtd/nand/vf610_nfc.c | 25 +++--
> 1 file changed, 15 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/mtd/nand/vf610_nfc.c b/drivers/mtd/nand/vf610_nfc.c
> index 8037d4b48a05..2dac25a8ccbf 1006
undone nand_scan_tail() as Boris Brezillon noted.
>
> drivers/mtd/nand/vf610_nfc.c | 25 +++--
> 1 file changed, 15 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/mtd/nand/vf610_nfc.c b/drivers/mtd/nand/vf610_nfc.c
> index 8037d4b48a05..2dac25a8ccbf 1006
On Sat, 23 Dec 2017 00:43:14 +0300
Alexey Khoroshilov wrote:
> vf610_nfc_probe() misses error handling of mtd_device_register().
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Alexey Khoroshilov
> ---
> drivers/mtd/nand/vf610_nfc.c | 5 -
> 1 file ch
On Wed, 20 Dec 2017 12:06:45 -0600
Rob Herring wrote:
> On Sat, Dec 16, 2017 at 07:35:37PM +0100, Boris Brezillon wrote:
> > On Sat, 16 Dec 2017 11:20:40 -0600
> > Rob Herring wrote:
> >
> > > On Thu, Dec 14, 2017 at 04:16:08PM +0100, Boris Brezillon wrote:
&
On Mon, 18 Dec 2017 16:49:34 +0100
Boris Brezillon wrote:
> Historically branches targeting the next release (and pulled in
> linux-next) have been pushed on the l2-mtd repo and fixes branches on
> the linux-mtd one. Now that all MTD maintainers have RW permissions on
> linux-mtd t
1301 - 1400 of 4538 matches
Mail list logo