From patchwork Tue Oct 8 04:37:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vkamensky X-Patchwork-Id: 20887 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A056E24697 for ; Tue, 8 Oct 2013 04:37:57 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id v1sf909818yhn.8 for ; Mon, 07 Oct 2013 21:37:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=WbJQXvt9EmqQys/7KZyjGRAqivJg7q3yHEwyE0mrmc0=; b=VJqzjmJZaFJOX4zSMZGhEVZUQohRNeKFTeQmVkAseIJsbgkzzU3y0IXkPu6VBUQ7Gw LSjuzydf6sWvrGtbNQfR07EMiDIwxKt2rWyFzcowwWIFOZpaD0SlltCjo+6uhNmJgBy1 dth/xlEc7MIgujECqvPO/Wt/+tefS8qs8k/MRLVS4tE1P9s3YatqkWhvxRzPuff7yqya NjIwuJnW0uXhBgd5S4UaNY2xCI5cdPhxx9lln30cY9H1l7rHeJU2Q1+BDPVpb/uN4vBi WhHQ+tdr3e7Rlk8lJoU6mN7uuH/E/Vs9hoZdmffpSQ7kYAAQIzzl8ERJz8aM5RVYQpZ9 S59Q== X-Received: by 10.236.54.68 with SMTP id h44mr32751481yhc.21.1381207077466; Mon, 07 Oct 2013 21:37:57 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.0.116 with SMTP id 20ls86112qed.34.gmail; Mon, 07 Oct 2013 21:37:57 -0700 (PDT) X-Received: by 10.58.73.202 with SMTP id n10mr29755752vev.7.1381207077372; Mon, 07 Oct 2013 21:37:57 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id dp3si8822934vcb.96.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Oct 2013 21:37:57 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id oy12so4327349veb.27 for ; Mon, 07 Oct 2013 21:37:57 -0700 (PDT) X-Gm-Message-State: ALoCoQnJGVp/6ESz4missYavBJ6L/0UZiJL5ze2QqCtQUQNPOl9dsHsA/l3rq1y1E/N2Ou0NHe7s X-Received: by 10.52.26.69 with SMTP id j5mr194359vdg.21.1381207077277; Mon, 07 Oct 2013 21:37:57 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp174946vcz; Mon, 7 Oct 2013 21:37:56 -0700 (PDT) X-Received: by 10.66.122.67 with SMTP id lq3mr1085782pab.161.1381207076393; Mon, 07 Oct 2013 21:37:56 -0700 (PDT) Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by mx.google.com with ESMTPS id gg2si25468010pac.188.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Oct 2013 21:37:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.41 is neither permitted nor denied by best guess record for domain of victor.kamensky@linaro.org) client-ip=209.85.220.41; Received: by mail-pa0-f41.google.com with SMTP id bj1so8314825pad.14 for ; Mon, 07 Oct 2013 21:37:55 -0700 (PDT) X-Received: by 10.66.221.8 with SMTP id qa8mr1113pac.188.1381207075871; Mon, 07 Oct 2013 21:37:55 -0700 (PDT) Received: from kamensky-w530.cisco.com.com (128-107-239-234.cisco.com. [128.107.239.234]) by mx.google.com with ESMTPSA id qp10sm43930696pab.13.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 07 Oct 2013 21:37:55 -0700 (PDT) From: Victor Kamensky To: ben.dooks@codethink.co.uk, linux-arm-kernel@lists.infradead.org Cc: steve.mcintyre@linaro.org, patches@linaro.org, linaro-kernel@lists.linaro.org, linaro-networking@linaro.org, Victor Kamensky Subject: [PATCH 2/2] ARM: cci: driver need big endian fixes in asm code Date: Mon, 7 Oct 2013 21:37:20 -0700 Message-Id: <1381207040-1623-3-git-send-email-victor.kamensky@linaro.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1381207040-1623-1-git-send-email-victor.kamensky@linaro.org> References: <1381207040-1623-1-git-send-email-victor.kamensky@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: victor.kamensky@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , cci_enable_port_for_self written in asm and it works with h/w registers that are in little endian format. When run in big endian mode it needs byte swap before/after it writes/reads to/from such registers Signed-off-by: Victor Kamensky --- drivers/bus/arm-cci.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c index 2009266..6db173e 100644 --- a/drivers/bus/arm-cci.c +++ b/drivers/bus/arm-cci.c @@ -281,6 +281,9 @@ asmlinkage void __naked cci_enable_port_for_self(void) /* Enable the CCI port */ " ldr r0, [r0, %[offsetof_port_phys]] \n" " mov r3, #"__stringify(CCI_ENABLE_REQ)" \n" +#ifdef __ARMEB__ +" rev r3, r3 \n" +#endif /* __ARMEB__ */ " str r3, [r0, #"__stringify(CCI_PORT_CTRL)"] \n" /* poll the status reg for completion */ @@ -288,6 +291,9 @@ asmlinkage void __naked cci_enable_port_for_self(void) " ldr r0, [r1] \n" " ldr r0, [r0, r1] @ cci_ctrl_base \n" "4: ldr r1, [r0, #"__stringify(CCI_CTRL_STATUS)"] \n" +#ifdef __ARMEB__ +" rev r1, r1 \n" +#endif /* __ARMEB__ */ " tst r1, #1 \n" " bne 4b \n"