--- /dev/null
+/*
+ * Copyright (C) 2010 Google, Inc.
+ * Author: Jaikumar Ganesh <jaikumar@google.com>
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __ASM_ARCH_TEGRA_HSUART_H
+#define __ASM_ARCH_TEGRA_HSUART_H
+
+/* Optional platform device data for tegra_hsuart driver. */
+struct tegra_hsuart_platform_data {
+ void (*exit_lpm_cb)(struct uart_port *);
+};
+
+#endif
#include <linux/workqueue.h>
#include <mach/dma.h>
#include <mach/clk.h>
+#include <mach/tegra_hsuart.h>
#define TX_EMPTY_STATUS (UART_LSR_TEMT | UART_LSR_THRE)
bool rx_timeout;
int rx_in_progress;
+
+ /* optional callback to exit low power mode */
+ void (*exit_lpm_cb)(struct uart_port *);
+
};
static inline u8 uart_readb(struct tegra_uart_port *t, unsigned long reg)
t = container_of(u, struct tegra_uart_port, uport);
xmit = &u->state->xmit;
+ if (t->exit_lpm_cb)
+ t->exit_lpm_cb(u);
+
if (!uart_circ_empty(xmit) && !t->tx_in_progress)
tegra_start_next_tx(t);
}
struct tegra_uart_port *t;
struct uart_port *u;
struct resource *resource;
+ struct tegra_hsuart_platform_data *pdata = pdev->dev.platform_data;
int ret;
char name[64];
if (pdev->id < 0 || pdev->id > tegra_uart_driver.nr) {
u->regshift = 2;
+ if (pdata)
+ t->exit_lpm_cb = pdata->exit_lpm_cb;
+
t->clk = clk_get(&pdev->dev, NULL);
if (!t->clk) {
dev_err(&pdev->dev, "Couldn't get the clock\n");