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: 8512521 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B22B49FC57 for ; Sun, 6 Mar 2016 10:05:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BF89B20148 for ; Sun, 6 Mar 2016 10:05:09 +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 024FB20145 for ; Sun, 6 Mar 2016 10:05:09 +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 1acVYf-0006LK-UO; Sun, 06 Mar 2016 10:05:05 +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-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=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);