1919#include <linux/dma-mapping.h>
2020#include <linux/tty.h>
2121#include <linux/tty_flip.h>
22- #include <linux/units.h>
2322
2423#include "8250.h"
2524
@@ -522,7 +521,6 @@ static int mtk8250_probe(struct platform_device *pdev)
522521 struct mtk8250_data * data ;
523522 struct resource * regs ;
524523 int irq , err ;
525- struct fwnode_handle * fwnode = dev_fwnode (& pdev -> dev );
526524
527525 irq = platform_get_irq (pdev , 0 );
528526 if (irq < 0 )
@@ -545,13 +543,12 @@ static int mtk8250_probe(struct platform_device *pdev)
545543
546544 data -> clk_count = 0 ;
547545
548- if (is_of_node ( fwnode ) ) {
546+ if (pdev -> dev . of_node ) {
549547 err = mtk8250_probe_of (pdev , & uart .port , data );
550548 if (err )
551549 return err ;
552- } else if (! fwnode ) {
550+ } else
553551 return - ENODEV ;
554- }
555552
556553 spin_lock_init (& uart .port .lock );
557554 uart .port .mapbase = regs -> start ;
@@ -567,18 +564,14 @@ static int mtk8250_probe(struct platform_device *pdev)
567564 uart .port .startup = mtk8250_startup ;
568565 uart .port .set_termios = mtk8250_set_termios ;
569566 uart .port .uartclk = clk_get_rate (data -> uart_clk );
570- if (!uart .port .uartclk )
571- uart .port .uartclk = 26 * HZ_PER_MHZ ;
572567#ifdef CONFIG_SERIAL_8250_DMA
573568 if (data -> dma )
574569 uart .dma = data -> dma ;
575570#endif
576571
577- if (is_of_node (fwnode )) {
578- /* Disable Rate Fix function */
579- writel (0x0 , uart .port .membase +
572+ /* Disable Rate Fix function */
573+ writel (0x0 , uart .port .membase +
580574 (MTK_UART_RATE_FIX << uart .port .regshift ));
581- }
582575
583576 platform_set_drvdata (pdev , data );
584577
@@ -656,18 +649,11 @@ static const struct of_device_id mtk8250_of_match[] = {
656649};
657650MODULE_DEVICE_TABLE (of , mtk8250_of_match );
658651
659- static const struct acpi_device_id mtk8250_acpi_match [] = {
660- { "MTKI0511" },
661- {}
662- };
663- MODULE_DEVICE_TABLE (acpi , mtk8250_acpi_match );
664-
665652static struct platform_driver mtk8250_platform_driver = {
666653 .driver = {
667654 .name = "mt6577-uart" ,
668655 .pm = & mtk8250_pm_ops ,
669656 .of_match_table = mtk8250_of_match ,
670- .acpi_match_table = mtk8250_acpi_match ,
671657 },
672658 .probe = mtk8250_probe ,
673659 .remove = mtk8250_remove ,
0 commit comments