mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 01:24:27 +00:00
Merge changes from topic "add_s32cc_clk_skeleton" into integration
* changes: feat(s32g274a): use s32cc clock driver feat(nxp-drivers): add clock skeleton for s32cc
This commit is contained in:
commit
c4d9fbec5e
6 changed files with 80 additions and 0 deletions
|
@ -1146,6 +1146,9 @@ subsections:
|
|||
- title: TRDC
|
||||
scope: imx-trdc
|
||||
|
||||
- title: Clock
|
||||
scope: nxp-clk
|
||||
|
||||
- title: Renesas
|
||||
scope: renesas-drivers
|
||||
|
||||
|
|
|
@ -767,6 +767,7 @@ NXP SoC Part S32G274A and its platform port
|
|||
:|M|: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
|
||||
:|G|: `gprocopciucnxp`_
|
||||
:|F|: docs/plat/s32g274a.rst
|
||||
:|F|: drivers/nxp/clk/s32cc
|
||||
:|F|: drivers/nxp/console/linflex_console.S
|
||||
:|F|: include/drivers/nxp/console/linflex.h
|
||||
:|F|: plat/nxp/s32
|
||||
|
|
12
drivers/nxp/clk/s32cc/s32cc_clk.mk
Normal file
12
drivers/nxp/clk/s32cc/s32cc_clk.mk
Normal file
|
@ -0,0 +1,12 @@
|
|||
#
|
||||
# Copyright 2024 NXP
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
CLK_SOURCES := \
|
||||
${PLAT_DRIVERS_PATH}/clk/s32cc/s32cc_clk_drv.c \
|
||||
|
||||
ifeq (${BL_COMM_CLK_NEEDED},yes)
|
||||
BL2_SOURCES += ${CLK_SOURCES}
|
||||
endif
|
59
drivers/nxp/clk/s32cc/s32cc_clk_drv.c
Normal file
59
drivers/nxp/clk/s32cc/s32cc_clk_drv.c
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright 2024 NXP
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
#include <errno.h>
|
||||
|
||||
#include <drivers/clk.h>
|
||||
|
||||
static int s32cc_clk_enable(unsigned long id)
|
||||
{
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
static void s32cc_clk_disable(unsigned long id)
|
||||
{
|
||||
}
|
||||
|
||||
static bool s32cc_clk_is_enabled(unsigned long id)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static unsigned long s32cc_clk_get_rate(unsigned long id)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int s32cc_clk_set_rate(unsigned long id, unsigned long rate,
|
||||
unsigned long *orate)
|
||||
{
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
static int s32cc_clk_get_parent(unsigned long id)
|
||||
{
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
static int s32cc_clk_set_parent(unsigned long id, unsigned long parent_id)
|
||||
{
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
void s32cc_clk_register_drv(void)
|
||||
{
|
||||
static const struct clk_ops s32cc_clk_ops = {
|
||||
.enable = s32cc_clk_enable,
|
||||
.disable = s32cc_clk_disable,
|
||||
.is_enabled = s32cc_clk_is_enabled,
|
||||
.get_rate = s32cc_clk_get_rate,
|
||||
.set_rate = s32cc_clk_set_rate,
|
||||
.get_parent = s32cc_clk_get_parent,
|
||||
.set_parent = s32cc_clk_set_parent,
|
||||
};
|
||||
|
||||
clk_register(&s32cc_clk_ops);
|
||||
}
|
||||
|
|
@ -97,3 +97,7 @@ endif
|
|||
ifeq (${IFC_NAND_NEEDED},yes)
|
||||
include ${PLAT_DRIVERS_PATH}/ifc/nand/ifc_nand.mk
|
||||
endif
|
||||
|
||||
ifeq (${CLK_NEEDED},yes)
|
||||
include ${PLAT_DRIVERS_PATH}/clk/s32cc/s32cc_clk.mk
|
||||
endif
|
||||
|
|
|
@ -35,6 +35,7 @@ ERRATA_SPECULATIVE_AT := 1
|
|||
|
||||
# Selecting Drivers for SoC
|
||||
$(eval $(call SET_NXP_MAKE_FLAG,CONSOLE_NEEDED,BL_COMM))
|
||||
$(eval $(call SET_NXP_MAKE_FLAG,CLK_NEEDED,BL_COMM))
|
||||
|
||||
include ${PLAT_DRIVERS_PATH}/drivers.mk
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue