Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932720AbbLTDiS (ORCPT ); Sat, 19 Dec 2015 22:38:18 -0500 Received: from mail.kernel.org ([198.145.29.136]:58892 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754127AbbLTDiO (ORCPT ); Sat, 19 Dec 2015 22:38:14 -0500 Date: Sat, 19 Dec 2015 21:38:07 -0600 From: Rob Herring To: Sergei Ianovich Cc: linux-kernel@vger.kernel.org, Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , David Woodhouse , Brian Norris , Jeremy Kerr , Cyril Bur , Neelesh Gupta , Michael Ellerman , Joel Stanley , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:MEMORY TECHNOLOGY DEVICES (MTD)" Subject: Re: [PATCH v5] mtd: support BB SRAM on ICP DAS LP-8x4x Message-ID: <20151220033807.GC9883@rob-hp-laptop> References: <1397668667-27328-4-git-send-email-ynvich@gmail.com> <1450205941-15593-1-git-send-email-ynvich@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1450205941-15593-1-git-send-email-ynvich@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3038 Lines: 82 On Tue, Dec 15, 2015 at 09:58:53PM +0300, Sergei Ianovich wrote: > This provides an MTD device driver for 512kB of battery backed up SRAM > on ICPDAS LP-8X4X programmable automation controllers. > > SRAM chip is connected via FPGA and is not accessible without a driver, > unlike flash memory which is wired to CPU MMU. > > This SRAM becomes an excellent persisent storage of volatile process > data like counter values and sensor statuses. Storing those data in > flash or mmc card is not a viable solution. > > Signed-off-by: Sergei Ianovich > Reviewed-by: Brian Norris > --- > v4..v5 > * remove .owner from struct platform_driver > * constify struct of_device_id > for further Brian Norris comments: > * drop unused property from doc file > * move defconfig update to a different file > * drop extra match w/ of_match_device() > > v3..v4 for Brian Norris 'Reviewed-by' > * add doc file for DT binding > * move DTS binding to a different patch (8/21) > * drop unused include directive > * drop safely unused callback > * drop non-default partion probe types > * drop duplicate error checks > * drop duplicate error reporting > * fixed error message on MTD registeration > * fixed module removal routine > > v2..v3 > * no changes (except number 08/16 -> 10/21) > > v0..v2 > * use device tree > * use devm helpers where possible > > .../devicetree/bindings/mtd/sram-lp8x4x.txt | 20 +++ > drivers/mtd/devices/Kconfig | 14 ++ > drivers/mtd/devices/Makefile | 1 + > drivers/mtd/devices/sram_lp8x4x.c | 199 +++++++++++++++++++++ > 4 files changed, 234 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mtd/sram-lp8x4x.txt > create mode 100644 drivers/mtd/devices/sram_lp8x4x.c > > diff --git a/Documentation/devicetree/bindings/mtd/sram-lp8x4x.txt b/Documentation/devicetree/bindings/mtd/sram-lp8x4x.txt > new file mode 100644 > index 0000000..476934f > --- /dev/null > +++ b/Documentation/devicetree/bindings/mtd/sram-lp8x4x.txt > @@ -0,0 +1,20 @@ > +512kB battery backed up SRAM on LP-8x4x industrial computers > + > +Required properties: > +- compatible : should be "icpdas,sram-lp8x4x" No wildcards please. Otherwise looks fine. > + > +- reg: physical base addresses and region lengths of > + * IO memory range > + * SRAM page selector > + > +SRAM chip is connected via FPGA and is not accessible without a driver, > +unlike flash memory which is wired to CPU MMU. Driver is essentially > +an address translation routine. > + > +Example: > + > + sram@a000 { > + compatible = "icpdas,sram-lp8x4x"; > + reg = <0xa000 0x1000 > + 0x901e 0x1>; > + }; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/