aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorCaleb Connolly2023-11-07 12:41:03 +0000
committerCaleb Connolly2024-01-16 12:26:24 +0000
commit37ea1343ac92e614d40279273e35920a4827c310 (patch)
treecfd44739bba6bc6f7e8ecd61ba97e42ae9132104 /arch
parent0e7fec02ce49556da2f045a8d04c69f2ae9fbd93 (diff)
clk/qcom: use function pointers for enable and set_rate
Currently, it isn't possible to build clock drivers for more than one platform due to how the msm_enable() and msm_set_rate() callbacks are implemented. Extend qcom_clk_data to include function pointers for these and convert all platforms to use them. Previously, clock drivers relied on include/configs/<board.h> to include the board specific sysmap header, however as most of the header contents are clock driver related, import the contents directly into each clock driver and remove the header. The only exception here is the dragonboard820c board file which includes some pinctrl macros, those are also inlined. Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> [caleb: remove additional sysmap-sdm845.h mention]
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-snapdragon/include/mach/sysmap-apq8016.h39
-rw-r--r--arch/arm/mach-snapdragon/include/mach/sysmap-apq8096.h37
-rw-r--r--arch/arm/mach-snapdragon/include/mach/sysmap-qcs404.h88
-rw-r--r--arch/arm/mach-snapdragon/include/mach/sysmap-sdm845.h42
4 files changed, 0 insertions, 206 deletions
diff --git a/arch/arm/mach-snapdragon/include/mach/sysmap-apq8016.h b/arch/arm/mach-snapdragon/include/mach/sysmap-apq8016.h
deleted file mode 100644
index d9a3b1af986..00000000000
--- a/arch/arm/mach-snapdragon/include/mach/sysmap-apq8016.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Qualcomm APQ8916 sysmap
- *
- * (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
- */
-#ifndef _MACH_SYSMAP_APQ8016_H
-#define _MACH_SYSMAP_APQ8016_H
-
-#define GICD_BASE (0x0b000000)
-#define GICC_BASE (0x0b002000)
-
-/* Clocks: (from CLK_CTL_BASE) */
-#define GPLL0_STATUS (0x2101C)
-#define APCS_GPLL_ENA_VOTE (0x45000)
-#define APCS_CLOCK_BRANCH_ENA_VOTE (0x45004)
-
-#define SDCC_BCR(n) ((n * 0x1000) + 0x41000)
-#define SDCC_CMD_RCGR(n) ((n * 0x1000) + 0x41004)
-#define SDCC_CFG_RCGR(n) ((n * 0x1000) + 0x41008)
-#define SDCC_M(n) ((n * 0x1000) + 0x4100C)
-#define SDCC_N(n) ((n * 0x1000) + 0x41010)
-#define SDCC_D(n) ((n * 0x1000) + 0x41014)
-#define SDCC_APPS_CBCR(n) ((n * 0x1000) + 0x41018)
-#define SDCC_AHB_CBCR(n) ((n * 0x1000) + 0x4101C)
-
-/* BLSP1 AHB clock (root clock for BLSP) */
-#define BLSP1_AHB_CBCR 0x1008
-
-/* Uart clock control registers */
-#define BLSP1_UART2_BCR (0x3028)
-#define BLSP1_UART2_APPS_CBCR (0x302C)
-#define BLSP1_UART2_APPS_CMD_RCGR (0x3034)
-#define BLSP1_UART2_APPS_CFG_RCGR (0x3038)
-#define BLSP1_UART2_APPS_M (0x303C)
-#define BLSP1_UART2_APPS_N (0x3040)
-#define BLSP1_UART2_APPS_D (0x3044)
-
-#endif
diff --git a/arch/arm/mach-snapdragon/include/mach/sysmap-apq8096.h b/arch/arm/mach-snapdragon/include/mach/sysmap-apq8096.h
deleted file mode 100644
index 36a902bd929..00000000000
--- a/arch/arm/mach-snapdragon/include/mach/sysmap-apq8096.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Qualcomm APQ8096 sysmap
- *
- * (C) Copyright 2017 Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
- */
-#ifndef _MACH_SYSMAP_APQ8096_H
-#define _MACH_SYSMAP_APQ8096_H
-
-#define TLMM_BASE_ADDR (0x1010000)
-
-/* Strength (sdc1) */
-#define SDC1_HDRV_PULL_CTL_REG (TLMM_BASE_ADDR + 0x0012D000)
-
-/* Clocks: (from CLK_CTL_BASE) */
-#define GPLL0_STATUS (0x0000)
-#define APCS_GPLL_ENA_VOTE (0x52000)
-#define APCS_CLOCK_BRANCH_ENA_VOTE (0x52004)
-
-#define SDCC2_BCR (0x14000) /* block reset */
-#define SDCC2_APPS_CBCR (0x14004) /* branch control */
-#define SDCC2_AHB_CBCR (0x14008)
-#define SDCC2_CMD_RCGR (0x14010)
-#define SDCC2_CFG_RCGR (0x14014)
-#define SDCC2_M (0x14018)
-#define SDCC2_N (0x1401C)
-#define SDCC2_D (0x14020)
-
-#define BLSP2_AHB_CBCR (0x25004)
-#define BLSP2_UART2_APPS_CBCR (0x29004)
-#define BLSP2_UART2_APPS_CMD_RCGR (0x2900C)
-#define BLSP2_UART2_APPS_CFG_RCGR (0x29010)
-#define BLSP2_UART2_APPS_M (0x29014)
-#define BLSP2_UART2_APPS_N (0x29018)
-#define BLSP2_UART2_APPS_D (0x2901C)
-
-#endif
diff --git a/arch/arm/mach-snapdragon/include/mach/sysmap-qcs404.h b/arch/arm/mach-snapdragon/include/mach/sysmap-qcs404.h
deleted file mode 100644
index 5768fb13775..00000000000
--- a/arch/arm/mach-snapdragon/include/mach/sysmap-qcs404.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Qualcomm QCS404 sysmap
- *
- * (C) Copyright 2022 Sumit Garg <sumit.garg@linaro.org>
- */
-#ifndef _MACH_SYSMAP_QCS404_H
-#define _MACH_SYSMAP_QCS404_H
-
-#define GICD_BASE (0x0b000000)
-#define GICC_BASE (0x0b002000)
-
-/* Clocks: (from CLK_CTL_BASE) */
-#define GPLL0_STATUS (0x21000)
-#define GPLL1_STATUS (0x20000)
-#define APCS_GPLL_ENA_VOTE (0x45000)
-#define APCS_CLOCK_BRANCH_ENA_VOTE (0x45004)
-
-/* BLSP1 AHB clock (root clock for BLSP) */
-#define BLSP1_AHB_CBCR 0x1008
-
-/* Uart clock control registers */
-#define BLSP1_UART2_BCR (0x3028)
-#define BLSP1_UART2_APPS_CBCR (0x302C)
-#define BLSP1_UART2_APPS_CMD_RCGR (0x3034)
-#define BLSP1_UART2_APPS_CFG_RCGR (0x3038)
-#define BLSP1_UART2_APPS_M (0x303C)
-#define BLSP1_UART2_APPS_N (0x3040)
-#define BLSP1_UART2_APPS_D (0x3044)
-
-/* I2C controller clock control registerss */
-#define BLSP1_QUP0_I2C_APPS_CBCR (0x6028)
-#define BLSP1_QUP0_I2C_APPS_CMD_RCGR (0x602C)
-#define BLSP1_QUP0_I2C_APPS_CFG_RCGR (0x6030)
-#define BLSP1_QUP1_I2C_APPS_CBCR (0x2008)
-#define BLSP1_QUP1_I2C_APPS_CMD_RCGR (0x200C)
-#define BLSP1_QUP1_I2C_APPS_CFG_RCGR (0x2010)
-#define BLSP1_QUP2_I2C_APPS_CBCR (0x3010)
-#define BLSP1_QUP2_I2C_APPS_CMD_RCGR (0x3000)
-#define BLSP1_QUP2_I2C_APPS_CFG_RCGR (0x3004)
-#define BLSP1_QUP3_I2C_APPS_CBCR (0x4020)
-#define BLSP1_QUP3_I2C_APPS_CMD_RCGR (0x4000)
-#define BLSP1_QUP3_I2C_APPS_CFG_RCGR (0x4004)
-#define BLSP1_QUP4_I2C_APPS_CBCR (0x5020)
-#define BLSP1_QUP4_I2C_APPS_CMD_RCGR (0x5000)
-#define BLSP1_QUP4_I2C_APPS_CFG_RCGR (0x5004)
-
-/* SD controller clock control registers */
-#define SDCC_BCR(n) (((n) * 0x1000) + 0x41000)
-#define SDCC_CMD_RCGR(n) (((n) * 0x1000) + 0x41004)
-#define SDCC_CFG_RCGR(n) (((n) * 0x1000) + 0x41008)
-#define SDCC_M(n) (((n) * 0x1000) + 0x4100C)
-#define SDCC_N(n) (((n) * 0x1000) + 0x41010)
-#define SDCC_D(n) (((n) * 0x1000) + 0x41014)
-#define SDCC_APPS_CBCR(n) (((n) * 0x1000) + 0x41018)
-#define SDCC_AHB_CBCR(n) (((n) * 0x1000) + 0x4101C)
-
-/* USB-3.0 controller clock control registers */
-#define SYS_NOC_USB3_CBCR (0x26014)
-#define USB30_BCR (0x39000)
-#define USB3PHY_BCR (0x39008)
-#define USB30_MASTER_CBCR (0x3900C)
-#define USB30_SLEEP_CBCR (0x39010)
-#define USB30_MOCK_UTMI_CBCR (0x39014)
-#define USB30_MOCK_UTMI_CMD_RCGR (0x3901C)
-#define USB30_MOCK_UTMI_CFG_RCGR (0x39020)
-#define USB30_MASTER_CMD_RCGR (0x39028)
-#define USB30_MASTER_CFG_RCGR (0x3902C)
-#define USB30_MASTER_M (0x39030)
-#define USB30_MASTER_N (0x39034)
-#define USB30_MASTER_D (0x39038)
-#define USB2A_PHY_SLEEP_CBCR (0x4102C)
-#define USB_HS_PHY_CFG_AHB_CBCR (0x41030)
-
-/* ETH controller clock control registers */
-#define ETH_PTP_CBCR (0x4e004)
-#define ETH_RGMII_CBCR (0x4e008)
-#define ETH_SLAVE_AHB_CBCR (0x4e00c)
-#define ETH_AXI_CBCR (0x4e010)
-#define EMAC_PTP_CMD_RCGR (0x4e014)
-#define EMAC_PTP_CFG_RCGR (0x4e018)
-#define EMAC_CMD_RCGR (0x4e01c)
-#define EMAC_CFG_RCGR (0x4e020)
-#define EMAC_M (0x4e024)
-#define EMAC_N (0x4e028)
-#define EMAC_D (0x4e02c)
-
-#endif
diff --git a/arch/arm/mach-snapdragon/include/mach/sysmap-sdm845.h b/arch/arm/mach-snapdragon/include/mach/sysmap-sdm845.h
deleted file mode 100644
index 7165985bcd1..00000000000
--- a/arch/arm/mach-snapdragon/include/mach/sysmap-sdm845.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Qualcomm SDM845 sysmap
- *
- * (C) Copyright 2021 Dzmitry Sankouski <dsankouski@gmail.com>
- */
-#ifndef _MACH_SYSMAP_SDM845_H
-#define _MACH_SYSMAP_SDM845_H
-
-#define TLMM_BASE_ADDR (0x1010000)
-
-/* Strength (sdc1) */
-#define SDC1_HDRV_PULL_CTL_REG (TLMM_BASE_ADDR + 0x0012D000)
-
-/* Clocks: (from CLK_CTL_BASE) */
-#define GPLL0_STATUS (0x0000)
-#define APCS_GPLL_ENA_VOTE (0x52000)
-#define APCS_CLOCK_BRANCH_ENA_VOTE (0x52004)
-
-#define SDCC2_BCR (0x14000) /* block reset */
-#define SDCC2_APPS_CBCR (0x14004) /* branch control */
-#define SDCC2_AHB_CBCR (0x14008)
-#define SDCC2_CMD_RCGR (0x1400c)
-#define SDCC2_CFG_RCGR (0x14010)
-#define SDCC2_M (0x14014)
-#define SDCC2_N (0x14018)
-#define SDCC2_D (0x1401C)
-
-#define RCG2_CFG_REG 0x4
-#define M_REG 0x8
-#define N_REG 0xc
-#define D_REG 0x10
-
-#define SE9_AHB_CBCR (0x25004)
-#define SE9_UART_APPS_CBCR (0x29004)
-#define SE9_UART_APPS_CMD_RCGR (0x18148)
-#define SE9_UART_APPS_CFG_RCGR (0x1814C)
-#define SE9_UART_APPS_M (0x18150)
-#define SE9_UART_APPS_N (0x18154)
-#define SE9_UART_APPS_D (0x18158)
-
-#endif