~ubuntu-branches/ubuntu/lucid/linux-rt/lucid

« back to all changes in this revision

Viewing changes to arch/arm/mach-s3c6410/setup-sdhci.c

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2009-08-05 23:00:52 UTC
  • Revision ID: james.westby@ubuntu.com-20090805230052-7xedvqcyk9dnnxb2
Tags: 2.6.31-1.1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include <linux/mmc/card.h>
22
22
#include <linux/mmc/host.h>
23
23
 
24
 
#include <mach/gpio.h>
25
 
#include <plat/gpio-cfg.h>
26
24
#include <plat/regs-sdhci.h>
27
25
#include <plat/sdhci.h>
28
26
 
35
33
        /* [3] = "48m", - note not succesfully used yet */
36
34
};
37
35
 
38
 
void s3c6410_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
39
 
{
40
 
        unsigned int gpio;
41
 
        unsigned int end;
42
 
 
43
 
        end = S3C64XX_GPG(2 + width);
44
 
 
45
 
        /* Set all the necessary GPG pins to special-function 0 */
46
 
        for (gpio = S3C64XX_GPG(0); gpio < end; gpio++) {
47
 
                s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
48
 
                s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
49
 
        }
50
 
 
51
 
        s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP);
52
 
        s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(2));
53
 
}
54
36
 
55
37
void s3c6410_setup_sdhci0_cfg_card(struct platform_device *dev,
56
38
                                    void __iomem *r,
84
66
        writel(ctrl3, r + S3C_SDHCI_CONTROL3);
85
67
}
86
68
 
87
 
void s3c6410_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width)
88
 
{
89
 
        unsigned int gpio;
90
 
        unsigned int end;
91
 
 
92
 
        end = S3C64XX_GPH(2 + width);
93
 
 
94
 
        /* Set all the necessary GPG pins to special-function 0 */
95
 
        for (gpio = S3C64XX_GPH(0); gpio < end; gpio++) {
96
 
                s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
97
 
                s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
98
 
        }
99
 
 
100
 
        s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP);
101
 
        s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(3));
102
 
}