summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorEric Norum <WENorum@lbl.gov>2005-11-11 15:48:24 +0000
committerEric Norum <WENorum@lbl.gov>2005-11-11 15:48:24 +0000
commit46fa1f6404b8624bdb96cd6ce40889253c6a07cd (patch)
treead4623d8dca6c22ef22399991a59e3bf70433a36 /c
parentFix typos. (diff)
downloadrtems-46fa1f6404b8624bdb96cd6ce40889253c6a07cd.tar.bz2
Clean up UART2 pin setup. Protect pin setup code.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/m68k/uC5282/ChangeLog4
-rw-r--r--c/src/lib/libbsp/m68k/uC5282/README3
-rw-r--r--c/src/lib/libbsp/m68k/uC5282/console/console.c7
3 files changed, 12 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/m68k/uC5282/ChangeLog b/c/src/lib/libbsp/m68k/uC5282/ChangeLog
index 933a1ae7d0..973af5fec3 100644
--- a/c/src/lib/libbsp/m68k/uC5282/ChangeLog
+++ b/c/src/lib/libbsp/m68k/uC5282/ChangeLog
@@ -1,3 +1,7 @@
+2005-11-11 Eric Norum <norume@aps.anl.gov>
+
+ * console/console.c: Clean up UART2 pin setup. Protect pin setup code.
+
2005-11-08 Eric Norum <norume@aps.anl.gov>
* console/console.c: Add code to set up pin assignments
diff --git a/c/src/lib/libbsp/m68k/uC5282/README b/c/src/lib/libbsp/m68k/uC5282/README
index 9e63630a5e..30ebd8de0b 100644
--- a/c/src/lib/libbsp/m68k/uC5282/README
+++ b/c/src/lib/libbsp/m68k/uC5282/README
@@ -26,7 +26,8 @@ The bsp relies on the Arcturus monitor to set up DRAM and all chip selects.
This seems OK to me, but others may find it lame.....
I/O pin restrictions make simultaneous operation
-of I2C, CAN and UART2 impossible.
+of I2C, CAN and UART2 impossible. The BSP configures UART2 to
+use the CAN pins and leaves the I2C pins available for use.
BSP NAME: uC5282
BOARD: Arcturus Netrworks uCdimm 5282
diff --git a/c/src/lib/libbsp/m68k/uC5282/console/console.c b/c/src/lib/libbsp/m68k/uC5282/console/console.c
index 90860d9740..20c4da1a17 100644
--- a/c/src/lib/libbsp/m68k/uC5282/console/console.c
+++ b/c/src/lib/libbsp/m68k/uC5282/console/console.c
@@ -472,10 +472,12 @@ static int
IntUartInterruptOpen(int major, int minor, void *arg)
{
struct IntUartInfoStruct *info = &IntUartInfo[minor];
+ int level;
/*
* Enable serial I/O pin assignments
*/
+ rtems_interrupt_disable(level);
switch(minor) {
case 0:
MCF5282_GPIO_PUAPAR |= MCF5282_GPIO_PUAPAR_PUAPA1|MCF5282_GPIO_PUAPAR_PUAPA0;
@@ -484,9 +486,12 @@ IntUartInterruptOpen(int major, int minor, void *arg)
MCF5282_GPIO_PUAPAR |= MCF5282_GPIO_PUAPAR_PUAPA3|MCF5282_GPIO_PUAPAR_PUAPA2;
break;
case 2:
- MCF5282_GPIO_PASPAR |= MCF5282_GPIO_PASPAR_PASPA3(2)|MCF5282_GPIO_PASPAR_PASPA2(2);
+ MCF5282_GPIO_PASPAR = MCF5282_GPIO_PASPAR
+ & ~(MCF5282_GPIO_PASPAR_PASPA3(3)|MCF5282_GPIO_PASPAR_PASPA2(3))
+ | (MCF5282_GPIO_PASPAR_PASPA3(2)|MCF5282_GPIO_PASPAR_PASPA2(2));
break;
}
+ rtems_interrupt_enable(level);
/* enable the uart */
MCF5282_UART_UCR(minor) = (MCF5282_UART_UCR_TX_ENABLED | MCF5282_UART_UCR_RX_ENABLED);