TI中文支持网
TI专业的中文技术问题搜集分享网站

am3352 pull PMIC_POWER_EN pin low

requirement: AM3352 pull PMIC_POWER_EN pin low

I try to set RTC_PMIC register 16 bit data[PWR_ENABLE_EN] to 1 and set RTC_STATUS_REG register 7bit[ALARM2] to 1 inkernel driver.

Below is the kernel driver code :

#define RTC_BASE_PMIC 0x44E3E098
#define RTC_BASE_STATUS 0x44E3E044

virt_pmic=ioremap(RTC_BASE_PMIC,sizeof(unsigned int));
if(virt_pmic<0)
{
ERRORMSG("virt_pmic ioremap error\n");
return -1;
}

virt_status=ioremap(RTC_BASE_STATUS,sizeof(unsigned int));
if(virt_status<0)
{
ERRORMSG("virt_status ioremap error\n");
return -1;
}

reg_pmic=(unsigned int)readl(virt_pmic);
reg_pmic |= 0x1000;
writel(reg_pmic,virt_pmic);

reg_status=(unsigned int)readl(virt_status);
reg_status |= 0x80;
writel(reg_status,virt_status);
udelay(31);

below is kernel panic dmesg console:

enter ioremap
enter [Set_PMIC_Enable]
Unhandled fault: external abort on non-linefetch (0x1028) at 0xf9e3e098
pgd = dda60000
[f9e3e098] *pgd=44e11452(bad)
Internal error: : 1028 [#1] PREEMPT ARM
Modules linked in: aurora_gptimer_demo(O+) g_gp4000 libcomposite configfs usb_storage autofs4 ohci_hcd ehci_omap ehci_hcd evdev spi_sram aurora_buzzer aurora_reset
CPU: 0 PID: 246 Comm: insmod Tainted: G O 4.1.21-rt13-WR8.0.0.29_preempt-rt #25
Hardware name: Generic AM33XX (Flattened Device Tree)
task: dda7c580 ti: ddd52000 task.ti: ddd52000
PC is at gptimer_probe+0x204/0x4bc [aurora_gptimer_demo]
LR is at console_unlock+0x34c/0x618
pc : [<bf0795d0>] lr : [<c00672b4>] psr: 60080013
sp : ddd53cb0 ip : ddd53ba0 fp : ddd53ce4
r10: bf079fa8 r9 : de936e00 r8 : 0000007f
r7 : 00000000 r6 : de936e10 r5 : bf07a0dc r4 : bf07a0dc
r3 : f9e3e098 r2 : 00000000 r1 : c0657fd4 r0 : 00000017
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c5387d Table: 9da60019 DAC: 00000015
Process insmod (pid: 246, stack limit = 0xddd52208)
Stack: (0xddd53cb0 to 0xddd54000)
3ca0: de936e10 00000000 de936e18 de936e10
3cc0: de936e10 de936e10 bf079ddc fffffdfb bf079ddc 0000000b ddd53d04 ddd53ce8
3ce0: c02d45a4 bf0793d8 de936e10 c06aeeac c06aeebc 00000000 ddd53d2c ddd53d08
3d00: c02d2ec8 c02d4564 de936e10 bf079ddc de936e44 00000000 00000000 ddd3c788
3d20: ddd53d4c ddd53d30 c02d30e8 c02d2d4c 00000000 bf079ddc c02d3054 00000000
3d40: ddd53d74 ddd53d50 c02d135c c02d3060 de803864 de91bdc4 de803888 bf079ddc
3d60: ddc23480 c0669a90 ddd53d84 ddd53d78 c02d291c c02d12f8 ddd53dac ddd53d88
3d80: c02d25d4 c02d2904 bf079d90 ddd53d98 bf079ddc bf07c000 c064dba0 ddd3c900

But it doesn't set successfully.

 

Nancy Wang:

可以看一下这个帖子上对Unhandled fault: external abort on non-linefetch (0x1028) at 0xf9e3e09 类似错误的分析。
e2e.ti.com/…/49197

Shine:

请看一下设备树文件里有没有配置rtc clock?
另外,processor SDK 内核支持rtc only mode.
processors.wiki.ti.com/…/Linux_Core_Power_Management_User's_Guide_(v4.1)

赞(0)
未经允许不得转载:TI中文支持网 » am3352 pull PMIC_POWER_EN pin low
分享到: 更多 (0)