/linux/include/linux/ |
H A D | hwspinlock.h | 16 /* hwspinlock mode argument */ 24 struct hwspinlock; 29 * struct hwspinlock_pdata - platform data for hwspinlock drivers 30 * @base_id: base id for this hwspinlock device 32 * hwspinlock devices provide system-wide hardware locks that are used 39 * Usually boards have a single hwspinlock device, which provides several 44 * should be used for each hwspinlock device (they can't all use 0 as 48 * for each device (which is trivially 0 when only a single hwspinlock 61 struct hwspinlock *hwspin_lock_request(void); 62 struct hwspinlock *hwspin_lock_request_specific(unsigned int id); [all …]
|
/linux/Documentation/locking/ |
H A D | hwspinlock.rst | 17 A generic hwspinlock framework allows platform-independent drivers to use 18 the hwspinlock device in order to access data structures that are shared 31 the remote processors, and access to it is synchronized using the hwspinlock 35 A common hwspinlock interface makes it possible to have generic, platform- 43 struct hwspinlock *hwspin_lock_request(void); 45 Dynamically assign an hwspinlock and return its address, or NULL 46 in case an unused hwspinlock isn't available. Users of this 54 struct hwspinlock *hwspin_lock_request_specific(unsigned int id); 56 Assign a specific hwspinlock id and return its address, or NULL 57 if that hwspinlock is already in use. Usually board code will [all …]
|
H A D | index.rst | 23 hwspinlock
|
/linux/drivers/hwspinlock/ |
H A D | hwspinlock_core.c | 20 #include <linux/hwspinlock.h> 31 #define HWSPINLOCK_UNUSED (0) /* tags an hwspinlock as unused */ 34 * A radix tree is used to maintain the available hwspinlock instances. 35 * The tree associates hwspinlock pointers with their integer key id, 36 * and provides easy-to-use API which makes the hwspinlock core code simple 42 * used as the ID's of the hwspinlock instances). 45 * framework uses to mark unused hwspinlock instances (see the 47 * tree, looking for an unused hwspinlock instance, is now reduced to a 61 * __hwspin_trylock() - attempt to lock a specific hwspinlock 62 * @hwlock: an hwspinlock which we want to trylock [all …]
|
H A D | hwspinlock_internal.h | 19 * struct hwspinlock_ops - platform-specific hwspinlock handlers 24 * @bust: optional, platform-specific bust handler, called by hwspinlock 26 * @relax: optional, platform-specific relax handler, called by hwspinlock 31 int (*trylock)(struct hwspinlock *lock); 32 void (*unlock)(struct hwspinlock *lock); 33 int (*bust)(struct hwspinlock *lock, unsigned int id); 34 void (*relax)(struct hwspinlock *lock); 38 * struct hwspinlock - this struct represents a single hwspinlock instance 40 * @lock: initialized and used by hwspinlock core 41 * @priv: private data, owned by the underlying platform-specific hwspinlock drv [all …]
|
H A D | sprd_hwspinlock.c | 10 #include <linux/hwspinlock.h> 20 /* hwspinlock registers definition */ 30 /* hwspinlock number */ 40 static int sprd_hwspinlock_trylock(struct hwspinlock *lock) in sprd_hwspinlock_trylock() 54 "hwspinlock [%d] lock failed and master/user id = %d!\n", in sprd_hwspinlock_trylock() 60 static void sprd_hwspinlock_unlock(struct hwspinlock *lock) in sprd_hwspinlock_unlock() 68 static void sprd_hwspinlock_relax(struct hwspinlock *lock) in sprd_hwspinlock_relax() 89 struct hwspinlock *lock; in sprd_hwspinlock_probe() 107 dev_err(&pdev->dev, "get hwspinlock clock failed!\n"); in sprd_hwspinlock_probe() 119 "Failed to add hwspinlock disable action\n"); in sprd_hwspinlock_probe() [all …]
|
H A D | omap_hwspinlock.c | 22 #include <linux/hwspinlock.h> 38 static int omap_hwspinlock_trylock(struct hwspinlock *lock) in omap_hwspinlock_trylock() 46 static void omap_hwspinlock_unlock(struct hwspinlock *lock) in omap_hwspinlock_unlock() 64 static void omap_hwspinlock_relax(struct hwspinlock *lock) in omap_hwspinlock_relax() 80 /* Only a single hwspinlock block device is supported */ in omap_hwspinlock_probe() 127 { .compatible = "ti,omap4-hwspinlock", }, 128 { .compatible = "ti,am64-hwspinlock", }, 129 { .compatible = "ti,am654-hwspinlock", },
|
H A D | sun6i_hwspinlock.c | 10 #include <linux/hwspinlock.h> 24 #define SPINLOCK_BASE_ID 0 /* there is only one hwspinlock device per SoC */ 63 static int sun6i_hwspinlock_trylock(struct hwspinlock *lock) in sun6i_hwspinlock_trylock() 70 static void sun6i_hwspinlock_unlock(struct hwspinlock *lock) in sun6i_hwspinlock_unlock() 94 struct hwspinlock *hwlock; in sun6i_hwspinlock_probe() 132 * bit 28 and 29 represents the hwspinlock setup in sun6i_hwspinlock_probe() 153 dev_err(&pdev->dev, "unsupported hwspinlock setup (%d)\n", num_banks); in sun6i_hwspinlock_probe() 176 dev_err(&pdev->dev, "failed to add hwspinlock disable action\n"); in sun6i_hwspinlock_probe() 194 { .compatible = "allwinner,sun6i-a31-hwspinlock", },
|
H A D | stm32_hwspinlock.c | 9 #include <linux/hwspinlock.h> 28 static int stm32_hwspinlock_trylock(struct hwspinlock *lock) in stm32_hwspinlock_trylock() 39 static void stm32_hwspinlock_unlock(struct hwspinlock *lock) in stm32_hwspinlock_unlock() 46 static void stm32_hwspinlock_relax(struct hwspinlock *lock) in stm32_hwspinlock_relax() 116 dev_err(dev, "Failed to register hwspinlock\n"); in stm32_hwspinlock_probe() 146 { .compatible = "st,stm32-hwspinlock", },
|
H A D | Kconfig | 3 # Generic HWSPINLOCK framework 6 menuconfig HWSPINLOCK config 9 if HWSPINLOCK 66 endif # HWSPINLOCK
|
H A D | u8500_hsem.c | 21 #include <linux/hwspinlock.h> 50 static int u8500_hsem_trylock(struct hwspinlock *lock) in u8500_hsem_trylock() 63 static void u8500_hsem_unlock(struct hwspinlock *lock) in u8500_hsem_unlock() 74 static void u8500_hsem_relax(struct hwspinlock *lock) in u8500_hsem_relax() 89 struct hwspinlock *hwlock; in u8500_hsem_probe()
|
H A D | qcom_hwspinlock.c | 7 #include <linux/hwspinlock.h> 28 static int qcom_hwspinlock_trylock(struct hwspinlock *lock) in qcom_hwspinlock_trylock() 45 static void qcom_hwspinlock_unlock(struct hwspinlock *lock) in qcom_hwspinlock_unlock() 67 static int qcom_hwspinlock_bust(struct hwspinlock *lock, unsigned int id) in qcom_hwspinlock_bust() 219 array_size = QCOM_MUTEX_NUM_LOCKS * sizeof(struct hwspinlock); in qcom_hwspinlock_probe()
|
/linux/Documentation/devicetree/bindings/hwlock/ |
H A D | ti,omap-hwspinlock.yaml | 4 $id: http://devicetree.org/schemas/hwlock/ti,omap-hwspinlock.yaml# 7 title: TI HwSpinlock for OMAP and K3 based SoCs 15 - ti,omap4-hwspinlock # for OMAP44xx, OMAP54xx, AM33xx, AM43xx, DRA7xx SoCs 16 - ti,am64-hwspinlock # for K3 AM64x SoCs 17 - ti,am654-hwspinlock # for K3 AM65x, J721E and J7200 SoCs 25 The OMAP hwspinlock users will use a 0-indexed relative hwlock number as 26 the argument specifier value for requesting a specific hwspinlock within 27 a hwspinlock bank. 43 compatible = "ti,omap4-hwspinlock";
|
H A D | st,stm32-hwspinlock.yaml | 4 $id: http://devicetree.org/schemas/hwlock/st,stm32-hwspinlock.yaml# 17 const: st,stm32-hwspinlock 41 hwspinlock@4c000000 { 42 compatible = "st,stm32-hwspinlock";
|
H A D | sprd,hwspinlock-r3p0.yaml | 4 $id: http://devicetree.org/schemas/hwlock/sprd,hwspinlock-r3p0.yaml# 16 const: sprd,hwspinlock-r3p0 44 compatible = "sprd,hwspinlock-r3p0";
|
H A D | allwinner,sun6i-a31-hwspinlock.yaml | 4 $id: http://devicetree.org/schemas/hwlock/allwinner,sun6i-a31-hwspinlock.yaml# 18 const: allwinner,sun6i-a31-hwspinlock 47 compatible = "allwinner,sun6i-a31-hwspinlock";
|
H A D | qcom-hwspinlock.yaml | 4 $id: http://devicetree.org/schemas/hwlock/qcom-hwspinlock.yaml#
|
/linux/drivers/irqchip/ |
H A D | irq-stm32mp-exti.c | 9 #include <linux/hwspinlock.h> 74 struct hwspinlock *hwlock; 372 struct hwspinlock *hwlock = chip_data->host_data->hwlock; in stm32mp_exti_set_type() 382 pr_err("%s can't get hwspinlock (%d)\n", __func__, err); in stm32mp_exti_set_type() 638 /* check for optional hwspinlock which may be not available yet */ in stm32mp_exti_probe() 641 /* hwspinlock framework not yet ready */ in stm32mp_exti_probe() 647 dev_err(dev, "Failed to request hwspinlock\n"); in stm32mp_exti_probe() 651 /* note: ENOENT is a valid case (means 'no hwspinlock') */ in stm32mp_exti_probe() 652 dev_err(dev, "Failed to get hwspinlock\n"); in stm32mp_exti_probe()
|
/linux/Documentation/translations/zh_CN/locking/ |
H A D | index.rst | 33 * hwspinlock
|
/linux/drivers/iio/adc/ |
H A D | sc27xx_adc.c | 4 #include <linux/hwspinlock.h> 92 struct hwspinlock *hwlock; 492 dev_err(data->dev, "timeout to get the hwspinlock\n"); in sc27xx_adc_read() 899 dev_err(dev, "failed to get hwspinlock id\n"); in sc27xx_adc_probe() 905 dev_err(dev, "failed to request hwspinlock\n"); in sc27xx_adc_probe()
|
/linux/drivers/pinctrl/stm32/ |
H A D | pinctrl-stm32.c | 11 #include <linux/hwspinlock.h> 116 struct hwspinlock *hwlock; 437 dev_err(pctl->dev, "Can't get hwspinlock\n"); in stm32_gpio_domain_activate() 771 dev_err(pctl->dev, "Can't get hwspinlock\n"); in stm32_pmx_set_mode() 904 dev_err(pctl->dev, "Can't get hwspinlock\n"); in stm32_pconf_set_driving() 955 dev_err(pctl->dev, "Can't get hwspinlock\n"); in stm32_pconf_set_speed() 1006 dev_err(pctl->dev, "Can't get hwspinlock\n"); in stm32_pconf_set_bias() 1549 /* hwspinlock is optional */ in stm32_pctl_probe()
|
/linux/arch/arm64/boot/dts/sprd/ |
H A D | whale2.dtsi | 196 hwlock: hwspinlock@40500000 { 197 compatible = "sprd,hwspinlock-r3p0";
|
/linux/drivers/ |
H A D | Kconfig | 160 source "drivers/hwspinlock/Kconfig"
|
/linux/drivers/soc/qcom/ |
H A D | smem.c | 7 #include <linux/hwspinlock.h> 267 * @hwlock: reference to a hwspinlock 279 struct hwspinlock *hwlock; 362 /* The qcom hwspinlock id is always plus one from the smem host id */ 366 * qcom_smem_bust_hwspin_lock_by_host() - bust the smem hwspinlock for a host
|
/linux/drivers/spi/ |
H A D | spi-sprd-adi.c | 8 #include <linux/hwspinlock.h> 149 struct hwspinlock *hwlock;
|