From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dr. Philipp Tomsich Date: Sun, 26 Mar 2017 18:30:29 +0200 Subject: [U-Boot] [PATCH v2 1/2] rockchip: rk3399: spl: add UART0 support for SPL In-Reply-To: References: <1490307853-11618-1-git-send-email-philipp.tomsich@theobroma-systems.com> <1490307853-11618-2-git-send-email-philipp.tomsich@theobroma-systems.com> <58D480AA.3090501@rock-chips.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Simon, you=E2=80=99ll need CONFIG_DEBUG_UART_BOARD_INIT=3Dy as include/debug_uart.h checks this macro and either defines this function = inline (with an empty body) or allows the function definition. Seems like everyone just adds this to their defconfig (as did we), but I am= open towards an automatic selection of this for ROCKCHIP_RK3399 via Kconfig. Regards, Philipp. > On 26 Mar 2017, at 04:38, Simon Glass wrote: >=20 > Hi, >=20 > On 23 March 2017 at 20:12, Kever Yang > wrote: >>=20 >> Hi Philipp, >>=20 >>=20 >> On 03/24/2017 06:24 AM, Philipp Tomsich wrote: >>>=20 >>> The RK3399-Q7 ("Puma") SoM exposes UART0 as the Qseven UART (i.e. the >>> serial line available via standardised pins on the edge connector and >>> available on a RS232 connector). >>>=20 >>> To support boards (such as the RK3399-Q7) that require UART0 as a >>> debug console, we match CONFIG_DEBUG_UART_BASE and add the appropriate >>> iomux setup to the rk3399 SPL code. >>>=20 >>> As we are already touching this code, we also move the board-specific >>> UART setup (i.e. iomux setup) into board_debug_uart_init(). This will >>> be called from the debug UART init when CONFIG_DEBUG_UART_BOARD_INIT >>> is set. >>>=20 >>> Signed-off-by: Philipp Tomsich >>> --- >>>=20 >>> Changes in v2: >>> - Changed hex constant to lowercase >>>=20 >>> arch/arm/include/asm/arch-rockchip/grf_rk3399.h | 8 +++++++ >>> arch/arm/mach-rockchip/rk3399-board-spl.c | 29 +++++++++++++++++= +------- >>> 2 files changed, 29 insertions(+), 8 deletions(-) >=20 > This patch causes a build error for me: >=20 > aarch64: + evb-rk3399 > +arch/arm/mach-rockchip/rk3399-board-spl.c:60:6: error: redefinition > of 'board_debug_uart_init' > + void board_debug_uart_init(void) > + ^ > +In file included from arch/arm/mach-rockchip/rk3399-board-spl.c:8:0: > +include/debug_uart.h:68:20: note: previous definition of > 'board_debug_uart_init' was here > + static inline void board_debug_uart_init(void) > + ^ > +make[3]: *** [spl/arch/arm/mach-rockchip/rk3399-board-spl.o] Error 1 > +make[2]: *** [spl/arch/arm/mach-rockchip] Error 2 > +make[1]: *** [spl/u-boot-spl] Error 2 > +make: *** [sub-make] Error 2 >=20 >=20 > Regards, > Simon