Commit 49e6f87e authored by Felipe Balbi's avatar Felipe Balbi Committed by Samuel Ortiz

mfd: Switch twl-core over to defines in twl.h

use the new definitions on twl header for code
consistency.
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 89712059
...@@ -202,12 +202,6 @@ ...@@ -202,12 +202,6 @@
/* Few power values */ /* Few power values */
#define R_CFG_BOOT 0x05 #define R_CFG_BOOT 0x05
#define R_PROTECT_KEY 0x0E
/* access control values for R_PROTECT_KEY */
#define KEY_UNLOCK1 0xce
#define KEY_UNLOCK2 0xec
#define KEY_LOCK 0x00
/* some fields in R_CFG_BOOT */ /* some fields in R_CFG_BOOT */
#define HFCLK_FREQ_19p2_MHZ (1 << 0) #define HFCLK_FREQ_19p2_MHZ (1 << 0)
...@@ -846,8 +840,8 @@ static inline int __init protect_pm_master(void) ...@@ -846,8 +840,8 @@ static inline int __init protect_pm_master(void)
{ {
int e = 0; int e = 0;
e = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, KEY_LOCK, e = twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, 0,
R_PROTECT_KEY); TWL4030_PM_MASTER_PROTECT_KEY);
return e; return e;
} }
...@@ -855,10 +849,13 @@ static inline int __init unprotect_pm_master(void) ...@@ -855,10 +849,13 @@ static inline int __init unprotect_pm_master(void)
{ {
int e = 0; int e = 0;
e |= twl_i2c_write_u8(TWL_MODULE_PM_MASTER, KEY_UNLOCK1, e |= twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER,
R_PROTECT_KEY); TWL4030_PM_MASTER_KEY_CFG1,
e |= twl_i2c_write_u8(TWL_MODULE_PM_MASTER, KEY_UNLOCK2, TWL4030_PM_MASTER_PROTECT_KEY);
R_PROTECT_KEY); e |= twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER,
TWL4030_PM_MASTER_KEY_CFG2,
TWL4030_PM_MASTER_PROTECT_KEY);
return e; return e;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment