Uboot suspend

Материал из Toshiba AC100 wiki
Перейти к: навигация, поиск

Repositories

https://github.com/ac100-ru/u-boot-ac100-exp/tree/tegra-master-exp-android https://github.com/ac100-ru/android_kernel_asus_grouper/tree/cm-11.0-ac100-nvec-test

Uboot suspend

Signs of suspend in repo https://github.com/ac100-ru/u-boot-ac100-exp.git

include/configs/seaboard.h 
/* LP0 suspend / resume */
#define CONFIG_TEGRA_LP0
#define CONFIG_AES
#define CONFIG_TEGRA_PMU
#define CONFIG_TPS6586X_POWER
#define CONFIG_TEGRA_CLOCK_SCALING
board/nvidia/common/board.c
CONFIG_TEGRA_PMU
CONFIG_TEGRA_CLOCK_SCALING
CONFIG_TEGRA_LP0

Questionable

/* ATAGs support for bootm/bootz */
#define CONFIG_SETUP_MEMORY_TAGS
#define CONFIG_CMDLINE_TAG
#define CONFIG_INITRD_TAG

http://lists.denx.de/pipermail/u-boot/2012-May/125434.html

Cmdline

Kernel 2.6.x

[email protected]

U-boot include/configs/tegra20-common.h

#ifdef CONFIG_TEGRA_LP0
#define TEGRA_LP0_ADDR 0x1C406000
#define TEGRA_LP0_SIZE 0x2000
#define TEGRA_LP0_VEC \
"lp0_vec=" __stringify(TEGRA_LP0_SIZE) \
"@" __stringify(TEGRA_LP0_ADDR) " "
#else
#define TEGRA_LP0_VEC
#endif


Notes

  • LP0 Suspend attempt with AC connected and without are different
    • Without AC ac100 sometimes can enter sleep ( power led begin to blink)
    • Without AC sleep starts faster
    • Without AC console log sometimes shorter that on AC http://pastebin.com/LGnxztQ8
[  250.862403] suspend: enter suspend
[  252.957243] WARNING: at
    ../../../../../../kernel/toshiba/grouper/drivers/regulator/core.c:1448
    regulator_disable+0x160/0x248()
    unbalanced disables for REG-LDO_5
[  255.320007] power_suspend_late return -11

Without AC nvec sometimes post errors during suspend process http://pastebin.com/K6vrNfjX

[  229.952750] suspend: abort suspend
[  234.406984] nvec nvec.2: timeout waiting for ec transfer
[  290.042915] suspend: enter suspend
[  291.501312] WARNING: at
    ../../../../../../kernel/toshiba/grouper/arch/arm/mach-tegra/clock.c:289
    clk_disable+0x2c/0x64()
[  291.517281] Attempting to disable clock usbd.sclk with refcnt 0
[  291.892988] WARNING: at
    ../../../../../../kernel/toshiba/grouper/arch/arm/mach-tegra/clock.c:289
    clk_disable+0x2c/0x64()
[  291.908825] Attempting to disable clock usbd.emc with refcnt 0
[  297.060477] BUG: sleeping function called from invalid context at
    ../../../../../../kernel/toshiba/grouper/kernel/mutex.c:271

Current problems

  • tegra_init_suspend report that lp0_vec missing and disables LP0
[    1.835402] tegra_init_emc: Hynix 333MHz memory found
[    1.850025] tegra_init_suspend: Suspend mode LP0 requested, no lp0_vec provided by bootlader -- disabling LP0
[    1.864331] Selecting UARTA as the debug console

cmdline with u-boot lp0_vec settings fixes this message. This parameter is obsolete (https://lists.launchpad.net/ac100/msg00312.html) because in modern kernels it is passed using device tree (see arch/arm/mach-tegra/pmc.c).

[    4.698240] calling  nvhost_mod_init+0x0/0x24 @ 1
[    4.706038] BUG: key cde4500c not in .data!
[  168.939764] WARNING: at
../../../../../../kernel/toshiba/grouper/drivers/regulator/core.c:1448
regulator_disable+0x160/0x248()
[  168.954857] unbalanced disables for REG-LDO_5
[  171.470817] BUG: sleeping function called from invalid context at
../../../../../../kernel/toshiba/grouper/kernel/mutex.c:271
[  171.789731] Entering suspend state LP0