void s3c6410_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) { unsigned int gpio; switch (width) { /* Channel 2 supports 4 and 8-bit bus width */ case 8: /* Set all the necessary GPIO function and pull up/down */ for (gpio = S5PC11X_GPG3(3); gpio <= S5PC11X_GPG3(6); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); } writel(0x3fc0, S5PC11X_GPG3DRV); case 0: case 1: case 4: /* Set all the necessary GPIO function and pull up/down */ for (gpio = S5PC11X_GPG2(0); gpio <= S5PC11X_GPG2(6); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); } writel(0x3fff, S5PC11X_GPG2DRV); /* Chip detect pin Pull up*/ s3c_gpio_setpull(S5PC11X_GPG2(2), S3C_GPIO_PULL_UP); break; default: printk(KERN_ERR "Wrong SD/MMC bus width : %d\n", width); } }
.ngpio = S5PC11X_GPIO_G1_NR, .label = "GPG1", }, }, { .base = S5PC11X_GPG2_BASE, .config = &gpio_cfg, .chip = { .base = S5PC11X_GPG2(0), .ngpio = S5PC11X_GPIO_G2_NR, .label = "GPG2", }, }, { .base = S5PC11X_GPG3_BASE, .config = &gpio_cfg, .chip = { .base = S5PC11X_GPG3(0), .ngpio = S5PC11X_GPIO_G3_NR, .label = "GPG3", }, }, { .base = S5PC11X_GPH0_BASE, .config = &gpio_cfg_noint, .chip = { .base = S5PC11X_GPH0(0), .ngpio = S5PC11X_GPIO_H0_NR, .label = "GPH0", }, }, { .base = S5PC11X_GPH1_BASE, .config = &gpio_cfg_noint, .chip = {