/* * Driver for sunxi SD/MMC host controllers * (C) Copyright 2007-2011 Reuuimlla Technology Co., Ltd. * (C) Copyright 2007-2011 Aaron Maoye <leafy.myeh@reuuimllatech.com> * (C) Copyright 2013-2014 O2S GmbH <www.o2s.ch> * (C) Copyright 2013-2014 David Lanzendörfer <david.lanzendoerfer@o2s.ch> * (C) Copyright 2013-2014 Hans de Goede <hdegoede@redhat.com> * (C) Copyright 2017 Sootech SA * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. */#include<linux/clk.h>#include<linux/clk/sunxi-ng.h>#include<linux/delay.h>#include<linux/device.h>#include<linux/dma-mapping.h>#include<linux/err.h>#include<linux/gpio.h>#include<linux/interrupt.h>#include<linux/io.h>#include<linux/kernel.h>#include<linux/mmc/card.h>#include<linux/mmc/core.h>#include<linux/mmc/host.h>#include<linux/mmc/mmc.h>#include<linux/mmc/sd.h>#include<linux/mmc/sdio.h>#include<linux/mmc/slot-gpio.h>#include<linux/module.h>#include<linux/of_address.h>#include<linux/of_gpio.h>#include<linux/of_platform.h>#include<linux/platform_device.h>#include<linux/pm_runtime.h>#include<linux/regulator/consumer.h>#include<linux/reset.h>#include<linux/scatterlist.h>#include<linux/slab.h>#include<linux/spinlock.h>/* register offset definitions */#define SDXC_REG_GCTRL (0x00) /* SMC Global Control Register */#define SDXC_REG_CLKCR (0x0