Merge "refactor(stm32mp_clk): keep RCC node offset" into integration

This commit is contained in:
Mark Dykes 2021-10-14 22:55:48 +02:00 committed by TrustedFirmware Code Review
commit 34ddd83bc8
1 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2020, STMicroelectronics - All Rights Reserved
* Copyright (c) 2017-2021, STMicroelectronics - All Rights Reserved
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -163,7 +163,13 @@ uint32_t fdt_osc_read_uint32_default(enum stm32mp_osc_id osc_id,
*/
static int fdt_get_rcc_node(void *fdt)
{
return fdt_node_offset_by_compatible(fdt, -1, DT_RCC_CLK_COMPAT);
static int node;
if (node <= 0) {
node = fdt_node_offset_by_compatible(fdt, -1, DT_RCC_CLK_COMPAT);
}
return node;
}
/*