changed Makefile and profiles, added patches for kernel 2.6.24
[openwrt.git] / target / linux / s3c24xx / patches-2.6.26 / 0228-fix-allow-full-sd-voltage-range-selection.patch.patch
1 From 0dd4b9a534db9bef8f2901c00ee58b00e14a49df Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Wed, 30 Jul 2008 14:36:42 +0100
4 Subject: [PATCH] fix-allow-full-sd-voltage-range-selection.patch
5
6 Until now we just drove the SD Card at 3.3V all the time.  But in
7 fact we can do better, and use a voltage negotiated with the
8 SD Card itself.
9
10 With the shipping 512MB Sandisk SD Card, 2.7V is negotiated which
11 gives 1.7dBm reduction in power on all the SD Card lines and should
12 further reduce GPS perturbation during SD Card usage.
13
14 Signed-off-by: Andy Green <andy@openmoko.com>
15 ---
16  arch/arm/mach-s3c2440/mach-gta02.c |   10 ++++------
17  drivers/mfd/glamo/glamo-core.c     |   13 ++++++++++++-
18  2 files changed, 16 insertions(+), 7 deletions(-)
19
20 diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
21 index 1fcd3fd..382837d 100644
22 --- a/arch/arm/mach-s3c2440/mach-gta02.c
23 +++ b/arch/arm/mach-s3c2440/mach-gta02.c
24 @@ -604,7 +604,7 @@ static struct pcf50633_platform_data gta02_pcf_pdata = {
25                 [PCF50633_REGULATOR_HCLDO] = {
26                         .name           = "sd_3v3",
27                         .voltage        = {
28 -                               .init   = 3300,
29 +                               .init   = 2000,
30                                 .max    = 3300,
31                         },
32                 },
33 @@ -1378,11 +1378,9 @@ gta02_glamo_mmc_set_power(unsigned char power_mode, unsigned short vdd)
34                                 return;
35                         }
36                         /* select and set the voltage */
37 -                       if (vdd > 7) {
38 -                               mv += 300 + 100 * (vdd - 8);
39 -                               if (mv > 3500)
40 -                                       mv = 3500;
41 -                       }
42 +                       if (vdd > 7)
43 +                               mv += 350 + 100 * (vdd - 8);
44 +                       printk(KERN_INFO "SD power -> %dmV\n", mv);
45                         pcf50633_voltage_set(pcf50633_global,
46                                              PCF50633_REGULATOR_HCLDO, mv);
47                         pcf50633_onoff_set(pcf50633_global,
48 diff --git a/drivers/mfd/glamo/glamo-core.c b/drivers/mfd/glamo/glamo-core.c
49 index ee33901..cb9b056 100644
50 --- a/drivers/mfd/glamo/glamo-core.c
51 +++ b/drivers/mfd/glamo/glamo-core.c
52 @@ -270,7 +270,18 @@ static struct platform_device glamo_mmc_dev = {
53  struct glamo_mci_pdata glamo_mci_def_pdata = {
54         .gpio_detect            = 0,
55         .glamo_set_mci_power    = NULL, /* filled in from MFD platform data */
56 -       .ocr_avail              = MMC_VDD_32_33,
57 +       .ocr_avail      = MMC_VDD_20_21 |
58 +                         MMC_VDD_21_22 |
59 +                         MMC_VDD_22_23 |
60 +                         MMC_VDD_23_24 |
61 +                         MMC_VDD_24_25 |
62 +                         MMC_VDD_25_26 |
63 +                         MMC_VDD_26_27 |
64 +                         MMC_VDD_27_28 |
65 +                         MMC_VDD_28_29 |
66 +                         MMC_VDD_29_30 |
67 +                         MMC_VDD_30_31 |
68 +                         MMC_VDD_32_33,
69         .glamo_irq_is_wired     = NULL, /* filled in from MFD platform data */
70         .mci_suspending = NULL, /* filled in from MFD platform data */
71         .mci_all_dependencies_resumed = NULL, /* filled in from MFD platform data */
72 -- 
73 1.5.6.3
74