/Linux-v6.1/drivers/memory/tegra/ |
D | tegra20-emc.c | 237 struct tegra_emc *emc = data; in tegra_emc_isr() local 241 status = readl_relaxed(emc->regs + EMC_INTSTATUS) & intmask; in tegra_emc_isr() 247 dev_err_ratelimited(emc->dev, in tegra_emc_isr() 251 writel_relaxed(status, emc->regs + EMC_INTSTATUS); in tegra_emc_isr() 256 static struct emc_timing *tegra_emc_find_timing(struct tegra_emc *emc, in tegra_emc_find_timing() argument 262 for (i = 0; i < emc->num_timings; i++) { in tegra_emc_find_timing() 263 if (emc->timings[i].rate >= rate) { in tegra_emc_find_timing() 264 timing = &emc->timings[i]; in tegra_emc_find_timing() 270 dev_err(emc->dev, "no timing for rate %lu\n", rate); in tegra_emc_find_timing() 277 static int emc_prepare_timing_change(struct tegra_emc *emc, unsigned long rate) in emc_prepare_timing_change() argument [all …]
|
D | tegra30-emc.c | 398 static int emc_seq_update_timing(struct tegra_emc *emc) in emc_seq_update_timing() argument 403 writel_relaxed(EMC_TIMING_UPDATE, emc->regs + EMC_TIMING_CONTROL); in emc_seq_update_timing() 405 err = readl_relaxed_poll_timeout_atomic(emc->regs + EMC_STATUS, val, in emc_seq_update_timing() 409 dev_err(emc->dev, "failed to update timing: %d\n", err); in emc_seq_update_timing() 418 struct tegra_emc *emc = data; in tegra_emc_isr() local 422 status = readl_relaxed(emc->regs + EMC_INTSTATUS) & intmask; in tegra_emc_isr() 428 dev_err_ratelimited(emc->dev, in tegra_emc_isr() 432 writel_relaxed(status, emc->regs + EMC_INTSTATUS); in tegra_emc_isr() 437 static struct emc_timing *emc_find_timing(struct tegra_emc *emc, in emc_find_timing() argument 443 for (i = 0; i < emc->num_timings; i++) { in emc_find_timing() [all …]
|
D | tegra210-emc-core.c | 561 struct tegra210_emc *emc = from_timer(emc, timer, training); in tegra210_emc_train() local 564 if (!emc->last) in tegra210_emc_train() 567 spin_lock_irqsave(&emc->lock, flags); in tegra210_emc_train() 569 if (emc->sequence->periodic_compensation) in tegra210_emc_train() 570 emc->sequence->periodic_compensation(emc); in tegra210_emc_train() 572 spin_unlock_irqrestore(&emc->lock, flags); in tegra210_emc_train() 574 mod_timer(&emc->training, in tegra210_emc_train() 575 jiffies + msecs_to_jiffies(emc->training_interval)); in tegra210_emc_train() 578 static void tegra210_emc_training_start(struct tegra210_emc *emc) in tegra210_emc_training_start() argument 580 mod_timer(&emc->training, in tegra210_emc_training_start() [all …]
|
D | tegra124-emc.c | 518 static void emc_ccfifo_writel(struct tegra_emc *emc, u32 value, in emc_ccfifo_writel() argument 521 writel(value, emc->regs + EMC_CCFIFO_DATA); in emc_ccfifo_writel() 522 writel(offset, emc->regs + EMC_CCFIFO_ADDR); in emc_ccfifo_writel() 525 static void emc_seq_update_timing(struct tegra_emc *emc) in emc_seq_update_timing() argument 530 writel(1, emc->regs + EMC_TIMING_CONTROL); in emc_seq_update_timing() 533 value = readl(emc->regs + EMC_STATUS); in emc_seq_update_timing() 539 dev_err(emc->dev, "timing update timed out\n"); in emc_seq_update_timing() 542 static void emc_seq_disable_auto_cal(struct tegra_emc *emc) in emc_seq_disable_auto_cal() argument 547 writel(0, emc->regs + EMC_AUTO_CAL_INTERVAL); in emc_seq_disable_auto_cal() 550 value = readl(emc->regs + EMC_AUTO_CAL_STATUS); in emc_seq_disable_auto_cal() [all …]
|
D | tegra186-emc.c | 59 static bool tegra186_emc_validate_rate(struct tegra186_emc *emc, in tegra186_emc_validate_rate() argument 64 for (i = 0; i < emc->num_dvfs; i++) in tegra186_emc_validate_rate() 65 if (rate == emc->dvfs[i].rate) in tegra186_emc_validate_rate() 74 struct tegra186_emc *emc = s->private; in tegra186_emc_debug_available_rates_show() local 78 for (i = 0; i < emc->num_dvfs; i++) { in tegra186_emc_debug_available_rates_show() 79 seq_printf(s, "%s%lu", prefix, emc->dvfs[i].rate); in tegra186_emc_debug_available_rates_show() 104 struct tegra186_emc *emc = data; in tegra186_emc_debug_min_rate_get() local 106 *rate = emc->debugfs.min_rate; in tegra186_emc_debug_min_rate_get() 113 struct tegra186_emc *emc = data; in tegra186_emc_debug_min_rate_set() local 116 if (!tegra186_emc_validate_rate(emc, rate)) in tegra186_emc_debug_min_rate_set() [all …]
|
D | tegra210-emc-cc-r21021.c | 36 #define emc_dbg(emc, flags, ...) dev_dbg(emc->dev, __VA_ARGS__) argument 108 emc_dbg(emc, EMA_UPDATES, "%s: (s=%lu) EMA: %u\n", \ 116 static u32 update_clock_tree_delay(struct tegra210_emc *emc, int type) in update_clock_tree_delay() argument 119 struct tegra210_emc_timing *last = emc->last; in update_clock_tree_delay() 120 struct tegra210_emc_timing *next = emc->next; in update_clock_tree_delay() 134 value = tegra210_emc_mrr_read(emc, 2, 19); in update_clock_tree_delay() 136 for (i = 0; i < emc->num_channels; i++) { in update_clock_tree_delay() 145 value = tegra210_emc_mrr_read(emc, 2, 18); in update_clock_tree_delay() 147 for (i = 0; i < emc->num_channels; i++) { in update_clock_tree_delay() 206 if (emc->num_channels > 1) { in update_clock_tree_delay() [all …]
|
D | tegra210-emc-table.c | 15 struct tegra210_emc *emc = dev_get_drvdata(dev); in tegra210_emc_table_device_init() local 35 if (emc->derated) { in tegra210_emc_table_device_init() 40 if (emc->nominal) { in tegra210_emc_table_device_init() 41 if (count != emc->num_timings) { in tegra210_emc_table_device_init() 43 count, emc->num_timings); in tegra210_emc_table_device_init() 48 emc->derated = timings; in tegra210_emc_table_device_init() 50 emc->num_timings = count; in tegra210_emc_table_device_init() 51 emc->nominal = timings; in tegra210_emc_table_device_init() 65 struct tegra210_emc *emc = dev_get_drvdata(dev); in tegra210_emc_table_device_release() local 67 if ((emc->nominal && timings != emc->nominal) && in tegra210_emc_table_device_release() [all …]
|
D | Makefile | 16 obj-$(CONFIG_TEGRA20_EMC) += tegra20-emc.o 17 obj-$(CONFIG_TEGRA30_EMC) += tegra30-emc.o 18 obj-$(CONFIG_TEGRA124_EMC) += tegra124-emc.o 19 obj-$(CONFIG_TEGRA210_EMC_TABLE) += tegra210-emc-table.o 20 obj-$(CONFIG_TEGRA210_EMC) += tegra210-emc.o 21 obj-$(CONFIG_ARCH_TEGRA_186_SOC) += tegra186-emc.o 22 obj-$(CONFIG_ARCH_TEGRA_194_SOC) += tegra186-emc.o 23 obj-$(CONFIG_ARCH_TEGRA_234_SOC) += tegra186-emc.o 25 tegra210-emc-y := tegra210-emc-core.o tegra210-emc-cc-r21021.o
|
D | tegra210-emc.h | 939 void (*set_clock)(struct tegra210_emc *emc, u32 clksrc); 940 u32 (*periodic_compensation)(struct tegra210_emc *emc); 943 static inline void emc_writel(struct tegra210_emc *emc, u32 value, in emc_writel() argument 946 writel_relaxed(value, emc->regs + offset); in emc_writel() 949 static inline u32 emc_readl(struct tegra210_emc *emc, unsigned int offset) in emc_readl() argument 951 return readl_relaxed(emc->regs + offset); in emc_readl() 954 static inline void emc_channel_writel(struct tegra210_emc *emc, in emc_channel_writel() argument 958 writel_relaxed(value, emc->channel[channel] + offset); in emc_channel_writel() 961 static inline u32 emc_channel_readl(struct tegra210_emc *emc, in emc_channel_readl() argument 964 return readl_relaxed(emc->channel[channel] + offset); in emc_channel_readl() [all …]
|
/Linux-v6.1/arch/arm/boot/dts/ |
D | tegra124-apalis-emc.dtsi | 9 emc-timings-1 { 16 clock-names = "emc-parent"; 23 clock-names = "emc-parent"; 30 clock-names = "emc-parent"; 37 clock-names = "emc-parent"; 44 clock-names = "emc-parent"; 51 clock-names = "emc-parent"; 58 clock-names = "emc-parent"; 65 clock-names = "emc-parent"; 72 clock-names = "emc-parent"; [all …]
|
D | tegra124-jetson-tk1-emc.dtsi | 4 emc-timings-3 { 11 clock-names = "emc-parent"; 18 clock-names = "emc-parent"; 25 clock-names = "emc-parent"; 32 clock-names = "emc-parent"; 39 clock-names = "emc-parent"; 46 clock-names = "emc-parent"; 53 clock-names = "emc-parent"; 60 clock-names = "emc-parent"; 67 clock-names = "emc-parent"; [all …]
|
D | tegra124-nyan-blaze-emc.dtsi | 4 emc-timings-1 { 11 clock-names = "emc-parent"; 18 clock-names = "emc-parent"; 25 clock-names = "emc-parent"; 32 clock-names = "emc-parent"; 39 clock-names = "emc-parent"; 46 clock-names = "emc-parent"; 53 clock-names = "emc-parent"; 60 clock-names = "emc-parent"; 69 clock-names = "emc-parent"; [all …]
|
D | tegra124-nyan-big-emc.dtsi | 8 emc-timings-1 { 15 clock-names = "emc-parent"; 22 clock-names = "emc-parent"; 29 clock-names = "emc-parent"; 36 clock-names = "emc-parent"; 43 clock-names = "emc-parent"; 50 clock-names = "emc-parent"; 57 clock-names = "emc-parent"; 64 clock-names = "emc-parent"; 71 clock-names = "emc-parent"; [all …]
|
D | tegra30-asus-tf300t.dts | 146 emc-timings-0 { 211 emc-timings-1 { 276 emc-timings-2 { 343 emc-timings-0 { 350 nvidia,emc-auto-cal-interval = <0x001fffff>; 351 nvidia,emc-mode-1 = <0x80100003>; 352 nvidia,emc-mode-2 = <0x80200008>; 353 nvidia,emc-mode-reset = <0x80001221>; 354 nvidia,emc-zcal-cnt-long = <0x00000040>; 355 nvidia,emc-cfg-dyn-self-ref; [all …]
|
D | tegra30-asus-tf300tg.dts | 220 emc-timings-0 { 285 emc-timings-1 { 350 emc-timings-2 { 417 emc-timings-0 { 424 nvidia,emc-auto-cal-interval = <0x001fffff>; 425 nvidia,emc-mode-1 = <0x80100003>; 426 nvidia,emc-mode-2 = <0x80200048>; 427 nvidia,emc-mode-reset = <0x80001221>; 428 nvidia,emc-zcal-cnt-long = <0x00000040>; 429 nvidia,emc-cfg-dyn-self-ref; [all …]
|
D | tegra30-asus-tf700t.dts | 141 emc-timings-0 { 206 emc-timings-1 { 273 emc-timings-0 { 280 nvidia,emc-auto-cal-interval = <0x001fffff>; 281 nvidia,emc-mode-1 = <0x80100003>; 282 nvidia,emc-mode-2 = <0x80200008>; 283 nvidia,emc-mode-reset = <0x80001221>; 284 nvidia,emc-zcal-cnt-long = <0x00000040>; 285 nvidia,emc-cfg-dyn-self-ref; 286 nvidia,emc-cfg-periodic-qrst; [all …]
|
D | tegra30-asus-tf201.dts | 112 emc-timings-0 { 167 emc-timings-1 { 224 emc-timings-0 { 231 nvidia,emc-auto-cal-interval = <0x001fffff>; 232 nvidia,emc-mode-1 = <0x00010022>; 233 nvidia,emc-mode-2 = <0x00020001>; 234 nvidia,emc-mode-reset = <0x00000000>; 235 nvidia,emc-zcal-cnt-long = <0x00000009>; 236 nvidia,emc-cfg-periodic-qrst; 238 nvidia,emc-configuration = < 0x00000001 [all …]
|
D | tegra30-asus-nexus7-grouper-memory-timings.dtsi | 5 emc-timings-0 { 159 emc-timings-1 { 315 emc-timings-0 { 321 nvidia,emc-auto-cal-interval = <0x001fffff>; 322 nvidia,emc-mode-1 = <0x80100003>; 323 nvidia,emc-mode-2 = <0x80200008>; 324 nvidia,emc-mode-reset = <0x80001221>; 325 nvidia,emc-zcal-cnt-long = <0x00000040>; 326 nvidia,emc-cfg-dyn-self-ref; 327 nvidia,emc-cfg-periodic-qrst; [all …]
|
D | tegra30-asus-nexus7-tilapia-memory-timings.dtsi | 13 emc-timings-0 { 17 nvidia,emc-auto-cal-interval = <0x001fffff>; 18 nvidia,emc-mode-1 = <0x80100002>; 19 nvidia,emc-mode-2 = <0x80200018>; 20 nvidia,emc-mode-reset = <0x80000b71>; 21 nvidia,emc-zcal-cnt-long = <0x00000040>; 22 nvidia,emc-cfg-periodic-qrst; 24 nvidia,emc-configuration = < 118 emc-timings-1 { 122 nvidia,emc-auto-cal-interval = <0x001fffff>; [all …]
|
D | tegra30-pegatron-chagall.dts | 1526 emc-timings-0 { 1581 emc-timings-1 { 1636 emc-timings-2 { 1691 emc-timings-3 { 1748 emc-timings-0 { 1755 nvidia,emc-auto-cal-interval = <0x001fffff>; 1756 nvidia,emc-mode-1 = <0x00010022>; 1757 nvidia,emc-mode-2 = <0x00020001>; 1758 nvidia,emc-mode-reset = <0x00000000>; 1759 nvidia,emc-zcal-cnt-long = <0x00000009>; [all …]
|
D | tegra20-acer-a500-picasso.dts | 1125 emc-tables@0 { 1132 emc-table@25000 { 1134 compatible = "nvidia,tegra20-emc-table"; 1136 nvidia,emc-registers = <0x00000002 0x00000006 1150 emc-table@50000 { 1152 compatible = "nvidia,tegra20-emc-table"; 1154 nvidia,emc-registers = <0x00000003 0x00000007 1168 emc-table@75000 { 1170 compatible = "nvidia,tegra20-emc-table"; 1172 nvidia,emc-registers = <0x00000005 0x0000000a [all …]
|
D | tegra30-ouya.dts | 2198 emc-timings-0 { 2346 emc-timings-1 { 2494 emc-timings-2 { 2644 emc-timings-0 { 2649 nvidia,emc-auto-cal-interval = <0x001fffff>; 2650 nvidia,emc-mode-1 = <0x80100003>; 2651 nvidia,emc-mode-2 = <0x80200008>; 2652 nvidia,emc-mode-reset = <0x80001221>; 2653 nvidia,emc-zcal-cnt-long = <0x00000040>; 2654 nvidia,emc-cfg-periodic-qrst; [all …]
|
D | lpc4350-hitex-eval.dts | 139 emc_pins: emc-pins { 147 function = "emc"; 159 function = "emc"; 168 function = "emc"; 177 function = "emc"; 186 function = "emc"; 195 function = "emc"; 204 function = "emc"; 213 function = "emc"; 222 function = "emc"; [all …]
|
/Linux-v6.1/drivers/clk/tegra/ |
D | clk-tegra20-emc.c | 57 struct tegra_clk_emc *emc = to_tegra_clk_emc(hw); in emc_recalc_rate() local 60 val = readl_relaxed(emc->reg); in emc_recalc_rate() 68 struct tegra_clk_emc *emc = to_tegra_clk_emc(hw); in emc_get_parent() local 70 return readl_relaxed(emc->reg) >> CLK_SOURCE_EMC_2X_CLK_SRC_SHIFT; in emc_get_parent() 75 struct tegra_clk_emc *emc = to_tegra_clk_emc(hw); in emc_set_parent() local 78 val = readl_relaxed(emc->reg); in emc_set_parent() 84 if (index == EMC_SRC_PLL_M && div == 0 && emc->want_low_jitter) in emc_set_parent() 89 if (emc->mc_same_freq) in emc_set_parent() 94 writel_relaxed(val, emc->reg); in emc_set_parent() 96 fence_udelay(1, emc->reg); in emc_set_parent() [all …]
|
D | clk-tegra210-emc.c | 53 struct tegra210_clk_emc *emc = to_tegra210_clk_emc(hw); in tegra210_clk_emc_get_parent() local 57 value = readl_relaxed(emc->regs + CLK_SOURCE_EMC); in tegra210_clk_emc_get_parent() 66 struct tegra210_clk_emc *emc = to_tegra210_clk_emc(hw); in tegra210_clk_emc_recalc_rate() local 81 value = readl_relaxed(emc->regs + CLK_SOURCE_EMC); in tegra210_clk_emc_recalc_rate() 92 struct tegra210_clk_emc *emc = to_tegra210_clk_emc(hw); in tegra210_clk_emc_round_rate() local 93 struct tegra210_clk_emc_provider *provider = emc->provider; in tegra210_clk_emc_round_rate() 107 static struct clk *tegra210_clk_emc_find_parent(struct tegra210_clk_emc *emc, in tegra210_clk_emc_find_parent() argument 110 struct clk_hw *parent = clk_hw_get_parent_by_index(&emc->hw, index); in tegra210_clk_emc_find_parent() 121 struct tegra210_clk_emc *emc = to_tegra210_clk_emc(hw); in tegra210_clk_emc_set_rate() local 122 struct tegra210_clk_emc_provider *provider = emc->provider; in tegra210_clk_emc_set_rate() [all …]
|