summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-10-07 08:02:14 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-10-07 08:02:14 +0200
commitebf9022f2eee564fc4b0e4b37a8267319923d808 (patch)
tree407715e96a34f57b194198c24099cd7b627ae714 /include
parenta293dc2753433f8052f9471b2d0cc19f01c50739 (diff)
parent7359e2852249758f6fb12dae9a0d57a197b7a769 (diff)
downloadbarebox-ebf9022f2eee564fc4b0e4b37a8267319923d808.tar.gz
barebox-ebf9022f2eee564fc4b0e4b37a8267319923d808.tar.xz
Merge branch 'for-next/rs485'
Conflicts: common/console_common.c
Diffstat (limited to 'include')
-rw-r--r--include/common.h1
-rw-r--r--include/console.h8
2 files changed, 9 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index 066827fd7d..0f0ba08c44 100644
--- a/include/common.h
+++ b/include/common.h
@@ -152,6 +152,7 @@ extern int (*barebox_main)(void);
void __noreturn start_barebox(void);
void shutdown_barebox(void);
+extern void (*board_shutdown)(void);
/*
* architectures which have special calling conventions for
diff --git a/include/console.h b/include/console.h
index d12a06ebe7..550b440376 100644
--- a/include/console.h
+++ b/include/console.h
@@ -28,6 +28,11 @@
#define CONSOLE_STDOUT (1 << 1)
#define CONSOLE_STDERR (1 << 2)
+enum console_mode {
+ CONSOLE_MODE_NORMAL,
+ CONSOLE_MODE_RS485,
+};
+
struct console_device {
struct device_d *dev;
struct device_d class_dev;
@@ -37,6 +42,7 @@ struct console_device {
int (*getc)(struct console_device *cdev);
int (*setbrg)(struct console_device *cdev, int baudrate);
void (*flush)(struct console_device *cdev);
+ int (*set_mode)(struct console_device *cdev, enum console_mode mode);
struct list_head list;
@@ -48,6 +54,8 @@ struct console_device {
int console_register(struct console_device *cdev);
int console_unregister(struct console_device *cdev);
+struct console_device *console_get_by_dev(struct device_d *dev);
+
extern struct list_head console_list;
#define for_each_console(console) list_for_each_entry(console, &console_list, list)