[PATCH] Fix default baudrate setting
Juergen Beisert
jbe at pengutronix.de
Sat Sep 25 13:21:59 EDT 2010
commit 604c99039f873952e252a5933309fc8e59b603db
Author: Juergen Beisert <jbe at pengutronix.de>
Date: Sat Sep 25 19:18:25 2010 +0200
Fix default baudrate setting
The menu entry to set the default baudrate (CONFIG_BAUDRATE) makes no sense,
as long as its content is not used. This patch makes barebox using the setting
again.
Signed-off-by: Juergen Beisert <jbe at pengutronix.de>
diff --git a/common/console.c b/common/console.c
index 204a08c..71fa88f 100644
--- a/common/console.c
+++ b/common/console.c
@@ -140,9 +140,12 @@ int console_register(struct console_device *newcdev)
dev->type_data = newcdev;
register_device(dev);
+#define xstr(s) str(s)
+#define str(s) #s
+
if (newcdev->setbrg) {
dev_add_param(dev, "baudrate", console_baudrate_set, NULL, 0);
- dev_set_param(dev, "baudrate", "115200");
+ dev_set_param(dev, "baudrate", xstr(CONFIG_BAUDRATE));
}
dev_add_param(dev, "active", console_std_set, NULL, 0);
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | Phone: +49-8766-939 228 |
Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ |
More information about the barebox
mailing list