Merge tag 'mailbox-v6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox

Pull mailbox updates from Jassi Brar:
"Core:
- misc rejig of header includes
- minor const fixes

Misc:
- constify amba_id table

pcc:
- cleanup and refactoring of shmem and irq handling

qcom:
- add MSM8226 compatible

fsl,mu:
- add i.MX94 compatible

mediatek:
- remove cl in struct cmdq_pkt

tegra:
- define dimensioning masks in SoC data"

* tag 'mailbox-v6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox: (25 commits)
mailbox: Remove unneeded semicolon
mailbox: pcc: Refactor and simplify check_and_ack()
mailbox: pcc: Always map the shared memory communication address
mailbox: pcc: Refactor error handling in irq handler into separate function
mailbox: pcc: Use acpi_os_ioremap() instead of ioremap()
mailbox: pcc: Return early if no GAS register from pcc_mbox_cmd_complete_check
mailbox: pcc: Drop unnecessary endianness conversion of pcc_hdr.flags
mailbox: pcc: Always clear the platform ack interrupt first
mailbox: pcc: Fix the possible race in updation of chan_in_use flag
dt-bindings: mailbox: qcom: add compatible for MSM8226 SoC
dt-bindings: mailbox: fsl,mu: Add i.MX94 compatible
MAINTAINERS: add mailbox API's tree type and location
mailbox: remove unused header files
mailbox: explicitly include <linux/bits.h>
mailbox: sort headers alphabetically
mailbox: don't protect of_parse_phandle_with_args with con_mutex
mailbox: use error ret code of of_parse_phandle_with_args()
mailbox: arm_mhuv2: Constify amba_id table
mailbox: arm_mhu_db: Constify amba_id table
mailbox: arm_mhu: Constify amba_id table
...

+149 -111
+6 -1
Documentation/devicetree/bindings/mailbox/fsl,mu.yaml
··· 54 - fsl,imx8qm-mu 55 - fsl,imx8qxp-mu 56 - const: fsl,imx6sx-mu 57 58 reg: 59 maxItems: 1 ··· 146 not: 147 properties: 148 compatible: 149 - const: fsl,imx95-mu 150 then: 151 patternProperties: 152 "^sram@[a-f0-9]+": false
··· 54 - fsl,imx8qm-mu 55 - fsl,imx8qxp-mu 56 - const: fsl,imx6sx-mu 57 + - items: 58 + - enum: 59 + - fsl,imx94-mu 60 + - const: fsl,imx95-mu 61 62 reg: 63 maxItems: 1 ··· 142 not: 143 properties: 144 compatible: 145 + contains: 146 + const: fsl,imx95-mu 147 then: 148 patternProperties: 149 "^sram@[a-f0-9]+": false
+4
Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
··· 25 - mediatek,mt8188-gce 26 - mediatek,mt8192-gce 27 - mediatek,mt8195-gce 28 - items: 29 - const: mediatek,mt6795-gce 30 - const: mediatek,mt8173-gce ··· 49 clock-names: 50 items: 51 - const: gce 52 53 required: 54 - compatible
··· 25 - mediatek,mt8188-gce 26 - mediatek,mt8192-gce 27 - mediatek,mt8195-gce 28 + - mediatek,mt8196-gce 29 - items: 30 - const: mediatek,mt6795-gce 31 - const: mediatek,mt8173-gce ··· 48 clock-names: 49 items: 50 - const: gce 51 + 52 + iommus: 53 + maxItems: 1 54 55 required: 56 - compatible
+1
Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
··· 26 - const: qcom,ipq6018-apcs-apps-global 27 - items: 28 - enum: 29 - qcom,qcs404-apcs-apps-global 30 - const: qcom,msm8916-apcs-kpss-global 31 - const: syscon
··· 26 - const: qcom,ipq6018-apcs-apps-global 27 - items: 28 - enum: 29 + - qcom,msm8226-apcs-kpss-global 30 - qcom,qcs404-apcs-apps-global 31 - const: qcom,msm8916-apcs-kpss-global 32 - const: syscon
+1
MAINTAINERS
··· 14090 M: Jassi Brar <jassisinghbrar@gmail.com> 14091 L: linux-kernel@vger.kernel.org 14092 S: Maintained 14093 F: Documentation/devicetree/bindings/mailbox/ 14094 F: drivers/mailbox/ 14095 F: include/dt-bindings/mailbox/
··· 14090 M: Jassi Brar <jassisinghbrar@gmail.com> 14091 L: linux-kernel@vger.kernel.org 14092 S: Maintained 14093 + T: git git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox.git for-next 14094 F: Documentation/devicetree/bindings/mailbox/ 14095 F: drivers/mailbox/ 14096 F: include/dt-bindings/mailbox/
+1 -1
drivers/mailbox/arm_mhu.c
··· 153 return 0; 154 } 155 156 - static struct amba_id mhu_ids[] = { 157 { 158 .id = 0x1bb098, 159 .mask = 0xffffff,
··· 153 return 0; 154 } 155 156 + static const struct amba_id mhu_ids[] = { 157 { 158 .id = 0x1bb098, 159 .mask = 0xffffff,
+1 -1
drivers/mailbox/arm_mhu_db.c
··· 328 return 0; 329 } 330 331 - static struct amba_id mhu_ids[] = { 332 { 333 .id = 0x1bb098, 334 .mask = 0xffffff,
··· 328 return 0; 329 } 330 331 + static const struct amba_id mhu_ids[] = { 332 { 333 .id = 0x1bb098, 334 .mask = 0xffffff,
+1 -1
drivers/mailbox/arm_mhuv2.c
··· 1107 writel_relaxed(0x0, &mhu->send->access_request); 1108 } 1109 1110 - static struct amba_id mhuv2_ids[] = { 1111 { 1112 /* 2.0 */ 1113 .id = 0xbb0d1,
··· 1107 writel_relaxed(0x0, &mhu->send->access_request); 1108 } 1109 1110 + static const struct amba_id mhuv2_ids[] = { 1111 { 1112 /* 2.0 */ 1113 .id = 0xbb0d1,
+1 -1
drivers/mailbox/exynos-mailbox.c
··· 57 if (msg->chan_type != EXYNOS_MBOX_CHAN_TYPE_DOORBELL) { 58 dev_err(dev, "Unsupported channel type [%d]\n", msg->chan_type); 59 return -EINVAL; 60 - }; 61 62 writel(BIT(msg->chan_id), exynos_mbox->regs + EXYNOS_MBOX_INTGR1); 63
··· 57 if (msg->chan_type != EXYNOS_MBOX_CHAN_TYPE_DOORBELL) { 58 dev_err(dev, "Unsupported channel type [%d]\n", msg->chan_type); 59 return -EINVAL; 60 + } 61 62 writel(BIT(msg->chan_id), exynos_mbox->regs + EXYNOS_MBOX_INTGR1); 63
+10 -13
drivers/mailbox/mailbox.c
··· 6 * Author: Jassi Brar <jassisinghbrar@gmail.com> 7 */ 8 9 - #include <linux/interrupt.h> 10 - #include <linux/spinlock.h> 11 - #include <linux/mutex.h> 12 #include <linux/delay.h> 13 - #include <linux/slab.h> 14 - #include <linux/err.h> 15 - #include <linux/module.h> 16 #include <linux/device.h> 17 - #include <linux/bitops.h> 18 #include <linux/mailbox_client.h> 19 #include <linux/mailbox_controller.h> 20 #include <linux/of.h> 21 22 #include "mailbox.h" 23 ··· 410 return ERR_PTR(-ENODEV); 411 } 412 413 - mutex_lock(&con_mutex); 414 - 415 - if (of_parse_phandle_with_args(dev->of_node, "mboxes", 416 - "#mbox-cells", index, &spec)) { 417 dev_dbg(dev, "%s: can't parse \"mboxes\" property\n", __func__); 418 - mutex_unlock(&con_mutex); 419 - return ERR_PTR(-ENODEV); 420 } 421 422 chan = ERR_PTR(-EPROBE_DEFER); 423 list_for_each_entry(mbox, &mbox_cons, node)
··· 6 * Author: Jassi Brar <jassisinghbrar@gmail.com> 7 */ 8 9 #include <linux/delay.h> 10 #include <linux/device.h> 11 + #include <linux/err.h> 12 #include <linux/mailbox_client.h> 13 #include <linux/mailbox_controller.h> 14 + #include <linux/module.h> 15 + #include <linux/mutex.h> 16 #include <linux/of.h> 17 + #include <linux/spinlock.h> 18 19 #include "mailbox.h" 20 ··· 413 return ERR_PTR(-ENODEV); 414 } 415 416 + ret = of_parse_phandle_with_args(dev->of_node, "mboxes", "#mbox-cells", 417 + index, &spec); 418 + if (ret) { 419 dev_dbg(dev, "%s: can't parse \"mboxes\" property\n", __func__); 420 + return ERR_PTR(ret); 421 } 422 + 423 + mutex_lock(&con_mutex); 424 425 chan = ERR_PTR(-EPROBE_DEFER); 426 list_for_each_entry(mbox, &mbox_cons, node)
+2
drivers/mailbox/mailbox.h
··· 3 #ifndef __MAILBOX_H 4 #define __MAILBOX_H 5 6 #define TXDONE_BY_IRQ BIT(0) /* controller has remote RTR irq */ 7 #define TXDONE_BY_POLL BIT(1) /* controller can read status of last TX */ 8 #define TXDONE_BY_ACK BIT(2) /* S/W ACK received by Client ticks the TX */
··· 3 #ifndef __MAILBOX_H 4 #define __MAILBOX_H 5 6 + #include <linux/bits.h> 7 + 8 #define TXDONE_BY_IRQ BIT(0) /* controller has remote RTR irq */ 9 #define TXDONE_BY_POLL BIT(1) /* controller can read status of last TX */ 10 #define TXDONE_BY_ACK BIT(2) /* S/W ACK received by Client ticks the TX */
+56 -57
drivers/mailbox/pcc.c
··· 117 static struct pcc_chan_info *chan_info; 118 static int pcc_chan_count; 119 120 - static int pcc_send_data(struct mbox_chan *chan, void *data); 121 - 122 /* 123 * PCC can be used with perf critical drivers such as CPPC 124 * So it makes sense to locally cache the virtual address and ··· 243 u64 val; 244 int ret; 245 246 ret = pcc_chan_reg_read(&pchan->cmd_complete, &val); 247 if (ret) 248 return false; 249 - 250 - if (!pchan->cmd_complete.gas) 251 - return true; 252 253 /* 254 * Judge if the channel respond the interrupt based on the value of ··· 267 return !!val; 268 } 269 270 - static void check_and_ack(struct pcc_chan_info *pchan, struct mbox_chan *chan) 271 { 272 - struct acpi_pcct_ext_pcc_shared_memory pcc_hdr; 273 274 if (pchan->type != ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE) 275 return; 276 - /* If the memory region has not been mapped, we cannot 277 - * determine if we need to send the message, but we still 278 - * need to set the cmd_update flag before returning. 279 - */ 280 - if (pchan->chan.shmem == NULL) { 281 - pcc_chan_reg_read_modify_write(&pchan->cmd_update); 282 - return; 283 - } 284 - memcpy_fromio(&pcc_hdr, pchan->chan.shmem, 285 - sizeof(struct acpi_pcct_ext_pcc_shared_memory)); 286 /* 287 - * The PCC slave subspace channel needs to set the command complete bit 288 - * after processing message. If the PCC_ACK_FLAG is set, it should also 289 - * ring the doorbell. 290 - * 291 - * The PCC master subspace channel clears chan_in_use to free channel. 292 */ 293 - if (le32_to_cpup(&pcc_hdr.flags) & PCC_ACK_FLAG_MASK) 294 - pcc_send_data(chan, NULL); 295 - else 296 - pcc_chan_reg_read_modify_write(&pchan->cmd_update); 297 } 298 299 /** ··· 317 { 318 struct pcc_chan_info *pchan; 319 struct mbox_chan *chan = p; 320 - u64 val; 321 - int ret; 322 323 pchan = chan->con_priv; 324 if (pchan->type == ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE && 325 !pchan->chan_in_use) 326 return IRQ_NONE; ··· 330 if (!pcc_mbox_cmd_complete_check(pchan)) 331 return IRQ_NONE; 332 333 - ret = pcc_chan_reg_read(&pchan->error, &val); 334 - if (ret) 335 - return IRQ_NONE; 336 - val &= pchan->error.status_mask; 337 - if (val) { 338 - val &= ~pchan->error.status_mask; 339 - pcc_chan_reg_write(&pchan->error, val); 340 - return IRQ_NONE; 341 - } 342 - 343 - if (pcc_chan_reg_read_modify_write(&pchan->plat_irq_ack)) 344 return IRQ_NONE; 345 346 mbox_chan_received_data(chan, NULL); 347 348 - check_and_ack(pchan, chan); 349 - pchan->chan_in_use = false; 350 351 return IRQ_HANDLED; 352 } ··· 362 struct pcc_mbox_chan * 363 pcc_mbox_request_channel(struct mbox_client *cl, int subspace_id) 364 { 365 struct pcc_chan_info *pchan; 366 struct mbox_chan *chan; 367 int rc; ··· 381 if (rc) 382 return ERR_PTR(rc); 383 384 - return &pchan->chan; 385 } 386 EXPORT_SYMBOL_GPL(pcc_mbox_request_channel); 387 ··· 416 mbox_free_channel(chan); 417 } 418 EXPORT_SYMBOL_GPL(pcc_mbox_free_channel); 419 - 420 - int pcc_mbox_ioremap(struct mbox_chan *chan) 421 - { 422 - struct pcc_chan_info *pchan_info; 423 - struct pcc_mbox_chan *pcc_mbox_chan; 424 - 425 - if (!chan || !chan->cl) 426 - return -1; 427 - pchan_info = chan->con_priv; 428 - pcc_mbox_chan = &pchan_info->chan; 429 - pcc_mbox_chan->shmem = ioremap(pcc_mbox_chan->shmem_base_addr, 430 - pcc_mbox_chan->shmem_size); 431 - return 0; 432 - } 433 - EXPORT_SYMBOL_GPL(pcc_mbox_ioremap); 434 435 /** 436 * pcc_send_data - Called from Mailbox Controller code. Used
··· 117 static struct pcc_chan_info *chan_info; 118 static int pcc_chan_count; 119 120 /* 121 * PCC can be used with perf critical drivers such as CPPC 122 * So it makes sense to locally cache the virtual address and ··· 245 u64 val; 246 int ret; 247 248 + if (!pchan->cmd_complete.gas) 249 + return true; 250 + 251 ret = pcc_chan_reg_read(&pchan->cmd_complete, &val); 252 if (ret) 253 return false; 254 255 /* 256 * Judge if the channel respond the interrupt based on the value of ··· 269 return !!val; 270 } 271 272 + static int pcc_mbox_error_check_and_clear(struct pcc_chan_info *pchan) 273 { 274 + u64 val; 275 + int ret; 276 + 277 + ret = pcc_chan_reg_read(&pchan->error, &val); 278 + if (ret) 279 + return ret; 280 + 281 + val &= pchan->error.status_mask; 282 + if (val) { 283 + val &= ~pchan->error.status_mask; 284 + pcc_chan_reg_write(&pchan->error, val); 285 + return -EIO; 286 + } 287 + 288 + return 0; 289 + } 290 + 291 + static void pcc_chan_acknowledge(struct pcc_chan_info *pchan) 292 + { 293 + struct acpi_pcct_ext_pcc_shared_memory __iomem *pcc_hdr; 294 295 if (pchan->type != ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE) 296 return; 297 + 298 + pcc_chan_reg_read_modify_write(&pchan->cmd_update); 299 + 300 + pcc_hdr = pchan->chan.shmem; 301 + 302 /* 303 + * The PCC slave subspace channel needs to set the command 304 + * complete bit after processing message. If the PCC_ACK_FLAG 305 + * is set, it should also ring the doorbell. 306 */ 307 + if (ioread32(&pcc_hdr->flags) & PCC_CMD_COMPLETION_NOTIFY) 308 + pcc_chan_reg_read_modify_write(&pchan->db); 309 } 310 311 /** ··· 309 { 310 struct pcc_chan_info *pchan; 311 struct mbox_chan *chan = p; 312 313 pchan = chan->con_priv; 314 + 315 + if (pcc_chan_reg_read_modify_write(&pchan->plat_irq_ack)) 316 + return IRQ_NONE; 317 + 318 if (pchan->type == ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE && 319 !pchan->chan_in_use) 320 return IRQ_NONE; ··· 320 if (!pcc_mbox_cmd_complete_check(pchan)) 321 return IRQ_NONE; 322 323 + if (pcc_mbox_error_check_and_clear(pchan)) 324 return IRQ_NONE; 325 326 + /* 327 + * Clear this flag after updating interrupt ack register and just 328 + * before mbox_chan_received_data() which might call pcc_send_data() 329 + * where the flag is set again to start new transfer. This is 330 + * required to avoid any possible race in updatation of this flag. 331 + */ 332 + pchan->chan_in_use = false; 333 mbox_chan_received_data(chan, NULL); 334 335 + pcc_chan_acknowledge(pchan); 336 337 return IRQ_HANDLED; 338 } ··· 356 struct pcc_mbox_chan * 357 pcc_mbox_request_channel(struct mbox_client *cl, int subspace_id) 358 { 359 + struct pcc_mbox_chan *pcc_mchan; 360 struct pcc_chan_info *pchan; 361 struct mbox_chan *chan; 362 int rc; ··· 374 if (rc) 375 return ERR_PTR(rc); 376 377 + pcc_mchan = &pchan->chan; 378 + pcc_mchan->shmem = acpi_os_ioremap(pcc_mchan->shmem_base_addr, 379 + pcc_mchan->shmem_size); 380 + if (pcc_mchan->shmem) 381 + return pcc_mchan; 382 + 383 + mbox_free_channel(chan); 384 + return ERR_PTR(-ENXIO); 385 } 386 EXPORT_SYMBOL_GPL(pcc_mbox_request_channel); 387 ··· 402 mbox_free_channel(chan); 403 } 404 EXPORT_SYMBOL_GPL(pcc_mbox_free_channel); 405 406 /** 407 * pcc_send_data - Called from Mailbox Controller code. Used
+1 -13
drivers/mailbox/pl320-ipc.c
··· 45 static DECLARE_COMPLETION(ipc_completion); 46 static ATOMIC_NOTIFIER_HEAD(ipc_notifier); 47 48 - static inline void set_destination(int source, int mbox) 49 - { 50 - writel_relaxed(CHAN_MASK(source), ipc_base + IPCMxDSET(mbox)); 51 - writel_relaxed(CHAN_MASK(source), ipc_base + IPCMxMSET(mbox)); 52 - } 53 - 54 - static inline void clear_destination(int source, int mbox) 55 - { 56 - writel_relaxed(CHAN_MASK(source), ipc_base + IPCMxDCLEAR(mbox)); 57 - writel_relaxed(CHAN_MASK(source), ipc_base + IPCMxMCLEAR(mbox)); 58 - } 59 - 60 static void __ipc_send(int mbox, u32 *data) 61 { 62 int i; ··· 152 return ret; 153 } 154 155 - static struct amba_id pl320_ids[] = { 156 { 157 .id = 0x00041320, 158 .mask = 0x000fffff,
··· 45 static DECLARE_COMPLETION(ipc_completion); 46 static ATOMIC_NOTIFIER_HEAD(ipc_notifier); 47 48 static void __ipc_send(int mbox, u32 *data) 49 { 50 int i; ··· 164 return ret; 165 } 166 167 + static const struct amba_id pl320_ids[] = { 168 { 169 .id = 0x00041320, 170 .mask = 0x000fffff,
+60 -12
drivers/mailbox/tegra-hsp.c
··· 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* 3 - * Copyright (c) 2016-2023, NVIDIA CORPORATION. All rights reserved. 4 */ 5 6 #include <linux/delay.h> ··· 28 #define HSP_INT_FULL_MASK 0xff 29 30 #define HSP_INT_DIMENSIONING 0x380 31 - #define HSP_nSM_SHIFT 0 32 - #define HSP_nSS_SHIFT 4 33 - #define HSP_nAS_SHIFT 8 34 - #define HSP_nDB_SHIFT 12 35 - #define HSP_nSI_SHIFT 16 36 - #define HSP_nINT_MASK 0xf 37 38 #define HSP_DB_TRIGGER 0x0 39 #define HSP_DB_ENABLE 0x4 ··· 91 bool has_per_mb_ie; 92 bool has_128_bit_mb; 93 unsigned int reg_stride; 94 }; 95 96 struct tegra_hsp { ··· 755 return PTR_ERR(hsp->regs); 756 757 value = tegra_hsp_readl(hsp, HSP_INT_DIMENSIONING); 758 - hsp->num_sm = (value >> HSP_nSM_SHIFT) & HSP_nINT_MASK; 759 - hsp->num_ss = (value >> HSP_nSS_SHIFT) & HSP_nINT_MASK; 760 - hsp->num_as = (value >> HSP_nAS_SHIFT) & HSP_nINT_MASK; 761 - hsp->num_db = (value >> HSP_nDB_SHIFT) & HSP_nINT_MASK; 762 - hsp->num_si = (value >> HSP_nSI_SHIFT) & HSP_nINT_MASK; 763 764 err = platform_get_irq_byname_optional(pdev, "doorbell"); 765 if (err >= 0) ··· 923 .has_per_mb_ie = false, 924 .has_128_bit_mb = false, 925 .reg_stride = 0x100, 926 }; 927 928 static const struct tegra_hsp_soc tegra194_hsp_soc = { ··· 940 .has_per_mb_ie = true, 941 .has_128_bit_mb = false, 942 .reg_stride = 0x100, 943 }; 944 945 static const struct tegra_hsp_soc tegra234_hsp_soc = { ··· 957 .has_per_mb_ie = false, 958 .has_128_bit_mb = true, 959 .reg_stride = 0x100, 960 }; 961 962 static const struct tegra_hsp_soc tegra264_hsp_soc = { ··· 974 .has_per_mb_ie = false, 975 .has_128_bit_mb = true, 976 .reg_stride = 0x1000, 977 }; 978 979 static const struct of_device_id tegra_hsp_match[] = {
··· 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* 3 + * Copyright (c) 2016-2025, NVIDIA CORPORATION. All rights reserved. 4 */ 5 6 #include <linux/delay.h> ··· 28 #define HSP_INT_FULL_MASK 0xff 29 30 #define HSP_INT_DIMENSIONING 0x380 31 32 #define HSP_DB_TRIGGER 0x0 33 #define HSP_DB_ENABLE 0x4 ··· 97 bool has_per_mb_ie; 98 bool has_128_bit_mb; 99 unsigned int reg_stride; 100 + 101 + /* Shifts for dimensioning register. */ 102 + unsigned int si_shift; 103 + unsigned int db_shift; 104 + unsigned int as_shift; 105 + unsigned int ss_shift; 106 + unsigned int sm_shift; 107 + 108 + /* Masks for dimensioning register. */ 109 + unsigned int si_mask; 110 + unsigned int db_mask; 111 + unsigned int as_mask; 112 + unsigned int ss_mask; 113 + unsigned int sm_mask; 114 }; 115 116 struct tegra_hsp { ··· 747 return PTR_ERR(hsp->regs); 748 749 value = tegra_hsp_readl(hsp, HSP_INT_DIMENSIONING); 750 + hsp->num_sm = (value >> hsp->soc->sm_shift) & hsp->soc->sm_mask; 751 + hsp->num_ss = (value >> hsp->soc->ss_shift) & hsp->soc->ss_mask; 752 + hsp->num_as = (value >> hsp->soc->as_shift) & hsp->soc->as_mask; 753 + hsp->num_db = (value >> hsp->soc->db_shift) & hsp->soc->db_mask; 754 + hsp->num_si = (value >> hsp->soc->si_shift) & hsp->soc->si_mask; 755 756 err = platform_get_irq_byname_optional(pdev, "doorbell"); 757 if (err >= 0) ··· 915 .has_per_mb_ie = false, 916 .has_128_bit_mb = false, 917 .reg_stride = 0x100, 918 + .si_shift = 16, 919 + .db_shift = 12, 920 + .as_shift = 8, 921 + .ss_shift = 4, 922 + .sm_shift = 0, 923 + .si_mask = 0xf, 924 + .db_mask = 0xf, 925 + .as_mask = 0xf, 926 + .ss_mask = 0xf, 927 + .sm_mask = 0xf, 928 }; 929 930 static const struct tegra_hsp_soc tegra194_hsp_soc = { ··· 922 .has_per_mb_ie = true, 923 .has_128_bit_mb = false, 924 .reg_stride = 0x100, 925 + .si_shift = 16, 926 + .db_shift = 12, 927 + .as_shift = 8, 928 + .ss_shift = 4, 929 + .sm_shift = 0, 930 + .si_mask = 0xf, 931 + .db_mask = 0xf, 932 + .as_mask = 0xf, 933 + .ss_mask = 0xf, 934 + .sm_mask = 0xf, 935 }; 936 937 static const struct tegra_hsp_soc tegra234_hsp_soc = { ··· 929 .has_per_mb_ie = false, 930 .has_128_bit_mb = true, 931 .reg_stride = 0x100, 932 + .si_shift = 16, 933 + .db_shift = 12, 934 + .as_shift = 8, 935 + .ss_shift = 4, 936 + .sm_shift = 0, 937 + .si_mask = 0xf, 938 + .db_mask = 0xf, 939 + .as_mask = 0xf, 940 + .ss_mask = 0xf, 941 + .sm_mask = 0xf, 942 }; 943 944 static const struct tegra_hsp_soc tegra264_hsp_soc = { ··· 936 .has_per_mb_ie = false, 937 .has_128_bit_mb = true, 938 .reg_stride = 0x1000, 939 + .si_shift = 17, 940 + .db_shift = 12, 941 + .as_shift = 8, 942 + .ss_shift = 4, 943 + .sm_shift = 0, 944 + .si_mask = 0x1f, 945 + .db_mask = 0x1f, 946 + .as_mask = 0xf, 947 + .ss_mask = 0xf, 948 + .sm_mask = 0xf, 949 }; 950 951 static const struct of_device_id tegra_hsp_match[] = {
-6
include/acpi/pcc.h
··· 32 #define PCC_CMD_COMPLETION_NOTIFY BIT(0) 33 34 #define MAX_PCC_SUBSPACES 256 35 - #define PCC_ACK_FLAG_MASK 0x1 36 37 #ifdef CONFIG_PCC 38 extern struct pcc_mbox_chan * 39 pcc_mbox_request_channel(struct mbox_client *cl, int subspace_id); 40 extern void pcc_mbox_free_channel(struct pcc_mbox_chan *chan); 41 - extern int pcc_mbox_ioremap(struct mbox_chan *chan); 42 #else 43 static inline struct pcc_mbox_chan * 44 pcc_mbox_request_channel(struct mbox_client *cl, int subspace_id) ··· 44 return ERR_PTR(-ENODEV); 45 } 46 static inline void pcc_mbox_free_channel(struct pcc_mbox_chan *chan) { } 47 - static inline int pcc_mbox_ioremap(struct mbox_chan *chan) 48 - { 49 - return 0; 50 - }; 51 #endif 52 53 #endif /* _PCC_H */
··· 32 #define PCC_CMD_COMPLETION_NOTIFY BIT(0) 33 34 #define MAX_PCC_SUBSPACES 256 35 36 #ifdef CONFIG_PCC 37 extern struct pcc_mbox_chan * 38 pcc_mbox_request_channel(struct mbox_client *cl, int subspace_id); 39 extern void pcc_mbox_free_channel(struct pcc_mbox_chan *chan); 40 #else 41 static inline struct pcc_mbox_chan * 42 pcc_mbox_request_channel(struct mbox_client *cl, int subspace_id) ··· 46 return ERR_PTR(-ENODEV); 47 } 48 static inline void pcc_mbox_free_channel(struct pcc_mbox_chan *chan) { } 49 #endif 50 51 #endif /* _PCC_H */
-1
include/linux/mailbox/mtk-cmdq-mailbox.h
··· 75 dma_addr_t pa_base; 76 size_t cmd_buf_size; /* command occupied size */ 77 size_t buf_size; /* real buffer size */ 78 - void *cl; 79 }; 80 81 u8 cmdq_get_shift_pa(struct mbox_chan *chan);
··· 75 dma_addr_t pa_base; 76 size_t cmd_buf_size; /* command occupied size */ 77 size_t buf_size; /* real buffer size */ 78 }; 79 80 u8 cmdq_get_shift_pa(struct mbox_chan *chan);
+1 -1
include/linux/mailbox_client.h
··· 7 #ifndef __MAILBOX_CLIENT_H 8 #define __MAILBOX_CLIENT_H 9 10 - #include <linux/of.h> 11 #include <linux/device.h> 12 13 struct mbox_chan; 14
··· 7 #ifndef __MAILBOX_CLIENT_H 8 #define __MAILBOX_CLIENT_H 9 10 #include <linux/device.h> 11 + #include <linux/of.h> 12 13 struct mbox_chan; 14
+3 -3
include/linux/mailbox_controller.h
··· 3 #ifndef __MAILBOX_CONTROLLER_H 4 #define __MAILBOX_CONTROLLER_H 5 6 #include <linux/of.h> 7 #include <linux/types.h> 8 - #include <linux/hrtimer.h> 9 - #include <linux/device.h> 10 - #include <linux/completion.h> 11 12 struct mbox_chan; 13
··· 3 #ifndef __MAILBOX_CONTROLLER_H 4 #define __MAILBOX_CONTROLLER_H 5 6 + #include <linux/completion.h> 7 + #include <linux/device.h> 8 + #include <linux/hrtimer.h> 9 #include <linux/of.h> 10 #include <linux/types.h> 11 12 struct mbox_chan; 13