Create configuration option for restricted ns16550 functions
PATCH 1/1 Create configuration option for restricted ns16550 functions
This patch will create a configuration option for a minimum configuration for the ns16550 serial driver at drivers/serial/ns16550.c which will exclude all functions with exception of NS16550_putc and NS16550_init. This will be used primarily to save space and remove unused code from builds in which space is limited.
--- drivers/serial/ns16550.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/serial/ns16550.c +4 -1
@@ -39,6 +39,7 @@ void NS16550_init (NS16550_t com_port, int baud_divisor)#endif } +#ifndef CONFIG_NS16550_MIN_FUNCTIONS void NS16550_reinit (NS16550_t com_port,int baud_divisor) { com_port->ier =0x00 ;
@@ -53,6 +54,7 @@ void NS16550_reinit (NS16550_t com_port, int baud_divisor) com_port->dlm = (baud_divisor >>8 ) &0xff ; com_port->lcr = LCRVAL; } +#endif /* CONFIG_NS16550_MIN_FUNCTIONS */ void NS16550_putc (NS16550_t com_port,char c) {
@@ -60,6 +62,7 @@ void NS16550_putc (NS16550_t com_port, char c) com_port->thr = c; } +#ifndef CONFIG_NS16550_MIN_FUNCTIONS char NS16550_getc (NS16550_t com_port) {while ((com_port->lsr &LSR_DR ) ==0 ) {
@@ -75,5 +78,5 @@ int NS16550_tstc (NS16550_t com_port) {return ((com_port->lsr &LSR_DR ) !=0 ); } - +#endif /* CONFIG_NS16550_MIN_FUNCTIONS */ #endif
Signature · 1 line
1.5.5.1
PATCH 1/1 Create configuration option for restricted ns16550 functions
Quoted 61 lines · Ron Madrid
From: Ron Madrid <[email protected]>
Subject: [PATCH] Create configuration option for restricted ns16550 functions
To: u-boot at lists.denx.de
Cc: "Ron Madrid" <[email protected]>
Date: Friday, January 30, 2009, 3:45 PM
This patch will create a configuration option for a minimum configuration for
the ns16550 serial driver atdrivers/serial/ns16550.cwhich
will exclude all
functions with exception ofNS16550_putcandNS16550_init.
This will be used
primarily to save space and remove unused code from builds
in which space is
limited.Signed-off-by Ron Madrid <[email protected]>--- drivers/serial/ns16550.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)drivers/serial/ns16550.c +1
-0@@ -39,6 +39,7 @@ void NS16550_init (NS16550_t com_port, int baud_divisor)#endif } +#ifndef CONFIG_NS16550_MIN_FUNCTIONS void NS16550_reinit (NS16550_t com_port,int baud_divisor) {drivers/serial/ns16550.c +1
-0com_port->ier =0x00 ;@@ -53,6 +54,7 @@ void NS16550_reinit (NS16550_t com_port, int baud_divisor) com_port->dlm = (baud_divisor >> 8) & 0xff; com_port->lcr = LCRVAL; } +#endif /* CONFIG_NS16550_MIN_FUNCTIONS */ void NS16550_putc (NS16550_t com_port,char c){
drivers/serial/ns16550.c +1
-0@@ -60,6 +62,7 @@ void NS16550_putc (NS16550_t com_port, char c) com_port->thr = c; } +#ifndef CONFIG_NS16550_MIN_FUNCTIONS char NS16550_getc (NS16550_t com_port) {drivers/serial/ns16550.c +1
-1while ((com_port->lsr &LSR_DR ) ==0 ) {@@ -75,5 +78,5 @@ int NS16550_tstc (NS16550_t com_port) {return ((com_port->lsr &LSR_DR ) !=0 ); } - +#endif /* CONFIG_NS16550_MIN_FUNCTIONS */ #endif Signature · 1 line
1.5.5.1
Did this get looked at? I don't remember seeing anything about it. If it is still being looked at, just let me know.
Thanks,
Ron
PATCH 1/1 Create configuration option for restricted ns16550 functions
In reply to Ron MadridDear Ron Madrid,
Quoted 10 lines · In message <[email protected]> you…
This patch will create a configuration option for a minimum configuration for the ns16550 serial driver at
drivers/serial/ns16550.cwhich will exclude all functions with exception ofNS16550_putcandNS16550_init. This will be used primarily to save space and remove unused code from builds in which space is limited.Signed-off-by Ron Madrid <[email protected]>--- drivers/serial/ns16550.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
This also has to be documented in the README.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A man is not complete until he is married -- then he is finished.
PATCH 1/1 Create configuration option for restricted ns16550 functions
Quoted 13 lines · Wolfgang Denk
In message <[email protected]>
Quoted 1 line · you
This patch will create a configuration option for a
minimum configuration for
Quoted 1 line
the ns16550 serial driver at
drivers/serial/ns16550.cwhich will exclude all
Quoted 1 line
functions with exception of
NS16550_putcand
NS16550_init. This will be usedQuoted 1 line
primarily to save space and remove unused code from
builds in which space is
Quoted 2 lines
limited.
Quoted 8 lines
Quoted 1 line
Signed-off-by Ron MadridQuoted 3 lines
--- drivers/serial/ns16550.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)This also has to be documented in the README.
My apologies for missing that. I just now read the note in the README regarding the creation of new configuration options.
I have been searching for an appropriate location to place the description of the new configuration option within the README file but have been unable to settle on one. Should it go under the section titled "Configuration Settings:" This seems like the best place for it although most of the options listed in this section are of the CONFIG_SYS_ flavor.
Please let me know what you think or if there is a more appropriate place.
Ron