Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/nxp In preparation of imx6sx support, move imx6...



details:   https://anonhg.NetBSD.org/src/rev/417c0ed05cbf
branches:  trunk
changeset: 374253:417c0ed05cbf
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Fri Apr 14 17:45:59 2023 +0000

description:
In preparation of imx6sx support, move imx6q-specific definitions from
imx6_ccm.c to imx6_clk.c, and prefix with IMX6Q/imx6q:
- Clock IDs and related struct imx_clock_id
- Clock Parents and Divider Tables
- struct imx6_clk
and related static functions

Add a pointer to struct imx6_clk, and it's size to imx6ccm_softc
Pass a pointer to imx6ccm_softc to all functions from imx6_ccm.c

NFCI

diffstat:

 sys/arch/arm/nxp/imx6_ccm.c    |   908 +-----------------------------
 sys/arch/arm/nxp/imx6_ccmvar.h |   276 +---------
 sys/arch/arm/nxp/imx6_clk.c    |  1184 +++++++++++++++++++++++++++++++++++++++-
 3 files changed, 1191 insertions(+), 1177 deletions(-)

diffs (truncated from 2600 to 300 lines):

diff -r 6ddf89e894e6 -r 417c0ed05cbf sys/arch/arm/nxp/imx6_ccm.c
--- a/sys/arch/arm/nxp/imx6_ccm.c       Fri Apr 14 16:53:13 2023 +0000
+++ b/sys/arch/arm/nxp/imx6_ccm.c       Fri Apr 14 17:45:59 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: imx6_ccm.c,v 1.2 2022/09/27 06:36:42 skrll Exp $       */
+/*     $NetBSD: imx6_ccm.c,v 1.3 2023/04/14 17:45:59 bouyer Exp $      */
 
 /*
  * Copyright (c) 2010-2012, 2014  Genetec Corporation.  All rights reserved.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imx6_ccm.c,v 1.2 2022/09/27 06:36:42 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_ccm.c,v 1.3 2023/04/14 17:45:59 bouyer Exp $");
 
 #include "opt_imx.h"
 #include "opt_cputypes.h"
@@ -52,844 +52,6 @@
 
 #include <dev/clk/clk_backend.h>
 
-/* Clock Parents Tables */
-static const char *step_p[] = {
-       "osc",
-       "pll2_pfd2_396m"
-};
-
-static const char *pll1_sw_p[] = {
-       "pll1_sys",
-       "step"
-};
-
-static const char *periph_pre_p[] = {
-       "pll2_bus",
-       "pll2_pfd2_396m",
-       "pll2_pfd0_352m",
-       "pll2_198m"
-};
-
-static const char *periph_clk2_p[] = {
-       "pll3_usb_otg",
-       "osc",
-       "osc",
-       "dummy"
-};
-
-static const char *periph2_clk2_p[] = {
-       "pll3_usb_otg",
-       "pll2_bus"
-};
-
-static const char *axi_p[] = {
-       "periph",
-       "pll2_pfd2_396m",
-       "periph",
-       "pll3_pfd1_540m"
-};
-
-static const char *audio_p[] = {
-       "pll4_audio_div",
-       "pll3_pfd2_508m",
-       "pll3_pfd3_454m",
-       "pll3_usb_otg"
-};
-
-static const char *gpu2d_core_p[] = {
-       "axi",
-       "pll3_usb_otg",
-       "pll2_pfd0_352m",
-       "pll2_pfd2_396m"
-};
-
-static const char *gpu3d_core_p[] = {
-       "mmdc_ch0_axi",
-       "pll3_usb_otg",
-       "pll2_pfd1_594m",
-       "pll2_pfd2_396m"
-};
-
-static const char *gpu3d_shader_p[] = {
-       "mmdc_ch0_axi",
-       "pll3_usb_otg",
-       "pll2_pfd1_594m",
-       "pll3_pfd0_720m"
-};
-
-static const char *ipu_p[] = {
-       "mmdc_ch0_axi",
-       "pll2_pfd2_396m",
-       "pll3_120m",
-       "pll3_pfd1_540m"
-};
-
-static const char *pll_bypass_src_p[] = {
-       "osc",
-       "lvds1_in",
-       "lvds2_in",
-       "dummy"
-};
-
-static const char *pll1_bypass_p[] = {
-       "pll1",
-       "pll1_bypass_src"
-};
-
-static const char *pll2_bypass_p[] = {
-       "pll2",
-       "pll2_bypass_src"
-};
-
-static const char *pll3_bypass_p[] = {
-       "pll3",
-       "pll3_bypass_src"
-};
-
-static const char *pll4_bypass_p[] = {
-       "pll4",
-       "pll4_bypass_src"
-};
-
-static const char *pll5_bypass_p[] = {
-       "pll5",
-       "pll5_bypass_src"
-};
-
-static const char *pll6_bypass_p[] = {
-       "pll6",
-       "pll6_bypass_src"
-};
-
-static const char *pll7_bypass_p[] = {
-       "pll7",
-       "pll7_bypass_src"
-};
-
-static const char *ipu_di_pre_p[] = {
-       "mmdc_ch0_axi",
-       "pll3_usb_otg",
-       "pll5_video_div",
-       "pll2_pfd0_352m",
-       "pll2_pfd2_396m",
-       "pll3_pfd1_540m"
-};
-
-static const char *ipu1_di0_p[] = {
-       "ipu1_di0_pre",
-       "dummy",
-       "dummy",
-       "ldb_di0",
-       "ldb_di1"
-};
-
-static const char *ipu1_di1_p[] = {
-       "ipu1_di1_pre",
-       "dummy",
-       "dummy",
-       "ldb_di0",
-       "ldb_di1"
-};
-
-static const char *ipu2_di0_p[] = {
-       "ipu2_di0_pre",
-       "dummy",
-       "dummy",
-       "ldb_di0",
-       "ldb_di1"
-};
-
-static const char *ipu2_di1_p[] = {
-       "ipu2_di1_pre",
-       "dummy",
-       "dummy",
-       "ldb_di0",
-       "ldb_di1"
-};
-
-static const char *ldb_di_p[] = {
-       "pll5_video_div",
-       "pll2_pfd0_352m",
-       "pll2_pfd2_396m",
-       "mmdc_ch1_axi",
-       "pll3_usb_otg"
-};
-
-static const char *periph_p[] = {
-       "periph_pre",
-       "periph_clk2"
-};
-
-static const char *periph2_p[] = {
-       "periph2_pre",
-       "periph2_clk2"
-};
-
-static const char *vdo_axi_p[] = {
-       "axi",
-       "ahb"
-};
-
-static const char *vpu_axi_p[] = {
-       "axi",
-       "pll2_pfd2_396m",
-       "pll2_pfd0_352m"
-};
-
-static const char *cko1_p[] = {
-       "pll3_usb_otg",
-       "pll2_bus",
-       "pll1_sys",
-       "pll5_video_div",
-       "dummy",
-       "axi",
-       "enfc",
-       "ipu1_di0",
-       "ipu1_di1",
-       "ipu2_di0",
-       "ipu2_di1",
-       "ahb",
-       "ipg",
-       "ipg_per",
-       "ckil",
-       "pll4_audio_div"
-};
-
-static const char *cko2_p[] = {
-       "mmdc_ch0_axi",
-       "mmdc_ch1_axi",
-       "usdhc4",
-       "usdhc1",
-       "gpu2d_axi",
-       "dummy",
-       "ecspi_root",
-       "gpu3d_axi",
-       "usdhc3",
-       "dummy",
-       "arm",
-       "ipu1",
-       "ipu2",
-       "vdo_axi",
-       "osc",
-       "gpu2d_core",
-       "gpu3d_core",
-       "usdhc2",
-       "ssi1",
-       "ssi2",
-       "ssi3",
-       "gpu3d_shader",
-       "vpu_axi",
-       "can_root",
-       "ldb_di0",
-       "ldb_di1",
-       "esai_extal",
-       "eim_slow",
-       "uart_serial",
-       "spdif",
-       "asrc",
-       "hsi_tx"
-};
-
-static const char *cko_p[] = {
-       "cko1",
-       "cko2"
-};
-
-static const char *hsi_tx_p[] = {
-       "pll3_120m",
-       "pll2_pfd2_396m"
-};
-
-static const char *pcie_axi_p[] = {
-       "axi",
-       "ahb"
-};
-
-static const char *ssi_p[] = {
-       "pll3_pfd2_508m",
-       "pll3_pfd3_454m",
-       "pll4_audio_div"
-};
-
-static const char *usdhc_p[] = {
-       "pll2_pfd2_396m",
-       "pll2_pfd0_352m"
-};
-
-static const char *eim_p[] = {
-       "pll2_pfd2_396m",
-       "pll3_usb_otg",
-       "axi",
-       "pll2_pfd0_352m"
-};
-
-static const char *eim_slow_p[] = {
-       "axi",
-       "pll3_usb_otg",
-       "pll2_pfd2_396m",
-       "pll2_pfd0_352m"
-};
-



Home | Main Index | Thread Index | Old Index