~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/x86/platform/intel-mid/device_libs/platform_mrfld_sd.c

Version: ~ [ linux-4.15-rc8 ] ~ [ linux-4.14.13 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.76 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.111 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.48 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.91 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.53 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.98 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.27.62 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * SDHCI platform data initilisation file
  3  *
  4  * (C) Copyright 2016 Intel Corporation
  5  * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  6  *
  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
 10  * of the License.
 11  */
 12 
 13 #include <linux/init.h>
 14 #include <linux/pci.h>
 15 
 16 #include <linux/mmc/sdhci-pci-data.h>
 17 
 18 #include <asm/intel-mid.h>
 19 
 20 #define INTEL_MRFLD_SD                  2
 21 #define INTEL_MRFLD_SD_CD_GPIO          77
 22 
 23 static struct sdhci_pci_data mrfld_sdhci_pci_data = {
 24         .rst_n_gpio     = -EINVAL,
 25         .cd_gpio        = INTEL_MRFLD_SD_CD_GPIO,
 26 };
 27 
 28 static struct sdhci_pci_data *
 29 mrfld_sdhci_pci_get_data(struct pci_dev *pdev, int slotno)
 30 {
 31         unsigned int func = PCI_FUNC(pdev->devfn);
 32 
 33         if (func == INTEL_MRFLD_SD)
 34                 return &mrfld_sdhci_pci_data;
 35 
 36         return NULL;
 37 }
 38 
 39 static int __init mrfld_sd_init(void)
 40 {
 41         if (intel_mid_identify_cpu() != INTEL_MID_CPU_CHIP_TANGIER)
 42                 return -ENODEV;
 43 
 44         sdhci_pci_get_data = mrfld_sdhci_pci_get_data;
 45         return 0;
 46 }
 47 arch_initcall(mrfld_sd_init);
 48 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp