diff options
author | Kamil Lulko <kamil.lulko@gmail.com> | 2015-12-01 08:08:19 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-12-12 20:56:08 (GMT) |
commit | 665624149a55f43e25e13ea50bd0015c31e6c6bb (patch) | |
tree | 1cd8925446dd68c4e1267568ee7ca947200018ca /board/st/stm32f429-discovery | |
parent | 5076c64a08d2083af5a7761b12a30116ef0da967 (diff) | |
download | u-boot-665624149a55f43e25e13ea50bd0015c31e6c6bb.tar.xz |
stm32: Convert serial driver to DM
Signed-off-by: Kamil Lulko <kamil.lulko@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board/st/stm32f429-discovery')
-rw-r--r-- | board/st/stm32f429-discovery/stm32f429-discovery.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/board/st/stm32f429-discovery/stm32f429-discovery.c b/board/st/stm32f429-discovery/stm32f429-discovery.c index f418186..8bc2d9e 100644 --- a/board/st/stm32f429-discovery/stm32f429-discovery.c +++ b/board/st/stm32f429-discovery/stm32f429-discovery.c @@ -6,7 +6,7 @@ * Pavel Boldin, Emcraft Systems, paboldin@emcraft.com * * (C) Copyright 2015 - * Kamil Lulko, <rev13@wp.pl> + * Kamil Lulko, <kamil.lulko@gmail.com> * * SPDX-License-Identifier: GPL-2.0+ */ @@ -17,6 +17,8 @@ #include <asm/arch/stm32.h> #include <asm/arch/gpio.h> #include <asm/arch/fmc.h> +#include <dm/platdata.h> +#include <dm/platform_data/serial_stm32.h> DECLARE_GLOBAL_DATA_PTR; @@ -263,6 +265,15 @@ int dram_init(void) return rv; } +static const struct stm32_serial_platdata serial_platdata = { + .base = (struct stm32_usart *)STM32_USART1_BASE, +}; + +U_BOOT_DEVICE(stm32_serials) = { + .name = "serial_stm32", + .platdata = &serial_platdata, +}; + u32 get_board_rev(void) { return 0; |