diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2010-05-04 10:37:06 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2010-05-04 10:37:06 +0000 |
commit | 5edcb11f4437c5caa97a98d2098fead28b56b739 (patch) | |
tree | b1433f5540054c80324f4ad393c306df82c05cc3 | |
parent | 931e06de64100e28031627964321da3fdb449378 (diff) | |
download | rockbox-5edcb11f4437c5caa97a98d2098fead28b56b739.tar.gz rockbox-5edcb11f4437c5caa97a98d2098fead28b56b739.zip |
i.MX31/Gigabeat S: Just a little paranoid change to switcher write to active regulators method, to keep things localized a bit more from global data pool, for safety's sake. It's going to Mars afterall.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25801 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/arm/imx31/dvfs_dptc-imx31.c | 11 |
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 | ||