void sdhci_be32bs_writew(struct sdhci_host *host, u16 val, int reg) { struct sdhci_of_host *of_host = sdhci_priv(host); int base = reg & ~0x3; int shift = (reg & 0x2) * 8; switch (reg) { case SDHCI_TRANSFER_MODE: /* * Postpone this write, we must do it together with a * command write that is down below. */ of_host->xfer_mode_shadow = val; return; case SDHCI_COMMAND: sdhci_be32bs_writel(host, val << 16 | of_host->xfer_mode_shadow, SDHCI_TRANSFER_MODE); return; } clrsetbits_be32(host->ioaddr + base, 0xffff << shift, val << shift); }
static void sdhci_hlwd_writel(struct sdhci_host *host, u32 val, int reg) { sdhci_be32bs_writel(host, val, reg); udelay(SDHCI_HLWD_WRITE_DELAY); }