summaryrefslogtreecommitdiffstats
path: root/drivers/soc/microchip
Commit message (Collapse)AuthorAgeFilesLines
* soc: microchip: mpfs: add a prefix to rx_callback()Conor Dooley2023-04-031-2/+2
| | | | | | Add a prefix to the function name to match the rest of the file. Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
* soc: microchip: mpfs: handle timeouts and failed services differentlyConor Dooley2023-04-031-5/+22
| | | | | | | | | | | | | | | | | | | The system controller will only deliver an interrupt if a service succeeds. This leaves us in the unfortunate position with current code where there is no way to differentiate between a legitimate timeout where the service has not completed & where it has completed, but failed. mbox_send_message() has its own completion, and it will time out of the system controller does not lower the busy flag. In this case, a timeout has occurred and the error can be propagated back to the caller. If the busy flag is lowered, but no interrupt has arrived to trigger the rx callback, the service can be deemed to have failed. Report -EBADMSG in this case so that callers can differentiate. Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
* soc: microchip: mpfs: simplify error handling in mpfs_blocking_transaction()Conor Dooley2023-04-031-14/+13
| | | | | | | | | | The error handling has a kinda weird nested-if setup that is not really adding anything. Switch it to more of an early return arrangement as a predatory step for adding different handing for timeouts and failed services. Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
* soc: microchip: mpfs: use a consistent completion timeoutConor Dooley2023-04-031-1/+5
| | | | | | | | | Completion timeouts use jiffies, so passing a number directly will produce inconsistent timeouts depending on config. Define the timeout in ms and convert it to jiffies instead. Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
* soc: microchip: mpfs: fix some horrible alignmentConor Dooley2023-04-031-2/+2
| | | | | | | | | mpfs_sys_controller_delete() has some horrible alignment that upsets my OCD... Move the RHS of the assignment to a new line for greater satifaction. Tested-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
* Merge tag 'arm-drivers-5.18' of ↵Linus Torvalds2022-03-231-5/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM driver updates from Arnd Bergmann: "There are a few separately maintained driver subsystems that we merge through the SoC tree, notable changes are: - Memory controller updates, mainly for Tegra and Mediatek SoCs, and clarifications for the memory controller DT bindings - SCMI firmware interface updates, in particular a new transport based on OPTEE and support for atomic operations. - Cleanups to the TEE subsystem, refactoring its memory management For SoC specific drivers without a separate subsystem, changes include - Smaller updates and fixes for TI, AT91/SAMA5, Qualcomm and NXP Layerscape SoCs. - Driver support for Microchip SAMA5D29, Tesla FSD, Renesas RZ/G2L, and Qualcomm SM8450. - Better power management on Mediatek MT81xx, NXP i.MX8MQ and older NVIDIA Tegra chips" * tag 'arm-drivers-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (154 commits) ARM: spear: fix typos in comments soc/microchip: fix invalid free in mpfs_sys_controller_delete soc: s4: Add support for power domains controller dt-bindings: power: add Amlogic s4 power domains bindings ARM: at91: add support in soc driver for new SAMA5D29 soc: mediatek: mmsys: add sw0_rst_offset in mmsys driver data dt-bindings: memory: renesas,rpc-if: Document RZ/V2L SoC memory: emif: check the pointer temp in get_device_details() memory: emif: Add check for setup_interrupts dt-bindings: arm: mediatek: mmsys: add support for MT8186 dt-bindings: mediatek: add compatible for MT8186 pwrap soc: mediatek: pwrap: add pwrap driver for MT8186 SoC soc: mediatek: mmsys: add mmsys reset control for MT8186 soc: mediatek: mtk-infracfg: Disable ACP on MT8192 soc: ti: k3-socinfo: Add AM62x JTAG ID soc: mediatek: add MTK mutex support for MT8186 soc: mediatek: mmsys: add mt8186 mmsys routing table soc: mediatek: pm-domains: Add support for mt8186 dt-bindings: power: Add MT8186 power domains soc: mediatek: pm-domains: Add support for mt8195 ...
| * soc/microchip: fix invalid free in mpfs_sys_controller_deleteConor Dooley2022-03-181-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix an invalid kfree in mpfs_sys_controller_delete, by replacing the devm_kzalloc with a regular kzalloc. Change the error handling in the probe function to free the sys_controller struct if the probe fails. > cocci warnings: (new ones prefixed by >>) > >> drivers/soc/microchip/mpfs-sys-controller.c:73:1-6: WARNING: invalid free of devm_ allocated data Link: https://lore.kernel.org/linux-mm/202203180259.lgIylRZV-lkp@intel.com/ Fixes: d0054a470c33 ("soc: add microchip polarfire soc system controller") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Conor Dooley <mail@conchuod.ie> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* | soc: microchip: make mpfs_sys_controller_put staticConor Dooley2022-02-281-2/+1
|/ | | | | | | | | | | | | dsafsdfd0054 ("soc: add microchip polarfire soc system controller") incorrectly exported mpfs_sys_controller_put. Remove the export and make the function static instead. This fixes the "no previous prototype for 'mpfs_sys_controller_put'" warning spotted by the kernel test robot. Fixes: d0054a470c33 ("soc: add microchip polarfire soc system controller") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Conor Dooley <mail@conchuod.ie> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* soc: add microchip polarfire soc system controllerConor Dooley2022-02-253-0/+205
This driver provides an interface for other drivers to access the functions of the system controller on the Microchip PolarFire SoC. Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20220217101349.2374873-2-conor.dooley@microchip.com