lkml.org 
[lkml]   [2021]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.13 260/800] mailbox: qcom: Use PLATFORM_DEVID_AUTO to register platform device
    Date
    From: Shawn Guo <shawn.guo@linaro.org>

    [ Upstream commit 96e39e95c01283ff5695dafe659df88ada802159 ]

    In adding APCS clock support for MSM8939, the second clock registration
    fails due to duplicate device name like below.

    [ 0.519657] sysfs: cannot create duplicate filename '/bus/platform/devices/qcom-apcs-msm8916-clk'
    ...
    [ 0.661158] qcom_apcs_ipc b111000.mailbox: failed to register APCS clk

    This is because MSM8939 has 3 APCS instances for Cluster0 (little cores),
    Cluster1 (big cores) and CCI (Cache Coherent Interconnect). Although
    only APCS of Cluster0 and Cluster1 have IPC bits, each of 3 APCS has
    A53PLL clock control bits. That said, 3 'qcom-apcs-msm8916-clk' devices
    need to be registered to instantiate all 3 clocks. Use PLATFORM_DEVID_AUTO
    rather than PLATFORM_DEVID_NONE for platform_device_register_data() call
    to fix the issue above.

    Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
    Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/mailbox/qcom-apcs-ipc-mailbox.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c
    index f25324d03842..15236d729625 100644
    --- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c
    +++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c
    @@ -132,7 +132,7 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev)
    if (apcs_data->clk_name) {
    apcs->clk = platform_device_register_data(&pdev->dev,
    apcs_data->clk_name,
    - PLATFORM_DEVID_NONE,
    + PLATFORM_DEVID_AUTO,
    NULL, 0);
    if (IS_ERR(apcs->clk))
    dev_err(&pdev->dev, "failed to register APCS clk\n");
    --
    2.30.2


    \
     
     \ /
      Last update: 2021-07-12 10:28    [W:4.095 / U:0.120 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site