1 /* linux/arch/arm/plat-s5pc1xx/setup-sdhci-gpio.c
3 * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
6 * S5PV310 - Helper functions for setting up SDHCI device(s) GPIO (HSMMC)
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #include <linux/kernel.h>
14 #include <linux/types.h>
15 #include <linux/interrupt.h>
16 #include <linux/platform_device.h>
18 #include <linux/mmc/host.h>
19 #include <linux/mmc/card.h>
21 #include <mach/gpio.h>
22 #include <plat/gpio-cfg.h>
24 void s5pv310_setup_mshci_cfg_gpio(struct platform_device *dev, int width)
28 /* Set all the necessary GPG0/GPG1 pins to special-function 2 */
29 for (gpio = S5PV310_GPK0(0); gpio < S5PV310_GPK0(3); gpio++) {
30 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3));
31 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
32 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
36 for (gpio = S5PV310_GPK1(3); gpio <= S5PV310_GPK1(6); gpio++) {
37 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(4));
38 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
39 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
42 for (gpio = S5PV310_GPK0(3); gpio <= S5PV310_GPK0(6); gpio++) {
43 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3));
44 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
45 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);