From 70e03fea5bd3448058abe5d03764c17326a2c017 Mon Sep 17 00:00:00 2001 From: Lin Huang Date: Tue, 17 May 2016 15:45:05 +0800 Subject: rockchip: rk3399: pass board specific message to BL31 Sometimes we need to pass board specific messages to BL31, so that BL31 can do board specific operation based on common code. BRANCH=None BUG=chrome-os-partner:51924 TEST=Build gru Change-Id: I096878699c6e6933debdf2fb3423734f538691ae Signed-off-by: Martin Roth Original-Commit-Id: af83e1b Original-Change-Id: Ib7585ce7d3bf01d3ce53b388bf9bd60f3b65f5f1 Original-Signed-off-by: Lin Huang Original-Signed-off-by: Douglas Anderson Original-Reviewed-on: https://chromium-review.googlesource.com/349700 Original-Reviewed-by: Vadim Bendebury Reviewed-on: https://review.coreboot.org/15116 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/soc/rockchip/rk3399/Makefile.inc | 1 + src/soc/rockchip/rk3399/bl31_plat_params.c | 32 ++++++++++++++++++++++ .../rockchip/rk3399/include/soc/bl31_plat_params.h | 24 ++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 src/soc/rockchip/rk3399/bl31_plat_params.c create mode 100644 src/soc/rockchip/rk3399/include/soc/bl31_plat_params.h (limited to 'src/soc') diff --git a/src/soc/rockchip/rk3399/Makefile.inc b/src/soc/rockchip/rk3399/Makefile.inc index f35f706ff2..990edcba2c 100644 --- a/src/soc/rockchip/rk3399/Makefile.inc +++ b/src/soc/rockchip/rk3399/Makefile.inc @@ -70,6 +70,7 @@ ramstage-y += timer.c ramstage-$(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) += ../common/vop.c ramstage-y += usb.c +ramstage-y += bl31_plat_params.c BL31_MAKEARGS += PLAT=rk3399 ################################################################################ diff --git a/src/soc/rockchip/rk3399/bl31_plat_params.c b/src/soc/rockchip/rk3399/bl31_plat_params.c new file mode 100644 index 0000000000..583eac8059 --- /dev/null +++ b/src/soc/rockchip/rk3399/bl31_plat_params.c @@ -0,0 +1,32 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2016 Rockchip Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include +#include +#include + +static struct bl31_plat_param *plat_params; + +void register_bl31_param(struct bl31_plat_param *param) +{ + param->next = plat_params; + plat_params = param; +} + +void *soc_get_bl31_plat_params(bl31_params_t *bl31_params) +{ + return plat_params; +} diff --git a/src/soc/rockchip/rk3399/include/soc/bl31_plat_params.h b/src/soc/rockchip/rk3399/include/soc/bl31_plat_params.h new file mode 100644 index 0000000000..c73d68753a --- /dev/null +++ b/src/soc/rockchip/rk3399/include/soc/bl31_plat_params.h @@ -0,0 +1,24 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2016 Rockchip Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef __BL31_PLAT_PARAMS_H__ +#define __BL31_PLAT_PARAMS_H__ + +#include + +void register_bl31_param(struct bl31_plat_param *param); + +#endif/* __BL31_PLAT_PARAMS_H__ */ -- cgit v1.2.3