summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/powermac/uninorthvar.h
diff options
context:
space:
mode:
authorjhibbits <jhibbits@FreeBSD.org>2013-12-13 02:37:35 +0000
committerjhibbits <jhibbits@FreeBSD.org>2013-12-13 02:37:35 +0000
commit7a0c976f7e101a3ce3af15861c1a9cd1bd8df649 (patch)
treea61e46af12f52b85be23d94481b87a41d65134bd /sys/powerpc/powermac/uninorthvar.h
parentdb185b5f7ce440a45f9b33029ccdbfca7bac096a (diff)
downloadFreeBSD-src-7a0c976f7e101a3ce3af15861c1a9cd1bd8df649.zip
FreeBSD-src-7a0c976f7e101a3ce3af15861c1a9cd1bd8df649.tar.gz
Add PMU-based CPU frequency scaling. This method is used on most Titanium
PowerBooks. MFC after: 1 month
Diffstat (limited to 'sys/powerpc/powermac/uninorthvar.h')
-rw-r--r--sys/powerpc/powermac/uninorthvar.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/sys/powerpc/powermac/uninorthvar.h b/sys/powerpc/powermac/uninorthvar.h
index aa834f6..e08478d 100644
--- a/sys/powerpc/powermac/uninorthvar.h
+++ b/sys/powerpc/powermac/uninorthvar.h
@@ -28,6 +28,8 @@
#ifndef _POWERPC_POWERMAC_UNINORTHVAR_H_
#define _POWERPC_POWERMAC_UNINORTHVAR_H_
+#include <dev/ofw/ofw_bus_subr.h>
+#include <dev/ofw/ofw_pci.h>
#include <powerpc/ofw/ofw_pci.h>
struct uninorth_softc {
@@ -76,10 +78,30 @@ struct unin_chip_devinfo {
#define UNIN_CLOCKCNTL_GMAC 0x2
/*
+ * Power management register
+ */
+#define UNIN_PWR_MGMT 0x30
+#define UNIN_PWR_NORMAL 0x00
+#define UNIN_PWR_IDLE2 0x01
+#define UNIN_PWR_SLEEP 0x02
+#define UNIN_PWR_SAVE 0x03
+#define UNIN_PWR_MASK 0x03
+
+/*
+ * Hardware initialization state register
+ */
+#define UNIN_HWINIT_STATE 0x70
+#define UNIN_SLEEPING 0x01
+#define UNIN_RUNNING 0x02
+
+
+/*
* Toggle registers
*/
#define UNIN_TOGGLE_REG 0xe0
#define UNIN_MPIC_RESET 0x2
#define UNIN_MPIC_OUTPUT_ENABLE 0x4
+extern int unin_chip_sleep(device_t dev, int idle);
+extern int unin_chip_wake(device_t dev);
#endif /* _POWERPC_POWERMAC_UNINORTHVAR_H_ */
OpenPOWER on IntegriCloud