Home
last modified time | relevance | path

Searched full:hwlock (Results 1 – 25 of 106) sorted by relevance

12345

/openbmc/linux/include/linux/
H A Dhwspinlock.h63 int hwspin_lock_free(struct hwspinlock *hwlock);
65 int hwspin_lock_get_id(struct hwspinlock *hwlock);
71 int hwspin_lock_bust(struct hwspinlock *hwlock, unsigned int id);
72 int devm_hwspin_lock_free(struct device *dev, struct hwspinlock *hwlock);
108 static inline int hwspin_lock_free(struct hwspinlock *hwlock) in hwspin_lock_free() argument
114 int __hwspin_lock_timeout(struct hwspinlock *hwlock, unsigned int to, in __hwspin_lock_timeout() argument
121 int __hwspin_trylock(struct hwspinlock *hwlock, int mode, unsigned long *flags) in __hwspin_trylock() argument
127 void __hwspin_unlock(struct hwspinlock *hwlock, int mode, unsigned long *flags) in __hwspin_unlock() argument
131 static inline int hwspin_lock_bust(struct hwspinlock *hwlock, unsigned int id) in hwspin_lock_bust() argument
141 static inline int hwspin_lock_get_id(struct hwspinlock *hwlock) in hwspin_lock_get_id() argument
[all …]
/openbmc/linux/Documentation/devicetree/bindings/hwlock/
H A Dhwlock.txt1 Generic hwlock bindings
4 Generic bindings that are common to all the hwlock platform specific driver
7 Please also look through the individual platform specific hwlock binding
11 hwlock providers:
15 - #hwlock-cells: Specifies the number of cells needed to represent a
18 hwlock users:
21 Consumers that require specific hwlock(s) should specify them using the
22 property "hwlocks", and an optional "hwlock-names" property.
25 - hwlocks: List of phandle to a hwlock provider node and an
26 associated hwlock args specifier as indicated by
[all …]
H A Dsprd-hwspinlock.txt7 - #hwlock-cells : hwlock users only use the hwlock id to represent a specific
8 hwlock, so the number of cells should be <1> here.
13 Please look at the generic hwlock binding for usage information for consumers,
14 "Documentation/devicetree/bindings/hwlock/hwlock.txt"
16 Example of hwlock provider:
20 #hwlock-cells = <1>;
H A Dti,omap-hwspinlock.yaml4 $id: http://devicetree.org/schemas/hwlock/ti,omap-hwspinlock.yaml#
22 "#hwlock-cells":
25 The OMAP hwspinlock users will use a 0-indexed relative hwlock number as
29 Please look at the generic hwlock binding for usage information for
30 consumers, "Documentation/devicetree/bindings/hwlock/hwlock.txt"
35 - "#hwlock-cells"
45 #hwlock-cells = <1>;
H A Dqcom-hwspinlock.yaml4 $id: http://devicetree.org/schemas/hwlock/qcom-hwspinlock.yaml#
38 '#hwlock-cells':
44 - '#hwlock-cells'
50 hwlock@1f40000 {
53 #hwlock-cells = <1>;
H A Dallwinner,sun6i-a31-hwspinlock.yaml4 $id: http://devicetree.org/schemas/hwlock/allwinner,sun6i-a31-hwspinlock.yaml#
29 '#hwlock-cells':
37 - "#hwlock-cells"
46 hwlock@1c18000 {
51 #hwlock-cells = <1>;
H A Dst,stm32-hwspinlock.yaml4 $id: http://devicetree.org/schemas/hwlock/st,stm32-hwspinlock.yaml#
13 "#hwlock-cells":
30 - "#hwlock-cells"
43 #hwlock-cells = <1>;
/openbmc/linux/drivers/hwspinlock/
H A Dhwspinlock_core.c62 * @hwlock: an hwspinlock which we want to trylock
91 int __hwspin_trylock(struct hwspinlock *hwlock, int mode, unsigned long *flags) in __hwspin_trylock() argument
95 if (WARN_ON(!hwlock || (!flags && mode == HWLOCK_IRQSTATE))) in __hwspin_trylock()
113 ret = spin_trylock_irqsave(&hwlock->lock, *flags); in __hwspin_trylock()
116 ret = spin_trylock_irq(&hwlock->lock); in __hwspin_trylock()
123 ret = spin_trylock(&hwlock->lock); in __hwspin_trylock()
132 ret = hwlock->bank->ops->trylock(hwlock); in __hwspin_trylock()
134 /* if hwlock is already taken, undo spin_trylock_* and exit */ in __hwspin_trylock()
138 spin_unlock_irqrestore(&hwlock->lock, *flags); in __hwspin_trylock()
141 spin_unlock_irq(&hwlock->lock); in __hwspin_trylock()
[all …]
H A Dhwspinlock_internal.h65 static inline int hwlock_to_id(struct hwspinlock *hwlock) in hwlock_to_id() argument
67 int local_id = hwlock - &hwlock->bank->lock[0]; in hwlock_to_id()
69 return hwlock->bank->base_id + local_id; in hwlock_to_id()
H A Du8500_hsem.c89 struct hwspinlock *hwlock; in u8500_hsem_probe() local
115 for (i = 0, hwlock = &bank->lock[0]; i < num_locks; i++, hwlock++) in u8500_hsem_probe()
116 hwlock->priv = io_base + HSEM_REGISTER_OFFSET + sizeof(u32) * i; in u8500_hsem_probe()
H A Domap_hwspinlock.c79 struct hwspinlock *hwlock; in omap_hwspinlock_probe() local
130 for (i = 0, hwlock = &bank->lock[0]; i < num_locks; i++, hwlock++) in omap_hwspinlock_probe()
131 hwlock->priv = io_base + LOCK_BASE_OFFSET + sizeof(u32) * i; in omap_hwspinlock_probe()
H A Dsun6i_hwspinlock.c94 struct hwspinlock *hwlock; in sun6i_hwspinlock_probe() local
165 hwlock = &priv->bank->lock[i]; in sun6i_hwspinlock_probe()
166 hwlock->priv = io_base + SPINLOCK_LOCK_REGN + sizeof(u32) * i; in sun6i_hwspinlock_probe()
/openbmc/linux/Documentation/locking/
H A Dhwspinlock.rst80 int hwspin_lock_free(struct hwspinlock *hwlock);
90 int hwspin_lock_bust(struct hwspinlock *hwlock, unsigned int id);
101 int hwspin_lock_timeout(struct hwspinlock *hwlock, unsigned int timeout);
117 int hwspin_lock_timeout_irq(struct hwspinlock *hwlock, unsigned int timeout);
132 int hwspin_lock_timeout_irqsave(struct hwspinlock *hwlock, unsigned int to,
150 int hwspin_lock_timeout_raw(struct hwspinlock *hwlock, unsigned int timeout);
167 int hwspin_lock_timeout_in_atomic(struct hwspinlock *hwlock, unsigned int to);
183 int hwspin_trylock(struct hwspinlock *hwlock);
200 int hwspin_trylock_irq(struct hwspinlock *hwlock);
217 int hwspin_trylock_irqsave(struct hwspinlock *hwlock, unsigned long *flags);
[all …]
/openbmc/linux/drivers/spi/
H A Dspi-sprd-adi.c150 struct hwspinlock *hwlock; member
226 if (sadi->hwlock) { in sprd_adi_read()
227 ret = hwspin_lock_timeout_irqsave(sadi->hwlock, in sprd_adi_read()
281 if (sadi->hwlock) in sprd_adi_read()
282 hwspin_unlock_irqrestore(sadi->hwlock, &flags); in sprd_adi_read()
292 if (sadi->hwlock) { in sprd_adi_write()
293 ret = hwspin_lock_timeout_irqsave(sadi->hwlock, in sprd_adi_write()
330 if (sadi->hwlock) in sprd_adi_write()
331 hwspin_unlock_irqrestore(sadi->hwlock, &flags); in sprd_adi_write()
557 sadi->hwlock = in sprd_adi_probe()
[all …]
/openbmc/linux/drivers/irqchip/
H A Dirq-stm32-exti.c63 struct hwspinlock *hwlock; member
361 struct hwspinlock *hwlock = chip_data->host_data->hwlock; in stm32_irq_set_type() local
367 if (hwlock) { in stm32_irq_set_type()
368 err = hwspin_lock_timeout_in_atomic(hwlock, HWSPNLCK_TIMEOUT); in stm32_irq_set_type()
386 if (hwlock) in stm32_irq_set_type()
387 hwspin_unlock_in_atomic(hwlock); in stm32_irq_set_type()
564 struct hwspinlock *hwlock = chip_data->host_data->hwlock; in stm32_exti_h_set_type() local
571 if (hwlock) { in stm32_exti_h_set_type()
572 err = hwspin_lock_timeout_in_atomic(hwlock, HWSPNLCK_TIMEOUT); in stm32_exti_h_set_type()
590 if (hwlock) in stm32_exti_h_set_type()
[all …]
/openbmc/linux/drivers/nvmem/
H A Dsprd-efuse.c66 struct hwspinlock *hwlock; member
89 ret = hwspin_lock_timeout_raw(efuse->hwlock, in sprd_efuse_lock()
102 hwspin_unlock_raw(efuse->hwlock); in sprd_efuse_unlock()
386 dev_err(&pdev->dev, "failed to get hwlock id\n"); in sprd_efuse_probe()
390 efuse->hwlock = devm_hwspin_lock_request_specific(&pdev->dev, ret); in sprd_efuse_probe()
391 if (!efuse->hwlock) { in sprd_efuse_probe()
392 dev_err(&pdev->dev, "failed to request hwlock\n"); in sprd_efuse_probe()
H A Dsc27xx-efuse.c64 struct hwspinlock *hwlock; member
89 ret = hwspin_lock_timeout_raw(efuse->hwlock, in sc27xx_efuse_lock()
102 hwspin_unlock_raw(efuse->hwlock); in sc27xx_efuse_unlock()
232 efuse->hwlock = devm_hwspin_lock_request_specific(&pdev->dev, ret); in sc27xx_efuse_probe()
233 if (!efuse->hwlock) { in sc27xx_efuse_probe()
/openbmc/linux/drivers/pinctrl/stm32/
H A Dpinctrl-stm32.c116 struct hwspinlock *hwlock; member
444 if (pctl->hwlock) { in stm32_gpio_domain_activate()
445 ret = hwspin_lock_timeout_in_atomic(pctl->hwlock, in stm32_gpio_domain_activate()
455 if (pctl->hwlock) in stm32_gpio_domain_activate()
456 hwspin_unlock_in_atomic(pctl->hwlock); in stm32_gpio_domain_activate()
780 if (pctl->hwlock) { in stm32_pmx_set_mode()
781 err = hwspin_lock_timeout_in_atomic(pctl->hwlock, in stm32_pmx_set_mode()
799 if (pctl->hwlock) in stm32_pmx_set_mode()
800 hwspin_unlock_in_atomic(pctl->hwlock); in stm32_pmx_set_mode()
913 if (pctl->hwlock) { in stm32_pconf_set_driving()
[all …]
/openbmc/linux/drivers/isdn/hardware/mISDN/
H A DmISDNisar.c199 spin_lock_irqsave(isar->hwlock, flags); in load_firmware()
201 spin_unlock_irqrestore(isar->hwlock, flags); in load_firmware()
216 spin_lock_irqsave(isar->hwlock, flags); in load_firmware()
228 spin_unlock_irqrestore(isar->hwlock, flags); in load_firmware()
257 spin_lock_irqsave(isar->hwlock, flags); in load_firmware()
268 spin_unlock_irqrestore(isar->hwlock, flags); in load_firmware()
288 spin_lock_irqsave(isar->hwlock, flags); in load_firmware()
310 spin_unlock_irqrestore(isar->hwlock, flags); in load_firmware()
328 spin_lock_irqsave(isar->hwlock, flags); in load_firmware()
334 spin_unlock_irqrestore(isar->hwlock, flags); in load_firmware()
[all …]
H A DmISDNipac.c564 spin_lock_irqsave(isac->hwlock, flags); in isac_l1hw()
570 spin_unlock_irqrestore(isac->hwlock, flags); in isac_l1hw()
573 spin_unlock_irqrestore(isac->hwlock, flags); in isac_l1hw()
598 spin_lock_irqsave(isac->hwlock, flags); in isac_ctrl()
612 spin_unlock_irqrestore(isac->hwlock, flags); in isac_ctrl()
634 spin_lock_irqsave(isac->hwlock, flags); in isac_l1cmd()
636 spin_unlock_irqrestore(isac->hwlock, flags); in isac_l1cmd()
639 spin_lock_irqsave(isac->hwlock, flags); in isac_l1cmd()
641 spin_unlock_irqrestore(isac->hwlock, flags); in isac_l1cmd()
644 spin_lock_irqsave(isac->hwlock, flags); in isac_l1cmd()
[all …]
/openbmc/linux/Documentation/devicetree/bindings/nvmem/
H A Dsprd-efuse.txt8 - hwlocks: Reference to a phandle of a hwlock provider node.
20 hwlocks = <&hwlock 8>;
H A Dsc27xx-efuse.txt11 - hwlocks: Reference to a phandle of a hwlock provider node.
34 hwlocks = <&hwlock 12>;
/openbmc/linux/drivers/soc/qcom/
H A Dsmem.c267 * @hwlock: reference to a hwspinlock
279 struct hwspinlock *hwlock; member
384 return hwspin_lock_bust(__smem->hwlock, SMEM_HOST_ID_TO_HWSPINLOCK_ID(host)); in qcom_smem_bust_hwspin_lock_by_host()
521 ret = hwspin_lock_timeout_irqsave(__smem->hwlock, in qcom_smem_alloc()
537 hwspin_unlock_irqrestore(__smem->hwlock, &flags); in qcom_smem_alloc()
694 ret = hwspin_lock_timeout_irqsave(__smem->hwlock, in qcom_smem_get()
710 hwspin_unlock_irqrestore(__smem->hwlock, &flags); in qcom_smem_get()
1163 dev_err(&pdev->dev, "failed to retrieve hwlock\n"); in qcom_smem_probe()
1167 smem->hwlock = hwspin_lock_request_specific(hwlock_id); in qcom_smem_probe()
1168 if (!smem->hwlock) in qcom_smem_probe()
[all …]
/openbmc/linux/arch/arm64/boot/dts/sprd/
H A Dwhale2.dtsi174 hwlocks = <&hwlock 0>;
175 hwlock-names = "adi";
193 hwlock: hwspinlock@40500000 { label
196 #hwlock-cells = <1>;
/openbmc/linux/Documentation/devicetree/bindings/iio/adc/
H A Dsprd,sc2720-adc.yaml94 hwlocks = <&hwlock 4>;
111 hwlocks = <&hwlock 4>;

12345