[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <473736FB.7090609@scram.de>
Date: Sun, 11 Nov 2007 18:08:11 +0100
From: Jochen Friedrich <jochen@...am.de>
To: "linuxppc-embedded@...abs.org" <linuxppc-embedded@...abs.org>
CC: linux-kernel@...r.kernel.org, Scott Wood <scottwood@...escale.com>,
paulus@...ba.org
Subject: [PATCH] powerpc: Add support for PORTA sor and PORTB odr registers
PORTA has an so register and PORTB had an odr register, as well.
However, the PORTB odr register is only 16bit.
Signed-off-by: Jochen Friedrich <jochen@...am.de>
---
arch/powerpc/sysdev/commproc.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/sysdev/commproc.c
index f6a6378..a9f5fcf 100644
--- a/arch/powerpc/sysdev/commproc.c
+++ b/arch/powerpc/sysdev/commproc.c
@@ -438,6 +438,13 @@ static void cpm1_set_pin32(int port, int pin, int flags)
else
clrbits32(&iop->par, pin);
+ if (port == CPM_PORTB) {
+ if (flags & CPM_PIN_OPENDRAIN)
+ setbits16(&mpc8xx_immr->im_cpm.cp_pbodr, pin);
+ else
+ clrbits16(&mpc8xx_immr->im_cpm.cp_pbodr, pin);
+ }
+
if (port == CPM_PORTE) {
if (flags & CPM_PIN_SECONDARY)
setbits32(&iop->sor, pin);
@@ -471,7 +478,7 @@ static void cpm1_set_pin16(int port, int pin, int flags)
else
clrbits16(&iop->par, pin);
- if (port == CPM_PORTC) {
+ if ((port == CPM_PORTA) || (port == CPM_PORTC)) {
if (flags & CPM_PIN_SECONDARY)
setbits16(&iop->sor, pin);
else
--
1.5.3.5
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists