aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-01-06 19:41:02 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-08 23:47:18 -0500
commit5b9ca526917b7bc7d1da3beaccb2251a8f0b5fe2 (patch)
treef345cbb73a4c5bb4c5645d53df2653c916e54172 /drivers/macintosh
parenta28d3af2a26c89aaa6470ca36edb212e05143d67 (diff)
[PATCH] 3/5 powerpc: Add platform functions interpreter
This is the platform function interpreter itself along with the backends for UniN/U3/U4, mac-io, GPIOs and i2c. It adds the ability to execute those do-platform-* scripts in the device-tree (at least for most devices for which a backend is provided). This should replace the clock spreading hacks properly. It might also have an impact on all sort of machines since some of the scripts marked "at init" will now be executed on boot (or some other on sleep/wakeup), those will possibly do things that the kernel didn't do at all, like setting some values into some i2c devices (changing thermal sensor calibration or conversion rate) etc... Thus regression testing is MUCH welcome. Also loook for errors in dmesg. That's also why I've left rather verbose debugging enabled in this version of the patch. (I do expect some Windtunnel G4s to show some errors as they have an i2c clock chip on the PMU bus that uses some primitives that the i2c backend doesn't implement yet. I really need users that have one of those machine to come back to me so we can get that done right, though the errors themselves should be harmless, I suspect the machine might not run at full speed). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/via-pmu.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index aa481a88ccab..6eb93e45fcd3 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -55,6 +55,8 @@
55#include <asm/sections.h> 55#include <asm/sections.h>
56#include <asm/irq.h> 56#include <asm/irq.h>
57#include <asm/pmac_feature.h> 57#include <asm/pmac_feature.h>
58#include <asm/pmac_pfunc.h>
59#include <asm/pmac_low_i2c.h>
58#include <asm/uaccess.h> 60#include <asm/uaccess.h>
59#include <asm/mmu_context.h> 61#include <asm/mmu_context.h>
60#include <asm/cputable.h> 62#include <asm/cputable.h>
@@ -2105,6 +2107,10 @@ pmac_suspend_devices(void)
2105 return -EBUSY; 2107 return -EBUSY;
2106 } 2108 }
2107 2109
2110 /* Call platform functions marked "on sleep" */
2111 pmac_pfunc_i2c_suspend();
2112 pmac_pfunc_base_suspend();
2113
2108 /* Stop preemption */ 2114 /* Stop preemption */
2109 preempt_disable(); 2115 preempt_disable();
2110 2116
@@ -2175,6 +2181,10 @@ pmac_wakeup_devices(void)
2175 mdelay(10); 2181 mdelay(10);
2176 preempt_enable(); 2182 preempt_enable();
2177 2183
2184 /* Call platform functions marked "on wake" */
2185 pmac_pfunc_base_resume();
2186 pmac_pfunc_i2c_resume();
2187
2178 /* Resume devices */ 2188 /* Resume devices */
2179 device_resume(); 2189 device_resume();
2180 2190