summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/sccnxp.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-02 09:25:19 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-02 09:25:19 +0200
commit461a8ecb2d76fb6f3ac1a90eb886697db869d387 (patch)
tree476aeba66ba0cb3649ba1669ce8b85b29ed34e46 /drivers/tty/serial/sccnxp.c
parentserial: sh-sci: use dev_get_platdata() (diff)
downloadlinux-461a8ecb2d76fb6f3ac1a90eb886697db869d387.tar.xz
linux-461a8ecb2d76fb6f3ac1a90eb886697db869d387.zip
Revert "serial: sccnxp: Add DT support"
This reverts commit 85c996907473e4ef824774b97b26499adf66521f. Alexander wishes to remove this patch as it is incorrect. Reported-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sccnxp.c')
-rw-r--r--drivers/tty/serial/sccnxp.c46
1 files changed, 9 insertions, 37 deletions
diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c
index 67f73d1a8e7b..49e9bbfe6cab 100644
--- a/drivers/tty/serial/sccnxp.c
+++ b/drivers/tty/serial/sccnxp.c
@@ -20,8 +20,6 @@
#include <linux/module.h>
#include <linux/device.h>
#include <linux/console.h>
-#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/serial_core.h>
#include <linux/serial.h>
#include <linux/io.h>
@@ -855,25 +853,10 @@ static const struct platform_device_id sccnxp_id_table[] = {
};
MODULE_DEVICE_TABLE(platform, sccnxp_id_table);
-static const struct of_device_id sccnxp_dt_id_table[] = {
- { .compatible = "nxp,sc2681", .data = &sc2681, },
- { .compatible = "nxp,sc2691", .data = &sc2691, },
- { .compatible = "nxp,sc2692", .data = &sc2692, },
- { .compatible = "nxp,sc2891", .data = &sc2891, },
- { .compatible = "nxp,sc2892", .data = &sc2892, },
- { .compatible = "nxp,sc28202", .data = &sc28202, },
- { .compatible = "nxp,sc68681", .data = &sc68681, },
- { .compatible = "nxp,sc68692", .data = &sc68692, },
- { }
-};
-MODULE_DEVICE_TABLE(of, sccnxp_dt_id_table);
-
static int sccnxp_probe(struct platform_device *pdev)
{
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
struct sccnxp_pdata *pdata = dev_get_platdata(&pdev->dev);
- const struct of_device_id *of_id =
- of_match_device(sccnxp_dt_id_table, &pdev->dev);
int i, ret, uartclk;
struct sccnxp_port *s;
void __iomem *membase;
@@ -892,22 +875,7 @@ static int sccnxp_probe(struct platform_device *pdev)
spin_lock_init(&s->lock);
- if (of_id) {
- s->chip = (struct sccnxp_chip *)of_id->data;
-
- of_property_read_u32(pdev->dev.of_node, "poll-interval",
- &s->pdata.poll_time_us);
- of_property_read_u32(pdev->dev.of_node, "reg-shift",
- &s->pdata.reg_shift);
- of_property_read_u32_array(pdev->dev.of_node,
- "nxp,sccnxp-io-cfg",
- s->pdata.mctrl_cfg, s->chip->nr);
- } else {
- s->chip = (struct sccnxp_chip *)pdev->id_entry->driver_data;
-
- if (pdata)
- memcpy(&s->pdata, pdata, sizeof(struct sccnxp_pdata));
- }
+ s->chip = (struct sccnxp_chip *)pdev->id_entry->driver_data;
s->regulator = devm_regulator_get(&pdev->dev, "vcc");
if (!IS_ERR(s->regulator)) {
@@ -938,11 +906,16 @@ static int sccnxp_probe(struct platform_device *pdev)
goto err_out;
}
+ if (pdata)
+ memcpy(&s->pdata, pdata, sizeof(struct sccnxp_pdata));
+
if (s->pdata.poll_time_us) {
dev_info(&pdev->dev, "Using poll mode, resolution %u usecs\n",
s->pdata.poll_time_us);
s->poll = 1;
- } else {
+ }
+
+ if (!s->poll) {
s->irq = platform_get_irq(pdev, 0);
if (s->irq < 0) {
dev_err(&pdev->dev, "Missing irq resource data\n");
@@ -1043,9 +1016,8 @@ static int sccnxp_remove(struct platform_device *pdev)
static struct platform_driver sccnxp_uart_driver = {
.driver = {
- .name = SCCNXP_NAME,
- .owner = THIS_MODULE,
- .of_match_table = sccnxp_dt_id_table,
+ .name = SCCNXP_NAME,
+ .owner = THIS_MODULE,
},
.probe = sccnxp_probe,
.remove = sccnxp_remove,