tegra 179 drivers/ata/ahci_tegra.c struct tegra_ahci_priv *tegra = hpriv->plat_data; tegra 182 drivers/ata/ahci_tegra.c if (tegra->sata_aux_regs && !tegra->soc->supports_devslp) { tegra 183 drivers/ata/ahci_tegra.c val = readl(tegra->sata_aux_regs + SATA_AUX_MISC_CNTL_1_0); tegra 185 drivers/ata/ahci_tegra.c writel(val, tegra->sata_aux_regs + SATA_AUX_MISC_CNTL_1_0); tegra 191 drivers/ata/ahci_tegra.c struct tegra_ahci_priv *tegra = hpriv->plat_data; tegra 203 drivers/ata/ahci_tegra.c writel(BIT(0), tegra->sata_regs + SCFG_OFFSET + T_SATA0_INDEX); tegra 205 drivers/ata/ahci_tegra.c val = readl(tegra->sata_regs + tegra 211 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SCFG_OFFSET + tegra 214 drivers/ata/ahci_tegra.c val = readl(tegra->sata_regs + tegra 220 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SCFG_OFFSET + tegra 224 drivers/ata/ahci_tegra.c tegra->sata_regs + SCFG_OFFSET + T_SATA0_CHX_PHY_CTRL11); tegra 226 drivers/ata/ahci_tegra.c tegra->sata_regs + SCFG_OFFSET + T_SATA0_CHX_PHY_CTRL2); tegra 228 drivers/ata/ahci_tegra.c writel(0, tegra->sata_regs + SCFG_OFFSET + T_SATA0_INDEX); tegra 235 drivers/ata/ahci_tegra.c struct tegra_ahci_priv *tegra = hpriv->plat_data; tegra 238 drivers/ata/ahci_tegra.c ret = regulator_bulk_enable(tegra->soc->num_supplies, tegra 239 drivers/ata/ahci_tegra.c tegra->supplies); tegra 244 drivers/ata/ahci_tegra.c tegra->sata_clk, tegra 245 drivers/ata/ahci_tegra.c tegra->sata_rst); tegra 249 drivers/ata/ahci_tegra.c reset_control_assert(tegra->sata_oob_rst); tegra 250 drivers/ata/ahci_tegra.c reset_control_assert(tegra->sata_cold_rst); tegra 256 drivers/ata/ahci_tegra.c reset_control_deassert(tegra->sata_cold_rst); tegra 257 drivers/ata/ahci_tegra.c reset_control_deassert(tegra->sata_oob_rst); tegra 262 drivers/ata/ahci_tegra.c clk_disable_unprepare(tegra->sata_clk); tegra 267 drivers/ata/ahci_tegra.c regulator_bulk_disable(tegra->soc->num_supplies, tegra->supplies); tegra 274 drivers/ata/ahci_tegra.c struct tegra_ahci_priv *tegra = hpriv->plat_data; tegra 278 drivers/ata/ahci_tegra.c reset_control_assert(tegra->sata_rst); tegra 279 drivers/ata/ahci_tegra.c reset_control_assert(tegra->sata_oob_rst); tegra 280 drivers/ata/ahci_tegra.c reset_control_assert(tegra->sata_cold_rst); tegra 282 drivers/ata/ahci_tegra.c clk_disable_unprepare(tegra->sata_clk); tegra 285 drivers/ata/ahci_tegra.c regulator_bulk_disable(tegra->soc->num_supplies, tegra->supplies); tegra 290 drivers/ata/ahci_tegra.c struct tegra_ahci_priv *tegra = hpriv->plat_data; tegra 296 drivers/ata/ahci_tegra.c dev_err(&tegra->pdev->dev, tegra 305 drivers/ata/ahci_tegra.c val = readl(tegra->sata_regs + SATA_FPCI_BAR5); tegra 308 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SATA_FPCI_BAR5); tegra 311 drivers/ata/ahci_tegra.c val = readl(tegra->sata_regs + SATA_CONFIGURATION_0); tegra 313 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SATA_CONFIGURATION_0); tegra 317 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CHX_PHY_CTRL17_0); tegra 319 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CHX_PHY_CTRL18_0); tegra 321 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CHX_PHY_CTRL20_0); tegra 323 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CHX_PHY_CTRL21_0); tegra 327 drivers/ata/ahci_tegra.c val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA_CFG_PHY_0); tegra 330 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA_CFG_PHY_0); tegra 332 drivers/ata/ahci_tegra.c val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_NVOOB); tegra 339 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_NVOOB); tegra 344 drivers/ata/ahci_tegra.c val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG2NVOOB_2); tegra 347 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG2NVOOB_2); tegra 349 drivers/ata/ahci_tegra.c if (tegra->soc->ops && tegra->soc->ops->init) tegra 350 drivers/ata/ahci_tegra.c tegra->soc->ops->init(hpriv); tegra 356 drivers/ata/ahci_tegra.c val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_1); tegra 359 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_1); tegra 361 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_9); tegra 364 drivers/ata/ahci_tegra.c val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_SATA); tegra 366 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_SATA); tegra 368 drivers/ata/ahci_tegra.c val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_BKDOOR_CC); tegra 373 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_BKDOOR_CC); tegra 375 drivers/ata/ahci_tegra.c val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_SATA); tegra 377 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_SATA); tegra 380 drivers/ata/ahci_tegra.c val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_AHCI_HBA_CAP_BKDR); tegra 385 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_AHCI_HBA_CAP_BKDR); tegra 391 drivers/ata/ahci_tegra.c val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_35); tegra 394 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_35); tegra 397 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_AHCI_IDP1); tegra 399 drivers/ata/ahci_tegra.c val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_PHY_1); tegra 402 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_PHY_1); tegra 405 drivers/ata/ahci_tegra.c val = readl(tegra->sata_regs + SATA_CONFIGURATION_0); tegra 407 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SATA_CONFIGURATION_0); tegra 413 drivers/ata/ahci_tegra.c val = readl(tegra->sata_regs + SATA_INTR_MASK); tegra 415 drivers/ata/ahci_tegra.c writel(val, tegra->sata_regs + SATA_INTR_MASK); tegra 483 drivers/ata/ahci_tegra.c struct tegra_ahci_priv *tegra; tegra 492 drivers/ata/ahci_tegra.c tegra = devm_kzalloc(&pdev->dev, sizeof(*tegra), GFP_KERNEL); tegra 493 drivers/ata/ahci_tegra.c if (!tegra) tegra 496 drivers/ata/ahci_tegra.c hpriv->plat_data = tegra; tegra 498 drivers/ata/ahci_tegra.c tegra->pdev = pdev; tegra 499 drivers/ata/ahci_tegra.c tegra->soc = of_device_get_match_data(&pdev->dev); tegra 502 drivers/ata/ahci_tegra.c tegra->sata_regs = devm_ioremap_resource(&pdev->dev, res); tegra 503 drivers/ata/ahci_tegra.c if (IS_ERR(tegra->sata_regs)) tegra 504 drivers/ata/ahci_tegra.c return PTR_ERR(tegra->sata_regs); tegra 511 drivers/ata/ahci_tegra.c tegra->sata_aux_regs = devm_ioremap_resource(&pdev->dev, res); tegra 512 drivers/ata/ahci_tegra.c if (IS_ERR(tegra->sata_aux_regs)) tegra 513 drivers/ata/ahci_tegra.c return PTR_ERR(tegra->sata_aux_regs); tegra 516 drivers/ata/ahci_tegra.c tegra->sata_rst = devm_reset_control_get(&pdev->dev, "sata"); tegra 517 drivers/ata/ahci_tegra.c if (IS_ERR(tegra->sata_rst)) { tegra 519 drivers/ata/ahci_tegra.c return PTR_ERR(tegra->sata_rst); tegra 522 drivers/ata/ahci_tegra.c tegra->sata_oob_rst = devm_reset_control_get(&pdev->dev, "sata-oob"); tegra 523 drivers/ata/ahci_tegra.c if (IS_ERR(tegra->sata_oob_rst)) { tegra 525 drivers/ata/ahci_tegra.c return PTR_ERR(tegra->sata_oob_rst); tegra 528 drivers/ata/ahci_tegra.c tegra->sata_cold_rst = devm_reset_control_get(&pdev->dev, "sata-cold"); tegra 529 drivers/ata/ahci_tegra.c if (IS_ERR(tegra->sata_cold_rst)) { tegra 531 drivers/ata/ahci_tegra.c return PTR_ERR(tegra->sata_cold_rst); tegra 534 drivers/ata/ahci_tegra.c tegra->sata_clk = devm_clk_get(&pdev->dev, "sata"); tegra 535 drivers/ata/ahci_tegra.c if (IS_ERR(tegra->sata_clk)) { tegra 537 drivers/ata/ahci_tegra.c return PTR_ERR(tegra->sata_clk); tegra 540 drivers/ata/ahci_tegra.c tegra->supplies = devm_kcalloc(&pdev->dev, tegra 541 drivers/ata/ahci_tegra.c tegra->soc->num_supplies, tegra 542 drivers/ata/ahci_tegra.c sizeof(*tegra->supplies), GFP_KERNEL); tegra 543 drivers/ata/ahci_tegra.c if (!tegra->supplies) tegra 546 drivers/ata/ahci_tegra.c for (i = 0; i < tegra->soc->num_supplies; i++) tegra 547 drivers/ata/ahci_tegra.c tegra->supplies[i].supply = tegra->soc->supply_names[i]; tegra 550 drivers/ata/ahci_tegra.c tegra->soc->num_supplies, tegra 551 drivers/ata/ahci_tegra.c tegra->supplies); tegra 90 drivers/clk/tegra/clk-emc.c struct tegra_clk_emc *tegra; tegra 93 drivers/clk/tegra/clk-emc.c tegra = container_of(hw, struct tegra_clk_emc, hw); tegra 101 drivers/clk/tegra/clk-emc.c val = readl(tegra->clk_regs + CLK_SOURCE_EMC); tegra 114 drivers/clk/tegra/clk-emc.c struct tegra_clk_emc *tegra; tegra 119 drivers/clk/tegra/clk-emc.c tegra = container_of(hw, struct tegra_clk_emc, hw); tegra 121 drivers/clk/tegra/clk-emc.c for (k = 0; k < tegra->num_timings; k++) { tegra 122 drivers/clk/tegra/clk-emc.c if (tegra->timings[k].ram_code == ram_code) tegra 126 drivers/clk/tegra/clk-emc.c for (t = k; t < tegra->num_timings; t++) { tegra 127 drivers/clk/tegra/clk-emc.c if (tegra->timings[t].ram_code != ram_code) tegra 132 drivers/clk/tegra/clk-emc.c timing = tegra->timings + i; tegra 139 drivers/clk/tegra/clk-emc.c req->rate = tegra->timings[i - 1].rate; tegra 161 drivers/clk/tegra/clk-emc.c struct tegra_clk_emc *tegra; tegra 164 drivers/clk/tegra/clk-emc.c tegra = container_of(hw, struct tegra_clk_emc, hw); tegra 166 drivers/clk/tegra/clk-emc.c val = readl(tegra->clk_regs + CLK_SOURCE_EMC); tegra 172 drivers/clk/tegra/clk-emc.c static struct tegra_emc *emc_ensure_emc_driver(struct tegra_clk_emc *tegra) tegra 176 drivers/clk/tegra/clk-emc.c if (tegra->emc) tegra 177 drivers/clk/tegra/clk-emc.c return tegra->emc; tegra 179 drivers/clk/tegra/clk-emc.c if (!tegra->emc_node) tegra 182 drivers/clk/tegra/clk-emc.c pdev = of_find_device_by_node(tegra->emc_node); tegra 189 drivers/clk/tegra/clk-emc.c of_node_put(tegra->emc_node); tegra 190 drivers/clk/tegra/clk-emc.c tegra->emc_node = NULL; tegra 192 drivers/clk/tegra/clk-emc.c tegra->emc = platform_get_drvdata(pdev); tegra 193 drivers/clk/tegra/clk-emc.c if (!tegra->emc) { tegra 198 drivers/clk/tegra/clk-emc.c return tegra->emc; tegra 201 drivers/clk/tegra/clk-emc.c static int emc_set_timing(struct tegra_clk_emc *tegra, tegra 208 drivers/clk/tegra/clk-emc.c struct tegra_emc *emc = emc_ensure_emc_driver(tegra); tegra 216 drivers/clk/tegra/clk-emc.c if (emc_get_parent(&tegra->hw) == timing->parent_index && tegra 225 drivers/clk/tegra/clk-emc.c tegra->changing_timing = true; tegra 248 drivers/clk/tegra/clk-emc.c spin_lock_irqsave(tegra->lock, flags); tegra 250 drivers/clk/tegra/clk-emc.c car_value = readl(tegra->clk_regs + CLK_SOURCE_EMC); tegra 258 drivers/clk/tegra/clk-emc.c writel(car_value, tegra->clk_regs + CLK_SOURCE_EMC); tegra 260 drivers/clk/tegra/clk-emc.c spin_unlock_irqrestore(tegra->lock, flags); tegra 264 drivers/clk/tegra/clk-emc.c clk_hw_reparent(&tegra->hw, __clk_get_hw(timing->parent)); tegra 265 drivers/clk/tegra/clk-emc.c clk_disable_unprepare(tegra->prev_parent); tegra 267 drivers/clk/tegra/clk-emc.c tegra->prev_parent = timing->parent; tegra 268 drivers/clk/tegra/clk-emc.c tegra->changing_timing = false; tegra 279 drivers/clk/tegra/clk-emc.c static struct emc_timing *get_backup_timing(struct tegra_clk_emc *tegra, tegra 286 drivers/clk/tegra/clk-emc.c for (i = timing_index+1; i < tegra->num_timings; i++) { tegra 287 drivers/clk/tegra/clk-emc.c timing = tegra->timings + i; tegra 293 drivers/clk/tegra/clk-emc.c tegra->timings[timing_index].parent_index]) tegra 298 drivers/clk/tegra/clk-emc.c timing = tegra->timings + i; tegra 304 drivers/clk/tegra/clk-emc.c tegra->timings[timing_index].parent_index]) tegra 314 drivers/clk/tegra/clk-emc.c struct tegra_clk_emc *tegra; tegra 319 drivers/clk/tegra/clk-emc.c tegra = container_of(hw, struct tegra_clk_emc, hw); tegra 329 drivers/clk/tegra/clk-emc.c if (tegra->changing_timing) tegra 332 drivers/clk/tegra/clk-emc.c for (i = 0; i < tegra->num_timings; i++) { tegra 333 drivers/clk/tegra/clk-emc.c if (tegra->timings[i].rate == rate && tegra 334 drivers/clk/tegra/clk-emc.c tegra->timings[i].ram_code == ram_code) { tegra 335 drivers/clk/tegra/clk-emc.c timing = tegra->timings + i; tegra 355 drivers/clk/tegra/clk-emc.c backup_timing = get_backup_timing(tegra, i); tegra 364 drivers/clk/tegra/clk-emc.c err = emc_set_timing(tegra, backup_timing); tegra 371 drivers/clk/tegra/clk-emc.c return emc_set_timing(tegra, timing); tegra 376 drivers/clk/tegra/clk-emc.c static int load_one_timing_from_dt(struct tegra_clk_emc *tegra, tegra 436 drivers/clk/tegra/clk-emc.c static int load_timings_from_dt(struct tegra_clk_emc *tegra, tegra 446 drivers/clk/tegra/clk-emc.c size = (tegra->num_timings + child_count) * sizeof(struct emc_timing); tegra 448 drivers/clk/tegra/clk-emc.c tegra->timings = krealloc(tegra->timings, size, GFP_KERNEL); tegra 449 drivers/clk/tegra/clk-emc.c if (!tegra->timings) tegra 452 drivers/clk/tegra/clk-emc.c timings_ptr = tegra->timings + tegra->num_timings; tegra 453 drivers/clk/tegra/clk-emc.c tegra->num_timings += child_count; tegra 458 drivers/clk/tegra/clk-emc.c err = load_one_timing_from_dt(tegra, timing, child); tegra 483 drivers/clk/tegra/clk-emc.c struct tegra_clk_emc *tegra; tegra 490 drivers/clk/tegra/clk-emc.c tegra = kcalloc(1, sizeof(*tegra), GFP_KERNEL); tegra 491 drivers/clk/tegra/clk-emc.c if (!tegra) tegra 494 drivers/clk/tegra/clk-emc.c tegra->clk_regs = base; tegra 495 drivers/clk/tegra/clk-emc.c tegra->lock = lock; tegra 497 drivers/clk/tegra/clk-emc.c tegra->num_timings = 0; tegra 509 drivers/clk/tegra/clk-emc.c err = load_timings_from_dt(tegra, node, node_ram_code); tegra 516 drivers/clk/tegra/clk-emc.c if (tegra->num_timings == 0) tegra 519 drivers/clk/tegra/clk-emc.c tegra->emc_node = of_parse_phandle(np, tegra 521 drivers/clk/tegra/clk-emc.c if (!tegra->emc_node) tegra 530 drivers/clk/tegra/clk-emc.c tegra->hw.init = &init; tegra 532 drivers/clk/tegra/clk-emc.c clk = clk_register(NULL, &tegra->hw); tegra 536 drivers/clk/tegra/clk-emc.c tegra->prev_parent = clk_hw_get_parent_by_index( tegra 537 drivers/clk/tegra/clk-emc.c &tegra->hw, emc_get_parent(&tegra->hw))->clk; tegra 538 drivers/clk/tegra/clk-emc.c tegra->changing_timing = false; tegra 40 drivers/devfreq/tegra20-devfreq.c struct tegra_devfreq *tegra = dev_get_drvdata(dev); tegra 41 drivers/devfreq/tegra20-devfreq.c struct devfreq *devfreq = tegra->devfreq; tegra 53 drivers/devfreq/tegra20-devfreq.c err = clk_set_min_rate(tegra->emc_clock, rate); tegra 57 drivers/devfreq/tegra20-devfreq.c err = clk_set_rate(tegra->emc_clock, 0); tegra 64 drivers/devfreq/tegra20-devfreq.c clk_set_min_rate(tegra->emc_clock, devfreq->previous_freq); tegra 72 drivers/devfreq/tegra20-devfreq.c struct tegra_devfreq *tegra = dev_get_drvdata(dev); tegra 84 drivers/devfreq/tegra20-devfreq.c stat->busy_time = readl_relaxed(tegra->regs + MC_STAT_EMC_COUNT); tegra 85 drivers/devfreq/tegra20-devfreq.c stat->total_time = readl_relaxed(tegra->regs + MC_STAT_EMC_CLOCKS) / 8; tegra 86 drivers/devfreq/tegra20-devfreq.c stat->current_frequency = clk_get_rate(tegra->emc_clock); tegra 88 drivers/devfreq/tegra20-devfreq.c writel_relaxed(EMC_GATHER_CLEAR, tegra->regs + MC_STAT_CONTROL); tegra 89 drivers/devfreq/tegra20-devfreq.c writel_relaxed(EMC_GATHER_ENABLE, tegra->regs + MC_STAT_CONTROL); tegra 124 drivers/devfreq/tegra20-devfreq.c struct tegra_devfreq *tegra; tegra 138 drivers/devfreq/tegra20-devfreq.c tegra = devm_kzalloc(&pdev->dev, sizeof(*tegra), GFP_KERNEL); tegra 139 drivers/devfreq/tegra20-devfreq.c if (!tegra) tegra 143 drivers/devfreq/tegra20-devfreq.c tegra->emc_clock = devm_clk_get(&pdev->dev, "emc"); tegra 144 drivers/devfreq/tegra20-devfreq.c if (IS_ERR(tegra->emc_clock)) { tegra 145 drivers/devfreq/tegra20-devfreq.c err = PTR_ERR(tegra->emc_clock); tegra 150 drivers/devfreq/tegra20-devfreq.c tegra->regs = mc->regs; tegra 152 drivers/devfreq/tegra20-devfreq.c max_rate = clk_round_rate(tegra->emc_clock, ULONG_MAX); tegra 155 drivers/devfreq/tegra20-devfreq.c rate = clk_round_rate(tegra->emc_clock, rate); tegra 169 drivers/devfreq/tegra20-devfreq.c writel_relaxed(0x00000000, tegra->regs + MC_STAT_CONTROL); tegra 170 drivers/devfreq/tegra20-devfreq.c writel_relaxed(0x00000000, tegra->regs + MC_STAT_EMC_CONTROL); tegra 171 drivers/devfreq/tegra20-devfreq.c writel_relaxed(0xffffffff, tegra->regs + MC_STAT_EMC_CLOCK_LIMIT); tegra 173 drivers/devfreq/tegra20-devfreq.c platform_set_drvdata(pdev, tegra); tegra 175 drivers/devfreq/tegra20-devfreq.c tegra->devfreq = devfreq_add_device(&pdev->dev, &tegra_devfreq_profile, tegra 177 drivers/devfreq/tegra20-devfreq.c if (IS_ERR(tegra->devfreq)) { tegra 178 drivers/devfreq/tegra20-devfreq.c err = PTR_ERR(tegra->devfreq); tegra 192 drivers/devfreq/tegra20-devfreq.c struct tegra_devfreq *tegra = platform_get_drvdata(pdev); tegra 194 drivers/devfreq/tegra20-devfreq.c devfreq_remove_device(tegra->devfreq); tegra 181 drivers/devfreq/tegra30-devfreq.c static u32 actmon_readl(struct tegra_devfreq *tegra, u32 offset) tegra 183 drivers/devfreq/tegra30-devfreq.c return readl_relaxed(tegra->regs + offset); tegra 186 drivers/devfreq/tegra30-devfreq.c static void actmon_writel(struct tegra_devfreq *tegra, u32 val, u32 offset) tegra 188 drivers/devfreq/tegra30-devfreq.c writel_relaxed(val, tegra->regs + offset); tegra 207 drivers/devfreq/tegra30-devfreq.c static void tegra_devfreq_update_avg_wmark(struct tegra_devfreq *tegra, tegra 211 drivers/devfreq/tegra30-devfreq.c u32 avg_band_freq = tegra->max_freq * ACTMON_DEFAULT_AVG_BAND / KHZ; tegra 220 drivers/devfreq/tegra30-devfreq.c static void tegra_devfreq_update_wmark(struct tegra_devfreq *tegra, tegra 223 drivers/devfreq/tegra30-devfreq.c u32 val = tegra->cur_freq * ACTMON_SAMPLING_PERIOD; tegra 232 drivers/devfreq/tegra30-devfreq.c static void actmon_write_barrier(struct tegra_devfreq *tegra) tegra 235 drivers/devfreq/tegra30-devfreq.c readl(tegra->regs + ACTMON_GLB_STATUS); tegra 238 drivers/devfreq/tegra30-devfreq.c static void actmon_isr_device(struct tegra_devfreq *tegra, tegra 244 drivers/devfreq/tegra30-devfreq.c tegra_devfreq_update_avg_wmark(tegra, dev); tegra 259 drivers/devfreq/tegra30-devfreq.c if (dev->boost_freq >= tegra->max_freq) tegra 260 drivers/devfreq/tegra30-devfreq.c dev->boost_freq = tegra->max_freq; tegra 290 drivers/devfreq/tegra30-devfreq.c actmon_write_barrier(tegra); tegra 293 drivers/devfreq/tegra30-devfreq.c static unsigned long actmon_cpu_to_emc_rate(struct tegra_devfreq *tegra, tegra 301 drivers/devfreq/tegra30-devfreq.c if (ratio->emc_freq >= tegra->max_freq) tegra 302 drivers/devfreq/tegra30-devfreq.c return tegra->max_freq; tegra 311 drivers/devfreq/tegra30-devfreq.c static void actmon_update_target(struct tegra_devfreq *tegra, tegra 320 drivers/devfreq/tegra30-devfreq.c static_cpu_emc_freq = actmon_cpu_to_emc_rate(tegra, cpu_freq); tegra 334 drivers/devfreq/tegra30-devfreq.c struct tegra_devfreq *tegra = data; tegra 339 drivers/devfreq/tegra30-devfreq.c mutex_lock(&tegra->devfreq->lock); tegra 341 drivers/devfreq/tegra30-devfreq.c val = actmon_readl(tegra, ACTMON_GLB_STATUS); tegra 342 drivers/devfreq/tegra30-devfreq.c for (i = 0; i < ARRAY_SIZE(tegra->devices); i++) { tegra 343 drivers/devfreq/tegra30-devfreq.c if (val & tegra->devices[i].config->irq_mask) { tegra 344 drivers/devfreq/tegra30-devfreq.c actmon_isr_device(tegra, tegra->devices + i); tegra 350 drivers/devfreq/tegra30-devfreq.c update_devfreq(tegra->devfreq); tegra 352 drivers/devfreq/tegra30-devfreq.c mutex_unlock(&tegra->devfreq->lock); tegra 361 drivers/devfreq/tegra30-devfreq.c struct tegra_devfreq *tegra; tegra 368 drivers/devfreq/tegra30-devfreq.c tegra = container_of(nb, struct tegra_devfreq, rate_change_nb); tegra 370 drivers/devfreq/tegra30-devfreq.c tegra->cur_freq = data->new_rate / KHZ; tegra 372 drivers/devfreq/tegra30-devfreq.c for (i = 0; i < ARRAY_SIZE(tegra->devices); i++) { tegra 373 drivers/devfreq/tegra30-devfreq.c dev = &tegra->devices[i]; tegra 375 drivers/devfreq/tegra30-devfreq.c tegra_devfreq_update_wmark(tegra, dev); tegra 378 drivers/devfreq/tegra30-devfreq.c actmon_write_barrier(tegra); tegra 383 drivers/devfreq/tegra30-devfreq.c static void tegra_actmon_configure_device(struct tegra_devfreq *tegra, tegra 388 drivers/devfreq/tegra30-devfreq.c dev->target_freq = tegra->cur_freq; tegra 390 drivers/devfreq/tegra30-devfreq.c dev->avg_count = tegra->cur_freq * ACTMON_SAMPLING_PERIOD; tegra 393 drivers/devfreq/tegra30-devfreq.c tegra_devfreq_update_avg_wmark(tegra, dev); tegra 394 drivers/devfreq/tegra30-devfreq.c tegra_devfreq_update_wmark(tegra, dev); tegra 415 drivers/devfreq/tegra30-devfreq.c static void tegra_actmon_start(struct tegra_devfreq *tegra) tegra 419 drivers/devfreq/tegra30-devfreq.c disable_irq(tegra->irq); tegra 421 drivers/devfreq/tegra30-devfreq.c actmon_writel(tegra, ACTMON_SAMPLING_PERIOD - 1, tegra 424 drivers/devfreq/tegra30-devfreq.c for (i = 0; i < ARRAY_SIZE(tegra->devices); i++) tegra 425 drivers/devfreq/tegra30-devfreq.c tegra_actmon_configure_device(tegra, &tegra->devices[i]); tegra 427 drivers/devfreq/tegra30-devfreq.c actmon_write_barrier(tegra); tegra 429 drivers/devfreq/tegra30-devfreq.c enable_irq(tegra->irq); tegra 432 drivers/devfreq/tegra30-devfreq.c static void tegra_actmon_stop(struct tegra_devfreq *tegra) tegra 436 drivers/devfreq/tegra30-devfreq.c disable_irq(tegra->irq); tegra 438 drivers/devfreq/tegra30-devfreq.c for (i = 0; i < ARRAY_SIZE(tegra->devices); i++) { tegra 439 drivers/devfreq/tegra30-devfreq.c device_writel(&tegra->devices[i], 0x00000000, ACTMON_DEV_CTRL); tegra 440 drivers/devfreq/tegra30-devfreq.c device_writel(&tegra->devices[i], ACTMON_INTR_STATUS_CLEAR, tegra 444 drivers/devfreq/tegra30-devfreq.c actmon_write_barrier(tegra); tegra 446 drivers/devfreq/tegra30-devfreq.c enable_irq(tegra->irq); tegra 452 drivers/devfreq/tegra30-devfreq.c struct tegra_devfreq *tegra = dev_get_drvdata(dev); tegra 453 drivers/devfreq/tegra30-devfreq.c struct devfreq *devfreq = tegra->devfreq; tegra 466 drivers/devfreq/tegra30-devfreq.c err = clk_set_min_rate(tegra->emc_clock, rate); tegra 470 drivers/devfreq/tegra30-devfreq.c err = clk_set_rate(tegra->emc_clock, 0); tegra 477 drivers/devfreq/tegra30-devfreq.c clk_set_min_rate(tegra->emc_clock, devfreq->previous_freq); tegra 485 drivers/devfreq/tegra30-devfreq.c struct tegra_devfreq *tegra = dev_get_drvdata(dev); tegra 489 drivers/devfreq/tegra30-devfreq.c cur_freq = READ_ONCE(tegra->cur_freq); tegra 492 drivers/devfreq/tegra30-devfreq.c stat->private_data = tegra; tegra 497 drivers/devfreq/tegra30-devfreq.c actmon_dev = &tegra->devices[MCALL]; tegra 523 drivers/devfreq/tegra30-devfreq.c struct tegra_devfreq *tegra; tegra 535 drivers/devfreq/tegra30-devfreq.c tegra = stat->private_data; tegra 537 drivers/devfreq/tegra30-devfreq.c for (i = 0; i < ARRAY_SIZE(tegra->devices); i++) { tegra 538 drivers/devfreq/tegra30-devfreq.c dev = &tegra->devices[i]; tegra 540 drivers/devfreq/tegra30-devfreq.c actmon_update_target(tegra, dev); tegra 553 drivers/devfreq/tegra30-devfreq.c struct tegra_devfreq *tegra = dev_get_drvdata(devfreq->dev.parent); tegra 558 drivers/devfreq/tegra30-devfreq.c tegra_actmon_start(tegra); tegra 562 drivers/devfreq/tegra30-devfreq.c tegra_actmon_stop(tegra); tegra 567 drivers/devfreq/tegra30-devfreq.c tegra_actmon_stop(tegra); tegra 573 drivers/devfreq/tegra30-devfreq.c tegra_actmon_start(tegra); tegra 589 drivers/devfreq/tegra30-devfreq.c struct tegra_devfreq *tegra; tegra 595 drivers/devfreq/tegra30-devfreq.c tegra = devm_kzalloc(&pdev->dev, sizeof(*tegra), GFP_KERNEL); tegra 596 drivers/devfreq/tegra30-devfreq.c if (!tegra) tegra 599 drivers/devfreq/tegra30-devfreq.c tegra->regs = devm_platform_ioremap_resource(pdev, 0); tegra 600 drivers/devfreq/tegra30-devfreq.c if (IS_ERR(tegra->regs)) tegra 601 drivers/devfreq/tegra30-devfreq.c return PTR_ERR(tegra->regs); tegra 603 drivers/devfreq/tegra30-devfreq.c tegra->reset = devm_reset_control_get(&pdev->dev, "actmon"); tegra 604 drivers/devfreq/tegra30-devfreq.c if (IS_ERR(tegra->reset)) { tegra 606 drivers/devfreq/tegra30-devfreq.c return PTR_ERR(tegra->reset); tegra 609 drivers/devfreq/tegra30-devfreq.c tegra->clock = devm_clk_get(&pdev->dev, "actmon"); tegra 610 drivers/devfreq/tegra30-devfreq.c if (IS_ERR(tegra->clock)) { tegra 612 drivers/devfreq/tegra30-devfreq.c return PTR_ERR(tegra->clock); tegra 615 drivers/devfreq/tegra30-devfreq.c tegra->emc_clock = devm_clk_get(&pdev->dev, "emc"); tegra 616 drivers/devfreq/tegra30-devfreq.c if (IS_ERR(tegra->emc_clock)) { tegra 618 drivers/devfreq/tegra30-devfreq.c return PTR_ERR(tegra->emc_clock); tegra 621 drivers/devfreq/tegra30-devfreq.c tegra->irq = platform_get_irq(pdev, 0); tegra 622 drivers/devfreq/tegra30-devfreq.c if (tegra->irq < 0) { tegra 623 drivers/devfreq/tegra30-devfreq.c err = tegra->irq; tegra 628 drivers/devfreq/tegra30-devfreq.c reset_control_assert(tegra->reset); tegra 630 drivers/devfreq/tegra30-devfreq.c err = clk_prepare_enable(tegra->clock); tegra 637 drivers/devfreq/tegra30-devfreq.c reset_control_deassert(tegra->reset); tegra 639 drivers/devfreq/tegra30-devfreq.c tegra->max_freq = clk_round_rate(tegra->emc_clock, ULONG_MAX) / KHZ; tegra 640 drivers/devfreq/tegra30-devfreq.c tegra->cur_freq = clk_get_rate(tegra->emc_clock) / KHZ; tegra 643 drivers/devfreq/tegra30-devfreq.c dev = tegra->devices + i; tegra 645 drivers/devfreq/tegra30-devfreq.c dev->regs = tegra->regs + dev->config->offset; tegra 648 drivers/devfreq/tegra30-devfreq.c for (rate = 0; rate <= tegra->max_freq * KHZ; rate++) { tegra 649 drivers/devfreq/tegra30-devfreq.c rate = clk_round_rate(tegra->emc_clock, rate); tegra 658 drivers/devfreq/tegra30-devfreq.c platform_set_drvdata(pdev, tegra); tegra 660 drivers/devfreq/tegra30-devfreq.c tegra->rate_change_nb.notifier_call = tegra_actmon_rate_notify_cb; tegra 661 drivers/devfreq/tegra30-devfreq.c err = clk_notifier_register(tegra->emc_clock, &tegra->rate_change_nb); tegra 674 drivers/devfreq/tegra30-devfreq.c tegra_devfreq_profile.initial_freq = clk_get_rate(tegra->emc_clock); tegra 675 drivers/devfreq/tegra30-devfreq.c tegra->devfreq = devfreq_add_device(&pdev->dev, tegra 679 drivers/devfreq/tegra30-devfreq.c if (IS_ERR(tegra->devfreq)) { tegra 680 drivers/devfreq/tegra30-devfreq.c err = PTR_ERR(tegra->devfreq); tegra 684 drivers/devfreq/tegra30-devfreq.c err = devm_request_threaded_irq(&pdev->dev, tegra->irq, NULL, tegra 686 drivers/devfreq/tegra30-devfreq.c "tegra-devfreq", tegra); tegra 695 drivers/devfreq/tegra30-devfreq.c devfreq_remove_device(tegra->devfreq); tegra 701 drivers/devfreq/tegra30-devfreq.c clk_notifier_unregister(tegra->emc_clock, &tegra->rate_change_nb); tegra 706 drivers/devfreq/tegra30-devfreq.c reset_control_reset(tegra->reset); tegra 707 drivers/devfreq/tegra30-devfreq.c clk_disable_unprepare(tegra->clock); tegra 714 drivers/devfreq/tegra30-devfreq.c struct tegra_devfreq *tegra = platform_get_drvdata(pdev); tegra 716 drivers/devfreq/tegra30-devfreq.c devfreq_remove_device(tegra->devfreq); tegra 719 drivers/devfreq/tegra30-devfreq.c clk_notifier_unregister(tegra->emc_clock, &tegra->rate_change_nb); tegra 722 drivers/devfreq/tegra30-devfreq.c reset_control_reset(tegra->reset); tegra 723 drivers/devfreq/tegra30-devfreq.c clk_disable_unprepare(tegra->clock); tegra 187 drivers/gpu/drm/nouveau/include/nvkm/core/device.h struct nvkm_device_tegra *(*tegra)(struct nvkm_device *); tegra 265 drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c .tegra = nvkm_device_tegra, tegra 618 drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c struct nvkm_device_tegra *tdev = device->func->tegra(device); tegra 1019 drivers/gpu/drm/nouveau/nvkm/subdev/clk/gm20b.c struct nvkm_device_tegra *tdev = device->func->tegra(device); tegra 574 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c struct nvkm_device_tegra *tdev = device->func->tegra(device); tegra 151 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c struct nvkm_device_tegra *tdev = device->func->tegra(device); tegra 69 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gm20b.c struct nvkm_device_tegra *tdev = device->func->tegra(device); tegra 606 drivers/gpu/drm/tegra/dc.c struct tegra_plane *tegra = to_tegra_plane(plane); tegra 627 drivers/gpu/drm/tegra/dc.c err = tegra_plane_setup_legacy_state(tegra, plane_state); tegra 661 drivers/gpu/drm/tegra/dc.c err = tegra_plane_state_add(tegra, state); tegra 810 drivers/gpu/drm/tegra/dc.c struct tegra_plane *tegra = to_tegra_plane(plane); tegra 830 drivers/gpu/drm/tegra/dc.c err = tegra_plane_state_add(tegra, state); tegra 2000 drivers/gpu/drm/tegra/dc.c struct tegra_drm *tegra = drm->dev_private; tegra 2060 drivers/gpu/drm/tegra/dc.c if (dc->soc->pitch_align > tegra->pitch_align) tegra 2061 drivers/gpu/drm/tegra/dc.c tegra->pitch_align = dc->soc->pitch_align; tegra 69 drivers/gpu/drm/tegra/drm.c struct tegra_drm *tegra = drm->dev_private; tegra 71 drivers/gpu/drm/tegra/drm.c if (tegra->hub) { tegra 92 drivers/gpu/drm/tegra/drm.c struct tegra_drm *tegra; tegra 95 drivers/gpu/drm/tegra/drm.c tegra = kzalloc(sizeof(*tegra), GFP_KERNEL); tegra 96 drivers/gpu/drm/tegra/drm.c if (!tegra) tegra 100 drivers/gpu/drm/tegra/drm.c tegra->domain = iommu_domain_alloc(&platform_bus_type); tegra 101 drivers/gpu/drm/tegra/drm.c if (!tegra->domain) { tegra 111 drivers/gpu/drm/tegra/drm.c mutex_init(&tegra->clients_lock); tegra 112 drivers/gpu/drm/tegra/drm.c INIT_LIST_HEAD(&tegra->clients); tegra 114 drivers/gpu/drm/tegra/drm.c drm->dev_private = tegra; tegra 115 drivers/gpu/drm/tegra/drm.c tegra->drm = drm; tegra 142 drivers/gpu/drm/tegra/drm.c if (tegra->domain) { tegra 148 drivers/gpu/drm/tegra/drm.c start = tegra->domain->geometry.aperture_start & dma_mask; tegra 149 drivers/gpu/drm/tegra/drm.c end = tegra->domain->geometry.aperture_end & dma_mask; tegra 156 drivers/gpu/drm/tegra/drm.c order = __ffs(tegra->domain->pgsize_bitmap); tegra 157 drivers/gpu/drm/tegra/drm.c init_iova_domain(&tegra->carveout.domain, 1UL << order, tegra 160 drivers/gpu/drm/tegra/drm.c tegra->carveout.shift = iova_shift(&tegra->carveout.domain); tegra 161 drivers/gpu/drm/tegra/drm.c tegra->carveout.limit = carveout_end >> tegra->carveout.shift; tegra 163 drivers/gpu/drm/tegra/drm.c drm_mm_init(&tegra->mm, gem_start, gem_end - gem_start + 1); tegra 164 drivers/gpu/drm/tegra/drm.c mutex_init(&tegra->mm_lock); tegra 172 drivers/gpu/drm/tegra/drm.c if (tegra->hub) { tegra 173 drivers/gpu/drm/tegra/drm.c err = tegra_display_hub_prepare(tegra->hub); tegra 201 drivers/gpu/drm/tegra/drm.c if (tegra->hub) tegra 202 drivers/gpu/drm/tegra/drm.c tegra_display_hub_cleanup(tegra->hub); tegra 204 drivers/gpu/drm/tegra/drm.c if (tegra->domain) { tegra 205 drivers/gpu/drm/tegra/drm.c mutex_destroy(&tegra->mm_lock); tegra 206 drivers/gpu/drm/tegra/drm.c drm_mm_takedown(&tegra->mm); tegra 207 drivers/gpu/drm/tegra/drm.c put_iova_domain(&tegra->carveout.domain); tegra 218 drivers/gpu/drm/tegra/drm.c if (tegra->domain) tegra 219 drivers/gpu/drm/tegra/drm.c iommu_domain_free(tegra->domain); tegra 221 drivers/gpu/drm/tegra/drm.c kfree(tegra); tegra 228 drivers/gpu/drm/tegra/drm.c struct tegra_drm *tegra = drm->dev_private; tegra 240 drivers/gpu/drm/tegra/drm.c if (tegra->domain) { tegra 241 drivers/gpu/drm/tegra/drm.c mutex_destroy(&tegra->mm_lock); tegra 242 drivers/gpu/drm/tegra/drm.c drm_mm_takedown(&tegra->mm); tegra 243 drivers/gpu/drm/tegra/drm.c put_iova_domain(&tegra->carveout.domain); tegra 245 drivers/gpu/drm/tegra/drm.c iommu_domain_free(tegra->domain); tegra 248 drivers/gpu/drm/tegra/drm.c kfree(tegra); tegra 611 drivers/gpu/drm/tegra/drm.c struct tegra_drm *tegra = drm->dev_private; tegra 623 drivers/gpu/drm/tegra/drm.c list_for_each_entry(client, &tegra->clients, list) tegra 989 drivers/gpu/drm/tegra/drm.c struct tegra_drm *tegra = drm->dev_private; tegra 992 drivers/gpu/drm/tegra/drm.c if (tegra->domain) { tegra 993 drivers/gpu/drm/tegra/drm.c mutex_lock(&tegra->mm_lock); tegra 994 drivers/gpu/drm/tegra/drm.c drm_mm_print(&tegra->mm, &p); tegra 995 drivers/gpu/drm/tegra/drm.c mutex_unlock(&tegra->mm_lock); tegra 1049 drivers/gpu/drm/tegra/drm.c int tegra_drm_register_client(struct tegra_drm *tegra, tegra 1052 drivers/gpu/drm/tegra/drm.c mutex_lock(&tegra->clients_lock); tegra 1053 drivers/gpu/drm/tegra/drm.c list_add_tail(&client->list, &tegra->clients); tegra 1054 drivers/gpu/drm/tegra/drm.c client->drm = tegra; tegra 1055 drivers/gpu/drm/tegra/drm.c mutex_unlock(&tegra->clients_lock); tegra 1060 drivers/gpu/drm/tegra/drm.c int tegra_drm_unregister_client(struct tegra_drm *tegra, tegra 1063 drivers/gpu/drm/tegra/drm.c mutex_lock(&tegra->clients_lock); tegra 1066 drivers/gpu/drm/tegra/drm.c mutex_unlock(&tegra->clients_lock); tegra 1075 drivers/gpu/drm/tegra/drm.c struct tegra_drm *tegra = drm->dev_private; tegra 1079 drivers/gpu/drm/tegra/drm.c if (tegra->domain) { tegra 1086 drivers/gpu/drm/tegra/drm.c if (!shared || (shared && (group != tegra->group))) { tegra 1095 drivers/gpu/drm/tegra/drm.c err = iommu_attach_group(tegra->domain, group); tegra 1101 drivers/gpu/drm/tegra/drm.c if (shared && !tegra->group) tegra 1102 drivers/gpu/drm/tegra/drm.c tegra->group = group; tegra 1113 drivers/gpu/drm/tegra/drm.c struct tegra_drm *tegra = drm->dev_private; tegra 1116 drivers/gpu/drm/tegra/drm.c if (group == tegra->group) { tegra 1117 drivers/gpu/drm/tegra/drm.c iommu_detach_group(tegra->domain, group); tegra 1118 drivers/gpu/drm/tegra/drm.c tegra->group = NULL; tegra 1125 drivers/gpu/drm/tegra/drm.c void *tegra_drm_alloc(struct tegra_drm *tegra, size_t size, dma_addr_t *dma) tegra 1132 drivers/gpu/drm/tegra/drm.c if (tegra->domain) tegra 1133 drivers/gpu/drm/tegra/drm.c size = iova_align(&tegra->carveout.domain, size); tegra 1138 drivers/gpu/drm/tegra/drm.c if (!tegra->domain) { tegra 1152 drivers/gpu/drm/tegra/drm.c if (!tegra->domain) { tegra 1161 drivers/gpu/drm/tegra/drm.c alloc = alloc_iova(&tegra->carveout.domain, tegra 1162 drivers/gpu/drm/tegra/drm.c size >> tegra->carveout.shift, tegra 1163 drivers/gpu/drm/tegra/drm.c tegra->carveout.limit, true); tegra 1169 drivers/gpu/drm/tegra/drm.c *dma = iova_dma_addr(&tegra->carveout.domain, alloc); tegra 1170 drivers/gpu/drm/tegra/drm.c err = iommu_map(tegra->domain, *dma, virt_to_phys(virt), tegra 1178 drivers/gpu/drm/tegra/drm.c __free_iova(&tegra->carveout.domain, alloc); tegra 1185 drivers/gpu/drm/tegra/drm.c void tegra_drm_free(struct tegra_drm *tegra, size_t size, void *virt, tegra 1188 drivers/gpu/drm/tegra/drm.c if (tegra->domain) tegra 1189 drivers/gpu/drm/tegra/drm.c size = iova_align(&tegra->carveout.domain, size); tegra 1193 drivers/gpu/drm/tegra/drm.c if (tegra->domain) { tegra 1194 drivers/gpu/drm/tegra/drm.c iommu_unmap(tegra->domain, dma, size); tegra 1195 drivers/gpu/drm/tegra/drm.c free_iova(&tegra->carveout.domain, tegra 1196 drivers/gpu/drm/tegra/drm.c iova_pfn(&tegra->carveout.domain, dma)); tegra 99 drivers/gpu/drm/tegra/drm.h int tegra_drm_register_client(struct tegra_drm *tegra, tegra 101 drivers/gpu/drm/tegra/drm.h int tegra_drm_unregister_client(struct tegra_drm *tegra, tegra 108 drivers/gpu/drm/tegra/drm.h int tegra_drm_init(struct tegra_drm *tegra, struct drm_device *drm); tegra 109 drivers/gpu/drm/tegra/drm.h int tegra_drm_exit(struct tegra_drm *tegra); tegra 111 drivers/gpu/drm/tegra/drm.h void *tegra_drm_alloc(struct tegra_drm *tegra, size_t size, dma_addr_t *iova); tegra 112 drivers/gpu/drm/tegra/drm.h void tegra_drm_free(struct tegra_drm *tegra, size_t size, void *virt, tegra 208 drivers/gpu/drm/tegra/fb.c struct tegra_drm *tegra = helper->dev->dev_private; tegra 224 drivers/gpu/drm/tegra/fb.c tegra->pitch_align); tegra 368 drivers/gpu/drm/tegra/fb.c struct tegra_drm *tegra = drm->dev_private; tegra 370 drivers/gpu/drm/tegra/fb.c tegra->fbdev = tegra_fbdev_create(drm); tegra 371 drivers/gpu/drm/tegra/fb.c if (IS_ERR(tegra->fbdev)) tegra 372 drivers/gpu/drm/tegra/fb.c return PTR_ERR(tegra->fbdev); tegra 381 drivers/gpu/drm/tegra/fb.c struct tegra_drm *tegra = drm->dev_private; tegra 383 drivers/gpu/drm/tegra/fb.c tegra_fbdev_free(tegra->fbdev); tegra 390 drivers/gpu/drm/tegra/fb.c struct tegra_drm *tegra = drm->dev_private; tegra 393 drivers/gpu/drm/tegra/fb.c err = tegra_fbdev_init(tegra->fbdev, 32, drm->mode_config.num_crtc, tegra 405 drivers/gpu/drm/tegra/fb.c struct tegra_drm *tegra = drm->dev_private; tegra 407 drivers/gpu/drm/tegra/fb.c tegra_fbdev_exit(tegra->fbdev); tegra 114 drivers/gpu/drm/tegra/gem.c static int tegra_bo_iommu_map(struct tegra_drm *tegra, struct tegra_bo *bo) tegra 126 drivers/gpu/drm/tegra/gem.c mutex_lock(&tegra->mm_lock); tegra 128 drivers/gpu/drm/tegra/gem.c err = drm_mm_insert_node_generic(&tegra->mm, tegra 131 drivers/gpu/drm/tegra/gem.c dev_err(tegra->drm->dev, "out of I/O virtual memory: %d\n", tegra 138 drivers/gpu/drm/tegra/gem.c bo->size = iommu_map_sg(tegra->domain, bo->paddr, bo->sgt->sgl, tegra 141 drivers/gpu/drm/tegra/gem.c dev_err(tegra->drm->dev, "failed to map buffer\n"); tegra 146 drivers/gpu/drm/tegra/gem.c mutex_unlock(&tegra->mm_lock); tegra 153 drivers/gpu/drm/tegra/gem.c mutex_unlock(&tegra->mm_lock); tegra 158 drivers/gpu/drm/tegra/gem.c static int tegra_bo_iommu_unmap(struct tegra_drm *tegra, struct tegra_bo *bo) tegra 163 drivers/gpu/drm/tegra/gem.c mutex_lock(&tegra->mm_lock); tegra 164 drivers/gpu/drm/tegra/gem.c iommu_unmap(tegra->domain, bo->paddr, bo->size); tegra 166 drivers/gpu/drm/tegra/gem.c mutex_unlock(&tegra->mm_lock); tegra 251 drivers/gpu/drm/tegra/gem.c struct tegra_drm *tegra = drm->dev_private; tegra 254 drivers/gpu/drm/tegra/gem.c if (tegra->domain) { tegra 259 drivers/gpu/drm/tegra/gem.c err = tegra_bo_iommu_map(tegra, bo); tegra 335 drivers/gpu/drm/tegra/gem.c struct tegra_drm *tegra = drm->dev_private; tegra 358 drivers/gpu/drm/tegra/gem.c if (tegra->domain) { tegra 359 drivers/gpu/drm/tegra/gem.c err = tegra_bo_iommu_map(tegra, bo); tegra 389 drivers/gpu/drm/tegra/gem.c struct tegra_drm *tegra = gem->dev->dev_private; tegra 392 drivers/gpu/drm/tegra/gem.c if (tegra->domain) tegra 393 drivers/gpu/drm/tegra/gem.c tegra_bo_iommu_unmap(tegra, bo); tegra 411 drivers/gpu/drm/tegra/gem.c struct tegra_drm *tegra = drm->dev_private; tegra 414 drivers/gpu/drm/tegra/gem.c args->pitch = round_up(min_pitch, tegra->pitch_align); tegra 82 drivers/gpu/drm/tegra/gr2d.c struct tegra_drm *tegra = dev->dev_private; tegra 86 drivers/gpu/drm/tegra/gr2d.c err = tegra_drm_unregister_client(tegra, drm); tegra 330 drivers/gpu/drm/tegra/hub.c struct tegra_shared_plane *tegra = to_tegra_shared_plane(plane); tegra 369 drivers/gpu/drm/tegra/hub.c err = tegra_plane_state_add(&tegra->base, state); tegra 535 drivers/gpu/drm/tegra/hub.c struct tegra_drm *tegra = drm->dev_private; tegra 536 drivers/gpu/drm/tegra/hub.c struct tegra_display_hub *hub = tegra->hub; tegra 623 drivers/gpu/drm/tegra/hub.c struct tegra_drm *tegra = drm->dev_private; tegra 629 drivers/gpu/drm/tegra/hub.c if (!tegra->hub) tegra 632 drivers/gpu/drm/tegra/hub.c hub_state = tegra_display_hub_get_state(tegra->hub, state); tegra 684 drivers/gpu/drm/tegra/hub.c struct tegra_drm *tegra = drm->dev_private; tegra 685 drivers/gpu/drm/tegra/hub.c struct tegra_display_hub *hub = tegra->hub; tegra 712 drivers/gpu/drm/tegra/hub.c struct tegra_drm *tegra = drm->dev_private; tegra 722 drivers/gpu/drm/tegra/hub.c tegra->hub = hub; tegra 730 drivers/gpu/drm/tegra/hub.c struct tegra_drm *tegra = drm->dev_private; tegra 732 drivers/gpu/drm/tegra/hub.c drm_atomic_private_obj_fini(&tegra->hub->base); tegra 733 drivers/gpu/drm/tegra/hub.c tegra->hub = NULL; tegra 102 drivers/gpu/drm/tegra/plane.c struct tegra_dc_state *tegra; tegra 116 drivers/gpu/drm/tegra/plane.c tegra = to_dc_state(crtc_state); tegra 118 drivers/gpu/drm/tegra/plane.c tegra->planes |= WIN_A_ACT_REQ << plane->index; tegra 309 drivers/gpu/drm/tegra/plane.c static int tegra_plane_setup_opacity(struct tegra_plane *tegra, tegra 336 drivers/gpu/drm/tegra/plane.c static int tegra_plane_check_transparency(struct tegra_plane *tegra, tegra 342 drivers/gpu/drm/tegra/plane.c old = drm_atomic_get_old_plane_state(state->base.state, &tegra->base); tegra 350 drivers/gpu/drm/tegra/plane.c drm_for_each_plane(plane, tegra->base.dev) { tegra 354 drivers/gpu/drm/tegra/plane.c if (p == tegra || p->dc != tegra->dc) tegra 386 drivers/gpu/drm/tegra/plane.c static void tegra_plane_update_transparency(struct tegra_plane *tegra, tegra 398 drivers/gpu/drm/tegra/plane.c if (p == tegra || p->dc != tegra->dc) tegra 401 drivers/gpu/drm/tegra/plane.c index = tegra_plane_get_overlap_index(tegra, p); tegra 424 drivers/gpu/drm/tegra/plane.c static int tegra_plane_setup_transparency(struct tegra_plane *tegra, tegra 437 drivers/gpu/drm/tegra/plane.c err = tegra_plane_check_transparency(tegra, state); tegra 445 drivers/gpu/drm/tegra/plane.c drm_for_each_plane(plane, tegra->base.dev) { tegra 449 drivers/gpu/drm/tegra/plane.c if (p->dc != tegra->dc) tegra 466 drivers/gpu/drm/tegra/plane.c int tegra_plane_setup_legacy_state(struct tegra_plane *tegra, tegra 471 drivers/gpu/drm/tegra/plane.c err = tegra_plane_setup_opacity(tegra, state); tegra 475 drivers/gpu/drm/tegra/plane.c err = tegra_plane_setup_transparency(tegra, state); tegra 69 drivers/gpu/drm/tegra/plane.h int tegra_plane_setup_legacy_state(struct tegra_plane *tegra, tegra 2 drivers/gpu/drm/tegra/trace.h #define TRACE_SYSTEM tegra tegra 66 drivers/gpu/drm/tegra/trace.h #define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/tegra tegra 163 drivers/gpu/drm/tegra/vic.c struct tegra_drm *tegra = falcon->data; tegra 165 drivers/gpu/drm/tegra/vic.c return tegra_drm_alloc(tegra, size, iova); tegra 171 drivers/gpu/drm/tegra/vic.c struct tegra_drm *tegra = falcon->data; tegra 173 drivers/gpu/drm/tegra/vic.c return tegra_drm_free(tegra, size, va, iova); tegra 186 drivers/gpu/drm/tegra/vic.c struct tegra_drm *tegra = dev->dev_private; tegra 190 drivers/gpu/drm/tegra/vic.c if (group && tegra->domain) { tegra 191 drivers/gpu/drm/tegra/vic.c err = iommu_attach_group(tegra->domain, group); tegra 198 drivers/gpu/drm/tegra/vic.c vic->domain = tegra->domain; tegra 213 drivers/gpu/drm/tegra/vic.c err = tegra_drm_register_client(tegra, drm); tegra 224 drivers/gpu/drm/tegra/vic.c if (group && tegra->domain) tegra 225 drivers/gpu/drm/tegra/vic.c iommu_detach_group(tegra->domain, group); tegra 235 drivers/gpu/drm/tegra/vic.c struct tegra_drm *tegra = dev->dev_private; tegra 239 drivers/gpu/drm/tegra/vic.c err = tegra_drm_unregister_client(tegra, drm); tegra 1241 drivers/mmc/host/sdhci-tegra.c struct sdhci_tegra *tegra = sdhci_pltfm_priv(platform); tegra 1242 drivers/mmc/host/sdhci-tegra.c const struct sdhci_tegra_soc_data *soc = tegra->soc_data; tegra 93 drivers/staging/media/tegra-vde/trace.h #define TRACE_INCLUDE_PATH ../../drivers/staging/media/tegra-vde tegra 385 drivers/thermal/tegra/soctherm.c static void enable_tsensor(struct tegra_soctherm *tegra, unsigned int i) tegra 387 drivers/thermal/tegra/soctherm.c const struct tegra_tsensor *sensor = &tegra->soc->tsensors[i]; tegra 388 drivers/thermal/tegra/soctherm.c void __iomem *base = tegra->regs + sensor->base; tegra 400 drivers/thermal/tegra/soctherm.c writel(tegra->calib[i], base + SENSOR_CONFIG2); tegra 1487 drivers/thermal/tegra/soctherm.c struct tegra_soctherm *tegra = platform_get_drvdata(pdev); tegra 1492 drivers/thermal/tegra/soctherm.c tegra->debugfs_dir = root; tegra 1502 drivers/thermal/tegra/soctherm.c struct tegra_soctherm *tegra = platform_get_drvdata(pdev); tegra 1505 drivers/thermal/tegra/soctherm.c if (!tegra->clock_soctherm || !tegra->clock_tsensor) tegra 1508 drivers/thermal/tegra/soctherm.c reset_control_assert(tegra->reset); tegra 1511 drivers/thermal/tegra/soctherm.c err = clk_prepare_enable(tegra->clock_soctherm); tegra 1513 drivers/thermal/tegra/soctherm.c reset_control_deassert(tegra->reset); tegra 1517 drivers/thermal/tegra/soctherm.c err = clk_prepare_enable(tegra->clock_tsensor); tegra 1519 drivers/thermal/tegra/soctherm.c clk_disable_unprepare(tegra->clock_soctherm); tegra 1520 drivers/thermal/tegra/soctherm.c reset_control_deassert(tegra->reset); tegra 1524 drivers/thermal/tegra/soctherm.c clk_disable_unprepare(tegra->clock_tsensor); tegra 1525 drivers/thermal/tegra/soctherm.c clk_disable_unprepare(tegra->clock_soctherm); tegra 1528 drivers/thermal/tegra/soctherm.c reset_control_deassert(tegra->reset); tegra 2000 drivers/thermal/tegra/soctherm.c struct tegra_soctherm *tegra) tegra 2011 drivers/thermal/tegra/soctherm.c tegra->thermal_irq = platform_get_irq(pdev, 0); tegra 2012 drivers/thermal/tegra/soctherm.c if (tegra->thermal_irq < 0) { tegra 2017 drivers/thermal/tegra/soctherm.c tegra->edp_irq = platform_get_irq(pdev, 1); tegra 2018 drivers/thermal/tegra/soctherm.c if (tegra->edp_irq < 0) { tegra 2024 drivers/thermal/tegra/soctherm.c tegra->thermal_irq, tegra 2029 drivers/thermal/tegra/soctherm.c tegra); tegra 2036 drivers/thermal/tegra/soctherm.c tegra->edp_irq, tegra 2041 drivers/thermal/tegra/soctherm.c tegra); tegra 2052 drivers/thermal/tegra/soctherm.c struct tegra_soctherm *tegra = platform_get_drvdata(pdev); tegra 2053 drivers/thermal/tegra/soctherm.c const struct tegra_tsensor_group **ttgs = tegra->soc->ttgs; tegra 2058 drivers/thermal/tegra/soctherm.c for (i = 0; i < tegra->soc->num_tsensors; ++i) tegra 2059 drivers/thermal/tegra/soctherm.c enable_tsensor(tegra, i); tegra 2062 drivers/thermal/tegra/soctherm.c pdiv = readl(tegra->regs + SENSOR_PDIV); tegra 2063 drivers/thermal/tegra/soctherm.c hotspot = readl(tegra->regs + SENSOR_HOTSPOT_OFF); tegra 2064 drivers/thermal/tegra/soctherm.c for (i = 0; i < tegra->soc->num_ttgs; ++i) { tegra 2074 drivers/thermal/tegra/soctherm.c writel(pdiv, tegra->regs + SENSOR_PDIV); tegra 2075 drivers/thermal/tegra/soctherm.c writel(hotspot, tegra->regs + SENSOR_HOTSPOT_OFF); tegra 2107 drivers/thermal/tegra/soctherm.c struct tegra_soctherm *tegra; tegra 2123 drivers/thermal/tegra/soctherm.c tegra = devm_kzalloc(&pdev->dev, sizeof(*tegra), GFP_KERNEL); tegra 2124 drivers/thermal/tegra/soctherm.c if (!tegra) tegra 2127 drivers/thermal/tegra/soctherm.c mutex_init(&tegra->thermctl_lock); tegra 2128 drivers/thermal/tegra/soctherm.c dev_set_drvdata(&pdev->dev, tegra); tegra 2130 drivers/thermal/tegra/soctherm.c tegra->soc = soc; tegra 2134 drivers/thermal/tegra/soctherm.c tegra->regs = devm_ioremap_resource(&pdev->dev, res); tegra 2135 drivers/thermal/tegra/soctherm.c if (IS_ERR(tegra->regs)) { tegra 2137 drivers/thermal/tegra/soctherm.c return PTR_ERR(tegra->regs); tegra 2140 drivers/thermal/tegra/soctherm.c if (!tegra->soc->use_ccroc) { tegra 2143 drivers/thermal/tegra/soctherm.c tegra->clk_regs = devm_ioremap_resource(&pdev->dev, res); tegra 2144 drivers/thermal/tegra/soctherm.c if (IS_ERR(tegra->clk_regs)) { tegra 2146 drivers/thermal/tegra/soctherm.c return PTR_ERR(tegra->clk_regs); tegra 2151 drivers/thermal/tegra/soctherm.c tegra->ccroc_regs = devm_ioremap_resource(&pdev->dev, res); tegra 2152 drivers/thermal/tegra/soctherm.c if (IS_ERR(tegra->ccroc_regs)) { tegra 2154 drivers/thermal/tegra/soctherm.c return PTR_ERR(tegra->ccroc_regs); tegra 2158 drivers/thermal/tegra/soctherm.c tegra->reset = devm_reset_control_get(&pdev->dev, "soctherm"); tegra 2159 drivers/thermal/tegra/soctherm.c if (IS_ERR(tegra->reset)) { tegra 2161 drivers/thermal/tegra/soctherm.c return PTR_ERR(tegra->reset); tegra 2164 drivers/thermal/tegra/soctherm.c tegra->clock_tsensor = devm_clk_get(&pdev->dev, "tsensor"); tegra 2165 drivers/thermal/tegra/soctherm.c if (IS_ERR(tegra->clock_tsensor)) { tegra 2167 drivers/thermal/tegra/soctherm.c return PTR_ERR(tegra->clock_tsensor); tegra 2170 drivers/thermal/tegra/soctherm.c tegra->clock_soctherm = devm_clk_get(&pdev->dev, "soctherm"); tegra 2171 drivers/thermal/tegra/soctherm.c if (IS_ERR(tegra->clock_soctherm)) { tegra 2173 drivers/thermal/tegra/soctherm.c return PTR_ERR(tegra->clock_soctherm); tegra 2176 drivers/thermal/tegra/soctherm.c tegra->calib = devm_kcalloc(&pdev->dev, tegra 2179 drivers/thermal/tegra/soctherm.c if (!tegra->calib) tegra 2191 drivers/thermal/tegra/soctherm.c &tegra->calib[i]); tegra 2196 drivers/thermal/tegra/soctherm.c tegra->thermctl_tzs = devm_kcalloc(&pdev->dev, tegra 2199 drivers/thermal/tegra/soctherm.c if (!tegra->thermctl_tzs) tegra 2220 drivers/thermal/tegra/soctherm.c zone->reg = tegra->regs + soc->ttgs[i]->sensor_temp_offset; tegra 2223 drivers/thermal/tegra/soctherm.c zone->ts = tegra; tegra 2236 drivers/thermal/tegra/soctherm.c tegra->thermctl_tzs[soc->ttgs[i]->id] = z; tegra 2244 drivers/thermal/tegra/soctherm.c err = soctherm_interrupts_init(pdev, tegra); tegra 2258 drivers/thermal/tegra/soctherm.c struct tegra_soctherm *tegra = platform_get_drvdata(pdev); tegra 2260 drivers/thermal/tegra/soctherm.c debugfs_remove_recursive(tegra->debugfs_dir); tegra 2279 drivers/thermal/tegra/soctherm.c struct tegra_soctherm *tegra = platform_get_drvdata(pdev); tegra 2280 drivers/thermal/tegra/soctherm.c struct tegra_soctherm_soc *soc = tegra->soc; tegra 2295 drivers/thermal/tegra/soctherm.c tz = tegra->thermctl_tzs[soc->ttgs[i]->id]; tegra 20 drivers/thermal/tegra/tegra-bpmp-thermal.c struct tegra_bpmp_thermal *tegra; tegra 52 drivers/thermal/tegra/tegra-bpmp-thermal.c err = tegra_bpmp_transfer(zone->tegra->bpmp, &msg); tegra 79 drivers/thermal/tegra/tegra-bpmp-thermal.c return tegra_bpmp_transfer(zone->tegra->bpmp, &msg); tegra 96 drivers/thermal/tegra/tegra-bpmp-thermal.c struct tegra_bpmp_thermal *tegra = data; tegra 102 drivers/thermal/tegra/tegra-bpmp-thermal.c dev_err(tegra->dev, "%s: invalid request type: %d\n", tegra 108 drivers/thermal/tegra/tegra-bpmp-thermal.c for (i = 0; i < tegra->num_zones; ++i) { tegra 109 drivers/thermal/tegra/tegra-bpmp-thermal.c if (tegra->zones[i]->idx != req->host_trip_reached.zone) tegra 112 drivers/thermal/tegra/tegra-bpmp-thermal.c schedule_work(&tegra->zones[i]->tz_device_update_work); tegra 117 drivers/thermal/tegra/tegra-bpmp-thermal.c dev_err(tegra->dev, "%s: invalid thermal zone: %d\n", __func__, tegra 157 drivers/thermal/tegra/tegra-bpmp-thermal.c struct tegra_bpmp_thermal *tegra; tegra 162 drivers/thermal/tegra/tegra-bpmp-thermal.c tegra = devm_kzalloc(&pdev->dev, sizeof(*tegra), GFP_KERNEL); tegra 163 drivers/thermal/tegra/tegra-bpmp-thermal.c if (!tegra) tegra 166 drivers/thermal/tegra/tegra-bpmp-thermal.c tegra->dev = &pdev->dev; tegra 167 drivers/thermal/tegra/tegra-bpmp-thermal.c tegra->bpmp = bpmp; tegra 176 drivers/thermal/tegra/tegra-bpmp-thermal.c tegra->zones = devm_kcalloc(&pdev->dev, max_num_zones, tegra 177 drivers/thermal/tegra/tegra-bpmp-thermal.c sizeof(*tegra->zones), GFP_KERNEL); tegra 178 drivers/thermal/tegra/tegra-bpmp-thermal.c if (!tegra->zones) tegra 190 drivers/thermal/tegra/tegra-bpmp-thermal.c zone->tegra = tegra; tegra 211 drivers/thermal/tegra/tegra-bpmp-thermal.c tegra->zones[tegra->num_zones++] = zone; tegra 215 drivers/thermal/tegra/tegra-bpmp-thermal.c tegra); tegra 222 drivers/thermal/tegra/tegra-bpmp-thermal.c platform_set_drvdata(pdev, tegra); tegra 229 drivers/thermal/tegra/tegra-bpmp-thermal.c struct tegra_bpmp_thermal *tegra = platform_get_drvdata(pdev); tegra 231 drivers/thermal/tegra/tegra-bpmp-thermal.c tegra_bpmp_free_mrq(tegra->bpmp, MRQ_THERMAL, tegra); tegra 57 drivers/usb/host/ehci-tegra.c struct tegra_ehci_hcd *tegra = tegra 88 drivers/usb/host/ehci-tegra.c err = reset_control_deassert(tegra->rst); tegra 92 drivers/usb/host/ehci-tegra.c err = reset_control_assert(tegra->rst); tegra 98 drivers/usb/host/ehci-tegra.c err = reset_control_deassert(tegra->rst); tegra 180 drivers/usb/host/ehci-tegra.c struct tegra_ehci_hcd *tegra = (struct tegra_ehci_hcd *)ehci->priv; tegra 192 drivers/usb/host/ehci-tegra.c if (tegra->port_resuming && !(temp & PORT_SUSPEND)) { tegra 194 drivers/usb/host/ehci-tegra.c tegra->port_resuming = 0; tegra 223 drivers/usb/host/ehci-tegra.c if (tegra->needs_double_reset && tegra 270 drivers/usb/host/ehci-tegra.c tegra->port_resuming = 1; tegra 390 drivers/usb/host/ehci-tegra.c struct tegra_ehci_hcd *tegra; tegra 418 drivers/usb/host/ehci-tegra.c tegra = (struct tegra_ehci_hcd *)ehci->priv; tegra 422 drivers/usb/host/ehci-tegra.c tegra->clk = devm_clk_get(&pdev->dev, NULL); tegra 423 drivers/usb/host/ehci-tegra.c if (IS_ERR(tegra->clk)) { tegra 425 drivers/usb/host/ehci-tegra.c err = PTR_ERR(tegra->clk); tegra 429 drivers/usb/host/ehci-tegra.c tegra->rst = devm_reset_control_get_shared(&pdev->dev, "usb"); tegra 430 drivers/usb/host/ehci-tegra.c if (IS_ERR(tegra->rst)) { tegra 432 drivers/usb/host/ehci-tegra.c err = PTR_ERR(tegra->rst); tegra 436 drivers/usb/host/ehci-tegra.c err = clk_prepare_enable(tegra->clk); tegra 454 drivers/usb/host/ehci-tegra.c tegra->needs_double_reset = of_property_read_bool(pdev->dev.of_node, tegra 512 drivers/usb/host/ehci-tegra.c clk_disable_unprepare(tegra->clk); tegra 521 drivers/usb/host/ehci-tegra.c struct tegra_ehci_hcd *tegra = tegra 529 drivers/usb/host/ehci-tegra.c reset_control_assert(tegra->rst); tegra 532 drivers/usb/host/ehci-tegra.c clk_disable_unprepare(tegra->clk); tegra 217 drivers/usb/host/xhci-tegra.c static inline u32 fpci_readl(struct tegra_xusb *tegra, unsigned int offset) tegra 219 drivers/usb/host/xhci-tegra.c return readl(tegra->fpci_base + offset); tegra 222 drivers/usb/host/xhci-tegra.c static inline void fpci_writel(struct tegra_xusb *tegra, u32 value, tegra 225 drivers/usb/host/xhci-tegra.c writel(value, tegra->fpci_base + offset); tegra 228 drivers/usb/host/xhci-tegra.c static inline u32 ipfs_readl(struct tegra_xusb *tegra, unsigned int offset) tegra 230 drivers/usb/host/xhci-tegra.c return readl(tegra->ipfs_base + offset); tegra 233 drivers/usb/host/xhci-tegra.c static inline void ipfs_writel(struct tegra_xusb *tegra, u32 value, tegra 236 drivers/usb/host/xhci-tegra.c writel(value, tegra->ipfs_base + offset); tegra 239 drivers/usb/host/xhci-tegra.c static u32 csb_readl(struct tegra_xusb *tegra, unsigned int offset) tegra 244 drivers/usb/host/xhci-tegra.c fpci_writel(tegra, page, XUSB_CFG_ARU_C11_CSBRANGE); tegra 246 drivers/usb/host/xhci-tegra.c return fpci_readl(tegra, XUSB_CFG_CSB_BASE_ADDR + ofs); tegra 249 drivers/usb/host/xhci-tegra.c static void csb_writel(struct tegra_xusb *tegra, u32 value, tegra 255 drivers/usb/host/xhci-tegra.c fpci_writel(tegra, page, XUSB_CFG_ARU_C11_CSBRANGE); tegra 256 drivers/usb/host/xhci-tegra.c fpci_writel(tegra, value, XUSB_CFG_CSB_BASE_ADDR + ofs); tegra 259 drivers/usb/host/xhci-tegra.c static int tegra_xusb_set_ss_clk(struct tegra_xusb *tegra, tegra 263 drivers/usb/host/xhci-tegra.c struct clk *clk = tegra->ss_src_clk; tegra 277 drivers/usb/host/xhci-tegra.c new_parent_rate = clk_get_rate(tegra->pll_u_480m); tegra 284 drivers/usb/host/xhci-tegra.c err = clk_set_parent(clk, tegra->pll_u_480m); tegra 300 drivers/usb/host/xhci-tegra.c err = clk_set_parent(clk, tegra->clk_m); tegra 311 drivers/usb/host/xhci-tegra.c dev_err(tegra->dev, "Invalid SS rate: %lu Hz\n", rate); tegra 316 drivers/usb/host/xhci-tegra.c dev_err(tegra->dev, "SS clock doesn't match requested rate\n"); tegra 387 drivers/usb/host/xhci-tegra.c static int tegra_xusb_mbox_send(struct tegra_xusb *tegra, tegra 398 drivers/usb/host/xhci-tegra.c value = fpci_readl(tegra, XUSB_CFG_ARU_MBOX_OWNER); tegra 400 drivers/usb/host/xhci-tegra.c dev_err(tegra->dev, "mailbox is busy\n"); tegra 404 drivers/usb/host/xhci-tegra.c fpci_writel(tegra, MBOX_OWNER_SW, XUSB_CFG_ARU_MBOX_OWNER); tegra 406 drivers/usb/host/xhci-tegra.c value = fpci_readl(tegra, XUSB_CFG_ARU_MBOX_OWNER); tegra 408 drivers/usb/host/xhci-tegra.c dev_err(tegra->dev, "failed to acquire mailbox\n"); tegra 416 drivers/usb/host/xhci-tegra.c fpci_writel(tegra, value, XUSB_CFG_ARU_MBOX_DATA_IN); tegra 418 drivers/usb/host/xhci-tegra.c value = fpci_readl(tegra, XUSB_CFG_ARU_MBOX_CMD); tegra 420 drivers/usb/host/xhci-tegra.c fpci_writel(tegra, value, XUSB_CFG_ARU_MBOX_CMD); tegra 426 drivers/usb/host/xhci-tegra.c value = fpci_readl(tegra, XUSB_CFG_ARU_MBOX_OWNER); tegra 434 drivers/usb/host/xhci-tegra.c value = fpci_readl(tegra, XUSB_CFG_ARU_MBOX_OWNER); tegra 445 drivers/usb/host/xhci-tegra.c struct tegra_xusb *tegra = data; tegra 449 drivers/usb/host/xhci-tegra.c value = fpci_readl(tegra, XUSB_CFG_ARU_SMI_INTR); tegra 450 drivers/usb/host/xhci-tegra.c fpci_writel(tegra, value, XUSB_CFG_ARU_SMI_INTR); tegra 453 drivers/usb/host/xhci-tegra.c dev_err(tegra->dev, "controller firmware hang\n"); tegra 458 drivers/usb/host/xhci-tegra.c static void tegra_xusb_mbox_handle(struct tegra_xusb *tegra, tegra 461 drivers/usb/host/xhci-tegra.c struct tegra_xusb_padctl *padctl = tegra->padctl; tegra 462 drivers/usb/host/xhci-tegra.c const struct tegra_xusb_soc *soc = tegra->soc; tegra 463 drivers/usb/host/xhci-tegra.c struct device *dev = tegra->dev; tegra 475 drivers/usb/host/xhci-tegra.c rsp.data = clk_get_rate(tegra->falcon_clk) / 1000; tegra 485 drivers/usb/host/xhci-tegra.c if (tegra->soc->scale_ss_clock) { tegra 486 drivers/usb/host/xhci-tegra.c err = tegra_xusb_set_ss_clk(tegra, msg->data * 1000); tegra 492 drivers/usb/host/xhci-tegra.c rsp.data = clk_get_rate(tegra->ss_src_clk) / 1000; tegra 587 drivers/usb/host/xhci-tegra.c err = tegra_xusb_mbox_send(tegra, &rsp); tegra 595 drivers/usb/host/xhci-tegra.c struct tegra_xusb *tegra = data; tegra 599 drivers/usb/host/xhci-tegra.c mutex_lock(&tegra->lock); tegra 601 drivers/usb/host/xhci-tegra.c value = fpci_readl(tegra, XUSB_CFG_ARU_MBOX_DATA_OUT); tegra 604 drivers/usb/host/xhci-tegra.c value = fpci_readl(tegra, XUSB_CFG_ARU_MBOX_CMD); tegra 606 drivers/usb/host/xhci-tegra.c fpci_writel(tegra, value, XUSB_CFG_ARU_MBOX_CMD); tegra 610 drivers/usb/host/xhci-tegra.c fpci_writel(tegra, MBOX_OWNER_NONE, XUSB_CFG_ARU_MBOX_OWNER); tegra 612 drivers/usb/host/xhci-tegra.c tegra_xusb_mbox_handle(tegra, &msg); tegra 614 drivers/usb/host/xhci-tegra.c mutex_unlock(&tegra->lock); tegra 618 drivers/usb/host/xhci-tegra.c static void tegra_xusb_config(struct tegra_xusb *tegra, tegra 623 drivers/usb/host/xhci-tegra.c if (tegra->soc->has_ipfs) { tegra 624 drivers/usb/host/xhci-tegra.c value = ipfs_readl(tegra, IPFS_XUSB_HOST_CONFIGURATION_0); tegra 626 drivers/usb/host/xhci-tegra.c ipfs_writel(tegra, value, IPFS_XUSB_HOST_CONFIGURATION_0); tegra 632 drivers/usb/host/xhci-tegra.c value = fpci_readl(tegra, XUSB_CFG_4); tegra 635 drivers/usb/host/xhci-tegra.c fpci_writel(tegra, value, XUSB_CFG_4); tegra 640 drivers/usb/host/xhci-tegra.c value = fpci_readl(tegra, XUSB_CFG_1); tegra 642 drivers/usb/host/xhci-tegra.c fpci_writel(tegra, value, XUSB_CFG_1); tegra 644 drivers/usb/host/xhci-tegra.c if (tegra->soc->has_ipfs) { tegra 646 drivers/usb/host/xhci-tegra.c value = ipfs_readl(tegra, IPFS_XUSB_HOST_INTR_MASK_0); tegra 648 drivers/usb/host/xhci-tegra.c ipfs_writel(tegra, value, IPFS_XUSB_HOST_INTR_MASK_0); tegra 651 drivers/usb/host/xhci-tegra.c ipfs_writel(tegra, 0x80, IPFS_XUSB_HOST_CLKGATE_HYSTERESIS_0); tegra 655 drivers/usb/host/xhci-tegra.c static int tegra_xusb_clk_enable(struct tegra_xusb *tegra) tegra 659 drivers/usb/host/xhci-tegra.c err = clk_prepare_enable(tegra->pll_e); tegra 663 drivers/usb/host/xhci-tegra.c err = clk_prepare_enable(tegra->host_clk); tegra 667 drivers/usb/host/xhci-tegra.c err = clk_prepare_enable(tegra->ss_clk); tegra 671 drivers/usb/host/xhci-tegra.c err = clk_prepare_enable(tegra->falcon_clk); tegra 675 drivers/usb/host/xhci-tegra.c err = clk_prepare_enable(tegra->fs_src_clk); tegra 679 drivers/usb/host/xhci-tegra.c err = clk_prepare_enable(tegra->hs_src_clk); tegra 683 drivers/usb/host/xhci-tegra.c if (tegra->soc->scale_ss_clock) { tegra 684 drivers/usb/host/xhci-tegra.c err = tegra_xusb_set_ss_clk(tegra, TEGRA_XHCI_SS_HIGH_SPEED); tegra 692 drivers/usb/host/xhci-tegra.c clk_disable_unprepare(tegra->hs_src_clk); tegra 694 drivers/usb/host/xhci-tegra.c clk_disable_unprepare(tegra->fs_src_clk); tegra 696 drivers/usb/host/xhci-tegra.c clk_disable_unprepare(tegra->falcon_clk); tegra 698 drivers/usb/host/xhci-tegra.c clk_disable_unprepare(tegra->ss_clk); tegra 700 drivers/usb/host/xhci-tegra.c clk_disable_unprepare(tegra->host_clk); tegra 702 drivers/usb/host/xhci-tegra.c clk_disable_unprepare(tegra->pll_e); tegra 706 drivers/usb/host/xhci-tegra.c static void tegra_xusb_clk_disable(struct tegra_xusb *tegra) tegra 708 drivers/usb/host/xhci-tegra.c clk_disable_unprepare(tegra->pll_e); tegra 709 drivers/usb/host/xhci-tegra.c clk_disable_unprepare(tegra->host_clk); tegra 710 drivers/usb/host/xhci-tegra.c clk_disable_unprepare(tegra->ss_clk); tegra 711 drivers/usb/host/xhci-tegra.c clk_disable_unprepare(tegra->falcon_clk); tegra 712 drivers/usb/host/xhci-tegra.c clk_disable_unprepare(tegra->fs_src_clk); tegra 713 drivers/usb/host/xhci-tegra.c clk_disable_unprepare(tegra->hs_src_clk); tegra 716 drivers/usb/host/xhci-tegra.c static int tegra_xusb_phy_enable(struct tegra_xusb *tegra) tegra 721 drivers/usb/host/xhci-tegra.c for (i = 0; i < tegra->num_phys; i++) { tegra 722 drivers/usb/host/xhci-tegra.c err = phy_init(tegra->phys[i]); tegra 726 drivers/usb/host/xhci-tegra.c err = phy_power_on(tegra->phys[i]); tegra 728 drivers/usb/host/xhci-tegra.c phy_exit(tegra->phys[i]); tegra 737 drivers/usb/host/xhci-tegra.c phy_power_off(tegra->phys[i]); tegra 738 drivers/usb/host/xhci-tegra.c phy_exit(tegra->phys[i]); tegra 744 drivers/usb/host/xhci-tegra.c static void tegra_xusb_phy_disable(struct tegra_xusb *tegra) tegra 748 drivers/usb/host/xhci-tegra.c for (i = 0; i < tegra->num_phys; i++) { tegra 749 drivers/usb/host/xhci-tegra.c phy_power_off(tegra->phys[i]); tegra 750 drivers/usb/host/xhci-tegra.c phy_exit(tegra->phys[i]); tegra 756 drivers/usb/host/xhci-tegra.c struct tegra_xusb *tegra = dev_get_drvdata(dev); tegra 758 drivers/usb/host/xhci-tegra.c regulator_bulk_disable(tegra->soc->num_supplies, tegra->supplies); tegra 759 drivers/usb/host/xhci-tegra.c tegra_xusb_clk_disable(tegra); tegra 766 drivers/usb/host/xhci-tegra.c struct tegra_xusb *tegra = dev_get_drvdata(dev); tegra 769 drivers/usb/host/xhci-tegra.c err = tegra_xusb_clk_enable(tegra); tegra 775 drivers/usb/host/xhci-tegra.c err = regulator_bulk_enable(tegra->soc->num_supplies, tegra->supplies); tegra 784 drivers/usb/host/xhci-tegra.c tegra_xusb_clk_disable(tegra); tegra 788 drivers/usb/host/xhci-tegra.c static int tegra_xusb_load_firmware(struct tegra_xusb *tegra) tegra 792 drivers/usb/host/xhci-tegra.c struct device *dev = tegra->dev; tegra 801 drivers/usb/host/xhci-tegra.c err = request_firmware(&fw, tegra->soc->firmware, tegra->dev); tegra 803 drivers/usb/host/xhci-tegra.c dev_err(tegra->dev, "failed to request firmware: %d\n", err); tegra 809 drivers/usb/host/xhci-tegra.c tegra->fw.size = le32_to_cpu(header->fwimg_len); tegra 811 drivers/usb/host/xhci-tegra.c tegra->fw.virt = dma_alloc_coherent(tegra->dev, tegra->fw.size, tegra 812 drivers/usb/host/xhci-tegra.c &tegra->fw.phys, GFP_KERNEL); tegra 813 drivers/usb/host/xhci-tegra.c if (!tegra->fw.virt) { tegra 814 drivers/usb/host/xhci-tegra.c dev_err(tegra->dev, "failed to allocate memory for firmware\n"); tegra 819 drivers/usb/host/xhci-tegra.c header = (struct tegra_xusb_fw_header *)tegra->fw.virt; tegra 820 drivers/usb/host/xhci-tegra.c memcpy(tegra->fw.virt, fw->data, tegra->fw.size); tegra 823 drivers/usb/host/xhci-tegra.c if (csb_readl(tegra, XUSB_CSB_MP_ILOAD_BASE_LO) != 0) { tegra 825 drivers/usb/host/xhci-tegra.c csb_readl(tegra, XUSB_FALC_CPUCTL)); tegra 830 drivers/usb/host/xhci-tegra.c csb_writel(tegra, tegra->fw.size, XUSB_CSB_MP_ILOAD_ATTR); tegra 836 drivers/usb/host/xhci-tegra.c address = tegra->fw.phys + sizeof(*header); tegra 837 drivers/usb/host/xhci-tegra.c csb_writel(tegra, address >> 32, XUSB_CSB_MP_ILOAD_BASE_HI); tegra 838 drivers/usb/host/xhci-tegra.c csb_writel(tegra, address, XUSB_CSB_MP_ILOAD_BASE_LO); tegra 841 drivers/usb/host/xhci-tegra.c csb_writel(tegra, APMAP_BOOTPATH, XUSB_CSB_MP_APMAP); tegra 844 drivers/usb/host/xhci-tegra.c csb_writel(tegra, L2IMEMOP_INVALIDATE_ALL, XUSB_CSB_MP_L2IMEMOP_TRIG); tegra 860 drivers/usb/host/xhci-tegra.c csb_writel(tegra, value, XUSB_CSB_MP_L2IMEMOP_SIZE); tegra 863 drivers/usb/host/xhci-tegra.c csb_writel(tegra, L2IMEMOP_LOAD_LOCKED_RESULT, tegra 867 drivers/usb/host/xhci-tegra.c csb_writel(tegra, code_size_blocks, XUSB_FALC_IMFILLCTL); tegra 873 drivers/usb/host/xhci-tegra.c csb_writel(tegra, value, XUSB_FALC_IMFILLRNG1); tegra 875 drivers/usb/host/xhci-tegra.c csb_writel(tegra, 0, XUSB_FALC_DMACTL); tegra 879 drivers/usb/host/xhci-tegra.c csb_writel(tegra, le32_to_cpu(header->boot_codetag), tegra 885 drivers/usb/host/xhci-tegra.c csb_writel(tegra, CPUCTL_STARTCPU, XUSB_FALC_CPUCTL); tegra 888 drivers/usb/host/xhci-tegra.c if (csb_readl(tegra, XUSB_FALC_CPUCTL) == CPUCTL_STATE_STOPPED) tegra 894 drivers/usb/host/xhci-tegra.c if (csb_readl(tegra, XUSB_FALC_CPUCTL) != CPUCTL_STATE_STOPPED) { tegra 896 drivers/usb/host/xhci-tegra.c csb_readl(tegra, XUSB_FALC_CPUCTL)); tegra 911 drivers/usb/host/xhci-tegra.c struct tegra_xusb *tegra) tegra 913 drivers/usb/host/xhci-tegra.c if (tegra->genpd_dl_ss) tegra 914 drivers/usb/host/xhci-tegra.c device_link_del(tegra->genpd_dl_ss); tegra 915 drivers/usb/host/xhci-tegra.c if (tegra->genpd_dl_host) tegra 916 drivers/usb/host/xhci-tegra.c device_link_del(tegra->genpd_dl_host); tegra 917 drivers/usb/host/xhci-tegra.c if (!IS_ERR_OR_NULL(tegra->genpd_dev_ss)) tegra 918 drivers/usb/host/xhci-tegra.c dev_pm_domain_detach(tegra->genpd_dev_ss, true); tegra 919 drivers/usb/host/xhci-tegra.c if (!IS_ERR_OR_NULL(tegra->genpd_dev_host)) tegra 920 drivers/usb/host/xhci-tegra.c dev_pm_domain_detach(tegra->genpd_dev_host, true); tegra 924 drivers/usb/host/xhci-tegra.c struct tegra_xusb *tegra) tegra 928 drivers/usb/host/xhci-tegra.c tegra->genpd_dev_host = dev_pm_domain_attach_by_name(dev, "xusb_host"); tegra 929 drivers/usb/host/xhci-tegra.c if (IS_ERR(tegra->genpd_dev_host)) { tegra 930 drivers/usb/host/xhci-tegra.c err = PTR_ERR(tegra->genpd_dev_host); tegra 935 drivers/usb/host/xhci-tegra.c tegra->genpd_dev_ss = dev_pm_domain_attach_by_name(dev, "xusb_ss"); tegra 936 drivers/usb/host/xhci-tegra.c if (IS_ERR(tegra->genpd_dev_ss)) { tegra 937 drivers/usb/host/xhci-tegra.c err = PTR_ERR(tegra->genpd_dev_ss); tegra 942 drivers/usb/host/xhci-tegra.c tegra->genpd_dl_host = device_link_add(dev, tegra->genpd_dev_host, tegra 945 drivers/usb/host/xhci-tegra.c if (!tegra->genpd_dl_host) { tegra 950 drivers/usb/host/xhci-tegra.c tegra->genpd_dl_ss = device_link_add(dev, tegra->genpd_dev_ss, tegra 953 drivers/usb/host/xhci-tegra.c if (!tegra->genpd_dl_ss) { tegra 965 drivers/usb/host/xhci-tegra.c struct tegra_xusb *tegra; tegra 973 drivers/usb/host/xhci-tegra.c tegra = devm_kzalloc(&pdev->dev, sizeof(*tegra), GFP_KERNEL); tegra 974 drivers/usb/host/xhci-tegra.c if (!tegra) tegra 977 drivers/usb/host/xhci-tegra.c tegra->soc = of_device_get_match_data(&pdev->dev); tegra 978 drivers/usb/host/xhci-tegra.c mutex_init(&tegra->lock); tegra 979 drivers/usb/host/xhci-tegra.c tegra->dev = &pdev->dev; tegra 982 drivers/usb/host/xhci-tegra.c tegra->regs = devm_ioremap_resource(&pdev->dev, regs); tegra 983 drivers/usb/host/xhci-tegra.c if (IS_ERR(tegra->regs)) tegra 984 drivers/usb/host/xhci-tegra.c return PTR_ERR(tegra->regs); tegra 987 drivers/usb/host/xhci-tegra.c tegra->fpci_base = devm_ioremap_resource(&pdev->dev, res); tegra 988 drivers/usb/host/xhci-tegra.c if (IS_ERR(tegra->fpci_base)) tegra 989 drivers/usb/host/xhci-tegra.c return PTR_ERR(tegra->fpci_base); tegra 991 drivers/usb/host/xhci-tegra.c if (tegra->soc->has_ipfs) { tegra 993 drivers/usb/host/xhci-tegra.c tegra->ipfs_base = devm_ioremap_resource(&pdev->dev, res); tegra 994 drivers/usb/host/xhci-tegra.c if (IS_ERR(tegra->ipfs_base)) tegra 995 drivers/usb/host/xhci-tegra.c return PTR_ERR(tegra->ipfs_base); tegra 998 drivers/usb/host/xhci-tegra.c tegra->xhci_irq = platform_get_irq(pdev, 0); tegra 999 drivers/usb/host/xhci-tegra.c if (tegra->xhci_irq < 0) tegra 1000 drivers/usb/host/xhci-tegra.c return tegra->xhci_irq; tegra 1002 drivers/usb/host/xhci-tegra.c tegra->mbox_irq = platform_get_irq(pdev, 1); tegra 1003 drivers/usb/host/xhci-tegra.c if (tegra->mbox_irq < 0) tegra 1004 drivers/usb/host/xhci-tegra.c return tegra->mbox_irq; tegra 1006 drivers/usb/host/xhci-tegra.c tegra->padctl = tegra_xusb_padctl_get(&pdev->dev); tegra 1007 drivers/usb/host/xhci-tegra.c if (IS_ERR(tegra->padctl)) tegra 1008 drivers/usb/host/xhci-tegra.c return PTR_ERR(tegra->padctl); tegra 1010 drivers/usb/host/xhci-tegra.c tegra->host_clk = devm_clk_get(&pdev->dev, "xusb_host"); tegra 1011 drivers/usb/host/xhci-tegra.c if (IS_ERR(tegra->host_clk)) { tegra 1012 drivers/usb/host/xhci-tegra.c err = PTR_ERR(tegra->host_clk); tegra 1017 drivers/usb/host/xhci-tegra.c tegra->falcon_clk = devm_clk_get(&pdev->dev, "xusb_falcon_src"); tegra 1018 drivers/usb/host/xhci-tegra.c if (IS_ERR(tegra->falcon_clk)) { tegra 1019 drivers/usb/host/xhci-tegra.c err = PTR_ERR(tegra->falcon_clk); tegra 1024 drivers/usb/host/xhci-tegra.c tegra->ss_clk = devm_clk_get(&pdev->dev, "xusb_ss"); tegra 1025 drivers/usb/host/xhci-tegra.c if (IS_ERR(tegra->ss_clk)) { tegra 1026 drivers/usb/host/xhci-tegra.c err = PTR_ERR(tegra->ss_clk); tegra 1031 drivers/usb/host/xhci-tegra.c tegra->ss_src_clk = devm_clk_get(&pdev->dev, "xusb_ss_src"); tegra 1032 drivers/usb/host/xhci-tegra.c if (IS_ERR(tegra->ss_src_clk)) { tegra 1033 drivers/usb/host/xhci-tegra.c err = PTR_ERR(tegra->ss_src_clk); tegra 1038 drivers/usb/host/xhci-tegra.c tegra->hs_src_clk = devm_clk_get(&pdev->dev, "xusb_hs_src"); tegra 1039 drivers/usb/host/xhci-tegra.c if (IS_ERR(tegra->hs_src_clk)) { tegra 1040 drivers/usb/host/xhci-tegra.c err = PTR_ERR(tegra->hs_src_clk); tegra 1045 drivers/usb/host/xhci-tegra.c tegra->fs_src_clk = devm_clk_get(&pdev->dev, "xusb_fs_src"); tegra 1046 drivers/usb/host/xhci-tegra.c if (IS_ERR(tegra->fs_src_clk)) { tegra 1047 drivers/usb/host/xhci-tegra.c err = PTR_ERR(tegra->fs_src_clk); tegra 1052 drivers/usb/host/xhci-tegra.c tegra->pll_u_480m = devm_clk_get(&pdev->dev, "pll_u_480m"); tegra 1053 drivers/usb/host/xhci-tegra.c if (IS_ERR(tegra->pll_u_480m)) { tegra 1054 drivers/usb/host/xhci-tegra.c err = PTR_ERR(tegra->pll_u_480m); tegra 1059 drivers/usb/host/xhci-tegra.c tegra->clk_m = devm_clk_get(&pdev->dev, "clk_m"); tegra 1060 drivers/usb/host/xhci-tegra.c if (IS_ERR(tegra->clk_m)) { tegra 1061 drivers/usb/host/xhci-tegra.c err = PTR_ERR(tegra->clk_m); tegra 1066 drivers/usb/host/xhci-tegra.c tegra->pll_e = devm_clk_get(&pdev->dev, "pll_e"); tegra 1067 drivers/usb/host/xhci-tegra.c if (IS_ERR(tegra->pll_e)) { tegra 1068 drivers/usb/host/xhci-tegra.c err = PTR_ERR(tegra->pll_e); tegra 1074 drivers/usb/host/xhci-tegra.c tegra->host_rst = devm_reset_control_get(&pdev->dev, tegra 1076 drivers/usb/host/xhci-tegra.c if (IS_ERR(tegra->host_rst)) { tegra 1077 drivers/usb/host/xhci-tegra.c err = PTR_ERR(tegra->host_rst); tegra 1083 drivers/usb/host/xhci-tegra.c tegra->ss_rst = devm_reset_control_get(&pdev->dev, "xusb_ss"); tegra 1084 drivers/usb/host/xhci-tegra.c if (IS_ERR(tegra->ss_rst)) { tegra 1085 drivers/usb/host/xhci-tegra.c err = PTR_ERR(tegra->ss_rst); tegra 1092 drivers/usb/host/xhci-tegra.c tegra->ss_clk, tegra 1093 drivers/usb/host/xhci-tegra.c tegra->ss_rst); tegra 1101 drivers/usb/host/xhci-tegra.c tegra->host_clk, tegra 1102 drivers/usb/host/xhci-tegra.c tegra->host_rst); tegra 1110 drivers/usb/host/xhci-tegra.c err = tegra_xusb_powerdomain_init(&pdev->dev, tegra); tegra 1115 drivers/usb/host/xhci-tegra.c tegra->supplies = devm_kcalloc(&pdev->dev, tegra->soc->num_supplies, tegra 1116 drivers/usb/host/xhci-tegra.c sizeof(*tegra->supplies), GFP_KERNEL); tegra 1117 drivers/usb/host/xhci-tegra.c if (!tegra->supplies) { tegra 1122 drivers/usb/host/xhci-tegra.c for (i = 0; i < tegra->soc->num_supplies; i++) tegra 1123 drivers/usb/host/xhci-tegra.c tegra->supplies[i].supply = tegra->soc->supply_names[i]; tegra 1125 drivers/usb/host/xhci-tegra.c err = devm_regulator_bulk_get(&pdev->dev, tegra->soc->num_supplies, tegra 1126 drivers/usb/host/xhci-tegra.c tegra->supplies); tegra 1132 drivers/usb/host/xhci-tegra.c for (i = 0; i < tegra->soc->num_types; i++) tegra 1133 drivers/usb/host/xhci-tegra.c tegra->num_phys += tegra->soc->phy_types[i].num; tegra 1135 drivers/usb/host/xhci-tegra.c tegra->phys = devm_kcalloc(&pdev->dev, tegra->num_phys, tegra 1136 drivers/usb/host/xhci-tegra.c sizeof(*tegra->phys), GFP_KERNEL); tegra 1137 drivers/usb/host/xhci-tegra.c if (!tegra->phys) { tegra 1142 drivers/usb/host/xhci-tegra.c for (i = 0, k = 0; i < tegra->soc->num_types; i++) { tegra 1145 drivers/usb/host/xhci-tegra.c for (j = 0; j < tegra->soc->phy_types[i].num; j++) { tegra 1147 drivers/usb/host/xhci-tegra.c tegra->soc->phy_types[i].name, j); tegra 1158 drivers/usb/host/xhci-tegra.c tegra->phys[k++] = phy; tegra 1162 drivers/usb/host/xhci-tegra.c tegra->hcd = usb_create_hcd(&tegra_xhci_hc_driver, &pdev->dev, tegra 1164 drivers/usb/host/xhci-tegra.c if (!tegra->hcd) { tegra 1173 drivers/usb/host/xhci-tegra.c platform_set_drvdata(pdev, tegra); tegra 1175 drivers/usb/host/xhci-tegra.c err = tegra_xusb_phy_enable(tegra); tegra 1192 drivers/usb/host/xhci-tegra.c tegra_xusb_config(tegra, regs); tegra 1198 drivers/usb/host/xhci-tegra.c err = dma_set_mask_and_coherent(tegra->dev, DMA_BIT_MASK(40)); tegra 1204 drivers/usb/host/xhci-tegra.c err = tegra_xusb_load_firmware(tegra); tegra 1210 drivers/usb/host/xhci-tegra.c tegra->hcd->regs = tegra->regs; tegra 1211 drivers/usb/host/xhci-tegra.c tegra->hcd->rsrc_start = regs->start; tegra 1212 drivers/usb/host/xhci-tegra.c tegra->hcd->rsrc_len = resource_size(regs); tegra 1214 drivers/usb/host/xhci-tegra.c err = usb_add_hcd(tegra->hcd, tegra->xhci_irq, IRQF_SHARED); tegra 1220 drivers/usb/host/xhci-tegra.c device_wakeup_enable(tegra->hcd->self.controller); tegra 1222 drivers/usb/host/xhci-tegra.c xhci = hcd_to_xhci(tegra->hcd); tegra 1227 drivers/usb/host/xhci-tegra.c tegra->hcd); tegra 1234 drivers/usb/host/xhci-tegra.c err = usb_add_hcd(xhci->shared_hcd, tegra->xhci_irq, IRQF_SHARED); tegra 1240 drivers/usb/host/xhci-tegra.c mutex_lock(&tegra->lock); tegra 1246 drivers/usb/host/xhci-tegra.c err = tegra_xusb_mbox_send(tegra, &msg); tegra 1249 drivers/usb/host/xhci-tegra.c mutex_unlock(&tegra->lock); tegra 1253 drivers/usb/host/xhci-tegra.c mutex_unlock(&tegra->lock); tegra 1255 drivers/usb/host/xhci-tegra.c err = devm_request_threaded_irq(&pdev->dev, tegra->mbox_irq, tegra 1258 drivers/usb/host/xhci-tegra.c dev_name(&pdev->dev), tegra); tegra 1271 drivers/usb/host/xhci-tegra.c usb_remove_hcd(tegra->hcd); tegra 1276 drivers/usb/host/xhci-tegra.c usb_put_hcd(tegra->hcd); tegra 1278 drivers/usb/host/xhci-tegra.c tegra_xusb_phy_disable(tegra); tegra 1285 drivers/usb/host/xhci-tegra.c tegra_xusb_powerdomain_remove(&pdev->dev, tegra); tegra 1288 drivers/usb/host/xhci-tegra.c tegra_xusb_padctl_put(tegra->padctl); tegra 1294 drivers/usb/host/xhci-tegra.c struct tegra_xusb *tegra = platform_get_drvdata(pdev); tegra 1295 drivers/usb/host/xhci-tegra.c struct xhci_hcd *xhci = hcd_to_xhci(tegra->hcd); tegra 1300 drivers/usb/host/xhci-tegra.c usb_remove_hcd(tegra->hcd); tegra 1301 drivers/usb/host/xhci-tegra.c usb_put_hcd(tegra->hcd); tegra 1303 drivers/usb/host/xhci-tegra.c dma_free_coherent(&pdev->dev, tegra->fw.size, tegra->fw.virt, tegra 1304 drivers/usb/host/xhci-tegra.c tegra->fw.phys); tegra 1313 drivers/usb/host/xhci-tegra.c tegra_xusb_powerdomain_remove(&pdev->dev, tegra); tegra 1316 drivers/usb/host/xhci-tegra.c tegra_xusb_phy_disable(tegra); tegra 1318 drivers/usb/host/xhci-tegra.c tegra_xusb_padctl_put(tegra->padctl); tegra 1326 drivers/usb/host/xhci-tegra.c struct tegra_xusb *tegra = dev_get_drvdata(dev); tegra 1327 drivers/usb/host/xhci-tegra.c struct xhci_hcd *xhci = hcd_to_xhci(tegra->hcd); tegra 1336 drivers/usb/host/xhci-tegra.c struct tegra_xusb *tegra = dev_get_drvdata(dev); tegra 1337 drivers/usb/host/xhci-tegra.c struct xhci_hcd *xhci = hcd_to_xhci(tegra->hcd);