2017-11-06 18:11:51 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2012-05-03 21:13:09 +09:00
|
|
|
/*
|
|
|
|
* Renesas Emma Mobile 8250 driver
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 Magnus Damm
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/device.h>
|
|
|
|
#include <linux/io.h>
|
|
|
|
#include <linux/module.h>
|
2018-06-19 22:47:28 -07:00
|
|
|
#include <linux/mod_devicetable.h>
|
2012-05-03 21:13:09 +09:00
|
|
|
#include <linux/serial_8250.h>
|
|
|
|
#include <linux/serial_reg.h>
|
|
|
|
#include <linux/platform_device.h>
|
|
|
|
#include <linux/clk.h>
|
|
|
|
|
|
|
|
#include "8250.h"
|
|
|
|
|
|
|
|
#define UART_DLL_EM 9
|
|
|
|
#define UART_DLM_EM 10
|
serial: 8250_em: Add serial8250_em_{reg_update(),out_helper()}
As per RZ/V2M hardware manual(Rev.1.30 Jun, 2022), UART IP has a
restriction as mentioned below.
40.6.1 Point for Caution when Changing the Register Settings:
When changing the settings of the following registers, a PRESETn master
reset or FIFO reset + SW reset (FCR[2],FCR[1], HCR0[7]) must be input to
re-initialize them.
Target Registers: FCR, LCR, MCR, DLL, DLM, HCR0.
Add serial8250_em_reg_update() and serial8250_em_serial_out_helper() to
handle this restriction. serial8250_em_serial_out_helper() is identical to
previous serial8250_em_serial_out() except that UART_FCR macro is removed
from serial8250_em_serial_out_helper() as it is now handled by serial8250_
em_serial_out().
DLL/DLM register can be updated only by setting LCR[7]. So the
updation of LCR[7] will perform reset for DLL/DLM register changes.
EMMA mobile has the same register set as RZ/V2M and this patch is tested on
EMEV2 board. So, there is no harm in applying the same restriction here as
well as the HW manual for EMMA mobile is not updated for a long time.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230227114152.22265-8-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-27 11:41:52 +00:00
|
|
|
#define UART_HCR0_EM 11
|
2012-05-03 21:13:09 +09:00
|
|
|
|
2023-02-27 11:41:51 +00:00
|
|
|
/*
|
|
|
|
* A high value for UART_FCR_EM avoids overlapping with existing UART_*
|
|
|
|
* register defines. UART_FCR_EM_HW is the real HW register offset.
|
|
|
|
*/
|
|
|
|
#define UART_FCR_EM 0x10003
|
|
|
|
#define UART_FCR_EM_HW 3
|
|
|
|
|
serial: 8250_em: Add serial8250_em_{reg_update(),out_helper()}
As per RZ/V2M hardware manual(Rev.1.30 Jun, 2022), UART IP has a
restriction as mentioned below.
40.6.1 Point for Caution when Changing the Register Settings:
When changing the settings of the following registers, a PRESETn master
reset or FIFO reset + SW reset (FCR[2],FCR[1], HCR0[7]) must be input to
re-initialize them.
Target Registers: FCR, LCR, MCR, DLL, DLM, HCR0.
Add serial8250_em_reg_update() and serial8250_em_serial_out_helper() to
handle this restriction. serial8250_em_serial_out_helper() is identical to
previous serial8250_em_serial_out() except that UART_FCR macro is removed
from serial8250_em_serial_out_helper() as it is now handled by serial8250_
em_serial_out().
DLL/DLM register can be updated only by setting LCR[7]. So the
updation of LCR[7] will perform reset for DLL/DLM register changes.
EMMA mobile has the same register set as RZ/V2M and this patch is tested on
EMEV2 board. So, there is no harm in applying the same restriction here as
well as the HW manual for EMMA mobile is not updated for a long time.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230227114152.22265-8-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-27 11:41:52 +00:00
|
|
|
#define UART_HCR0_EM_SW_RESET BIT(7) /* SW Reset */
|
|
|
|
|
2012-05-03 21:13:09 +09:00
|
|
|
struct serial8250_em_priv {
|
|
|
|
int line;
|
|
|
|
};
|
|
|
|
|
serial: 8250_em: Add serial8250_em_{reg_update(),out_helper()}
As per RZ/V2M hardware manual(Rev.1.30 Jun, 2022), UART IP has a
restriction as mentioned below.
40.6.1 Point for Caution when Changing the Register Settings:
When changing the settings of the following registers, a PRESETn master
reset or FIFO reset + SW reset (FCR[2],FCR[1], HCR0[7]) must be input to
re-initialize them.
Target Registers: FCR, LCR, MCR, DLL, DLM, HCR0.
Add serial8250_em_reg_update() and serial8250_em_serial_out_helper() to
handle this restriction. serial8250_em_serial_out_helper() is identical to
previous serial8250_em_serial_out() except that UART_FCR macro is removed
from serial8250_em_serial_out_helper() as it is now handled by serial8250_
em_serial_out().
DLL/DLM register can be updated only by setting LCR[7]. So the
updation of LCR[7] will perform reset for DLL/DLM register changes.
EMMA mobile has the same register set as RZ/V2M and this patch is tested on
EMEV2 board. So, there is no harm in applying the same restriction here as
well as the HW manual for EMMA mobile is not updated for a long time.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230227114152.22265-8-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-27 11:41:52 +00:00
|
|
|
static void serial8250_em_serial_out_helper(struct uart_port *p, int offset,
|
|
|
|
int value)
|
2012-05-03 21:13:09 +09:00
|
|
|
{
|
|
|
|
switch (offset) {
|
|
|
|
case UART_TX: /* TX @ 0x00 */
|
|
|
|
writeb(value, p->membase);
|
|
|
|
break;
|
|
|
|
case UART_LCR: /* LCR @ 0x10 (+1) */
|
|
|
|
case UART_MCR: /* MCR @ 0x14 (+1) */
|
|
|
|
case UART_SCR: /* SCR @ 0x20 (+1) */
|
|
|
|
writel(value, p->membase + ((offset + 1) << 2));
|
|
|
|
break;
|
2023-02-27 11:41:51 +00:00
|
|
|
case UART_FCR_EM:
|
|
|
|
writel(value, p->membase + (UART_FCR_EM_HW << 2));
|
|
|
|
break;
|
2012-05-03 21:13:09 +09:00
|
|
|
case UART_IER: /* IER @ 0x04 */
|
|
|
|
value &= 0x0f; /* only 4 valid bits - not Xscale */
|
2020-08-23 17:36:59 -05:00
|
|
|
fallthrough;
|
2012-05-03 21:13:09 +09:00
|
|
|
case UART_DLL_EM: /* DLL @ 0x24 (+9) */
|
|
|
|
case UART_DLM_EM: /* DLM @ 0x28 (+9) */
|
serial: 8250_em: Add serial8250_em_{reg_update(),out_helper()}
As per RZ/V2M hardware manual(Rev.1.30 Jun, 2022), UART IP has a
restriction as mentioned below.
40.6.1 Point for Caution when Changing the Register Settings:
When changing the settings of the following registers, a PRESETn master
reset or FIFO reset + SW reset (FCR[2],FCR[1], HCR0[7]) must be input to
re-initialize them.
Target Registers: FCR, LCR, MCR, DLL, DLM, HCR0.
Add serial8250_em_reg_update() and serial8250_em_serial_out_helper() to
handle this restriction. serial8250_em_serial_out_helper() is identical to
previous serial8250_em_serial_out() except that UART_FCR macro is removed
from serial8250_em_serial_out_helper() as it is now handled by serial8250_
em_serial_out().
DLL/DLM register can be updated only by setting LCR[7]. So the
updation of LCR[7] will perform reset for DLL/DLM register changes.
EMMA mobile has the same register set as RZ/V2M and this patch is tested on
EMEV2 board. So, there is no harm in applying the same restriction here as
well as the HW manual for EMMA mobile is not updated for a long time.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230227114152.22265-8-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-27 11:41:52 +00:00
|
|
|
case UART_HCR0_EM: /* HCR0 @ 0x2c */
|
2012-05-03 21:13:09 +09:00
|
|
|
writel(value, p->membase + (offset << 2));
|
2023-02-27 11:41:49 +00:00
|
|
|
break;
|
2012-05-03 21:13:09 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-06-11 12:02:54 +02:00
|
|
|
static u32 serial8250_em_serial_in(struct uart_port *p, unsigned int offset)
|
2012-05-03 21:13:09 +09:00
|
|
|
{
|
|
|
|
switch (offset) {
|
|
|
|
case UART_RX: /* RX @ 0x00 */
|
|
|
|
return readb(p->membase);
|
serial: 8250_em: Add serial8250_em_{reg_update(),out_helper()}
As per RZ/V2M hardware manual(Rev.1.30 Jun, 2022), UART IP has a
restriction as mentioned below.
40.6.1 Point for Caution when Changing the Register Settings:
When changing the settings of the following registers, a PRESETn master
reset or FIFO reset + SW reset (FCR[2],FCR[1], HCR0[7]) must be input to
re-initialize them.
Target Registers: FCR, LCR, MCR, DLL, DLM, HCR0.
Add serial8250_em_reg_update() and serial8250_em_serial_out_helper() to
handle this restriction. serial8250_em_serial_out_helper() is identical to
previous serial8250_em_serial_out() except that UART_FCR macro is removed
from serial8250_em_serial_out_helper() as it is now handled by serial8250_
em_serial_out().
DLL/DLM register can be updated only by setting LCR[7]. So the
updation of LCR[7] will perform reset for DLL/DLM register changes.
EMMA mobile has the same register set as RZ/V2M and this patch is tested on
EMEV2 board. So, there is no harm in applying the same restriction here as
well as the HW manual for EMMA mobile is not updated for a long time.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230227114152.22265-8-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-27 11:41:52 +00:00
|
|
|
case UART_LCR: /* LCR @ 0x10 (+1) */
|
2012-05-03 21:13:09 +09:00
|
|
|
case UART_MCR: /* MCR @ 0x14 (+1) */
|
|
|
|
case UART_LSR: /* LSR @ 0x18 (+1) */
|
|
|
|
case UART_MSR: /* MSR @ 0x1c (+1) */
|
|
|
|
case UART_SCR: /* SCR @ 0x20 (+1) */
|
|
|
|
return readl(p->membase + ((offset + 1) << 2));
|
2023-02-27 11:41:51 +00:00
|
|
|
case UART_FCR_EM:
|
|
|
|
return readl(p->membase + (UART_FCR_EM_HW << 2));
|
2012-05-03 21:13:09 +09:00
|
|
|
case UART_IER: /* IER @ 0x04 */
|
|
|
|
case UART_IIR: /* IIR @ 0x08 */
|
|
|
|
case UART_DLL_EM: /* DLL @ 0x24 (+9) */
|
|
|
|
case UART_DLM_EM: /* DLM @ 0x28 (+9) */
|
serial: 8250_em: Add serial8250_em_{reg_update(),out_helper()}
As per RZ/V2M hardware manual(Rev.1.30 Jun, 2022), UART IP has a
restriction as mentioned below.
40.6.1 Point for Caution when Changing the Register Settings:
When changing the settings of the following registers, a PRESETn master
reset or FIFO reset + SW reset (FCR[2],FCR[1], HCR0[7]) must be input to
re-initialize them.
Target Registers: FCR, LCR, MCR, DLL, DLM, HCR0.
Add serial8250_em_reg_update() and serial8250_em_serial_out_helper() to
handle this restriction. serial8250_em_serial_out_helper() is identical to
previous serial8250_em_serial_out() except that UART_FCR macro is removed
from serial8250_em_serial_out_helper() as it is now handled by serial8250_
em_serial_out().
DLL/DLM register can be updated only by setting LCR[7]. So the
updation of LCR[7] will perform reset for DLL/DLM register changes.
EMMA mobile has the same register set as RZ/V2M and this patch is tested on
EMEV2 board. So, there is no harm in applying the same restriction here as
well as the HW manual for EMMA mobile is not updated for a long time.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230227114152.22265-8-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-27 11:41:52 +00:00
|
|
|
case UART_HCR0_EM: /* HCR0 @ 0x2c */
|
2012-05-03 21:13:09 +09:00
|
|
|
return readl(p->membase + (offset << 2));
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
serial: 8250_em: Add serial8250_em_{reg_update(),out_helper()}
As per RZ/V2M hardware manual(Rev.1.30 Jun, 2022), UART IP has a
restriction as mentioned below.
40.6.1 Point for Caution when Changing the Register Settings:
When changing the settings of the following registers, a PRESETn master
reset or FIFO reset + SW reset (FCR[2],FCR[1], HCR0[7]) must be input to
re-initialize them.
Target Registers: FCR, LCR, MCR, DLL, DLM, HCR0.
Add serial8250_em_reg_update() and serial8250_em_serial_out_helper() to
handle this restriction. serial8250_em_serial_out_helper() is identical to
previous serial8250_em_serial_out() except that UART_FCR macro is removed
from serial8250_em_serial_out_helper() as it is now handled by serial8250_
em_serial_out().
DLL/DLM register can be updated only by setting LCR[7]. So the
updation of LCR[7] will perform reset for DLL/DLM register changes.
EMMA mobile has the same register set as RZ/V2M and this patch is tested on
EMEV2 board. So, there is no harm in applying the same restriction here as
well as the HW manual for EMMA mobile is not updated for a long time.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230227114152.22265-8-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-27 11:41:52 +00:00
|
|
|
static void serial8250_em_reg_update(struct uart_port *p, int off, int value)
|
|
|
|
{
|
|
|
|
unsigned int ier, fcr, lcr, mcr, hcr0;
|
|
|
|
|
|
|
|
ier = serial8250_em_serial_in(p, UART_IER);
|
|
|
|
fcr = serial8250_em_serial_in(p, UART_FCR_EM);
|
|
|
|
lcr = serial8250_em_serial_in(p, UART_LCR);
|
|
|
|
mcr = serial8250_em_serial_in(p, UART_MCR);
|
|
|
|
hcr0 = serial8250_em_serial_in(p, UART_HCR0_EM);
|
|
|
|
|
|
|
|
serial8250_em_serial_out_helper(p, UART_FCR_EM, fcr |
|
|
|
|
UART_FCR_CLEAR_RCVR |
|
|
|
|
UART_FCR_CLEAR_XMIT);
|
|
|
|
serial8250_em_serial_out_helper(p, UART_HCR0_EM, hcr0 |
|
|
|
|
UART_HCR0_EM_SW_RESET);
|
|
|
|
serial8250_em_serial_out_helper(p, UART_HCR0_EM, hcr0 &
|
|
|
|
~UART_HCR0_EM_SW_RESET);
|
|
|
|
|
|
|
|
switch (off) {
|
|
|
|
case UART_FCR_EM:
|
|
|
|
fcr = value;
|
|
|
|
break;
|
|
|
|
case UART_LCR:
|
|
|
|
lcr = value;
|
|
|
|
break;
|
|
|
|
case UART_MCR:
|
|
|
|
mcr = value;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
serial8250_em_serial_out_helper(p, UART_IER, ier);
|
|
|
|
serial8250_em_serial_out_helper(p, UART_FCR_EM, fcr);
|
|
|
|
serial8250_em_serial_out_helper(p, UART_MCR, mcr);
|
|
|
|
serial8250_em_serial_out_helper(p, UART_LCR, lcr);
|
|
|
|
serial8250_em_serial_out_helper(p, UART_HCR0_EM, hcr0);
|
|
|
|
}
|
|
|
|
|
2025-06-11 12:02:54 +02:00
|
|
|
static void serial8250_em_serial_out(struct uart_port *p, unsigned int offset, u32 value)
|
serial: 8250_em: Add serial8250_em_{reg_update(),out_helper()}
As per RZ/V2M hardware manual(Rev.1.30 Jun, 2022), UART IP has a
restriction as mentioned below.
40.6.1 Point for Caution when Changing the Register Settings:
When changing the settings of the following registers, a PRESETn master
reset or FIFO reset + SW reset (FCR[2],FCR[1], HCR0[7]) must be input to
re-initialize them.
Target Registers: FCR, LCR, MCR, DLL, DLM, HCR0.
Add serial8250_em_reg_update() and serial8250_em_serial_out_helper() to
handle this restriction. serial8250_em_serial_out_helper() is identical to
previous serial8250_em_serial_out() except that UART_FCR macro is removed
from serial8250_em_serial_out_helper() as it is now handled by serial8250_
em_serial_out().
DLL/DLM register can be updated only by setting LCR[7]. So the
updation of LCR[7] will perform reset for DLL/DLM register changes.
EMMA mobile has the same register set as RZ/V2M and this patch is tested on
EMEV2 board. So, there is no harm in applying the same restriction here as
well as the HW manual for EMMA mobile is not updated for a long time.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230227114152.22265-8-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-27 11:41:52 +00:00
|
|
|
{
|
|
|
|
switch (offset) {
|
|
|
|
case UART_TX:
|
|
|
|
case UART_SCR:
|
|
|
|
case UART_IER:
|
|
|
|
case UART_DLL_EM:
|
|
|
|
case UART_DLM_EM:
|
|
|
|
serial8250_em_serial_out_helper(p, offset, value);
|
|
|
|
break;
|
|
|
|
case UART_FCR:
|
|
|
|
serial8250_em_reg_update(p, UART_FCR_EM, value);
|
|
|
|
break;
|
|
|
|
case UART_LCR:
|
|
|
|
case UART_MCR:
|
|
|
|
serial8250_em_reg_update(p, offset, value);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-11 15:10:24 +03:00
|
|
|
static u32 serial8250_em_serial_dl_read(struct uart_8250_port *up)
|
2012-05-03 21:13:09 +09:00
|
|
|
{
|
|
|
|
return serial_in(up, UART_DLL_EM) | serial_in(up, UART_DLM_EM) << 8;
|
|
|
|
}
|
|
|
|
|
2023-05-11 15:10:24 +03:00
|
|
|
static void serial8250_em_serial_dl_write(struct uart_8250_port *up, u32 value)
|
2012-05-03 21:13:09 +09:00
|
|
|
{
|
|
|
|
serial_out(up, UART_DLL_EM, value & 0xff);
|
|
|
|
serial_out(up, UART_DLM_EM, value >> 8 & 0xff);
|
|
|
|
}
|
|
|
|
|
2012-11-19 13:21:50 -05:00
|
|
|
static int serial8250_em_probe(struct platform_device *pdev)
|
2012-05-03 21:13:09 +09:00
|
|
|
{
|
|
|
|
struct serial8250_em_priv *priv;
|
2023-02-27 11:41:47 +00:00
|
|
|
struct device *dev = &pdev->dev;
|
2012-05-03 21:13:09 +09:00
|
|
|
struct uart_8250_port up;
|
2020-06-18 12:51:44 +03:00
|
|
|
struct resource *regs;
|
2023-02-27 11:41:50 +00:00
|
|
|
struct clk *sclk;
|
2020-06-18 12:51:44 +03:00
|
|
|
int irq, ret;
|
2012-05-03 21:13:09 +09:00
|
|
|
|
2020-06-18 12:51:44 +03:00
|
|
|
irq = platform_get_irq(pdev, 0);
|
|
|
|
if (irq < 0)
|
|
|
|
return irq;
|
|
|
|
|
|
|
|
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
2023-02-27 11:41:47 +00:00
|
|
|
if (!regs)
|
|
|
|
return dev_err_probe(dev, -EINVAL, "missing registers\n");
|
2012-05-03 21:13:09 +09:00
|
|
|
|
2023-02-27 11:41:47 +00:00
|
|
|
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
2014-11-05 12:26:32 -05:00
|
|
|
if (!priv)
|
2013-07-26 16:22:02 +02:00
|
|
|
return -ENOMEM;
|
2012-05-03 21:13:09 +09:00
|
|
|
|
2023-02-27 11:41:50 +00:00
|
|
|
sclk = devm_clk_get_enabled(dev, "sclk");
|
|
|
|
if (IS_ERR(sclk))
|
|
|
|
return dev_err_probe(dev, PTR_ERR(sclk), "unable to get clock\n");
|
2012-05-03 21:13:09 +09:00
|
|
|
|
|
|
|
memset(&up, 0, sizeof(up));
|
|
|
|
up.port.mapbase = regs->start;
|
2020-06-18 12:51:44 +03:00
|
|
|
up.port.irq = irq;
|
2023-02-27 11:41:46 +00:00
|
|
|
up.port.type = PORT_16750;
|
|
|
|
up.port.flags = UPF_FIXED_PORT | UPF_IOREMAP | UPF_FIXED_TYPE;
|
2023-02-27 11:41:47 +00:00
|
|
|
up.port.dev = dev;
|
2012-05-03 21:13:09 +09:00
|
|
|
up.port.private_data = priv;
|
|
|
|
|
2023-02-27 11:41:50 +00:00
|
|
|
up.port.uartclk = clk_get_rate(sclk);
|
2012-05-03 21:13:09 +09:00
|
|
|
|
|
|
|
up.port.iotype = UPIO_MEM32;
|
|
|
|
up.port.serial_in = serial8250_em_serial_in;
|
|
|
|
up.port.serial_out = serial8250_em_serial_out;
|
|
|
|
up.dl_read = serial8250_em_serial_dl_read;
|
|
|
|
up.dl_write = serial8250_em_serial_dl_write;
|
|
|
|
|
|
|
|
ret = serial8250_register_8250_port(&up);
|
2023-02-27 11:41:50 +00:00
|
|
|
if (ret < 0)
|
2023-02-27 11:41:47 +00:00
|
|
|
return dev_err_probe(dev, ret, "unable to register 8250 port\n");
|
2012-05-03 21:13:09 +09:00
|
|
|
|
|
|
|
priv->line = ret;
|
|
|
|
platform_set_drvdata(pdev, priv);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2023-11-10 16:29:31 +01:00
|
|
|
static void serial8250_em_remove(struct platform_device *pdev)
|
2012-05-03 21:13:09 +09:00
|
|
|
{
|
|
|
|
struct serial8250_em_priv *priv = platform_get_drvdata(pdev);
|
|
|
|
|
|
|
|
serial8250_unregister_port(priv->line);
|
|
|
|
}
|
|
|
|
|
2012-11-19 13:25:19 -05:00
|
|
|
static const struct of_device_id serial8250_em_dt_ids[] = {
|
2012-05-09 15:55:14 +09:00
|
|
|
{ .compatible = "renesas,em-uart", },
|
|
|
|
{},
|
|
|
|
};
|
|
|
|
MODULE_DEVICE_TABLE(of, serial8250_em_dt_ids);
|
|
|
|
|
2012-05-03 21:13:09 +09:00
|
|
|
static struct platform_driver serial8250_em_platform_driver = {
|
|
|
|
.driver = {
|
|
|
|
.name = "serial8250-em",
|
2012-05-09 15:55:14 +09:00
|
|
|
.of_match_table = serial8250_em_dt_ids,
|
2012-05-03 21:13:09 +09:00
|
|
|
},
|
|
|
|
.probe = serial8250_em_probe,
|
2024-10-07 22:58:04 +02:00
|
|
|
.remove = serial8250_em_remove,
|
2012-05-03 21:13:09 +09:00
|
|
|
};
|
|
|
|
|
|
|
|
module_platform_driver(serial8250_em_platform_driver);
|
|
|
|
|
|
|
|
MODULE_AUTHOR("Magnus Damm");
|
|
|
|
MODULE_DESCRIPTION("Renesas Emma Mobile 8250 Driver");
|
|
|
|
MODULE_LICENSE("GPL v2");
|