aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/via/via_clock.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/video/via/via_clock.c b/drivers/video/via/via_clock.c
index af8f26b643c..db1e39277e3 100644
--- a/drivers/video/via/via_clock.c
+++ b/drivers/video/via/via_clock.c
@@ -25,6 +25,7 @@
25 25
26#include <linux/kernel.h> 26#include <linux/kernel.h>
27#include <linux/via-core.h> 27#include <linux/via-core.h>
28#include <asm/olpc.h>
28#include "via_clock.h" 29#include "via_clock.h"
29#include "global.h" 30#include "global.h"
30#include "debug.h" 31#include "debug.h"
@@ -289,6 +290,10 @@ static void dummy_set_pll(struct via_pll_config config)
289 printk(KERN_INFO "Using undocumented set PLL.\n%s", via_slap); 290 printk(KERN_INFO "Using undocumented set PLL.\n%s", via_slap);
290} 291}
291 292
293static void noop_set_clock_state(u8 state)
294{
295}
296
292void via_clock_init(struct via_clock *clock, int gfx_chip) 297void via_clock_init(struct via_clock *clock, int gfx_chip)
293{ 298{
294 switch (gfx_chip) { 299 switch (gfx_chip) {
@@ -346,4 +351,18 @@ void via_clock_init(struct via_clock *clock, int gfx_chip)
346 break; 351 break;
347 352
348 } 353 }
354
355 if (machine_is_olpc()) {
356 /* The OLPC XO-1.5 cannot suspend/resume reliably if the
357 * IGA1/IGA2 clocks are set as on or off (memory rot
358 * occasionally happens during suspend under such
359 * configurations).
360 *
361 * The only known stable scenario is to leave this bits as-is,
362 * which in their default states are documented to enable the
363 * clock only when it is needed.
364 */
365 clock->set_primary_clock_state = noop_set_clock_state;
366 clock->set_secondary_clock_state = noop_set_clock_state;
367 }
349} 368}