summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc64
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-19 06:28:01 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-20 13:08:32 +0200
commitd7d66d7d4523b904c8ccc6aea3709dc0d5aa5bdc (patch)
treecaa54b4229e86a68c84ab5961af34e087dce5302 /c/src/lib/libbsp/sparc64
parentbsps/powerpc: Move shared btimer support (diff)
downloadrtems-d7d66d7d4523b904c8ccc6aea3709dc0d5aa5bdc.tar.bz2
bsps: Move console drivers to bsps
This patch is a part of the BSP source reorganization. Update #3285.
Diffstat (limited to 'c/src/lib/libbsp/sparc64')
-rw-r--r--c/src/lib/libbsp/sparc64/niagara/Makefile.am2
-rw-r--r--c/src/lib/libbsp/sparc64/shared/console/conscfg.c115
-rw-r--r--c/src/lib/libbsp/sparc64/usiii/Makefile.am2
3 files changed, 2 insertions, 117 deletions
diff --git a/c/src/lib/libbsp/sparc64/niagara/Makefile.am b/c/src/lib/libbsp/sparc64/niagara/Makefile.am
index 7ff741fe12..a0614da7ba 100644
--- a/c/src/lib/libbsp/sparc64/niagara/Makefile.am
+++ b/c/src/lib/libbsp/sparc64/niagara/Makefile.am
@@ -37,7 +37,7 @@ librtemsbsp_a_SOURCES += ../shared/asm/asm.S
librtemsbsp_a_SOURCES +=../../../../../../bsps/sparc64/shared/clock/ckinit.c
-librtemsbsp_a_SOURCES += ../shared/console/conscfg.c
+librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc64/shared/console/conscfg.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/legacy-console.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/legacy-console-control.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/legacy-console-select.c
diff --git a/c/src/lib/libbsp/sparc64/shared/console/conscfg.c b/c/src/lib/libbsp/sparc64/shared/console/conscfg.c
deleted file mode 100644
index 560bdc05bf..0000000000
--- a/c/src/lib/libbsp/sparc64/shared/console/conscfg.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * COPYRIGHT (c) 2010 Eugen Leontie.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#include <bsp.h>
-
-#include <libchip/serial.h>
-
-#include <rtems/bspIo.h>
-
-#include <boot/ofw.h>
-
-static int sun4v_console_device_first_open(int major, int minor, void *arg)
-{
- return 0;
-}
-
-static ssize_t sun4v_console_poll_write(int minor, const char *buf, size_t n)
-{
- ofw_write(buf, n);
- return 0;
-}
-
-static void sun4v_console_deviceInitialize (int minor)
-{
-
-}
-
-static int sun4v_console_poll_read(int minor){
- int a;
- ofw_read(&a,1);
- if ( a != 0 ) {
- return a>>24;
- }
- return -1;
-}
-
-static bool sun4v_console_deviceProbe (int minor){
- return true;
-}
-
-/*
- * Polled mode functions
- */
-const console_fns pooled_functions={
- sun4v_console_deviceProbe, /* deviceProbe */
- sun4v_console_device_first_open, /* deviceFirstOpen */
- NULL, /* deviceLastClose */
- sun4v_console_poll_read, /* deviceRead */
- sun4v_console_poll_write, /* deviceWrite */
- sun4v_console_deviceInitialize, /* deviceInitialize */
- NULL, /* deviceWritePolled */
- NULL, /* deviceSetAttributes */
- NULL /* deviceOutputUsesInterrupts */
-};
-
-const console_flow sun4v_console_console_flow = {
- NULL, /* deviceStopRemoteTx */
- NULL /* deviceStartRemoteTx */
-};
-
-console_tbl Console_Configuration_Ports[] = {
- {
- "/dev/ttyS0", /* sDeviceName */
- SERIAL_CUSTOM, /* deviceType */
- &pooled_functions, /* pDeviceFns */
- NULL, /* deviceProbe, assume it is there */
- &sun4v_console_console_flow, /* pDeviceFlow */
- 0, /* ulMargin */
- 0, /* ulHysteresis */
- (void *) NULL, /* pDeviceParams */
- 0, /* ulCtrlPort1 */
- 0, /* ulCtrlPort2 */
- 1, /* ulDataPort */
- NULL, /* getRegister */
- NULL, /* setRegister */
- NULL, /* unused */ /* getData */
- NULL, /* unused */ /* setData */
- 0, /* ulClock */
- 0 /* ulIntVector -- base for port */
- },
-};
-
-/*
- * Declare some information used by the console driver
- */
-
-#define NUM_CONSOLE_PORTS 1
-
-unsigned long Console_Configuration_Count = NUM_CONSOLE_PORTS;
-
-/* putchar/getchar for printk */
-
-static void bsp_out_char (char c)
-{
- ofw_write(&c, 1);
-}
-
-BSP_output_char_function_type BSP_output_char = bsp_out_char;
-
-static int bsp_in_char( void ){
- int tmp;
- ofw_read( &tmp, 1 ); /* blocks */
- if( tmp != 0 ) {
- return tmp>>24;
- }
- return -1;
-}
-
-BSP_polling_getchar_function_type BSP_poll_char = bsp_in_char;
-
diff --git a/c/src/lib/libbsp/sparc64/usiii/Makefile.am b/c/src/lib/libbsp/sparc64/usiii/Makefile.am
index 1e7c503ea0..e693732c05 100644
--- a/c/src/lib/libbsp/sparc64/usiii/Makefile.am
+++ b/c/src/lib/libbsp/sparc64/usiii/Makefile.am
@@ -48,7 +48,7 @@ librtemsbsp_a_SOURCES += ../shared/start/trap_table.S
librtemsbsp_a_SOURCES +=../../../../../../bsps/sparc64/shared/clock/ckinit.c
-librtemsbsp_a_SOURCES += ../shared/console/conscfg.c
+librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc64/shared/console/conscfg.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/legacy-console.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/legacy-console-control.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/legacy-console-select.c