void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) { unsigned int gpio; /* Set all the necessary GPK2[0:1] pins to special-function 2 */ for (gpio = S5PV310_GPK2(0); gpio < S5PV310_GPK2(2); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } switch (width) { case 8: /* Data pin GPK3[3:6] to special-function 3 */ for (gpio = S5PV310_GPK3(3); gpio <= S5PV310_GPK3(6); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } __raw_writel(0x1555, GPK3DRV); case 4: /* Data pin GPK2[3:6] to special-function 2 */ for (gpio = S5PV310_GPK2(3); gpio <= S5PV310_GPK2(6); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } __raw_writel(0x1555, GPK2DRV); break; case 1: /* Data pin GPK2[3] to special-function 2 */ for (gpio = S5PV310_GPK2(3); gpio < S5PV310_GPK2(4); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } __raw_writel(0x55, GPK2DRV); default: break; } }
#ifdef CONFIG_S5PV310_SDHCI_CH0_8BIT .max_width = 8, .host_caps = MMC_CAP_8_BIT_DATA, #endif }; static struct s3c_sdhci_platdata smdkv310_hsmmc1_pdata __initdata = { .cd_type = S3C_SDHCI_CD_GPIO, .ext_cd_gpio = S5PV310_GPK0(2), .ext_cd_gpio_invert = 1, .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, }; static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = { .cd_type = S3C_SDHCI_CD_GPIO, .ext_cd_gpio = S5PV310_GPK2(2), .ext_cd_gpio_invert = 1, .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, #ifdef CONFIG_S5PV310_SDHCI_CH2_8BIT .max_width = 8, .host_caps = MMC_CAP_8_BIT_DATA, #endif }; static struct s3c_sdhci_platdata smdkv310_hsmmc3_pdata __initdata = { .cd_type = S3C_SDHCI_CD_GPIO, .ext_cd_gpio = S5PV310_GPK2(2), .ext_cd_gpio_invert = 1, .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, };
}, }, { .chip = { .base = S5PV310_GPK0(0), .ngpio = S5PV310_GPIO_K0_NR, .label = "GPK0", }, }, { .chip = { .base = S5PV310_GPK1(0), .ngpio = S5PV310_GPIO_K1_NR, .label = "GPK1", }, }, { .chip = { .base = S5PV310_GPK2(0), .ngpio = S5PV310_GPIO_K2_NR, .label = "GPK2", }, }, { .chip = { .base = S5PV310_GPK3(0), .ngpio = S5PV310_GPIO_K3_NR, .label = "GPK3", }, }, { .chip = { .base = S5PV310_GPL0(0), .ngpio = S5PV310_GPIO_L0_NR, .label = "GPL0", },