Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1052468pxu; Fri, 16 Oct 2020 02:35:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFiesngPaDfddErQ9n3hFhuwyGJJfa1WZWzAvA8zgY21OrwpB/Yzd62BmxRJm6rEFaSg8w X-Received: by 2002:a17:907:2076:: with SMTP id qp22mr2745431ejb.358.1602840940086; Fri, 16 Oct 2020 02:35:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602840940; cv=none; d=google.com; s=arc-20160816; b=dxckdZNm2UUAiKxg7+wW34h0joyLgRiJwxT16rfg+A7CvPL7yYPi/f2cfpZXpE4g/M HTMN26h6YOtyhyw0pFIe7060oEW3xLkM+6d4Z1VixkC93x0+H/oPfLD7a5Yl9iP7t/ln tq/0xKUQWqq316HhclKB/wwbd4syngEXeOuddGXxQOkE0use+m4k8z7PveIWFho5EW3V t9SK/Lvbgptu56ObvqkNRzrsGGQevedzo++sM83U1awcB9lyw4Z6fuVduCuFtulBWfnu Dqp+PpFum1S3qmF2I2m2R4WIOXMyMJ16vgBf6eNv3MD1KPf290w1sNURV43N9seYl40g D1UA== 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=vSy7p5SjOzwBrKuhQuUS/wiyRV2JQ5iKR14gjkRFj18=; b=VgqdxQCsZpCgLdYmkxsCf+vsTSF4m7EZ8BIrvmkFKCR3wBWgOELWHWM6dAHZKzprAU 2WiRZaDotwxDFNU7WT6FYHSznWAZykAeqZTNIJVDP0cCFKISmfkKjMrEdnK3WHA/D97M qFfqulonIQZGU08AVTjeIDjYNRl3+ATH5CUbwKBN6vEWKggt2a27d26JXcWilJumryev nV09UOOPQU6RbknvCN2TOs6dUHpketkoFblTiZ15RGg7IcwSwGDs66XIbUdzWbME/rf1 vlh+VMcxCRQz8fndZ7hotEvulFsQ62GaeTV9aaoVmSWEqwSmaCI4jLZj+EXSY5TaZ7pU fEIA== 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 b6si1457195eja.422.2020.10.16.02.35.17; Fri, 16 Oct 2020 02:35:40 -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 S2405772AbgJPJcQ (ORCPT + 99 others); Fri, 16 Oct 2020 05:32:16 -0400 Received: from mga14.intel.com ([192.55.52.115]:62030 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405578AbgJPJcJ (ORCPT ); Fri, 16 Oct 2020 05:32:09 -0400 IronPort-SDR: kuUCZda6NGNA0Hn88F1mdYVQMxB5lh4q6BAVIlyFKn81TaPBZVW1SUkOCzah4wiiHXZvo7FPPQ bvytdQhp0KCA== X-IronPort-AV: E=McAfee;i="6000,8403,9775"; a="165802846" X-IronPort-AV: E=Sophos;i="5.77,382,1596524400"; d="scan'208";a="165802846" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2020 02:32:08 -0700 IronPort-SDR: Ik2tmaDozOiVXuFkwMocSRVinIdFXhKiXihBFajVHNelbyB6V8DCcmBDdAkFcY4XtNbhB4ysEA CZS2W8ABJddg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,382,1596524400"; d="scan'208";a="352136790" Received: from sgsxdev004.isng.intel.com (HELO localhost) ([10.226.88.13]) by fmsmga002.fm.intel.com with ESMTP; 16 Oct 2020 02:32:05 -0700 From: "Ramuthevar,Vadivel MuruganX" To: vigneshr@ti.com, tudor.ambarus@microchip.com, broonie@kernel.org, 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 v1 5/6] spi: cadence-quadspi: Disable the DAC for Intel LGM SoC Date: Fri, 16 Oct 2020 17:31:37 +0800 Message-Id: <20201016093138.28871-6-vadivel.muruganx.ramuthevar@linux.intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20201016093138.28871-1-vadivel.muruganx.ramuthevar@linux.intel.com> References: <20201016093138.28871-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..3d017b484114 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -1106,6 +1106,13 @@ static void cqspi_controller_init(struct cqspi_st *cqspi) reg |= CQSPI_REG_CONFIG_ENB_DIR_ACC_CTRL; writel(reg, cqspi->iobase + CQSPI_REG_CONFIG); + /* 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); + } + cqspi_controller_enable(cqspi, 1); } @@ -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