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

Merge tag 'drivers_soc_for_4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/drivers

soc: driver soc update for v4.20

- Enable host-id as an optional dt property
- Fix minor typo in knav driver

* tag 'drivers_soc_for_4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone:
soc: ti: fix spelling mistake "instace" -> "instance"
firmware: ti_sci: Provide host-id as an optional dt parameter
Documentation: dt: keystone: ti-sci: Add optional host-id parameter

Signed-off-by: Olof Johansson <olof@lixom.net>

+29 -9
+4
Documentation/devicetree/bindings/arm/keystone/ti,sci.txt
··· 45 45 debug_messages - Map the Debug message region 46 46 - reg: register space corresponding to the debug_messages 47 47 - ti,system-reboot-controller: If system reboot can be triggered by SoC reboot 48 + - ti,host-id: Integer value corresponding to the host ID assigned by Firmware 49 + for identification of host processing entities such as virtual 50 + machines 48 51 49 52 Example (K2G): 50 53 ------------- 51 54 pmmc: pmmc { 52 55 compatible = "ti,k2g-sci"; 56 + ti,host-id = <2>; 53 57 mbox-names = "rx", "tx"; 54 58 mboxes= <&msgmgr &msgmgr_proxy_pmmc_rx>, 55 59 <&msgmgr &msgmgr_proxy_pmmc_tx>;
+20 -4
drivers/firmware/ti_sci.c
··· 66 66 67 67 /** 68 68 * struct ti_sci_desc - Description of SoC integration 69 - * @host_id: Host identifier representing the compute entity 69 + * @default_host_id: Host identifier representing the compute entity 70 70 * @max_rx_timeout_ms: Timeout for communication with SoC (in Milliseconds) 71 71 * @max_msgs: Maximum number of messages that can be pending 72 72 * simultaneously in the system 73 73 * @max_msg_size: Maximum size of data per message that can be handled. 74 74 */ 75 75 struct ti_sci_desc { 76 - u8 host_id; 76 + u8 default_host_id; 77 77 int max_rx_timeout_ms; 78 78 int max_msgs; 79 79 int max_msg_size; ··· 94 94 * @chan_rx: Receive mailbox channel 95 95 * @minfo: Message info 96 96 * @node: list head 97 + * @host_id: Host ID 97 98 * @users: Number of users of this instance 98 99 */ 99 100 struct ti_sci_info { ··· 111 110 struct mbox_chan *chan_rx; 112 111 struct ti_sci_xfers_info minfo; 113 112 struct list_head node; 113 + u8 host_id; 114 114 /* protected by ti_sci_list_mutex */ 115 115 int users; 116 116 ··· 372 370 373 371 hdr->seq = xfer_id; 374 372 hdr->type = msg_type; 375 - hdr->host = info->desc->host_id; 373 + hdr->host = info->host_id; 376 374 hdr->flags = msg_flags; 377 375 378 376 return xfer; ··· 1795 1793 1796 1794 /* Description for K2G */ 1797 1795 static const struct ti_sci_desc ti_sci_pmmc_k2g_desc = { 1798 - .host_id = 2, 1796 + .default_host_id = 2, 1799 1797 /* Conservative duration */ 1800 1798 .max_rx_timeout_ms = 1000, 1801 1799 /* Limited by MBOX_TX_QUEUE_LEN. K2G can handle upto 128 messages! */ ··· 1821 1819 int ret = -EINVAL; 1822 1820 int i; 1823 1821 int reboot = 0; 1822 + u32 h_id; 1824 1823 1825 1824 of_id = of_match_device(ti_sci_of_match, dev); 1826 1825 if (!of_id) { ··· 1836 1833 1837 1834 info->dev = dev; 1838 1835 info->desc = desc; 1836 + ret = of_property_read_u32(dev->of_node, "ti,host-id", &h_id); 1837 + /* if the property is not present in DT, use a default from desc */ 1838 + if (ret < 0) { 1839 + info->host_id = info->desc->default_host_id; 1840 + } else { 1841 + if (!h_id) { 1842 + dev_warn(dev, "Host ID 0 is reserved for firmware\n"); 1843 + info->host_id = info->desc->default_host_id; 1844 + } else { 1845 + info->host_id = h_id; 1846 + } 1847 + } 1848 + 1839 1849 reboot = of_property_read_bool(dev->of_node, 1840 1850 "ti,system-reboot-controller"); 1841 1851 INIT_LIST_HEAD(&info->node);
+2 -2
drivers/soc/ti/knav_dma.c
··· 438 438 439 439 chan_num = of_channel_match_helper(dev->of_node, name, &instance); 440 440 if (chan_num < 0) { 441 - dev_err(kdev->dev, "No DMA instace with name %s\n", name); 441 + dev_err(kdev->dev, "No DMA instance with name %s\n", name); 442 442 return (void *)-EINVAL; 443 443 } 444 444 ··· 461 461 } 462 462 } 463 463 if (!found) { 464 - dev_err(kdev->dev, "No DMA instace with name %s\n", instance); 464 + dev_err(kdev->dev, "No DMA instance with name %s\n", instance); 465 465 return (void *)-EINVAL; 466 466 } 467 467
+3 -3
drivers/soc/ti/knav_qmss.h
··· 240 240 }; 241 241 242 242 /** 243 - * struct knav_queue_inst: qmss queue instace properties 243 + * struct knav_queue_inst: qmss queue instance properties 244 244 * @descs: descriptor pointer 245 245 * @desc_head, desc_tail, desc_count: descriptor counters 246 246 * @acc: accumulator channel pointer 247 247 * @kdev: qmss device pointer 248 248 * @range: range info 249 249 * @qmgr: queue manager info 250 - * @id: queue instace id 250 + * @id: queue instance id 251 251 * @irq_num: irq line number 252 252 * @notify_needed: notifier needed based on queue type 253 253 * @num_notifiers: total notifiers ··· 274 274 /** 275 275 * struct knav_queue: qmss queue properties 276 276 * @reg_push, reg_pop, reg_peek: push, pop queue registers 277 - * @inst: qmss queue instace properties 277 + * @inst: qmss queue instance properties 278 278 * @notifier_fn: notifier function 279 279 * @notifier_fn_arg: notifier function argument 280 280 * @notifier_enabled: notier enabled for a give queue