diff mbox

[U-Boot,06/19] dm: common: board_r: add call and weak of power_init_dm()

Message ID 1412801335-1591-7-git-send-email-p.marczak@samsung.com
State Superseded
Delegated to: Simon Glass
Headers show

Commit Message

Przemyslaw Marczak Oct. 8, 2014, 8:48 p.m. UTC
This function call is required to init dm pmic framework
and drivers before call to power_init_board().

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
---
 common/board_r.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Simon Glass Oct. 10, 2014, 3:32 a.m. UTC | #1
Hi,

On 8 October 2014 14:48, Przemyslaw Marczak <p.marczak@samsung.com> wrote:
> This function call is required to init dm pmic framework
> and drivers before call to power_init_board().
>
> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
> ---
>  common/board_r.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/common/board_r.c b/common/board_r.c
> index cd92288..e574130 100644
> --- a/common/board_r.c
> +++ b/common/board_r.c
> @@ -285,6 +285,11 @@ __weak int power_init_board(void)
>         return 0;
>  }
>
> +__weak int pmic_init_dm(void)
> +{
> +       return 0;
> +}
> +
>  static int initr_announce(void)
>  {
>         debug("Now running in RAM - U-Boot at: %08lx\n", gd->relocaddr);
> @@ -775,6 +780,9 @@ init_fnc_t init_sequence_r[] = {
>  #ifdef CONFIG_ARCH_EARLY_INIT_R
>         arch_early_init_r,
>  #endif
> +#ifdef CONFIG_DM_PMIC
> +       pmic_init_dm,
> +#endif

Can the call to init this just go in initr_dm()?

>         power_init_board,
>  #ifndef CONFIG_SYS_NO_FLASH
>         initr_flash,
> --
> 1.9.1
>

Regards,
Simon
Przemyslaw Marczak Oct. 20, 2014, 3:45 p.m. UTC | #2
Hello Simon,
On 10/10/2014 05:32 AM, Simon Glass wrote:
> Hi,
>
> On 8 October 2014 14:48, Przemyslaw Marczak <p.marczak@samsung.com> wrote:
>> This function call is required to init dm pmic framework
>> and drivers before call to power_init_board().
>>
>> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
>> ---
>>   common/board_r.c | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/common/board_r.c b/common/board_r.c
>> index cd92288..e574130 100644
>> --- a/common/board_r.c
>> +++ b/common/board_r.c
>> @@ -285,6 +285,11 @@ __weak int power_init_board(void)
>>          return 0;
>>   }
>>
>> +__weak int pmic_init_dm(void)
>> +{
>> +       return 0;
>> +}
>> +
>>   static int initr_announce(void)
>>   {
>>          debug("Now running in RAM - U-Boot at: %08lx\n", gd->relocaddr);
>> @@ -775,6 +780,9 @@ init_fnc_t init_sequence_r[] = {
>>   #ifdef CONFIG_ARCH_EARLY_INIT_R
>>          arch_early_init_r,
>>   #endif
>> +#ifdef CONFIG_DM_PMIC
>> +       pmic_init_dm,
>> +#endif
>
> Can the call to init this just go in initr_dm()?
>

Yes, it can, but if the I2C uclass code is ready soon - then probably we 
don't need this call.

>>          power_init_board,
>>   #ifndef CONFIG_SYS_NO_FLASH
>>          initr_flash,
>> --
>> 1.9.1
>>
>
> Regards,
> Simon
>

Best regards,
diff mbox

Patch

diff --git a/common/board_r.c b/common/board_r.c
index cd92288..e574130 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -285,6 +285,11 @@  __weak int power_init_board(void)
 	return 0;
 }
 
+__weak int pmic_init_dm(void)
+{
+	return 0;
+}
+
 static int initr_announce(void)
 {
 	debug("Now running in RAM - U-Boot at: %08lx\n", gd->relocaddr);
@@ -775,6 +780,9 @@  init_fnc_t init_sequence_r[] = {
 #ifdef CONFIG_ARCH_EARLY_INIT_R
 	arch_early_init_r,
 #endif
+#ifdef CONFIG_DM_PMIC
+	pmic_init_dm,
+#endif
 	power_init_board,
 #ifndef CONFIG_SYS_NO_FLASH
 	initr_flash,