* [PATCH resend 4/4] powerpc: Add support for PORTA and PORTB odr registers
@ 2007-11-22 16:54 Jochen Friedrich
2007-11-25 20:37 ` Vitaly Bordug
0 siblings, 1 reply; 2+ messages in thread
From: Jochen Friedrich @ 2007-11-22 16:54 UTC (permalink / raw)
To: linuxppc-dev
PORTA and PORTB have odr registers, as well. However, the PORTB odr
register is only 16bit.
Signed-off-by: Jochen Friedrich <jochen@scram.de>
Acked-by: Scott Wood <scottwood@freescale.com>
---
arch/powerpc/sysdev/commproc.c | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/sysdev/commproc.c
index d5a0dcf..c0d00c2 100644
--- a/arch/powerpc/sysdev/commproc.c
+++ b/arch/powerpc/sysdev/commproc.c
@@ -411,7 +411,7 @@ EXPORT_SYMBOL(cpm_dpram_phys);
#endif /* !CONFIG_PPC_CPM_NEW_BINDING */
struct cpm_ioport16 {
- __be16 dir, par, sor, dat, intr;
+ __be16 dir, par, odr_sor, dat, intr;
__be16 res[3];
};
@@ -441,6 +441,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);
@@ -474,11 +481,17 @@ static void cpm1_set_pin16(int port, int pin, int flags)
else
clrbits16(&iop->par, pin);
+ if (port == CPM_PORTA) {
+ if (flags & CPM_PIN_OPENDRAIN)
+ setbits16(&iop->odr_sor, pin);
+ else
+ clrbits16(&iop->odr_sor, pin);
+ }
if (port == CPM_PORTC) {
if (flags & CPM_PIN_SECONDARY)
- setbits16(&iop->sor, pin);
+ setbits16(&iop->odr_sor, pin);
else
- clrbits16(&iop->sor, pin);
+ clrbits16(&iop->odr_sor, pin);
}
}
--
1.5.3.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH resend 4/4] powerpc: Add support for PORTA and PORTB odr registers
2007-11-22 16:54 [PATCH resend 4/4] powerpc: Add support for PORTA and PORTB odr registers Jochen Friedrich
@ 2007-11-25 20:37 ` Vitaly Bordug
0 siblings, 0 replies; 2+ messages in thread
From: Vitaly Bordug @ 2007-11-25 20:37 UTC (permalink / raw)
To: Jochen Friedrich; +Cc: linuxppc-dev
On Thu, 22 Nov 2007 17:54:13 +0100
Jochen Friedrich wrote:
> PORTA and PORTB have odr registers, as well. However, the PORTB odr
> register is only 16bit.
>
> Signed-off-by: Jochen Friedrich <jochen@scram.de>
> Acked-by: Scott Wood <scottwood@freescale.com>
Applied to linux-2.6-8xx.git, for-paulus branch
--
Sincerely, Vitaly
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-11-25 20:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-22 16:54 [PATCH resend 4/4] powerpc: Add support for PORTA and PORTB odr registers Jochen Friedrich
2007-11-25 20:37 ` Vitaly Bordug
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).