linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: benh@kernel.crashing.org, mpe@ellerman.id.au, paulus@samba.org,
	agraf@suse.de
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	aik@ozlabs.ru, Peter Hettkamp <peter.hettkamp@htp-tel.de>,
	linux-kernel@vger.kernel.org, mdroth@us.ibm.com,
	linuxppc-dev@lists.ozlabs.org,
	David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 2/5] powerpc: Remove powerpc specific byteswap from bt8xx DVB driver
Date: Tue,  3 Feb 2015 16:36:22 +1100	[thread overview]
Message-ID: <1422941785-22557-3-git-send-email-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <1422941785-22557-1-git-send-email-david@gibson.dropbear.id.au>

The bt8xx PCI DVB driver includes a powerpc specific hack, using one of
the powerpc specific byteswapping functions in an IO helper macro.

There's no reason to use the powerpc specific function instead of a
generic byteswap, so this patch removes it.  I'm not sure if the powerpc
specific memory barrier is required, so I'm leaving that in.

Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Peter Hettkamp <peter.hettkamp@htp-tel.de>

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 drivers/media/pci/bt8xx/bt878.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/pci/bt8xx/bt878.h b/drivers/media/pci/bt8xx/bt878.h
index d19b592..bbb76bb 100644
--- a/drivers/media/pci/bt8xx/bt878.h
+++ b/drivers/media/pci/bt8xx/bt878.h
@@ -145,12 +145,12 @@ void bt878_stop(struct bt878 *bt);
 #if defined(__powerpc__)	/* big-endian */
 static inline void io_st_le32(volatile unsigned __iomem *addr, unsigned val)
 {
-	st_le32(addr, val);
+	*addr = cpu_to_le32(val);
 	eieio();
 }
 
 #define bmtwrite(dat,adr)  io_st_le32((adr),(dat))
-#define bmtread(adr)       ld_le32((adr))
+#define bmtread(adr)       le32_to_cpu(*((volatile __le32 *)(adr)))
 #else
 #define bmtwrite(dat,adr)  writel((dat), (adr))
 #define bmtread(adr)       readl(adr)
-- 
2.1.0

  parent reply	other threads:[~2015-02-03  5:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03  5:36 [PATCH 0/5] powerpc: Get rid of redundant arch specific swab functions David Gibson
2015-02-03  5:36 ` [PATCH 1/5] powerpc: Move Power Macintosh drivers to generic byteswappers David Gibson
2015-02-03  5:36 ` David Gibson [this message]
2015-03-24  2:32   ` [PATCH 2/5] powerpc: Remove powerpc specific byteswap from bt8xx DVB driver Benjamin Herrenschmidt
2015-02-03  5:36 ` [PATCH 3/5] powerpc: Remove arch specific byteswappers from the MXC MMC driver David Gibson
2015-02-03  5:36 ` [PATCH 4/5] powerpc: Cleanup KVM emulated load/store endian handling David Gibson
2015-02-04 14:30   ` Alexander Graf
2015-02-03  5:36 ` [PATCH 5/5] powerpc: Remove unused st_le*() and ld_le* functions David Gibson
2015-02-04 11:54 ` [PATCH 0/5] powerpc: Get rid of redundant arch specific swab functions David Laight
2015-02-04 13:41   ` 'David Gibson'

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1422941785-22557-3-git-send-email-david@gibson.dropbear.id.au \
    --to=david@gibson.dropbear.id.au \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mchehab@osg.samsung.com \
    --cc=mdroth@us.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=peter.hettkamp@htp-tel.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).