From patchwork Sun Mar 6 10:04:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kochetkov X-Patchwork-Id: 8512531 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E15C1C0553 for ; Sun, 6 Mar 2016 10:10:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EFECC20149 for ; Sun, 6 Mar 2016 10:10:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3041C20148 for ; Sun, 6 Mar 2016 10:10:11 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1acVYZ-00067E-TK; Sun, 06 Mar 2016 10:04:59 +0000 Received: from mail-lb0-x233.google.com ([2a00:1450:4010:c04::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1acVYU-00063c-K7; Sun, 06 Mar 2016 10:04:55 +0000 Received: by mail-lb0-x233.google.com with SMTP id xr8so5813286lbb.1; Sun, 06 Mar 2016 02:04:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=cMmuHCxkSGuDboMKFRqouUWXTwN3S53JSvQWtLulEZk=; b=RBxoRrpr8JH6VF26edfS08fsRcp+vz/BgW6IZiqBSq0FWPPQognY22HLLoqSbCTzC4 82YzrtCzlHucx/byfE4eetp/LGfRrHj35tgsiNk4Ul6NWPtUGnAPuBslpOCymZMhGHXP rSVX2ifyBxuJ+lFZSmoVGXcark0Yy0NqKYqFm+vP7k9q4f50a0fX6kH5rlB8CSXxauTS OS1+ZS6hnj1qJDMWrnTvGSTJESLGQNcJtZHPdxsSbRsHJong/4A/98G8KG34u8iNCf8Q Mhj7iLbo4rBV2X/IiAoUW+KdWnY7H18i2ugYJrYKxXBQ2L/KJX5hVgxhB4abdsHIKpTy 0r3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=cMmuHCxkSGuDboMKFRqouUWXTwN3S53JSvQWtLulEZk=; b=jninKiZABw+IwS0LJ/Hupo11s9FSwqCEuY2On8s7lAOSMVYAUwwP4L8YuRYipn1LPI Xuj21QCb4onSq47l09G+OL5BIf/W0qAntL8w4NO7XBw+s39nAb1+PowdqI4WC0brNlJa qyQnAiQhVy/Fs4KKoo9cVYFll1+dMAsE+rQdn8OEN24fm2NegzGnWtQtlUxkc53zSsMW 6LVcyHfbDCFyjpfs52UefNIvxqGZQqH+m3nn1KC2fb5GYppW6Po8vF3NTaGRQqK5J52h EHdovB7RFKFQGQxke1Bw6f0K5cp13RQLL2KSN8e7veSA8Y+GMI1C1sZHzIlh+sfvDpRg ZJlg== X-Gm-Message-State: AD7BkJJRzPANru5zgHIYDZDb1Pnrc3nN67NRQPf+Eyx6wTpCiDN/cH8ssnKafrfJrvzdxQ== X-Received: by 10.112.211.168 with SMTP id nd8mr5745423lbc.116.1457258672192; Sun, 06 Mar 2016 02:04:32 -0800 (PST) Received: from localhost.localdomain ([79.164.61.11]) by smtp.gmail.com with ESMTPSA id j205sm1952593lfd.0.2016.03.06.02.04.30 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 06 Mar 2016 02:04:31 -0800 (PST) From: Alexander Kochetkov To: Mark Brown , Heiko Stuebner Subject: [PATCH] spi/rockchip: fix endian mode for 16-bit transfers Date: Sun, 6 Mar 2016 13:04:17 +0300 Message-Id: <1457258657-19154-1-git-send-email-al.kochet@gmail.com> X-Mailer: git-send-email 1.7.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160306_020454_883198_0AEED12D X-CRM114-Status: UNSURE ( 9.51 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rockchip@lists.infradead.org, Alexander Kochetkov , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 16-bit transfers must be in big endian mode on wire. Signed-off-by: Alexander Kochetkov --- drivers/spi/spi-rockchip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index aa9561f..ef77df7 100644 --- a/drivers/spi/spi-rockchip.c +++ b/drivers/spi/spi-rockchip.c @@ -510,7 +510,8 @@ static void rockchip_spi_config(struct rockchip_spi *rs) int rsd = 0; u32 cr0 = (CR0_BHT_8BIT << CR0_BHT_OFFSET) - | (CR0_SSD_ONE << CR0_SSD_OFFSET); + | (CR0_SSD_ONE << CR0_SSD_OFFSET) + | (CR0_EM_BIG << CR0_EM_OFFSET); cr0 |= (rs->n_bytes << CR0_DFS_OFFSET); cr0 |= ((rs->mode & 0x3) << CR0_SCPH_OFFSET);