Skip to content

Commit

Permalink
[PATCH] m68knommu: set GPIO lines for serial ports on 5282 in mcfseri…
Browse files Browse the repository at this point in the history
…al.c

For the Freescale M5282 ColdFire,
Port UA Pin Assignment Register should set to UART mode.
Patch submitted by David Wu <davidwu@arcturusnetworks.com>.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Greg Ungerer authored and Linus Torvalds committed Mar 7, 2007
1 parent 8668fb5 commit ebfcfef
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions drivers/serial/mcfserial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1541,8 +1541,8 @@ static void mcfrs_irqinit(struct mcf_serial *info)
* External Pin Mask Setting & Enable External Pin for Interface
* mrcbis@aliceposta.it
*/
unsigned short *serpin_enable_mask;
serpin_enable_mask = (MCF_IPSBAR + MCF_GPIO_PAR_UART);
u16 *serpin_enable_mask;
serpin_enable_mask = (u16 *) (MCF_IPSBAR + MCF_GPIO_PAR_UART);
if (info->line == 0)
*serpin_enable_mask |= UART0_ENABLE_MASK;
else if (info->line == 1)
Expand All @@ -1551,6 +1551,13 @@ static void mcfrs_irqinit(struct mcf_serial *info)
*serpin_enable_mask |= UART2_ENABLE_MASK;
}
#endif
#if defined(CONFIG_M528x)
/* make sure PUAPAR is set for UART0 and UART1 */
if (info->line < 2) {
volatile unsigned char *portp = (volatile unsigned char *) (MCF_MBAR + MCF5282_GPIO_PUAPAR);
*portp |= (0x03 << (info->line * 2));
}
#endif
#elif defined(CONFIG_M520x)
volatile unsigned char *icrp, *uartp;
volatile unsigned long *imrp;
Expand Down

0 comments on commit ebfcfef

Please sign in to comment.