Merge tag 'imx-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/drivers
i.MX drivers change for 5.11: - A series from Daniel Baluta to update imx-dsp driver and export functions for on demand channel request/free. - A number of patches to add power domains for i.MX8qxp DC0, LVDS1, MIPI1 and JPEG subsystems. - Add dummy functions for i.MX firmware drivers to avoid build failure seen with COMPILE_TEST. * tag 'imx-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: firmware: imx: scu-pd: Add some power domains support for i.MX8qxp MIPI1 subsystem firmware: imx: scu-pd: Add main power domain support for i.MX8qxp LVDS1 subsystem firmware: imx: scu-pd: Add video0/1 power domains support for i.MX8qxp DC0 subsystem firmware: imx-dsp: Export functions to request/free channels firmware: imx: Save channel name for further use firmware: imx: Introduce imx_dsp_setup_channels firmware: imx: scu-pd: Add power domains for imx-jpeg firmware: imx: add dummy functions Link: https://lore.kernel.org/r/20201202142717.9262-1-shawnguo@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
e0839f3ea4
6 changed files with 137 additions and 20 deletions
|
|
@ -55,6 +55,9 @@ static inline void *imx_dsp_get_data(struct imx_dsp_ipc *ipc)
|
|||
|
||||
int imx_dsp_ring_doorbell(struct imx_dsp_ipc *dsp, unsigned int chan_idx);
|
||||
|
||||
struct mbox_chan *imx_dsp_request_channel(struct imx_dsp_ipc *ipc, int idx);
|
||||
void imx_dsp_free_channel(struct imx_dsp_ipc *ipc, int idx);
|
||||
|
||||
#else
|
||||
|
||||
static inline int imx_dsp_ring_doorbell(struct imx_dsp_ipc *ipc,
|
||||
|
|
@ -63,5 +66,12 @@ static inline int imx_dsp_ring_doorbell(struct imx_dsp_ipc *ipc,
|
|||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
struct mbox_chan *imx_dsp_request_channel(struct imx_dsp_ipc *ipc, int idx)
|
||||
{
|
||||
return ERR_PTR(-EOPNOTSUPP);
|
||||
}
|
||||
|
||||
void imx_dsp_free_channel(struct imx_dsp_ipc *ipc, int idx) { }
|
||||
|
||||
#endif
|
||||
#endif /* _IMX_DSP_IPC_H */
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ struct imx_sc_rpc_msg {
|
|||
uint8_t func;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_IMX_SCU
|
||||
/*
|
||||
* This is an function to send an RPC message over an IPC channel.
|
||||
* It is called by client-side SCFW API function shims.
|
||||
|
|
@ -55,4 +56,16 @@ int imx_scu_call_rpc(struct imx_sc_ipc *ipc, void *msg, bool have_resp);
|
|||
* @return Returns an error code (0 = success, failed if < 0)
|
||||
*/
|
||||
int imx_scu_get_handle(struct imx_sc_ipc **ipc);
|
||||
#else
|
||||
static inline int imx_scu_call_rpc(struct imx_sc_ipc *ipc, void *msg,
|
||||
bool have_resp)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static inline int imx_scu_get_handle(struct imx_sc_ipc **ipc)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
#endif
|
||||
#endif /* _SC_IPC_H */
|
||||
|
|
|
|||
|
|
@ -16,9 +16,36 @@
|
|||
#include <linux/firmware/imx/svc/pm.h>
|
||||
#include <linux/firmware/imx/svc/rm.h>
|
||||
|
||||
#if IS_ENABLED(CONFIG_IMX_SCU)
|
||||
int imx_scu_enable_general_irq_channel(struct device *dev);
|
||||
int imx_scu_irq_register_notifier(struct notifier_block *nb);
|
||||
int imx_scu_irq_unregister_notifier(struct notifier_block *nb);
|
||||
int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable);
|
||||
int imx_scu_soc_init(struct device *dev);
|
||||
#else
|
||||
static inline int imx_scu_soc_init(struct device *dev)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static inline int imx_scu_enable_general_irq_channel(struct device *dev)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static inline int imx_scu_irq_register_notifier(struct notifier_block *nb)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static inline int imx_scu_irq_unregister_notifier(struct notifier_block *nb)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static inline int imx_scu_irq_group_enable(u8 group, u32 mask, u8 enable)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
#endif
|
||||
#endif /* _SC_SCI_H */
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ enum imx_misc_func {
|
|||
* Control Functions
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_IMX_SCU
|
||||
int imx_sc_misc_set_control(struct imx_sc_ipc *ipc, u32 resource,
|
||||
u8 ctrl, u32 val);
|
||||
|
||||
|
|
@ -54,5 +55,23 @@ int imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource,
|
|||
|
||||
int imx_sc_pm_cpu_start(struct imx_sc_ipc *ipc, u32 resource,
|
||||
bool enable, u64 phys_addr);
|
||||
#else
|
||||
static inline int imx_sc_misc_set_control(struct imx_sc_ipc *ipc,
|
||||
u32 resource, u8 ctrl, u32 val)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static inline int imx_sc_misc_get_control(struct imx_sc_ipc *ipc,
|
||||
u32 resource, u8 ctrl, u32 *val)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static inline int imx_sc_pm_cpu_start(struct imx_sc_ipc *ipc, u32 resource,
|
||||
bool enable, u64 phys_addr)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
#endif
|
||||
#endif /* _SC_MISC_API_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue