diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/clk-provider.h | 2 | ||||
-rw-r--r-- | include/linux/intel-smc.h | 15 | ||||
-rw-r--r-- | include/linux/mtd/spi-nor.h | 2 | ||||
-rw-r--r-- | include/linux/mtd/spinand.h | 2 | ||||
-rw-r--r-- | include/linux/soc/ti/ti_sci_protocol.h | 2 | ||||
-rw-r--r-- | include/linux/usb/gadget.h | 27 |
6 files changed, 41 insertions, 9 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 5ea2171492e..267757939e0 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -219,6 +219,8 @@ struct clk_composite { const struct clk_ops *mux_ops; const struct clk_ops *rate_ops; const struct clk_ops *gate_ops; + + struct udevice *dev; }; #define to_clk_composite(_clk) container_of(_clk, struct clk_composite, clk) diff --git a/include/linux/intel-smc.h b/include/linux/intel-smc.h index a54eff43add..6455335bae4 100644 --- a/include/linux/intel-smc.h +++ b/include/linux/intel-smc.h @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2017-2018, Intel Corporation + * Copyright (C) 2025 Altera Corporation <www.altera.com> */ #ifndef __INTEL_SMC_H @@ -482,10 +483,16 @@ INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_COMPLETED_WRITE) * Call register usage: * a0 INTEL_SIP_SMC_HPS_SET_BRIDGES * a1 Set bridges status: - * 0 - Disable - * 1 - Enable - * a2-7 not used - * + * Bit 0: 0 - Disable, 1 - Enable + * Bit 1: 1 - Has mask value in a2 + * a2 Mask value + * Bit 0: soc2fpga + * Bit 1: lwhps2fpga + * Bit 2: fpga2soc + * Bit 3: f2sdram0 (For Stratix 10 only) + * Bit 4: f2sdram1 (For Stratix 10 only) + * Bit 5: f2sdram2 (For Stratix 10 only) + * a3-7 not used * Return status * a0 INTEL_SIP_SMC_STATUS_OK */ diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index b8b207f7b5c..4eef4ab0488 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -569,7 +569,7 @@ struct spi_nor { u8 rdsr_dummy; u8 rdsr_addr_nbytes; u8 addr_mode_nbytes; -#ifdef CONFIG_SPI_FLASH_BAR +#if CONFIG_IS_ENABLED(SPI_FLASH_BAR) u8 bank_read_cmd; u8 bank_write_cmd; u8 bank_curr; diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h index 13b5a52f8b9..6fe6fd520a4 100644 --- a/include/linux/mtd/spinand.h +++ b/include/linux/mtd/spinand.h @@ -17,7 +17,7 @@ #include <linux/spi/spi.h> #include <linux/spi/spi-mem.h> #else -#include <spi.h> +#include <linux/bitops.h> #include <spi-mem.h> #include <linux/mtd/nand.h> #endif diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h index 8e4c43cef31..aa4d105ee98 100644 --- a/include/linux/soc/ti/ti_sci_protocol.h +++ b/include/linux/soc/ti/ti_sci_protocol.h @@ -143,7 +143,7 @@ struct ti_sci_dev_ops { u32 reset_state); int (*get_device_resets)(const struct ti_sci_handle *handle, u32 id, u32 *reset_state); - int (*release_exclusive_devices)(const struct ti_sci_handle *handle); + int (*release_exclusive_devices)(void); }; /** diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index c7927df15aa..fe79bf64a0e 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -179,6 +179,7 @@ struct usb_ep { const struct usb_ep_ops *ops; struct list_head ep_list; struct usb_ep_caps caps; + bool enabled; unsigned maxpacket:16; unsigned maxpacket_limit:16; unsigned max_streams:16; @@ -230,7 +231,18 @@ static inline void usb_ep_set_maxpacket_limit(struct usb_ep *ep, static inline int usb_ep_enable(struct usb_ep *ep, const struct usb_endpoint_descriptor *desc) { - return ep->ops->enable(ep, desc); + int ret; + + if (ep->enabled) + return 0; + + ret = ep->ops->enable(ep, desc); + if (ret) + return ret; + + ep->enabled = true; + + return 0; } /** @@ -247,7 +259,18 @@ static inline int usb_ep_enable(struct usb_ep *ep, */ static inline int usb_ep_disable(struct usb_ep *ep) { - return ep->ops->disable(ep); + int ret; + + if (!ep->enabled) + return 0; + + ret = ep->ops->disable(ep); + if (ret) + return ret; + + ep->enabled = false; + + return 0; } /** |