Message ID | 20230310173217.3429788-14-amit.kumar-mahapatra@amd.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Johannes Berg |
Headers | show
Return-Path: <linux-wireless-owner@vger.kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E844AC76186 for <linux-wireless@archiver.kernel.org>; Fri, 10 Mar 2023 17:40:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231865AbjCJRko (ORCPT <rfc822;linux-wireless@archiver.kernel.org>); Fri, 10 Mar 2023 12:40:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231712AbjCJRkN (ORCPT <rfc822;linux-wireless@vger.kernel.org>); Fri, 10 Mar 2023 12:40:13 -0500 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2060d.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e8a::60d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26C3512BAE2; Fri, 10 Mar 2023 09:39:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AFuFER+LWwUAYPT0HAJvKrlXYyCClbIIUVpdsEbv6S1Ludb6KRAd2hDm2K0fVc6nXxVPjYRYzdNElZgB0Bwn0B7l7mDz9yKKn7vD44lLzqBwJudXNFxnMecrVtB0ULmmSh7P+wvnHkIV+k5NEnSFvN3VLKf3Sxo53Sm2/11abldX6+onRamWw7ubgrEULZ7ar8NAPr0UanMvYHUEskNXBfkg9idCBA0bVli9TKrkG9pTn9lMMRrTcbOj3Cqb2/udUE7S46tvoT61/va7iQz660jG9j2Vs62mBxy2BGNLIG5aMu8iVUZucU2WXCvDp6ttBPhWADoNHxuqXGAKvULDFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vKxfkb4YbG5w9Tm8mG5YGBxw1K7w2rVJ374cq5bsNis=; b=CDta0rtI9WgjlisAR/PERpjoARqNsfqwaHFxN8CROpINR1m/A8Is/mXbO83yS3ik0rUG+lI7aNvpRoPOAN1RFgbo/dOhrGH/dCCfj2MKXWJeysfHvgLQ1oUN+47kLaTttffe5DakPtn0jMID8BuLg3Z1byBgDYrFL+DiJirq6AifSaxED53pBYMI8s+dnzAX6OdfsBwGPxdcLVhqTsu5C4qQkWNQReOhjv+DGppaPudF+dqEIW5GOiStJotHK/L7x6djUilrqRwP70d2FDiw1SpCQSuhs2id/Ne9aVZ/+t5zk2bTGNsiyZbu0O7DFB4uOhP+TlDs/6T/EuTpBU0CPQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vKxfkb4YbG5w9Tm8mG5YGBxw1K7w2rVJ374cq5bsNis=; b=doqsFrkE1iz98njnNv4CRbMC126Hd7FD3UZAfwIQn+nqKWIX1eZkY7PoXPfY2mtxXb51w/VkH1Ix1R6asG3U6UN1teBXS/mRSssRrK3kq7Yc0cXEDPS5leVJW52ha4BaqEbTxhnFB1S/xQhOpq8pX8q+5f9TR4p/CoTqdR4ZcVI= Received: from BN9PR03CA0765.namprd03.prod.outlook.com (2603:10b6:408:13a::20) by SJ0PR12MB6902.namprd12.prod.outlook.com (2603:10b6:a03:484::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19; Fri, 10 Mar 2023 17:39:10 +0000 Received: from BN8NAM11FT055.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13a:cafe::e3) by BN9PR03CA0765.outlook.office365.com (2603:10b6:408:13a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19 via Frontend Transport; Fri, 10 Mar 2023 17:39:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by BN8NAM11FT055.mail.protection.outlook.com (10.13.177.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.20 via Frontend Transport; Fri, 10 Mar 2023 17:39:09 +0000 Received: from SATLEXMB07.amd.com (10.181.41.45) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 10 Mar 2023 11:39:09 -0600 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB07.amd.com (10.181.41.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 10 Mar 2023 09:39:08 -0800 Received: from xhdsneeli40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Fri, 10 Mar 2023 11:38:41 -0600 From: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com> To: <broonie@kernel.org>, <miquel.raynal@bootlin.com>, <richard@nod.at>, <vigneshr@ti.com>, <jic23@kernel.org>, <tudor.ambarus@microchip.com>, <pratyush@kernel.org>, <Sanju.Mehta@amd.com>, <chin-ting_kuo@aspeedtech.com>, <clg@kaod.org>, <kdasu.kdev@gmail.com>, <f.fainelli@gmail.com>, <rjui@broadcom.com>, <sbranden@broadcom.com>, <eajames@linux.ibm.com>, <olteanv@gmail.com>, <han.xu@nxp.com>, <john.garry@huawei.com>, <shawnguo@kernel.org>, <s.hauer@pengutronix.de>, <narmstrong@baylibre.com>, <khilman@baylibre.com>, <matthias.bgg@gmail.com>, <haibo.chen@nxp.com>, <linus.walleij@linaro.org>, <daniel@zonque.org>, <haojian.zhuang@gmail.com>, <robert.jarzmik@free.fr>, <agross@kernel.org>, <bjorn.andersson@linaro.org>, <heiko@sntech.de>, <krzysztof.kozlowski@linaro.org>, <andi@etezian.org>, <mcoquelin.stm32@gmail.com>, <alexandre.torgue@foss.st.com>, <wens@csie.org>, <jernej.skrabec@gmail.com>, <samuel@sholland.org>, <masahisa.kojima@linaro.org>, <jaswinder.singh@linaro.org>, <rostedt@goodmis.org>, <mingo@redhat.com>, <l.stelmach@samsung.com>, <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>, <alex.aring@gmail.com>, <stefan@datenfreihafen.org>, <kvalo@kernel.org>, <james.schulman@cirrus.com>, <david.rhodes@cirrus.com>, <tanureal@opensource.cirrus.com>, <rf@opensource.cirrus.com>, <perex@perex.cz>, <tiwai@suse.com>, <npiggin@gmail.com>, <christophe.leroy@csgroup.eu>, <mpe@ellerman.id.au>, <oss@buserror.net>, <windhl@126.com>, <yangyingliang@huawei.com>, <william.zhang@broadcom.com>, <kursad.oney@broadcom.com>, <jonas.gorski@gmail.com>, <anand.gore@broadcom.com>, <rafal@milecki.pl> CC: <git@amd.com>, <linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <joel@jms.id.au>, <andrew@aj.id.au>, <radu_nicolae.pirea@upb.ro>, <nicolas.ferre@microchip.com>, <alexandre.belloni@bootlin.com>, <claudiu.beznea@microchip.com>, <bcm-kernel-feedback-list@broadcom.com>, <fancer.lancer@gmail.com>, <kernel@pengutronix.de>, <festevam@gmail.com>, <linux-imx@nxp.com>, <jbrunet@baylibre.com>, <martin.blumenstingl@googlemail.com>, <avifishman70@gmail.com>, <tmaimon77@gmail.com>, <tali.perry1@gmail.com>, <venture@google.com>, <yuenn@google.com>, <benjaminfair@google.com>, <yogeshgaur.83@gmail.com>, <konrad.dybcio@somainline.org>, <alim.akhtar@samsung.com>, <ldewangan@nvidia.com>, <thierry.reding@gmail.com>, <jonathanh@nvidia.com>, <michal.simek@amd.com>, <linux-aspeed@lists.ozlabs.org>, <openbmc@lists.ozlabs.org>, <linux-arm-kernel@lists.infradead.org>, <linux-rpi-kernel@lists.infradead.org>, <linux-amlogic@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, <linux-arm-msm@vger.kernel.org>, <linux-rockchip@lists.infradead.org>, <linux-samsung-soc@vger.kernel.org>, <linux-stm32@st-md-mailman.stormreply.com>, <linux-sunxi@lists.linux.dev>, <linux-tegra@vger.kernel.org>, <netdev@vger.kernel.org>, <linux-wpan@vger.kernel.org>, <libertas-dev@lists.infradead.org>, <linux-wireless@vger.kernel.org>, <linux-mtd@lists.infradead.org>, <lars@metafoo.de>, <Michael.Hennerich@analog.com>, <linux-iio@vger.kernel.org>, <michael@walle.cc>, <palmer@dabbelt.com>, <linux-riscv@lists.infradead.org>, <alsa-devel@alsa-project.org>, <patches@opensource.cirrus.com>, <linuxppc-dev@lists.ozlabs.org>, <amitrkcian2002@gmail.com>, <amit.kumar-mahapatra@amd.com> Subject: [PATCH V6 13/15] spi: spi-zynqmp-gqspi: Add stacked memories support in GQSPI driver Date: Fri, 10 Mar 2023 23:02:15 +0530 Message-ID: <20230310173217.3429788-14-amit.kumar-mahapatra@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230310173217.3429788-1-amit.kumar-mahapatra@amd.com> References: <20230310173217.3429788-1-amit.kumar-mahapatra@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT055:EE_|SJ0PR12MB6902:EE_ X-MS-Office365-Filtering-Correlation-Id: 4050f504-4ad2-40e2-763c-08db218e5aee X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x7jQaumCjZR0T9S11MlzIybBELHPA+OmuGtU11G0PLWh/cB9MmUWlp49ftfqyjtd52Pg4JyZYX0Z/hz552N3XB/+la3MdalEs7XG6X5wVvqRJU0Di9oDgZ5QrKk5lo211hTZ1R7e7rRdGlO5Zzh50T1igJqBeQ4LdXF8ii0bBkv6ALqpsTWRXf4PzruORKvAjbuQ9cDJR7eHFXc/rs33xcyNhaLpeFXXBwdysYyZNm2zsOwpCuIpm2agDean3r7lCufM6EuQybB6fnk6Da4kH9ReaTWXBCsepKVjfLDSaUTjECxUjCQNIMGI10FBGlZL/OCIoNropjucaYZiByMKXSTYfyxk6/ZYSoyM2nNjq7aTKohEG56TwZOe5fSnpHRWC2B9pmNo28zVdwnRLf9qup1oD5BcVMbhu4NUwfm+mvbDmeeeMZNES5vOqQvN3YoDdLTwPavrTDQpHUYyhyUntBO6LVpehwvrhIClOrNnqtwtyj7Qf4rwd+N2EkGTxen2v7yl6393b8RZC+6amEUMZc2pLax9DY1FlaUDjofODK+EAFec/RtQzSVHdaYXEPorAeJZ6Gr7UCtviu+CaBfu+cqjGIzrDvfeT+akg+T+k5FoEC87QhOD9MoTYbnOv6ij3Q2L9NYKP879p+9AmSTYEXZUfX6eWWh34X/pMZ2qeNCKwuUE2Jf1sDV1hBE0yRSsCHxVFNpJ/5cbak/tIrcgmdyzH4XV8ARsKOfwsXdDHNTpOt145LnSqZuJszLbJKVxk9P6HdlqPDMs0d5MRJDr0JhleSzWSLYuFJ1FXywbOltLlMDvPSNnDKZ5wJEsrw53Mw4KQ4KTtI57hIZNq5TiCJgb0k7L1HACxhS9pLD4ckg= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230025)(4636009)(136003)(346002)(396003)(39860400002)(376002)(451199018)(36840700001)(40470700004)(46966006)(921005)(1191002)(40460700003)(40480700001)(36756003)(82310400005)(86362001)(478600001)(356005)(2616005)(47076005)(426003)(54906003)(8676002)(70206006)(110136005)(70586007)(336012)(186003)(316002)(6666004)(26005)(1076003)(2906002)(7416002)(7406005)(7276002)(7336002)(7366002)(83380400001)(81166007)(36860700001)(8936002)(82740400003)(4326008)(41300700001)(5660300002)(41080700001)(36900700001)(84006005)(2101003)(83996005);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2023 17:39:09.6300 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4050f504-4ad2-40e2-763c-08db218e5aee X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT055.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6902 Precedence: bulk List-ID: <linux-wireless.vger.kernel.org> X-Mailing-List: linux-wireless@vger.kernel.org |
Series |
Add support for stacked/parallel memories
|
expand
|
diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c index fb2ca9b90eab..3d2b92a88e8a 100644 --- a/drivers/spi/spi-zynqmp-gqspi.c +++ b/drivers/spi/spi-zynqmp-gqspi.c @@ -156,6 +156,9 @@ #define GQSPI_FREQ_100MHZ 100000000 #define GQSPI_FREQ_150MHZ 150000000 +#define GQSPI_SELECT_LOWER_CS BIT(0) +#define GQSPI_SELECT_UPPER_CS BIT(1) + #define SPI_AUTOSUSPEND_TIMEOUT 3000 enum mode_type {GQSPI_MODE_IO, GQSPI_MODE_DMA}; @@ -467,15 +470,17 @@ static void zynqmp_qspi_chipselect(struct spi_device *qspi, bool is_high) genfifoentry |= GQSPI_GENFIFO_MODE_SPI; + if (qspi->cs_index_mask & GQSPI_SELECT_UPPER_CS) { + zynqmp_gqspi_selectslave(xqspi, + GQSPI_SELECT_FLASH_CS_UPPER, + GQSPI_SELECT_FLASH_BUS_LOWER); + } else if (qspi->cs_index_mask & GQSPI_SELECT_LOWER_CS) { + zynqmp_gqspi_selectslave(xqspi, + GQSPI_SELECT_FLASH_CS_LOWER, + GQSPI_SELECT_FLASH_BUS_LOWER); + } + genfifoentry |= xqspi->genfifobus; if (!is_high) { - if (!spi_get_chipselect(qspi, 0)) { - xqspi->genfifobus = GQSPI_GENFIFO_BUS_LOWER; - xqspi->genfifocs = GQSPI_GENFIFO_CS_LOWER; - } else { - xqspi->genfifobus = GQSPI_GENFIFO_BUS_UPPER; - xqspi->genfifocs = GQSPI_GENFIFO_CS_UPPER; - } - genfifoentry |= xqspi->genfifobus; genfifoentry |= xqspi->genfifocs; genfifoentry |= GQSPI_GENFIFO_CS_SETUP; } else {
GQSPI supports two chip select CS0 & CS1. Update the driver to assert/de-assert the appropriate chip select as per the bits set in qspi->cs_index_mask. Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com> --- drivers/spi/spi-zynqmp-gqspi.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)