vrtc: vrtc time update for stick mem [2/2]

PD#174867

Problem:
vrtc time update for stick mem.

Solution:
vrtc time update for stick mem.

Verify:
g12a txl.

Change-Id: I65074422569370b253882a4e66fb771da10ccdbf
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
This commit is contained in:
Hong Guo
2018-11-22 11:06:58 +08:00
committed by Dongjin Kim
parent ce4fba077b
commit 46e2491204
3 changed files with 22 additions and 2 deletions

View File

@@ -388,6 +388,14 @@
sys_poweroff = <0x84000008>;
};
rtc {
compatible = "amlogic, aml_vrtc";
alarm_reg_addr = <0xc81000a8>;
timer_e_addr = <0xc1109988>;
init_date = "2018/01/01";
status = "okay";
};
soc {
compatible = "simple-bus";
#address-cells = <1>;

View File

@@ -388,6 +388,14 @@
sys_poweroff = <0x84000008>;
};
rtc {
compatible = "amlogic, aml_vrtc";
alarm_reg_addr = <0xc81000a8>;
timer_e_addr = <0xc1109988>;
init_date = "2018/01/01";
status = "okay";
};
soc {
compatible = "simple-bus";
#address-cells = <2>;

View File

@@ -188,8 +188,12 @@ static int aml_vrtc_probe(struct platform_device *pdev)
if (!ret) {
pr_debug("init_date: %s\n", str);
if (!scpi_get_vrtc(&vrtc_val)) {
vrtc_init_date = vrtc_val;
pr_debug("get vrtc: %us\n", vrtc_init_date);
if (!vrtc_val)
parse_init_date(str);
else {
vrtc_init_date = vrtc_val;
pr_debug("get vrtc: %us\n", vrtc_init_date);
}
} else
parse_init_date(str);
}