|
@@ -25,6 +25,7 @@
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
#include <linux/via-core.h>
|
|
|
+#include <asm/olpc.h>
|
|
|
#include "via_clock.h"
|
|
|
#include "global.h"
|
|
|
#include "debug.h"
|
|
@@ -289,6 +290,10 @@ static void dummy_set_pll(struct via_pll_config config)
|
|
|
printk(KERN_INFO "Using undocumented set PLL.\n%s", via_slap);
|
|
|
}
|
|
|
|
|
|
+static void noop_set_clock_state(u8 state)
|
|
|
+{
|
|
|
+}
|
|
|
+
|
|
|
void via_clock_init(struct via_clock *clock, int gfx_chip)
|
|
|
{
|
|
|
switch (gfx_chip) {
|
|
@@ -346,4 +351,18 @@ void via_clock_init(struct via_clock *clock, int gfx_chip)
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ if (machine_is_olpc()) {
|
|
|
+ /* The OLPC XO-1.5 cannot suspend/resume reliably if the
|
|
|
+ * IGA1/IGA2 clocks are set as on or off (memory rot
|
|
|
+ * occasionally happens during suspend under such
|
|
|
+ * configurations).
|
|
|
+ *
|
|
|
+ * The only known stable scenario is to leave this bits as-is,
|
|
|
+ * which in their default states are documented to enable the
|
|
|
+ * clock only when it is needed.
|
|
|
+ */
|
|
|
+ clock->set_primary_clock_state = noop_set_clock_state;
|
|
|
+ clock->set_secondary_clock_state = noop_set_clock_state;
|
|
|
+ }
|
|
|
}
|