From: Scott Wood Date: Thu, 14 Aug 2014 19:10:11 -0500 Subject: [U-Boot] [PATCH 2/3] mtd, nand: move common functions from cmd_nand.c to common place In-Reply-To: <53E88186.9000807@denx.de> References: <1405323547-32588-1-git-send-email-hs@denx.de> <1405323547-32588-3-git-send-email-hs@denx.de> <1406680154.29414.257.camel@snotra.buserror.net> <53E88186.9000807@denx.de> Message-ID: <1408061411.7427.233.camel@snotra.buserror.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > >> Cc: Scott Wood > >> Cc: Tom Rini > >> --- > >> 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 > >> +#include > >> +#include > > > > 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