Skip to content
Snippets Groups Projects
Select Git revision
  • 4194b3668a93eee18dd1f7eb1309ca7b05003aa7
  • master default protected
  • stable
  • extraversion
  • early-display
  • variant-emmc-nvme-boot
  • 2024-07-19
  • 2024-06-30
  • 2023-10-18
  • 2023-10-10
  • 2023-07-04
  • 2023-01-25
  • v3
  • variant-emmc-nvme-boot
  • 2020-06-01
15 results

common.h

Blame
  • omap_hsmmc.c 20.78 KiB
    /*
     * (C) Copyright 2008
     * Texas Instruments, <www.ti.com>
     * Sukumar Ghorai <s-ghorai@ti.com>
     *
     * See file CREDITS for list of people who contributed to this
     * project.
     *
     * 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's version 2 of
     * the License.
     *
     * 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
     */
    
    #include <config.h>
    #include <common.h>
    #include <malloc.h>
    #include <mmc.h>
    #include <part.h>
    #include <i2c.h>
    #include <twl4030.h>
    #include <twl6030.h>
    #include <palmas.h>
    #include <asm/io.h>
    #include <asm/arch/mmc_host_def.h>
    #if !defined(CONFIG_SOC_KEYSTONE)
    #include <asm/gpio.h>
    #include <asm/arch/sys_proto.h>
    #endif
    #ifdef CONFIG_MMC_OMAP36XX_PINS
    #include <asm/arch/mux.h>
    #endif
    #include <dm.h>
    
    DECLARE_GLOBAL_DATA_PTR;
    
    /* simplify defines to OMAP_HSMMC_USE_GPIO */
    #if (defined(CONFIG_OMAP_GPIO) && !defined(CONFIG_SPL_BUILD)) || \
    	(defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_GPIO_SUPPORT))
    #define OMAP_HSMMC_USE_GPIO
    #else
    #undef OMAP_HSMMC_USE_GPIO
    #endif
    
    /* common definitions for all OMAPs */
    #define SYSCTL_SRC	(1 << 25)
    #define SYSCTL_SRD	(1 << 26)
    
    struct omap_hsmmc_data {
    	struct hsmmc *base_addr;
    	struct mmc_config cfg;
    #ifdef OMAP_HSMMC_USE_GPIO
    #ifdef CONFIG_DM_MMC
    	struct gpio_desc cd_gpio;	/* Change Detect GPIO */
    	struct gpio_desc wp_gpio;	/* Write Protect GPIO */
    	bool cd_inverted;
    #else
    	int cd_gpio;
    	int wp_gpio;
    #endif