From patchwork Wed Jun 20 07:34:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 10476681 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 82EDD604D3 for ; Wed, 20 Jun 2018 09:19:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 729E3204FF for ; Wed, 20 Jun 2018 09:19:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66CE62872E; Wed, 20 Jun 2018 09:19:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 126F0204FF for ; Wed, 20 Jun 2018 09:19:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753073AbeFTIdN (ORCPT ); Wed, 20 Jun 2018 04:33:13 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:35430 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752750AbeFTIdK (ORCPT ); Wed, 20 Jun 2018 04:33:10 -0400 Received: by mail-lf0-f68.google.com with SMTP id i15-v6so3660324lfc.2; Wed, 20 Jun 2018 01:33:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AE0B2be8YxirzbiKq4cI8ZQ0ikSvHyrLW9ghUVfqyCU=; b=SFtDef4V8R3MpG3hoESMavsg7ichUi5gzmKEbo3Q8wn49KXK1EUVs125BSfbI+0TbJ HV5DqOlMiQBbGjbKv75tRsEhzGuWBvEe6as93VeH+8bkGfMVGxl8WilAmmAB1+DCFJUo sVhS+MTNchQSqicX5iqs/V2Eb2D8QGHw4vsc86wHI1zeC8oplrdPer3JSg7J6P7w1q1M 3zS8Ba8cMrsYfiEFplFk7PeVLmxGVUg7pugSghE0sHgofsLx2MxaF1/TObVbWH86xJYU zKr/dKhz4J+ldobQ7W3A6IoVWt09jH80ffVDsUR0dg7Xw5/As0BAU1up42CkG7EPKhuo M0NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=AE0B2be8YxirzbiKq4cI8ZQ0ikSvHyrLW9ghUVfqyCU=; b=Z9dQETm5Pp9ZjF3NsnJaW7PTAVayXgMR9X+aZWuqmOM87tDKY58fRgoAkpuj5F4Af7 aabTb0AcpRdTQ1qbBcEQJismQaicVs6fYUpHd+cNKGcnzqu6tlcg3OYTHaTpGz7fBWQ/ o6PqV5Q81N4E1hQ/FYV9hiKxcLa+OIVw7DWXr9TzHgR4EII7wR6W+KlR015EEGHyvmou 8VlKez9zyyWX+8DwVh95I8QztHErU8yulpzru/OxhtoJKzT1HogGGXuc9OC+t3piTZDK g+guL38XIMZb2x6mhdkF8HgGkORx0LNiwMWERJm4E2nH/fPiw6Z16yTOG8GtN2fDQxdY CZng== X-Gm-Message-State: APt69E370ws4u+E/unPi/FWVCr5vTuZRLgmFJLqbotogNruqF8wMrdxs TMZCEZBbrfa3bOE46LNPbnGx9DyI X-Google-Smtp-Source: ADUXVKKsHt5yQvoK1oV0rfuKhkoBOyhSQ5+qbXXmEE6ezI871MAkM+OgZPShrs+U/3ED9bZ9W8XYhw== X-Received: by 2002:a2e:9789:: with SMTP id y9-v6mr13110813lji.52.1529480110389; Wed, 20 Jun 2018 00:35:10 -0700 (PDT) Received: from localhost (87-57-30-174-static.dk.customer.tdc.net. [87.57.30.174]) by smtp.gmail.com with ESMTPSA id p16-v6sm275932lji.20.2018.06.20.00.35.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 00:35:09 -0700 (PDT) From: Esben Haabendal To: Mark Brown , linux-spi@vger.kernel.org Cc: Kurt Kanzenbach , Angelo Dureghello , Nikita Yushchenko , Sanchayan Maity , Yuan Yao , linux-kernel@vger.kernel.org, Esben Haabendal , =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= Subject: [PATCH 11/12] spi: spi-fsl-dspi: Advertise 32 bit for XSPI mode Date: Wed, 20 Jun 2018 09:34:41 +0200 Message-Id: <20180620073442.20913-12-esben.haabendal@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180620073442.20913-1-esben.haabendal@gmail.com> References: <20180620073442.20913-1-esben.haabendal@gmail.com> MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Esben Haabendal Signed-off-by: Esben Haabendal Cc: Martin Hundebøll --- drivers/spi/spi-fsl-dspi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index 67cd2e901255..eed55491b2c9 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -1001,7 +1001,6 @@ static int dspi_probe(struct platform_device *pdev) master->cleanup = dspi_cleanup; master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST; - master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 16); pdata = dev_get_platdata(&pdev->dev); if (pdata) { @@ -1033,6 +1032,11 @@ static int dspi_probe(struct platform_device *pdev) } } + if (dspi->devtype_data->xspi_mode) + master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 32); + else + master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 16); + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(base)) {