Skip to content

Commit

Permalink
serial: samsung: Register cpufreq notifier only on S3C24xx
Browse files Browse the repository at this point in the history
The Samsung serial driver registered for CPU frequency transitions to
recalculate its clock when ARM clock frequency changes.  This is needed
only on S3C24xx platform so limit the ifdef to respective cpufreq
driver.

On S3C24xx the ratio ratio between frequencies of UART's parent clock
(pclk) and ARM's parent clock (fclk) remains fixed.  Therefore when ARM
clock frequency goes down, the serial is also affected.

Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Krzysztof Kozlowski authored and Greg Kroah-Hartman committed Aug 31, 2016
1 parent 5bf5635 commit ebaa81c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/tty/serial/samsung.c
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@ static void s3c24xx_serial_resetport(struct uart_port *port,
}


#ifdef CONFIG_CPU_FREQ
#ifdef CONFIG_ARM_S3C24XX_CPUFREQ

static int s3c24xx_serial_cpufreq_transition(struct notifier_block *nb,
unsigned long val, void *data)
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/samsung.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ struct s3c24xx_uart_port {

struct s3c24xx_uart_dma *dma;

#ifdef CONFIG_CPU_FREQ
#ifdef CONFIG_ARM_S3C24XX_CPUFREQ
struct notifier_block freq_transition;
#endif
};
Expand Down

0 comments on commit ebaa81c

Please sign in to comment.