[U-Boot] [PATCH 2/3] mtd, nand: move common functions from cmd_nand.c to common place
Scott Wood
scottwood at freescale.com
Fri Aug 15 02:10:11 CEST 2014
On Mon, 2014-08-11 at 10:40 +0200, Heiko Schocher wrote:
> Hello Scott,
>
> Am 30.07.2014 02:29, schrieb Scott Wood:
> > On Mon, 2014-07-14 at 09:39 +0200, Heiko Schocher wrote:
> >> move common functions from cmd_nand.c (for calculating offset
> >> and size from cmdline paramter) to common place, so they could
> >> used from other commands which use mtd partitions.
> >>
> >> For onenand the arg_off_size() is left in common/cmd_onenand.c.
> >> It should use now the common arg_off() function, but as I could
> >> not test onenand I let it there ...
> >>
> >> Signed-off-by: Heiko Schocher<hs at denx.de>
> >> Cc: Scott Wood<scottwood at freescale.com>
> >> Cc: Tom Rini<trini at ti.com>
> >> ---
> >> common/cmd_nand.c | 140 +++++++++---------------------------------------
> >> common/cmd_onenand.c | 19 +++----
> >> drivers/mtd/Makefile | 4 +-
> >> drivers/mtd/mtd_uboot.c | 114 +++++++++++++++++++++++++++++++++++++++
> >> include/linux/mtd/mtd.h | 7 +++
> >> 5 files changed, 154 insertions(+), 130 deletions(-)
> >> create mode 100644 drivers/mtd/mtd_uboot.c
> >
> > ACK the concept, some nits below.
> >
> > Have you given any more thought to formally taking over the
> > custodianship? If not, Tom, are you expecting another pull request from
> > me or were you going to apply Heiko's patches directly?
>
> I thinking about it, yes, but I am really busy ... but it seems
> nobody else want to volunteer ... I discussed with Wolfgang, if
> it would make sense to create a mtd branch ... so, if you could not
> longer maintain the nand branch, we can set it to orphaned (in the
> hope, someone will volunteer ...) and I can also handle the nand
> patches ... but Wolfgang is currently on vacation, so this step
> maybe take a while ...
OK. I can still review things now and then, but it's getting hard to be
responsive to the extent expected of a custodian.
> >> diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c
> >> new file mode 100644
> >> index 0000000..66e49c3
> >> --- /dev/null
> >> +++ b/drivers/mtd/mtd_uboot.c
> >> @@ -0,0 +1,114 @@
> >> +/*
> >> + * (C) Copyright 2014
> >> + * Heiko Schocher, DENX Software Engineering, hs at denx.de.
> >> + *
> >> + * SPDX-License-Identifier: GPL-2.0+
> >> + */
> >> +#include<common.h>
> >> +#include<linux/mtd/mtd.h>
> >> +#include<jffs2/jffs2.h>
> >
> > What do you use from the jffs2 header?
>
> Yes, good question ... because missing common mtd defines, like:
>
> struct mtd_device {
>
> found in include/jffs2/load_kernel.h
> used in common/cmd_nand.c for example ... its really time to
> cleanup the mtd subsystem!
>
> Where to move this common defines? include/linux/mtd/mtd.h ?
>
> But before the mtd/ubi/ubifs sync patches are not in mainline, I do
> not want change this ... maybe it is okay to do this in a second step?
Sure.
-Scott
More information about the U-Boot
mailing list