forked from Minki/linux
- sprd: fix a macro value
- omap: support for K3 AM64x - tegra: fix lockdep warnings - qcom: support for SDX55 and SC8180X - arm: fixes for sparse, kfree and void return -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE6EwehDt/SOnwFyTyf9lkf8eYP5UFAmA12i0ACgkQf9lkf8eY P5V9Iw//amo1005ZlfMpnoDUvlhNtiqQRx5HliayLjchDi2sERZOEKrqwqLIsv3q 4nKaSNrDKPSud+3MP4p/WuHaEGYw08+G32Qi7G8ltpIBfTSTtiqAHlzyo4J7gcKn zKfFFumIS0r5Vq85Nk0rCdeyJ29FRmJqY6oWYNRs+5KNqMvcVP/wqJ9pngo/+3mh MDUo1vpmz8+BoZp2TNVe1E6YgH4s6sg5u60lsw2c6eFlHESXsVFumlLlhw7MJdEa nfSupJeq0xl4qangE2WrsUiaDSVfo7KoXSJ0bpWyrX68XhqGSS1ntdFvN6ZjG5MH lot38MWhTwe9cFwyU5iVx/l0xQWphEPiDUc2B2dhkcdK/aLnZyNqKML16Hycf0yb nrbK1wu8ceUix8M7tgPycU/nNySx/CHAopBPHjbzIUq6WE9DByej2qC2z4BHzQz0 fJbqhNxg/bpOyu8oq4X2Nuqdmy6meXxZoE49qMVOCJa2bhXARof0f46RqkXiFJn9 ZTedW6xagrickIm7Z83w4lN9RxwgHObVHJ4e+AEgrPvxmOTom1aSA6kTLM3WIzag DtLI2zHpeQvlmEhIDSPmpp2WJvupbvhWJv437EbJN/3K1Uh1skdINur46dq0zDGy 9vEtcTiLX7yQ+3uMSylXW0M1zepBQV0HUYEq4gmCSh3cfXqz6+g= =eYIi -----END PGP SIGNATURE----- Merge tag 'mailbox-v5.12' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: - sprd: fix a macro value - omap: support for K3 AM64x - tegra: fix lockdep warnings - qcom: support for SDX55 and SC8180X - arm: fixes for sparse, kfree and void return * tag 'mailbox-v5.12' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: arm_mhuv2: Skip calling kfree() with invalid pointer mailbox: tegra-hsp: Set lockdep class dynamically mailbox: sprd: correct definition of SPRD_OUTBOX_FIFO_FULL mailbox: arm_mhuv2: make remove callback return void mailbox: arm_mhuv2: Fix sparse warnings mailbox: qcom: Add support for SDX55 APCS IPC dt-bindings: mailbox: Add binding for SDX55 APCS mailbox: omap: Add support for K3 AM64x SoCs dt-bindings: mailbox: omap: Update binding for AM64x SoCs mailbox: qcom: Add SC8180X apcs compatible dt-bindings: mailbox: qcom: Add SC8180X APCS compatible
This commit is contained in:
commit
b817c93123
@ -28,6 +28,9 @@ SoCs has each of these instances form a cluster and combine multiple clusters
|
||||
into a single IP block present within the Main NavSS. The interrupt lines from
|
||||
all these clusters are multiplexed and routed to different processor subsystems
|
||||
over a limited number of common interrupt output lines of an Interrupt Router.
|
||||
The AM64x SoCS also uses a single IP block comprising of multiple clusters,
|
||||
but the number of clusters are smaller, and the interrupt output lines are
|
||||
connected directly to various processors.
|
||||
|
||||
Mailbox Device Node:
|
||||
====================
|
||||
@ -42,6 +45,7 @@ Required properties:
|
||||
"ti,omap4-mailbox" for OMAP44xx, OMAP54xx, AM33xx,
|
||||
AM43xx and DRA7xx SoCs
|
||||
"ti,am654-mailbox" for K3 AM65x and J721E SoCs
|
||||
"ti,am64-mailbox" for K3 AM64x SoCs
|
||||
- reg: Contains the mailbox register address range (base
|
||||
address and length)
|
||||
- interrupts: Contains the interrupt information for the mailbox
|
||||
|
@ -24,6 +24,7 @@ properties:
|
||||
- qcom,msm8998-apcs-hmss-global
|
||||
- qcom,qcs404-apcs-apps-global
|
||||
- qcom,sc7180-apss-shared
|
||||
- qcom,sc8180x-apss-shared
|
||||
- qcom,sdm660-apcs-hmss-global
|
||||
- qcom,sdm845-apss-shared
|
||||
- qcom,sm8150-apss-shared
|
||||
@ -33,9 +34,11 @@ properties:
|
||||
|
||||
clocks:
|
||||
description: phandles to the parent clocks of the clock driver
|
||||
minItems: 2
|
||||
items:
|
||||
- description: primary pll parent of the clock driver
|
||||
- description: auxiliary parent
|
||||
- description: reference clock
|
||||
|
||||
'#mbox-cells':
|
||||
const: 1
|
||||
@ -44,9 +47,11 @@ properties:
|
||||
const: 0
|
||||
|
||||
clock-names:
|
||||
minItems: 2
|
||||
items:
|
||||
- const: pll
|
||||
- const: aux
|
||||
- const: ref
|
||||
|
||||
required:
|
||||
- compatible
|
||||
@ -55,6 +60,35 @@ required:
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,ipq6018-apcs-apps-global
|
||||
- qcom,ipq8074-apcs-apps-global
|
||||
- qcom,msm8916-apcs-kpss-global
|
||||
- qcom,msm8994-apcs-kpss-global
|
||||
- qcom,msm8996-apcs-hmss-global
|
||||
- qcom,msm8998-apcs-hmss-global
|
||||
- qcom,qcs404-apcs-apps-global
|
||||
- qcom,sc7180-apss-shared
|
||||
- qcom,sdm660-apcs-hmss-global
|
||||
- qcom,sdm845-apss-shared
|
||||
- qcom,sm8150-apss-shared
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 2
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,sdx55-apcs-gcc
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
maxItems: 3
|
||||
examples:
|
||||
|
||||
# Example apcs with msm8996
|
||||
|
@ -238,19 +238,19 @@ struct mhuv2_mbox_chan_priv {
|
||||
};
|
||||
|
||||
/* Macro for reading a bitfield within a physically mapped packed struct */
|
||||
#define readl_relaxed_bitfield(_regptr, _field) \
|
||||
#define readl_relaxed_bitfield(_regptr, _type, _field) \
|
||||
({ \
|
||||
u32 _regval; \
|
||||
_regval = readl_relaxed((_regptr)); \
|
||||
(*(typeof((_regptr)))(&_regval))._field; \
|
||||
(*(_type *)(&_regval))._field; \
|
||||
})
|
||||
|
||||
/* Macro for writing a bitfield within a physically mapped packed struct */
|
||||
#define writel_relaxed_bitfield(_value, _regptr, _field) \
|
||||
#define writel_relaxed_bitfield(_value, _regptr, _type, _field) \
|
||||
({ \
|
||||
u32 _regval; \
|
||||
_regval = readl_relaxed(_regptr); \
|
||||
(*(typeof(_regptr))(&_regval))._field = _value; \
|
||||
(*(_type *)(&_regval))._field = _value; \
|
||||
writel_relaxed(_regval, _regptr); \
|
||||
})
|
||||
|
||||
@ -496,7 +496,7 @@ static const struct mhuv2_protocol_ops mhuv2_data_transfer_ops = {
|
||||
|
||||
/* Interrupt handlers */
|
||||
|
||||
static struct mbox_chan *get_irq_chan_comb(struct mhuv2 *mhu, u32 *reg)
|
||||
static struct mbox_chan *get_irq_chan_comb(struct mhuv2 *mhu, u32 __iomem *reg)
|
||||
{
|
||||
struct mbox_chan *chans = mhu->mbox.chans;
|
||||
int channel = 0, i, offset = 0, windows, protocol, ch_wn;
|
||||
@ -699,7 +699,9 @@ static irqreturn_t mhuv2_receiver_interrupt(int irq, void *arg)
|
||||
ret = IRQ_HANDLED;
|
||||
}
|
||||
|
||||
kfree(data);
|
||||
if (!IS_ERR(data))
|
||||
kfree(data);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -969,8 +971,8 @@ static int mhuv2_tx_init(struct amba_device *adev, struct mhuv2 *mhu,
|
||||
mhu->mbox.ops = &mhuv2_sender_ops;
|
||||
mhu->send = reg;
|
||||
|
||||
mhu->windows = readl_relaxed_bitfield(&mhu->send->mhu_cfg, num_ch);
|
||||
mhu->minor = readl_relaxed_bitfield(&mhu->send->aidr, arch_minor_rev);
|
||||
mhu->windows = readl_relaxed_bitfield(&mhu->send->mhu_cfg, struct mhu_cfg_t, num_ch);
|
||||
mhu->minor = readl_relaxed_bitfield(&mhu->send->aidr, struct aidr_t, arch_minor_rev);
|
||||
|
||||
spin_lock_init(&mhu->doorbell_pending_lock);
|
||||
|
||||
@ -990,7 +992,7 @@ static int mhuv2_tx_init(struct amba_device *adev, struct mhuv2 *mhu,
|
||||
mhu->mbox.txdone_poll = false;
|
||||
mhu->irq = adev->irq[0];
|
||||
|
||||
writel_relaxed_bitfield(1, &mhu->send->int_en, chcomb);
|
||||
writel_relaxed_bitfield(1, &mhu->send->int_en, struct int_en_t, chcomb);
|
||||
|
||||
/* Disable all channel interrupts */
|
||||
for (i = 0; i < mhu->windows; i++)
|
||||
@ -1023,8 +1025,8 @@ static int mhuv2_rx_init(struct amba_device *adev, struct mhuv2 *mhu,
|
||||
mhu->mbox.ops = &mhuv2_receiver_ops;
|
||||
mhu->recv = reg;
|
||||
|
||||
mhu->windows = readl_relaxed_bitfield(&mhu->recv->mhu_cfg, num_ch);
|
||||
mhu->minor = readl_relaxed_bitfield(&mhu->recv->aidr, arch_minor_rev);
|
||||
mhu->windows = readl_relaxed_bitfield(&mhu->recv->mhu_cfg, struct mhu_cfg_t, num_ch);
|
||||
mhu->minor = readl_relaxed_bitfield(&mhu->recv->aidr, struct aidr_t, arch_minor_rev);
|
||||
|
||||
mhu->irq = adev->irq[0];
|
||||
if (!mhu->irq) {
|
||||
@ -1045,7 +1047,7 @@ static int mhuv2_rx_init(struct amba_device *adev, struct mhuv2 *mhu,
|
||||
writel_relaxed(0xFFFFFFFF, &mhu->recv->ch_wn[i].mask_set);
|
||||
|
||||
if (mhu->minor)
|
||||
writel_relaxed_bitfield(1, &mhu->recv->int_en, chcomb);
|
||||
writel_relaxed_bitfield(1, &mhu->recv->int_en, struct int_en_t, chcomb);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
* OMAP mailbox driver
|
||||
*
|
||||
* Copyright (C) 2006-2009 Nokia Corporation. All rights reserved.
|
||||
* Copyright (C) 2013-2019 Texas Instruments Incorporated - https://www.ti.com
|
||||
* Copyright (C) 2013-2021 Texas Instruments Incorporated - https://www.ti.com
|
||||
*
|
||||
* Contact: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
|
||||
* Suman Anna <s-anna@ti.com>
|
||||
@ -663,6 +663,10 @@ static const struct of_device_id omap_mailbox_of_match[] = {
|
||||
.compatible = "ti,am654-mailbox",
|
||||
.data = &omap4_data,
|
||||
},
|
||||
{
|
||||
.compatible = "ti,am64-mailbox",
|
||||
.data = &omap4_data,
|
||||
},
|
||||
{
|
||||
/* end */
|
||||
},
|
||||
|
@ -61,11 +61,15 @@ static const struct qcom_apcs_ipc_data apps_shared_apcs_data = {
|
||||
.offset = 12, .clk_name = NULL
|
||||
};
|
||||
|
||||
static const struct qcom_apcs_ipc_data sdx55_apcs_data = {
|
||||
.offset = 0x1008, .clk_name = "qcom-sdx55-acps-clk"
|
||||
};
|
||||
|
||||
static const struct regmap_config apcs_regmap_config = {
|
||||
.reg_bits = 32,
|
||||
.reg_stride = 4,
|
||||
.val_bits = 32,
|
||||
.max_register = 0xFFC,
|
||||
.max_register = 0x1008,
|
||||
.fast_io = true,
|
||||
};
|
||||
|
||||
@ -159,9 +163,11 @@ static const struct of_device_id qcom_apcs_ipc_of_match[] = {
|
||||
{ .compatible = "qcom,msm8998-apcs-hmss-global", .data = &msm8998_apcs_data },
|
||||
{ .compatible = "qcom,qcs404-apcs-apps-global", .data = &msm8916_apcs_data },
|
||||
{ .compatible = "qcom,sc7180-apss-shared", .data = &apps_shared_apcs_data },
|
||||
{ .compatible = "qcom,sc8180x-apss-shared", .data = &apps_shared_apcs_data },
|
||||
{ .compatible = "qcom,sdm660-apcs-hmss-global", .data = &sdm660_apcs_data },
|
||||
{ .compatible = "qcom,sdm845-apss-shared", .data = &apps_shared_apcs_data },
|
||||
{ .compatible = "qcom,sm8150-apss-shared", .data = &apps_shared_apcs_data },
|
||||
{ .compatible = "qcom,sdx55-apcs-gcc", .data = &sdx55_apcs_data },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, qcom_apcs_ipc_of_match);
|
||||
|
@ -35,7 +35,7 @@
|
||||
#define SPRD_MBOX_IRQ_CLR BIT(0)
|
||||
|
||||
/* Bit and mask definiation for outbox's SPRD_MBOX_FIFO_STS register */
|
||||
#define SPRD_OUTBOX_FIFO_FULL BIT(0)
|
||||
#define SPRD_OUTBOX_FIFO_FULL BIT(2)
|
||||
#define SPRD_OUTBOX_FIFO_WR_SHIFT 16
|
||||
#define SPRD_OUTBOX_FIFO_RD_SHIFT 24
|
||||
#define SPRD_OUTBOX_FIFO_POS_MASK GENMASK(7, 0)
|
||||
|
@ -98,7 +98,9 @@ struct tegra_hsp {
|
||||
unsigned int num_ss;
|
||||
unsigned int num_db;
|
||||
unsigned int num_si;
|
||||
|
||||
spinlock_t lock;
|
||||
struct lock_class_key lock_key;
|
||||
|
||||
struct list_head doorbells;
|
||||
struct tegra_hsp_mailbox *mailboxes;
|
||||
@ -775,6 +777,18 @@ static int tegra_hsp_probe(struct platform_device *pdev)
|
||||
return err;
|
||||
}
|
||||
|
||||
lockdep_register_key(&hsp->lock_key);
|
||||
lockdep_set_class(&hsp->lock, &hsp->lock_key);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra_hsp_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct tegra_hsp *hsp = platform_get_drvdata(pdev);
|
||||
|
||||
lockdep_unregister_key(&hsp->lock_key);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -834,6 +848,7 @@ static struct platform_driver tegra_hsp_driver = {
|
||||
.pm = &tegra_hsp_pm_ops,
|
||||
},
|
||||
.probe = tegra_hsp_probe,
|
||||
.remove = tegra_hsp_remove,
|
||||
};
|
||||
|
||||
static int __init tegra_hsp_init(void)
|
||||
|
Loading…
Reference in New Issue
Block a user