Robert,

On Thu, Dec 20, 2012 at 8:04 PM, Robert Nelson <robertcnel...@gmail.com> wrote:

> Hi Fabio,
>
> It looks like we need one more fixup after commit c73368150 on the
> first run/older (non R, Dialog, bug wired extra Capacitor) version of
> this board..  Do you happen to have any in your lab?
>
> U-Boot 2013.01-rc2-dirty (Dec 20 2012 - 15:55:01)
>
> Board: MX53 LOCO
> I2C:   ready
> DRAM:  1 GiB
> pmic_alloc: No available memory for allocation!
> pmic_init: POWER allocation error!
> CPU:   Freescale i.MX53 family rev2.0 at 800 MHz
> Reset cause: POR
> MMC:   FSL_SDHC: 0, FSL_SDHC: 1
> *** Warning - bad CRC, using default environment
>
> (and it just keeps on resetting)
>
> It looks to be failing after calloc...
> http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/power/power_core.c#l100
>
>  100         p = calloc(sizeof(*p), 1);
>  101         if (!p) {
>  102                 printf("%s: No available memory for
> allocation!\n", __func__);
>  103                 return NULL;
>  104         }

I can reproduce this issue using top of head U-boot tree.

It seems indeed to be caused by:

Author: Łukasz Majewski <l.majew...@samsung.com>
Date:   Tue Nov 13 03:21:55 2012 +0000
commit c7336815078ff3745e3130aeff35991e3e98e61e
Author: Łukasz Majewski <l.majew...@samsung.com>
Date:   Tue Nov 13 03:21:55 2012 +0000

    pmic: Extend PMIC framework to support multiple instances of PMIC devices

    The PMIC framework has been extended to support multiple instances of
    the variety of devices responsible for power management.
    This change allows supporting of e.g. fuel gauge, charger, MUIC (Micro USB
    Interface Circuit).
    Power related includes have been moved to ./include/power directory.
    This is a first of a series of patches - in the future "pmic" will be
    replaced with "power".

    Two important issues:
    1. The PMIC needs to be initialized just after malloc is configured
    2. It uses list to hold information about available PMIC devices

    Signed-off-by: Lukasz Majewski <l.majew...@samsung.com>
    Signed-off-by: Kyungmin Park <kyungmin.p...@samsung.com>
    Cc: Stefano Babic <sba...@denx.de>

I am Ccing Lukasz/Stefano in case they have any suggestion.

With the new PMIC framework: is it safe to call the PMIC API from
board_init function?

Regards,

Fabio Estevam
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to