Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1012715pxx; Thu, 29 Oct 2020 22:34:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8bzMKnMjbjXXvImRqbnOAUj+UW32XAMO82N0LvYiuKilfrrESNOPUZOEX09Mix8yRdIct X-Received: by 2002:aa7:d394:: with SMTP id x20mr516744edq.14.1604036040175; Thu, 29 Oct 2020 22:34:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604036040; cv=none; d=google.com; s=arc-20160816; b=l2jlvneVaXZuUg330w808R1DvnxcgOOD+MwSFZ1uOKjRQkph5r4lmME6ihj/wLCgNG tGQqYwm4WIRb4Np4ASFIKHDitw7LV/DoIxFWeKbwLZR2qbp5AFe9kNiL045rgLvpVx/6 W9HClAWThZ0WlJKwDUyuI7XVnLhOJ1dC7KrZFS6UOtsSDD/97gFUHEkTzna/QZggGAtE X+UCUQBaOpbOu3wS5XvCgfgl81Hw1wVhAzy1TMAbNXCjrv+hK+e7sgSV5C3Lznh6Pa4i Zt8ddmd98oeot6mI+giJ4tgXu8kI7onMy7ONc1l5mnsUO83TRjdiAloKpPi/FAvJQgQN p7aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:ironport-sdr:ironport-sdr; bh=nMWYLIGxiEMDBtNHhsB7guLyyeEZIEJLjBwD2N7wStY=; b=LUvZ7D49PCxtswD0OvlSUFkTBGgzhVFZ2LpU6LmXyOnEBGXngUhSbn9VU+WehSn2dY /VhuI23SJnFFYyQBEAJJYvEyFiwsp+5tOD4MeEVPI+WU7crmVczX4T+pDtDJhknBzY4s eMokB3yZkDkqOEiMcmvcRpatJ5S3J8hEPvC+ITnFQHLx+zhD4bgUsfRgqUxgv3BFH8gw Ma27UOprZwZsJNMHJnjJsp0fkvYSc4RKSCgn5jZKM1+yRCB6IQnU0CauVxnNtLvh9aQQ UniVjfhPpMnBpmzzYuvc7tpxIQYYBLsBSJbX9rWl7zd6qd9Mra9mJ1aF7VKdGossdgAx HL4g== ARC-Authentication-Results: i=1; mx.google.com; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr5si3097632ejc.423.2020.10.29.22.33.37; Thu, 29 Oct 2020 22:34:00 -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; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725855AbgJ3FcJ (ORCPT + 99 others); Fri, 30 Oct 2020 01:32:09 -0400 Received: from mga12.intel.com ([192.55.52.136]:35925 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725767AbgJ3FcI (ORCPT ); Fri, 30 Oct 2020 01:32:08 -0400 IronPort-SDR: 0kDXaqEaOn0L9kJWxiZtcNyN4RB+kRi8lzQEK7D/Xlri35V8a6zmW6z4yl9KH6ydW3oOmIceV7 ywzQQlkxkcKw== X-IronPort-AV: E=McAfee;i="6000,8403,9789"; a="147846533" X-IronPort-AV: E=Sophos;i="5.77,432,1596524400"; d="scan'208";a="147846533" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2020 22:32:07 -0700 IronPort-SDR: O3lhJVeeJ7vPZ8Sh8akdfcxnjpnulVuIeuEysl/LbitlD0brJrTwN4zDLcAYxopsDvLeB2PyAI RsoXA8pDGIPw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,432,1596524400"; d="scan'208";a="525788551" Received: from sgsxdev004.isng.intel.com (HELO localhost) ([10.226.88.13]) by fmsmga006.fm.intel.com with ESMTP; 29 Oct 2020 22:32:04 -0700 From: "Ramuthevar,Vadivel MuruganX" To: broonie@kernel.org, vigneshr@ti.com, tudor.ambarus@microchip.com, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, miquel.raynal@bootlin.com, simon.k.r.goldschmidt@gmail.com, dinguyen@kernel.org, richard@nod.at, cheol.yong.kim@intel.com, qi-ming.wu@intel.com, Ramuthevar Vadivel Murugan Subject: [PATCH v6 2/6] spi: cadence-quadspi: Disable the DAC for Intel LGM SoC Date: Fri, 30 Oct 2020 13:31:49 +0800 Message-Id: <20201030053153.5319-3-vadivel.muruganx.ramuthevar@linux.intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20201030053153.5319-1-vadivel.muruganx.ramuthevar@linux.intel.com> References: <20201030053153.5319-1-vadivel.muruganx.ramuthevar@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ramuthevar Vadivel Murugan On Intel Lightning Mountain(LGM) SoCs QSPI controller do not use Direct Access Controller(DAC). This patch adds a quirk to disable the Direct Access Controller for data transfer instead it uses indirect data transfer. Signed-off-by: Ramuthevar Vadivel Murugan --- drivers/spi/spi-cadence-quadspi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index d7b10c46fa70..6d6f7c440ece 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -1107,6 +1107,13 @@ static void cqspi_controller_init(struct cqspi_st *cqspi) writel(reg, cqspi->iobase + CQSPI_REG_CONFIG); cqspi_controller_enable(cqspi, 1); + + /* Disable direct access controller */ + if (!cqspi->use_direct_mode) { + reg = readl(cqspi->iobase + CQSPI_REG_CONFIG); + reg &= ~CQSPI_REG_CONFIG_ENB_DIR_ACC_CTRL; + writel(reg, cqspi->iobase + CQSPI_REG_CONFIG); + } } static int cqspi_request_mmap_dma(struct cqspi_st *cqspi) @@ -1388,6 +1395,10 @@ static const struct cqspi_driver_platdata am654_ospi = { .quirks = CQSPI_NEEDS_WR_DELAY, }; +static const struct cqspi_driver_platdata intel_lgm_qspi = { + .quirks = CQSPI_DISABLE_DAC_MODE, +}; + static const struct of_device_id cqspi_dt_ids[] = { { .compatible = "cdns,qspi-nor", @@ -1403,6 +1414,7 @@ static const struct of_device_id cqspi_dt_ids[] = { }, { .compatible = "intel,lgm-qspi", + .data = &intel_lgm_qspi, }, { /* end of table */ } }; -- 2.11.0