summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorGedare Bloom <gedare@rtems.org>2011-11-06 20:12:20 +0000
committerGedare Bloom <gedare@rtems.org>2011-11-06 20:12:20 +0000
commit053b7e0403ba1411ed29ae927c9d4a87dce090f6 (patch)
tree010f852da84f836fdc0e7e9b1b946f43abda885a /c
parent2011-11-06 Gedare Bloom <gedare@rtems.org> (diff)
downloadrtems-053b7e0403ba1411ed29ae927c9d4a87dce090f6.tar.bz2
2011-11-06 Gedare Bloom <gedare@rtems.org>
* shared/console/conscfg.c: Whitespace and style fixes.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/sparc64/ChangeLog4
-rw-r--r--c/src/lib/libbsp/sparc64/shared/console/conscfg.c102
2 files changed, 52 insertions, 54 deletions
diff --git a/c/src/lib/libbsp/sparc64/ChangeLog b/c/src/lib/libbsp/sparc64/ChangeLog
index 6e76287cfa..f469cc87ee 100644
--- a/c/src/lib/libbsp/sparc64/ChangeLog
+++ b/c/src/lib/libbsp/sparc64/ChangeLog
@@ -1,5 +1,9 @@
2011-11-06 Gedare Bloom <gedare@rtems.org>
+ * shared/console/conscfg.c: Whitespace and style fixes.
+
+2011-11-06 Gedare Bloom <gedare@rtems.org>
+
* shared/console/conscfg.c: Give console port a name.
2011-10-18 Jennifer Averett <Jennifer.Averett@OARcorp.com>
diff --git a/c/src/lib/libbsp/sparc64/shared/console/conscfg.c b/c/src/lib/libbsp/sparc64/shared/console/conscfg.c
index 84a12043fd..4e52984b41 100644
--- a/c/src/lib/libbsp/sparc64/shared/console/conscfg.c
+++ b/c/src/lib/libbsp/sparc64/shared/console/conscfg.c
@@ -8,7 +8,6 @@
* $Id$
*/
-
#include <bsp.h>
#include <libchip/serial.h>
@@ -18,79 +17,75 @@ extern void ofw_read(void *,int );
int sun4v_console_device_first_open(int major, int minor, void *arg)
{
- return 0;
+ return 0;
}
static ssize_t sun4v_console_poll_write(int minor, const char *buf, size_t n)
{
- ofw_write(buf, n);
- return 0;
+ ofw_write(buf, n);
+ return 0;
}
void sun4v_console_deviceInitialize (int minor)
{
-
+
}
int sun4v_console_poll_read(int minor){
- int a;
- ofw_read(&a,1);
- if(a!=0){
- return a>>24;
- }
- return -1;
+ int a;
+ ofw_read(&a,1);
+ if(a!=0){
+ return a>>24;
+ }
+ return -1;
}
-
bool sun4v_console_deviceProbe (int minor){
- return true;
+ return true;
}
/*
* Polled mode functions
*/
console_fns pooled_functions={
- sun4v_console_deviceProbe, /*bool (*deviceProbe)(int minor);*/
- sun4v_console_device_first_open, /*int (*deviceFirstOpen)(int major, int minor, void *arg);*/
- NULL, /*int (*deviceLastClose)(int major, int minor, void *arg);*/
- sun4v_console_poll_read, /*int (*deviceRead)(int minor);*/
- sun4v_console_poll_write, /*ssize_t (*deviceWrite)(int minor, const char *buf, size_t len);*/
- sun4v_console_deviceInitialize, /*void (*deviceInitialize)(int minor);*/
- NULL, /*void (*deviceWritePolled)(int minor, char cChar);*/
- NULL, /*int (*deviceSetAttributes)(int minor, const struct termios *t);*/
- NULL /*bool deviceOutputUsesInterrupts;*/
+ 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 */
};
-console_flow sun4v_console_console_flow={
- NULL,/*int (*deviceStopRemoteTx)(int minor);*/
- NULL/*int (*deviceStartRemoteTx)(int minor);*/
+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, /* 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 */
-},
+ {
+ "/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
*/
@@ -99,7 +94,6 @@ console_tbl Console_Configuration_Ports[] = {
unsigned long Console_Configuration_Count = NUM_CONSOLE_PORTS;
-
/* putchar/getchar for printk */
static void bsp_out_char (char c)
@@ -110,12 +104,12 @@ static void bsp_out_char (char c)
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;
+ 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;