diff options
-rw-r--r-- | 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 f6a63780bbde..74d937249348 100644 --- a/arch/powerpc/sysdev/commproc.c +++ b/arch/powerpc/sysdev/commproc.c | |||
@@ -408,7 +408,7 @@ EXPORT_SYMBOL(cpm_dpram_phys); | |||
408 | #endif /* !CONFIG_PPC_CPM_NEW_BINDING */ | 408 | #endif /* !CONFIG_PPC_CPM_NEW_BINDING */ |
409 | 409 | ||
410 | struct cpm_ioport16 { | 410 | struct cpm_ioport16 { |
411 | __be16 dir, par, sor, dat, intr; | 411 | __be16 dir, par, odr_sor, dat, intr; |
412 | __be16 res[3]; | 412 | __be16 res[3]; |
413 | }; | 413 | }; |
414 | 414 | ||
@@ -438,6 +438,13 @@ static void cpm1_set_pin32(int port, int pin, int flags) | |||
438 | else | 438 | else |
439 | clrbits32(&iop->par, pin); | 439 | clrbits32(&iop->par, pin); |
440 | 440 | ||
441 | if (port == CPM_PORTB) { | ||
442 | if (flags & CPM_PIN_OPENDRAIN) | ||
443 | setbits16(&mpc8xx_immr->im_cpm.cp_pbodr, pin); | ||
444 | else | ||
445 | clrbits16(&mpc8xx_immr->im_cpm.cp_pbodr, pin); | ||
446 | } | ||
447 | |||
441 | if (port == CPM_PORTE) { | 448 | if (port == CPM_PORTE) { |
442 | if (flags & CPM_PIN_SECONDARY) | 449 | if (flags & CPM_PIN_SECONDARY) |
443 | setbits32(&iop->sor, pin); | 450 | setbits32(&iop->sor, pin); |
@@ -471,11 +478,17 @@ static void cpm1_set_pin16(int port, int pin, int flags) | |||
471 | else | 478 | else |
472 | clrbits16(&iop->par, pin); | 479 | clrbits16(&iop->par, pin); |
473 | 480 | ||
481 | if (port == CPM_PORTA) { | ||
482 | if (flags & CPM_PIN_OPENDRAIN) | ||
483 | setbits16(&iop->odr_sor, pin); | ||
484 | else | ||
485 | clrbits16(&iop->odr_sor, pin); | ||
486 | } | ||
474 | if (port == CPM_PORTC) { | 487 | if (port == CPM_PORTC) { |
475 | if (flags & CPM_PIN_SECONDARY) | 488 | if (flags & CPM_PIN_SECONDARY) |
476 | setbits16(&iop->sor, pin); | 489 | setbits16(&iop->odr_sor, pin); |
477 | else | 490 | else |
478 | clrbits16(&iop->sor, pin); | 491 | clrbits16(&iop->odr_sor, pin); |
479 | } | 492 | } |
480 | } | 493 | } |
481 | 494 | ||