Changeset 4827


Ignore:
Timestamp:
11/26/08 23:36:24 (8 years ago)
Author:
werner
Message:

Surprise, readl is not good at setting registers.
Also disable interrupts during surgery.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • developers/werner/wlan-spi/patches-tracking/experiment-s3cmci-suspend-softly.patch

    r4821 r4827  
    11Index: ktrack/drivers/mmc/core/core.c 
    22=================================================================== 
    3 --- ktrack.orig/drivers/mmc/core/core.c 2008-11-24 22:52:14.000000000 -0200 
    4 +++ ktrack/drivers/mmc/core/core.c      2008-11-24 22:53:53.000000000 -0200 
     3--- ktrack.orig/drivers/mmc/core/core.c 2008-11-25 12:02:47.000000000 -0200 
     4+++ ktrack/drivers/mmc/core/core.c      2008-11-26 21:07:15.000000000 -0200 
    55@@ -57,11 +57,13 @@ 
    66 /* 
     
    2020Index: ktrack/drivers/mmc/host/s3cmci.c 
    2121=================================================================== 
    22 --- ktrack.orig/drivers/mmc/host/s3cmci.c       2008-11-24 22:26:54.000000000 -0200 
    23 +++ ktrack/drivers/mmc/host/s3cmci.c    2008-11-24 23:40:18.000000000 -0200 
    24 @@ -1518,18 +1518,61 @@ 
     22--- ktrack.orig/drivers/mmc/host/s3cmci.c       2008-11-26 20:04:23.000000000 -0200 
     23+++ ktrack/drivers/mmc/host/s3cmci.c    2008-11-26 21:27:15.000000000 -0200 
     24@@ -1518,18 +1518,71 @@ 
    2525  
    2626 #ifdef CONFIG_PM 
     
    3333+{ 
    3434+       struct s3cmci_host *host = mmc_priv(mmc); 
     35+       unsigned long flags; 
    3536+       unsigned from; 
    3637+       u32 *to = host->saved; 
    3738+ 
    3839+       mmc_flush_scheduled_work(); 
     40+ 
     41+       local_irq_save(flags); 
    3942+       for (from = S3C2410_SDICON; from != S3C2410_SDIIMSK+4; from += 4) 
    4043+               if (from != host->sdidata) 
    4144+                       *to++ = readl(host->base + from); 
    4245+       BUG_ON(to-host->saved != ARRAY_SIZE(host->saved)); 
     46+       local_irq_restore(flags); 
     47+ 
    4348+       return 0; 
    4449+} 
     
    4651+/* 
    4752+ * @@@ This is what s3c24xx_hcd.c does, but I don't trust it one bit ... 
     53+ * - clearn SDICMDCON 
    4854+ */ 
    4955+ 
     
    5157+{ 
    5258+       struct s3cmci_host *host = mmc_priv(mmc); 
     59+       unsigned long flags; 
    5360+       unsigned to; 
    5461+       u32 *from = host->saved; 
    5562+ 
     63+       local_irq_save(flags); 
    5664+       for (to = S3C2410_SDICON; to != S3C2410_SDIIMSK+4; to += 4) 
    5765+               if (to != host->sdidata) 
    58 +                       *from++ = readl(host->base + to); 
     66+                       writel(*from++, host->base + to); 
    5967+       BUG_ON(from-host->saved != ARRAY_SIZE(host->saved)); 
     68+       local_irq_restore(flags); 
     69+ 
    6070+       return 0; 
    6171+} 
     
    8696Index: ktrack/drivers/mmc/host/s3cmci.h 
    8797=================================================================== 
    88 --- ktrack.orig/drivers/mmc/host/s3cmci.h       2008-11-24 22:41:54.000000000 -0200 
    89 +++ ktrack/drivers/mmc/host/s3cmci.h    2008-11-24 23:37:06.000000000 -0200 
     98--- ktrack.orig/drivers/mmc/host/s3cmci.h       2008-11-25 12:02:47.000000000 -0200 
     99+++ ktrack/drivers/mmc/host/s3cmci.h    2008-11-26 20:06:06.000000000 -0200 
    90100@@ -8,6 +8,9 @@ 
    91101  * published by the Free Software Foundation. 
Note: See TracChangeset for help on using the changeset viewer.