Sascha Hauer wrote: > On Sun, Sep 26, 2010 at 01:54:36AM +0200, Marc Kleine-Budde wrote: > > On 09/25/2010 10:00 PM, Jean-Christophe PLAGNIOL-VILLARD wrote: > > > On 19:21 Sat 25 Sep , Juergen Beisert wrote: > > >> commit 604c99039f873952e252a5933309fc8e59b603db > > >> Author: Juergen Beisert <jbe@xxxxxxxxxxxxxx> > > >> 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@xxxxxxxxxxxxxx> > > >> > > >> 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 > > > > > > can we put those macros in a more generic place? > > > > The kernel calls this stringify, see [1] > > Ok, then we should add include/linux/stringify.h, remove the duplicate > in include/command.h and use stringify in this patch. While the preparation is already done, the real change can be made now. BTW: It is a candidate for master and next. 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@xxxxxxxxxxxxxx> diff --git a/common/console.c b/common/console.c index 39ead4b..5548a40 100644 --- a/common/console.c +++ b/common/console.c @@ -36,6 +36,7 @@ #include <module.h> #include <poller.h> #include <linux/list.h> +#include <linux/stringify.h> LIST_HEAD(console_list); EXPORT_SYMBOL(console_list); @@ -141,7 +142,7 @@ int console_register(struct console_device *newcdev) if (newcdev->setbrg) { dev_add_param(dev, "baudrate", console_baudrate_set, NULL, 0); - dev_set_param(dev, "baudrate", "115200"); + dev_set_param(dev, "baudrate", __stringify(CONFIG_BAUDRATE)); } dev_add_param(dev, "active", console_std_set, NULL, 0); jbe -- 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/ | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox