From patchwork Fri Oct 19 07:48:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 986600 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uuPYgfs4"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42bymM1XSfz9sBj for ; Fri, 19 Oct 2018 18:51:47 +1100 (AEDT) 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=n2Qn4CzWM8pXUhApcbbS0JR+yjc5HRCIp8Iux1tOA4s=; b=uuP Ygfs4Fol+XYMwqHYClA7Kwsk4saBktdzjOHXcHTsSTcflN9aYVXFzoNm2i3imQT7HlrwFWHlcDHUn 1AxuCGxn7pk+oJDnQCNKBS/7KLuHAwWWRwVltF6MQ5k5Y8m6EFrzImkm1nFLC5BXPQh+epTXIwugv F0cnHI4i0DXRRfH80+DzEASqXJUA/C0rCjk9nnfpSrraB7Hq4tZFtO4DJk1vJlqCLxy7tda+rTL7a m2ua0UallG4S6dzfJ2ArnDv6+fYT5gCJBYUPEa8hSpodhryrE9dpDtK74SHEKfSRML3haRYoPROLm tFNz+H9izkaIKuTK+UyC13dBwoop/lg==; 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 1gDPZF-0005VZ-2d; Fri, 19 Oct 2018 07:51:33 +0000 Received: from mail.bootlin.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gDPXJ-0003Pc-2C for linux-mtd@lists.infradead.org; Fri, 19 Oct 2018 07:49:37 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id D5E8920E00; Fri, 19 Oct 2018 09:49:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (91-160-177-164.subs.proxad.net [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id 6CA5620379; Fri, 19 Oct 2018 09:49:11 +0200 (CEST) From: Boris Brezillon To: David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , linux-mtd@lists.infradead.org Subject: [PATCH v2 00/15] mtd: maps: physmap cleanups Date: Fri, 19 Oct 2018 09:48:53 +0200 Message-Id: <20181019074908.13226-1-boris.brezillon@bootlin.com> X-Mailer: git-send-email 2.14.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181019_004933_391475_278D40CA X-CRM114-Status: GOOD ( 16.75 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 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: Mark Rutland , devicetree@vger.kernel.org, Pawel Moll , Ian Campbell , Linus Walleij , Rob Herring , Kumar Gala , Ricardo Ribalda Delgado MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Hello, This is an attempt at merging physmap_of.c, gpio-addr-flash.c and physmap.c. The rational behind this decision is code sharing and consistency with what's done in other parts of the kernel: - physmap_of is just adding OF/DT support to the physmap logic, and we usually put that code in the pre-existing driver instead of creating a new one - gpio-addr-flash is just an extension of the physmap logic which is needed when the platform does not have enough native ADDR lines to address the whole flash. Again, I think this core belongs in the physmap driver Patches 1 to 9 are just cleanups, and are not really related to the merging of physmap_of and gpio-addr-flash into physmap.c. Patch 10 to 13 are doing the actual merging work, and patch 14 is documenting the addr-gpios property that has been added to support the gpio-addr-flash on DT platforms. Patch 15 is a cosmetic change proposed by Ricardo. Regards, Boris Boris Brezillon (13): mtd: maps: physmap: Add SPDX header mtd: maps: physmap: Rename ->map and ->mtd into ->maps and ->mtds mtd: maps: physmap: Use platform_get_resource() to retrieve iomem resources mtd: maps: physmap: Use dev_notice() and a %pR specifier mtd: maps: physmap: Use devm_ioremap_resource() mtd: maps: physmap: Remove the MAX_RESOURCES limitation mtd: maps: physmap: Check mtd_device_{parse_register,unregister}() ret code mtd: maps: physmap: Return -ENOMEM directly when info allocation fails mtd: maps: physmap: Fix coding style issues reported by checkpatch mtd: maps: Prepare merging of physmap and physmap_of mtd: maps: Merge physmap_of.c into physmap-core.c mtd: maps: Rename physmap_of_{versatile,gemini} into physmap-{versatile,gemini} mtd: maps: Merge gpio-addr-flash.c into physmap-core.c Ricardo Ribalda Delgado (2): dt-binding: mtd: physmap: Document the addr-gpios property mtd: maps: physmap: Invert logic on if/else branch .../devicetree/bindings/mtd/mtd-physmap.txt | 2 + drivers/mtd/maps/Kconfig | 27 +- drivers/mtd/maps/Makefile | 10 +- drivers/mtd/maps/gpio-addr-flash.c | 281 --------- drivers/mtd/maps/physmap-core.c | 655 +++++++++++++++++++++ .../maps/{physmap_of_gemini.c => physmap-gemini.c} | 2 +- .../maps/{physmap_of_gemini.h => physmap-gemini.h} | 2 +- ...{physmap_of_versatile.c => physmap-versatile.c} | 2 +- ...{physmap_of_versatile.h => physmap-versatile.h} | 2 +- drivers/mtd/maps/physmap.c | 280 --------- drivers/mtd/maps/physmap_of_core.c | 368 ------------ 11 files changed, 678 insertions(+), 953 deletions(-) delete mode 100644 drivers/mtd/maps/gpio-addr-flash.c create mode 100644 drivers/mtd/maps/physmap-core.c rename drivers/mtd/maps/{physmap_of_gemini.c => physmap-gemini.c} (98%) rename drivers/mtd/maps/{physmap_of_gemini.h => physmap-gemini.h} (90%) rename drivers/mtd/maps/{physmap_of_versatile.c => physmap-versatile.c} (99%) rename drivers/mtd/maps/{physmap_of_versatile.h => physmap-versatile.h} (90%) delete mode 100644 drivers/mtd/maps/physmap.c delete mode 100644 drivers/mtd/maps/physmap_of_core.c Acked-by: Linus Walleij