From patchwork Thu Mar 26 14:16:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 6099441 Return-Path: X-Original-To: patchwork-linux-pm@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 7D10E9F350 for ; Thu, 26 Mar 2015 14:16:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 91FB9203B8 for ; Thu, 26 Mar 2015 14:16:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8CDDB203A1 for ; Thu, 26 Mar 2015 14:16:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752391AbbCZOQ3 (ORCPT ); Thu, 26 Mar 2015 10:16:29 -0400 Received: from ducie-dc1.codethink.co.uk ([185.25.241.215]:36289 "EHLO ducie-dc1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752348AbbCZOQ2 (ORCPT ); Thu, 26 Mar 2015 10:16:28 -0400 Received: from localhost (localhost [127.0.0.1]) by ducie-dc1.codethink.co.uk (Postfix) with ESMTP id 91BEF460458; Thu, 26 Mar 2015 14:16:26 +0000 (GMT) X-Virus-Scanned: Debian amavisd-new at ducie-dc1.codethink.co.uk Received: from ducie-dc1.codethink.co.uk ([127.0.0.1]) by localhost (ducie-dc1.codethink.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id REj0wj7v8dZR; Thu, 26 Mar 2015 14:16:25 +0000 (GMT) Received: from rainbowdash.ducie.codethink.co.uk (rainbowdash.dyn.ducie.codethink.co.uk [10.24.2.193]) by ducie-dc1.codethink.co.uk (Postfix) with ESMTPS id CB30F4602E2; Thu, 26 Mar 2015 14:16:24 +0000 (GMT) Received: from ben by rainbowdash.ducie.codethink.co.uk with local (Exim 4.84) (envelope-from ) id 1Yb8a8-0006b8-KE; Thu, 26 Mar 2015 14:16:24 +0000 From: Ben Dooks To: linux-kernel@lists.codethink.co.uk Cc: Ben Dooks , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Nicolas Ferre , Alexandre Belloni , Maxime Ripard , Guenter Roeck , linux-pm@vger.kernel.org (open list:POWER SUPPLY CLAS...) Subject: [PATCH] power/reset: at91: big endian fixes for atsama5d3x Date: Thu, 26 Mar 2015 14:16:22 +0000 Message-Id: <1427379382-25328-1-git-send-email-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 2.1.4 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 Fix the passing of big endian data to routines that will be writing it to the bus in the wrong order. Signed-off-by: Ben Dooks --- CC: Sebastian Reichel (maintainer:POWER SUPPLY CLAS...,commit_signer:2/5=40%) CC: Dmitry Eremin-Solenikov (maintainer:POWER SUPPLY CLAS...) CC: David Woodhouse (maintainer:POWER SUPPLY CLAS...) CC: Nicolas Ferre (commit_signer:3/5=60%) CC: Alexandre Belloni (commit_signer:3/5=60%,authored:2/5=40%,removed_lines:4/18=22%) CC: Maxime Ripard (commit_signer:1/5=20%,authored:1/5=20%,added_lines:252/278=91%) CC: Guenter Roeck (commit_signer:1/5=20%,authored:1/5=20%,added_lines:18/278=6%,removed_lines:10/18=56%) CC: linux-pm@vger.kernel.org (open list:POWER SUPPLY CLAS...) --- drivers/power/reset/at91-reset.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c index 13584e2..723fd2a 100644 --- a/drivers/power/reset/at91-reset.c +++ b/drivers/power/reset/at91-reset.c @@ -73,8 +73,8 @@ static int at91sam9260_restart(struct notifier_block *this, unsigned long mode, : "r" (at91_ramc_base[0]), "r" (at91_rstc_base), "r" (1), - "r" (AT91_SDRAMC_LPCB_POWER_DOWN), - "r" (AT91_RSTC_KEY | AT91_RSTC_PERRST | AT91_RSTC_PROCRST)); + "r" cpu_to_le32(AT91_SDRAMC_LPCB_POWER_DOWN), + "r" cpu_to_le32(AT91_RSTC_KEY | AT91_RSTC_PERRST | AT91_RSTC_PROCRST)); return NOTIFY_DONE; } @@ -116,8 +116,8 @@ static int at91sam9g45_restart(struct notifier_block *this, unsigned long mode, "r" (at91_ramc_base[1]), "r" (at91_rstc_base), "r" (1), - "r" (AT91_DDRSDRC_LPCB_POWER_DOWN), - "r" (AT91_RSTC_KEY | AT91_RSTC_PERRST | AT91_RSTC_PROCRST) + "r" cpu_to_le32(AT91_DDRSDRC_LPCB_POWER_DOWN), + "r" cpu_to_le32(AT91_RSTC_KEY | AT91_RSTC_PERRST | AT91_RSTC_PROCRST) : "r0"); return NOTIFY_DONE;