Tegra: Move common clock code to arch/arm/cpu/tegra-common/clock.c
Subsystems (2)
PATCH 1/1 Tegra: Move common clock code to arch/arm/cpu/tegra-common/clock.c
This 'commonizes' much of the clock/pll code. SoC-dependent code and tables are left in arch/cpu/tegraXXX-common/clock.c
Some T30 tables needed whitespace fixes due to checkpatch complaints.
--- arch/arm/cpu/tegra-common/Makefile | 2 +- arch/arm/cpu/tegra-common/clock.c | 560 +++++++++++++++++ arch/arm/cpu/tegra20-common/clock.c | 605 +------------------ arch/arm/cpu/tegra30-common/clock.c | 712 ++++------------------ arch/arm/include/asm/arch-tegra/clock.h | 59 ++- arch/arm/include/asm/arch-tegra20/clock-tables.h | 4 + arch/arm/include/asm/arch-tegra20/tegra.h | 2 + arch/arm/include/asm/arch-tegra30/tegra.h | 2 + 8 files changed, 760 insertions(+), 1186 deletions(-) create mode 100644 arch/arm/cpu/tegra-common/clock.c
arch/arm/cpu/tegra-common/Makefile +1 -1
@@ -28,7 +28,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)libcputegra-common.o SOBJS += lowlevel_init.o -COBJS-y += ap.o board.o sys_info.o timer.o +COBJS-y += ap.o board.o sys_info.o timer.o clock.o SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
arch/arm/cpu/tegra-common/clock.c new file +560 -0
560 lines not on this page · raw message
arch/arm/cpu/tegra20-common/clock.c +20 -585
688 lines not on this page · raw message
arch/arm/cpu/tegra30-common/clock.c +114 -598
883 lines not on this page · raw message
arch/arm/include/asm/arch-tegra/clock.h +57 -2
68 lines not on this page · raw message
arch/arm/include/asm/arch-tegra20/clock-tables.h +4 -0
@@ -193,4 +193,8 @@ enum pll_out_id {#define clock_id_is_pll (id) ((id) >= CLOCK_ID_FIRST && \ (id) < CLOCK_ID_FIRST_SIMPLE) +/* return 1 if a peripheral ID is in range */ +#define clock_periph_id_isvalid (id) ((id) >= PERIPH_ID_FIRST && \ + (id) < PERIPH_ID_COUNT) +#endif /* _CLOCK_TABLES_H_ */
arch/arm/include/asm/arch-tegra20/tegra.h +2 -0
@@ -33,4 +33,6 @@#define BCT_ODMDATA_OFFSET 4068/* 12 bytes from end of BCT */ +#define MAX_NUM_CPU 2 +#endif /* TEGRA20_H */
arch/arm/include/asm/arch-tegra30/tegra.h +2 -0
@@ -23,4 +23,6 @@#define BCT_ODMDATA_OFFSET 6116/* 12 bytes from end of BCT */ +#define MAX_NUM_CPU 4 +#endif /* TEGRA30_H */
Signature · 1 line
1.7.0.4
PATCH 1/1 Tegra: Move common clock code to arch/arm/cpu/tegra-common/clock.c
Quoted 2 lines · Tom Warren
This 'commonizes' much of the clock/pll code. SoC-dependent code and tables are left in
arch/cpu/tegraXXX-common/clock.c
I think this looks OK, although the changes to the clk ID -> periph ID mapping and validation functions and whitespace threw me initially,
Quoted 1 line
Some T30 tables needed whitespace fixes due to checkpatch complaints.
Aha, that explains it.
PATCH 1/1 Tegra: Move common clock code to arch/arm/cpu/tegra-common/clock.c
In reply to Tom WarrenQuoted 6 lines · Tom Warren
This 'commonizes' much of the clock/pll code. SoC-dependent code and tables are left in
arch/cpu/tegraXXX-common/clock.cSome T30 tables needed whitespace fixes due to checkpatch complaints.
Signed-off-by Tom Warren <[email protected]>
Tom this is a big improvement, thank you.
Quoted 12 lines
--- arch/arm/cpu/tegra-common/Makefile | 2 +- arch/arm/cpu/tegra-common/clock.c | 560 +++++++++++++++++ arch/arm/cpu/tegra20-common/clock.c | 605 +------------------ arch/arm/cpu/tegra30-common/clock.c | 712 ++++------------------ arch/arm/include/asm/arch-tegra/clock.h | 59 ++- arch/arm/include/asm/arch-tegra20/clock-tables.h | 4 + arch/arm/include/asm/arch-tegra20/tegra.h | 2 + arch/arm/include/asm/arch-tegra30/tegra.h | 2 + 8 files changed, 760 insertions(+), 1186 deletions(-) create mode 100644 arch/arm/cpu/tegra-common/clock.c