9
0
Fork 0

serial: ns16550: add compatible entry for "ingenic,jz4740-uart"

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Antony Pavlov 2014-03-25 20:50:56 +04:00 committed by Sascha Hauer
parent e203955994
commit c56e8ca71c
1 changed files with 20 additions and 0 deletions

View File

@ -200,6 +200,16 @@ static void ns16550_omap_init_port(struct console_device *cdev)
ns16550_write(cdev, 0x00, omap_mdr1);
}
#define JZ_FCR_UME 0x10 /* Uart Module Enable */
static void ns16550_jz_init_port(struct console_device *cdev)
{
struct ns16550_priv *priv = to_ns16550_priv(cdev);
priv->fcrval |= JZ_FCR_UME;
ns16550_serial_init_port(cdev);
}
/*********** Exposed Functions **********************************/
/**
@ -264,6 +274,10 @@ static __maybe_unused struct ns16550_drvdata omap_drvdata = {
.linux_console_name = "ttyO",
};
static __maybe_unused struct ns16550_drvdata jz_drvdata = {
.init_port = ns16550_jz_init_port,
};
/**
* @brief Probe entry point -called on the first match for device
*
@ -362,6 +376,12 @@ static struct of_device_id ns16550_serial_dt_ids[] = {
.compatible = "ti,omap4-uart",
.data = (unsigned long)&omap_drvdata,
},
#endif
#if IS_ENABLED(CONFIG_MACH_MIPS_XBURST)
{
.compatible = "ingenic,jz4740-uart",
.data = (unsigned long)&jz_drvdata,
},
#endif
{
/* sentinel */