/openbmc/linux/drivers/pmdomain/qcom/ |
H A D | cpr.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. 26 #include <linux/nvmem-consumer.h> 28 /* Register Offsets for RB-CPR and Bit Definitions */ 31 #define REG_RBCPR_VERSION 0 32 #define RBCPR_VER_2 0x02 33 #define FLAGS_IGNORE_1ST_IRQ_STATUS BIT(0) 36 #define REG_RBCPR_GCNT_TARGET(n) (0x60 + 4 * (n)) 38 #define RBCPR_GCNT_TARGET_TARGET_SHIFT 0 39 #define RBCPR_GCNT_TARGET_TARGET_MASK GENMASK(11, 0) [all …]
|
/openbmc/linux/drivers/net/ethernet/hisilicon/hns/ |
H A D | hns_dsaf_gmac.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (c) 2014-2015 Hisilicon Limited. 63 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_enable() local 67 dsaf_set_dev_bit(drv, GMAC_PORT_EN_REG, GMAC_PORT_TX_EN_B, 1); in hns_gmac_enable() 71 dsaf_set_dev_bit(drv, GMAC_PCS_RX_EN_REG, 0, 0); in hns_gmac_enable() 72 dsaf_set_dev_bit(drv, GMAC_PORT_EN_REG, GMAC_PORT_RX_EN_B, 1); in hns_gmac_enable() 78 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_disable() local 82 dsaf_set_dev_bit(drv, GMAC_PORT_EN_REG, GMAC_PORT_TX_EN_B, 0); in hns_gmac_disable() 86 dsaf_set_dev_bit(drv, GMAC_PCS_RX_EN_REG, 0, 1); in hns_gmac_disable() 87 dsaf_set_dev_bit(drv, GMAC_PORT_EN_REG, GMAC_PORT_RX_EN_B, 0); in hns_gmac_disable() [all …]
|
H A D | hns_dsaf_xgmac.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (c) 2014-2015 Hisilicon Limited. 6 #include <linux/io-64-nonatomic-hi-lo.h> 87 *hns_xgmac_tx_enable - xgmac port tx enable 88 *@drv: mac driver 91 static void hns_xgmac_tx_enable(struct mac_driver *drv, u32 value) in hns_xgmac_tx_enable() argument 93 dsaf_set_dev_bit(drv, XGMAC_MAC_ENABLE_REG, XGMAC_ENABLE_TX_B, !!value); in hns_xgmac_tx_enable() 97 *hns_xgmac_rx_enable - xgmac port rx enable 98 *@drv: mac driver 101 static void hns_xgmac_rx_enable(struct mac_driver *drv, u32 value) in hns_xgmac_rx_enable() argument [all …]
|
/openbmc/u-boot/drivers/block/ |
H A D | blk_legacy.c | 1 // SPDX-License-Identifier: GPL-2.0+ 12 struct blk_driver *drv = ll_entry_start(struct blk_driver, blk_driver); in blk_driver_lookup_type() local 16 for (entry = drv; entry != drv + n_ents; entry++) { in blk_driver_lookup_type() 17 if (if_type == entry->if_type) in blk_driver_lookup_type() 27 struct blk_driver *drv = ll_entry_start(struct blk_driver, blk_driver); in blk_driver_lookup_typename() local 31 for (entry = drv; entry != drv + n_ents; entry++) { in blk_driver_lookup_typename() 32 if (!strcmp(if_typename, entry->if_typename)) in blk_driver_lookup_typename() 42 struct blk_driver *drv = blk_driver_lookup_type(if_type); in blk_get_if_type_name() local 44 return drv ? drv->if_typename : NULL; in blk_get_if_type_name() 48 * get_desc() - Get the block device descriptor for the given device number [all …]
|
/openbmc/linux/drivers/soc/qcom/ |
H A D | rpmh-rsc.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. 4 * Copyright (c) 2023-2024, Qualcomm Innovation Center, Inc. All rights reserved. 31 #include <soc/qcom/cmd-db.h> 33 #include <dt-bindings/soc/qcom,rpmh-rsc.h> 35 #include "rpmh-internal.h" 38 #include "trace-rpmh.h" 41 #define RSC_DRV_ID 0 43 #define MAJOR_VER_MASK 0xFF 45 #define MINOR_VER_MASK 0xFF [all …]
|
H A D | spm.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. 19 #define SPM_CTL_INDEX 0x7f 21 #define SPM_CTL_EN BIT(0) 40 [SPM_REG_AVS_CTL] = 0x904, 41 [SPM_REG_AVS_LIMIT] = 0x908, 46 .avs_ctl = 0x1010031, 47 .avs_limit = 0x4580458, 52 .avs_ctl = 0x101c031, 53 .avs_limit = 0x4580458, [all …]
|
/openbmc/linux/drivers/devfreq/ |
H A D | mtk-cci-devfreq.c | 1 // SPDX-License-Identifier: GPL-2.0-only 39 static int mtk_ccifreq_set_voltage(struct mtk_ccifreq_drv *drv, int new_voltage) in mtk_ccifreq_set_voltage() argument 41 const struct mtk_ccifreq_platform_data *soc_data = drv->soc_data; in mtk_ccifreq_set_voltage() 42 struct device *dev = drv->dev; in mtk_ccifreq_set_voltage() 44 int retry_max = drv->vtrack_max; in mtk_ccifreq_set_voltage() 46 if (!drv->sram_reg) { in mtk_ccifreq_set_voltage() 47 ret = regulator_set_voltage(drv->proc_reg, new_voltage, in mtk_ccifreq_set_voltage() 48 drv->soc_data->proc_max_volt); in mtk_ccifreq_set_voltage() 52 pre_voltage = regulator_get_voltage(drv->proc_reg); in mtk_ccifreq_set_voltage() 53 if (pre_voltage < 0) { in mtk_ccifreq_set_voltage() [all …]
|
/openbmc/linux/drivers/net/wireless/intel/iwlwifi/ |
H A D | iwl-drv.c | 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 3 * Copyright (C) 2005-2014, 2018-2021 Intel Corporation 4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH 5 * Copyright (C) 2016-2017 Intel Deutschland GmbH 8 #include <linux/dma-mapping.h> 13 #include "iwl-drv.h" 14 #include "iwl-csr.h" 15 #include "iwl-debug.h" 16 #include "iwl-trans.h" 17 #include "iwl-op-mode.h" [all …]
|
/openbmc/linux/drivers/watchdog/ |
H A D | menz69_wdt.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Watchdog driver for the MEN z069 IP-Core 19 #define MEN_Z069_WTR 0x10 21 #define MEN_Z069_WTR_WDET_MASK 0x7fff 22 #define MEN_Z069_WVR 0x14 26 #define MEN_Z069_WDT_COUNTER_MAX 0x7fff 30 module_param(nowayout, bool, 0); 36 struct men_z069_drv *drv = watchdog_get_drvdata(wdt); in men_z069_wdt_start() local 39 val = readw(drv->base + MEN_Z069_WTR); in men_z069_wdt_start() 41 writew(val, drv->base + MEN_Z069_WTR); in men_z069_wdt_start() [all …]
|
H A D | mena21_wdt.c | 1 // SPDX-License-Identifier: GPL-2.0+ 38 module_param(nowayout, bool, 0); 42 static unsigned int a21_wdt_get_bootstatus(struct a21_wdt_drv *drv) in a21_wdt_get_bootstatus() argument 44 int reset = 0; in a21_wdt_get_bootstatus() 46 reset |= gpiod_get_value(drv->gpios[GPIO_WD_RST0]) ? (1 << 0) : 0; in a21_wdt_get_bootstatus() 47 reset |= gpiod_get_value(drv->gpios[GPIO_WD_RST1]) ? (1 << 1) : 0; in a21_wdt_get_bootstatus() 48 reset |= gpiod_get_value(drv->gpios[GPIO_WD_RST2]) ? (1 << 2) : 0; in a21_wdt_get_bootstatus() 55 struct a21_wdt_drv *drv = watchdog_get_drvdata(wdt); in a21_wdt_start() local 57 gpiod_set_value(drv->gpios[GPIO_WD_ENAB], 1); in a21_wdt_start() 59 return 0; in a21_wdt_start() [all …]
|
/openbmc/linux/drivers/phy/samsung/ |
H A D | phy-samsung-usb2.c | 1 // SPDX-License-Identifier: GPL-2.0-only 16 #include "phy-samsung-usb2.h" 21 struct samsung_usb2_phy_driver *drv = inst->drv; in samsung_usb2_phy_power_on() local 24 dev_dbg(drv->dev, "Request to power_on \"%s\" usb phy\n", in samsung_usb2_phy_power_on() 25 inst->cfg->label); in samsung_usb2_phy_power_on() 27 if (drv->vbus) { in samsung_usb2_phy_power_on() 28 ret = regulator_enable(drv->vbus); in samsung_usb2_phy_power_on() 33 ret = clk_prepare_enable(drv->clk); in samsung_usb2_phy_power_on() 36 ret = clk_prepare_enable(drv->ref_clk); in samsung_usb2_phy_power_on() 39 if (inst->cfg->power_on) { in samsung_usb2_phy_power_on() [all …]
|
H A D | phy-exynos4x12-usb2.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Samsung SoC USB 1.1/2.0 PHY driver - Exynos 4x12 support 13 #include "phy-samsung-usb2.h" 18 #define EXYNOS_4x12_UPHYPWR 0x0 20 #define EXYNOS_4x12_UPHYPWR_PHY0_SUSPEND BIT(0) 55 #define EXYNOS_4x12_UPHYCLK 0x4 57 #define EXYNOS_4x12_UPHYCLK_PHYFSEL_MASK (0x7 << 0) 58 #define EXYNOS_4x12_UPHYCLK_PHYFSEL_OFFSET 0 59 #define EXYNOS_4x12_UPHYCLK_PHYFSEL_9MHZ6 (0x0 << 0) 60 #define EXYNOS_4x12_UPHYCLK_PHYFSEL_10MHZ (0x1 << 0) [all …]
|
H A D | phy-exynos5250-usb2.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Samsung SoC USB 1.1/2.0 PHY driver - Exynos 5250 support 13 #include "phy-samsung-usb2.h" 16 #define EXYNOS_5250_REFCLKSEL_CRYSTAL 0x0 17 #define EXYNOS_5250_REFCLKSEL_XO 0x1 18 #define EXYNOS_5250_REFCLKSEL_CLKCORE 0x2 20 #define EXYNOS_5250_FSEL_9MHZ6 0x0 21 #define EXYNOS_5250_FSEL_10MHZ 0x1 22 #define EXYNOS_5250_FSEL_12MHZ 0x2 23 #define EXYNOS_5250_FSEL_19MHZ2 0x3 [all …]
|
/openbmc/linux/drivers/cpuidle/ |
H A D | driver.c | 2 * driver.c - driver support 4 * (C) 2006-2007 Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> 30 * __cpuidle_get_cpu_driver - return the cpuidle driver tied to a CPU. 42 * __cpuidle_unset_driver - unset per CPU driver variables. 43 * @drv: a valid pointer to a struct cpuidle_driver 46 * variable. If @drv is different from the registered driver, the corresponding 49 static inline void __cpuidle_unset_driver(struct cpuidle_driver *drv) in __cpuidle_unset_driver() argument 53 for_each_cpu(cpu, drv->cpumask) { in __cpuidle_unset_driver() 55 if (drv != __cpuidle_get_cpu_driver(cpu)) in __cpuidle_unset_driver() 63 * __cpuidle_set_driver - set per CPU driver variables for the given driver. [all …]
|
H A D | cpuidle.c | 2 * cpuidle.c - core cpuidle infrastructure 4 * (C) 2006-2007 Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> 11 #include "linux/percpu-defs.h" 52 bool cpuidle_not_available(struct cpuidle_driver *drv, in cpuidle_not_available() argument 55 return off || !initialized || !drv || !dev || !dev->enabled; in cpuidle_not_available() 59 * cpuidle_play_dead - cpu off-lining 66 struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev); in cpuidle_play_dead() local 69 if (!drv) in cpuidle_play_dead() 70 return -ENODEV; in cpuidle_play_dead() 72 /* Find lowest-power state that supports long-term idle */ in cpuidle_play_dead() [all …]
|
H A D | cpuidle-psci.c | 1 // SPDX-License-Identifier: GPL-2.0-only 29 #include "cpuidle-psci.h" 52 struct cpuidle_driver *drv, int idx, in __psci_enter_domain_idle_state() argument 56 u32 *states = data->psci_states; in __psci_enter_domain_idle_state() 57 struct device *pd_dev = data->dev; in __psci_enter_domain_idle_state() 63 return -1; in __psci_enter_domain_idle_state() 75 ret = psci_cpu_suspend_enter(state) ? -1 : idx; in __psci_enter_domain_idle_state() 85 psci_set_domain_state(0); in __psci_enter_domain_idle_state() 90 struct cpuidle_driver *drv, int idx) in psci_enter_domain_idle_state() argument 92 return __psci_enter_domain_idle_state(dev, drv, idx, false); in psci_enter_domain_idle_state() [all …]
|
/openbmc/linux/drivers/phy/renesas/ |
H A D | phy-rcar-gen2.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Renesas R-Car Gen2 PHY driver 20 #define USBHS_LPSTS 0x02 21 #define USBHS_UGCTRL 0x80 22 #define USBHS_UGCTRL2 0x84 23 #define USBHS_UGSTS 0x88 /* From technical update */ 26 #define USBHS_LPSTS_SUSPM 0x4000 29 #define USBHS_UGCTRL_CONNECT 0x00000004 30 #define USBHS_UGCTRL_PLLRESET 0x00000001 33 #define USBHS_UGCTRL2_USB2SEL 0x80000000 [all …]
|
/openbmc/linux/drivers/media/radio/ |
H A D | radio-isa.c | 1 // SPDX-License-Identifier: GPL-2.0-only 17 #include <media/v4l2-device.h> 18 #include <media/v4l2-ioctl.h> 19 #include <media/v4l2-fh.h> 20 #include <media/v4l2-ctrls.h> 21 #include <media/v4l2-event.h> 23 #include "radio-isa.h" 37 strscpy(v->driver, isa->drv->driver.driver.name, sizeof(v->driver)); in radio_isa_querycap() 38 strscpy(v->card, isa->drv->card, sizeof(v->card)); in radio_isa_querycap() 39 snprintf(v->bus_info, sizeof(v->bus_info), "ISA:%s", dev_name(isa->v4l2_dev.dev)); in radio_isa_querycap() [all …]
|
/openbmc/linux/drivers/base/ |
H A D | driver.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * driver.c - centralized device driver management 5 * Copyright (c) 2002-3 Patrick Mochel 6 * Copyright (c) 2002-3 Open Source Development Labs 7 * Copyright (c) 2007 Greg Kroah-Hartman <gregkh@suse.de> 28 dev = dev_prv->device; in next_device() 34 * driver_set_override() - Helper to set or clear driver override. 36 * @override: Address of string to change (e.g. &device->driver_override); 38 * @s: NUL-terminated string, new driver name to force a match, pass empty 46 * Returns: 0 on success or a negative error code on failure. [all …]
|
/openbmc/linux/drivers/soundwire/ |
H A D | bus_type.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // Copyright(c) 2015-17 Intel Corporation. 14 * sdw_get_device_id - find the matching SoundWire device id 16 * @drv: SoundWire Slave Driver 22 sdw_get_device_id(struct sdw_slave *slave, struct sdw_driver *drv) in sdw_get_device_id() argument 26 for (id = drv->id_table; id && id->mfg_id; id++) in sdw_get_device_id() 27 if (slave->id.mfg_id == id->mfg_id && in sdw_get_device_id() 28 slave->id.part_id == id->part_id && in sdw_get_device_id() 29 (!id->sdw_version || in sdw_get_device_id() 30 slave->id.sdw_version == id->sdw_version) && in sdw_get_device_id() [all …]
|
/openbmc/u-boot/env/ |
H A D | env.c | 1 // SPDX-License-Identifier: GPL-2.0+ 15 struct env_driver *drv; in env_fix_drivers() local 19 drv = ll_entry_start(struct env_driver, env_driver); in env_fix_drivers() 20 for (entry = drv; entry != drv + n_ents; entry++) { in env_fix_drivers() 21 if (entry->name) in env_fix_drivers() 22 entry->name += gd->reloc_off; in env_fix_drivers() 23 if (entry->load) in env_fix_drivers() 24 entry->load += gd->reloc_off; in env_fix_drivers() 25 if (entry->save) in env_fix_drivers() 26 entry->save += gd->reloc_off; in env_fix_drivers() [all …]
|
/openbmc/linux/arch/arm64/boot/dts/rockchip/ |
H A D | rockchip-pinconf.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 7 /omit-if-no-ref/ 8 pcfg_pull_up: pcfg-pull-up { 9 bias-pull-up; 12 /omit-if-no-ref/ 13 pcfg_pull_down: pcfg-pull-down { 14 bias-pull-down; 17 /omit-if-no-ref/ 18 pcfg_pull_none: pcfg-pull-none { 19 bias-disable; [all …]
|
/openbmc/linux/arch/arm/boot/dts/samsung/ |
H A D | exynos4x12-pinctrl.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 3 * Samsung's Exynos4x12 SoCs pin-mux and pin-config device tree source 8 * Samsung's Exynos4x12 SoCs pin-mux and pin-config options are listed as device 12 #include "exynos-pinctrl.h" 15 pin- ## _pin { \ 17 samsung,pin-con-pdn = <EXYNOS_PIN_PDN_ ##_mode>; \ 18 samsung,pin-pud-pdn = <EXYNOS_PIN_PULL_ ##_pull>; \ 22 gpa0: gpa0-gpio-bank { 23 gpio-controller; 24 #gpio-cells = <2>; [all …]
|
H A D | exynos5250-pinctrl.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 3 * Samsung's Exynos5250 SoC pin-mux and pin-config device tree source 8 * Samsung's Exynos5250 SoC pin-mux and pin-config options are listed as device 12 #include "exynos-pinctrl.h" 15 gpa0: gpa0-gpio-bank { 16 gpio-controller; 17 #gpio-cells = <2>; 19 interrupt-controller; 20 #interrupt-cells = <2>; 23 gpa1: gpa1-gpio-bank { [all …]
|
H A D | s5pv210-pinctrl.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 3 * Samsung's S5PV210 SoC device tree source - pin control-related 6 * Copyright (c) 2013-2014 Samsung Electronics, Co. Ltd. 11 * Samsung's S5PV210 SoC pin banks, pin-mux and pin-config options are 15 #include "s5pv210-pinctrl.h" 18 pin- ## _pin { \ 20 samsung,pin-con-pdn = <S5PV210_PIN_PDN_ ##_mode>; \ 21 samsung,pin-pud-pdn = <S5PV210_PIN_PULL_ ##_pull>; \ 25 gpa0: gpa0-gpio-bank { 26 gpio-controller; [all …]
|