From patchwork Fri Oct 19 07:06:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 149241 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp2948886lji; Fri, 19 Oct 2018 00:07:06 -0700 (PDT) X-Google-Smtp-Source: ACcGV61M/ewldo+iAZtmPRJzFTJO4i6XySxjBsE3Xi5hhSOpLi6iXJZkx1WuGQ2/1NMsp5gvGVUr X-Received: by 2002:a17:902:24c:: with SMTP id 70-v6mr23401938plc.324.1539932826229; Fri, 19 Oct 2018 00:07:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539932826; cv=none; d=google.com; s=arc-20160816; b=P7dtDZebJLKe64k7/GAxuo4P7DJkGl/KLOz+Fhr4+w7VL1zlBuH9IasX4I3l68ZQmy rRMmeepBjaK+h7lHLKcjIgwGil8eXbqjNsdNEsv/G7GWTlqs7KqR0ZjyKQGnGqAzBfpC F4jznhq5VomtiEV8jRQ71ekxTgxQk/zjzDcNwDpNjNmrxcAVWRSHzx7P9crLVTFWfbuj 5LmKKHgNiwcUMqr6yWbVEk8cG7kafX9z/inn2ZsyHZCrvkUraiFAeWh/N3W82Au3aYAS 0Z8/S3Qb/kcveyWks6x+K9I/mSDSZkhQvyLeFybXcNTp59MiAX70UykjDjHflC6aheiG e8Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:dkim-signature :dkim-signature; bh=XcKhjGZ1tTyr1BsYogj0K7BRrS8cqHFDJZiid8nzktk=; b=a4TinNEg97dgiNTwd8UaAHDgjUkpLOmvM0Y9zucdC1p3+rGzJbQ+KN78w9tcMbf38E 9U9t3uzBXm3qIofSDgokJ6wingIdatXpNIVN+qtPSFbBE9dm4Hy2gnAPdTkQNsCTZh45 OxxVQYXpthzuR1BPkktn4iI7rYJD/RVDFmtOjP1OLxmkklMDJ3oyXoBXJcH3mFth5yOg yV8zh69RMqcGXX/Lhi8wadjuoiC+//W4KlHxx3VWDNg2ExejSpZU1QT8WF+VTafK68P+ nLSIWWrQ4UyGUHcLUxdAdTztzmwD8uZp2FBl1Pi1s0A4oRkdb/LJ8t/q5jNp+NULT1WW 99bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=OujGfeT4; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=UF3y5vOj; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id u66-v6si23992074pgu.94.2018.10.19.00.07.06 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Oct 2018 00:07:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=OujGfeT4; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=UF3y5vOj; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=XcKhjGZ1tTyr1BsYogj0K7BRrS8cqHFDJZiid8nzktk=; b=Ouj GfeT4Lc8V4a4MN2KwGYQcAq+TiWBwcHc/CZh0QFIYzk0yct6BXDiktED7rxyco3xdhQlSlfAhokBN ZDFivY53ttYWsZMHe/cbMdtJgf00f1ZVjRt0oHVUi1q6TV3ZGneC2UEWyruU8vDH6iSmg+LQ1nO8M srZj3y/HjpX9itVm73naaaN6gjCRsz2fqnzTZCXLRbxzTx/cmjeej9p+XrTBujEEUYn8r5vbDqVMb IvOy7OzS4H3/0dHMAlInk7cfs2uzOEVcTihNcJrUxyUMxk7mzKLm++xnNVM9JQ2QwxAQfVzc+ncrr b8UhXAk+pZ5De5UODlRmzI1pGuvG83A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gDOrt-0003gY-IV; Fri, 19 Oct 2018 07:06:45 +0000 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gDOro-0003dW-Sm for linux-mtd@lists.infradead.org; Fri, 19 Oct 2018 07:06:42 +0000 Received: by mail-lj1-x244.google.com with SMTP id j4-v6so29912035ljc.12 for ; Fri, 19 Oct 2018 00:06:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Zvmdz3n7BsO+Xv43kO7eT02mt7NsHGctgglnzRqWYeY=; b=UF3y5vOjQySXVeUhNwPA2INR7ofUv6Hr5EUYHFmbMMYizaYOBGDX2EEMHKIlR4/2/W 8MUfJHoNzNlD11+9baC5GEnbd1jqod34O0+QtDrDy+0xA3WibrjowVeuEluqSDp1wSuD YwkYdx/L8dSHvIX275InqNEuUvf7vf5XPsjW4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Zvmdz3n7BsO+Xv43kO7eT02mt7NsHGctgglnzRqWYeY=; b=FnLAh7Gc/nVDDITgumDCPwB9WuWbCBPssdfzYWFhqzH5fGPPpX4oVhNFw92y3mu2Px uB/5FMykcVclT6whMBNplO7D3ii1S12CO4RH5L+Jk7cLmVNRVYIvMpMEoSX5kA0r0uu+ AaEQCWYc7R1EQEbzLCyzdQd814/6t5TqklfCUsse091lEhk+og2ew5t+TPODqB8S72dA jTOrnZ+EHr2DaCzsUv4RH6xqJ5b/LVRkeOTU1yRr1hSCtiMnkqRljJkTG9QBZN58WEuf OEQRCvGQbwiRQaSv7yhOGa3vBP1XPLiJt3O4RHHAbsijRgKMCkrHOX+vfhdjROzVMiO+ lKlQ== X-Gm-Message-State: ABuFfohyo5pEeCjQv+9+jpoW5/ZRdj0EN0pD186pvfNsWbFTVy0w1EGY dNLovBu0QLJkkDO2mStUOgEozQ== X-Received: by 2002:a2e:990a:: with SMTP id v10-v6mr22709105lji.22.1539932786061; Fri, 19 Oct 2018 00:06:26 -0700 (PDT) Received: from localhost.bredbandsbolaget (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id m12-v6sm5537lfj.39.2018.10.19.00.06.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Oct 2018 00:06:24 -0700 (PDT) From: Linus Walleij To: David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , linux-mtd@lists.infradead.org Subject: [PATCH 1/3] mtd: Move Redboot partition parser Date: Fri, 19 Oct 2018 09:06:20 +0200 Message-Id: <20181019070622.26661-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181019_000640_936662_C270853D X-CRM114-Status: GOOD ( 19.10 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:244 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org This moves the Redboot partition parser down to the parsers subdirectory. Signed-off-by: Linus Walleij --- drivers/mtd/Kconfig | 50 ----------------------------- drivers/mtd/Makefile | 1 - drivers/mtd/parsers/Kconfig | 50 +++++++++++++++++++++++++++++ drivers/mtd/parsers/Makefile | 1 + drivers/mtd/{ => parsers}/redboot.c | 0 5 files changed, 51 insertions(+), 51 deletions(-) rename drivers/mtd/{ => parsers}/redboot.c (100%) -- 2.17.2 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index c77f537323ec..4523c875f29a 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig @@ -22,56 +22,6 @@ config MTD_TESTS WARNING: some of the tests will ERASE entire MTD device which they test. Do not use these tests unless you really know what you do. -config MTD_REDBOOT_PARTS - tristate "RedBoot partition table parsing" - help - RedBoot is a ROM monitor and bootloader which deals with multiple - 'images' in flash devices by putting a table one of the erase - blocks on the device, similar to a partition table, which gives - the offsets, lengths and names of all the images stored in the - flash. - - If you need code which can detect and parse this table, and register - MTD 'partitions' corresponding to each image in the table, enable - this option. - - You will still need the parsing functions to be called by the driver - for your particular device. It won't happen automatically. The - SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for - example. - -if MTD_REDBOOT_PARTS - -config MTD_REDBOOT_DIRECTORY_BLOCK - int "Location of RedBoot partition table" - default "-1" - help - This option is the Linux counterpart to the - CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK RedBoot compile time - option. - - The option specifies which Flash sectors holds the RedBoot - partition table. A zero or positive value gives an absolute - erase block number. A negative value specifies a number of - sectors before the end of the device. - - For example "2" means block number 2, "-1" means the last - block and "-2" means the penultimate block. - -config MTD_REDBOOT_PARTS_UNALLOCATED - bool "Include unallocated flash regions" - help - If you need to register each unallocated flash region as a MTD - 'partition', enable this option. - -config MTD_REDBOOT_PARTS_READONLY - bool "Force read-only for RedBoot system images" - help - If you need to force read-only for 'RedBoot', 'RedBoot Config' and - 'FIS directory' images, enable this option. - -endif # MTD_REDBOOT_PARTS - config MTD_CMDLINE_PARTS tristate "Command line partition table parsing" depends on MTD diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile index 93473d215a38..58fc327a5276 100644 --- a/drivers/mtd/Makefile +++ b/drivers/mtd/Makefile @@ -8,7 +8,6 @@ obj-$(CONFIG_MTD) += mtd.o mtd-y := mtdcore.o mtdsuper.o mtdconcat.o mtdpart.o mtdchar.o obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o -obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o obj-$(CONFIG_MTD_AFS_PARTS) += afs.o obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o diff --git a/drivers/mtd/parsers/Kconfig b/drivers/mtd/parsers/Kconfig index ee5ab994132f..fccf1950e92d 100644 --- a/drivers/mtd/parsers/Kconfig +++ b/drivers/mtd/parsers/Kconfig @@ -14,3 +14,53 @@ config MTD_SHARPSL_PARTS This provides the read-only FTL logic necessary to read the partition table from the NAND flash of Sharp SL Series (Zaurus) and the MTD partition parser using this code. + +config MTD_REDBOOT_PARTS + tristate "RedBoot partition table parsing" + help + RedBoot is a ROM monitor and bootloader which deals with multiple + 'images' in flash devices by putting a table one of the erase + blocks on the device, similar to a partition table, which gives + the offsets, lengths and names of all the images stored in the + flash. + + If you need code which can detect and parse this table, and register + MTD 'partitions' corresponding to each image in the table, enable + this option. + + You will still need the parsing functions to be called by the driver + for your particular device. It won't happen automatically. The + SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for + example. + +if MTD_REDBOOT_PARTS + +config MTD_REDBOOT_DIRECTORY_BLOCK + int "Location of RedBoot partition table" + default "-1" + help + This option is the Linux counterpart to the + CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK RedBoot compile time + option. + + The option specifies which Flash sectors holds the RedBoot + partition table. A zero or positive value gives an absolute + erase block number. A negative value specifies a number of + sectors before the end of the device. + + For example "2" means block number 2, "-1" means the last + block and "-2" means the penultimate block. + +config MTD_REDBOOT_PARTS_UNALLOCATED + bool "Include unallocated flash regions" + help + If you need to register each unallocated flash region as a MTD + 'partition', enable this option. + +config MTD_REDBOOT_PARTS_READONLY + bool "Force read-only for RedBoot system images" + help + If you need to force read-only for 'RedBoot', 'RedBoot Config' and + 'FIS directory' images, enable this option. + +endif # MTD_REDBOOT_PARTS diff --git a/drivers/mtd/parsers/Makefile b/drivers/mtd/parsers/Makefile index 5b1bcc3d90d9..d8418bf6804a 100644 --- a/drivers/mtd/parsers/Makefile +++ b/drivers/mtd/parsers/Makefile @@ -1,2 +1,3 @@ obj-$(CONFIG_MTD_PARSER_TRX) += parser_trx.o obj-$(CONFIG_MTD_SHARPSL_PARTS) += sharpslpart.o +obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o diff --git a/drivers/mtd/redboot.c b/drivers/mtd/parsers/redboot.c similarity index 100% rename from drivers/mtd/redboot.c rename to drivers/mtd/parsers/redboot.c