[U-Boot] [PATCH V3 08/32] misc: imx8: add scfw api impementation

Anatolij Gustschin agust at denx.de
Fri Aug 10 14:19:17 UTC 2018


On Mon,  6 Aug 2018 10:50:23 +0800
Peng Fan peng.fan at nxp.com wrote:

> Add clk/misc/pad/pm/rm scfw api implementaion for different
> drivers to invoke. The low level code is using misc_call
> to invoke imx8_scu driver.
> 
> Signed-off-by: Peng Fan <peng.fan at nxp.com>
> Cc: Stefano Babic <sbabic at denx.de>
> ---
>  arch/arm/include/asm/arch-imx8/sci/sci.h | 31 +++++++++-
>  drivers/misc/imx8/Makefile               |  2 +-
>  drivers/misc/imx8/clk.c                  | 93 ++++++++++++++++++++++++++++++
>  drivers/misc/imx8/misc.c                 | 88 +++++++++++++++++++++++++++++
>  drivers/misc/imx8/pad.c                  | 39 +++++++++++++
>  drivers/misc/imx8/pm.c                   | 38 +++++++++++++
>  drivers/misc/imx8/rm.c                   | 97 ++++++++++++++++++++++++++++++++
>  7 files changed, 386 insertions(+), 2 deletions(-)
>  create mode 100644 drivers/misc/imx8/clk.c
>  create mode 100644 drivers/misc/imx8/misc.c
>  create mode 100644 drivers/misc/imx8/pad.c
>  create mode 100644 drivers/misc/imx8/pm.c
>  create mode 100644 drivers/misc/imx8/rm.c

What about adding a single file (scu-api.c ?) with all API functions?

> diff --git a/arch/arm/include/asm/arch-imx8/sci/sci.h b/arch/arm/include/asm/arch-imx8/sci/sci.h
> index b7280aee05..4704ba9699 100644
> --- a/arch/arm/include/asm/arch-imx8/sci/sci.h
> +++ b/arch/arm/include/asm/arch-imx8/sci/sci.h
> @@ -46,7 +46,8 @@ static inline int sc_err_to_linux(sc_err_t err)
>  		ret = -EIO;
>  		break;
>  	default:
> -		panic("Invalid sc_err_t value\n");
> +		ret = 0;
> +		break;
>  	}

Please move this to patch 4/32 that adds sci.h file.

--
Anatolij


More information about the U-Boot mailing list