From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ron Madrid Date: Wed, 18 Feb 2009 12:02:02 -0800 (PST) Subject: [U-Boot] [PATCH v2] Create configuration option for restricted ns16550 functions In-Reply-To: <20090218140159.e4880db0.kim.phillips@freescale.com> Message-ID: <82808.89665.qm@web83505.mail.sp1.yahoo.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de --- On Wed, 2/18/09, Kim Phillips wrote: > diff --git a/include/configs/SIMPC8313.h > b/include/configs/SIMPC8313.h > index f62a705..6219722 100644 > --- a/include/configs/SIMPC8313.h > +++ b/include/configs/SIMPC8313.h > @@ -205,6 +205,7 @@ > #define CONFIG_SYS_NS16550 > #define CONFIG_SYS_NS16550_SERIAL > #define CONFIG_SYS_NS16550_REG_SIZE 1 > +#define CONFIG_SYS_NS16550_MIN_FUNCTIONS If you case the CONFIG_SYS_NS16550_MIN_FUNCTIONS within a #ifdef CONFIG_NAND_SPL you don't need the following definitions. > +#ifndef CONFIG_SYS_NS16550_MIN_FUNCTIONS > char NS16550_getc (NS16550_t com_port); > int NS16550_tstc (NS16550_t com_port); > void NS16550_reinit (NS16550_t com_port, int > baud_divisor); > +#else > +#define NS16550_getc(com_port) 0 > +#define NS16550_tstc(com_port) 0 > +#define NS16550_reinit(com_port, baud_divisor) > +#endif I was going to send a patch after this one was accepted that takes care of the SIMPC8313 build. Should I have sent the two of them together? I thought that they would be considered too different. It would be this below. diff --git a/include/configs/SIMPC8313.h b/include/configs/SIMPC8313.h index a616236..59e43be 100644 --- a/include/configs/SIMPC8313.h +++ b/include/configs/SIMPC8313.h @@ -212,6 +212,10 @@ #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500) #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600) +#ifdef CONFIG_NAND_SPL +#define CONFIG_NS16550_MIN_FUNCTIONS +#endif + /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " If you'd like, I can send this one now or you could put the new config option inside of a #ifdef CONFIG_NAND_SPL. Ron