summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/gen68360/console
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1997-04-09 14:05:50 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1997-04-09 14:05:50 +0000
commite2d795597310f976af211f9bac2466dbf89b50c8 (patch)
tree7d3053fa42d08569c75a1add4c5715a5fc8ff4fa /c/src/lib/libbsp/m68k/gen68360/console
parentadded cast to eliminate warning. (diff)
downloadrtems-e2d795597310f976af211f9bac2466dbf89b50c8.tar.bz2
Added ka9q tcpip stack and network driver for the gen68360. This effort
was done based on the 3.6.0 release and had to be autoconf'ed locally. It is turned on is the bsp enables it and it is not explicitly disabled via the configure option --disable-tcpip. As many warnings as possible were removed locally after the code was merged. Only the gen68360 and mvme136 bsps were compiled this way. The ka9q port and network driver were submitted by Eric Norum (eric@skatter.USask.Ca). The network demo programs are not included in the tree at this point.
Diffstat (limited to 'c/src/lib/libbsp/m68k/gen68360/console')
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/console/console.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/c/src/lib/libbsp/m68k/gen68360/console/console.c b/c/src/lib/libbsp/m68k/gen68360/console/console.c
index bc451e2609..c840d78fd9 100644
--- a/c/src/lib/libbsp/m68k/gen68360/console/console.c
+++ b/c/src/lib/libbsp/m68k/gen68360/console/console.c
@@ -42,17 +42,10 @@
*/
/*
- * Place buffer descriptors at end of User Data/BD space in dual-port RAM
- */
-#define consoleRxBd ((volatile m360BufferDescriptor_t *)((char *)m360.dpram1 + \
- (sizeof(m360.dpram2) - 2*sizeof(m360BufferDescriptor_t))))
-#define consoleTxBd ((volatile m360BufferDescriptor_t *)((char *)m360.dpram1 + \
- (sizeof(m360.dpram2) - sizeof(m360BufferDescriptor_t))))
-
-/*
* I/O buffers can be in ordindary RAM
*/
static volatile char rxBuf, txBuf;
+static volatile m360BufferDescriptor_t *consoleRxBd, *consoleTxBd;
rtems_device_driver console_initialize(
rtems_device_major_number major,
@@ -63,6 +56,12 @@ rtems_device_driver console_initialize(
rtems_status_code status;
/*
+ * Allocate buffer descriptors
+ */
+ consoleRxBd = M360AllocateBufferDescriptors (1);
+ consoleTxBd = M360AllocateBufferDescriptors (1);
+
+ /*
* Configure port B pins to enable SMTXD1 and SMRXD1 pins
*/
m360.pbpar |= 0xC0;
@@ -121,9 +120,7 @@ rtems_device_driver console_initialize(
/*
* Send "Init parameters" command
*/
- m360.cr = M360_CR_OP_INIT_RX_TX | M360_CR_CHAN_SMC1 | M360_CR_FLG;
- while (m360.cr & M360_CR_FLG)
- continue;
+ M360ExecuteRISC (M360_CR_OP_INIT_RX_TX | M360_CR_CHAN_SMC1);
/*
* Enable receiver and transmitter