Message ID | 20230209200246.141520-7-william.zhang@broadcom.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp546513wrn; Thu, 9 Feb 2023 12:07:45 -0800 (PST) X-Google-Smtp-Source: AK7set/kuFSJ2+EJy8FsZhKNFDlK3I+BfW1KvjwzGEZYHuz7/dj5as5afxqR4mXVP+d+53LZtqzz X-Received: by 2002:a50:c34e:0:b0:4ab:15f8:5ded with SMTP id q14-20020a50c34e000000b004ab15f85dedmr6644319edb.27.1675973265207; Thu, 09 Feb 2023 12:07:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675973265; cv=none; d=google.com; s=arc-20160816; b=vt9ZAJMuNnaEZdjLIuFUKZ27VYUyz9ooV0m8OF/z9CN+sdMIuOmGEj7i5SzBRF6d2r kFB61UFvGsupWxqA/sWSwHQVEqqK4c+c9gCXozEUZOnYZOrC/6y/SmX4HONgEYhHyzA5 2t1yNMQdU4pQmsZOX5LFh7owdjyKbiSDH8XB88AL1QSHseLmwYxIteB8y6z/PhxlzMh8 yS0cEjxecom6Y/YQc2bkhSkTUd1IXT7IAxhmMHGu5KjMuyu6EdWdoJSRrwC3XxGRkOb8 FXU5ue8e5SBaY7txWtJ/7bgyOSdLdWdunHfdXDx98igSDiBH/qZsa/RLj+/htozckHe8 CkHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=YkUd/MvqtghYOHb39oXgNQc1JiOyo05BgBxN/1pMM98=; b=HAJtKUuVdpDTfD0nibefRl2iJIn7tzLk2DMMunl/9capLmPXZUWwOsTAWBxJO3Fr8S Vj677rUYL3lxF0i/IdLdl/xj6v0K5Ht6CHzUjMA5sxT4r4/ZyLPxxGaDszTnbPaiqH/o MQjVp9kI2UKEcgsrGWfGVacVkdHGcGZ9frrRHfcauo2KMLTuNbE0DQwWIDALVi1f0eYl 38XDjYUIP+pDhVLtaTNsju5NM/GE9YWE69GYlqAWGca0DNqiXeouvrEs5pHjog1DL+ph 5a4gxQqE/dekGQVDJ82kWWIIE0TqezSXGv+JVIumgvsxgySCBV+pRKxIh+4XTMbgVxl5 V64Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=pqHebi3p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a19-20020a50e713000000b004a235a340ebsi3268422edn.163.2023.02.09.12.07.20; Thu, 09 Feb 2023 12:07:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=pqHebi3p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230252AbjBIUE3 (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Thu, 9 Feb 2023 15:04:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230163AbjBIUER (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 9 Feb 2023 15:04:17 -0500 Received: from relay.smtp-ext.broadcom.com (lpdvsmtp11.broadcom.com [192.19.166.231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E530A6A73E; Thu, 9 Feb 2023 12:04:15 -0800 (PST) Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.75.146.107]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 9ABB7C0000E6; Thu, 9 Feb 2023 12:04:15 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 9ABB7C0000E6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1675973055; bh=AifjXyYxVePs1wAnFp3/rj6mDjxOkY2FLNjvrOd9G3E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pqHebi3p4qwlQeZWjjhONHs9dnXoPayvYjZS3pKHoCCyOJBjiTU7ioZiep3KITL9v AHo3TF8/w5hOcP80qq0Idu3QXB3+URcTh1+wSVQAhSN3d2Nk5GogK0+arzOr2jDUzZ ZUSOMx21iuukBM5xSN9eUBgwt7/c7p7BYDIAVWI4= Received: from bcacpedev-irv-3.lvn.broadcom.net (bcacpedev-irv-3.lvn.broadcom.net [10.75.138.105]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPS id 990FB18041CAC6; Thu, 9 Feb 2023 12:04:15 -0800 (PST) Received: by bcacpedev-irv-3.lvn.broadcom.net (Postfix, from userid 28376) id D0204101B76; Thu, 9 Feb 2023 12:04:07 -0800 (PST) From: William Zhang <william.zhang@broadcom.com> To: Linux SPI List <linux-spi@vger.kernel.org>, Broadcom Kernel List <bcm-kernel-feedback-list@broadcom.com> Cc: f.fainelli@gmail.com, dregan@mail.com, joel.peshkin@broadcom.com, dan.beygelman@broadcom.com, anand.gore@broadcom.com, kursad.oney@broadcom.com, tomer.yacoby@broadcom.com, jonas.gorski@gmail.com, William Zhang <william.zhang@broadcom.com>, kernel test robot <lkp@intel.com>, Mark Brown <broonie@kernel.org>, linux-kernel@vger.kernel.org Subject: [PATCH v4 06/15] spi: bcm63xx-hsspi: Endianness fix for ARM based SoC Date: Thu, 9 Feb 2023 12:02:37 -0800 Message-Id: <20230209200246.141520-7-william.zhang@broadcom.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20230209200246.141520-1-william.zhang@broadcom.com> References: <20230209200246.141520-1-william.zhang@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757385342545866723?= X-GMAIL-MSGID: =?utf-8?q?1757385342545866723?= |
Series |
spi: bcm63xx-hsspi: driver and doc updates
|
|
Commit Message
William Zhang
Feb. 9, 2023, 8:02 p.m. UTC
HSSPI controller uses big endian for the opcode in the message to the controller ping pong buffer. Use cpu_to_be16 to properly handle the endianness for both big and little endian host. Fixes: 142168eba9dc ("spi: bcm63xx-hsspi: add bcm63xx HSSPI driver") Signed-off-by: Kursad Oney <kursad.oney@broadcom.com> Signed-off-by: William Zhang <william.zhang@broadcom.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> --- (no changes since v3) Changes in v3: - Add Acked-by tag Changes in v2: - Fix build error for Alpha platform Reported-by: kernel test robot <lkp@intel.com> drivers/spi/spi-bcm63xx-hsspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c index 01d5acad4a1b..a65a0ec67641 100644 --- a/drivers/spi/spi-bcm63xx-hsspi.c +++ b/drivers/spi/spi-bcm63xx-hsspi.c @@ -194,7 +194,7 @@ static int bcm63xx_hsspi_do_txrx(struct spi_device *spi, struct spi_transfer *t) tx += curr_step; } - __raw_writew(opcode | curr_step, bs->fifo); + __raw_writew((u16)cpu_to_be16(opcode | curr_step), bs->fifo); /* enable interrupt */ __raw_writel(HSSPI_PINGx_CMD_DONE(0),