龙芯技术社区
直播中

jf_80352681

未满1年用户 12经验值
私信 关注
[2K系列]

如何使用2k1000LA的ACPI进行软关机?

在阅读《龙芯2K1000LA处理器用户手册》第21节电源管理模块的时候,我不是很明白如何使用这个模块。
我没有使用过ACPI的经验,如果我希望在我的内核中使用ACPI使2K1000LA软关机,我应当遵循怎样的流程?具体来说应该如何做呢?

回帖(1)

jf_38522704

2024-5-23 13:22:38
                pmc: syscon@0x1fe27000 {
                        compatible = "syscon";
                        reg = <0x0 0x1fe27000 0x0 0x58>;
                };

                reboot {
                        compatible ="syscon-reboot";
                        regmap = <&pmc>;
                        offset = <0x30>;
                        mask = <0x1>;
                };

                poweroff {
                        compatible ="syscon-poweroff";
                        regmap = <&pmc>;
                        offset = <0x14>;
                        mask = <0x3c00>;
                        value = <0x3c00>;
                };

dts 描述参考如上
工作流程是对 PM1_CNT : Power Management 1 Control Register 寄存器进行置位,使其进入 s5 状态, acpi 里面 s5 是关机
1 举报

更多回帖

发帖
×
20
完善资料,
赚取积分