aboutsummaryrefslogtreecommitdiff
path: root/drivers/renesas/rcar/common.c
diff options
context:
space:
mode:
authorBiju Das <biju.das.jz@bp.renesas.com>2020-12-13 20:17:01 +0000
committerBiju Das <biju.das.jz@bp.renesas.com>2021-01-11 11:58:04 +0000
commit95e1166e8d176f2530cfcc22a1f7b47a6e6ade21 (patch)
tree85343f4839fc047d6956ad160e124b3efc781a17 /drivers/renesas/rcar/common.c
parent041c581e2ad05b83fb4dc6a75ce0fbdb3c6953c4 (diff)
downloadtrusted-firmware-a-95e1166e8d176f2530cfcc22a1f7b47a6e6ade21.tar.gz
drivers: renesas: rcar: common: Code cleanup
This patch fixes the below checkpatch warnings Line 13: WARNING: please, no spaces at the start of a line Line 15: WARNING: please, no spaces at the start of a line Line 18: WARNING: Missing a blank line after declarations Line 24: WARNING: please, no spaces at the start of a line Line 26: WARNING: please, no spaces at the start of a line Line 29: WARNING: Missing a blank line after declarations Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Change-Id: I41d146e86889640d11e88c0717039353ddceff0d
Diffstat (limited to 'drivers/renesas/rcar/common.c')
-rw-r--r--drivers/renesas/rcar/common.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/renesas/rcar/common.c b/drivers/renesas/rcar/common.c
index 42bdce5797..9b7c1eb16c 100644
--- a/drivers/renesas/rcar/common.c
+++ b/drivers/renesas/rcar/common.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Renesas Electronics Corporation. All rights reserved.
+ * Copyright (c) 2018-2020, Renesas Electronics Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -8,24 +8,27 @@
#include "rcar_private.h"
-void
#if IMAGE_BL31
- __attribute__ ((section(".system_ram")))
+void __attribute__ ((section(".system_ram"))) cpg_write(uintptr_t regadr, uint32_t regval)
+#else
+void cpg_write(uintptr_t regadr, uint32_t regval)
#endif
- cpg_write(uintptr_t regadr, uint32_t regval)
{
- uint32_t value = (regval);
+ uint32_t value = regval;
+
mmio_write_32((uintptr_t) RCAR_CPGWPR, ~value);
mmio_write_32(regadr, value);
}
-void
#if IMAGE_BL31
- __attribute__ ((section(".system_ram")))
+void __attribute__ ((section(".system_ram"))) mstpcr_write(uint32_t mstpcr, uint32_t mstpsr,
+ uint32_t target_bit)
+#else
+void mstpcr_write(uint32_t mstpcr, uint32_t mstpsr, uint32_t target_bit)
#endif
- mstpcr_write(uint32_t mstpcr, uint32_t mstpsr, uint32_t target_bit)
{
uint32_t reg;
+
reg = mmio_read_32(mstpcr);
reg &= ~target_bit;
cpg_write(mstpcr, reg);