void s5pv210_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 = S5PV210_GPG3(3); gpio <= S5PV210_GPG3(6); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); s3c_gpio_set_drvstrength(gpio, S3C_GPIO_DRVSTR_2X); } case 0: case 1: case 4: /* Set all the necessary GPIO function and pull up/down */ for (gpio = S5PV210_GPG2(0); gpio <= S5PV210_GPG2(6); gpio++) { if (gpio != S5PV210_GPG2(2)) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } s3c_gpio_set_drvstrength(gpio, S3C_GPIO_DRVSTR_2X); } /* Chip detect pin Pull up -> none*/ s3c_gpio_setpull(S5PV210_GPG2(2), S3C_GPIO_PULL_NONE); break; default: printk(KERN_ERR "Wrong SD/MMC bus width : %d\n", width); } }
void s5pv210_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 = S5PV210_GPG3(3); gpio <= S5PV210_GPG3(6); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } gpio = readl(S5PV210_GPG3DRV); writel(gpio | 0x2a80, S5PV210_GPG3DRV); case 0: case 1: case 4: /* Set all the necessary GPIO function and pull up/down */ for (gpio = S5PV210_GPG2(0); gpio <= S5PV210_GPG2(6); gpio++) { if (gpio != S5PV210_GPG2(2)) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } } writel(0x2aaa, S5PV210_GPG2DRV); break; default: printk(KERN_ERR "Wrong SD/MMC bus width : %d\n", width); } }
void s5pv210_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 = S5PV210_GPG3(3); gpio <= S5PV210_GPG3(6); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); s3c_gpio_set_drvstrength(gpio, DRVSTR); } case 0: case 1: case 4: if (machine_is_herring() && herring_is_cdma_wimax_dev()) break; /* Set all the necessary GPIO function and pull up/down */ for (gpio = S5PV210_GPG2(0); gpio <= S5PV210_GPG2(6); gpio++) { if (gpio != S5PV210_GPG2(2)) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } s3c_gpio_set_drvstrength(gpio, DRVSTR); } break; default: printk(KERN_ERR "Wrong SD/MMC bus width : %d\n", width); } }
void s5pv210_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 = S5PV210_GPG3(3); gpio <= S5PV210_GPG3(6); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } gpio = readl(S5PV210_GPG3DRV); writel(gpio | 0x2a80, S5PV210_GPG3DRV); case 0: case 1: case 4: //[NAGSM_Android_HDLNC_SDcard_Seo jaewoong_20101019 : SD card Gpio pull-up setting #if defined(CONFIG_SIDEKICK_VER_B0) for (gpio = S5PV210_GPG2(0); gpio <= S5PV210_GPG2(6); gpio++) { if(gpio != S5PV210_GPG2(2) && gpio != S5PV210_GPG2(0)) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); } else if(gpio == S5PV210_GPG2(0)){ s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } } #else /* Set all the necessary GPIO function and pull up/down */ for (gpio = S5PV210_GPG2(0); gpio <= S5PV210_GPG2(6); gpio++) { if(gpio != S5PV210_GPG2(2)) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } } #endif //]NAGSM_Android_HDLNC_SDcard_Seo jaewoong_20101019 : SD card Gpio pull-up setting writel(0x2aaa, S5PV210_GPG2DRV); /* Chip detect pin Pull up -> none*/ s3c_gpio_setpull(S5PV210_GPG2(2), S3C_GPIO_PULL_NONE); break; default: printk(KERN_ERR "Wrong SD/MMC bus width : %d\n", width); } }
void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) { unsigned int gpio; /* Set all the necessary GPG2[0:1] pins to special-function 2 */ for (gpio = S5PV210_GPG2(0); gpio < S5PV210_GPG2(2); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } switch (width) { case 8: /* Data pin GPG3[3:6] to special-function 3 */ for (gpio = S5PV210_GPG3(3); gpio <= S5PV210_GPG3(6); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } case 4: /* Data pin GPG2[3:6] to special-function 2 */ for (gpio = S5PV210_GPG2(3); gpio <= S5PV210_GPG2(6); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } default: break; } s3c_gpio_setpull(S5PV210_GPG2(2), S3C_GPIO_PULL_UP); s3c_gpio_cfgpin(S5PV210_GPG2(2), S3C_GPIO_SFN(2)); }
void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) { unsigned int gpio; #if defined(CONFIG_MACH_P1_CDMA) unsigned int memory_enable; memory_enable = S5PV210_GPJ1(1); #endif 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 = S5PV210_GPG3(3); gpio <= S5PV210_GPG3(6); gpio++) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); s3c_gpio_set_drvstrength(gpio, S3C_GPIO_DRVSTR_2X); } case 0: case 1: case 4: /* Set all the necessary GPIO function and pull up/down */ for (gpio = S5PV210_GPG2(0); gpio <= S5PV210_GPG2(6); gpio++) { if (gpio != S5PV210_GPG2(2)) { s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); } s3c_gpio_set_drvstrength(gpio, S3C_GPIO_DRVSTR_2X); } break; default: printk(KERN_ERR "Wrong SD/MMC bus width : %d\n", width); } #if defined(CONFIG_MACH_P1_CDMA) s3c_gpio_cfgpin(memory_enable, S3C_GPIO_OUTPUT); s3c_gpio_setpull(memory_enable, S3C_GPIO_PULL_NONE); gpio_set_value(memory_enable, 1); #endif }
void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) { struct s3c_sdhci_platdata *pdata = dev->dev.platform_data; /* Set all the necessary GPG2[0:1] pins to special-function 2 */ s3c_gpio_cfgrange_nopull(S5PV210_GPG2(0), 2, S3C_GPIO_SFN(2)); switch (width) { case 8: /* Data pin GPG3[3:6] to special-function 3 */ s3c_gpio_cfgrange_nopull(S5PV210_GPG3(3), 4, S3C_GPIO_SFN(3)); case 4: /* Data pin GPG2[3:6] to special-function 2 */ s3c_gpio_cfgrange_nopull(S5PV210_GPG2(3), 4, S3C_GPIO_SFN(2)); default: break; } if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) { s3c_gpio_setpull(S5PV210_GPG2(2), S3C_GPIO_PULL_UP); s3c_gpio_cfgpin(S5PV210_GPG2(2), S3C_GPIO_SFN(2)); } }
.ngpio = S5PV210_GPIO_G0_NR, .label = "GPG0", }, }, { .base = S5PV210_GPG1_BASE, .config = &gpio_cfg, .chip = { .base = S5PV210_GPG1(0), .ngpio = S5PV210_GPIO_G1_NR, .label = "GPG1", }, }, { .base = S5PV210_GPG2_BASE, .config = &gpio_cfg, .chip = { .base = S5PV210_GPG2(0), .ngpio = S5PV210_GPIO_G2_NR, .label = "GPG2", }, }, { .base = S5PV210_GPG3_BASE, .config = &gpio_cfg, .chip = { .base = S5PV210_GPG3(0), .ngpio = S5PV210_GPIO_G3_NR, .label = "GPG3", }, }, { .base = S5PV210_GPH0_BASE, .config = &gpio_cfg_noint, .chip = {