diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tty/serial/serial-tegra.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c index dfe79ccc4fb3..4455481a3517 100644 --- a/drivers/tty/serial/serial-tegra.c +++ b/drivers/tty/serial/serial-tegra.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/of_device.h> | 34 | #include <linux/of_device.h> |
35 | #include <linux/pagemap.h> | 35 | #include <linux/pagemap.h> |
36 | #include <linux/platform_device.h> | 36 | #include <linux/platform_device.h> |
37 | #include <linux/reset.h> | ||
37 | #include <linux/serial.h> | 38 | #include <linux/serial.h> |
38 | #include <linux/serial_8250.h> | 39 | #include <linux/serial_8250.h> |
39 | #include <linux/serial_core.h> | 40 | #include <linux/serial_core.h> |
@@ -44,8 +45,6 @@ | |||
44 | #include <linux/tty.h> | 45 | #include <linux/tty.h> |
45 | #include <linux/tty_flip.h> | 46 | #include <linux/tty_flip.h> |
46 | 47 | ||
47 | #include <linux/clk/tegra.h> | ||
48 | |||
49 | #define TEGRA_UART_TYPE "TEGRA_UART" | 48 | #define TEGRA_UART_TYPE "TEGRA_UART" |
50 | #define TX_EMPTY_STATUS (UART_LSR_TEMT | UART_LSR_THRE) | 49 | #define TX_EMPTY_STATUS (UART_LSR_TEMT | UART_LSR_THRE) |
51 | #define BYTES_TO_ALIGN(x) ((unsigned long)(x) & 0x3) | 50 | #define BYTES_TO_ALIGN(x) ((unsigned long)(x) & 0x3) |
@@ -103,6 +102,7 @@ struct tegra_uart_port { | |||
103 | const struct tegra_uart_chip_data *cdata; | 102 | const struct tegra_uart_chip_data *cdata; |
104 | 103 | ||
105 | struct clk *uart_clk; | 104 | struct clk *uart_clk; |
105 | struct reset_control *rst; | ||
106 | unsigned int current_baud; | 106 | unsigned int current_baud; |
107 | 107 | ||
108 | /* Register shadow */ | 108 | /* Register shadow */ |
@@ -832,9 +832,9 @@ static int tegra_uart_hw_init(struct tegra_uart_port *tup) | |||
832 | clk_prepare_enable(tup->uart_clk); | 832 | clk_prepare_enable(tup->uart_clk); |
833 | 833 | ||
834 | /* Reset the UART controller to clear all previous status.*/ | 834 | /* Reset the UART controller to clear all previous status.*/ |
835 | tegra_periph_reset_assert(tup->uart_clk); | 835 | reset_control_assert(tup->rst); |
836 | udelay(10); | 836 | udelay(10); |
837 | tegra_periph_reset_deassert(tup->uart_clk); | 837 | reset_control_deassert(tup->rst); |
838 | 838 | ||
839 | tup->rx_in_progress = 0; | 839 | tup->rx_in_progress = 0; |
840 | tup->tx_in_progress = 0; | 840 | tup->tx_in_progress = 0; |
@@ -1320,6 +1320,12 @@ static int tegra_uart_probe(struct platform_device *pdev) | |||
1320 | return PTR_ERR(tup->uart_clk); | 1320 | return PTR_ERR(tup->uart_clk); |
1321 | } | 1321 | } |
1322 | 1322 | ||
1323 | tup->rst = devm_reset_control_get(&pdev->dev, "serial"); | ||
1324 | if (IS_ERR(tup->rst)) { | ||
1325 | dev_err(&pdev->dev, "Couldn't get the reset\n"); | ||
1326 | return PTR_ERR(tup->rst); | ||
1327 | } | ||
1328 | |||
1323 | u->iotype = UPIO_MEM32; | 1329 | u->iotype = UPIO_MEM32; |
1324 | u->irq = platform_get_irq(pdev, 0); | 1330 | u->irq = platform_get_irq(pdev, 0); |
1325 | u->regshift = 2; | 1331 | u->regshift = 2; |