diff mbox series

[2/4] elgin-rv1108: Use rk_board_late_init() for GPIO settings

Message ID 20200313174248.925841-3-otavio@ossystems.com.br
State Accepted
Commit 1ac0d52a9bb2a20e07542ca54c526e35b0f2ffca
Headers show
Series Fixes for rv1108 and rv1108-elgin-r1 | expand

Commit Message

Otavio Salvador March 13, 2020, 5:42 p.m. UTC
Since commit 8e9a8d0d0c8c ("rockchip: elgin-rv1108: use board_early_init_f
for per-boar init") the function that configure the board GPIOs is no
longer called since CONFIG_BOARD_EARLY_INIT_F=y is not selected.

These GPIOs do not need to be configured in such early stagem, so change it
to rk_board_late_init() and also select CONFIG_BOARD_LATE_INIT=y
to fix the regression.

Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
Signed-off-by: Fabio Berton <fabio.berton at ossystems.com.br>
---

 board/elgin/elgin_rv1108/elgin_rv1108.c | 2 +-
 configs/elgin-rv1108_defconfig          | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Kever Yang March 18, 2020, 1:51 a.m. UTC | #1
On 2020/3/14 ??1:42, Otavio Salvador wrote:
> Since commit 8e9a8d0d0c8c ("rockchip: elgin-rv1108: use board_early_init_f
> for per-boar init") the function that configure the board GPIOs is no
> longer called since CONFIG_BOARD_EARLY_INIT_F=y is not selected.
>
> These GPIOs do not need to be configured in such early stagem, so change it
> to rk_board_late_init() and also select CONFIG_BOARD_LATE_INIT=y
> to fix the regression.
>
> Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
> Signed-off-by: Fabio Berton <fabio.berton at ossystems.com.br>


Reviewed-by: Kever Yang <kever.yang at rock-chips.com>

Thanks,
- Kever
> ---
>
>   board/elgin/elgin_rv1108/elgin_rv1108.c | 2 +-
>   configs/elgin-rv1108_defconfig          | 1 +
>   2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/board/elgin/elgin_rv1108/elgin_rv1108.c b/board/elgin/elgin_rv1108/elgin_rv1108.c
> index 607667ac63..dddd950ab2 100644
> --- a/board/elgin/elgin_rv1108/elgin_rv1108.c
> +++ b/board/elgin/elgin_rv1108/elgin_rv1108.c
> @@ -50,7 +50,7 @@ int mach_cpu_init(void)
>   
>   #define MODEM_ENABLE_GPIO 111
>   
> -int board_early_init_f(void)
> +int rk_board_late_init(void)
>   {
>   	gpio_request(MODEM_ENABLE_GPIO, "modem_enable");
>   	gpio_direction_output(MODEM_ENABLE_GPIO, 0);
> diff --git a/configs/elgin-rv1108_defconfig b/configs/elgin-rv1108_defconfig
> index 62af7634a3..80d53f3c10 100644
> --- a/configs/elgin-rv1108_defconfig
> +++ b/configs/elgin-rv1108_defconfig
> @@ -10,6 +10,7 @@ CONFIG_DEBUG_UART_CLOCK=24000000
>   CONFIG_DEBUG_UART=y
>   # CONFIG_USE_BOOTCOMMAND is not set
>   CONFIG_DEFAULT_FDT_FILE="rv1108-elgin-r1.dtb"
> +CONFIG_BOARD_LATE_INIT=y
>   # CONFIG_DISPLAY_CPUINFO is not set
>   CONFIG_DISPLAY_BOARDINFO_LATE=y
>   CONFIG_CMD_GPIO=y
Otavio Salvador March 26, 2020, 12:17 p.m. UTC | #2
Ping?

On Tue, Mar 17, 2020 at 10:52 PM Kever Yang <kever.yang at rock-chips.com> wrote:
>
>
> On 2020/3/14 ??1:42, Otavio Salvador wrote:
> > Since commit 8e9a8d0d0c8c ("rockchip: elgin-rv1108: use board_early_init_f
> > for per-boar init") the function that configure the board GPIOs is no
> > longer called since CONFIG_BOARD_EARLY_INIT_F=y is not selected.
> >
> > These GPIOs do not need to be configured in such early stagem, so change it
> > to rk_board_late_init() and also select CONFIG_BOARD_LATE_INIT=y
> > to fix the regression.
> >
> > Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
> > Signed-off-by: Fabio Berton <fabio.berton at ossystems.com.br>
>
>
> Reviewed-by: Kever Yang <kever.yang at rock-chips.com>
>
> Thanks,
> - Kever
> > ---
> >
> >   board/elgin/elgin_rv1108/elgin_rv1108.c | 2 +-
> >   configs/elgin-rv1108_defconfig          | 1 +
> >   2 files changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/board/elgin/elgin_rv1108/elgin_rv1108.c b/board/elgin/elgin_rv1108/elgin_rv1108.c
> > index 607667ac63..dddd950ab2 100644
> > --- a/board/elgin/elgin_rv1108/elgin_rv1108.c
> > +++ b/board/elgin/elgin_rv1108/elgin_rv1108.c
> > @@ -50,7 +50,7 @@ int mach_cpu_init(void)
> >
> >   #define MODEM_ENABLE_GPIO 111
> >
> > -int board_early_init_f(void)
> > +int rk_board_late_init(void)
> >   {
> >       gpio_request(MODEM_ENABLE_GPIO, "modem_enable");
> >       gpio_direction_output(MODEM_ENABLE_GPIO, 0);
> > diff --git a/configs/elgin-rv1108_defconfig b/configs/elgin-rv1108_defconfig
> > index 62af7634a3..80d53f3c10 100644
> > --- a/configs/elgin-rv1108_defconfig
> > +++ b/configs/elgin-rv1108_defconfig
> > @@ -10,6 +10,7 @@ CONFIG_DEBUG_UART_CLOCK=24000000
> >   CONFIG_DEBUG_UART=y
> >   # CONFIG_USE_BOOTCOMMAND is not set
> >   CONFIG_DEFAULT_FDT_FILE="rv1108-elgin-r1.dtb"
> > +CONFIG_BOARD_LATE_INIT=y
> >   # CONFIG_DISPLAY_CPUINFO is not set
> >   CONFIG_DISPLAY_BOARDINFO_LATE=y
> >   CONFIG_CMD_GPIO=y
>
>
diff mbox series

Patch

diff --git a/board/elgin/elgin_rv1108/elgin_rv1108.c b/board/elgin/elgin_rv1108/elgin_rv1108.c
index 607667ac63..dddd950ab2 100644
--- a/board/elgin/elgin_rv1108/elgin_rv1108.c
+++ b/board/elgin/elgin_rv1108/elgin_rv1108.c
@@ -50,7 +50,7 @@  int mach_cpu_init(void)
 
 #define MODEM_ENABLE_GPIO 111
 
-int board_early_init_f(void)
+int rk_board_late_init(void)
 {
 	gpio_request(MODEM_ENABLE_GPIO, "modem_enable");
 	gpio_direction_output(MODEM_ENABLE_GPIO, 0);
diff --git a/configs/elgin-rv1108_defconfig b/configs/elgin-rv1108_defconfig
index 62af7634a3..80d53f3c10 100644
--- a/configs/elgin-rv1108_defconfig
+++ b/configs/elgin-rv1108_defconfig
@@ -10,6 +10,7 @@  CONFIG_DEBUG_UART_CLOCK=24000000
 CONFIG_DEBUG_UART=y
 # CONFIG_USE_BOOTCOMMAND is not set
 CONFIG_DEFAULT_FDT_FILE="rv1108-elgin-r1.dtb"
+CONFIG_BOARD_LATE_INIT=y
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_CMD_GPIO=y