Hello.
Chaithrika U S wrote:
drivers/serial/8250.c | 81 +++++++++++++++++++++++++++++++++++++++++++
include/linux/serial_8250.h | 1 +
2 files changed, 82 insertions(+), 0 deletions(-)
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index c3e37c8..612e129 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -38,6 +38,8 @@
#include <linux/serial_8250.h>
#include <linux/nmi.h>
#include <linux/mutex.h>
+#include <linux/cpufreq.h>
+#include <linux/clk.h>
#include <asm/io.h>
#include <asm/irq.h>
@@ -156,6 +158,10 @@ struct uart_8250_port {
*/
void (*pm)(struct uart_port *port,
unsigned int state, unsigned int old);
+ struct clk *uart_clk;
+#ifdef CONFIG_CPU_FREQ
+ struct notifier_block freq_transition;
+#endif
};
struct irq_info {
@@ -2931,6 +2937,70 @@ void serial8250_resume_port(int line)
uart_resume_port(&serial8250_reg, &up->port);
}
+#ifdef CONFIG_CPU_FREQ
+static int serial8250_cpufreq_transition(struct notifier_block *nb,
+ unsigned long val, void *data)
+{
+ struct uart_8250_port *p;
+ struct uart_port *uport;
+
+ p = container_of(nb, struct uart_8250_port, freq_transition);
+ uport = &p->port;
+
+ if(!p->port.uartclk)
+ goto cpu_freq_exit;
Isn't it OK to have a zero value here if you're going to use
clk_get_rate()? or does uartclk == 0 have a special meaning here? If
so, should be commented.
This is a mistake here! The if condition should check 'uart_clk' - the
clock struct pointer. I will correct this and post the updated patch.
Perhaps this structure member should have another name, like just
'clk' or 'clocl' to make it more distinct from 'uartclk'...
Thanks & Regards,
Chaithrika
WBR, Sergei
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source