drivers: serial: uart_pl011: Unify uart clock from DT
Add a fixed clock to the qemu-virt-a53.dtsi to match how the musca dts files work so we get the clock DT info in the same way in the driver. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
2841078da3
commit
a288f07126
3 changed files with 9 additions and 13 deletions
|
@ -22,5 +22,4 @@
|
|||
&uart0 {
|
||||
status = "okay";
|
||||
current-speed = <115200>;
|
||||
clock-frequency = <24000000>;
|
||||
};
|
||||
|
|
|
@ -419,14 +419,9 @@ void pl011_isr(void *arg)
|
|||
static void pl011_irq_config_func_0(struct device *dev);
|
||||
#endif
|
||||
|
||||
#ifndef DT_INST_0_ARM_PL011_CLOCK_FREQUENCY
|
||||
#define DT_INST_0_ARM_PL011_CLOCK_FREQUENCY \
|
||||
DT_INST_0_ARM_PL011_CLOCKS_CLOCK_FREQUENCY
|
||||
#endif
|
||||
|
||||
static struct uart_device_config pl011_cfg_port_0 = {
|
||||
.base = (u8_t *)DT_INST_0_ARM_PL011_BASE_ADDRESS,
|
||||
.sys_clk_freq = DT_INST_0_ARM_PL011_CLOCK_FREQUENCY,
|
||||
.sys_clk_freq = DT_INST_0_ARM_PL011_CLOCKS_CLOCK_FREQUENCY,
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
.irq_config_func = pl011_irq_config_func_0,
|
||||
#endif
|
||||
|
@ -490,14 +485,9 @@ static void pl011_irq_config_func_0(struct device *dev)
|
|||
static void pl011_irq_config_func_1(struct device *dev);
|
||||
#endif
|
||||
|
||||
#ifndef DT_INST_1_ARM_PL011_CLOCK_FREQUENCY
|
||||
#define DT_INST_1_ARM_PL011_CLOCK_FREQUENCY \
|
||||
DT_INST_1_ARM_PL011_CLOCKS_CLOCK_FREQUENCY
|
||||
#endif
|
||||
|
||||
static struct uart_device_config pl011_cfg_port_1 = {
|
||||
.base = (u8_t *)DT_INST_1_ARM_PL011_BASE_ADDRESS,
|
||||
.sys_clk_freq = DT_INST_1_ARM_PL011_CLOCK_FREQUENCY,
|
||||
.sys_clk_freq = DT_INST_1_ARM_PL011_CLOCKS_CLOCK_FREQUENCY,
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
.irq_config_func = pl011_irq_config_func_1,
|
||||
#endif
|
||||
|
|
|
@ -29,6 +29,12 @@
|
|||
};
|
||||
};
|
||||
|
||||
uartclk: apb-pclk {
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <24000000>;
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
|
||||
soc {
|
||||
interrupt-parent = <&gic>;
|
||||
|
||||
|
@ -48,6 +54,7 @@
|
|||
status = "disabled";
|
||||
interrupts = <GIC_SPI 1 0 IRQ_TYPE_LEVEL>;
|
||||
interrupt-names = "irq_0";
|
||||
clocks = <&uartclk>;
|
||||
label = "UART_0";
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue