| /kernel/linux/linux-6.6/drivers/clk/meson/ |
| D | clk-phase.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 7 #include <linux/clk-provider.h> 10 #include "clk-regmap.h" 11 #include "clk-phase.h" 16 meson_clk_phase_data(struct clk_regmap *clk) in meson_clk_phase_data() argument 18 return (struct meson_clk_phase_data *)clk->data; in meson_clk_phase_data() 39 struct clk_regmap *clk = to_clk_regmap(hw); in meson_clk_phase_get_phase() local 40 struct meson_clk_phase_data *phase = meson_clk_phase_data(clk); in meson_clk_phase_get_phase() local 43 val = meson_parm_read(clk->map, &phase->ph); in meson_clk_phase_get_phase() 45 return meson_clk_degrees_from_val(val, phase->ph.width); in meson_clk_phase_get_phase() [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/meson/ |
| D | clk-phase.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 7 #include <linux/clk-provider.h> 10 #include "clk-regmap.h" 11 #include "clk-phase.h" 16 meson_clk_phase_data(struct clk_regmap *clk) in meson_clk_phase_data() argument 18 return (struct meson_clk_phase_data *)clk->data; in meson_clk_phase_data() 39 struct clk_regmap *clk = to_clk_regmap(hw); in meson_clk_phase_get_phase() local 40 struct meson_clk_phase_data *phase = meson_clk_phase_data(clk); in meson_clk_phase_get_phase() local 43 val = meson_parm_read(clk->map, &phase->ph); in meson_clk_phase_get_phase() 45 return meson_clk_degrees_from_val(val, phase->ph.width); in meson_clk_phase_get_phase() [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/sunxi/ |
| D | clk-mod0.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 #include <linux/clk.h> 9 #include <linux/clk-provider.h> 15 #include "clk-factors.h" 18 * sun4i_a10_get_mod0_factors() - calculates m, n factors for MOD0-style clocks 29 if (req->rate > req->parent_rate) in sun4i_a10_get_mod0_factors() 30 req->rate = req->parent_rate; in sun4i_a10_get_mod0_factors() 32 div = DIV_ROUND_UP(req->parent_rate, req->rate); in sun4i_a10_get_mod0_factors() 45 req->rate = (req->parent_rate >> calcp) / calcm; in sun4i_a10_get_mod0_factors() 46 req->m = calcm - 1; in sun4i_a10_get_mod0_factors() [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/sunxi/ |
| D | clk-mod0.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 #include <linux/clk.h> 9 #include <linux/clk-provider.h> 15 #include "clk-factors.h" 18 * sun4i_a10_get_mod0_factors() - calculates m, n factors for MOD0-style clocks 29 if (req->rate > req->parent_rate) in sun4i_a10_get_mod0_factors() 30 req->rate = req->parent_rate; in sun4i_a10_get_mod0_factors() 32 div = DIV_ROUND_UP(req->parent_rate, req->rate); in sun4i_a10_get_mod0_factors() 45 req->rate = (req->parent_rate >> calcp) / calcm; in sun4i_a10_get_mod0_factors() 46 req->m = calcm - 1; in sun4i_a10_get_mod0_factors() [all …]
|
| /kernel/linux/linux-5.10/drivers/mmc/host/ |
| D | sdhci-sirf.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 13 #include <linux/mmc/slot-gpio.h> 14 #include "sdhci-pltfm.h" 29 * 8bit-width enable bit of CSR SD hosts is 3, in sdhci_sirf_set_bus_width() 42 u32 val = readl(host->ioaddr + reg); in sdhci_sirf_readl_le() 45 (host->mmc->caps & MMC_CAP_UHS_SDR50))) { in sdhci_sirf_readl_le() 64 ret = readw(host->ioaddr + reg); in sdhci_sirf_readw_le() 67 ret = readw(host->ioaddr + SDHCI_HOST_VERSION); in sdhci_sirf_readw_le() 77 int phase; in sdhci_sirf_execute_tuning() local 80 int start = -1, end = 0, tuning_value = -1, range = 0; in sdhci_sirf_execute_tuning() [all …]
|
| D | mmci_stm32_sdmmc.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) STMicroelectronics 2018 - All Rights Reserved 8 #include <linux/dma-mapping.h> 64 for_each_sg(data->sg, sg, data->sg_len - 1, i) { in sdmmc_idma_validate_data() 65 if (!IS_ALIGNED(sg->offset, sizeof(u32)) || in sdmmc_idma_validate_data() 66 !IS_ALIGNED(sg->length, SDMMC_IDMA_BURST)) { in sdmmc_idma_validate_data() 67 dev_err(mmc_dev(host->mmc), in sdmmc_idma_validate_data() 69 data->sg->offset, data->sg->length); in sdmmc_idma_validate_data() 70 return -EINVAL; in sdmmc_idma_validate_data() 74 if (!IS_ALIGNED(sg->offset, sizeof(u32))) { in sdmmc_idma_validate_data() [all …]
|
| D | sdhci-of-arasan.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 4 * Copyright (C) 2011 - 2012 Michal Simek <monstr@monstr.eu> 9 * Based on sdhci-of-esdhc.c 18 #include <linux/clk-provider.h> 25 #include <linux/firmware/xlnx-zynqmp.h> 28 #include "sdhci-cqhci.h" 29 #include "sdhci-pltfm.h" 56 * On some SoCs the syscon area has a feature where the upper 16-bits of 57 * each 32-bit register act as a write mask for the lower 16-bits. This allows 65 * struct sdhci_arasan_soc_ctl_field - Field used in sdhci_arasan_soc_ctl_map [all …]
|
| /kernel/linux/linux-5.10/include/trace/events/ |
| D | clk.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. 6 #define TRACE_SYSTEM clk 15 DECLARE_EVENT_CLASS(clk, 22 __string( name, core->name ) 26 __assign_str(name, core->name); 32 DEFINE_EVENT(clk, clk_enable, 39 DEFINE_EVENT(clk, clk_enable_complete, 46 DEFINE_EVENT(clk, clk_disable, 53 DEFINE_EVENT(clk, clk_disable_complete, [all …]
|
| /kernel/linux/linux-6.6/include/trace/events/ |
| D | clk.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. 6 #define TRACE_SYSTEM clk 15 DECLARE_EVENT_CLASS(clk, 22 __string( name, core->name ) 26 __assign_str(name, core->name); 32 DEFINE_EVENT(clk, clk_enable, 39 DEFINE_EVENT(clk, clk_enable_complete, 46 DEFINE_EVENT(clk, clk_disable, 53 DEFINE_EVENT(clk, clk_disable_complete, [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/rockchip/ |
| D | clk-mmc-phase.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 #include <linux/clk.h> 9 #include <linux/clk-provider.h> 12 #include "clk.h" 41 * Each fine delay is between 44ps-77ps. Assume each fine delay is 60ps to 54 /* Constant signal, no measurable phase shift */ in rockchip_mmc_get_phase() 58 raw_value = readl(mmc_clock->reg) >> (mmc_clock->shift); in rockchip_mmc_get_phase() 86 * MMC host to the card, which expects the phase clock inherits in rockchip_mmc_set_phase() 97 pr_err("%s: invalid clk rate\n", __func__); in rockchip_mmc_set_phase() 98 return -EINVAL; in rockchip_mmc_set_phase() [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/rockchip/ |
| D | clk-mmc-phase.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 #include <linux/clk.h> 9 #include <linux/clk-provider.h> 12 #include "clk.h" 41 * Each fine delay is between 44ps-77ps. Assume each fine delay is 60ps to 54 /* Constant signal, no measurable phase shift */ in rockchip_mmc_get_phase() 58 raw_value = readl(mmc_clock->reg) >> (mmc_clock->shift); in rockchip_mmc_get_phase() 86 * MMC host to the card, which expects the phase clock inherits in rockchip_mmc_set_phase() 97 pr_err("%s: invalid clk rate\n", __func__); in rockchip_mmc_set_phase() 98 return -EINVAL; in rockchip_mmc_set_phase() [all …]
|
| /kernel/linux/linux-6.6/drivers/mmc/core/ |
| D | host.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 * Copyright (C) 2007-2008 Pierre Ossman 25 #include <linux/mmc/slot-gpio.h> 30 #include "slot-gpio.h" 47 if (!host->bus_ops) in mmc_host_class_prepare() 51 if (host->bus_ops->pre_suspend) in mmc_host_class_prepare() 52 return host->bus_ops->pre_suspend(host); in mmc_host_class_prepare() 77 wakeup_source_unregister(host->ws); in mmc_host_classdev_release() 78 if (of_alias_get_id(host->parent->of_node, "mmc") < 0) in mmc_host_classdev_release() 79 ida_simple_remove(&mmc_host_ida, host->index); in mmc_host_classdev_release() [all …]
|
| /kernel/linux/linux-6.6/drivers/mmc/host/ |
| D | mmci_stm32_sdmmc.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) STMicroelectronics 2018 - All Rights Reserved 8 #include <linux/dma-mapping.h> 71 int phase, bool sampler __maybe_unused); 84 struct sdmmc_idma *idma = host->dma_priv; in sdmmc_idma_validate_data() 85 struct device *dev = mmc_dev(host->mmc); in sdmmc_idma_validate_data() 93 idma->use_bounce_buffer = false; in sdmmc_idma_validate_data() 94 for_each_sg(data->sg, sg, data->sg_len - 1, i) { in sdmmc_idma_validate_data() 95 if (!IS_ALIGNED(sg->offset, sizeof(u32)) || in sdmmc_idma_validate_data() 96 !IS_ALIGNED(sg->length, in sdmmc_idma_validate_data() [all …]
|
| D | sdhci-of-arasan.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 4 * Copyright (C) 2011 - 2012 Michal Simek <monstr@monstr.eu> 9 * Based on sdhci-of-esdhc.c 18 #include <linux/clk-provider.h> 26 #include <linux/firmware/xlnx-zynqmp.h> 29 #include "sdhci-cqhci.h" 30 #include "sdhci-pltfm.h" 92 * On some SoCs the syscon area has a feature where the upper 16-bits of 93 * each 32-bit register act as a write mask for the lower 16-bits. This allows 101 * struct sdhci_arasan_soc_ctl_field - Field used in sdhci_arasan_soc_ctl_map [all …]
|
| D | sdhci-of-aspeed.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 #include <linux/clk.h> 18 #include "sdhci-pltfm.h" 40 struct clk *clk; member 85 * -----|-------------|----------|------------ 108 writel(cap_val, sdc->regs + mirror_reg_offset); in aspeed_sdc_set_slot_capability() 118 spin_lock(&sdc->lock); in aspeed_sdc_configure_8bit_mode() 119 info = readl(sdc->regs + ASPEED_SDC_INFO); in aspeed_sdc_configure_8bit_mode() 121 info |= sdhci->width_mask; in aspeed_sdc_configure_8bit_mode() 123 info &= ~sdhci->width_mask; in aspeed_sdc_configure_8bit_mode() [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/hisilicon/ |
| D | clk-hisi-phase.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Simple HiSilicon phase clock implementation. 14 #include "clk.h" 30 static int hisi_phase_regval_to_degrees(struct clk_hisi_phase *phase, in hisi_phase_regval_to_degrees() argument 35 for (i = 0; i < phase->phase_num; i++) in hisi_phase_regval_to_degrees() 36 if (phase->phase_regvals[i] == regval) in hisi_phase_regval_to_degrees() 37 return phase->phase_degrees[i]; in hisi_phase_regval_to_degrees() 39 return -EINVAL; in hisi_phase_regval_to_degrees() 44 struct clk_hisi_phase *phase = to_clk_hisi_phase(hw); in hisi_clk_get_phase() local 47 regval = readl(phase->reg); in hisi_clk_get_phase() [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/hisilicon/ |
| D | clk-hisi-phase.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Simple HiSilicon phase clock implementation. 14 #include "clk.h" 30 static int hisi_phase_regval_to_degrees(struct clk_hisi_phase *phase, in hisi_phase_regval_to_degrees() argument 35 for (i = 0; i < phase->phase_num; i++) in hisi_phase_regval_to_degrees() 36 if (phase->phase_regvals[i] == regval) in hisi_phase_regval_to_degrees() 37 return phase->phase_degrees[i]; in hisi_phase_regval_to_degrees() 39 return -EINVAL; in hisi_phase_regval_to_degrees() 44 struct clk_hisi_phase *phase = to_clk_hisi_phase(hw); in hisi_clk_get_phase() local 47 regval = readl(phase->reg); in hisi_clk_get_phase() [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/clock/ |
| D | altr_socfpga.txt | 5 [1] Documentation/devicetree/bindings/clock/clock-bindings.txt 8 - compatible : shall be one of the following: 9 "altr,socfpga-pll-clock" - for a PLL clock 10 "altr,socfpga-perip-clock" - The peripheral clock divided from the 12 "altr,socfpga-gate-clk" - Clocks that directly feed peripherals and 15 - reg : shall be the control register offset from CLOCK_MANAGER's base for the clock. 16 - clocks : shall be the input parent clock phandle for the clock. This is 18 - #clock-cells : from common clock binding, shall be set to 0. 21 - fixed-divider : If clocks have a fixed divider value, use this property. 22 - clk-gate : For "socfpga-gate-clk", clk-gate contains the gating register [all …]
|
| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/clock/ |
| D | altr_socfpga.txt | 5 [1] Documentation/devicetree/bindings/clock/clock-bindings.txt 8 - compatible : shall be one of the following: 9 "altr,socfpga-pll-clock" - for a PLL clock 10 "altr,socfpga-perip-clock" - The peripheral clock divided from the 12 "altr,socfpga-gate-clk" - Clocks that directly feed peripherals and 15 - reg : shall be the control register offset from CLOCK_MANAGER's base for the clock. 16 - clocks : shall be the input parent clock phandle for the clock. This is 18 - #clock-cells : from common clock binding, shall be set to 0. 21 - fixed-divider : If clocks have a fixed divider value, use this property. 22 - clk-gate : For "socfpga-gate-clk", clk-gate contains the gating register [all …]
|
| /kernel/linux/linux-6.6/drivers/watchdog/ |
| D | realtek_otto_wdt.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 * - Base prescale of (2 << 25), providing tick duration T_0: 168ms @ 200MHz 11 * - PRESCALE: logarithmic prescaler adding a factor of {1, 2, 4, 8} 12 * - Phase 1: Times out after (PHASE1 + 1) × PRESCALE × T_0 13 * Generates an interrupt, WDT cannot be stopped after phase 1 14 * - Phase 2: starts after phase 1, times out after (PHASE2 + 1) × PRESCALE × T_0 20 #include <linux/clk.h> 54 * One higher than the max values contained in PHASE{1,2}, since a value of 0 79 v = ioread32(ctrl->base + OTTO_WDT_REG_CTRL); in otto_wdt_start() 81 iowrite32(v, ctrl->base + OTTO_WDT_REG_CTRL); in otto_wdt_start() [all …]
|
| /kernel/linux/linux-5.10/drivers/clk/ |
| D | clk.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2010-2011 Canonical Ltd <jeremy.kerr@canonical.com> 4 * Copyright (C) 2011-2012 Linaro Ltd <mturquette@linaro.org> 6 * Standard functionality for the common clock API. See Documentation/driver-api/clk.rst 9 #include <linux/clk.h> 10 #include <linux/clk-provider.h> 11 #include <linux/clk/clk-conf.h> 25 #include "clk.h" 86 int phase; member 100 #include <trace/events/clk.h> [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/amd/display/dc/dcn20/ |
| D | dcn20_dccg.c | 36 (dccg_dcn->regs->reg) 40 dccg_dcn->dccg_shift->field_name, dccg_dcn->dccg_mask->field_name 43 dccg_dcn->base.ctx 45 dccg->ctx->logger 51 if (dccg->ref_dppclk && req_dppclk) { in dccg2_update_dpp_dto() 52 int ref_dppclk = dccg->ref_dppclk; in dccg2_update_dpp_dto() 53 int modulo, phase; in dccg2_update_dpp_dto() local 55 // phase / modulo = dpp pipe clk / dpp global clk in dccg2_update_dpp_dto() 57 phase = ((modulo * req_dppclk) + ref_dppclk - 1) / ref_dppclk; in dccg2_update_dpp_dto() 59 if (phase > 0xff) { in dccg2_update_dpp_dto() [all …]
|
| /kernel/linux/linux-6.6/drivers/clk/ |
| D | clk.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2010-2011 Canonical Ltd <jeremy.kerr@canonical.com> 4 * Copyright (C) 2011-2012 Linaro Ltd <mturquette@linaro.org> 6 * Standard functionality for the common clock API. See Documentation/driver-api/clk.rst 9 #include <linux/clk.h> 10 #include <linux/clk-provider.h> 11 #include <linux/clk/clk-conf.h> 25 #include "clk.h" 86 int phase; member 100 #include <trace/events/clk.h> [all …]
|
| /kernel/linux/linux-6.6/drivers/counter/ |
| D | rz-mtu3-cnt.c | 1 // SPDX-License-Identifier: GPL-2.0 8 #include <linux/clk.h> 10 #include <linux/mfd/rz-mtu3.h> 31 #define RZ_MTU3_TMDR1_PH_CNT_MODE_1 (4) /* Phase counting mode 1 */ 32 #define RZ_MTU3_TMDR1_PH_CNT_MODE_2 (5) /* Phase counting mode 2 */ 33 #define RZ_MTU3_TMDR1_PH_CNT_MODE_3 (6) /* Phase counting mode 3 */ 34 #define RZ_MTU3_TMDR1_PH_CNT_MODE_4 (7) /* Phase counting mode 4 */ 35 #define RZ_MTU3_TMDR1_PH_CNT_MODE_5 (9) /* Phase counting mode 5 */ 40 * 0: 16-bit, 1: 32-bit 45 * PHCKSEL: External Input Phase Clock Select [all …]
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/amd/display/dc/dcn20/ |
| D | dcn20_dccg.c | 36 (dccg_dcn->regs->reg) 40 dccg_dcn->dccg_shift->field_name, dccg_dcn->dccg_mask->field_name 43 dccg_dcn->base.ctx 45 dccg->ctx->logger 51 if (dccg->ref_dppclk && req_dppclk) { in dccg2_update_dpp_dto() 52 int ref_dppclk = dccg->ref_dppclk; in dccg2_update_dpp_dto() 53 int modulo, phase; in dccg2_update_dpp_dto() local 55 // phase / modulo = dpp pipe clk / dpp global clk in dccg2_update_dpp_dto() 57 phase = ((modulo * req_dppclk) + ref_dppclk - 1) / ref_dppclk; in dccg2_update_dpp_dto() 59 if (phase > 0xff) { in dccg2_update_dpp_dto() [all …]
|