mbox series

[v10,0/4] Misc SCM driver changes

Message ID 1698945247-16033-1-git-send-email-quic_mojha@quicinc.com (mailing list archive)
Headers show
Series Misc SCM driver changes | expand

Message

Mukesh Ojha Nov. 2, 2023, 5:14 p.m. UTC
First two changes changes are needed to enable download mode on
chipset like IPQ9574 and IPQ5332 SoCs as for these targets others
bits in download mode registers are used for different purpose
and earlier kernel code was mistakenly overwrite the other bits.

First three changes(1/4-3/4) are SCM driver specific while 4/4 from
pinctrl try to use the introduced API(1/3).

Changes from v9: https://lore.kernel.org/lkml/1698648967-974-1-git-send-email-quic_mojha@quicinc.com/
 - Added 3/4 new patch.
 - commit subject modification.

Change from v8: https://lore.kernel.org/lkml/1698235506-16993-1-git-send-email-quic_mojha@quicinc.com/
 - Introduce enum for dload mode constants as per suggestion from [Elliot].
 - Rebased on linux-next.

Changes from v7: https://lore.kernel.org/lkml/1696440338-12561-1-git-send-email-quic_mojha@quicinc.com/
 - Rebased it on next-20231025.
 - Added reviewed-by tag and take care of comment made about
   commit text should be in imperative mode.
 - Modified the name of the API to qcom_scm_io_rmw() as per suggestion
   made by [Dmitry]
 - Moved spinlock inside qcom_scm structure.
 - Corrected the patch order as per subsystem SCM first then pinctrl.

Change from minidump-v5(13/17-15/17):https://lore.kernel.org/lkml/1694429639-21484-1-git-send-email-quic_mojha@quicinc.com/ - Removed mistakenly added macros.
   https://lore.kernel.org/lkml/9da888dc-401a-4cbb-b616-b4654fa79e35@quicinc.com/
 - Added Acked-by tag from Linus.w to 2/3.
Change from minidump-v5(13/17-15/17):https://lore.kernel.org/lkml/1694429639-21484-1-git-send-email-quic_mojha@quicinc.com/
 - Removed mistakenly added macros.
   https://lore.kernel.org/lkml/9da888dc-401a-4cbb-b616-b4654fa79e35@quicinc.com/
 - Added Acked-by tag from Linus.w to 2/3.

Changes in v6: https://lore.kernel.org/lkml/1680076012-10785-1-git-send-email-quic_mojha@quicinc.com/
 - Rebased it on latest tag available on linux-next
 - Added missed Poovendhan sign-off on 15/17 and tested-by tag from
   Kathiravan. Thanks to him for testing and reminding me of missing sign-off.
 - Addressed comments made on dload mode patch v6 version

Changes in v5: https://lore.kernel.org/lkml/1680017869-22421-1-git-send-email-quic_mojha@quicinc.com/
  - Tried to fix the issue reported by kernel test robot
    https://lore.kernel.org/lkml/202303280535.acb66sQT-lkp@intel.com/

  - Applied some of the improvement suggested by [Bjorn.andersson]

    . Dropped 'both' instead support full,mini or mini,full for setting download
    mode to collect both minidump and full dump.

    . logging improvement.

Changes in v4: https://lore.kernel.org/lkml/1679935281-18445-1-git-send-email-quic_mojha@quicinc.com/
  - val should be shifted within the function [srinivas.kandagatla]
    i.e new = (old & ~mask) | (val << ffs(mask) - 1);
  - Added Acked-by [linus.walleij] on pinctrl change.

Changes in v3 : https://lore.kernel.org/lkml/1679070482-8391-1-git-send-email-quic_mojha@quicinc.com/
 - Removed [1] from the series and sent as a separate patch[2], although this series
   should be applied on top [2].
  [1] https://lore.kernel.org/lkml/1677664555-30191-2-git-send-email-quic_mojha@quicinc.com/
  [2] https://lore.kernel.org/lkml/1678979666-551-1-git-send-email-quic_mojha@quicinc.com/
 - Introduce new exported symbol on suggestion from [srinivas.kandagatla]
 - Use the symbol from drivers/pinctrl/qcom/pinctrl-msm.c.
 - Addressed comment given by [dmitry.baryshkov]
 - Converted non-standard Originally-by to Signed-off-by.

Changes in v2: https://lore.kernel.org/lkml/1677664555-30191-1-git-send-email-quic_mojha@quicinc.com/
 - Addressed comment made by [bjorn]
 - Added download mask.
 - Passed download mode as parameter
 - Accept human accepatable download mode string.
 - enable = !!dload_mode
 - Shifted module param callback to somewhere down in
   the file so that it no longer need to know the
   prototype of qcom_scm_set_download_mode()
 - updated commit text.


Mukesh Ojha (4):
  firmware: qcom: scm: provide a read-modify-write function
  firmware: qcom: scm: Modify only the download bits in TCSR register
  firmware: qcom: scm: Rework dload mode availability check
  pinctrl: qcom: Use qcom_scm_io_rmw() function

 drivers/firmware/qcom/qcom_scm.c       | 50 ++++++++++++++++++++++++++++------
 drivers/pinctrl/qcom/pinctrl-msm.c     | 10 +++----
 include/linux/firmware/qcom/qcom_scm.h |  1 +
 3 files changed, 47 insertions(+), 14 deletions(-)

Comments

Mukesh Ojha Nov. 27, 2023, 7:50 p.m. UTC | #1
Bjorn,

Any comments on these patches?

-Mukesh

On 11/2/2023 10:44 PM, Mukesh Ojha wrote:
> First two changes changes are needed to enable download mode on
> chipset like IPQ9574 and IPQ5332 SoCs as for these targets others
> bits in download mode registers are used for different purpose
> and earlier kernel code was mistakenly overwrite the other bits.
> 
> First three changes(1/4-3/4) are SCM driver specific while 4/4 from
> pinctrl try to use the introduced API(1/3).
> 
> Changes from v9: https://lore.kernel.org/lkml/1698648967-974-1-git-send-email-quic_mojha@quicinc.com/
>   - Added 3/4 new patch.
>   - commit subject modification.
> 
> Change from v8: https://lore.kernel.org/lkml/1698235506-16993-1-git-send-email-quic_mojha@quicinc.com/
>   - Introduce enum for dload mode constants as per suggestion from [Elliot].
>   - Rebased on linux-next.
> 
> Changes from v7: https://lore.kernel.org/lkml/1696440338-12561-1-git-send-email-quic_mojha@quicinc.com/
>   - Rebased it on next-20231025.
>   - Added reviewed-by tag and take care of comment made about
>     commit text should be in imperative mode.
>   - Modified the name of the API to qcom_scm_io_rmw() as per suggestion
>     made by [Dmitry]
>   - Moved spinlock inside qcom_scm structure.
>   - Corrected the patch order as per subsystem SCM first then pinctrl.
> 
> Change from minidump-v5(13/17-15/17):https://lore.kernel.org/lkml/1694429639-21484-1-git-send-email-quic_mojha@quicinc.com/ - Removed mistakenly added macros.
>     https://lore.kernel.org/lkml/9da888dc-401a-4cbb-b616-b4654fa79e35@quicinc.com/
>   - Added Acked-by tag from Linus.w to 2/3.
> Change from minidump-v5(13/17-15/17):https://lore.kernel.org/lkml/1694429639-21484-1-git-send-email-quic_mojha@quicinc.com/
>   - Removed mistakenly added macros.
>     https://lore.kernel.org/lkml/9da888dc-401a-4cbb-b616-b4654fa79e35@quicinc.com/
>   - Added Acked-by tag from Linus.w to 2/3.
> 
> Changes in v6: https://lore.kernel.org/lkml/1680076012-10785-1-git-send-email-quic_mojha@quicinc.com/
>   - Rebased it on latest tag available on linux-next
>   - Added missed Poovendhan sign-off on 15/17 and tested-by tag from
>     Kathiravan. Thanks to him for testing and reminding me of missing sign-off.
>   - Addressed comments made on dload mode patch v6 version
> 
> Changes in v5: https://lore.kernel.org/lkml/1680017869-22421-1-git-send-email-quic_mojha@quicinc.com/
>    - Tried to fix the issue reported by kernel test robot
>      https://lore.kernel.org/lkml/202303280535.acb66sQT-lkp@intel.com/
> 
>    - Applied some of the improvement suggested by [Bjorn.andersson]
> 
>      . Dropped 'both' instead support full,mini or mini,full for setting download
>      mode to collect both minidump and full dump.
> 
>      . logging improvement.
> 
> Changes in v4: https://lore.kernel.org/lkml/1679935281-18445-1-git-send-email-quic_mojha@quicinc.com/
>    - val should be shifted within the function [srinivas.kandagatla]
>      i.e new = (old & ~mask) | (val << ffs(mask) - 1);
>    - Added Acked-by [linus.walleij] on pinctrl change.
> 
> Changes in v3 : https://lore.kernel.org/lkml/1679070482-8391-1-git-send-email-quic_mojha@quicinc.com/
>   - Removed [1] from the series and sent as a separate patch[2], although this series
>     should be applied on top [2].
>    [1] https://lore.kernel.org/lkml/1677664555-30191-2-git-send-email-quic_mojha@quicinc.com/
>    [2] https://lore.kernel.org/lkml/1678979666-551-1-git-send-email-quic_mojha@quicinc.com/
>   - Introduce new exported symbol on suggestion from [srinivas.kandagatla]
>   - Use the symbol from drivers/pinctrl/qcom/pinctrl-msm.c.
>   - Addressed comment given by [dmitry.baryshkov]
>   - Converted non-standard Originally-by to Signed-off-by.
> 
> Changes in v2: https://lore.kernel.org/lkml/1677664555-30191-1-git-send-email-quic_mojha@quicinc.com/
>   - Addressed comment made by [bjorn]
>   - Added download mask.
>   - Passed download mode as parameter
>   - Accept human accepatable download mode string.
>   - enable = !!dload_mode
>   - Shifted module param callback to somewhere down in
>     the file so that it no longer need to know the
>     prototype of qcom_scm_set_download_mode()
>   - updated commit text.
> 
> 
> Mukesh Ojha (4):
>    firmware: qcom: scm: provide a read-modify-write function
>    firmware: qcom: scm: Modify only the download bits in TCSR register
>    firmware: qcom: scm: Rework dload mode availability check
>    pinctrl: qcom: Use qcom_scm_io_rmw() function
> 
>   drivers/firmware/qcom/qcom_scm.c       | 50 ++++++++++++++++++++++++++++------
>   drivers/pinctrl/qcom/pinctrl-msm.c     | 10 +++----
>   include/linux/firmware/qcom/qcom_scm.h |  1 +
>   3 files changed, 47 insertions(+), 14 deletions(-)
>
Mukesh Ojha Dec. 15, 2023, 2:44 p.m. UTC | #2
On 11/28/2023 1:20 AM, Mukesh Ojha wrote:
> Bjorn,
> 
> Any comments on these patches?

Just a reminder., in case it got missed.

-Mukesh

> 
> -Mukesh
> 
> On 11/2/2023 10:44 PM, Mukesh Ojha wrote:
>> First two changes changes are needed to enable download mode on
>> chipset like IPQ9574 and IPQ5332 SoCs as for these targets others
>> bits in download mode registers are used for different purpose
>> and earlier kernel code was mistakenly overwrite the other bits.
>>
>> First three changes(1/4-3/4) are SCM driver specific while 4/4 from
>> pinctrl try to use the introduced API(1/3).
>>
>> Changes from v9: 
>> https://lore.kernel.org/lkml/1698648967-974-1-git-send-email-quic_mojha@quicinc.com/
>>   - Added 3/4 new patch.
>>   - commit subject modification.
>>
>> Change from v8: 
>> https://lore.kernel.org/lkml/1698235506-16993-1-git-send-email-quic_mojha@quicinc.com/
>>   - Introduce enum for dload mode constants as per suggestion from 
>> [Elliot].
>>   - Rebased on linux-next.
>>
>> Changes from v7: 
>> https://lore.kernel.org/lkml/1696440338-12561-1-git-send-email-quic_mojha@quicinc.com/
>>   - Rebased it on next-20231025.
>>   - Added reviewed-by tag and take care of comment made about
>>     commit text should be in imperative mode.
>>   - Modified the name of the API to qcom_scm_io_rmw() as per suggestion
>>     made by [Dmitry]
>>   - Moved spinlock inside qcom_scm structure.
>>   - Corrected the patch order as per subsystem SCM first then pinctrl.
>>
>> Change from 
>> minidump-v5(13/17-15/17):https://lore.kernel.org/lkml/1694429639-21484-1-git-send-email-quic_mojha@quicinc.com/ - Removed mistakenly added macros.
>>     
>> https://lore.kernel.org/lkml/9da888dc-401a-4cbb-b616-b4654fa79e35@quicinc.com/
>>   - Added Acked-by tag from Linus.w to 2/3.
>> Change from 
>> minidump-v5(13/17-15/17):https://lore.kernel.org/lkml/1694429639-21484-1-git-send-email-quic_mojha@quicinc.com/
>>   - Removed mistakenly added macros.
>>     
>> https://lore.kernel.org/lkml/9da888dc-401a-4cbb-b616-b4654fa79e35@quicinc.com/
>>   - Added Acked-by tag from Linus.w to 2/3.
>>
>> Changes in v6: 
>> https://lore.kernel.org/lkml/1680076012-10785-1-git-send-email-quic_mojha@quicinc.com/
>>   - Rebased it on latest tag available on linux-next
>>   - Added missed Poovendhan sign-off on 15/17 and tested-by tag from
>>     Kathiravan. Thanks to him for testing and reminding me of missing 
>> sign-off.
>>   - Addressed comments made on dload mode patch v6 version
>>
>> Changes in v5: 
>> https://lore.kernel.org/lkml/1680017869-22421-1-git-send-email-quic_mojha@quicinc.com/
>>    - Tried to fix the issue reported by kernel test robot
>>      https://lore.kernel.org/lkml/202303280535.acb66sQT-lkp@intel.com/
>>
>>    - Applied some of the improvement suggested by [Bjorn.andersson]
>>
>>      . Dropped 'both' instead support full,mini or mini,full for 
>> setting download
>>      mode to collect both minidump and full dump.
>>
>>      . logging improvement.
>>
>> Changes in v4: 
>> https://lore.kernel.org/lkml/1679935281-18445-1-git-send-email-quic_mojha@quicinc.com/
>>    - val should be shifted within the function [srinivas.kandagatla]
>>      i.e new = (old & ~mask) | (val << ffs(mask) - 1);
>>    - Added Acked-by [linus.walleij] on pinctrl change.
>>
>> Changes in v3 : 
>> https://lore.kernel.org/lkml/1679070482-8391-1-git-send-email-quic_mojha@quicinc.com/
>>   - Removed [1] from the series and sent as a separate patch[2], 
>> although this series
>>     should be applied on top [2].
>>    [1] 
>> https://lore.kernel.org/lkml/1677664555-30191-2-git-send-email-quic_mojha@quicinc.com/
>>    [2] 
>> https://lore.kernel.org/lkml/1678979666-551-1-git-send-email-quic_mojha@quicinc.com/
>>   - Introduce new exported symbol on suggestion from 
>> [srinivas.kandagatla]
>>   - Use the symbol from drivers/pinctrl/qcom/pinctrl-msm.c.
>>   - Addressed comment given by [dmitry.baryshkov]
>>   - Converted non-standard Originally-by to Signed-off-by.
>>
>> Changes in v2: 
>> https://lore.kernel.org/lkml/1677664555-30191-1-git-send-email-quic_mojha@quicinc.com/
>>   - Addressed comment made by [bjorn]
>>   - Added download mask.
>>   - Passed download mode as parameter
>>   - Accept human accepatable download mode string.
>>   - enable = !!dload_mode
>>   - Shifted module param callback to somewhere down in
>>     the file so that it no longer need to know the
>>     prototype of qcom_scm_set_download_mode()
>>   - updated commit text.
>>
>>
>> Mukesh Ojha (4):
>>    firmware: qcom: scm: provide a read-modify-write function
>>    firmware: qcom: scm: Modify only the download bits in TCSR register
>>    firmware: qcom: scm: Rework dload mode availability check
>>    pinctrl: qcom: Use qcom_scm_io_rmw() function
>>
>>   drivers/firmware/qcom/qcom_scm.c       | 50 
>> ++++++++++++++++++++++++++++------
>>   drivers/pinctrl/qcom/pinctrl-msm.c     | 10 +++----
>>   include/linux/firmware/qcom/qcom_scm.h |  1 +
>>   3 files changed, 47 insertions(+), 14 deletions(-)
>>