Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753486AbeAKAjx (ORCPT + 1 other); Wed, 10 Jan 2018 19:39:53 -0500 Received: from mail-sn1nam01on0081.outbound.protection.outlook.com ([104.47.32.81]:64333 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752827AbeAKAjw (ORCPT ); Wed, 10 Jan 2018 19:39:52 -0500 From: Jolly Shah To: Aishwarya Pant CC: "ard.biesheuvel@linaro.org" , "mingo@kernel.org" , "gregkh@linuxfoundation.org" , "matt@codeblueprint.co.uk" , "sudeep.holla@arm.com" , "hkallweit1@gmail.com" , "keescook@chromium.org" , "dmitry.torokhov@gmail.com" , "michal.simek@xilinx.com" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Rajan Vaja Subject: RE: [PATCH] drivers: firmware: xilinx: Add ZynqMP firmware driver Thread-Topic: [PATCH] drivers: firmware: xilinx: Add ZynqMP firmware driver Thread-Index: AQHTiM0g2f3A6E6gq0GywrfELV4X3aNrdoGAgAJgqjA= Date: Thu, 11 Jan 2018 00:39:47 +0000 Message-ID: References: <1515449227-5096-1-git-send-email-jollys@xilinx.com> <20180109121911.GA18770@mordor.localdomain> In-Reply-To: <20180109121911.GA18770@mordor.localdomain> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=JOLLYS@xilinx.com; x-originating-ip: [73.162.184.228] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM2PR0201MB1039;7:hmoBFyNPV/BEv1LOEt5gYhKDUTwQrhull1f5hNi5eIRLqR1B74VBgu7y5mcuW/uuHdbiDZyFyvbVm2naWilPEsVEawAD04jbWDLVYOVjUVvDa/NDlgzdXr7wC98aatE6tkQekBLTop0YrOLMDbbJONyQH1v3G4f4Lno1hZs6xQwGfL3ON8Q40tD1gwqZ3FvL9/eMxrX0RMFmPhJWaJ/Vn54lPDZfipB6JaFRe96LcyN5J4whAZDjbYd+Pfk0KfPP x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10009020)(39380400002)(366004)(346002)(39860400002)(376002)(396003)(13464003)(24454002)(189003)(199004)(6246003)(8936002)(59450400001)(66066001)(53546011)(6506007)(102836004)(14454004)(106356001)(25786009)(81166006)(81156014)(2906002)(316002)(72206003)(99286004)(107886003)(478600001)(105586002)(7696005)(8676002)(76176011)(55016002)(9686003)(33656002)(39060400002)(97736004)(6916009)(2950100002)(7416002)(68736007)(7736002)(305945005)(1411001)(53936002)(229853002)(74316002)(4326008)(54906003)(6116002)(3660700001)(3846002)(86362001)(5660300001)(6436002)(3280700002)(2900100001)(5250100002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR0201MB1039;H:DM2PR0201MB0767.namprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 3a457929-f4e0-4302-b630-08d5588bd15b x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020058)(4652020)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020);SRVR:DM2PR0201MB1039; x-ms-traffictypediagnostic: DM2PR0201MB1039: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917)(9452136761055)(85827821059158)(258649278758335)(192813158149592); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231023)(944501127)(93006095)(93001095)(6055026)(6041268)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:DM2PR0201MB1039;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:DM2PR0201MB1039; x-forefront-prvs: 0549E6FD50 x-microsoft-antispam-message-info: oQsgrna+fpwvecyLZOSYNtj7E5tr+stXrKhJE44NpknBiUoDEQ84fxB1hxnaj2eNckGZOljFUAFC7YR5SGAvAw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a457929-f4e0-4302-b630-08d5588bd15b X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jan 2018 00:39:47.7221 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0201MB1039 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Thanks Aishwarya for the review, > -----Original Message----- > From: Aishwarya Pant [mailto:aishpant@gmail.com] > Sent: Tuesday, January 09, 2018 4:19 AM > To: Jolly Shah > Cc: ard.biesheuvel@linaro.org; mingo@kernel.org; > gregkh@linuxfoundation.org; matt@codeblueprint.co.uk; > sudeep.holla@arm.com; hkallweit1@gmail.com; keescook@chromium.org; > dmitry.torokhov@gmail.com; michal.simek@xilinx.com; linux-arm- > kernel@lists.infradead.org; linux-kernel@vger.kernel.org; Jolly Shah > ; Rajan Vaja > Subject: Re: [PATCH] drivers: firmware: xilinx: Add ZynqMP firmware driver > > On Mon, Jan 08, 2018 at 02:07:07PM -0800, Jolly Shah wrote: > > This patch is adding communication layer with firmware. > > Firmware driver provides an interface to firmware APIs. > > Interface APIs can be used by any driver to communicate to > > PMUFW(Platform Management Unit). All requests go through ATF. > > Firmware-debug provides debugfs interface to all APIs. > > Firmware-ggs provides read/write interface to > > global storage registers. > > > > Signed-off-by: Jolly Shah > > Signed-off-by: Rajan Vaja > > --- > > .../firmware/xilinx/xlnx,zynqmp-firmware.txt | 16 + > > arch/arm64/Kconfig.platforms | 1 + > > drivers/firmware/Kconfig | 1 + > > drivers/firmware/Makefile | 1 + > > drivers/firmware/xilinx/Kconfig | 4 + > > drivers/firmware/xilinx/Makefile | 4 + > > drivers/firmware/xilinx/zynqmp/Kconfig | 23 + > > drivers/firmware/xilinx/zynqmp/Makefile | 5 + > > drivers/firmware/xilinx/zynqmp/firmware-debug.c | 540 +++++++++++ > > drivers/firmware/xilinx/zynqmp/firmware-ggs.c | 298 ++++++ > > drivers/firmware/xilinx/zynqmp/firmware.c | 1024 > ++++++++++++++++++++ > > .../linux/firmware/xilinx/zynqmp/firmware-debug.h | 32 + > > include/linux/firmware/xilinx/zynqmp/firmware.h | 573 +++++++++++ > > 13 files changed, 2522 insertions(+) > > create mode 100644 > Documentation/devicetree/bindings/firmware/xilinx/xlnx,zynqmp-firmware.txt > > create mode 100644 drivers/firmware/xilinx/Kconfig > > create mode 100644 drivers/firmware/xilinx/Makefile > > create mode 100644 drivers/firmware/xilinx/zynqmp/Kconfig > > create mode 100644 drivers/firmware/xilinx/zynqmp/Makefile > > create mode 100644 drivers/firmware/xilinx/zynqmp/firmware-debug.c > > create mode 100644 drivers/firmware/xilinx/zynqmp/firmware-ggs.c > > create mode 100644 drivers/firmware/xilinx/zynqmp/firmware.c > > create mode 100644 include/linux/firmware/xilinx/zynqmp/firmware-debug.h > > create mode 100644 include/linux/firmware/xilinx/zynqmp/firmware.h > > > > +static ssize_t ggs_store(struct device *dev, > > + struct device_attribute *attr, > > + const char *buf, > > + size_t count, > > + u32 reg) > > +{ > > + if (!dev || !attr || !buf || !count || reg >= GSS_NUM_REGS) > > + return -EINVAL; > > + > > + return write_register(buf, count, IOCTL_WRITE_GGS, reg); > > +} > > + > > +/* GGS register show functions */ > > +#define GGS0_SHOW(N) \ > > + ssize_t ggs##N##_show(struct device *dev, \ > > + struct device_attribute *attr, \ > > + char *buf) \ > > + { \ > > + return ggs_show(dev, attr, buf, N); \ > > + } > > + > > +static GGS0_SHOW(0); > > +static GGS0_SHOW(1); > > +static GGS0_SHOW(2); > > +static GGS0_SHOW(3); > > + > > +/* GGS register store function */ > > +#define GGS0_STORE(N) \ > > + ssize_t ggs##N##_store(struct device *dev, \ > > + struct device_attribute *attr, \ > > + const char *buf, \ > > + size_t count) \ > > + { \ > > + return ggs_store(dev, attr, buf, count, N); \ > > + } > > + > > +static GGS0_STORE(0); > > +static GGS0_STORE(1); > > +static GGS0_STORE(2); > > +static GGS0_STORE(3); > > + > > +/* GGS register device attributes */ > > +static DEVICE_ATTR_RW(ggs0); > > +static DEVICE_ATTR_RW(ggs1); > > +static DEVICE_ATTR_RW(ggs2); > > +static DEVICE_ATTR_RW(ggs3); > > Hi > > You added some files to the sysfs ABI. These interfaces should be documented in > Documentation/ABI. > Sure. Will add it in next version. Thanks, Jolly Shah