• Shawn Guo's avatar
    mailbox: qcom: Use PLATFORM_DEVID_AUTO to register platform device · 96e39e95
    Shawn Guo authored
    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: default avatarShawn Guo <shawn.guo@linaro.org>
    Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
    96e39e95
qcom-apcs-ipc-mailbox.c 5.56 KB