/*1* sdhci-dove.c Support for SDHCI on Marvell's Dove SoC2*3* Author: Saeed Bishara <[email protected]>4* Mike Rapoport <[email protected]>5* Based on sdhci-cns3xxx.c6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License version 2 as9* published by the Free Software Foundation.10*11* This program is distributed in the hope that it will be useful,12* but WITHOUT ANY WARRANTY; without even the implied warranty of13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14* GNU General Public License for more details.15*16* You should have received a copy of the GNU General Public License17* along with this program; if not, write to the Free Software18* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.19*/2021#include <linux/io.h>22#include <linux/mmc/host.h>2324#include "sdhci.h"25#include "sdhci-pltfm.h"2627static u16 sdhci_dove_readw(struct sdhci_host *host, int reg)28{29u16 ret;3031switch (reg) {32case SDHCI_HOST_VERSION:33case SDHCI_SLOT_INT_STATUS:34/* those registers don't exist */35return 0;36default:37ret = readw(host->ioaddr + reg);38}39return ret;40}4142static u32 sdhci_dove_readl(struct sdhci_host *host, int reg)43{44u32 ret;4546switch (reg) {47case SDHCI_CAPABILITIES:48ret = readl(host->ioaddr + reg);49/* Mask the support for 3.0V */50ret &= ~SDHCI_CAN_VDD_300;51break;52default:53ret = readl(host->ioaddr + reg);54}55return ret;56}5758static struct sdhci_ops sdhci_dove_ops = {59.read_w = sdhci_dove_readw,60.read_l = sdhci_dove_readl,61};6263struct sdhci_pltfm_data sdhci_dove_pdata = {64.ops = &sdhci_dove_ops,65.quirks = SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER |66SDHCI_QUIRK_NO_BUSY_IRQ |67SDHCI_QUIRK_BROKEN_TIMEOUT_VAL |68SDHCI_QUIRK_FORCE_DMA,69};707172