[U-Boot] [PATCH] rockchip: rk3188: use board_debug_uart_init() for UART io init
Kever Yang
kever.yang at rock-chips.com
Thu Nov 29 01:54:10 UTC 2018
Hi Philipp,
On 11/28/2018 05:21 PM, Philipp Tomsich wrote:
>
>> On 28.11.2018, at 06:01, Kever Yang <kever.yang at rock-chips.com> wrote:
>>
>> Sync with other rockchip SoCs, use board_debug_uart_init() to
>> init default UART iomux.
>>
>> Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
> Is this different from commit d32f40ce262c584e25a0838840c8d4106aadc276 which
> is has already been applied to uboot-rockchip/master at the start of the merge window?
Sorry, I only check the mainline instead of uboot-rockchip
The bug fix part is the same the Heiko's patch, and I use
board_debug_uart_init()
like other SoCs, so that it's better to merge board_spl.c into one file
later.
Thanks,
- Kever
>
> If so, please rebase to accomodate for the overlap...
>
> Thanks,
> Philipp.
>
>> ---
>>
>> arch/arm/mach-rockchip/Kconfig | 1 +
>> arch/arm/mach-rockchip/rk3188-board-spl.c | 29 +++++++++++++++++------
>> 2 files changed, 23 insertions(+), 7 deletions(-)
>>
>> diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
>> index 94a03e2a38..a007162b21 100644
>> --- a/arch/arm/mach-rockchip/Kconfig
>> +++ b/arch/arm/mach-rockchip/Kconfig
>> @@ -35,6 +35,7 @@ config ROCKCHIP_RK3188
>> select SPL_RAM
>> select SPL_DRIVERS_MISC_SUPPORT
>> select SPL_ROCKCHIP_EARLYRETURN_TO_BROM
>> + select DEBUG_UART_BOARD_INIT
>> select BOARD_LATE_INIT
>> select ROCKCHIP_BROM_HELPER
>> help
>> diff --git a/arch/arm/mach-rockchip/rk3188-board-spl.c b/arch/arm/mach-rockchip/rk3188-board-spl.c
>> index 98ca971b88..a7f59ad856 100644
>> --- a/arch/arm/mach-rockchip/rk3188-board-spl.c
>> +++ b/arch/arm/mach-rockchip/rk3188-board-spl.c
>> @@ -16,6 +16,7 @@
>> #include <asm/io.h>
>> #include <asm/arch/bootrom.h>
>> #include <asm/arch/clock.h>
>> +#include <asm/arch/grf_rk3188.h>
>> #include <asm/arch/hardware.h>
>> #include <asm/arch/periph.h>
>> #include <asm/arch/pmu_rk3188.h>
>> @@ -92,23 +93,37 @@ static int setup_arm_clock(void)
>> return ret;
>> }
>>
>> -void board_init_f(ulong dummy)
>> +void board_debug_uart_init(void)
>> {
>> - struct udevice *pinctrl, *dev;
>> - int ret;
>> -
>> - /* Example code showing how to enable the debug UART on RK3188 */
>> -#ifdef EARLY_UART
>> -#include <asm/arch/grf_rk3188.h>
>> /* Enable early UART on the RK3188 */
>> #define GRF_BASE 0x20008000
>> struct rk3188_grf * const grf = (void *)GRF_BASE;
>> + enum {
>> + GPIO1B1_SHIFT = 2,
>> + GPIO1B1_MASK = 3,
>> + GPIO1B1_GPIO = 0,
>> + GPIO1B1_UART2_SOUT,
>> +
>> + GPIO1B0_SHIFT = 0,
>> + GPIO1B0_MASK = 3,
>> + GPIO1B0_GPIO = 0,
>> + GPIO1B0_UART2_SIN,
>> + };
>>
>> rk_clrsetreg(&grf->gpio1b_iomux,
>> GPIO1B1_MASK << GPIO1B1_SHIFT |
>> GPIO1B0_MASK << GPIO1B0_SHIFT,
>> GPIO1B1_UART2_SOUT << GPIO1B1_SHIFT |
>> GPIO1B0_UART2_SIN << GPIO1B0_SHIFT);
>> +}
>> +
>> +void board_init_f(ulong dummy)
>> +{
>> + struct udevice *pinctrl, *dev;
>> + int ret;
>> +
>> +#define EARLY_UART
>> +#ifdef EARLY_UART
>> /*
>> * Debug UART can be used from here if required:
>> *
>> --
>> 2.18.0
>>
>
More information about the U-Boot
mailing list