| /kernel/linux/linux-6.6/drivers/gpu/drm/msm/dsi/phy/ |
| D | dsi_phy.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 #include <linux/clk-provider.h> 8 #include <dt-bindings/phy/phy.h> 12 #define S_DIV_ROUND_UP(n, d) \ argument 13 (((n) >= 0) ? (((n) + (d) - 1) / (d)) : (((n) - (d) + 1) / (d))) 20 v = (tmax - tmin) * percent; in linear_inter() 23 return max_t(s32, min_result, v - 1); in linear_inter() 35 temp = 300 * coeff - ((timing->clk_prepare >> 1) + 1) * 2 * ui; in dsi_dphy_timing_calc_clk_zero() 36 tmin = S_DIV_ROUND_UP(temp, ui) - 2; in dsi_dphy_timing_calc_clk_zero() 46 temp = (timing->hs_rqst + timing->clk_prepare + clk_z) & 0x7; in dsi_dphy_timing_calc_clk_zero() [all …]
|
| D | dsi_phy_10nm.c | 2 * SPDX-License-Identifier: GPL-2.0 7 #include <linux/clk-provider.h> 15 * DSI PLL 10nm - clock diagram (eg: DSI0): 20 * +---------+ | +----------+ | +----+ 21 * dsi0vco_clk ---| out_div |--o--| divl_3_0 |--o--| /8 |-- dsi0_phy_pll_out_byteclk 22 * +---------+ | +----------+ | +----+ 26 * | | +----+ | |\ dsi0_pclk_mux 27 * | |--| /2 |--o--| \ | 28 * | | +----+ | \ | +---------+ 29 …* | --------------| |--o--| div_7_4 |-- dsi0_phy_pll_… [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/msm/dsi/phy/ |
| D | dsi_phy.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 #define S_DIV_ROUND_UP(n, d) \ argument 11 (((n) >= 0) ? (((n) + (d) - 1) / (d)) : (((n) - (d) + 1) / (d))) 18 v = (tmax - tmin) * percent; in linear_inter() 21 return max_t(s32, min_result, v - 1); in linear_inter() 33 temp = 300 * coeff - ((timing->clk_prepare >> 1) + 1) * 2 * ui; in dsi_dphy_timing_calc_clk_zero() 34 tmin = S_DIV_ROUND_UP(temp, ui) - 2; in dsi_dphy_timing_calc_clk_zero() 44 temp = (timing->hs_rqst + timing->clk_prepare + clk_z) & 0x7; in dsi_dphy_timing_calc_clk_zero() 45 timing->clk_zero = clk_z + 8 - temp; in dsi_dphy_timing_calc_clk_zero() 51 const unsigned long bit_rate = clk_req->bitclk_rate; in msm_dsi_dphy_timing_calc() [all …]
|
| /kernel/linux/linux-5.10/drivers/scsi/libsas/ |
| D | sas_init.c | 1 // SPDX-License-Identifier: GPL-2.0-only 32 spin_lock_init(&task->task_state_lock); in sas_alloc_task() 33 task->task_state_flags = SAS_TASK_STATE_PENDING; in sas_alloc_task() 52 task->slow_task = slow; in sas_alloc_slow_task() 53 slow->task = task; in sas_alloc_slow_task() 54 timer_setup(&slow->timer, NULL, 0); in sas_alloc_slow_task() 55 init_completion(&slow->completion); in sas_alloc_slow_task() 64 kfree(task->slow_task); in sas_free_task() 70 /*------------ SAS addr hash -----------*/ 80 for (b = (SAS_ADDR_SIZE - 1); b >= 0; b--) { in sas_hash_addr() [all …]
|
| /kernel/linux/linux-6.6/drivers/scsi/libsas/ |
| D | sas_init.c | 1 // SPDX-License-Identifier: GPL-2.0-only 32 spin_lock_init(&task->task_state_lock); in sas_alloc_task() 33 task->task_state_flags = SAS_TASK_STATE_PENDING; in sas_alloc_task() 51 task->slow_task = slow; in sas_alloc_slow_task() 52 slow->task = task; in sas_alloc_slow_task() 53 timer_setup(&slow->timer, NULL, 0); in sas_alloc_slow_task() 54 init_completion(&slow->completion); in sas_alloc_slow_task() 62 kfree(task->slow_task); in sas_free_task() 67 /*------------ SAS addr hash -----------*/ 77 for (b = (SAS_ADDR_SIZE - 1); b >= 0; b--) { in sas_hash_addr() [all …]
|
| /kernel/linux/linux-6.6/drivers/scsi/aic94xx/ |
| D | aic94xx_scb.c | 1 // SPDX-License-Identifier: GPL-2.0-only 19 /* ---------- EMPTY SCB ---------- */ 36 static void get_lrate_mode(struct asd_phy *phy, u8 oob_mode) in get_lrate_mode() argument 38 struct sas_phy *sas_phy = phy->sas_phy.phy; in get_lrate_mode() 43 phy->sas_phy.linkrate = SAS_LINK_RATE_6_0_GBPS; in get_lrate_mode() 44 phy->sas_phy.phy->negotiated_linkrate = SAS_LINK_RATE_6_0_GBPS; in get_lrate_mode() 47 phy->sas_phy.linkrate = SAS_LINK_RATE_3_0_GBPS; in get_lrate_mode() 48 phy->sas_phy.phy->negotiated_linkrate = SAS_LINK_RATE_3_0_GBPS; in get_lrate_mode() 51 phy->sas_phy.linkrate = SAS_LINK_RATE_1_5_GBPS; in get_lrate_mode() 52 phy->sas_phy.phy->negotiated_linkrate = SAS_LINK_RATE_1_5_GBPS; in get_lrate_mode() [all …]
|
| /kernel/linux/linux-5.10/drivers/scsi/aic94xx/ |
| D | aic94xx_scb.c | 1 // SPDX-License-Identifier: GPL-2.0-only 19 /* ---------- EMPTY SCB ---------- */ 36 static void get_lrate_mode(struct asd_phy *phy, u8 oob_mode) in get_lrate_mode() argument 38 struct sas_phy *sas_phy = phy->sas_phy.phy; in get_lrate_mode() 43 phy->sas_phy.linkrate = SAS_LINK_RATE_6_0_GBPS; in get_lrate_mode() 44 phy->sas_phy.phy->negotiated_linkrate = SAS_LINK_RATE_6_0_GBPS; in get_lrate_mode() 47 phy->sas_phy.linkrate = SAS_LINK_RATE_3_0_GBPS; in get_lrate_mode() 48 phy->sas_phy.phy->negotiated_linkrate = SAS_LINK_RATE_3_0_GBPS; in get_lrate_mode() 51 phy->sas_phy.linkrate = SAS_LINK_RATE_1_5_GBPS; in get_lrate_mode() 52 phy->sas_phy.phy->negotiated_linkrate = SAS_LINK_RATE_1_5_GBPS; in get_lrate_mode() [all …]
|
| /kernel/linux/linux-5.10/drivers/nfc/ |
| D | mei_phy.c | 1 // SPDX-License-Identifier: GPL-2.0 74 16, 1, (skb)->data, (skb)->len, false); \ 81 16, 1, (skb)->data, (skb)->len, false); \ 87 pr_debug("cmd=%02d status=%d req_id=%d rsvd=%d size=%d\n", \ 88 (_hdr)->cmd, (_hdr)->status, (_hdr)->req_id, \ 89 (_hdr)->reserved, (_hdr)->data_size); \ 92 static int mei_nfc_if_version(struct nfc_mei_phy *phy) in mei_nfc_if_version() argument 109 r = mei_cldev_send(phy->cldev, (u8 *)&cmd, sizeof(struct mei_nfc_cmd)); in mei_nfc_if_version() 121 return -ENOMEM; in mei_nfc_if_version() 123 bytes_recv = mei_cldev_recv(phy->cldev, (u8 *)reply, if_version_length); in mei_nfc_if_version() [all …]
|
| /kernel/linux/linux-6.6/drivers/nfc/ |
| D | mei_phy.c | 1 // SPDX-License-Identifier: GPL-2.0 74 16, 1, (skb)->data, (skb)->len, false); \ 81 16, 1, (skb)->data, (skb)->len, false); \ 87 pr_debug("cmd=%02d status=%d req_id=%d rsvd=%d size=%d\n", \ 88 (_hdr)->cmd, (_hdr)->status, (_hdr)->req_id, \ 89 (_hdr)->reserved, (_hdr)->data_size); \ 92 static int mei_nfc_if_version(struct nfc_mei_phy *phy) in mei_nfc_if_version() argument 107 r = mei_cldev_send(phy->cldev, (u8 *)&cmd, sizeof(struct mei_nfc_cmd)); in mei_nfc_if_version() 119 return -ENOMEM; in mei_nfc_if_version() 121 bytes_recv = mei_cldev_recv(phy->cldev, (u8 *)reply, if_version_length); in mei_nfc_if_version() [all …]
|
| /kernel/linux/linux-6.6/drivers/phy/freescale/ |
| D | phy-fsl-imx8-mipi-dphy.c | 1 // SPDX-License-Identifier: GPL-2.0+ 9 #include <linux/clk-provider.h> 19 #include <linux/phy/phy.h> 22 #include <dt-bindings/firmware/imx/rsrc.h> 63 ((x) < 32) ? 0xe0 | ((x) - 16) : \ 64 ((x) < 64) ? 0xc0 | ((x) - 32) : \ 65 ((x) < 128) ? 0x80 | ((x) - 64) : \ 66 ((x) - 128)) 67 #define CN(x) (((x) == 1) ? 0x1f : (((CN_BUF) >> ((x) - 1)) & 0x1f)) 68 #define CO(x) ((CO_BUF) >> (8 - (x)) & 0x03) [all …]
|
| D | phy-fsl-imx8qm-lvds-phy.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Copyright 2017-2020,2022 NXP 12 #include <linux/phy/phy.h> 38 /* PHY initialization value and mask */ 54 struct phy *phy; member 66 static int mixel_lvds_phy_init(struct phy *phy) in mixel_lvds_phy_init() argument 68 struct mixel_lvds_phy_priv *priv = dev_get_drvdata(phy->dev.parent); in mixel_lvds_phy_init() 70 mutex_lock(&priv->lock); in mixel_lvds_phy_init() 71 regmap_update_bits(priv->regmap, in mixel_lvds_phy_init() 73 mutex_unlock(&priv->lock); in mixel_lvds_phy_init() [all …]
|
| /kernel/linux/linux-6.6/drivers/net/wireless/broadcom/b43/ |
| D | lo.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 G PHY LO (LocalOscillator) Measuring and Control routines 8 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>, 10 Copyright (c) 2005-2007 Michael Buesch <m@bues.ch> 33 list_for_each_entry(c, &lo->calib_list, list) { in b43_find_lo_calib() 34 if (!b43_compare_bbatt(&c->bbatt, bbatt)) in b43_find_lo_calib() 36 if (!b43_compare_rfatt(&c->rfatt, rfatt)) in b43_find_lo_calib() 44 /* Write the LocalOscillator Control (adjust) value-pair. */ 47 struct b43_phy *phy = &dev->phy; in b43_lo_write() local 51 if (unlikely(abs(control->i) > 16 || abs(control->q) > 16)) { in b43_lo_write() [all …]
|
| /kernel/linux/linux-5.10/drivers/net/wireless/broadcom/b43/ |
| D | lo.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 G PHY LO (LocalOscillator) Measuring and Control routines 8 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>, 10 Copyright (c) 2005-2007 Michael Buesch <m@bues.ch> 33 list_for_each_entry(c, &lo->calib_list, list) { in b43_find_lo_calib() 34 if (!b43_compare_bbatt(&c->bbatt, bbatt)) in b43_find_lo_calib() 36 if (!b43_compare_rfatt(&c->rfatt, rfatt)) in b43_find_lo_calib() 44 /* Write the LocalOscillator Control (adjust) value-pair. */ 47 struct b43_phy *phy = &dev->phy; in b43_lo_write() local 51 if (unlikely(abs(control->i) > 16 || abs(control->q) > 16)) { in b43_lo_write() [all …]
|
| /kernel/linux/linux-5.10/drivers/dma/ |
| D | zx_dma.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8 #include <linux/dma-mapping.h> 22 #include "virt-dma.h" 24 #define DRIVER_NAME "zx-dma" 26 #define DMA_MAX_SIZE (0x10000 - 512) 99 int id; /* Request phy chan id */ 103 struct zx_dma_phy *phy; member 120 spinlock_t lock; /* lock for ch and phy */ 122 struct zx_dma_phy *phy; member 138 static void zx_dma_terminate_chan(struct zx_dma_phy *phy, struct zx_dma_dev *d) in zx_dma_terminate_chan() argument [all …]
|
| D | k3dma.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2013 - 2015 Linaro Ltd. 8 #include <linux/dma-mapping.h> 23 #include "virt-dma.h" 25 #define DRIVER_NAME "k3-dma" 83 struct k3_dma_phy *phy; member 105 struct k3_dma_phy *phy; member 134 static void k3_dma_pause_dma(struct k3_dma_phy *phy, bool on) in k3_dma_pause_dma() argument 139 val = readl_relaxed(phy->base + CX_CFG); in k3_dma_pause_dma() 141 writel_relaxed(val, phy->base + CX_CFG); in k3_dma_pause_dma() [all …]
|
| /kernel/linux/linux-5.10/drivers/phy/freescale/ |
| D | phy-fsl-imx8-mipi-dphy.c | 1 // SPDX-License-Identifier: GPL-2.0+ 8 #include <linux/clk-provider.h> 15 #include <linux/phy/phy.h> 47 ((x) < 32) ? 0xe0 | ((x) - 16) : \ 48 ((x) < 64) ? 0xc0 | ((x) - 32) : \ 49 ((x) < 128) ? 0x80 | ((x) - 64) : \ 50 ((x) - 128)) 51 #define CN(x) (((x) == 1) ? 0x1f : (((CN_BUF) >> ((x) - 1)) & 0x1f)) 52 #define CO(x) ((CO_BUF) >> (8 - (x)) & 0x03) 54 /* PHY power on is active low */ [all …]
|
| /kernel/linux/linux-6.6/drivers/net/wireless/mediatek/mt76/mt7915/ |
| D | debugfs.c | 1 // SPDX-License-Identifier: ISC 29 dev->ibf = !!val; in mt7915_implicit_txbf_set() 39 *val = dev->ibf; in mt7915_implicit_txbf_get() 52 struct mt7915_phy *phy = file->private_data; in mt7915_sys_recovery_set() local 53 struct mt7915_dev *dev = phy->dev; in mt7915_sys_recovery_set() 54 bool band = phy->mt76->band_idx; in mt7915_sys_recovery_set() 60 return -EINVAL; in mt7915_sys_recovery_set() 63 return -EFAULT; in mt7915_sys_recovery_set() 65 if (count && buf[count - 1] == '\n') in mt7915_sys_recovery_set() 66 buf[count - 1] = '\0'; in mt7915_sys_recovery_set() [all …]
|
| /kernel/linux/linux-6.6/drivers/phy/mediatek/ |
| D | phy-mtk-xsphy.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #include <dt-bindings/phy/phy.h> 16 #include <linux/phy/phy.h> 19 #include "phy-mtk-io.h" 21 /* u2 phy banks */ 26 /* u3 phy shared banks */ 30 /* u3 phy banks */ 85 struct phy *phy; member 87 struct clk *ref_clk; /* reference clock of anolog phy */ 112 void __iomem *pbase = inst->port_base; in u2_phy_slew_rate_calibrate() [all …]
|
| /kernel/linux/linux-6.6/drivers/phy/intel/ |
| D | phy-intel-keembay-emmc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Intel Keem Bay eMMC PHY driver 14 #include <linux/phy/phy.h> 18 /* eMMC/SD/SDIO core/phy configuration registers */ 53 static int keembay_emmc_phy_power(struct phy *phy, bool on_off) in keembay_emmc_phy_power() argument 55 struct keembay_emmc_phy *priv = phy_get_drvdata(phy); in keembay_emmc_phy_power() 66 ret = regmap_update_bits(priv->syscfg, PHY_CFG_0, PWR_DOWN_MASK, in keembay_emmc_phy_power() 69 dev_err(&phy->dev, "CALIO power down bar failed: %d\n", ret); in keembay_emmc_phy_power() 73 ret = regmap_update_bits(priv->syscfg, PHY_CFG_0, DLL_EN_MASK, in keembay_emmc_phy_power() 76 dev_err(&phy->dev, "turn off the dll failed: %d\n", ret); in keembay_emmc_phy_power() [all …]
|
| /kernel/linux/linux-5.10/drivers/phy/intel/ |
| D | phy-intel-keembay-emmc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Intel Keem Bay eMMC PHY driver 14 #include <linux/phy/phy.h> 18 /* eMMC/SD/SDIO core/phy configuration registers */ 53 static int keembay_emmc_phy_power(struct phy *phy, bool on_off) in keembay_emmc_phy_power() argument 55 struct keembay_emmc_phy *priv = phy_get_drvdata(phy); in keembay_emmc_phy_power() 66 ret = regmap_update_bits(priv->syscfg, PHY_CFG_0, PWR_DOWN_MASK, in keembay_emmc_phy_power() 69 dev_err(&phy->dev, "CALIO power down bar failed: %d\n", ret); in keembay_emmc_phy_power() 73 ret = regmap_update_bits(priv->syscfg, PHY_CFG_0, DLL_EN_MASK, in keembay_emmc_phy_power() 76 dev_err(&phy->dev, "turn off the dll failed: %d\n", ret); in keembay_emmc_phy_power() [all …]
|
| D | phy-intel-lgm-emmc.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Intel eMMC PHY driver 14 #include <linux/phy/phy.h> 18 /* eMMC phy register definitions */ 51 static int intel_emmc_phy_power(struct phy *phy, bool on_off) in intel_emmc_phy_power() argument 53 struct intel_emmc_phy *priv = phy_get_drvdata(phy); in intel_emmc_phy_power() 64 ret = regmap_update_bits(priv->syscfg, EMMC_PHYCTRL1_REG, PDB_MASK, in intel_emmc_phy_power() 67 dev_err(&phy->dev, "CALIO power down bar failed: %d\n", ret); in intel_emmc_phy_power() 75 rate = clk_get_rate(priv->emmcclk); in intel_emmc_phy_power() 78 dev_warn(&phy->dev, "Unsupported rate: %lu\n", rate); in intel_emmc_phy_power() [all …]
|
| /kernel/linux/linux-5.10/drivers/scsi/mpt3sas/ |
| D | mpt3sas_transport.c | 5 * Copyright (C) 2012-2014 LSI Corporation 6 * Copyright (C) 2013-2014 Avago Technologies 7 * (mailto: MPT-FusionLinux.pdl@avagotech.com) 22 * LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, 41 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 64 * _transport_sas_node_find_by_sas_address - sas node search 67 * Context: Calling function should acquire ioc->sas_node_lock. 76 if (ioc->sas_hba.sas_address == sas_address) in _transport_sas_node_find_by_sas_address() 77 return &ioc->sas_hba; in _transport_sas_node_find_by_sas_address() 84 * _transport_convert_phy_link_rate - [all …]
|
| /kernel/linux/linux-6.6/drivers/dma/ |
| D | k3dma.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2013 - 2015 Linaro Ltd. 8 #include <linux/dma-mapping.h> 23 #include "virt-dma.h" 25 #define DRIVER_NAME "k3-dma" 83 struct k3_dma_phy *phy; member 105 struct k3_dma_phy *phy; member 134 static void k3_dma_pause_dma(struct k3_dma_phy *phy, bool on) in k3_dma_pause_dma() argument 139 val = readl_relaxed(phy->base + CX_CFG); in k3_dma_pause_dma() 141 writel_relaxed(val, phy->base + CX_CFG); in k3_dma_pause_dma() [all …]
|
| /kernel/linux/linux-6.6/drivers/scsi/mpi3mr/ |
| D | mpi3mr_transport.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (C) 2017-2023 Broadcom Inc. 6 * (mailto: mpi3mr-linuxdrv.pdl@broadcom.com) 13 * mpi3mr_post_transport_req - Issue transport requests and wait 31 * Return: 0 on success, non-zero on failure. 39 mutex_lock(&mrioc->transport_cmds.mutex); in mpi3mr_post_transport_req() 40 if (mrioc->transport_cmds.state & MPI3MR_CMD_PENDING) { in mpi3mr_post_transport_req() 41 retval = -1; in mpi3mr_post_transport_req() 43 mutex_unlock(&mrioc->transport_cmds.mutex); in mpi3mr_post_transport_req() 46 mrioc->transport_cmds.state = MPI3MR_CMD_PENDING; in mpi3mr_post_transport_req() [all …]
|
| /kernel/linux/linux-6.6/drivers/scsi/mpt3sas/ |
| D | mpt3sas_transport.c | 5 * Copyright (C) 2012-2014 LSI Corporation 6 * Copyright (C) 2013-2014 Avago Technologies 7 * (mailto: MPT-FusionLinux.pdl@avagotech.com) 22 * LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, 41 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 64 * _transport_get_port_id_by_sas_phy - get zone's port id that Phy belong to 65 * @phy: sas_phy object 70 _transport_get_port_id_by_sas_phy(struct sas_phy *phy) in _transport_get_port_id_by_sas_phy() argument 73 struct hba_port *port = phy->hostdata; in _transport_get_port_id_by_sas_phy() 76 port_id = port->port_id; in _transport_get_port_id_by_sas_phy() [all …]
|