if (test_and_clear_bit(0, &pcie->link_status))
dw_pcie_ep_linkup(ep);
tegra_pcie_icc_set(pcie);
if (pcie->of_data->has_ltr_req_fix) return IRQ_HANDLED;
/* If EP doesn't advertise L1SS, just return */
val = dw_pcie_readl_dbi(pci, pcie->cfg_link_cap_l1sub); if (!(val & (PCI_L1SS_CAP_ASPM_L1_1 | PCI_L1SS_CAP_ASPM_L1_2))) return IRQ_HANDLED;
/* Check if BME is set to '1' */
val = dw_pcie_readl_dbi(pci, PCI_COMMAND); if (val & PCI_COMMAND_MASTER) {
ktime_t timeout;
/* 110us for both snoop and no-snoop */
val = FIELD_PREP(PCI_LTR_VALUE_MASK, 110) |
FIELD_PREP(PCI_LTR_SCALE_MASK, 2) |
LTR_MSG_REQ |
FIELD_PREP(PCI_LTR_NOSNOOP_VALUE, 110) |
FIELD_PREP(PCI_LTR_NOSNOOP_SCALE, 2) |
LTR_NOSNOOP_MSG_REQ;
appl_writel(pcie, val, APPL_LTR_MSG_1);
/* Send LTR upstream */
val = appl_readl(pcie, APPL_LTR_MSG_2);
val |= APPL_LTR_MSG_2_LTR_MSG_REQ_STATE;
appl_writel(pcie, val, APPL_LTR_MSG_2);
timeout = ktime_add_us(ktime_get(), LTR_MSG_TIMEOUT); for (;;) {
val = appl_readl(pcie, APPL_LTR_MSG_2); if (!(val & APPL_LTR_MSG_2_LTR_MSG_REQ_STATE)) break; if (ktime_after(ktime_get(), timeout)) break;
usleep_range(1000, 1100);
} if (val & APPL_LTR_MSG_2_LTR_MSG_REQ_STATE)
dev_err(pcie->dev, "Failed to send LTR message\n");
}
/* Enable ASPM counters */
val = EVENT_COUNTER_ENABLE_ALL << EVENT_COUNTER_ENABLE_SHIFT;
val |= EVENT_COUNTER_GROUP_5 << EVENT_COUNTER_GROUP_SEL_SHIFT;
dw_pcie_writel_dbi(pci, pcie->ras_des_cap +
PCIE_RAS_DES_EVENT_COUNTER_CONTROL, val);
/* Program T_cmrt and T_pwr_on values */
val = dw_pcie_readl_dbi(pci, pcie->cfg_link_cap_l1sub);
val &= ~(PCI_L1SS_CAP_CM_RESTORE_TIME | PCI_L1SS_CAP_P_PWR_ON_VALUE);
val |= (pcie->aspm_cmrt << 8);
val |= (pcie->aspm_pwr_on_t << 19);
dw_pcie_writel_dbi(pci, pcie->cfg_link_cap_l1sub, val);
/* Program L0s and L1 entrance latencies */
val = dw_pcie_readl_dbi(pci, PCIE_PORT_AFR);
val &= ~PORT_AFR_L0S_ENTRANCE_LAT_MASK;
val |= (pcie->aspm_l0s_enter_lat << PORT_AFR_L0S_ENTRANCE_LAT_SHIFT);
val |= PORT_AFR_ENTER_ASPM;
dw_pcie_writel_dbi(pci, PCIE_PORT_AFR, val);
}
val = appl_readl(pcie, APPL_INTR_EN_L0_0);
val |= APPL_INTR_EN_L0_0_LINK_STATE_INT_EN;
appl_writel(pcie, val, APPL_INTR_EN_L0_0);
if (!pcie->of_data->has_sbr_reset_fix) {
val = appl_readl(pcie, APPL_INTR_EN_L1_0_0);
val |= APPL_INTR_EN_L1_0_0_LINK_REQ_RST_NOT_INT_EN;
appl_writel(pcie, val, APPL_INTR_EN_L1_0_0);
}
if (pcie->enable_cdm_check) {
val = appl_readl(pcie, APPL_INTR_EN_L0_0);
val |= pcie->of_data->cdm_chk_int_en_bit;
appl_writel(pcie, val, APPL_INTR_EN_L0_0);
val = appl_readl(pcie, APPL_INTR_EN_L1_18);
val |= APPL_INTR_EN_L1_18_CDM_REG_CHK_CMP_ERR;
val |= APPL_INTR_EN_L1_18_CDM_REG_CHK_LOGIC_ERR;
appl_writel(pcie, val, APPL_INTR_EN_L1_18);
}
/* Enable INTX interrupt generation */
val = appl_readl(pcie, APPL_INTR_EN_L0_0);
val |= APPL_INTR_EN_L0_0_SYS_INTR_EN;
val |= APPL_INTR_EN_L0_0_INT_INT_EN;
appl_writel(pcie, val, APPL_INTR_EN_L0_0);
val = appl_readl(pcie, APPL_INTR_EN_L1_8_0);
val |= APPL_INTR_EN_L1_8_INTX_EN;
val |= APPL_INTR_EN_L1_8_AUTO_BW_INT_EN;
val |= APPL_INTR_EN_L1_8_BW_MGT_INT_EN; if (IS_ENABLED(CONFIG_PCIEAER))
val |= APPL_INTR_EN_L1_8_AER_INT_EN;
appl_writel(pcie, val, APPL_INTR_EN_L1_8_0);
}
/* Program init preset */ for (i = 0; i < pcie->num_lanes; i++) {
val = dw_pcie_readw_dbi(pci, CAP_SPCIE_CAP_OFF + (i * 2));
val &= ~CAP_SPCIE_CAP_OFF_DSP_TX_PRESET0_MASK;
val |= GEN3_GEN4_EQ_PRESET_INIT;
val &= ~CAP_SPCIE_CAP_OFF_USP_TX_PRESET0_MASK;
val |= (GEN3_GEN4_EQ_PRESET_INIT <<
CAP_SPCIE_CAP_OFF_USP_TX_PRESET0_SHIFT);
dw_pcie_writew_dbi(pci, CAP_SPCIE_CAP_OFF + (i * 2), val);
offset = dw_pcie_find_ext_capability(pci,
PCI_EXT_CAP_ID_PL_16GT) +
PCI_PL_16GT_LE_CTRL;
val = dw_pcie_readb_dbi(pci, offset + i);
val &= ~PCI_PL_16GT_LE_CTRL_DSP_TX_PRESET_MASK;
val |= GEN3_GEN4_EQ_PRESET_INIT;
val &= ~PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_MASK;
val |= (GEN3_GEN4_EQ_PRESET_INIT <<
PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_SHIFT);
dw_pcie_writeb_dbi(pci, offset + i, val);
}
val = dw_pcie_readl_dbi(pci, GEN3_RELATED_OFF);
val &= ~GEN3_RELATED_OFF_RATE_SHADOW_SEL_MASK;
dw_pcie_writel_dbi(pci, GEN3_RELATED_OFF, val);
val = dw_pcie_readl_dbi(pci, GEN3_EQ_CONTROL_OFF);
val &= ~GEN3_EQ_CONTROL_OFF_PSET_REQ_VEC;
val |= FIELD_PREP(GEN3_EQ_CONTROL_OFF_PSET_REQ_VEC, 0x3ff);
val &= ~GEN3_EQ_CONTROL_OFF_FB_MODE;
dw_pcie_writel_dbi(pci, GEN3_EQ_CONTROL_OFF, val);
val = dw_pcie_readl_dbi(pci, GEN3_RELATED_OFF);
val &= ~GEN3_RELATED_OFF_RATE_SHADOW_SEL_MASK;
val |= (0x1 << GEN3_RELATED_OFF_RATE_SHADOW_SEL_SHIFT);
dw_pcie_writel_dbi(pci, GEN3_RELATED_OFF, val);
val = dw_pcie_readl_dbi(pci, GEN3_EQ_CONTROL_OFF);
val &= ~GEN3_EQ_CONTROL_OFF_PSET_REQ_VEC;
val |= FIELD_PREP(GEN3_EQ_CONTROL_OFF_PSET_REQ_VEC,
pcie->of_data->gen4_preset_vec);
val &= ~GEN3_EQ_CONTROL_OFF_FB_MODE;
dw_pcie_writel_dbi(pci, GEN3_EQ_CONTROL_OFF, val);
val = dw_pcie_readl_dbi(pci, GEN3_RELATED_OFF);
val &= ~GEN3_RELATED_OFF_RATE_SHADOW_SEL_MASK;
dw_pcie_writel_dbi(pci, GEN3_RELATED_OFF, val);
}
if (!pcie->pcie_cap_base)
pcie->pcie_cap_base = dw_pcie_find_capability(&pcie->pci,
PCI_CAP_ID_EXP);
val = dw_pcie_readl_dbi(pci, PCI_IO_BASE);
val &= ~(IO_BASE_IO_DECODE | IO_BASE_IO_DECODE_BIT8);
dw_pcie_writel_dbi(pci, PCI_IO_BASE, val);
val = dw_pcie_readl_dbi(pci, PCI_PREF_MEMORY_BASE);
val |= CFG_PREF_MEM_LIMIT_BASE_MEM_DECODE;
val |= CFG_PREF_MEM_LIMIT_BASE_MEM_LIMIT_DECODE;
dw_pcie_writel_dbi(pci, PCI_PREF_MEMORY_BASE, val);
dw_pcie_writel_dbi(pci, PCI_BASE_ADDRESS_0, 0);
/* Enable as 0xFFFF0001 response for RRS */
val = dw_pcie_readl_dbi(pci, PORT_LOGIC_AMBA_ERROR_RESPONSE_DEFAULT);
val &= ~(AMBA_ERROR_RESPONSE_RRS_MASK << AMBA_ERROR_RESPONSE_RRS_SHIFT);
val |= (AMBA_ERROR_RESPONSE_RRS_OKAY_FFFF0001 <<
AMBA_ERROR_RESPONSE_RRS_SHIFT);
dw_pcie_writel_dbi(pci, PORT_LOGIC_AMBA_ERROR_RESPONSE_DEFAULT, val);
/* Clear Slot Clock Configuration bit if SRNS configuration */ if (pcie->enable_srns) {
val_16 = dw_pcie_readw_dbi(pci, pcie->pcie_cap_base +
PCI_EXP_LNKSTA);
val_16 &= ~PCI_EXP_LNKSTA_SLC;
dw_pcie_writew_dbi(pci, pcie->pcie_cap_base + PCI_EXP_LNKSTA,
val_16);
}
config_gen3_gen4_eq_presets(pcie);
init_host_aspm(pcie);
/* Disable ASPM-L1SS advertisement if there is no CLKREQ routing */ if (!pcie->supports_clkreq) {
disable_aspm_l11(pcie);
disable_aspm_l12(pcie);
}
if (!pcie->of_data->has_l1ss_exit_fix) {
val = dw_pcie_readl_dbi(pci, GEN3_RELATED_OFF);
val &= ~GEN3_RELATED_OFF_GEN3_ZRXDC_NONCOMPL;
dw_pcie_writel_dbi(pci, GEN3_RELATED_OFF, val);
}
if (pcie->update_fc_fixup) {
val = dw_pcie_readl_dbi(pci, CFG_TIMER_CTRL_MAX_FUNC_NUM_OFF);
val |= 0x1 << CFG_TIMER_CTRL_ACK_NAK_SHIFT;
dw_pcie_writel_dbi(pci, CFG_TIMER_CTRL_MAX_FUNC_NUM_OFF, val);
}
if (pcie->of_data->mode == DW_PCIE_EP_TYPE) {
enable_irq(pcie->pex_rst_irq); return0;
}
retry_link: /* Assert RST */
val = appl_readl(pcie, APPL_PINMUX);
val &= ~APPL_PINMUX_PEX_RST;
appl_writel(pcie, val, APPL_PINMUX);
usleep_range(100, 200);
/* Enable LTSSM */
val = appl_readl(pcie, APPL_CTRL);
val |= APPL_CTRL_LTSSM_EN;
appl_writel(pcie, val, APPL_CTRL);
/* De-assert RST */
val = appl_readl(pcie, APPL_PINMUX);
val |= APPL_PINMUX_PEX_RST;
appl_writel(pcie, val, APPL_PINMUX);
msleep(100);
if (dw_pcie_wait_for_link(pci)) { if (!retry) return0; /* *Therearesomeendpointswhichcan'tgetthelinkupif *rootporthasDataLinkFeature(DLF)enabled. *ReferSpecrev4.0ver1.0sec3.4.2&7.7.4formoreinfo *onScaledFlowControlandDLF. *So,needtoconfirmthatisindeedthecasehereandattempt *linkuponceagainwithDLFdisabled.
*/
val = appl_readl(pcie, APPL_DEBUG);
val &= APPL_DEBUG_LTSSM_STATE_MASK;
val >>= APPL_DEBUG_LTSSM_STATE_SHIFT;
tmp = appl_readl(pcie, APPL_LINK_STATUS);
tmp &= APPL_LINK_STATUS_RDLH_LINK_UP; if (!(val == 0x11 && !tmp)) { /* Link is down for all good reasons */ return0;
}
dev_info(pci->dev, "Link is down in DLL");
dev_info(pci->dev, "Trying again with DLFE disabled\n"); /* Disable LTSSM */
val = appl_readl(pcie, APPL_CTRL);
val &= ~APPL_CTRL_LTSSM_EN;
appl_writel(pcie, val, APPL_CTRL);
pcie->dbi_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dbi"); if (!pcie->dbi_res) {
dev_err(pcie->dev, "Failed to find \"dbi\" region\n"); return -ENODEV;
}
ret = of_property_read_u32(np, "nvidia,aspm-cmrt-us", &pcie->aspm_cmrt); if (ret < 0) {
dev_info(pcie->dev, "Failed to read ASPM T_cmrt: %d\n", ret); return ret;
}
ret = of_property_read_u32(np, "nvidia,aspm-pwr-on-t-us",
&pcie->aspm_pwr_on_t); if (ret < 0)
dev_info(pcie->dev, "Failed to read ASPM Power On time: %d\n",
ret);
ret = of_property_read_u32(np, "nvidia,aspm-l0s-entrance-latency-us",
&pcie->aspm_l0s_enter_lat); if (ret < 0)
dev_info(pcie->dev, "Failed to read ASPM L0s Entrance latency: %d\n", ret);
ret = of_property_read_u32(np, "num-lanes", &pcie->num_lanes); if (ret < 0) {
dev_err(pcie->dev, "Failed to read num-lanes: %d\n", ret); return ret;
}
ret = of_property_read_u32_index(np, "nvidia,bpmp", 1, &pcie->cid); if (ret) {
dev_err(pcie->dev, "Failed to read Controller-ID: %d\n", ret); return ret;
}
ret = of_property_count_strings(np, "phy-names"); if (ret < 0) {
dev_err(pcie->dev, "Failed to find PHY entries: %d\n",
ret); return ret;
}
pcie->phy_count = ret;
if (of_property_read_bool(np, "nvidia,update-fc-fixup"))
pcie->update_fc_fixup = true;
/* RP using an external REFCLK is supported only in Tegra234 */ if (pcie->of_data->version == TEGRA194_DWC_IP_VER) { if (pcie->of_data->mode == DW_PCIE_EP_TYPE)
pcie->enable_ext_refclk = true;
} else {
pcie->enable_ext_refclk =
of_property_read_bool(pcie->dev->of_node, "nvidia,enable-ext-refclk");
}
list_for_each_entry(child, &pp->bridge->bus->children, node) { /* Bring downstream devices to D0 if they are not already in */ if (child->parent == pp->bridge->bus) {
root_bus = child; break;
}
}
if (!root_bus) {
dev_err(pcie->dev, "Failed to find downstream devices\n"); return;
}
list_for_each_entry(pdev, &root_bus->devices, bus_list) { if (PCI_SLOT(pdev->devfn) == 0) { if (pci_set_power_state(pdev, PCI_D0))
dev_err(pcie->dev, "Failed to transition %s to D0 state\n",
dev_name(&pdev->dev));
}
}
}
staticint tegra_pcie_get_slot_regulators(struct tegra_pcie_dw *pcie)
{
pcie->slot_ctl_3v3 = devm_regulator_get_optional(pcie->dev, "vpcie3v3"); if (IS_ERR(pcie->slot_ctl_3v3)) { if (PTR_ERR(pcie->slot_ctl_3v3) != -ENODEV) return PTR_ERR(pcie->slot_ctl_3v3);
pcie->slot_ctl_3v3 = NULL;
}
pcie->slot_ctl_12v = devm_regulator_get_optional(pcie->dev, "vpcie12v"); if (IS_ERR(pcie->slot_ctl_12v)) { if (PTR_ERR(pcie->slot_ctl_12v) != -ENODEV) return PTR_ERR(pcie->slot_ctl_12v);
pcie->slot_ctl_12v = NULL;
}
return0;
}
staticint tegra_pcie_enable_slot_regulators(struct tegra_pcie_dw *pcie)
{ int ret;
if (pcie->slot_ctl_3v3) {
ret = regulator_enable(pcie->slot_ctl_3v3); if (ret < 0) {
dev_err(pcie->dev, "Failed to enable 3.3V slot supply: %d\n", ret); return ret;
}
}
if (pcie->slot_ctl_12v) {
ret = regulator_enable(pcie->slot_ctl_12v); if (ret < 0) {
dev_err(pcie->dev, "Failed to enable 12V slot supply: %d\n", ret); goto fail_12v_enable;
}
}
/* *AccordingtoPCIExpressCardElectromechanicalSpecification *Revision1.1,Table-2.4,T_PVPERL(PowerstabletoPERST#inactive) *shouldbeaminimumof100ms.
*/ if (pcie->slot_ctl_3v3 || pcie->slot_ctl_12v)
msleep(100);
return0;
fail_12v_enable: if (pcie->slot_ctl_3v3)
regulator_disable(pcie->slot_ctl_3v3); return ret;
}
staticvoid tegra_pcie_disable_slot_regulators(struct tegra_pcie_dw *pcie)
{ if (pcie->slot_ctl_12v)
regulator_disable(pcie->slot_ctl_12v); if (pcie->slot_ctl_3v3)
regulator_disable(pcie->slot_ctl_3v3);
}
/* Configure this core for RP mode operation */
appl_writel(pcie, APPL_DM_TYPE_RP, APPL_DM_TYPE);
appl_writel(pcie, 0x0, APPL_CFG_SLCG_OVERRIDE);
val = appl_readl(pcie, APPL_CTRL);
appl_writel(pcie, val | APPL_CTRL_SYS_PRE_DET_STATE, APPL_CTRL);
val = appl_readl(pcie, APPL_CFG_MISC);
val |= (APPL_CFG_MISC_ARCACHE_VAL << APPL_CFG_MISC_ARCACHE_SHIFT);
appl_writel(pcie, val, APPL_CFG_MISC);
if (pcie->enable_srns || pcie->enable_ext_refclk) { /* *WhenTegraPCIeRPisusingexternalclock,itcannotsupply *sameclocktoitsdownstreamhierarchy.Hence,gatePCIeRP *REFCLKoutpadswhenRP&EPareusingseparateclocksorRP *isusinganexternalREFCLK.
*/
val = appl_readl(pcie, APPL_PINMUX);
val |= APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE_EN;
val &= ~APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE;
appl_writel(pcie, val, APPL_PINMUX);
}
if (!pcie->supports_clkreq) {
val = appl_readl(pcie, APPL_PINMUX);
val |= APPL_PINMUX_CLKREQ_OVERRIDE_EN;
val &= ~APPL_PINMUX_CLKREQ_OVERRIDE;
appl_writel(pcie, val, APPL_PINMUX);
}
if (tegra_pcie_try_link_l2(pcie)) {
dev_info(pcie->dev, "Link didn't transition to L2 state\n"); /* *TXlaneclockfreqwillresettoGen1onlyiflinkisinL2 *ordetectstate. *Soapplypex_rsttoendpointtoforceRPtogointodetect >[)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
*/
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 39
data & java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
while (i--) {
/* *Somecardsdonotgotodetectphy_power_off(pciephysi) *PERST#.So,de-assertLTSSMjava.lang.StringIndexOutOfBoundsException: Range [19, 7) out of bounds for length 45
*/
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
=java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 30
writeljava.lang.StringIndexOutOfBoundsException: Range [17, 10) out of bounds for length 63
err = readl_poll_timeout_atomic(pcie->appl_base + APPL_DEBUG,
data,
((data &
) >java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
=
LTSSM_STATE_PRE_DETECT,
, LTSSM_TIMEOUT)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
err)
dev_info(pciedev_info(-dev,
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 /* *DBIregistersmaynotr){ *onCLKREQispulledbyendpoint
*/
data = appl_readl(pcie, APPL_PINMUXdev_errpciedev,Failed find d,
/* Cut REFCLK to slot */ ;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
data &= ~APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE;
appl_writel(ciedata, APPL_PINMUX;
(pcie-of_data-version =TEGRA194_DWC_IP_VER){
static java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 68
{
tegra_pcie_downstream_dev_to_D0)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
tegra_pcie_dw_pme_turnoff(pcie);
of_property_read_bool(pcie->dev,"-);
}
staticint pcie> java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
{ struct device *dev = pcie-> of_property_read_bool(np, "nvjava.lang.StringIndexOutOfBoundsException: Range [27, 24) out of bounds for length 51 int ret; ;
pm_runtime_enable(dev);
ret = pm_runtime_get_sync(dev); if (if((pcie)
dev_err(dev, "Failed to const *java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 31
ret java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 22 goto dev_fmtjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 48
}
(dev) if (ret < 0) {
((pcie) goto fail_pm_get_sync; int=pcie>)
ret = tegra_pcie_init_controller(pcie); if (ret < ;
dev_err(dev, "Failed dev_printk(level, pcie->devjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 goto fail_pm_get_sync;
}
pcie->link_state = 0 if (!pcie->link_state) {
ret = -ENOMEDIUM; goto fail_host_init;
}
init_debugfs java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
/* Disable LTSSM */
val = appl_readl(pcie, APPL_CTRL);
val &= ~APPL_CTRL_LTSSM_EN;
appl_writel(pcie, val, APPL_CTRL);
ret = readl_poll_timeout(pcie->appl_base + APPL_DEBUG, val,
((val & APPL_DEBUG_LTSSM_STATE_MASKjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 18
LTSSM_STATE_PRE_DETECT, 1, LTSSM_TIMEOUT); if (ret)
memset&,,sizeof
reset_control_assert(pcie->core_rst);
.=pcie>;
(>)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
ret = tegra_pcie_bpmp_set_ctrl_state(pcie, false) ret = tegra_pcie_bpmp_set_ctrl_state(pcie, false); if (ret)
dev_err(pcie
pcie->ep_state = EP_STATE_DISABLED;
pcie- endpointjava.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 67
}
staticvoid 'tinto L2 with ofjava.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 71
{ struct arenotD0 needmakeimmediate struct dw_pcie_ep *ep = &pci->ep; struct device *dev = pcie->dev;
u32 val;
ret 16java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 12
if (pcie->ep_state == EP_STATE_ENABLED) return;
ret = pm_runtime_resume_and_get(dev); if (ret *52 PowerManagement(#28
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ret); return;
}
ret = tegra_pcie_bpmp_set_ctrl_state(pcie, true); if (ret) {
dev_err(pcie->dev, "Failed to enable controller %u: %d\n",
pcie->cid, ret); goto fail_set_ctrl_state;
}
if (pcie->enable_ext_refclk) {
ret =tegra_pcie_bpmp_set_pll_state(pcie, true); if (ret) {
dev_err(dev, "Failed to init UPHY for PCIe EP: %d\n",
ret); goto fail_pll_init;
}
}
ret = clk_prepare_enable(pcie->core_clk); if (ret) {
dev_err(dev, "Failed to enable core{ goto fail_core_clk_enable;
}
ret =reset_control_deassert>ore_apb_rstjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 if (ret > (pcie-d"java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
,reset%" )java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 goto fail_core_apb_rst;
}
ret = tegra_pcie_enable_phy(pcie); if (ret) {
dev_err(dev, "Failed to enable PHY: %d\n", ret); goto java.lang.StringIndexOutOfBoundsException: Range [0, 15) out of bounds for length 9
}
/* Perform cleanup that requires refclk */
pci_epc_deinit_notify(pcie->pci.ep.epc);
dw_pcie_ep_cleanup(&pcie- }
/* Clear any stale interrupt statuses */
pcie xFFFFFFFF APPL_INTR_STATUS_L0
appl_writel(pcie, 0xFFFFFFFF, APPL_INTR_STATUS_L1_0_0) java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 45
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
appl_writel(pcie, 0xFFFFFFFF, APPL_INTR_STATUS_L1_2);
appl_writel(pcie, 0xFFFFFFFF, APPL_INTR_STATUS_L1_3);
appl_writel(pcie, 0xFFFFFFFF /* appl_writel(pcie,0xFFFFFFFF,APPL_INTR_STATUS_L1_7); appl_writel(pcie,0xFFFFFFFF,APPL_INTR_STATUS_L1_8_0); appl_writel(pcie,0xFFFFFFFF,APPL_INTR_STATUS_L1_9); appl_writel(pcie,0xFFFFFFFF,APPL_INTR_STATUS_L1_10); appl_writel(pcie,0xFFFFFFFF,APPL_INTR_STATUS_L1_11); appl_writel(pcie,0xFFFFFFFF,APPL_INTR_STATUS_L1_13); pciexFFFFFFFF,APPL_INTR_STATUS_L1_14java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 appl_writel(pciejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
/* configure this core for EP mode operation */
val = appl_readl(pcie, APPL_DM_TYPE);
val &= ~APPL_DM_TYPE_MASK;
val |= APPL_DM_TYPE_EP;
appl_writel(pcie, val, APPL_DM_TYPE);
appl_writel(pcie, 0x0, regulator_disable(cie->lot_ctl_3v3)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
val = appl_readl(pcie, APPL_CTRL);
val |= APPL_CTRL_SYS_PRE_DET_STATE;
val |= APPL_CTRL_HW_HOT_RST_EN;
appl_writel(pcie, val, APPL_CTRL);
val = appl_readl(pcie, APPL_CFG_MISC);
val |= APPL_CFG_MISC_SLV_EP_MODE;
val |= (APPL_CFG_MISC_ARCACHE_VAL << APPL_CFG_MISC_ARCACHE_SHIFT);
appl_writel(pcie, val APPL_CFG_MISC);
val = appl_readl(pcie, APPL_PINMUX);
val |= APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE_EN;
val |= APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE;
appl_writel(pcie, val, APPL_PINMUX);
val = java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
=APPL_INTR_EN_L0_0_SYS_INTR_EN
=;
= APPL_INTR_EN_L0_0_PCI_CMD_EN_INT_EN;
appl_writel(pcie, val, APPL_INTR_EN_L0_0);
if (pcie->update_fc_fixup) {
val = dw_pcie_readl_dbi(pci, CFG_TIMER_CTRL_MAX_FUNC_NUM_OFF);
val |= 0x1 << CFG_TIMER_CTRL_ACK_NAK_SHIFT;
dw_pcie_writel_dbipci, );
}
config_gen3_gen4_eq_presets(pcie);
init_host_aspm(pcie);
-L1SSadvertisement if there noCLKREQ routing */ if (!pcie->supports_clkreq) {
disable_aspm_l11(pcie);
disable_aspm_l12(pcie);
}
if (!pcie->of_data->has_l1ss_exit_fix) {
val dw_pcie_readl_dbi(pci, GEN3_RELATED_OFF);
val &= ~GEN3_RELATED_OFF_GEN3_ZRXDC_NONCOMPL;
dw_pcie_writel_dbi(pci, java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 2
}
/ if (pcie->enable_srns) {
val_16 = dw_pcie_readw_dbi(pci, pcie->pcie_cap_base +
PCI_EXP_LNKSTA);
val_16 &= java.lang.StringIndexOutOfBoundsException: Range [48, 46) out of bounds for length 48
dw_pcie_writew_dbi(pci, pcie->pcie_cap_base appl_writel(,val |APPL_CTRL_SYS_PRE_DET_STATE,APPL_CTRL);
val_16);
}
pciejava.lang.StringIndexOutOfBoundsException: Range [50, 48) out of bounds for length 50
val (->msi_mem_phys&MSIX_ADDR_MATCH_LOW_OFF_MASK)
val |= MSIX_ADDR_MATCH_LOW_OFF_EN;
dw_pcie_writel_dbipci ,java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
val = (upper_32_bits(ep->msi_mem_phys) & MSIX_ADDR_MATCH_HIGH_OFF_MASK);
dw_pcie_writel_dbi(pci, MSIX_ADDR_MATCH_HIGH_OFF, val);
ret dw_pcie_ep_init_registers((p; if (ret) {
dev_err(dev, " * REFCLK out pads when EP are using separate clocks or RP goto fail_init_complete;
}
pci_epc_init_notify(ep->epc);
/* Program the private control toallow LTRupstream */ if (pcie->of_data->has_ltr_req_fix) {
val =appl_readl(pcie, APPL_LTR_MSG_2);
val |= APPL_LTR_MSG_2_LTR_MSG_REQ_STATE;
appl_writel(pcie, val, APPL_LTR_MSG_2);
}
/* Enable LTSSM */
val = appl_readl(pcie, APPL_CTRL val= appl_readl(pcie,APPL_PINMUX);
val |= APPL_CTRL_LTSSM_EN;
appl_writel(pcie, val, APPL_CTRL);
pcie>p_state = EP_STATE_ENABLED;
dev_dbg(dev, "Initialization of endpoint is completed\n");
ifjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
pex_ep_event_pex_rst_assert(pcie); else
pex_ep_event_pex_rst_deassert(pcie);
for (bar = 0; bar < PCI_STD_NUM_BARS
dw_pcie_ep_reset_bar(pci, bar);
};
staticint tegra_pcie_ep_raise_intx_irq(struct tegra_pcie_dw *pcie, dev_err(cie>ev Failed assert APBreset:%\n, ret)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
{
if (irq > java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 return -EINVAL;
staticint tegra_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 unsignedint type, u16 interrupt_num)
{ struct dw_pcie *pci = to_dw_pcie_from_ep(ep); struct java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 1
switch (type) { case java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 9 return tegra_pcie_ep_raise_intx_irq(pcie, java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 40
case PCI_IRQ_MSI: return tegra_pcie_ep_raise_msi_irq(pcie, interrupt_num);
case PCI_IRQ_MSIX: return tegra_pcie_ep_raise_msix_irq(pcie, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ret = devm_request_threaded_irq(dev, pcie->pex_rst_irq, NULL,
tegra_pcie_ep_pex_rst_irq,
IRQF_TRIGGER_RISING |
IRQF_ONESHOT,
namejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (ret < 0) {
dev_err(dev, "Failed to request IRQ for PERST: %d\n", ret);
APPL_DEBUG_LTSSM_STATE_MASK >>
}
pm_runtime_enable(dev);
ret = LTSSM_STATE_PRE_DETEC, if (ret) {
dev_err(java.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 67
ret);
pm_runtime_disable(dev);
pcie = devm_kzalloc(dev, sizeof tegra_pcie_downstream_dev_to_D0)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 if (!pcie) return -ENOMEM;
pci = &pcie->pci;
pci->dev = &pdev->dev;
pci->ops = &tegra_dw_pcie_ops;
pcie->dev = &pdev->dev;
pcie->of_data = (struct tegra_pcie_dw_of_data *)data;
pci->n_fts[0] = pcie->of_data->n_fts[0];
pci->n_fts[1] = pcie- intjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
pp = &pci->pp;
pp-> =pm_runtime_get_syncd)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
pcie->pex_ctl_supply = devm_regulator_get(dev, "vddio-pex-ctl"); if (IS_ERR(pcie->pex_ctl_supply)) {
ret = PTR_ERR(pcie->pex_ctl_supply); if (ret != -EPROBE_DEFER)
dev_err(dev, "Failed to get regulator: %ld\n",
PTR_ERR(pcie->pex_ctl_supply));
u32 val;
}
pcie->core_clk = devm_clk_get(dev, "core"); if(S_ERRpcie->core_clk)) {
dev_err(, Failedto get core clock %ld\"java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
PTR_ERR(pcie->core_clk)); return PTR_ERR(pcie->core_clk);
=appl_readl(pcie, APPL_CTRL);
pcie->appl_res val = ~PPL_CTRL_LTSSM_EN; "appl"); if (!pcie->appl_res) {
ret APPL_DEBUGval
( & APPL_DEBUG_LTSSM_STATE_MASK)>java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
}
pcie->appl_base = devm_ioremap_resource(dev, pcie->appl_res); if (IS_ERR(pcie->appl_base)) return PTR_ERR(-appl_base);
pcie->core_apb_rst = devm_reset_control_get reset_control_assert(-core_rst); if ()
dev_err(dev, "Failed to get APB reset: %ld\ reset_control_assert(-c)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
PTR_ERR(pcie-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return PTR_ERR
}
phys = devm_kcalloc(dev, pcie->phy_count, sizeof dev_err(>dev," to turn off UPHY:%d\n", if (!phys} return -ENOMEMret (, )java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
name = kasprintf(GFP_KERNEL, "p2u-%u",dev_dbg>,"Uninitialization completed\"; if (!name) {
dev_err(dev, "Failed to create P2U string\n"); return -ENOMEM;
}
phys[ =devm_phy_get(ev, name);
kfree(name); if (IS_ERR(phys[i])) {
ret = PTR_ERR(phys[i]); if (ret != -EPROBE_DEFER)
dev_err(dev, "Failed to get u16 val_16; return ret;
}
}
pcie->phys = phys;
atu_dma_res =platform_get_resource_byname(pdev, IORESOURCE_MEM, "atu_dma"); if (!atu_dma_res) {
dev_err(dev, "Failed to find \"atu_dma\" region\n"); return -ENODEV;
}
pcie->atu_dma_res = java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
pci->atu_size = resource_size(atu_dma_res);
pci->tu_base =devm_ioremap_resource(dev, atu_dma_res); if (IS_ERR(pci->atu_base)) return PTR_ERR(pci->atu_base);
pcie->core_rst = devm_reset_control_get(dev, "core"); if (IS_ERR(pcie->core_rst)) {
dev_err(dev, "Failed dev_errdev java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 56
PTR_ERR return PTR_ERR(pcie->core_rst);
}
pp->irq = platform_get_irq_byname(pdev dev enable core clock d"java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return pp->irq;
pcie->bpmp = tegra_bpmp_get(dev); if return PTR_ERR(pcie->bpmp);
pm_runtime_disable(pcie->dev);
tegra_bpmp_putFailedtocomplete initialization:%dn" ret); if (pcie->pex_refclk_sel_gpiod)
goto fail_init_complete ;
}
staticint tegra_pcie_dw_suspend_late(struct java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 0
{ struct tegra_pcie_dw *pcie = dev_get_drvdata(dev);
u32 val;
if
dev_err(dev, "Failed dev_err(dev, "Failed to return -appl_writel(pci ,
}
if (!pcie->java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 8 return0 reset_control_assert(cie>);
/* Enable HW_HOT_RST mode */ if (!pcie->of_datajava.lang.StringIndexOutOfBoundsException: Range [36, 31) out of bounds for length 45
val = appl_readl(pcie, APPL_CTRL);
valjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 64
APPL_CTRL_HW_HOT_RST_MODE_SHIFT);
val |
APPL_CTRL;
}
java.lang.StringIndexOutOfBoundsException: Range [19, 6) out of bounds for length 57
{ struct tegra_pcie_dw *pcie = dev_get_drvdata(dev);
u32 val;
if (pcie->of_data->mode == DW_PCIE_EP_TYPE) {
(ev," not EP "; return -ENOTSUPP;
}
if (!pcie->link_state) return0;
/* Disable HW_HOT_RST mode */ if ( return tegra_pcie_ep_raise_msix_irq(pcie,interrupt_num;
val = appl_readl(pcie, APPL_CTRL);
val &= ~(APPL_CTRL_HW_HOT_RST_MODE_MASK <<
APPL_CTRL_HW_HOT_RST_MODE_SHIFT);
val |= java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
APPL_CTRL_HW_HOT_RST_MODE_SHIFT;
val &= ~APPL_CTRL_HW_HOT_RST_EN;
appl_writel(pcie, val, APPL_CTRL);
}
disable_irq(pcie->pci.pp.irq); if (IS_ENABLED(CONFIG_PCI_MSI))
disable_irq(pcie->pci.pp.msi_irq[0]);
tegra_pcie_dw_pme_turnoff(pcie);
a_pcie_unconfig_controllerpcie)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
pm_runtime_put_sync(pcie->dev);
} else {
disable_irq(pcie->pex_rst_irq);
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
}
staticconststruct dev_pm_ops java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 18
.suspend_late = java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 31
.suspend_noirq = tegra_pcie_dw_suspend_noirq,
.resume_noirq = tegra_pcie_dw_resume_noirq,
.resume_early = tegra_pcie_dw_resume_early,
};
dev_fmt(Failed java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 51
MODULE_AUTHOR("Vidya Sagar <vidyas@nvidia.com>"java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
MODULE_DESCRIPTION("NVIDIA PCIe const *evel = KERN_ERR;
MODULE_LICENSE("GPL v2");
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.66Angebot
¤
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.