svn commit: r323684 - head/sys/powerpc/powerpc
Justin Hibbits
jhibbits at FreeBSD.org
Sun Sep 17 19:40:18 UTC 2017
Author: jhibbits
Date: Sun Sep 17 19:40:17 2017
New Revision: 323684
URL: https://svnweb.freebsd.org/changeset/base/323684
Log:
Print the correct bitmask for the running Book-E CPU
All the Book-E world is no longer e500v{1,2}. e500mc the 64-bit derivatives do
not use the DOZE/NAP bits with MSR[WE], instead using the `wait' instruction to
wait for interrupts, and SoC plane controls (via CCSR) for power management.
MFC after: 1 week
Modified:
head/sys/powerpc/powerpc/cpu.c
Modified: head/sys/powerpc/powerpc/cpu.c
==============================================================================
--- head/sys/powerpc/powerpc/cpu.c Sun Sep 17 19:14:38 2017 (r323683)
+++ head/sys/powerpc/powerpc/cpu.c Sun Sep 17 19:40:17 2017 (r323684)
@@ -530,16 +530,32 @@ cpu_booke_setup(int cpuid, uint16_t vers)
{
#ifdef BOOKE_E500
register_t hid0;
+ const char *bitmask;
hid0 = mfspr(SPR_HID0);
- /* Programe power-management mode. */
- hid0 &= ~(HID0_DOZE | HID0_NAP | HID0_SLEEP);
- hid0 |= HID0_DOZE;
+ switch (vers) {
+ case FSL_E500mc:
+ bitmask = HID0_E500MC_BITMASK;
+ break;
+ case FSL_E5500:
+ case FSL_E6500:
+ bitmask = HID0_E5500_BITMASK;
+ break;
+ case FSL_E500v1:
+ case FSL_E500v2:
+ /* Only e500v1/v2 support HID0 power management setup. */
- mtspr(SPR_HID0, hid0);
+ /* Programe power-management mode. */
+ hid0 &= ~(HID0_DOZE | HID0_NAP | HID0_SLEEP);
+ hid0 |= HID0_DOZE;
- printf("cpu%d: HID0 %b\n", cpuid, (int)hid0, HID0_E500_BITMASK);
+ mtspr(SPR_HID0, hid0);
+ default:
+ bitmask = HID0_E500_BITMASK;
+ break;
+ }
+ printf("cpu%d: HID0 %b\n", cpuid, (int)hid0, bitmask);
#endif
if (cpu_idle_hook == NULL)
More information about the svn-src-all
mailing list