firmware: xilinx: add support for sd/usb/gem config
PATCH 1/1 firmware: xilinx: add support for sd/usb/gem config
Add new APIs in firmware to configure SD/GEM/USB registers. Internally it calls PM IOCTL for below SD/GEM/USB register configuration:
- SD/EMMC select
- SD slot type
- SD base clock
- SD 8 bit support
- GEM SGMII Mode
- SD fixed config
- GEM fixed config
- USB fixed config
--- drivers/firmware/xilinx/zynqmp.c | 47 ++++++++++++++++++++++++++++++++++++ include/linux/firmware/xlnx-zynqmp.h | 46 +++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+)
drivers/firmware/xilinx/zynqmp.c +47 -0
@@ -1220,6 +1220,53 @@ int zynqmp_pm_get_feature_config(enum pm_feature_config_id id, }/** +* zynqmp_pm_set_sd_config - PM call to set value of SD config registers +* @node: SD node ID +* @config: The config type of SD registers +* @value: Value to be set +* +* Return: Returns 0 on success or error value on failure. +*/ +int zynqmp_pm_set_sd_config (u32 node,enum pm_sd_config_type config,u32 value) +{ +return zynqmp_pm_invoke_fn (PM_IOCTL , node,IOCTL_SET_SD_CONFIG , + config, value,NULL ); +} +EXPORT_SYMBOL_GPL (zynqmp_pm_set_sd_config); + +/** +* zynqmp_pm_set_gem_config - PM call to set value of GEM config registers +* @node: GEM node ID +* @config: The config type of GEM registers +* @value: Value to be set +* +* Return: Returns 0 on success or error value on failure. +*/ +int zynqmp_pm_set_gem_config (u32 node,enum pm_gem_config_type config, +u32 value) +{ +return zynqmp_pm_invoke_fn (PM_IOCTL , node,IOCTL_SET_GEM_CONFIG , + config, value,NULL ); +} +EXPORT_SYMBOL_GPL (zynqmp_pm_set_gem_config); + +/** +* zynqmp_pm_set_usb_config - PM call to set value of USB config registers +* @node: USB node ID +* @config: The config type of USB registers +* @value: Value to be set +* +* Return: Returns 0 on success or error value on failure. +*/ +int zynqmp_pm_set_usb_config (u32 node,enum pm_usb_config_type config, +u32 value) +{ +return zynqmp_pm_invoke_fn (PM_IOCTL , node,IOCTL_SET_USB_CONFIG , + config, value,NULL ); +} +EXPORT_SYMBOL_GPL (zynqmp_pm_set_usb_config); + +/** * struct zynqmp_pm_shutdown_scope - Struct for shutdown scope * @subtype: Shutdown subtype * @name: Matching string for scope argument
include/linux/firmware/xlnx-zynqmp.h +46 -0
70 lines not on this page · raw message
Signature · 1 line
2.7.4
Quoted 11 lines · Ronak Jain
Add new APIs in firmware to configure SD/GEM/USB registers. Internally it calls PM IOCTL for below SD/GEM/USB register configuration:
- SD/EMMC select
- SD slot type
- SD base clock
- SD 8 bit support
- GEM SGMII Mode
- SD fixed config
- GEM fixed config
- USB fixed config
Quoted 1 line
Signed-off-by Ronak Jain <[email protected]>
I think it was said that you shouldn't send interface changes without any user. It means every function you add should be also used.
Thanks,
Michal