diff options
Diffstat (limited to 'include/linux/soc')
| -rw-r--r-- | include/linux/soc/qcom/llcc-qcom.h | 180 | ||||
| -rw-r--r-- | include/linux/soc/qcom/mdt_loader.h | 4 | ||||
| -rw-r--r-- | include/linux/soc/renesas/rcar-sysc.h | 13 | ||||
| -rw-r--r-- | include/linux/soc/samsung/exynos-regs-pmu.h | 8 |
4 files changed, 193 insertions, 12 deletions
diff --git a/include/linux/soc/qcom/llcc-qcom.h b/include/linux/soc/qcom/llcc-qcom.h new file mode 100644 index 000000000000..7e3b9c605ab2 --- /dev/null +++ b/include/linux/soc/qcom/llcc-qcom.h | |||
| @@ -0,0 +1,180 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. | ||
| 4 | * | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <linux/platform_device.h> | ||
| 8 | #ifndef __LLCC_QCOM__ | ||
| 9 | #define __LLCC_QCOM__ | ||
| 10 | |||
| 11 | #define LLCC_CPUSS 1 | ||
| 12 | #define LLCC_VIDSC0 2 | ||
| 13 | #define LLCC_VIDSC1 3 | ||
| 14 | #define LLCC_ROTATOR 4 | ||
| 15 | #define LLCC_VOICE 5 | ||
| 16 | #define LLCC_AUDIO 6 | ||
| 17 | #define LLCC_MDMHPGRW 7 | ||
| 18 | #define LLCC_MDM 8 | ||
| 19 | #define LLCC_CMPT 10 | ||
| 20 | #define LLCC_GPUHTW 11 | ||
| 21 | #define LLCC_GPU 12 | ||
| 22 | #define LLCC_MMUHWT 13 | ||
| 23 | #define LLCC_CMPTDMA 15 | ||
| 24 | #define LLCC_DISP 16 | ||
| 25 | #define LLCC_VIDFW 17 | ||
| 26 | #define LLCC_MDMHPFX 20 | ||
| 27 | #define LLCC_MDMPNG 21 | ||
| 28 | #define LLCC_AUDHW 22 | ||
| 29 | |||
| 30 | /** | ||
| 31 | * llcc_slice_desc - Cache slice descriptor | ||
| 32 | * @slice_id: llcc slice id | ||
| 33 | * @slice_size: Size allocated for the llcc slice | ||
| 34 | */ | ||
| 35 | struct llcc_slice_desc { | ||
| 36 | u32 slice_id; | ||
| 37 | size_t slice_size; | ||
| 38 | }; | ||
| 39 | |||
| 40 | /** | ||
| 41 | * llcc_slice_config - Data associated with the llcc slice | ||
| 42 | * @usecase_id: usecase id for which the llcc slice is used | ||
| 43 | * @slice_id: llcc slice id assigned to each slice | ||
| 44 | * @max_cap: maximum capacity of the llcc slice | ||
| 45 | * @priority: priority of the llcc slice | ||
| 46 | * @fixed_size: whether the llcc slice can grow beyond its size | ||
| 47 | * @bonus_ways: bonus ways associated with llcc slice | ||
| 48 | * @res_ways: reserved ways associated with llcc slice | ||
| 49 | * @cache_mode: mode of the llcc slice | ||
| 50 | * @probe_target_ways: Probe only reserved and bonus ways on a cache miss | ||
| 51 | * @dis_cap_alloc: Disable capacity based allocation | ||
| 52 | * @retain_on_pc: Retain through power collapse | ||
| 53 | * @activate_on_init: activate the slice on init | ||
| 54 | */ | ||
| 55 | struct llcc_slice_config { | ||
| 56 | u32 usecase_id; | ||
| 57 | u32 slice_id; | ||
| 58 | u32 max_cap; | ||
| 59 | u32 priority; | ||
| 60 | bool fixed_size; | ||
| 61 | u32 bonus_ways; | ||
| 62 | u32 res_ways; | ||
| 63 | u32 cache_mode; | ||
| 64 | u32 probe_target_ways; | ||
| 65 | bool dis_cap_alloc; | ||
| 66 | bool retain_on_pc; | ||
| 67 | bool activate_on_init; | ||
| 68 | }; | ||
| 69 | |||
| 70 | /** | ||
| 71 | * llcc_drv_data - Data associated with the llcc driver | ||
| 72 | * @regmap: regmap associated with the llcc device | ||
| 73 | * @cfg: pointer to the data structure for slice configuration | ||
| 74 | * @lock: mutex associated with each slice | ||
| 75 | * @cfg_size: size of the config data table | ||
| 76 | * @max_slices: max slices as read from device tree | ||
| 77 | * @bcast_off: Offset of the broadcast bank | ||
| 78 | * @num_banks: Number of llcc banks | ||
| 79 | * @bitmap: Bit map to track the active slice ids | ||
| 80 | * @offsets: Pointer to the bank offsets array | ||
| 81 | */ | ||
| 82 | struct llcc_drv_data { | ||
| 83 | struct regmap *regmap; | ||
| 84 | const struct llcc_slice_config *cfg; | ||
| 85 | struct mutex lock; | ||
| 86 | u32 cfg_size; | ||
| 87 | u32 max_slices; | ||
| 88 | u32 bcast_off; | ||
| 89 | u32 num_banks; | ||
| 90 | unsigned long *bitmap; | ||
| 91 | u32 *offsets; | ||
| 92 | }; | ||
| 93 | |||
| 94 | #if IS_ENABLED(CONFIG_QCOM_LLCC) | ||
| 95 | /** | ||
| 96 | * llcc_slice_getd - get llcc slice descriptor | ||
| 97 | * @uid: usecase_id of the client | ||
| 98 | */ | ||
| 99 | struct llcc_slice_desc *llcc_slice_getd(u32 uid); | ||
| 100 | |||
| 101 | /** | ||
| 102 | * llcc_slice_putd - llcc slice descritpor | ||
| 103 | * @desc: Pointer to llcc slice descriptor | ||
| 104 | */ | ||
| 105 | void llcc_slice_putd(struct llcc_slice_desc *desc); | ||
| 106 | |||
| 107 | /** | ||
| 108 | * llcc_get_slice_id - get slice id | ||
| 109 | * @desc: Pointer to llcc slice descriptor | ||
| 110 | */ | ||
| 111 | int llcc_get_slice_id(struct llcc_slice_desc *desc); | ||
| 112 | |||
| 113 | /** | ||
| 114 | * llcc_get_slice_size - llcc slice size | ||
| 115 | * @desc: Pointer to llcc slice descriptor | ||
| 116 | */ | ||
| 117 | size_t llcc_get_slice_size(struct llcc_slice_desc *desc); | ||
| 118 | |||
| 119 | /** | ||
| 120 | * llcc_slice_activate - Activate the llcc slice | ||
| 121 | * @desc: Pointer to llcc slice descriptor | ||
| 122 | */ | ||
| 123 | int llcc_slice_activate(struct llcc_slice_desc *desc); | ||
| 124 | |||
| 125 | /** | ||
| 126 | * llcc_slice_deactivate - Deactivate the llcc slice | ||
| 127 | * @desc: Pointer to llcc slice descriptor | ||
| 128 | */ | ||
| 129 | int llcc_slice_deactivate(struct llcc_slice_desc *desc); | ||
| 130 | |||
| 131 | /** | ||
| 132 | * qcom_llcc_probe - program the sct table | ||
| 133 | * @pdev: platform device pointer | ||
| 134 | * @table: soc sct table | ||
| 135 | * @sz: Size of the config table | ||
| 136 | */ | ||
| 137 | int qcom_llcc_probe(struct platform_device *pdev, | ||
| 138 | const struct llcc_slice_config *table, u32 sz); | ||
| 139 | #else | ||
| 140 | static inline struct llcc_slice_desc *llcc_slice_getd(u32 uid) | ||
| 141 | { | ||
| 142 | return NULL; | ||
| 143 | } | ||
| 144 | |||
| 145 | static inline void llcc_slice_putd(struct llcc_slice_desc *desc) | ||
| 146 | { | ||
| 147 | |||
| 148 | }; | ||
| 149 | |||
| 150 | static inline int llcc_get_slice_id(struct llcc_slice_desc *desc) | ||
| 151 | { | ||
| 152 | return -EINVAL; | ||
| 153 | } | ||
| 154 | |||
| 155 | static inline size_t llcc_get_slice_size(struct llcc_slice_desc *desc) | ||
| 156 | { | ||
| 157 | return 0; | ||
| 158 | } | ||
| 159 | static inline int llcc_slice_activate(struct llcc_slice_desc *desc) | ||
| 160 | { | ||
| 161 | return -EINVAL; | ||
| 162 | } | ||
| 163 | |||
| 164 | static inline int llcc_slice_deactivate(struct llcc_slice_desc *desc) | ||
| 165 | { | ||
| 166 | return -EINVAL; | ||
| 167 | } | ||
| 168 | static inline int qcom_llcc_probe(struct platform_device *pdev, | ||
| 169 | const struct llcc_slice_config *table, u32 sz) | ||
| 170 | { | ||
| 171 | return -ENODEV; | ||
| 172 | } | ||
| 173 | |||
| 174 | static inline int qcom_llcc_remove(struct platform_device *pdev) | ||
| 175 | { | ||
| 176 | return -ENODEV; | ||
| 177 | } | ||
| 178 | #endif | ||
| 179 | |||
| 180 | #endif | ||
diff --git a/include/linux/soc/qcom/mdt_loader.h b/include/linux/soc/qcom/mdt_loader.h index 5b98bbdabc25..944b06aefb0f 100644 --- a/include/linux/soc/qcom/mdt_loader.h +++ b/include/linux/soc/qcom/mdt_loader.h | |||
| @@ -17,4 +17,8 @@ int qcom_mdt_load(struct device *dev, const struct firmware *fw, | |||
| 17 | phys_addr_t mem_phys, size_t mem_size, | 17 | phys_addr_t mem_phys, size_t mem_size, |
| 18 | phys_addr_t *reloc_base); | 18 | phys_addr_t *reloc_base); |
| 19 | 19 | ||
| 20 | int qcom_mdt_load_no_init(struct device *dev, const struct firmware *fw, | ||
| 21 | const char *fw_name, int pas_id, void *mem_region, | ||
| 22 | phys_addr_t mem_phys, size_t mem_size, | ||
| 23 | phys_addr_t *reloc_base); | ||
| 20 | #endif | 24 | #endif |
diff --git a/include/linux/soc/renesas/rcar-sysc.h b/include/linux/soc/renesas/rcar-sysc.h index 8a6086d2e9c3..00fae6fd234d 100644 --- a/include/linux/soc/renesas/rcar-sysc.h +++ b/include/linux/soc/renesas/rcar-sysc.h | |||
| @@ -2,16 +2,7 @@ | |||
| 2 | #ifndef __LINUX_SOC_RENESAS_RCAR_SYSC_H__ | 2 | #ifndef __LINUX_SOC_RENESAS_RCAR_SYSC_H__ |
| 3 | #define __LINUX_SOC_RENESAS_RCAR_SYSC_H__ | 3 | #define __LINUX_SOC_RENESAS_RCAR_SYSC_H__ |
| 4 | 4 | ||
| 5 | #include <linux/types.h> | 5 | int rcar_sysc_power_down_cpu(unsigned int cpu); |
| 6 | 6 | int rcar_sysc_power_up_cpu(unsigned int cpu); | |
| 7 | struct rcar_sysc_ch { | ||
| 8 | u16 chan_offs; | ||
| 9 | u8 chan_bit; | ||
| 10 | u8 isr_bit; | ||
| 11 | }; | ||
| 12 | |||
| 13 | int rcar_sysc_power_down(const struct rcar_sysc_ch *sysc_ch); | ||
| 14 | int rcar_sysc_power_up(const struct rcar_sysc_ch *sysc_ch); | ||
| 15 | void rcar_sysc_init(phys_addr_t base, u32 syscier); | ||
| 16 | 7 | ||
| 17 | #endif /* __LINUX_SOC_RENESAS_RCAR_SYSC_H__ */ | 8 | #endif /* __LINUX_SOC_RENESAS_RCAR_SYSC_H__ */ |
diff --git a/include/linux/soc/samsung/exynos-regs-pmu.h b/include/linux/soc/samsung/exynos-regs-pmu.h index 66dcb9ec273a..5addaf5ccbce 100644 --- a/include/linux/soc/samsung/exynos-regs-pmu.h +++ b/include/linux/soc/samsung/exynos-regs-pmu.h | |||
| @@ -42,7 +42,9 @@ | |||
| 42 | #define EXYNOS_SWRESET 0x0400 | 42 | #define EXYNOS_SWRESET 0x0400 |
| 43 | 43 | ||
| 44 | #define S5P_WAKEUP_STAT 0x0600 | 44 | #define S5P_WAKEUP_STAT 0x0600 |
| 45 | #define S5P_EINT_WAKEUP_MASK 0x0604 | 45 | /* Value for EXYNOS_EINT_WAKEUP_MASK disabling all external wakeup interrupts */ |
| 46 | #define EXYNOS_EINT_WAKEUP_MASK_DISABLED 0xffffffff | ||
| 47 | #define EXYNOS_EINT_WAKEUP_MASK 0x0604 | ||
| 46 | #define S5P_WAKEUP_MASK 0x0608 | 48 | #define S5P_WAKEUP_MASK 0x0608 |
| 47 | #define S5P_WAKEUP_MASK2 0x0614 | 49 | #define S5P_WAKEUP_MASK2 0x0614 |
| 48 | 50 | ||
| @@ -180,6 +182,9 @@ | |||
| 180 | #define S5P_CORE_WAKEUP_FROM_LOCAL_CFG (0x3 << 8) | 182 | #define S5P_CORE_WAKEUP_FROM_LOCAL_CFG (0x3 << 8) |
| 181 | #define S5P_CORE_AUTOWAKEUP_EN (1 << 31) | 183 | #define S5P_CORE_AUTOWAKEUP_EN (1 << 31) |
| 182 | 184 | ||
| 185 | /* Only for S5Pv210 */ | ||
| 186 | #define S5PV210_EINT_WAKEUP_MASK 0xC004 | ||
| 187 | |||
| 183 | /* Only for EXYNOS4210 */ | 188 | /* Only for EXYNOS4210 */ |
| 184 | #define S5P_CMU_CLKSTOP_LCD1_LOWPWR 0x1154 | 189 | #define S5P_CMU_CLKSTOP_LCD1_LOWPWR 0x1154 |
| 185 | #define S5P_CMU_RESET_LCD1_LOWPWR 0x1174 | 190 | #define S5P_CMU_RESET_LCD1_LOWPWR 0x1174 |
| @@ -641,6 +646,7 @@ | |||
| 641 | | EXYNOS5420_KFC_USE_STANDBY_WFI3) | 646 | | EXYNOS5420_KFC_USE_STANDBY_WFI3) |
| 642 | 647 | ||
| 643 | /* For EXYNOS5433 */ | 648 | /* For EXYNOS5433 */ |
| 649 | #define EXYNOS5433_EINT_WAKEUP_MASK (0x060C) | ||
| 644 | #define EXYNOS5433_USBHOST30_PHY_CONTROL (0x0728) | 650 | #define EXYNOS5433_USBHOST30_PHY_CONTROL (0x0728) |
| 645 | #define EXYNOS5433_PAD_RETENTION_AUD_OPTION (0x3028) | 651 | #define EXYNOS5433_PAD_RETENTION_AUD_OPTION (0x3028) |
| 646 | #define EXYNOS5433_PAD_RETENTION_MMC2_OPTION (0x30C8) | 652 | #define EXYNOS5433_PAD_RETENTION_MMC2_OPTION (0x30C8) |
