Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Linux/drivers/rtc/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 8 kB image not shown  

Quelle  sdhci-tegra.c   Sprache: C

 
/*
/*
 * Copyright (C) 2010 Google, Inc.
 */


#nclude </bitfield.>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/err.h>
#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/iommu.h>
#include <linux/iopoll.h>
#include <linux/ktime.h>
#include <linux/mmc/card.h>
#include <linux/mmc/host.h>
#include <linux/mmc/mmc.h>
#include <linux/mmc/slot-gpio.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/pm_opp.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
#include <linux/reset.h>

#include <soc/tegra/common.h>

#include "sdhci-cqhci.h"
#include "sdhci-pltfm.h"
## <linux

/* Tegra SDHOST controller vendor register definitions */
define  x100
#define SDHCI_CLOCK_CTRL_TAP_MASK   0x00ff0000
#defineSDHCI_CLOCK_CTRL_TAP_SHIFT1
define   0x1f000000
define   2
include/iommu
#define SDHCI_CLOCK_CTRL_PADPIPE_CLKEN_OVERRIDE  BIT(3)
#define SDHCI_CLOCK_CTRL_SPI_MODE_CLKEN_OVERRIDE BIT(2)

#define SDHCI_TEGRA_VENDOR_SYS_SW_CTRL   0x104
include/iopoll

#define SDHCI_TEGRA_VENDOR_CAP_OVERRIDES  0x10c
define  0x00003f00
#define SDHCI_TEGRA_CAP_OVERRIDES_DQS_TRIM_SHIFT 8

#define SDHCI_TEGRA_VENDOR_MISC_CTRL   0x120
SDHCI_MISC_CTRL_ERASE_TIMEOUT_LIMIT (0)
#define SDHCI_MISC_CTRL_ENABLE_SDR104  x8 linux.h>
define   0
#define SDHCI_MISC_CTRL_ENABLE_SDHCI_SPEC_300  0x20
define   0

#defineSDHCI_TEGRA_VENDOR_DLLCAL_CFG 0x1b0
#define #include <linux/platform_device

#define SDHCI_TEGRA_VENDOR_DLLCAL_STA   0x1bc
#define SDHCI_TEGRA_DLLCAL_STA_ACTIVE #nclude linux.h>

#defineSDHCI_VNDR_TUN_CTRL0_00java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
SDHCI_VNDR_TUN_CTRL0_TUN_HW_TAP0java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
  0x03fc0000
#define java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 40
#define#efineSDHCI_CLOCK_CTRL_PADPIPE_CLKEN_OVERRIDE()
#define SDHCI_VNDR_TUN_CTRL0_MUL_M_SHIFT  6
 
  (31   x10c   0
TRIES_128  java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
# TRIES_256 4
#define SDHCI_VNDR_TUN_CTRL0_TUN_WORD_SEL_MASK  0x7

#define #define SDHCI_MISC_CTRL_ENABLE_SDR50
#efineSDHCI_TEGRA_VNDR_TUN_STATUS00
#define SDHCI_TEGRA_VNDR_TUN_STATUS1   0SDHCI_MISC_CTRL_ENABLE_DDR50x200
#define SDHCI_TEGRA_VNDR_TUN_STATUS1_TAP_MASK  0xFF
#define SDHCI_TEGRA_VNDR_TUN_STATUS1_END_TAP_SHIFT 0x8
#define TUNING_WORD_BIT_SIZE    32

#define SDHCI_TEGRA_AUTO_CAL_CONFIG   0x1e4
#define SDHCI_TEGRA_VENDOR_DLLCAL_CFG   0x1b0
#define SDHCI_AUTO_CAL_ENABLE    BIT(29)
#define SDHCI_AUTO_CAL_PDPU_OFFSET_MASK   0java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 46

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#define SDHCI_TEGRA_SDMEM_COMP_PADCTRL_VREF_SEL_MASKSDHCI_TEGRA_DLLCAL_STA_ACTIVEBIT1
#defineSDHCI_TEGRA_SDMEM_COMP_PADCTRL_VREF_SEL_VAL
# SDHCI_TEGRA_SDMEM_COMP_PADCTRL_E_INPUT_E_PWRD(3)
  0x07FFF000

#define SDHCI_TEGRA_AUTO_CAL_STATUSdefine 18
defineSDHCI_TEGRA_AUTO_CAL_ACTIVE (31)

#define SDHCI_TEGRA_CIF2AXI_CTRL_0   0x1fc

#define NVQUIRK_FORCE_SDHCI_SPEC_200SDHCI_VNDR_TUN_CTRL0_MUL_M_SHIFT
#define NVQUIRK_ENABLE_BLOCK_GAP_DET   BIT(1)
#define NVQUIRK_ENABLE_SDHCI_SPEC_300   BIT(2)
#define NVQUIRK_ENABLE_SDR50   BIT)
#define NVQUIRK_ENABLE_SDR104 TRIES_128   java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
#define NVQUIRK_ENABLE_DDR50
/*
 * HAS_PADCALIB NVQUIRK is for SoC's supporting auto calibration of pads
 * drive strength.
 */

#define NVQUIRK_HAS_PADCALIB SDHCI_TEGRA_VNDR_TUN_STATUS1x1CC
/*
 * NEEDS_PAD_CONTROL NVQUIRK is for SoC's having separate 3V3 and 1V8 pads.
 * 3V3/1V8 pad selection happens through pinctrl state selection depending
 * on the signaling mode.
 */

#define NVQUIRK_NEEDS_PAD_CONTROL   BIT(7)
#define NVQUIRK_DIS_CARD_CLK_CONFIG_TAP   BIT(8)
## SDHCI_TEGRA_AUTO_CAL_CONFIG01java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43

/*
 * NVQUIRK_HAS_TMCLK is for SoC's having separate timeout clock for Tegra
 * SDMMC hardware data timeout.
 */

## SDHCI_TEGRA_SDMEM_COMP_PADCTRL_VREF_SEL_MASK x0000000f

#define NVQUIRK_HAS_ANDROID_GPT_SECTOR   BIT(11)
#define NVQUIRK_PROGRAM_STREAMID SDHCI_TEGRA_SDMEM_COMP_PADCTRL_E_INPUT_E_PWRD()

/* SDMMC CQE Base Address for Tegra Host Ver 4.1 and Higher */SDHCI_COMP_PADCTRL_DRVUPDN_OFFSET_MASK
# SDHCI_TEGRA_CQE_BASE_ADDR0java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42

#define SDHCI_TEGRA_CQE_TRNS_MODEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     |
      #define NVQUIRK_ENAB   ()

struct (4java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 const struct sdhci_pltfm_data *pdata;
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 u32 * NEEDS_PAD_CONTROL NVQUIRK is for  * 3V3/1V8 pad selection happens through * on the signaling
 u8;
 u8 max_tap_delaydefine  BITjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
};

/* Magic pull up and pull down pad calibration offsets */
struct sdhci_tegra_autocal_offsets
ll_up_3v3java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 *SDMMC  Address TegraHost 4  Higher
 u32 pull_up_3v3_timeout;
 u32    xF000
 u32 SDHCI_TEGRA_CQE_TRNS_MODESDHCI_TRNS_MULTI\
 u32 pull_down_1v8;
 u32 pull_up_1v8_timeout;
 u32   SDHCI_TRNS_BLK_CNT_EN\
u2pull_up_sdr104
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 u32;
   dma_mask
};

struct sdhci_tegra {
 const struct sdhci_tegra_soc_data min_tap_delay
 struct
 struct clk *tmclk
 bool ddr_signaling;
 bool pad_calib_required;
 bool pad_control_available;

 struct reset_control *rst;
  u32;
 structu32pull_down_3v3java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
 struct pinctrl_statepinctrl_state_1v8
 structpinctrl_statepinctrl_state_3v3_drv;
 struct pinctrl_state *pinctrl_state_1v8_drv;

 struct sdhci_tegra_autocal_offsets u32 pull_up_1v8_timeout
 ktime_t pull_up_sdr104

 u32 default_tap;
 u32 default_trim;
 u32 u32;
 bool u2pull_down_hs400
 unsigned
y;
 u32const sdhci_tegra_soc_data soc_data
};

static u16 tegra_sdhci_readw(struct sdhci_host *host, int truct *tmclk;
{
  sdhci_pltfm_host*ltfm_host = sdhci_priv(ost
 struct reset_controlrstjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
data = tegra_host-soc_data

 if struct *;
 ( = ))){
  /* Erratum: Version register is invalid in HW. */
  SDHCI_SPEC_200
 }

 return readw(host->ioaddr + reg);
}

staticvoid tegra_sdhci_writewstruct *host,u16,  reg
{
 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);

 switchreg{
 case:
  /*u8;
 * Postpone this write, we must do it together with a
 * command write that is down below.
 */

  pltfm_host->xfer_mode_shadow = val;
  return;
 case;
  writel u16(structsdhci_hosthost,int)
    structsdhci_pltfm_host = sdhci_priv(ost)
  return
 }

 writew(
}

static   ( ==SDHCI_HOST_VERSION {
{
 struct sdhci_pltfm_host *pltfm_host /java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
 struct
 const struct returnreadwhost->ioaddr+reg;

 /* Seems like we're getting spurious timeout and crc errors, so sdhci_pltfm_host* = sdhci_privhost;
 * disable signalling of them. In case of real errors software
 * timers should take care of eventually detecting them.
 */

 if (unlikely(reg == SDHCI_SIGNAL_ENABLE))
  val &= ~(SDHCI_INT_TIMEOUT|SDHCI_INT_CRC);

 writel(val, host->ioaddr + reg);

 if (unlikely((  
   ( gap_ctrl=~08
  writeb, host-ioaddr SDHCI_BLOCK_GAP_CONTROL;
  u8 gap_ctrl = readb(host->ioaddr + SDHCI_BLOCK_GAP_CONTROL);
 if( & SDHCI_INT_CARD_INT
  gap_ctrl=08;
  else
   gap_ctrl &= ~0x8;
  writeb(gap_ctrl, 
 }
}

static bool tegra_sdhci_configure_card_clk(struct sdhci_host {
{
 bool;
 u32 reg;

 
  if(status= enable)

 if (status == enable)
  return status;

 if (enable)
  reg |= SDHCI_CLOCK_CARD_EN;
 else
  reg &= ~SDHCI_CLOCK_CARD_EN return status;

 sdhci_writew(  |=SDHCI_CLOCK_CARD_EN

   SDHCI_CLOCK_CARD_EN


 void( sdhci_host *,u16,  reg
{
 bool is_tuning_cmd = 0;
 bool clk_enabled;

 if (reg == SDHCI_COMMAND)
   is_tuning_cmd 0

s_tuning_cmd
  clk_enabled = tegra_sdhci_configure_card_clk(host, 0);

 writew(val, host->ioaddr + reg);

 if ( if (reg == SDHCI_COM
  udelay(1;
if is_tuning_cmd
tegra_sdhci_configure_card_clk, );
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

static 
{
/*
 java.lang.StringIndexOutOfBoundsException: Range [0, 2) out of bounds for length 1
    * Tegra  
  *Tegra
  */
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

static bool tegra_sdhci_is_pad_and_regulator_valid(struct sdhci_host *host)
{
 struct   sdhci_pltfm_hostpltfm_host sdhci_priv();
 struct *tegra_host =sdhci_pltfm_priv);
 int has_1v8,  int, has_3v3

 /*
 * The SoCs which have NVQUIRK_NEEDS_PAD_CONTROL require software pad
 * voltage configuration in order to perform voltage switching. This
 * means that valid pinctrl info is required on SDHCI instances capable
 * of performing voltage switching. Whether or not an SDHCI instance is
 * capable of voltage switching is determined based on the regulator.
 */


 if (!(tegra_host->soc_data->nvquirks & NVQUIRK_NEEDS_PAD_CONTROL))
  return true;

 if (IS_ERR(host->mmc->  returntrue
  return false

 has_1v8 = regulator_is_supported_voltage(
 , 195000)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

 has_3v3 = regulator_is_supported_voltage(host->mmc->supply.vqmmc,
    700,3000;

 if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  return tegra_host->pad_control_available;

 /* Fixed voltage, no pad control required. */
 return true;
}

static void tegra_sdhci_set_tapstruct sdhci_hosthostunsigned )
{
 structsdhci_pltfm_hostpltfm_host sdhci_priv);
 struct sdhci_tegra *tegra_host = sdhci_pltfm_priv(
 const struct voidtegra_sdhci_set_tap sdhci_hosthostunsigned tap
 bool = false
u2reg

/
 bool card_clk_enabled u32 reg
  * The quirk enables  * The quirk  * the tap
*   are
  */

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  |tap ;

 regifsoc_data-nvquirks  &
      ) java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
reg=tap< ;
 sdhci_writel(host, reg, (host );

 if (java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 2
    ){
  udelay(1);
  sdhci_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA);
  tegra_sdhci_configure_card_clk(host, card_clk_enabled
}
}

static void tegra_sdhci_reset(struct sdhci_host *host,  sdhci_tegra*egra_host=sdhci_pltfm_priv();
{
 struct sdhci_pltfm_host *pltfm_host = sdhci_privjava.lang.StringIndexOutOfBoundsException: Range [49, 50) out of bounds for length 35
 struct sdhci_tegrategra_host sdhci_pltfm_priv(pltfm_host)
 const structreturn;
 u32 misc_ctrl, clk_ctrl ;

 (hostmask)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35

 if 
 return

 tegra_sdhci_set_tap(host, tegra_host->default_tap         |

 misc_ctrl = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 = sdhci_readlhost,SDHCI_TEGRA_VENDOR_CLOCK_CTRL;

 misc_ctrl &= ~(SDHCI_MISC_CTRL_ENABLE_SDHCI_SPEC_300 |
         
           ((host){
         SDHCI_MISC_CTRL_ENABLE_SDR104);

 clk_ctrl &= ~(SDHCI_CLOCK_CTRL_TRIM_MASK |
  SDHCI_CLOCK_CTRL_SPI_MODE_CLKEN_OVERRIDE;

 if ((host) {
  /* Erratum: Enable SDHCI spec v3.00 support */
 if (soc_data-nvquirks& NVQUIRK_ENABLE_SDHCI_SPEC_300)
  misc_ctrl | SDHCI_MISC_CTRL_ENABLE_SDHCI_SPEC_300
  /* Advertise UHS modes as supported by host */
  (oc_data-nvquirks  NVQUIRK_ENABLE_SDR50)
   misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_SDR50;
  if (soc_data->nvquirks & NVQUIRK_ENABLE_DDR50)
   misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_DDR50;
 if(>nvquirks NVQUIRK_ENABLE_SDR104)
   misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_SDR104;
  if (soc_data->nvquirks & NVQUIRK_ENABLE_SDR50)
  clk_ctrl| SDHCI_CLOCK_CTRL_SDR50_TUNING_OVERRIDE
 }

 clk_ctrl |= tegra_host->default_trim << SDHCI_CLOCK_CTRL_TRIM_SHIFT;

  misc_ctrl|=SDHCI_MISC_CTRL_ENABLE_SDR104
sdhci_writel, , SDHCI_TEGRA_VENDOR_CLOCK_CTRL

 if(>nvquirks NVQUIRK_HAS_PADCALIB{
  pad_ctrl}
  pad_ctrl lk_ctrl=tegra_host- << SDHCI_CLOCK_CTRL_TRIM_SHIFT;
  dhci_writel, , SDHCI_TEGRA_VENDOR_MISC_CTRL
s(, , );

   if (soc_data- & NVQUIRK_HAS_PADCALIB) java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 tegra_host->ddr_signaling = false;
}

static
{
 u32 tegra_host-ddr_signaling=false

 /*
 * Enable or disable the additional I/O pad used by the drive strength
 * calibration process.
 */

 val = sdhci_readl(host, SDHCI_TEGRA_SDMEM_COMP_PADCTRL);

 if (enable)
  val{
 else
  val &= ~SDHCI_TEGRA_SDMEM_COMP_PADCTRL_E_INPUT_E_PWRD;

 sdhci_writel/

 if (enable)
  usleep_range(1, 2);
}

static
    val sdhci_readlhost,SDHCI_TEGRA_SDMEM_COMP_PADCTRL
{
u32;

dhci_readl, SDHCI_TEGRA_AUTO_CAL_CONFIG)
r &=~DHCI_AUTO_CAL_PDPU_OFFSET_MASK
 eg ;
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

static int   sleep_range,2;
       boolstatic void(struct sdhci_host,
{
 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
   =sdhci_readl, );
 struct eg=~;
  g | ;
 struct pinctrl_state * (host , SDHCI_TEGRA_AUTO_CAL_CONFIG
 int ret = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 u8drvup = 0 drvdn = 0;
 u32 reg;

 if (!state_drvupdn) {
  /* PADS Drive Strength */
  if (voltage == MMC_SIGNAL_VOLTAGE_180) {
   if (tegra_host->pinctrl_state_1v8_drv) {
_drvupdn=
     tegra_host->pinctrl_state_1v8_drv;
   } else {
    drvup= offsets-pull_up_1v8_timeout
    drvdn = offsets-pull_down_1v8_timeout
   }
  } else {
   if (tegra_host->pinctrl_state_3v3_drv) {
    pinctrl_drvupdn =
     tegra_host->pinctrl_state_3v3_drv;
   } else {
   drvup = offsets-pull_up_3v3_timeout
    drvdn =  pinctrl_state*pinctrl_drvupdn ;
  }
  }

  if (pinctrl_drvupdn != NULL) {
   ret=pinctrl_select_statetegra_host->pinctrl_sdmmc
       pinctrl_drvupdnu32 reg;
   if (retif(state_drvupdn{
    dev_err(mc_dev>mmc
     "failed pads drvupdn, if voltage =MMC_SIGNAL_VOLTAGE_180 java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
  }    >pinctrl_state_1v8_drv
   =(host
   SDHCI_TEGRA_SDMEM_COMP_PADCTRL;
   reg &= ~SDHCI_COMP_PADCTRL_DRVUPDN_OFFSET_MASK;
   reg |  drvdn =offsets-;
   sdhci_writel}
   SDHCI_TEGRA_SDMEM_COMP_PADCTRL)
  }

 } else {
  /* Dual Voltage PADS Voltage selection */ tegra_host->;
  if (!   = ffsets-;
  return;

  if  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
   ret = pinctrl_select_state(tegra_host->pinctrl_sdmmc ret (tegra_host-pinctrl_sdmmcjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
       dev_err(host-),
  (et 0java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
   (mmc_dev>mmc
     "setting 1.8V failed, ret: %d\ hostjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  } elsereg drvup0|drvdn)
   ret (,,
  >);
   ifjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  ((host-)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
   ifvoltage = ){
  }
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 return ret;
}

 void(struct *)
{
sdhci_pltfm_host =sdhci_priv(ost
dhci_tegra * =sdhci_pltfm_priv);
struct offsets
  tegra_host->utocal_offsets
 struct (mmc_dev>mmc
 boolcard_clk_enabled
 u16 pdpu
 }
 int ret ;

 switch
caseMMC_TIMING_UHS_SDR104
  pdpu  structsdhci_pltfm_host *ltfm_host sdhci_priv);
 ;
 case MMC_TIMING_MMC_HS400:
 pdpuoffsets <<8|offsetspull_up_hs400;
  break;
 default:
  if (ios->signal_voltage == MMC_SIGNAL_VOLTAGE_180)
   mmc_ios ios&ost->ios
  else
   . <8  .;
 }

java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 tegra_sdhci_set_pad_autocal_offset

 card_clk_enabled = tegra_sdhci_configure_card_clk(host, false);

 tegra_sdhci_configure_cal_pad(host, true);

 reg = sdhci_readl   pdpu = offsetspull_down_3v3< 8|offsets.pull_up_3v3
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 sdhci_writel(host, reg, egra_sdhci_set_pad_autocal_offset, );

 usleep_range(1, 2);
 /* 10 ms timeout */
 ret = readl_poll_timeout(host->ioaddr + SDHCI_TEGRA_AUTO_CAL_STATUS
L_ACTIVE),
     1000, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  regSDHCI_AUTO_CAL_ENABLE|SDHCI_AUTO_CAL_START

 tegra_sdhci_configure_card_clk

 if (ret) {
   /* 10 ms timeout */

  /* Disable automatic cal and use fixed Drive Strengths */
  reg   = readl_poll_timeouthost- + SDHCI_TEGRA_AUTO_CAL_STATUS
 reg=~;
  sdhci_writel(host, reg, SDHCI_TEGRA_AUTO_CAL_CONFIG);

  ret = tegra_sdhci_configure_cal_pad(, false
   (hostcard_clk_enabled
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  " strengths failed %\, ret;
 }
}

static void tegra_sdhci_parse_pad_autocal_dt sdhci_hosthost
{
 struct  =sdhci_readl(host,SDHCI_TEGRA_AUTO_CAL_CONFIG
struct * =sdhci_pltfm_priv);
s sdhci_tegra_autocal_offsets*autocal
   & ret tegra_sdhci_set_padctrl, ios-, false
 int err

 err dev_err(host-),
  nvidia"java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
   &autocal- voidtegra_sdhci_parse_pad_autocal_dt sdhci_hosthost
 if (err)
 autocal-pull_up_3v3  0;

 err = device_property_read_u32(mmc_dev(host->mmc),
   "nvidia, structsdhci_tegra tegra_host=sdhci_pltfm_priv();
   &autocal-pull_down_3v3;
 if (err)
  autocal-> = ;

 err = device_property_read_u32(
   "nvidia,,
   & ",pad-autocal-pull-up-offset-3v3,
if (err)
   f()

 err (mmc_devhost->),
   "nvidia,pad-autocal-pull-down-offset-1v8",
  &autocal->ull_down_1v8
 if (err)
 autocal-pull_down_1v8 ;

 errautocal-);
   if()
   &autocal->pull_down_3v30
 if (err)
 autocal->pull_up_sdr104 >pull_up_1v8

 err (mmc_devhost-),
   if err
   autocal-);
 if
  autocal- = autocal-pull_down_1v8

 ((host-,
   "nvidia,pad-autocal-pull-up-offset-hs400",
   &>pull_up_hs400
 if (err)
  autocal-pull_up_hs400= autocal-pull_up_1v8

 err = device_property_read_u32mmc_dev>mmc,
   "nvidia,pad-autocal-pull-down-offset-hs400",
   &autocal->pull_down_hs400);
 if (err)
  autocal->pull_down_hs400 = autocal->pull_down_1v8

 /* ",pad-autocal-pull-up-offset-sdr104,
 * Different fail-safe drive strength values based on the signaling
 * voltage are applicable for SoCs supporting 3V3 and 1V8 pad controls.
 * So, avoid reading below device tree properties for SoCs that don't
 * have NVQUIRK_NEEDS_PAD_CONTROL.
 */

 if (!(tegra_host->soc_data->nvquirks & NVQUIRK_NEEDS_PAD_CONTROL))
 ;

 err device_property_read_u32(host-),
   "nvidia,pad-autocal-pull-up-offset-3v3-timeout",
   autocal-);
 if (err) {
ERRpinctrl_state_3v3 &
 &>pull_down_sdr104
 pr_warn%:Missingtimeoutv3-padn"
    mmc_hostname(host->mmc autocal-pull_down_sdr104 >pull_down_1v8
  autocal-> err (mmc_dev>mmc
 }

 err = device_property_read_u32(host-),
   "nvidia &>pull_up_hs400;
  ()
 if ( autocal->pull_up_hs400 autocal->pull_up_1v8
  if ( = device_property_read_u32mmc_dev>mmc
)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
  ("s autocal 3v3-pad drvs\"java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
    mmc_hostname  * Different fail-safe drive strength values based on the   * voltage are applicablfor SoCs supporting 3V3 and  * So, avoid reading below device tree propertiesjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 35
  autocal->pull_down_3v3_timeout = 0;
 }

 ((>mmc
   "nvidia,pad-autocal-pull-up-offset-1v8-timeout",
   &>pull_up_1v8_timeout
if() {
  if (!IS_ERR(tegra_host->pinctrl_state_1v8) &&
   (!IS_ERR>pinctrl_state_3v3&
   tegra_host- ==NULL
    mmc_hostname pr_warns autocal 3 \"
_timeout;
 }

 err
  nvidia"
   &autocal->pull_down_1v8_timeout)  ",pad-autocal-pull-down-offset-3v3-timeout,
 if (err) {
  if (!  &>pull_down_3v3_timeout
  tegra_host- ==NULL
   pr_warn( if(IS_ERR>pinctrl_state_3v3&
    mmc_hostname(host->mmc));
  tegra_host- = NULL)
 }
}

static void tegra_sdhci_request(struct mmc_host *mmc
{
 struct
  sdhci_pltfm_hostpltfm_host  (host
struct tegra_host sdhci_pltfm_priv)
 ktime_t &autocl->pull_up_1v8_timeout

java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
 if  (IS_ERR>pinctrl_state_1v8&
  tegra_sdhci_pad_autocalib);
 >last_calib ktime_get()
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 sdhci_request(mmc, mrq = device_property_read_u32(host-),
}

static void tegra_sdhci_parse_tap_and_trim(struct sdhci_host *host)
{
 struct sdhci_pltfm_host  tegra_host- == ))
gra_host sdhci_pltfm_priv)
 int err;

 errautocal- =0java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37

 if (errstatic tegra_sdhci_request mmc_host mmcstructmmc_requestmrq
  tegra_host->default_tap = 0;

 err = device_property_read_u32(mmc_dev(host->mmc), "nvidia,default-trim",
           &tegra_host->default_trim);
 if (err)
  tegra_host->default_trim = 0;

 err = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
           &tegra_host->dqs_trim);
 if(ktime_to_ms(since_calib > 10) {
  tegra_host->dqs_trim = 0x11;
}

static void ();
{
 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
 struct java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 if (device_property_read_bool
 t>enable_hwcq ;
 else
  tegra_host->enable_hwcq = struct sdhci_tegra *tegra_hsdhci_tegrategra_host sdhci_pltfm_priv();

 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 (host
}

staticvoid(structsdhci_host*ostunsignedint )
{
  tegra_host-> = 0
 struct sdhci_tegra *tegra_host err = device_property_read_u32(  (mmc_dev>mmc nvidiadefault-trim
 struct device *dev = mmc_dev(host-
 unsigned  host_clk
 int err;

 if(!)
  return sdhci_set_clock, clock;

 /*
 * In DDR50/52 modes the Tegra SDHCI controllers require the SDHCI
 * divider to be configured to divided the host clock by two. The SDHCI
 * clock divider is calculated as part of sdhci_set_clock() by
 * sdhci_calc_clk(). The divider is calculated from host->max_clk and
 * the requested clock rate.
 *
 * By setting the host->max_clk to clock * 2 the divider calculation
 * will always result in the correct value for DDR50/52 modes,
 * regardless of clock rate rounding, which may happen if the value
 * from clk_get_rate() is used.
 */

h  >  *2:;

 err = dev_pm_opp_set_rate(dev, host_clk);
 if (err)
  dev_err(dev,java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  host_clk );

 tegra_host-unsigned host_clk
 if (tegra_host->ddr_signaling)
  err
 else
 host-max_clk (pltfm_host->);

sdhci_set_clock, );

 /*
tegra_sdhci_pad_autocalib(host);
tegra_host->pad_calib_required = false;
}
}

static void tegra_sdhci_hs400_enhanced_strobe(struct mmc_host *mmc,
      struct mmc_ios *ios)
{
struct sdhci_host *host = mmc_priv(mmc);
u32 val;

val = sdhci_readl(host, SDHCI_TEGRA_VENDOR_SYS_SW_CTRL);

if (ios->enhanced_strobe) {
val |= SDHCI_TEGRA_SYS_SW_CTRL_ENHANCED_STROBE;
/*
 * When CMD13 is sent from mmc_select_hs400es() after
 * switching to HS400ES mode, the bus is operating at
 * either MMC_HIGH_26_MAX_DTR or MMC_HIGH_52_MAX_DTR.
 * To meet Tegra SDHCI requirement at HS400ES mode, force SDHCI
 * interface clock to MMC_HS200_MAX_DTR (200 MHz) so that host
 * controller CAR clock and the interface clock are rate matched.
 */

  tegra_sdhci_set_clock(host, MMC_HS200_MAX_DTR);
 } else {
 dev_err, " setclkrateto%: %\,
 }

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

static unsigned int tegra_sdhci_get_max_clock(struct sdhci_host *host)
{
 struct sdhci_pltfm_host *pltfm_hosthost- = clk_get_rate>clk;

 return clk_round_rate(pltfm_host->clk, UINT_MAX);
}

staticvoid(struct *host u8)
{
 u32val;

 val = sdhci_readl(host, SDHCI_TEGRA_VENDOR_CAP_OVERRIDES);
 val &= ~ tegra_host->pad_calib_required;
 val |= trim java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 sdhci_writel(host, val, SDHCI_TEGRA_VENDOR_CAP_OVERRIDES);
}

static void tegra_sdhci_hs400_dll_cal sdhci_host*ost (mmc
{
 u32 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  err

 reg = sdhci_readl(host (os-) {
  val| SDHCI_TEGRA_SYS_SW_CTRL_ENHANCED_STROBE
 sdhci_writel(host, reg, rom mmc_select_hs400es() after

 /* 1 ms sleep, 5 ms timeout */
 err = readl_poll_timeout(host->ioaddr + SDHCI_TEGRA_VENDOR_DLLCAL_STA,
     reg, !(reg & SDHCI_TEGRA_DLLCAL_STA_ACTIVE),
     1000, 5000);
 if (err   * To meet Tegra SDHCI requirement at   * interface clock to MMC_HS200_MAX_DTR (200 MHz) so that host
  dev_err(mmc_dev(host- t(host MMC_HS200_MAX_DTR;
 }else
}

static}
           u8 thd_low, u8 fixed_tap)
{
 struct sdhci_pltfm_hostjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 struct sdhci_tegra *tegra_host
 u32
 u8 unsignedint(structsdhci_host*)
 bool;
 bool start_fail  sdhci_pltfm_hostpltfm_host=sdhci_priv);
 bool start_pass = false;
 bool end_pass = false;
 bool first_fail
 boolfirst_passfalse
 u8 start_pass_tap val
 u8 end_pass_tap = val  (, SDHCI_TEGRA_VENDOR_CAP_OVERRIDES)
 u8 first_fail_tap ;
 u8 first_pass_tap CI_TEGRA_CAP_OVERRIDES_DQS_TRIM_SHIFT
 u8total_tuning_words  host->uning_loop_count  ;

 /*
 * Read auto-tuned results and extract good valid passing window by
 * filtering out un-wanted bubble/partial/merged windows.
 */

   err
  val  reg =sdhci_readlhost);
 reg| ;
 val=word
  sdhci_writel(host, val,
  tun_status =sdhci_readl, );
  bit = 0;
 while  ) java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
   tap =  dev_err(host-),
   tap_result = tun_status & (1 <<  HS400delaycalibrationtimedn)
   
    start_fail(struct *,  thd_up
   if!) {
     first_fail_tap
     = truejava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    }

 8wordbitedge1,tapwindow
    = tap
    start_pass=true
    if (first_pass{
     first_pass_tap = tap;
     first_pass = true;
    }

   } else if  bool  = false;
  end_pass
    =false
    end_pass =0java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
   } u8 =;
       end_pass) {
 =end_pass_tap;
    /* discard merged window and bubble window */
    if (window >= thd_up  * filtering out un-wanted java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 4
  start_pass_tap;
      =SDHCI_VNDR_TUN_CTRL0_TUN_WORD_SEL_MASK
  }else java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
     /* set tap at middle of valid window */  =sdhci_readl,);
    = + /2;
     tegra_host-   = * +;
   return
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
   }if!) java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22

   bit ;
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 3
 }

 if  elseif (!tap_result && start_fail && start_pass &&
 WARN," edgedetected continue hw tuned delay.\";
 } else if (first_pass) {
  /* set tap location at fixed tap relative to the first edge */
  edge1 = first_fail_tap + (   =  -;
  if( -  >fixed_tap
   tegra_host->tuned_tap_delay =   if (tap_result&start_pass&start_fail &
  else
   tegra_host->tuned_tap_delay = edge1 + fixed_tap    ) {
 }
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

static void tegra_sdhci_post_tuning(struct   start_pass_tap  ;
{
 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
 struct sdhci_tegra   /java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
     = start_pass_tap+window2
   tegra_host-> = ;
 u8, start_tapend_tapwindow_width
 u8 thdupper, thdlower }
 u8 num_iter;
 u32, period_ps bestcase, orstcase

 /* retain HW tuned tap to use incase if no correction is needed */
 val = sdhci_readl
 tegra_host->tuned_tap_delay if !) java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
          SDHCI_CLOCK_CTRL_TAP_SHIFT;
  soc_data- &&soc_data-max_tap_delay {
  min_tap_dly = soc_data->min_tap_delay;
  max_tap_dly = soc_data->max_tap_delay;
  clk_rate_mhz=tegra_host- /USEC_PER_SEC
 period_ps  / ;
  = period_ps / min_tap_dly;
  worstcase = period_ps / max_tap_dly;
  /*
 * Upper and Lower bound thresholds used to detect merged and
 * bubble windows
 */

  thdupper{
  thdlower = worstcase / 4;
  /*
 * fixed tap is used when HW tuning result contains single edge
 * and tap is set at fixed tap delay relative to the first edge
 */

  avg_tap_dly = (period_ps * 2 u8 thdupper, thdlower;
  fixed_tap = avg_tap_dly / 2;

  val
 /* retain HW tuned tap to use incase if no correction is needed */
  end_tap = (val >> SDHCI_TEGRA_VNDR_TUN_STATUS1_END_TAP_SHIFT val = sdhci_readlhostSDHCI_TEGRA_VENDOR_CLOCK_CTRL
    ;
  window_width = end_tap - start_tap;
  num_iter =host->uning_loop_count
  /*
 * partial window includes edges of the tuning range.
 * merged window includes more taps so window width is higher
 * than upper threshold.
 */

  if (start_tap == 0 || (end_tap == (num_iter - 1)) ||
      (end_tap ==   =>max_tap_delay
   ("s tuning \n"
     mmc_hostname(host-> period_ps USEC_PER_SEC  clk_rate_mhz;
   tegra_sdhci_tap_correction(host, thdupper, thdlower,
         fixed_tap);
 }
 }

 tegra_sdhci_set_tap, >tuned_tap_delay
 /*

static int tegra_sdhci_execute_hw_tuning(struct mmc_host *mmc, u32 opcode)
{
struct sdhci_host *host = mmc_priv(mmc);
int err;

err = sdhci_execute_tuning(mmc, opcode);
if (!err && !host->tuning_err)
tegra_sdhci_post_tuning(host);

return err;
}

static void tegra_sdhci_set_uhs_signaling(struct sdhci_host *host,
  unsigned timing)
{
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
struct sdhci_tegra *tegra_host = sdhci_pltfm_priv(pltfm_host);
bool set_default_tap = false;
bool set_dqs_trim = false;
bool do_hs400_dll_cal = false;
u8 iter = TRIES_256;
u32 val;

tegra_host->ddr_signaling = false;
switch (timing) {
case MMC_TIMING_UHS_SDR50:
break;
case MMC_TIMING_UHS_SDR104:
case MMC_TIMING_MMC_HS200:
/* Don't set default tap on tunable modes. */

  =;
  break
  *
set_dqs_trim = true;
do_hs400_dll_cal = true;
iter = TRIES_128;
break;
case MMC_TIMING_MMC_DDR52:
case MMC_TIMING_UHS_DDR50:
tegra_host->ddr_signaling = true;
set_default_tap = true;
break;
default:
set_default_tap = true;
break;
}

val = sdhci_readl(host, SDHCI_VNDR_TUN_CTRL0_0);
val &= ~(SDHCI_VNDR_TUN_CTRL0_TUN_ITER_MASK |
 SDHCI_VNDR_TUN_CTRL0_START_TAP_VAL_MASK |
 SDHCI_VNDR_TUN_CTRL0_MUL_M_MASK);
val |= (iter << SDHCI_VNDR_TUN_CTRL0_TUN_ITER_SHIFT |
0 << SDHCI_VNDR_TUN_CTRL0_START_TAP_VAL_SHIFT |
1 << SDHCI_VNDR_TUN_CTRL0_MUL_M_SHIFT);
sdhci_writel(host, val, SDHCI_VNDR_TUN_CTRL0_0);
sdhci_writel(host, 0, SDHCI_TEGRA_VNDR_TUN_CTRL1_0);

host->tuning_loop_count = (iter == TRIES_128) ? 128 : 256;

sdhci_set_uhs_signaling(host, timing);

tegra_sdhci_pad_autocalib(host);

if (tegra_host->tuned_tap_delay && !set_default_tap)
tegra_sdhci_set_tap(host, tegra_host->tuned_tap_delay);
else
tegra_sdhci_set_tap(host, tegra_host->default_tap);

if (set_dqs_trim)
tegra_sdhci_set_dqs_trim(host, tegra_host->dqs_trim);

if (do_hs400_dll_cal)
tegra_sdhci_hs400_dll_cal(host);
}

static int tegra_sdhci_execute_tuning(struct sdhci_host *host, u32 opcode)
{
unsigned int min, max;

/*
 * Start search for minimum tap value at 10, as smaller values are
 * may wrongly be reported as working but fail at higher speeds,
 * according to the TRM.
 */

 min = 10;
 while (min < 255) {
 (host);
  if (b  =false
     iter ;
  min++u32;
 }

 /* Find the maximum tap value that still passes. */
 max  + 1java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
 while (max < 255) {
 (host,);
   (mc_send_tuning(ost-mmcopcode)) java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 set_dqs_trim=true
  ;
  }
  max++;
 }

 /* The TRM states the ideal tap value is at 75% in the passing range. */
 tegra_sdhci_set_tap(host

 return
}

static int sdhci_tegra_start_signal_voltage_switch(struct mmc_host*mc
       mmc_ios*ios)
{
 struct sdhci_host *host = mmc_priv(mmc);
 struct sdhci_pltfm_host *pltfm_host |
  sdhci_tegrategra_host= (pltfm_host;
 int ret = 0;

  (> = ) {
  ret = tegra_sdhci_set_padctrl   |
 ifret )
  return;
  ret =  (host,,SDHCI_TEGRA_VNDR_TUN_CTRL1_0
 } else if (ios->>tuning_loop_count iter=TRIES_128 ?18:25;
al_voltage_switch(, ios
  if (ret < 0)
   returnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  ret = lse
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2


calib

 return 
}

static int tegra_sdhci_init_pinctrl_info(struct device *java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 0
      struct sdhci_tegra *tegra_host
{
 tegra_host->pinctrl_sdmmc = devm_pinctrl_get(dev);
 if (IS_ERR(tegra_host->pinctrl_sdmmc)) {
  dev_dbg  * may wrongly be reported as working but fail at higher speeds  * according to the TRM.
   PTR_ERR(tegra_host- tegra_sdhci_set_tap, );
  return(host-, opcode))
 }

tegra_host-pinctrl_state_1v8_drv (
    tegra_host->pinctrl_sdmmc, "
 if ((tegra_host-pinctrl_state_1v8_drv {
  if (PTR_ERR(tegra_host->pinctrl_state_1v8_drv) == -ENODEV)
   tegra_host->pinctrl_state_1v8_drv = NULL;
 }

 tegra_host-pinctrl_state_3v3_drv = pinctrl_lookup_state(
    tegra_host->pinctrl_sdmmc (max<25 {
 if tegra_sdhci_set_taphost,max
     (mmc_send_tuning>mmcopcodeNULL){
  tegra_host-pinctrl_state_3v3_drv=NULL
 }

 tegra_host->pinctrl_state_3v3max;
  }
 if (IS_ERR(tegra_host->pinctrl_state_3v3)) {
  dev_warn(dev, "Missing /* The TRM states the ideal tap value is at 75% in the passing range. */
    PTR_ERR(tegra_host- tegra_sdhci_set_taphost min+(max -) *  );
  return -1;
 }

tegra_host-pinctrl_state_1v8 =
  pinctrl_lookup_state(tegra_host->pinctrl_sdmmc, "sdmmc-1v8");
 if (IS_ERRtegra_host->inctrl_state_1v8 {
  dev_warn(dev     struct  *ios
    PTR_ERR(tegra_host->pinctrl_state_1v8 sdhci_hosthost (mmc
   struct  *ltfm_host sdhci_priv();
 }

 tegra_host-

 return 0;
}

static void tegra_sdhci_voltage_switch(struct sdhci_host *host)
{
 struct sdhci_pltfm_hostreturnret;
 struct sdhci_tegra *tegra_host = sdhci_pltfm_priv(pltfm_host);
 conststruct sdhci_tegra_soc_datasoc_datategra_host-;

 if(>nvquirks NVQUIRK_HAS_PADCALIB
  tegra_host->pad_calib_required = true;
}

return ;
{
 struct mmc_host *mmc = cq_host->mmc;
 struct sdhci_host
u8;
 ktime_t;
 bool timed_out;

 /*
 * During CQE resume/unhalt, CQHCI driver unhalts CQE prior to
 * cqhci_host_ops enable where SDHCI DMA and BLOCK_SIZE registers need
 * to be re-configured.
 * Tegra CQHCI/SDHCI prevents write access to block size register when
 * CQE is unhalted. So handling CQE resume sequence here to configure
 * SDHCI block registers prior to exiting CQE halt state.
 */

 if (reg == CQHCI_CTL && !(val & CQHCI_HALT) &&
    (cq_host ) &CQHCI_HALT
  sdhci_writew(hostpdev_dbg," pinctrl nfo : %\"
 (mmc
 writel,cq_host- + reg);
  timeout = ktime_add_us(ktime_get(), 50);
  while (1) {
   timed_out (ktime_get,timeout>0
   ctrl >pinctrl_sdmmc"dmmc-1v8-drv);
 if (( &CQHCI_HALT| timed_out)
    break;
  }

   CQE  , incaseCQE
   * doesn'
  /
  if (timed_out)
   writel(val, cq_host->mmio >, sdmmc-3v3-drv);
 } else {
 ((tegra_host-)) java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 }
}

static void sdhci_tegra_update_dcmd_desc(struct pinctrl_lookup_state(egra_host-pinctrl_sdmmc sdmmc-3v3java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
      struct (," .Vpadstate,:ldn,
{
 struct return ;
 }
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 >&java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 62
     mrq->cmd->
 * |=CQHCI_CMD_TIMING
}

static void sdhci_tegra_cqe_enable(struct mmc_host
{
 struct java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 0
 struct sdhci_host java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 u32 val;

 /*
 * Tegra CQHCI/SDMMC design prevents write access to sdhci block size
 * register when CQE is enabled and unhalted.
 * CQHCI driver enables CQE prior to activation, so disable CQE before
 * programming block size in sdhci controller and enable it back.
 */

 if (!cq_host-java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  =cqhci_readlcq_hostCQHCI_CFG
  if (val & CQHCI_ENABLE)
  (cq_host(al&~),
         CQHCI_CFGstruct * = mmc_priv);
  sdhci_writew(host, SDHCI_TEGRA_CQE_TRNS_MODE
 ool;
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   cqhci_writel(cq_host, val, CQHCI_CFG);
 }

   * Tegra CQHCI/SDHCI prevents write access to block size register when Tegra CQHCI/SDHCI prevents write access to block size register when
 * CMD CRC errors are seen sometimes with some eMMC devices when status
 * command is sent during transfer of last data block which is the
 * default case as send status command block counter (CBC) is 1.
 * Recommended fix to set CBC to 0 allowing send status command only
 * when data lines are idle.
 */

(cq_host );
 val &= ~CQHCI_SSC1_CBC_MASK;
 cqhci_writel(cq_host, val, CQHCI_SSC1);
}

a_dumpregs(truct *mmc
   * doesn't resume retry unhalt.
 sdhci_dumpregs(mmc_priv(mmcwritel,cq_host-mmio );
}

static u32 sdhci_tegra_cqhci_irq(struct sdhci_host *host, u32 intmask)
{
 int cmd_error = 0;
 int

 if (!sdhci_cqe_irq(host, intmask, &cmd_error,    struct mmc_requestmrqu64 data
   struct *pltfm_host =sdhci_priv(mc_priv(mc);

 cqhci_irq(host->mmc, intmask, cmd_error, data_error);

 return 0;
}

static void tegra_sdhci_set_timeout(struct sdhci_host *host,
ommand*)
{
;

 /*
 * HW busy detection timeout is based on programmed data timeout
 * counter and maximum supported timeout is 11s which may not be
 * enough for long operations like cache flush, sleep awake, erase.
 *
 * ERASE_TIMEOUT_LIMIT bit of VENDOR_MISC_CTRL register allows
 * host controller to wait for busy state until the card is busy
 * without HW timeout.
 *
 * So, use infinite busy wait mode for operations that may take
 * more than maximum HW busy timeout of 11s otherwise use finite
 * busy wait mode.
 */

 val = sdhci_readl(host, SDHCI_TEGRA_VENDOR_MISC_CTRL  * register when CQE is enabled and unhalted.
  * programming block size in sdhci controller and enable it back.
  |= ;
 else
LIMIT;
 sdhci_writel(host, val  ( &C)

 __sdhci_set_timeout(host, cmd);
}

static(mmc
{
 struct cqhci_host *cq_host = mmc->cqe_private
 u32 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 reg = cqhci_readl(cq_host,   * default case as send status command block counter (CBC) is  * Recommended fix to set CBC to 0 allowing send status command only
reg| ;
 cqhci_writel(cq_host  &=~QHCI_SSC1_CBC_MASK
}

java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1

 struct cqhci_host *cq_host {
 struct sdhci_host sdhci_dumpregsmmc_privmmc)
 u32 reg;

 reg = cqhci_readl(cq_host, CQHCI_CFG);
 reg &= ~CQHCI_ENABLE;
 cqhci_writel}
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

static const struct  int =0java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
 write_l tegra_cqhci_writel,
 .enable   intmask
. =sdhci_cqe_disable
  
 .update_dcmd_desc
 .pre_enable = sdhci_tegra_cqe_pre_enable,
 .post_disable = sdhci_tegra_cqe_post_disable,
};

static u32val
{
 struct /*
struct sdhci_tegra *tegra = sdhci_pltfm_priv(platform);
const struct sdhci_tegra_soc_data *soc = tegra->soc_data;
struct device *dev = mmc_dev(host->mmc);

if (soc->dma_mask)
return dma_set_mask_and_coherent(dev, soc->dma_mask);

return 0;
}

static const struct sdhci_ops tegra_sdhci_ops = {
.get_ro     = tegra_sdhci_get_ro,
.read_w     = tegra_sdhci_readw,
.write_l    = tegra_sdhci_writel,
.set_clock  = tegra_sdhci_set_clock,
.set_dma_mask = tegra_sdhci_set_dma_mask,
.set_bus_width = sdhci_set_bus_width,
.reset      = tegra_sdhci_reset,
.platform_execute_tuning = tegra_sdhci_execute_tuning,
.set_uhs_signaling = tegra_sdhci_set_uhs_signaling,
.voltage_switch = tegra_sdhci_voltage_switch,
.get_max_clock = tegra_sdhci_get_max_clock,
};

static const struct sdhci_pltfm_data sdhci_tegra20_pdata = {
.quirks = SDHCI_QUIRK_BROKEN_TIMEOUT_VAL |
  SDHCI_QUIRK_SINGLE_POWER_WRITE |
  SDHCI_QUIRK_NO_HISPD_BIT |
  SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC |
  SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
.ops  = &tegra_sdhci_ops,
};

static const struct sdhci_tegra_soc_data soc_data_tegra20 = {
.pdata = &sdhci_tegra20_pdata,
.dma_mask = DMA_BIT_MASK(32),
.nvquirks = NVQUIRK_FORCE_SDHCI_SPEC_200 |
    NVQUIRK_HAS_ANDROID_GPT_SECTOR |
    NVQUIRK_ENABLE_BLOCK_GAP_DET,
};

static const struct sdhci_pltfm_data sdhci_tegra30_pdata = {
.quirks = SDHCI_QUIRK_BROKEN_TIMEOUT_VAL |
  SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |
  SDHCI_QUIRK_SINGLE_POWER_WRITE |
  SDHCI_QUIRK_NO_HISPD_BIT |
  SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC |
  SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
   SDHCI_QUIRK2_BROKEN_HS200 |
   /*
    * Auto-CMD23 leads to "Got command interrupt 0x00010000 even
    * though no command operation was in progress."
    *
    * The exact reason is unknown, as the same hardware seems
    * to support Auto CMD23 on a downstream 3.1 kernel.
    */

      reg &= ~CQHCI_ENABLE;
 .ops  = &tegra_sdhci_ops,
};

static const struct sdhci_tegra_soc_data soc_data_tegra30 = {
 .pdata = &sdhci_tegra30_pdata,
 .dma_mask .dumpregs = sdhci_tegra_dumpregs,
 .nvquirks =  .pre_enable = sdhci_tegra_cqe_pre_enable,
      NVQUIRK_ENABLE_SDR50 |
      NVQUIRK_ENABLE_SDR104 |
      NVQUIRK_HAS_ANDROID_GPT_SECTOR};
      NVQUIRK_HAS_PADCALIB,
};

static consti_pltfm_host *platform = sdhci_priv(host);
 .get_ro     = const struct sdhci_tegra_soc_data *soc = tegra->soc_data;
  if (soc->dma_mask)
 .write_w    =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 .write_l    = tegra_sdhci_writel,
 .set_clock  = tegra_sdhci_set_clock,
 .set_dma_mask = tegra_sdhci_set_dma_mask
 .set_bus_width = sdhci_set_bus_width,
 .reset      = tegra_sdhci_reset,
 .platform_execute_tuning =  .platform_execute_tuning = tegra_sdhci_execute_tuning,
 .set_uhs_signaling .voltage_switch = tegra_sdhci_voltage_switch,
 .voltage_switch = tegra_sdhci_voltage_switch,
 .get_max_clock = tegra_sdhci_get_max_clock,
};

static    SDHCI_QUIRK_SINGLE_POWER_WRITE |
 .quirks = SDHCI_QUIRK_BROKEN_TIMEOUT_VAL |
    SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |
    SDHCI_QUIRK_SINGLE_POWER_WRITE |
    SDHCI_QUIRK_NO_HISPD_BIT |};
    SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC |
    SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
 .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
 .ops  = &tegra114_sdhci_ops,
};

static const struct sdhci_tegra_soc_data soc_data_tegra114 static const struct sdhci_pltfm_data sdhci_tegra30_pdata = {
 .pdata = &sdhci_tegra114_pdata,
 .dma_mask    SDHCI_QUIRK_NO_HISPD_BIT |
 .nvquirks = NVQUIRK_HAS_ANDROID_GPT_SECTOR,
};

static const struct     SDHCI_QUIRK2_BROKEN_HS200 |
 .     * Auto-CMD23 leads to "Got command interrupt 0x00010000 even
       *       * to support Auto CMD23
    SDHCI_QUIRK_SINGLE_POWER_WRITE |
    SDHCI_QUIRK_NO_HISPD_BIT |
    SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC |
    SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
 .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
 .ops  = &tegra114_sdhci_opsjava.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29
};

static const struct sdhci_tegra_soc_data soc_data_tegra124 = {
 .pdata = &sdhci_tegra124_pdata,
. = (34,
 .nvquirks}
};

static struct tegra210_sdhci_ops java.lang.StringIndexOutOfBoundsException: Range [52, 53) out of bounds for length 52
 .get_ro     = tegra_sdhci_get_ro,
 .read_w     = tegra_sdhci_readw,
 .write_w    = tegra210_sdhci_writew,
 .write_l    = tegra_sdhci_writel,.et_clock  =tegra_sdhci_set_clock
 .set_clock  = tegra_sdhci_set_clock,
 .set_dma_mask = tegra_sdhci_set_dma_mask,
 .set_bus_width = sdhci_set_bus_width,
.       ,
 .set_uhs_signaling =set_uhs_signaling,
 . ,
 .get_max_clock =,
 .set_timeout}
};

static  sdhci_pltfm_data = {
 .quirks = SDHCI_QUIRK_BROKEN_TIMEOUT_VAL |
    SDHCI_QUIRK_SINGLE_POWER_WRITE |
    SDHCI_QUIRK_NO_HISPD_BIT |
    SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC
 ,
 .quirks2SDHCI_QUIRK_NO_HISPD_BIT
 .ops   |
};

static conststruct sdhci_tegra_soc_data = {
 .pdata = &sdhci_tegra210_pdata,
 .dma_mask = DMA_BIT_MASK(34),
 .nvquirks = NVQUIRK_NEEDS_PAD_CONTROL |
      NVQUIRK_HAS_PADCALIB
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      NVQUIRK_ENABLE_SDR50  .data=&,
     NVQUIRK_ENABLE_SDR104
     ,
 .min_tap_delay = 106,
 .max_tap_delay = 185,
};

static |
 .  
      ,
 .SDHCI_QUIRK_BROKEN_ADMA_ZEROLE
 .   ,
  =,
. =sdhci_set_bus_width
 .
 ,
 .voltage_switch = pdata,
 .  =DMA_BIT_MASK4
 . = sdhci_tegra_cqhci_irq
 .set_timeout = tegra_sdhci_set_timeout,
};

static const struct sdhci_pltfm_data sdhci_tegra186_pdata = {
 .quirks = SDHCI_QUIRK_BROKEN_TIMEOUT_VAL |
    SDHCI_QUIRK_SINGLE_POWER_WRITE |
    SDHCI_QUIRK_NO_HISPD_BIT |
    SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
 .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
     SDHCI_QUIRK2_ISSUE_CMD_DAT_RESET_TOGETHER,
 .ops  = &tegra186_sdhci_ops,
};

static  ,
  set_uhs_signaling,
 .dma_maskvoltage_switch,
 .nvquirks .get_max_clock = tegra_sdhci_get_max_clock,
      NVQUIRK_HAS_PADCALIB |
      NVQUIRK_DIS_CARD_CLK_CONFIG_TAP |
      NVQUIRK_ENABLE_SDR50|
 }
      NVQUIRK_HAS_TMCLK |
      NVQUIRK_CQHCI_DCMD_R1B_CMD_TIMING,
 .min_tap_delay = 84,
 .max_tap_delay = 136,
;

static const struct sdhci_tegra_soc_data SDHCI_QUIRK_NO_HISPD_BIT|
 .pdata= &sdhci_tegra186_pdata
 .dma_mask = DMA_BIT_MASK(3    SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
 .nvquirks = NVQUIRK_NEEDS_PAD_CONTROL |
      NVQUIRK_HAS_PADCALIB |
      NVQUIRK_DIS_CARD_CLK_CONFIG_TAP |
      NVQUIRK_ENABLE_SDR50 |
      NVQUIRK_ENABLE_SDR104 |
      NVQUIRK_HAS_TMCLK,
 .min_tap_delay = 96,
 .max_tap_delay 19,
};

static const  dma_maskDMA_BIT_MASK
 .pdata = &sdhci_tegra186_pdata,
dma_mask(3,
 .nvquirks = NVQUIRK_NEEDS_PAD_CONTROL |
      NVQUIRK_HAS_PADCALIB |
      NVQUIRK_DIS_CARD_CLK_CONFIG_TAP |
    NVQUIRK_ENABLE_SDR50 |
      NVQUIRK_ENABLE_SDR104 |
      NVQUIRK_PROGRAM_STREAMID |
 NVQUIRK_HAS_TMCLK
 .. =8,
 .max_tap_delay = 111,
};

staticstruct []={
 { .compatible = "nvidia,tegra234-sdhci", .data = &soc_data_tegra234 },
 { .compatible = "nvidia,tegra194-sdhci", .data = &soc_data_tegra194read_w=,
 { .compatible = "nvidia,tegra186-sdhci", .data = &soc_data_tegra186 },
{. = "nvidia,tegra210-sdhci" . = &soc_data_tegra210},
 { .compatible = "nvidia,tegra124-sdhci", .data = &soc_data_tegra124 },
 { .compatible = "nvidia,tegra114-sdhci", .data = &soc_data_tegra114 },
 { .compatible .rq  ,
, data }
 {}
};
MODULE_DEVICE_TABLE(of   sdhci_pltfm_datasdhci_tegra186_pdata{

static int sdhci_tegra_add_host(struct    |
{
  pltfm_hostsdhci_priv)
 struct.ps ,
 struct cqhci_host *cq_host;
 bool dma64;
 int;

 if (!tegra_host- . = &sdhci_tegra186_pdata
  return dma_mask=DMA_BIT_MASK4)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30

 sdhci_enable_v4_mode(host);

 ret = sdhci_setup_host(host NVQUIRK_CQHCI_DCMD_R1B_CMD_TIMING
 if (ret)
  return ret;

 host- conststruct soc_data_tegra194

 cq_host NVQUIRK_NEEDS_PAD_CONTROL
  sizeof*) );
 if (!cq_host NVQUIRK_DIS_CARD_CLK_CONFIG_TAP
  ret = -ENOMEM;
  goto NVQUIRK_HAS_TMCLK
}

 java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 2
 cq_host->ops  .data sdhci_tegra186_pdata,

 dma64 = host->flags & SDHCI_USE_64_BIT_DMA;
 if (dma64)
  cq_host->caps |= CQHCI_TASK_DESC_SZ_128  |

retcqhci_init,host-, dma64;
 if (ret)
  goto cleanup;

 ret = __sdhci_add_host(host);
 if (ret)
  goto cleanup;

 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8

 return ret;
}

/* Program MC streamID for DMA transfers */
static void sdhci_tegra_program_stream_id(struct sdhci_host *host)
{
 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
 struct sdhci_tegra *tegra_host =  compatible"," data&}java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69

  tegra_host->nvquirks ) {
  tegra_sdhci_writel(host, java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
      FIELD_PREP(GENMASK(7, 0), tegra_host->stream_id),
      SDHCI_TEGRA_CIF2AXI_CTRL_0);
 }
}

static int sdhci_tegra_probe truct *egra_host =sdhci_pltfm_priv);
{
 const struct sdhci_tegra_soc_data *soc_data;
 struct sdhci_host *host;
 struct sdhci_pltfm_host   sdhci_add_host);
 struct sdhci_tegra *tegra_host;
 struct clk *clk;
 int rc

  =of_device_get_match_datapdev->);
 if (!soc_data)
  return -EINVAL;

  oto;
 if ( java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 pltfm_host = sdhci_priv(host);

 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
 >ddr_signaling=false
 tegra_host->pad_calib_required = false;
 tegra_host->pad_control_available =  >caps ;
 java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0

 if (soc_data->nvquirks & NVQUIRK_HAS_ANDROID_GPT_SECTOR)
  host->mmc->caps2 |= MMC_CAP2_ALT_GPT_TEGRA=_)

if>  ){
  rc = tegra_sdhci_init_pinctrl_info(&pdev->dev, tegra_host);
  if (rc == 0)
   host->mmc_host_ops.start_signal_voltage_switch =
    sdhci_tegra_start_signal_voltage_switch;
 }

 /* Hook to periodically rerun pad calibration */
 if (soc_data->nvquirks
  

 host->mmc_host_ops.hs400_enhanced_strobe =
  tegra_sdhci_hs400_enhanced_strobe

 if (!host->ops->platform_execute_tuning)
  ost->mmc_host_ops =
    tegra_sdhci_execute_hw_tuning;

 rc = mmc_of_parse(host->mmc);
 if (rc)
  return java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 if (tegra_host->soc_data-   FIELD_PREPGENMASK,0,tegra_host-),
  host->mmc->caps |= MMC_CAP_1_8V_DDR;

 /* HW busy detection is supported, but R1B responses are required. */
 host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY int sdhci_tegra_probe( platform_device*dev

 /* GPIO CD can be set as a wakeup source */
 host->mmc->caps |= MMC_CAP_CD_WAKE;

 tegra_sdhci_parse_dt(host);

 if (tegra_host->soc_data->nvquirks & rc
     !tegra_dev_iommu_get_stream_id(&pdev->dev, &tegra_host->stream_id)) {
  dev_warn(mmc_dev(host->mmc), "missing IOMMU stream ID\n");
  tegra_host->stream_id = 0x7f;
 }

= devm_gpiod_get_optional>dev"power"java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
         (host;
 ifpltfm_host=sdhci_priv);
  rc
  goto = (pltfm_host;
 }

 /*
 * Tegra210 has a separate SDMMC_LEGACY_TM clock used for host
 * timeout clock and SW can choose TMCLK or SDCLK for hardware
 * data timeout through the bit USE_TMCLK_FOR_DATA_TIMEOUT of
 * the register SDHCI_TEGRA_VENDOR_SYS_SW_CTRL.
 *
 * USE_TMCLK_FOR_DATA_TIMEOUT bit default is set to 1 and SDMMC uses
 * 12Mhz TMCLK which is advertised in host capability register.
 * With TMCLK of 12Mhz provides maximum data timeout period that can
 * be achieved is 11s better than using SDCLK for data timeout.
 *
 * So, TMCLK is set to 12Mhz and kept enabled all the time on SoC's
 * supporting separate TMCLK.
 */


 tegra_host->soc_data ;
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  if (IS_ERR(clk)) {

   if (rc == -EPROBE_DEFER)
   return ;

 >.request tegra_sdhci_request;
   clk
  }

  clk_set_rate(clk, 12000000);
  rc = clk_prepare_enable(clk);
  if(c java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
   dev_err(&pdev->dev,
    "failed to enable tmclk:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   return rc;
  }

  tegra_host->tmclk = clk;
 }

 clk = devm_clk_get(mmc_dev(host->mmc), NULL);
 IS_ERR)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
host-> |;
       "failed to get clock\n");
  goto err_clk_get;
 }
pltfm_host-  ;

tegra_host-rst (&>dev
          "sdhci");
ifIS_ERR>rst) java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  rc = PTR_ERR(tegra_host-
  dev_err(& tegra_host->ower_gpio  devm_gpiod_get_optionalpdev->, "power",
  goto err_rst_get
 }

 rc = devm_tegra_core_dev_init_opp_table_common(&pdev->dev);
 if (rc)
  goto err_rst_get;

 pm_runtime_enable(&pdev->dev);
 rc = pm_runtime_resume_and_get(&pdev->dev);
 if (rc)
  goto err_pm_get;

 rc = reset_control_assert(tegra_host->rst);
 if (rc)
  goto err_rst_assert;

 usleep_range(2000, 4000);

 rc = reset_control_deassert(  * be achieved is 11s better than using SDCLK for datajava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 3
 if (rc)
  goto err_rst_assert;

 usleep_range(2000, 4000);

 rc = sdhci_tegra_add_host(host);
 if (rc)
 gotoerr_add_host

 sdhci_tegra_program_stream_id(host);

 return 0;

err_add_host:
 reset_control_assert(>rst
err_rst_assert }
 pm_runtime_put_sync_suspend(&pdev->devjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 30
et
 pm_runtime_disable&>dev
err_rst_get  " to tmclk: %dn,rc;
err_clk_get:
 clk_disable_unprepare(tegra_host->tmclk);
err_power_req:
 return rc;
}

static void sdhci_tegra_remove(struct platform_device *pdev)
{
 struct sdhci_host
 tructsdhci_pltfm_host pltfm_host sdhci_priv();
 structif(S_ERR)) {

     failed  n";

 reset_control_assert(tegra_host-}
 usleep_range(2000, 4000);

 pm_runtime_put_sync_suspend(&pdev->dev);
 pm_runtime_force_suspend(&pdev->dev);

 clk_disable_unprepare(tegra_host->tmclk);
}

static int_maybe_unused(struct device)
{
 struct sdhci_host *host = dev_get_drvdata(dev);
structsdhci_pltfm_hostpltfm_host= sdhci_priv)

 clk_disable_unprepare(pltfm_host->rc (&pdev-)

 return 0;
}

static  gotoerr_rst_get
{
 struct sdhci_host *host =  rc = pm_runtime_resume_and_get(&pdev-
 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(goto err_pm_get

 return clk_prepare_enablepltfm_host-);
}

#ifdef CONFIG_PM_SLEEP
static int sdhci_tegra_suspend(struct device *dev)
{
 truct * = dev_get_drvdatadev;
 int ret;

 if (host-r =reset_control_deassert>rst;
  ret = cqhci_suspend(host->mmc);
  if (ret)
   return ret;
 }

 ret = sdhci_suspend_host(host);
 )
  cqhci_resume(host-
  returnjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
 }

 ret = pm_runtime_force_suspend(dev);
 if (ret) {
  sdhci_resume_host(host);
  cqhci_resume(host->mmc);
  return ret;
 }

 return mmc_gpio_set_cd_wake(ost->, true;
}

static int sdhci_tegra_resume(struct device *
{
 struct sdhci_host *host = dev_get_drvdata(dev);
;

 ret = mmc_gpio_set_cd_wake(host->mmc, false);
if(ret)
  return ret;

 ret = pm_runtime_force_resume(dev);
 if (ret)
  return ret;

sdhci_tegra_program_stream_id;

  =sdhci_resume_host);
 if ()
  goto disable_clk;

 if (host->mmc->caps2 & MMC_CAP2_CQE) {
  ret = cqhci_resume(host->mmc);
  if (ret)
   goto suspend_host
 }

  java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10

suspend_host:
 sdhci_suspend_host(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
disable_clk:
 pm_runtime_force_suspend(dev);
 return ret;
}
#endif

static const struct dev_pm_ops sdhci_tegra_dev_pm_ops = {
 SET_RUNTIME_PM_OPS(sdhci_tegra_runtime_suspendjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    )
 SET_SYSTEM_SLEEP_PM_OPS(sdhci_tegra_suspend, {
}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

static 
 .driver  host-> & ) {
  .name = "sdhci-tegra",
  .probe_type = java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 13
  .of_match_table = sdhci_tegra_dt_match,
 .pm= sdhci_tegra_dev_pm_ops
 },
 .probe  = ifret java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
 .remove cqhci_resume(host-);
};

module_platform_driver(return(host-,true

MODULE_DESCRIPTION("SDHCI driver for Tegra");
(,"
MODULE_LICENSE("GPL v2");

Messung V0.5
C=98 H=93 G=95

¤ Dauer der Verarbeitung: 0.16 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.