unsigned int universal_sdhci2_detect_ext_cd(void) { unsigned int card_status = 0; #ifdef CONFIG_MMC_DEBUG printk(KERN_DEBUG "Universal :SD Detect function\n"); printk(KERN_DEBUG "eint conf %x eint filter conf %x", readl(S5P_EINT_CON(3)), readl(S5P_EINT_FLTCON(3, 1))); printk(KERN_DEBUG "eint pend %x eint mask %x", readl(S5P_EINT_PEND(3)), readl(S5P_EINT_MASK(3))); #endif card_status = gpio_get_value(S5PV210_GPH3(4)); printk(KERN_DEBUG "Universal : Card status %d\n", card_status ? 0 : 1); return card_status ? 0 : 1; }
unsigned int universal_sdhci2_detect_ext_cd(void) { unsigned int card_status = 0; #ifdef CONFIG_MMC_DEBUG printk(KERN_DEBUG "Universal :SD Detect function\n"); printk(KERN_DEBUG "eint conf %x eint filter conf %x", readl(S5P_EINT_CON(3)), readl(S5P_EINT_FLTCON(3, 1))); printk(KERN_DEBUG "eint pend %x eint mask %x", readl(S5P_EINT_PEND(3)), readl(S5P_EINT_MASK(3))); #endif card_status = gpio_get_value(GPIO_T_FLASH_DETECT) ? 0 : 1; /* active low */ printk(KERN_DEBUG " Universal: Card status %s\n", card_status ? "inserted" : "removed"); return card_status; }
break; default: return -ENOENT; } return 0; } static struct sleep_save eint_save[] = { #if TO_DO SAVE_ITEM(S5P_EINT_CON(0)), SAVE_ITEM(S5P_EINT_CON(1)), SAVE_ITEM(S5P_EINT_CON(2)), SAVE_ITEM(S5P_EINT_CON(3)), SAVE_ITEM(S5P_EINT_FLTCON(0)), SAVE_ITEM(S5P_EINT_FLTCON(1)), SAVE_ITEM(S5P_EINT_FLTCON(2)), SAVE_ITEM(S5P_EINT_FLTCON(3)), SAVE_ITEM(S5P_EINT_FLTCON(4)), SAVE_ITEM(S5P_EINT_FLTCON(5)), SAVE_ITEM(S5P_EINT_FLTCON(6)), SAVE_ITEM(S5P_EINT_FLTCON(7)), SAVE_ITEM(S5P_EINT_MASK(0)), SAVE_ITEM(S5P_EINT_MASK(1)), SAVE_ITEM(S5P_EINT_MASK(2)), SAVE_ITEM(S5P_EINT_MASK(3)), #endif };
s3c_irqwake_intmask &= ~irqbit; return 0; } static struct sleep_save eint_save[] = { SAVE_ITEM(S5P_EINT_CON(0)), SAVE_ITEM(S5P_EINT_CON(1)), SAVE_ITEM(S5P_EINT_CON(2)), SAVE_ITEM(S5P_EINT_CON(3)), SAVE_ITEM(S5P_EINT_MASK(0)), SAVE_ITEM(S5P_EINT_MASK(1)), SAVE_ITEM(S5P_EINT_MASK(2)), SAVE_ITEM(S5P_EINT_MASK(3)), SAVE_ITEM(S5P_EINT_FLTCON(0,0)), SAVE_ITEM(S5P_EINT_FLTCON(0,1)), SAVE_ITEM(S5P_EINT_FLTCON(1,0)), SAVE_ITEM(S5P_EINT_FLTCON(1,1)), SAVE_ITEM(S5P_EINT_FLTCON(2,0)), SAVE_ITEM(S5P_EINT_FLTCON(2,1)), SAVE_ITEM(S5P_EINT_FLTCON(3,0)), SAVE_ITEM(S5P_EINT_FLTCON(3,1)), }; int s3c24xx_irq_suspend(void) { s3c_pm_do_save(eint_save, ARRAY_SIZE(eint_save)); return 0; }