diff options
author | Randall Stewart <rrs@FreeBSD.org> | 2013-10-19 06:47:02 +0000 |
---|---|---|
committer | Randall Stewart <rrs@FreeBSD.org> | 2013-10-19 06:47:02 +0000 |
commit | 03466868c3a5a825beb4bcb5d6c1b78bb0c22469 (patch) | |
tree | 98015789594b61500b3afcfd6dd1a4a396d4a718 /sys/arm/mv/common.c | |
parent | f8c98b122775097fcd6ee1e0d0b3babf19c61d18 (diff) | |
download | src-03466868c3a5a825beb4bcb5d6c1b78bb0c22469.tar.gz src-03466868c3a5a825beb4bcb5d6c1b78bb0c22469.zip |
Corrects the Kirkwood dreamplug to use
the right register for power managment. It
was incorrectly using the clock register
which also caused the status to be the
opposite of what it is supposed to be.
1 - its disabled
0 - its enabled
Per kirkwood spec FSS_88F6180_9x_6281_OpenSource.pdf
Notes
Notes:
svn path=/head/; revision=256760
Diffstat (limited to 'sys/arm/mv/common.c')
-rw-r--r-- | sys/arm/mv/common.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/arm/mv/common.c b/sys/arm/mv/common.c index d4bee6406bc3..2fafc6552423 100644 --- a/sys/arm/mv/common.c +++ b/sys/arm/mv/common.c @@ -153,8 +153,11 @@ struct fdt_pm_mask_entry fdt_pm_mask_table[] = { static __inline int pm_is_disabled(uint32_t mask) { - +#if defined(SOC_MV_KIRKWOOD) + return (soc_power_ctrl_get(mask) == mask); +#else return (soc_power_ctrl_get(mask) == mask ? 0 : 1); +#endif } /* @@ -221,7 +224,16 @@ fdt_pm(phandle_t node) continue; compat = fdt_is_compatible(node, fdt_pm_mask_table[i].compat); - +#if defined(SOC_MV_KIRKWOOD) + if (compat && (cpu_pm_ctrl & fdt_pm_mask_table[i].mask)) { + dev_mask |= (1 << i); + ena = 0; + break; + } else if (compat) { + dev_mask |= (1 << i); + break; + } +#else if (compat && (~cpu_pm_ctrl & fdt_pm_mask_table[i].mask)) { dev_mask |= (1 << i); ena = 0; @@ -230,6 +242,7 @@ fdt_pm(phandle_t node) dev_mask |= (1 << i); break; } +#endif } return (ena); |