Browse Source

plat/arm/sgi: move bl31_platform_setup to board file

For SGI-575 and RD platforms, move bl31_platform_setup handler to
individual board files to allow the platforms to perform board specific
bl31 setup.

Change-Id: Ia44bccc0a7f40a155b33909bcb438a0909b20d42
Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
pull/1938/head
Vijayenthiran Subramaniam 5 years ago
parent
commit
c7d4a2178b
  1. 8
      plat/arm/board/rde1edge/rde1edge_plat.c
  2. 8
      plat/arm/board/rdn1edge/rdn1edge_plat.c
  3. 9
      plat/arm/board/sgi575/sgi575_plat.c
  4. 13
      plat/arm/css/sgi/include/sgi_plat.h
  5. 4
      plat/arm/css/sgi/sgi_bl31_setup.c

8
plat/arm/board/rde1edge/rde1edge_plat.c

@ -1,10 +1,11 @@
/* /*
* Copyright (c) 2018, Arm Limited. All rights reserved. * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <plat/common/platform.h> #include <plat/common/platform.h>
#include <sgi_plat.h>
unsigned int plat_arm_sgi_get_platform_id(void) unsigned int plat_arm_sgi_get_platform_id(void)
{ {
@ -16,3 +17,8 @@ unsigned int plat_arm_sgi_get_config_id(void)
{ {
return mmio_read_32(SID_REG_BASE + SID_SYSTEM_CFG_OFFSET); return mmio_read_32(SID_REG_BASE + SID_SYSTEM_CFG_OFFSET);
} }
void bl31_platform_setup(void)
{
sgi_bl31_common_platform_setup();
}

8
plat/arm/board/rdn1edge/rdn1edge_plat.c

@ -1,10 +1,11 @@
/* /*
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <plat/common/platform.h> #include <plat/common/platform.h>
#include <sgi_plat.h>
unsigned int plat_arm_sgi_get_platform_id(void) unsigned int plat_arm_sgi_get_platform_id(void)
{ {
@ -16,3 +17,8 @@ unsigned int plat_arm_sgi_get_config_id(void)
{ {
return mmio_read_32(SID_REG_BASE + SID_SYSTEM_CFG_OFFSET); return mmio_read_32(SID_REG_BASE + SID_SYSTEM_CFG_OFFSET);
} }
void bl31_platform_setup(void)
{
sgi_bl31_common_platform_setup();
}

9
plat/arm/board/sgi575/sgi575_plat.c

@ -1,11 +1,11 @@
/* /*
* Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <plat/common/platform.h> #include <plat/common/platform.h>
#include <sgi_plat.h>
#include <sgi_variant.h> #include <sgi_variant.h>
unsigned int plat_arm_sgi_get_platform_id(void) unsigned int plat_arm_sgi_get_platform_id(void)
@ -18,3 +18,8 @@ unsigned int plat_arm_sgi_get_config_id(void)
return (mmio_read_32(SSC_VERSION) >> SSC_VERSION_CONFIG_SHIFT) return (mmio_read_32(SSC_VERSION) >> SSC_VERSION_CONFIG_SHIFT)
& SSC_VERSION_CONFIG_MASK; & SSC_VERSION_CONFIG_MASK;
} }
void bl31_platform_setup(void)
{
sgi_bl31_common_platform_setup();
}

13
plat/arm/css/sgi/include/sgi_plat.h

@ -0,0 +1,13 @@
/*
* Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef SGI_PLAT_H
#define SGI_PLAT_H
/* BL31 platform setup common to all SGI based platforms */
void sgi_bl31_common_platform_setup(void);
#endif /* SGI_PLAT_H */

4
plat/arm/css/sgi/sgi_bl31_setup.c

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -55,7 +55,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
arm_bl31_early_platform_setup((void *)arg0, arg1, arg2, (void *)arg3); arm_bl31_early_platform_setup((void *)arg0, arg1, arg2, (void *)arg3);
} }
void bl31_platform_setup(void) void sgi_bl31_common_platform_setup(void)
{ {
arm_bl31_platform_setup(); arm_bl31_platform_setup();

Loading…
Cancel
Save