Moved conditional compile into Makefile
Signed-off-by: Andreas Engel <andreas.engel@ericsson.com>
This commit is contained in:
parent
20c9226cb8
commit
48d0192fe8
4
README
4
README
|
@ -380,11 +380,11 @@ The following options need to be configured:
|
||||||
param header, the default value is zero if undefined.
|
param header, the default value is zero if undefined.
|
||||||
|
|
||||||
- Serial Ports:
|
- Serial Ports:
|
||||||
CFG_PL010_SERIAL
|
CONFIG_PL010_SERIAL
|
||||||
|
|
||||||
Define this if you want support for Amba PrimeCell PL010 UARTs.
|
Define this if you want support for Amba PrimeCell PL010 UARTs.
|
||||||
|
|
||||||
CFG_PL011_SERIAL
|
CONFIG_PL011_SERIAL
|
||||||
|
|
||||||
Define this if you want support for Amba PrimeCell PL011 UARTs.
|
Define this if you want support for Amba PrimeCell PL011 UARTs.
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,8 @@ COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o
|
||||||
COBJS-$(CONFIG_S3C64XX) += s3c64xx.o
|
COBJS-$(CONFIG_S3C64XX) += s3c64xx.o
|
||||||
COBJS-y += serial.o
|
COBJS-y += serial.o
|
||||||
COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
|
COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
|
||||||
COBJS-y += serial_pl01x.o
|
COBJS-$(CONFIG_PL010_SERIAL) += serial_pl01x.o
|
||||||
|
COBJS-$(CONFIG_PL011_SERIAL) += serial_pl01x.o
|
||||||
COBJS-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o
|
COBJS-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o
|
||||||
COBJS-$(CONFIG_SCIF_CONSOLE) += serial_sh.o
|
COBJS-$(CONFIG_SCIF_CONSOLE) += serial_sh.o
|
||||||
COBJS-$(CONFIG_USB_TTY) += usbtty.o
|
COBJS-$(CONFIG_USB_TTY) += usbtty.o
|
||||||
|
|
|
@ -25,14 +25,11 @@
|
||||||
* MA 02111-1307 USA
|
* MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Simple U-Boot driver for the PrimeCell PL011 UARTs on the IntegratorCP */
|
/* Simple U-Boot driver for the PrimeCell PL010/PL011 UARTs */
|
||||||
/* Should be fairly simple to make it work with the PL010 as well */
|
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <watchdog.h>
|
#include <watchdog.h>
|
||||||
|
|
||||||
#if defined(CFG_PL010_SERIAL) || defined(CFG_PL011_SERIAL)
|
|
||||||
|
|
||||||
#include "serial_pl01x.h"
|
#include "serial_pl01x.h"
|
||||||
|
|
||||||
#define IO_WRITE(addr, val) (*(volatile unsigned int *)(addr) = (val))
|
#define IO_WRITE(addr, val) (*(volatile unsigned int *)(addr) = (val))
|
||||||
|
@ -52,7 +49,7 @@ static void pl01x_putc (int portnum, char c);
|
||||||
static int pl01x_getc (int portnum);
|
static int pl01x_getc (int portnum);
|
||||||
static int pl01x_tstc (int portnum);
|
static int pl01x_tstc (int portnum);
|
||||||
|
|
||||||
#ifdef CFG_PL010_SERIAL
|
#ifdef CONFIG_PL010_SERIAL
|
||||||
|
|
||||||
int serial_init (void)
|
int serial_init (void)
|
||||||
{
|
{
|
||||||
|
@ -110,9 +107,9 @@ int serial_init (void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CFG_PL010_SERIAL */
|
#endif /* CONFIG_PL010_SERIAL */
|
||||||
|
|
||||||
#ifdef CFG_PL011_SERIAL
|
#ifdef CONFIG_PL011_SERIAL
|
||||||
|
|
||||||
int serial_init (void)
|
int serial_init (void)
|
||||||
{
|
{
|
||||||
|
@ -157,7 +154,7 @@ int serial_init (void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CFG_PL011_SERIAL */
|
#endif /* CONFIG_PL011_SERIAL */
|
||||||
|
|
||||||
void serial_putc (const char c)
|
void serial_putc (const char c)
|
||||||
{
|
{
|
||||||
|
@ -224,5 +221,3 @@ static int pl01x_tstc (int portnum)
|
||||||
return !(IO_READ (port[portnum] + UART_PL01x_FR) &
|
return !(IO_READ (port[portnum] + UART_PL01x_FR) &
|
||||||
UART_PL01x_FR_RXFE);
|
UART_PL01x_FR_RXFE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
/*
|
/*
|
||||||
* PL010 Configuration
|
* PL010 Configuration
|
||||||
*/
|
*/
|
||||||
#define CFG_PL010_SERIAL
|
#define CONFIG_PL010_SERIAL
|
||||||
#define CONFIG_CONS_INDEX 0
|
#define CONFIG_CONS_INDEX 0
|
||||||
#define CONFIG_BAUDRATE 38400
|
#define CONFIG_BAUDRATE 38400
|
||||||
#define CONFIG_PL01x_PORTS { (void *) (CFG_SERIAL0), (void *) (CFG_SERIAL1) }
|
#define CONFIG_PL01x_PORTS { (void *) (CFG_SERIAL0), (void *) (CFG_SERIAL1) }
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
/*
|
/*
|
||||||
* NS16550 Configuration
|
* NS16550 Configuration
|
||||||
*/
|
*/
|
||||||
#define CFG_PL011_SERIAL
|
#define CONFIG_PL011_SERIAL
|
||||||
#define CONFIG_PL011_CLOCK 14745600
|
#define CONFIG_PL011_CLOCK 14745600
|
||||||
#define CONFIG_PL01x_PORTS { (void *)CFG_SERIAL0, (void *)CFG_SERIAL1 }
|
#define CONFIG_PL01x_PORTS { (void *)CFG_SERIAL0, (void *)CFG_SERIAL1 }
|
||||||
#define CONFIG_CONS_INDEX 0
|
#define CONFIG_CONS_INDEX 0
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
/*
|
/*
|
||||||
* NS16550 Configuration
|
* NS16550 Configuration
|
||||||
*/
|
*/
|
||||||
#define CFG_PL011_SERIAL
|
#define CONFIG_PL011_SERIAL
|
||||||
#define CONFIG_PL011_CLOCK 24000000
|
#define CONFIG_PL011_CLOCK 24000000
|
||||||
#define CONFIG_PL01x_PORTS { (void *)CFG_SERIAL0, (void *)CFG_SERIAL1 }
|
#define CONFIG_PL01x_PORTS { (void *)CFG_SERIAL0, (void *)CFG_SERIAL1 }
|
||||||
#define CONFIG_CONS_INDEX 0
|
#define CONFIG_CONS_INDEX 0
|
||||||
|
|
Loading…
Reference in New Issue