Commit 9a212d7f553d01a45172da34970e3a7d481302fd
Committed by
Tom Rini
1 parent
6c30f15bf1
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
serial: stm32x7: remove useless CONFIG_CLK and OF_CONTROL flag
This driver is currently used by STM32F7 and STM32H7 SoCs. As CONFIG_CLK and OF_CONTROL flags are set by default for these 2 SoCs, this flag becomes useless in this driver, so remove it. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Showing 1 changed file with 2 additions and 7 deletions Side-by-side Diff
drivers/serial/serial_stm32x7.c
... | ... | @@ -83,7 +83,9 @@ |
83 | 83 | static int stm32_serial_probe(struct udevice *dev) |
84 | 84 | { |
85 | 85 | struct stm32x7_serial_platdata *plat = dev_get_platdata(dev); |
86 | + struct clk clk; | |
86 | 87 | fdt_addr_t base = plat->base; |
88 | + int ret; | |
87 | 89 | bool stm32f4; |
88 | 90 | u8 uart_enable_bit; |
89 | 91 | |
... | ... | @@ -91,10 +93,6 @@ |
91 | 93 | stm32f4 = plat->uart_info->stm32f4; |
92 | 94 | uart_enable_bit = plat->uart_info->uart_enable_bit; |
93 | 95 | |
94 | -#ifdef CONFIG_CLK | |
95 | - int ret; | |
96 | - struct clk clk; | |
97 | - | |
98 | 96 | ret = clk_get_by_index(dev, 0, &clk); |
99 | 97 | if (ret < 0) |
100 | 98 | return ret; |
... | ... | @@ -104,7 +102,6 @@ |
104 | 102 | dev_err(dev, "failed to enable clock\n"); |
105 | 103 | return ret; |
106 | 104 | } |
107 | -#endif | |
108 | 105 | |
109 | 106 | plat->clock_rate = clk_get_rate(&clk); |
110 | 107 | if (plat->clock_rate < 0) { |
... | ... | @@ -125,7 +122,6 @@ |
125 | 122 | return 0; |
126 | 123 | } |
127 | 124 | |
128 | -#if CONFIG_IS_ENABLED(OF_CONTROL) | |
129 | 125 | static const struct udevice_id stm32_serial_id[] = { |
130 | 126 | { .compatible = "st,stm32-uart", .data = (ulong)&stm32f4_info}, |
131 | 127 | { .compatible = "st,stm32f7-uart", .data = (ulong)&stm32f7_info}, |
... | ... | @@ -143,7 +139,6 @@ |
143 | 139 | |
144 | 140 | return 0; |
145 | 141 | } |
146 | -#endif | |
147 | 142 | |
148 | 143 | static const struct dm_serial_ops stm32_serial_ops = { |
149 | 144 | .putc = stm32_serial_putc, |