From patchwork Tue Sep 22 11:32:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 7238101 Return-Path: X-Original-To: patchwork-linux-spi@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 8E41DBEEC1 for ; Tue, 22 Sep 2015 11:32:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 834F020707 for ; Tue, 22 Sep 2015 11:32:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0D757207ED for ; Tue, 22 Sep 2015 11:32:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751415AbbIVLcX (ORCPT ); Tue, 22 Sep 2015 07:32:23 -0400 Received: from mail-la0-f41.google.com ([209.85.215.41]:35422 "EHLO mail-la0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753339AbbIVLcW (ORCPT ); Tue, 22 Sep 2015 07:32:22 -0400 Received: by lagj9 with SMTP id j9so8268660lag.2; Tue, 22 Sep 2015 04:32:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=SlP9SzXHEmTBzOzBMlVAe7YI4BUs2JXqVbceeXCqvu0=; b=lvVzIJyFYrBCaFhleJEDP/nwvEa2K2wNyqc53fsxpVLjy4Z583hs8qGHzIydr4FtL5 ruIO2OmE9z64xBAlYTMiDLm+SbkHzRgvh+mAaJ/kLyAHKlqt6P2uWQcqunqOkIF5waz6 qCVvkKeNE7Aq0WNW7svytYBPgU3hoOq2KrgYYWEfp8vP+yrUC1RTXb9piI40v67b4l4u 2nB9XOsix5mlLk8YQuV6z3f2vWYlw+yXLdMQtmyjYuafDaU6Lp/WP4ajGFNeCEmUAWHp O1IeP4E4RQr12BIVLAOJgSTug0AARVFqhLB5XBU+hndXdjadl1OlSAdEpcLCCTHNmwnD kEjg== X-Received: by 10.112.135.9 with SMTP id po9mr9627491lbb.56.1442921541294; Tue, 22 Sep 2015 04:32:21 -0700 (PDT) Received: from octofox.metropolis ([5.19.183.212]) by smtp.gmail.com with ESMTPSA id cb9sm155890lad.48.2015.09.22.04.32.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2015 04:32:20 -0700 (PDT) From: Max Filippov To: linux-spi@vger.kernel.org Cc: Mark Brown , linux-xtensa@linux-xtensa.org, linux-kernel@vger.kernel.org, Max Filippov Subject: [PATCH] spi: xtensa-xtfpga: fix register endianness Date: Tue, 22 Sep 2015 14:32:03 +0300 Message-Id: <1442921523-1265-1-git-send-email-jcmvbkbc@gmail.com> X-Mailer: git-send-email 1.8.1.4 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, FROM_LOCAL_NOVOWEL, RCVD_IN_DNSWL_HI, 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 XTFPGA SPI controller has native endian registers. Fix register acessors so that they work in big-endian configurations. Signed-off-by: Max Filippov --- drivers/spi/spi-xtensa-xtfpga.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-xtensa-xtfpga.c b/drivers/spi/spi-xtensa-xtfpga.c index 2e32ea2..be6155c 100644 --- a/drivers/spi/spi-xtensa-xtfpga.c +++ b/drivers/spi/spi-xtensa-xtfpga.c @@ -34,13 +34,13 @@ struct xtfpga_spi { static inline void xtfpga_spi_write32(const struct xtfpga_spi *spi, unsigned addr, u32 val) { - iowrite32(val, spi->regs + addr); + __raw_writel(val, spi->regs + addr); } static inline unsigned int xtfpga_spi_read32(const struct xtfpga_spi *spi, unsigned addr) { - return ioread32(spi->regs + addr); + return __raw_readl(spi->regs + addr); } static inline void xtfpga_spi_wait_busy(struct xtfpga_spi *xspi)