/* Realtek USB SD/MMC Card Interface driver * * Copyright(c) 2009-2013 Realtek Semiconductor Corp. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, see <http://www.gnu.org/licenses/>. * * Author: * Roger Tseng <rogerable@realtek.com> */#include<linux/module.h>#include<linux/slab.h>#include<linux/delay.h>#include<linux/platform_device.h>#include<linux/usb.h>#include<linux/mmc/host.h>#include<linux/mmc/mmc.h>#include<linux/mmc/sd.h>#include<linux/mmc/sdio.h>#include<linux/mmc/card.h>#include<linux/scatterlist.h>#include<linux/pm_runtime.h>#include<linux/rtsx_usb.h>#include<asm/unaligned.h>#if defined(CONFIG_LEDS_CLASS) || (defined(CONFIG_LEDS_CLASS_MODULE) && \ defined(CONFIG_MMC_REALTEK_USB_MODULE))#include<linux/leds.h>#include<linux/workqueue.h>#define RTSX_USB_USE_LEDS_CLASS#endifstructrtsx_usb_sdmmc{structplatform_device*pdev;structrtsx_ucr*ucr;structmmc_host*mmc;structmmc_request*mrq;structmutexhost_mutex;u8ssc_depth;unsignedintclock;boolvpclk;booldouble_clk;boolhost_removal;boolcard_exist;boolinitial_mode;boolddr_mode;unsignedcharpower_mode;#ifdef RTSX_USB_USE_LEDS_CLASS