2 * SDHCI platform data initilisation file
4 * (C) Copyright 2016 Intel Corporation
5 * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; version 2
13 #include <linux/init.h>
14 #include <linux/pci.h>
16 #include <linux/mmc/sdhci-pci-data.h>
18 #include <asm/intel-mid.h>
20 #define INTEL_MRFLD_SD 2
21 #define INTEL_MRFLD_SD_CD_GPIO 77
23 static struct sdhci_pci_data mrfld_sdhci_pci_data = {
24 .rst_n_gpio = -EINVAL,
25 .cd_gpio = INTEL_MRFLD_SD_CD_GPIO,
28 static struct sdhci_pci_data *
29 mrfld_sdhci_pci_get_data(struct pci_dev *pdev, int slotno)
31 unsigned int func = PCI_FUNC(pdev->devfn);
33 if (func == INTEL_MRFLD_SD)
34 return &mrfld_sdhci_pci_data;
39 static int __init mrfld_sd_init(void)
41 if (intel_mid_identify_cpu() != INTEL_MID_CPU_CHIP_TANGIER)
44 sdhci_pci_get_data = mrfld_sdhci_pci_get_data;
47 arch_initcall(mrfld_sd_init);