From: Patrice Chotard Date: Wed, 27 Sep 2017 13:44:53 +0000 (+0200) Subject: serial: stm32x7: remove useless CONFIG_CLK and OF_CONTROL flag X-Git-Tag: v2017.11-rc2~77 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9a212d7f553d01a45172da34970e3a7d481302fd;p=u-boot 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 --- diff --git a/drivers/serial/serial_stm32x7.c b/drivers/serial/serial_stm32x7.c index 44e8b42c7b..a5d529cab2 100644 --- a/drivers/serial/serial_stm32x7.c +++ b/drivers/serial/serial_stm32x7.c @@ -83,7 +83,9 @@ static int stm32_serial_pending(struct udevice *dev, bool input) static int stm32_serial_probe(struct udevice *dev) { struct stm32x7_serial_platdata *plat = dev_get_platdata(dev); + struct clk clk; fdt_addr_t base = plat->base; + int ret; bool stm32f4; u8 uart_enable_bit; @@ -91,10 +93,6 @@ static int stm32_serial_probe(struct udevice *dev) stm32f4 = plat->uart_info->stm32f4; uart_enable_bit = plat->uart_info->uart_enable_bit; -#ifdef CONFIG_CLK - int ret; - struct clk clk; - ret = clk_get_by_index(dev, 0, &clk); if (ret < 0) return ret; @@ -104,7 +102,6 @@ static int stm32_serial_probe(struct udevice *dev) dev_err(dev, "failed to enable clock\n"); return ret; } -#endif plat->clock_rate = clk_get_rate(&clk); if (plat->clock_rate < 0) { @@ -125,7 +122,6 @@ static int stm32_serial_probe(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(OF_CONTROL) static const struct udevice_id stm32_serial_id[] = { { .compatible = "st,stm32-uart", .data = (ulong)&stm32f4_info}, { .compatible = "st,stm32f7-uart", .data = (ulong)&stm32f7_info}, @@ -143,7 +139,6 @@ static int stm32_serial_ofdata_to_platdata(struct udevice *dev) return 0; } -#endif static const struct dm_serial_ops stm32_serial_ops = { .putc = stm32_serial_putc,