Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp552795ybk; Wed, 13 May 2020 07:05:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztMWswHjfExBM3P3bNMgMF9bmJQS4YoHcFCysN8EyXWdZq0FzIiX//qapXm9Y1G4AwSKYF X-Received: by 2002:a05:6402:3128:: with SMTP id dd8mr14190304edb.156.1589378703599; Wed, 13 May 2020 07:05:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589378703; cv=none; d=google.com; s=arc-20160816; b=cBpM4/csAsoDUkVfZ84fRbSXwHBjG9ov3YQfUcTsEoKCtnL2kQFLUyXBBoHqJk02nh 77bl9+YKcrv8Zl6nG/d5g0MKVBe5dxrJx98mOXs3VvCc7DQSLtVTAMmMx7DGkvVTaGcH ZfD1dFXwRjzWaaNRQfKSAsP3zJRCAptSqg7wuqDXW4IOBoCj6Ckk3WPTwDn9PVmvZ4b0 TTLK4i44yCBddB3PHQ7w7OA4/7y+cpz3bQALuqzTY7ZjvSqo6+qATx6ADkHG6FzIALoI eYQ2H/EGi8eW6yf/OD+9lzmLxPe2EpFOnLSD8tvO98fI5q7iLOxvMK/7fySQ6UQjgnHV gUDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:dkim-signature; bh=A+OlLqRACNNOR+B15M8BWD0qsApUgvAXmHiT56kH6sc=; b=X2P3v6QmzRc6nk4pxRXIQj6LkpWs6MjQrN3mbQ17SpdWgH+HBjGurt1NhixQ2WYVKU KQtseUm+Fso/fKdqiScCT6k0ILHTBr4z7LDpGj+/0SFQjfRcZEeHBF77hn3obrmgq45t oBKEXETUxh1VjNeL357NafjNNg3MQgxSIQwp6usO+wzAZRqGf9vge14HZD26KpBhrP6u f5CVPK1PtrKMqA6KGIWC86RWn/7AzNlvFSq6+dMBN8QCdw6L81P/lES0iWUEvA56eVlo HxxtFs4cBlLugSU8PaE/rCGhcIVFOoZVjHC8rvNuRhE1ChrhH117XcJVhbimsT+zMDew 41GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=Dkxxsx7y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si2129057ejc.470.2020.05.13.07.04.39; Wed, 13 May 2020 07:05:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=Dkxxsx7y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388793AbgEMOAw (ORCPT + 99 others); Wed, 13 May 2020 10:00:52 -0400 Received: from esa1.microchip.iphmx.com ([68.232.147.91]:48473 "EHLO esa1.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388780AbgEMOAt (ORCPT ); Wed, 13 May 2020 10:00:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1589378449; x=1620914449; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vowUNbP3S5lXJc8g2i7fvP/xMewlWoQteI1QXHomxRg=; b=Dkxxsx7ys9jt8N2poRllmk0CF+Rao+H/M16WPyqXeXfxow7qV0WhR9GF QD/+xdK9z8AcRJpV/6hN8/NhyrWvPsvVUoDsL+aPKJXF9zvGzjx99Y65b LFHm9FKEeg5ZPwezdjl2j6CDyvoJfvPEeWbor4/p/7q/aJRpqzjIU9iqm bkI3oS52dgPnEg3YkS+Qt+B0CCT1DFEa5dwDEn/CR75FWdw7XNR5LL9c0 zIJZ1wsij6s07CMEkPuT9UwikP40WYqldPFV6JMlw7A2OLFNR9UlHJOmS CQQMwPYtpPbJyv47wb8gCvM18j9+pYq6rqdmOX9nLyqQGRLO2X1//w0Q3 g==; IronPort-SDR: 4D+Er6POtXMlAwo49Pt9+FrHQxpT0FtL6XCAFrdjh8D85kr8b+ihfNzJkVyJV57ueigB/6nmES HZkzzmLvPZFbhOnNn5afasAvzj7rCLYCOzzftWzS3RXF1BTi5Ilg0QwQSm8tPZ2BZQEragPEjs lNomrfglmmjicbZ0fKgO8e8NiYrWAn2EHZw00uB81vfMrsGlogID8sGmmvO3oqyQK5nAQYNRcv 6JnDeHwLAJduSg9hyvpSL+NntsrEMOarv8k6x0mbAfZBjtBve0O4aPFcINEIQptD03XfwmVBvC 9T4= X-IronPort-AV: E=Sophos;i="5.73,388,1583218800"; d="scan'208";a="79447467" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 13 May 2020 07:00:48 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 13 May 2020 07:00:50 -0700 Received: from soft-dev15.microsemi.net (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Wed, 13 May 2020 07:00:46 -0700 From: Lars Povlsen To: Mark Brown , SoC Team CC: Lars Povlsen , Microchip Linux Driver Support , , , , , Alexandre Belloni Subject: [PATCH 03/10] spi: dw: Add support for client driver memory operations Date: Wed, 13 May 2020 16:00:24 +0200 Message-ID: <20200513140031.25633-4-lars.povlsen@microchip.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200513140031.25633-1-lars.povlsen@microchip.com> References: <20200513140031.25633-1-lars.povlsen@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This minor change allow dw-spi drivers to register spi_controller_mem_ops memory operations if the platform supports it. Reviewed-by: Alexandre Belloni Signed-off-by: Lars Povlsen --- drivers/spi/spi-dw.c | 3 +++ drivers/spi/spi-dw.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c index 32997f28fa5bb..d0c611c42421e 100644 --- a/drivers/spi/spi-dw.c +++ b/drivers/spi/spi-dw.c @@ -527,6 +527,9 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws) /* Basic HW init */ spi_hw_init(dev, dws); + /* Memory ops? */ + master->mem_ops = dws->mem_ops; + if (dws->dma_ops && dws->dma_ops->dma_init) { ret = dws->dma_ops->dma_init(dws); if (ret) { diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h index ed6e47b3f50da..8ecccbde10a20 100644 --- a/drivers/spi/spi-dw.h +++ b/drivers/spi/spi-dw.h @@ -3,6 +3,7 @@ #define DW_SPI_HEADER_H #include +#include #include /* Register offsets */ @@ -116,6 +117,7 @@ struct dw_spi { u16 bus_num; u16 num_cs; /* supported slave numbers */ void (*set_cs)(struct spi_device *spi, bool enable); + const struct spi_controller_mem_ops *mem_ops; /* Current message transfer state info */ size_t len; -- 2.26.2