Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

firmware: ti_sci: rm: Remove ring_get_config support

The ring_get_cfg (0x1111 message) is not used and it is not supported by
sysfw for a long time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

authored by

Peter Ujfalusi and committed by
Santosh Shilimkar
4d8ddf67 ce1feed5

-130
-80
drivers/firmware/ti_sci.c
··· 2120 2120 } 2121 2121 2122 2122 /** 2123 - * ti_sci_cmd_ring_get_config() - get RA ring configuration 2124 - * @handle: Pointer to TI SCI handle. 2125 - * @nav_id: Device ID of Navigator Subsystem from which the ring is 2126 - * allocated 2127 - * @index: Ring index 2128 - * @addr_lo: Returns ring's base address lo 32 bits 2129 - * @addr_hi: Returns ring's base address hi 32 bits 2130 - * @count: Returns number of ring elements 2131 - * @mode: Returns mode of the ring 2132 - * @size: Returns ring element size 2133 - * @order_id: Returns ring's bus order ID 2134 - * 2135 - * Return: 0 if all went well, else returns appropriate error value. 2136 - * 2137 - * See @ti_sci_msg_rm_ring_get_cfg_req for more info. 2138 - */ 2139 - static int ti_sci_cmd_ring_get_config(const struct ti_sci_handle *handle, 2140 - u32 nav_id, u32 index, u8 *mode, 2141 - u32 *addr_lo, u32 *addr_hi, 2142 - u32 *count, u8 *size, u8 *order_id) 2143 - { 2144 - struct ti_sci_msg_rm_ring_get_cfg_resp *resp; 2145 - struct ti_sci_msg_rm_ring_get_cfg_req *req; 2146 - struct ti_sci_xfer *xfer; 2147 - struct ti_sci_info *info; 2148 - struct device *dev; 2149 - int ret = 0; 2150 - 2151 - if (IS_ERR_OR_NULL(handle)) 2152 - return -EINVAL; 2153 - 2154 - info = handle_to_ti_sci_info(handle); 2155 - dev = info->dev; 2156 - 2157 - xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_RM_RING_GET_CFG, 2158 - TI_SCI_FLAG_REQ_ACK_ON_PROCESSED, 2159 - sizeof(*req), sizeof(*resp)); 2160 - if (IS_ERR(xfer)) { 2161 - ret = PTR_ERR(xfer); 2162 - dev_err(dev, 2163 - "RM_RA:Message get config failed(%d)\n", ret); 2164 - return ret; 2165 - } 2166 - req = (struct ti_sci_msg_rm_ring_get_cfg_req *)xfer->xfer_buf; 2167 - req->nav_id = nav_id; 2168 - req->index = index; 2169 - 2170 - ret = ti_sci_do_xfer(info, xfer); 2171 - if (ret) { 2172 - dev_err(dev, "RM_RA:Mbox get config send fail %d\n", ret); 2173 - goto fail; 2174 - } 2175 - 2176 - resp = (struct ti_sci_msg_rm_ring_get_cfg_resp *)xfer->xfer_buf; 2177 - 2178 - if (!ti_sci_is_response_ack(resp)) { 2179 - ret = -ENODEV; 2180 - } else { 2181 - if (mode) 2182 - *mode = resp->mode; 2183 - if (addr_lo) 2184 - *addr_lo = resp->addr_lo; 2185 - if (addr_hi) 2186 - *addr_hi = resp->addr_hi; 2187 - if (count) 2188 - *count = resp->count; 2189 - if (size) 2190 - *size = resp->size; 2191 - if (order_id) 2192 - *order_id = resp->order_id; 2193 - }; 2194 - 2195 - fail: 2196 - ti_sci_put_one_xfer(&info->minfo, xfer); 2197 - dev_dbg(dev, "RM_RA:get config ring %u ret:%d\n", index, ret); 2198 - return ret; 2199 - } 2200 - 2201 - /** 2202 2123 * ti_sci_cmd_rm_psil_pair() - Pair PSI-L source to destination thread 2203 2124 * @handle: Pointer to TI SCI handle. 2204 2125 * @nav_id: Device ID of Navigator Subsystem which should be used for ··· 2847 2926 iops->free_event_map = ti_sci_cmd_free_event_map; 2848 2927 2849 2928 rops->config = ti_sci_cmd_ring_config; 2850 - rops->get_config = ti_sci_cmd_ring_get_config; 2851 2929 2852 2930 psilops->pair = ti_sci_cmd_rm_psil_pair; 2853 2931 psilops->unpair = ti_sci_cmd_rm_psil_unpair;
-44
drivers/firmware/ti_sci.h
··· 49 49 #define TI_SCI_MSG_RM_RING_RECONFIG 0x1102 50 50 #define TI_SCI_MSG_RM_RING_RESET 0x1103 51 51 #define TI_SCI_MSG_RM_RING_CFG 0x1110 52 - #define TI_SCI_MSG_RM_RING_GET_CFG 0x1111 53 52 54 53 /* PSI-L requests */ 55 54 #define TI_SCI_MSG_RM_PSIL_PAIR 0x1280 ··· 678 679 u32 valid_params; 679 680 u16 nav_id; 680 681 u16 index; 681 - u32 addr_lo; 682 - u32 addr_hi; 683 - u32 count; 684 - u8 mode; 685 - u8 size; 686 - u8 order_id; 687 - } __packed; 688 - 689 - /** 690 - * struct ti_sci_msg_rm_ring_get_cfg_req - Get RA ring's configuration 691 - * 692 - * Gets the configuration of the non-real-time register fields of a ring. The 693 - * host, or a supervisor of the host, who owns the ring must be the requesting 694 - * host. The values of the non-real-time registers are returned in 695 - * @ti_sci_msg_rm_ring_get_cfg_resp. 696 - * 697 - * @hdr: Generic Header 698 - * @nav_id: Device ID of Navigator Subsystem from which the ring is allocated 699 - * @index: ring index. 700 - */ 701 - struct ti_sci_msg_rm_ring_get_cfg_req { 702 - struct ti_sci_msg_hdr hdr; 703 - u16 nav_id; 704 - u16 index; 705 - } __packed; 706 - 707 - /** 708 - * struct ti_sci_msg_rm_ring_get_cfg_resp - Ring get configuration response 709 - * 710 - * Response received by host processor after RM has handled 711 - * @ti_sci_msg_rm_ring_get_cfg_req. The response contains the ring's 712 - * non-real-time register values. 713 - * 714 - * @hdr: Generic Header 715 - * @addr_lo: Ring 32 LSBs of base address 716 - * @addr_hi: Ring 16 MSBs of base address. 717 - * @count: Ring number of elements. 718 - * @mode: Ring mode. 719 - * @size: encoded Ring element size 720 - * @order_id: ing order ID. 721 - */ 722 - struct ti_sci_msg_rm_ring_get_cfg_resp { 723 - struct ti_sci_msg_hdr hdr; 724 682 u32 addr_lo; 725 683 u32 addr_hi; 726 684 u32 count;
-6
include/linux/soc/ti/ti_sci_protocol.h
··· 286 286 /** 287 287 * struct ti_sci_rm_ringacc_ops - Ring Accelerator Management operations 288 288 * @config: configure the SoC Navigator Subsystem Ring Accelerator ring 289 - * @get_config: get the SoC Navigator Subsystem Ring Accelerator ring 290 - * configuration 291 289 */ 292 290 struct ti_sci_rm_ringacc_ops { 293 291 int (*config)(const struct ti_sci_handle *handle, ··· 293 295 u32 addr_lo, u32 addr_hi, u32 count, u8 mode, 294 296 u8 size, u8 order_id 295 297 ); 296 - int (*get_config)(const struct ti_sci_handle *handle, 297 - u32 nav_id, u32 index, u8 *mode, 298 - u32 *addr_lo, u32 *addr_hi, u32 *count, 299 - u8 *size, u8 *order_id); 300 298 }; 301 299 302 300 /**