mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] Fix default baudrate setting
@ 2010-09-25 17:21 Juergen Beisert
  2010-09-25 20:00 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 4+ messages in thread
From: Juergen Beisert @ 2010-09-25 17:21 UTC (permalink / raw)
  To: barebox

commit 604c99039f873952e252a5933309fc8e59b603db
Author: Juergen Beisert <jbe@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@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/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix default baudrate setting
  2010-09-25 17:21 [PATCH] Fix default baudrate setting Juergen Beisert
@ 2010-09-25 20:00 ` Jean-Christophe PLAGNIOL-VILLARD
  2010-09-25 23:54   ` Marc Kleine-Budde
  0 siblings, 1 reply; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-09-25 20:00 UTC (permalink / raw)
  To: Juergen Beisert; +Cc: barebox

On 19:21 Sat 25 Sep     , Juergen Beisert wrote:
> commit 604c99039f873952e252a5933309fc8e59b603db
> Author: Juergen Beisert <jbe@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@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
can we put those macros in a more generic place?

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix default baudrate setting
  2010-09-25 20:00 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2010-09-25 23:54   ` Marc Kleine-Budde
  2010-09-27  7:09     ` Sascha Hauer
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Kleine-Budde @ 2010-09-25 23:54 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox


[-- Attachment #1.1: Type: text/plain, Size: 1365 bytes --]

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@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@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
> can we put those macros in a more generic place?

The kernel calls this stringify, see [1]

g'night,
Marc

[1] http://lxr.linux.no/linux+v2.6.35.5/include/linux/stringify.h
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix default baudrate setting
  2010-09-25 23:54   ` Marc Kleine-Budde
@ 2010-09-27  7:09     ` Sascha Hauer
  0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2010-09-27  7:09 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: barebox

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@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@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
> > 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.

Sascha



> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-09-27  7:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-25 17:21 [PATCH] Fix default baudrate setting Juergen Beisert
2010-09-25 20:00 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-25 23:54   ` Marc Kleine-Budde
2010-09-27  7:09     ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox