From patchwork Mon Oct 8 20:10:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 980783 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42TWh62FdBz9sj4 for ; Tue, 9 Oct 2018 07:10:46 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726691AbeJIDYL (ORCPT ); Mon, 8 Oct 2018 23:24:11 -0400 Received: from mail.bootlin.com ([62.4.15.54]:60827 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726393AbeJIDYL (ORCPT ); Mon, 8 Oct 2018 23:24:11 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 3090720CFE; Mon, 8 Oct 2018 22:10:40 +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 C38C320379; Mon, 8 Oct 2018 22:10:29 +0200 (CEST) From: Boris Brezillon To: David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , linux-mtd@lists.infradead.org Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree@vger.kernel.org, Ricardo Ribalda Delgado Subject: [PATCH 00/14] mtd: maps: physmap cleanups Date: Mon, 8 Oct 2018 22:10:13 +0200 Message-Id: <20181008201027.17952-1-boris.brezillon@bootlin.com> X-Mailer: git-send-email 2.14.1 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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. Let me know what you think of this rework. 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: Merge gpio-addr-flash.c into physmap-core.c mtd: maps: Rename physmap_of_{versatile,gemini} into physmap-{versatile,gemini} Ricardo Ribalda Delgado (1): dt-binding: mtd: physmap: Document the addr-gpios property .../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 | 651 +++++++++++++++++++++ .../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, 674 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