summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx31/dvfs_dptc-imx31.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx31/dvfs_dptc-imx31.c')
-rw-r--r--firmware/target/arm/imx31/dvfs_dptc-imx31.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/firmware/target/arm/imx31/dvfs_dptc-imx31.c b/firmware/target/arm/imx31/dvfs_dptc-imx31.c
index 217c8a8b83..45b66b02f8 100644
--- a/firmware/target/arm/imx31/dvfs_dptc-imx31.c
+++ b/firmware/target/arm/imx31/dvfs_dptc-imx31.c
@@ -423,6 +423,7 @@ static void dptc_int(unsigned long pmcr0)
423{ 423{
424 const union dvfs_dptc_voltage_table_entry *entry; 424 const union dvfs_dptc_voltage_table_entry *entry;
425 uint32_t sw1a, sw1advs, sw1bdvs, sw1bstby; 425 uint32_t sw1a, sw1advs, sw1bdvs, sw1bstby;
426 uint32_t switchers0, switchers1;
426 427
427 int wp = dptc_wp; 428 int wp = dptc_wp;
428 429
@@ -464,10 +465,12 @@ static void dptc_int(unsigned long pmcr0)
464 sw1bdvs = check_regulator_setting(entry->sw1bdvs); 465 sw1bdvs = check_regulator_setting(entry->sw1bdvs);
465 sw1bstby = check_regulator_setting(entry->sw1bstby); 466 sw1bstby = check_regulator_setting(entry->sw1bstby);
466 467
467 dptc_regs_buf[0] = dptc_reg_shadows[0] | 468 switchers0 = dptc_reg_shadows[0] & ~(MC13783_SW1A | MC13783_SW1ADVS);
469 dptc_regs_buf[0] = switchers0 |
468 sw1a << MC13783_SW1A_POS | /* SW1A */ 470 sw1a << MC13783_SW1A_POS | /* SW1A */
469 sw1advs << MC13783_SW1ADVS_POS; /* SW1ADVS */ 471 sw1advs << MC13783_SW1ADVS_POS; /* SW1ADVS */
470 dptc_regs_buf[1] = dptc_reg_shadows[1] | 472 switchers1 = dptc_reg_shadows[1] & ~(MC13783_SW1BDVS | MC13783_SW1BSTBY);
473 dptc_regs_buf[1] = switchers1 |
471 sw1bdvs << MC13783_SW1BDVS_POS | /* SW1BDVS */ 474 sw1bdvs << MC13783_SW1BDVS_POS | /* SW1BDVS */
472 sw1bstby << MC13783_SW1BSTBY_POS; /* SW1BSTBY */ 475 sw1bstby << MC13783_SW1BSTBY_POS; /* SW1BSTBY */
473 476
@@ -503,10 +506,6 @@ static void dptc_init(void)
503 /* Shadow the regulator registers */ 506 /* Shadow the regulator registers */
504 mc13783_read_regs(dptc_pmic_regs, dptc_reg_shadows, 2); 507 mc13783_read_regs(dptc_pmic_regs, dptc_reg_shadows, 2);
505 508
506 /* Pre-mask the fields we change */
507 dptc_reg_shadows[0] &= ~(MC13783_SW1A | MC13783_SW1ADVS);
508 dptc_reg_shadows[1] &= ~(MC13783_SW1BDVS | MC13783_SW1BSTBY);
509
510 /* Set default, safe working point. */ 509 /* Set default, safe working point. */
511 dptc_new_wp(DPTC_WP_DEFAULT); 510 dptc_new_wp(DPTC_WP_DEFAULT);
512 511