From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4809C38A2A for ; Fri, 8 May 2020 19:22:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 90DFC21974 for ; Fri, 8 May 2020 19:22:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726811AbgEHTV5 (ORCPT ); Fri, 8 May 2020 15:21:57 -0400 Received: from mga09.intel.com ([134.134.136.24]:41431 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726807AbgEHTV5 (ORCPT ); Fri, 8 May 2020 15:21:57 -0400 IronPort-SDR: TxLCXveHalteOVedoKqHRLv0VSbSLPGXJ8ynLSq0G8mu0My3SJ/jXXYyZJgdeaS9Lsy7PS2bm9 VZPWlhU41DFA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2020 12:21:50 -0700 IronPort-SDR: WtEjrSXbSnOWs5TBQNk5R7op6mLpBt6gGXyX97G5Ac5a/xqHKi5k55kCWw70iiMy8Jm7xxgn8G lvOn7hsN4uMw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,368,1583222400"; d="scan'208";a="462690689" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga006.fm.intel.com with ESMTP; 08 May 2020 12:21:41 -0700 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1jX8Z6-005T5P-5V; Fri, 08 May 2020 22:21:44 +0300 Date: Fri, 8 May 2020 22:21:44 +0300 From: Andy Shevchenko To: Serge Semin Cc: Mark Brown , Serge Semin , Georgy Vlasov , Ramil Zaripov , Alexey Malahov , Thomas Bogendoerfer , Paul Burton , Ralf Baechle , Arnd Bergmann , Allison Randal , Gareth Williams , Rob Herring , linux-mips@vger.kernel.org, devicetree@vger.kernel.org, Stephen Boyd , Thomas Gleixner , YueHaibing , Jarkko Nikula , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 13/17] spi: dw: Initialize paddr in DW SPI MMIO private data Message-ID: <20200508192144.GT185537@smile.fi.intel.com> References: <20200508132943.9826-1-Sergey.Semin@baikalelectronics.ru> <20200508132943.9826-14-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200508132943.9826-14-Sergey.Semin@baikalelectronics.ru> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org On Fri, May 08, 2020 at 04:29:38PM +0300, Serge Semin wrote: > This field is used only for the DW SPI DMA code initialization, that's > why there were no problems with it being uninitialized in Dw SPI MMIO > driver. Since in a further patch we are going to introduce the DW SPI DMA > support in the MMIO version of the driver, lets set the field with the > physical address of the DW SPI controller registers region. ... > - dws->regs = devm_platform_ioremap_resource(pdev, 0); > + mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + dws->regs = devm_ioremap_resource(&pdev->dev, mem); There is a helper dws->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &mem); > if (IS_ERR(dws->regs)) { > dev_err(&pdev->dev, "SPI region map failed\n"); > return PTR_ERR(dws->regs); > } > + dws->paddr = mem->start; > > dws->irq = platform_get_irq(pdev, 0); > if (dws->irq < 0) > -- > 2.25.1 > -- With Best Regards, Andy Shevchenko