SPDX: Convert all of our single license tags to Linux Kernel style
[platform/kernel/u-boot.git] / arch / arm / include / asm / arch-tegra / tegra_mmc.h
index 2a3f830..a2b6f63 100644 (file)
@@ -1,30 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * (C) Copyright 2009 SAMSUNG Electronics
  * Minkyu Kang <mk7.kang@samsung.com>
  * Portions Copyright (C) 2011-2012 NVIDIA Corporation
- *
- * 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.
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
  */
 
 #ifndef __TEGRA_MMC_H_
 #define __TEGRA_MMC_H_
 
+#include <common.h>
+#include <clk.h>
+#include <reset.h>
 #include <fdtdec.h>
+#include <asm/gpio.h>
 
-#define MAX_HOSTS              4       /* Max number of 'hosts'/controllers */
+/* for mmc_config definition */
+#include <mmc.h>
 
 #ifndef __ASSEMBLY__
 struct tegra_mmc {
@@ -116,6 +107,8 @@ struct tegra_mmc {
 #define TEGRA_MMC_CLKCON_SDCLK_FREQ_SEL_SHIFT                  8
 #define TEGRA_MMC_CLKCON_SDCLK_FREQ_SEL_MASK                   (0xff << 8)
 
+#define TEGRA_MMC_MISCON_ENABLE_EXT_LOOPBACK                   (1 << 17)
+
 #define TEGRA_MMC_SWRST_SW_RESET_FOR_ALL                       (1 << 0)
 #define TEGRA_MMC_SWRST_SW_RESET_FOR_CMD_LINE                  (1 << 1)
 #define TEGRA_MMC_SWRST_SW_RESET_FOR_DAT_LINE                  (1 << 2)
@@ -140,20 +133,5 @@ struct tegra_mmc {
 #define AUTO_CAL_PD_OFFSET     (0x70 << 8)
 #define AUTO_CAL_PU_OFFSET     (0x62 << 0)
 
-struct mmc_host {
-       struct tegra_mmc *reg;
-       int id;                 /* device id/number, 0-3 */
-       int enabled;            /* 1 to enable, 0 to disable */
-       int width;              /* Bus Width, 1, 4 or 8 */
-       enum periph_id mmc_id;  /* Peripheral ID: PERIPH_ID_... */
-       struct fdt_gpio_state cd_gpio;          /* Change Detect GPIO */
-       struct fdt_gpio_state pwr_gpio;         /* Power GPIO */
-       struct fdt_gpio_state wp_gpio;          /* Write Protect GPIO */
-       unsigned int version;   /* SDHCI spec. version */
-       unsigned int clock;     /* Current clock (MHz) */
-};
-
-void pad_init_mmc(struct mmc_host *host);
-
 #endif /* __ASSEMBLY__ */
 #endif /* __TEGRA_MMC_H_ */