This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于am3359的suspend问题



内核:linux 4.4.12

问题出现:

echo "mem"  >  /sys/power/state

什么都没有显示 所以观察kernel/power/main.c 发现

ti提供的bsp中的kernel/power/suspend.c 中的suspend_set_ops函数并未执行 故而echo "mem"  >  /sys/power/state时没有显示相关的命令

追踪代码得知suspend_set_ops函数在内核的drivers/soc/ti/pm33xx.c里调用

但是这个驱动并没有编译到内核去 所以我就想办法自己编译这个驱动然后insmod

后来发现这个驱动是依赖于WKUP_M3_IPC && TI_EMIF_SRAM

Kconfig文件

config AMX3_PM
        tristate "AMx3 Power Management"
        depends on SOC_AM33XX || SOC_AM43XX
        depends on WKUP_M3_IPC && TI_EMIF_SRAM && RTC_DRV_OMAP
        help
          Enable power management on AM335x and AM437x. Required for suspend to mem
          and standby states on both AM335x and AM437x platforms and for deeper cpuidle
          c-states on AM335x. Also required for rtc and ddr in self-refresh low
          power mode on AM437x platforms.

自行编译时会出现错误

WARNING: "ti_emif_copy_pm_function_table" [/home/edisongao/pm33xx/pm33xx.ko] undefined!
WARNING: "wkup_m3_ipc_get" [/home/edisongao/pm33xx/pm33xx.ko] undefined!
WARNING: "wkup_m3_ipc_put" [/home/edisongao/pm33xx/pm33xx.ko] undefined!

此类的错误

而且insmod的时候 出现以下错误

root@am335x-evm:/# insmod pm33xx.ko
insmod: ERROR: could not insert module pm33xx.ko: Invalid parameters

这是我自行解决问题的步骤以及遇到的错误

根据ti的官网中的介绍 processors.wiki.ti.com/.../AM335x_Linux_Power_Management_User_Guide

发现am335x是通过 am335x-pm-firmware.bin这个文件来实现的

但是这个文件我尝试在内核make menuconfig的时候

...
-*- Userspace firmware loading support
[*] Include in-kernel firmware blobs in the kernel binary
(am335x-pm-firmware.bin) External firmware blobs to build into the kernel binary
(firmware) Firmware blobs root directory

然后编译重新下载到开发板发现并没有出现解决问题 AM335x Linux Power Management User Guide里的是linux 3.2.0的内核了
这里使用的是4.4.12的内核 怀疑方法不是这样 但是查找相关的描述 并没有查到怎么操作 望告知



  • │ Symbol: AMX3_PM [=n] │
    │ Type : tristate │
    │ Prompt: AMx3 Power Management │
    │ Location: │
    │ -> Device Drivers │
    │ -> SOC (System On Chip) specific Drivers │
    │ (1) -> TI SOC drivers support (SOC_TI [=y]) │
    │ Defined at drivers/soc/ti/Kconfig:53 │
    │ Depends on: SOC_TI [=y] && (SOC_AM33XX [=y] || SOC_AM43XX [=n]) && WKUP_M3_IPC [=m] && TI_EMIF_SRAM [=m] && RTC_DRV_OMAP [=n]
    根据这个配置
    SOC_TI [=y] && (SOC_AM33XX [=y] || SOC_AM43XX [=n]) && WKUP_M3_IPC [=m] && TI_EMIF_SRAM [=m] && RTC_DRV_OMAP [=n]
    都选上去了 但是
    menuconfig还是没有这个AMx3 Power Management选项 这是为什么 Kconfig里面是有这个的

    SOC_TI [=y] && (SOC_AM33XX [=y] || SOC_AM43XX [=n]) && WKUP_M3_IPC [=m] && TI_EMIF_SRAM [=m] && RTC_DRV_OMAP [=n]

  • Linux 4.4内核的power management请参考:

    http://processors.wiki.ti.com/index.php/Linux_Core_Power_Management_User%27s_Guide_(v4.4)