mbox series

[U-Boot,v2,0/4] arm: socfpga: Convert drivers from struct to defines

Message ID 1568104683-2609-1-git-send-email-ley.foon.tan@intel.com
Headers show
Series arm: socfpga: Convert drivers from struct to defines | expand

Message

Ley Foon Tan Sept. 10, 2019, 8:37 a.m. UTC
This is 2nd version of patchset to convert reset, system and clock manager
drivers to use #define instead of struct.

Tested on Cyclone 5, Arria 10 and Stratix 10 devices.

Patch 1 is new one, patch 2 to 4 have changes.

Main changes in this version are:
- Get base address from DT
- Change to use writel(), readl(), setbits_le32() and clrbits_le32().
- Add prefix to defines.
- Add "u-boot,dm-pre-reloc" to clock and system manager nodes.

History:
v1: https://patchwork.ozlabs.org/cover/1149731/

Ley Foon Tan (4):
  arm: dts: socfpga: Add u-boot,dm-pre-reloc for sysmgr and clkmgr nodes
  arm: socfpga: Convert reset manager from struct to defines
  arm: socfpga: Convert system manager from struct to defines
  arm: socfpga: Convert clock manager from struct to defines

 arch/arm/dts/socfpga-common-u-boot.dtsi       |   8 +
 arch/arm/dts/socfpga.dtsi                     |   2 +-
 arch/arm/dts/socfpga_arria10.dtsi             |   2 +-
 arch/arm/dts/socfpga_arria10_socdk.dtsi       |   8 +
 arch/arm/dts/socfpga_stratix10.dtsi           |   2 +-
 .../dts/socfpga_stratix10_socdk-u-boot.dtsi   |   8 +
 arch/arm/mach-socfpga/clock_manager.c         |  12 +-
 arch/arm/mach-socfpga/clock_manager_arria10.c | 156 +++++++------
 arch/arm/mach-socfpga/clock_manager_gen5.c    | 199 +++++++++--------
 arch/arm/mach-socfpga/clock_manager_s10.c     | 210 ++++++++++--------
 .../mach-socfpga/include/mach/clock_manager.h |   2 +
 .../include/mach/clock_manager_arria10.h      | 133 +++++------
 .../include/mach/clock_manager_gen5.h         | 112 ++++------
 .../include/mach/clock_manager_s10.h          | 115 ++++------
 arch/arm/mach-socfpga/include/mach/misc.h     |   1 +
 .../mach-socfpga/include/mach/reset_manager.h |   2 +
 .../include/mach/reset_manager_arria10.h      |  43 +---
 .../include/mach/reset_manager_gen5.h         |  22 +-
 .../include/mach/reset_manager_s10.h          |  33 +--
 .../include/mach/system_manager.h             |   2 +
 .../include/mach/system_manager_arria10.h     |  94 +++-----
 .../include/mach/system_manager_gen5.h        | 123 ++--------
 .../include/mach/system_manager_s10.h         | 184 ++++++---------
 arch/arm/mach-socfpga/mailbox_s10.c           |   6 +-
 arch/arm/mach-socfpga/misc.c                  |  42 ++++
 arch/arm/mach-socfpga/misc_arria10.c          |   9 +-
 arch/arm/mach-socfpga/misc_gen5.c             |  29 +--
 arch/arm/mach-socfpga/misc_s10.c              |   9 +-
 arch/arm/mach-socfpga/reset_manager_arria10.c |  71 +++---
 arch/arm/mach-socfpga/reset_manager_gen5.c    |  35 ++-
 arch/arm/mach-socfpga/reset_manager_s10.c     |  52 +++--
 arch/arm/mach-socfpga/scan_manager.c          |   6 +-
 arch/arm/mach-socfpga/spl_a10.c               |  12 +-
 arch/arm/mach-socfpga/spl_gen5.c              |  23 +-
 arch/arm/mach-socfpga/spl_s10.c               |  24 +-
 arch/arm/mach-socfpga/system_manager_gen5.c   |  38 ++--
 arch/arm/mach-socfpga/system_manager_s10.c    |  39 ++--
 arch/arm/mach-socfpga/wrap_pll_config_s10.c   |  11 +-
 drivers/ddr/altera/sdram_gen5.c               |  10 +-
 drivers/ddr/altera/sdram_s10.c                |   6 +-
 drivers/fpga/socfpga_arria10.c                |   7 +-
 drivers/fpga/socfpga_gen5.c                   |   4 +-
 drivers/mmc/socfpga_dw_mmc.c                  |  17 +-
 drivers/sysreset/sysreset_socfpga.c           |   6 +-
 44 files changed, 880 insertions(+), 1049 deletions(-)

Comments

Dinh Nguyen Sept. 17, 2019, 10:33 p.m. UTC | #1
On 9/10/19 3:37 AM, Ley Foon Tan wrote:
> This is 2nd version of patchset to convert reset, system and clock manager
> drivers to use #define instead of struct.
> 
> Tested on Cyclone 5, Arria 10 and Stratix 10 devices.
> 
> Patch 1 is new one, patch 2 to 4 have changes.
> 
> Main changes in this version are:
> - Get base address from DT
> - Change to use writel(), readl(), setbits_le32() and clrbits_le32().
> - Add prefix to defines.
> - Add "u-boot,dm-pre-reloc" to clock and system manager nodes.
> 
> History:
> v1: https://patchwork.ozlabs.org/cover/1149731/
> 

I think you also need to Simon Goldschmidt to this series.

Beside the minor incorrect address missing a zero in patch 1, I've
tested this series on the Sockit.

Tested-by: Dinh Nguyen <dinguyen@kernel.org>

Dinh
Ley Foon Tan Sept. 18, 2019, 2:32 a.m. UTC | #2
On Wed, Sep 18, 2019 at 6:33 AM Dinh Nguyen <dinguyen@kernel.org> wrote:
>
>
>
> On 9/10/19 3:37 AM, Ley Foon Tan wrote:
> > This is 2nd version of patchset to convert reset, system and clock manager
> > drivers to use #define instead of struct.
> >
> > Tested on Cyclone 5, Arria 10 and Stratix 10 devices.
> >
> > Patch 1 is new one, patch 2 to 4 have changes.
> >
> > Main changes in this version are:
> > - Get base address from DT
> > - Change to use writel(), readl(), setbits_le32() and clrbits_le32().
> > - Add prefix to defines.
> > - Add "u-boot,dm-pre-reloc" to clock and system manager nodes.
> >
> > History:
> > v1: https://patchwork.ozlabs.org/cover/1149731/
> >
>
> I think you also need to Simon Goldschmidt to this series.
Simon is in the CC list in my original email.
>
> Beside the minor incorrect address missing a zero in patch 1, I've
> tested this series on the Sockit.
>
> Tested-by: Dinh Nguyen <dinguyen@kernel.org>
>
Regards
Ley Foon
Simon Goldschmidt Sept. 18, 2019, 4:22 a.m. UTC | #3
Ley Foon Tan <lftan.linux@gmail.com> schrieb am Mi., 18. Sep. 2019, 04:32:

> On Wed, Sep 18, 2019 at 6:33 AM Dinh Nguyen <dinguyen@kernel.org> wrote:
> >
> >
> >
> > On 9/10/19 3:37 AM, Ley Foon Tan wrote:
> > > This is 2nd version of patchset to convert reset, system and clock
> manager
> > > drivers to use #define instead of struct.
> > >
> > > Tested on Cyclone 5, Arria 10 and Stratix 10 devices.
> > >
> > > Patch 1 is new one, patch 2 to 4 have changes.
> > >
> > > Main changes in this version are:
> > > - Get base address from DT
> > > - Change to use writel(), readl(), setbits_le32() and clrbits_le32().
> > > - Add prefix to defines.
> > > - Add "u-boot,dm-pre-reloc" to clock and system manager nodes.
> > >
> > > History:
> > > v1: https://patchwork.ozlabs.org/cover/1149731/
> > >
> >
> > I think you also need to Simon Goldschmidt to this series.
> Simon is in the CC list in my original email.
>

And I'm trying my best to catch up with u-boot mails and patches. I already
read it through but failed to find the time to review and test it. Next
week, hopefully...

Regards,
Simon

>
> > Beside the minor incorrect address missing a zero in patch 1, I've
> > tested this series on the Sockit.
> >
> > Tested-by: Dinh Nguyen <dinguyen@kernel.org>
> >
> Regards
> Ley Foon
>
Ley Foon Tan Oct. 2, 2019, 8:13 a.m. UTC | #4
On Wed, Sep 18, 2019 at 12:23 PM Simon Goldschmidt
<simon.k.r.goldschmidt@gmail.com> wrote:
>
>
>
> Ley Foon Tan <lftan.linux@gmail.com> schrieb am Mi., 18. Sep. 2019, 04:32:
>>
>> On Wed, Sep 18, 2019 at 6:33 AM Dinh Nguyen <dinguyen@kernel.org> wrote:
>> >
>> >
>> >
>> > On 9/10/19 3:37 AM, Ley Foon Tan wrote:
>> > > This is 2nd version of patchset to convert reset, system and clock manager
>> > > drivers to use #define instead of struct.
>> > >
>> > > Tested on Cyclone 5, Arria 10 and Stratix 10 devices.
>> > >
>> > > Patch 1 is new one, patch 2 to 4 have changes.
>> > >
>> > > Main changes in this version are:
>> > > - Get base address from DT
>> > > - Change to use writel(), readl(), setbits_le32() and clrbits_le32().
>> > > - Add prefix to defines.
>> > > - Add "u-boot,dm-pre-reloc" to clock and system manager nodes.
>> > >
>> > > History:
>> > > v1: https://patchwork.ozlabs.org/cover/1149731/
>> > >
>> >
>> > I think you also need to Simon Goldschmidt to this series.
>> Simon is in the CC list in my original email.
>
>
> And I'm trying my best to catch up with u-boot mails and patches. I already read it through but failed to find the time to review and test it. Next week, hopefully...
>
> Regards,
> Simon
>
>> >
>> > Beside the minor incorrect address missing a zero in patch 1, I've
>> > tested this series on the Sockit.
>> >
>> > Tested-by: Dinh Nguyen <dinguyen@kernel.org>

Hi Marek and Simon

Any further comment for this series? Otherwise, I will send v3 with
minor change for Dinh's comment.

Thanks.

Regards
Ley Foon
Simon Goldschmidt Oct. 2, 2019, 9:23 a.m. UTC | #5
On Wed, Oct 2, 2019 at 10:13 AM Ley Foon Tan <lftan.linux@gmail.com> wrote:
>
> On Wed, Sep 18, 2019 at 12:23 PM Simon Goldschmidt
> <simon.k.r.goldschmidt@gmail.com> wrote:
> >
> >
> >
> > Ley Foon Tan <lftan.linux@gmail.com> schrieb am Mi., 18. Sep. 2019, 04:32:
> >>
> >> On Wed, Sep 18, 2019 at 6:33 AM Dinh Nguyen <dinguyen@kernel.org> wrote:
> >> >
> >> >
> >> >
> >> > On 9/10/19 3:37 AM, Ley Foon Tan wrote:
> >> > > This is 2nd version of patchset to convert reset, system and clock manager
> >> > > drivers to use #define instead of struct.
> >> > >
> >> > > Tested on Cyclone 5, Arria 10 and Stratix 10 devices.
> >> > >
> >> > > Patch 1 is new one, patch 2 to 4 have changes.
> >> > >
> >> > > Main changes in this version are:
> >> > > - Get base address from DT
> >> > > - Change to use writel(), readl(), setbits_le32() and clrbits_le32().
> >> > > - Add prefix to defines.
> >> > > - Add "u-boot,dm-pre-reloc" to clock and system manager nodes.
> >> > >
> >> > > History:
> >> > > v1: https://patchwork.ozlabs.org/cover/1149731/
> >> > >
> >> >
> >> > I think you also need to Simon Goldschmidt to this series.
> >> Simon is in the CC list in my original email.
> >
> >
> > And I'm trying my best to catch up with u-boot mails and patches. I already read it through but failed to find the time to review and test it. Next week, hopefully...
> >
> > Regards,
> > Simon
> >
> >> >
> >> > Beside the minor incorrect address missing a zero in patch 1, I've
> >> > tested this series on the Sockit.
> >> >
> >> > Tested-by: Dinh Nguyen <dinguyen@kernel.org>
>
> Hi Marek and Simon
>
> Any further comment for this series? Otherwise, I will send v3 with
> minor change for Dinh's comment.

I did my best to catch up now. Ping back if there are still patches missing/
uncommented, please.

Regards,
Simon
Simon Goldschmidt Oct. 9, 2019, 6:42 p.m. UTC | #6
Am 02.10.2019 um 11:23 schrieb Simon Goldschmidt:
> On Wed, Oct 2, 2019 at 10:13 AM Ley Foon Tan <lftan.linux@gmail.com> wrote:
>>
>> On Wed, Sep 18, 2019 at 12:23 PM Simon Goldschmidt
>> <simon.k.r.goldschmidt@gmail.com> wrote:
>>>
>>>
>>>
>>> Ley Foon Tan <lftan.linux@gmail.com> schrieb am Mi., 18. Sep. 2019, 04:32:
>>>>
>>>> On Wed, Sep 18, 2019 at 6:33 AM Dinh Nguyen <dinguyen@kernel.org> wrote:
>>>>>
>>>>>
>>>>>
>>>>> On 9/10/19 3:37 AM, Ley Foon Tan wrote:
>>>>>> This is 2nd version of patchset to convert reset, system and clock manager
>>>>>> drivers to use #define instead of struct.
>>>>>>
>>>>>> Tested on Cyclone 5, Arria 10 and Stratix 10 devices.
>>>>>>
>>>>>> Patch 1 is new one, patch 2 to 4 have changes.
>>>>>>
>>>>>> Main changes in this version are:
>>>>>> - Get base address from DT
>>>>>> - Change to use writel(), readl(), setbits_le32() and clrbits_le32().
>>>>>> - Add prefix to defines.
>>>>>> - Add "u-boot,dm-pre-reloc" to clock and system manager nodes.
>>>>>>
>>>>>> History:
>>>>>> v1: https://patchwork.ozlabs.org/cover/1149731/
>>>>>>
>>>>>
>>>>> I think you also need to Simon Goldschmidt to this series.
>>>> Simon is in the CC list in my original email.
>>>
>>>
>>> And I'm trying my best to catch up with u-boot mails and patches. I already read it through but failed to find the time to review and test it. Next week, hopefully...
>>>
>>> Regards,
>>> Simon
>>>
>>>>>
>>>>> Beside the minor incorrect address missing a zero in patch 1, I've
>>>>> tested this series on the Sockit.
>>>>>
>>>>> Tested-by: Dinh Nguyen <dinguyen@kernel.org>
>>
>> Hi Marek and Simon
>>
>> Any further comment for this series? Otherwise, I will send v3 with
>> minor change for Dinh's comment.
> 
> I did my best to catch up now. Ping back if there are still patches missing/
> uncommented, please.

So could we have v3 with those minor changes (and adjusted commit 
messages)? I'd like to base my series on these changes to prevent merge 
conflicts.

Thanks,
Simon

> 
> Regards,
> Simon
>
Ley Foon Tan Oct. 10, 2019, 12:47 a.m. UTC | #7
On Thu, Oct 10, 2019 at 2:42 AM Simon Goldschmidt
<simon.k.r.goldschmidt@gmail.com> wrote:
>
> Am 02.10.2019 um 11:23 schrieb Simon Goldschmidt:
> > On Wed, Oct 2, 2019 at 10:13 AM Ley Foon Tan <lftan.linux@gmail.com> wrote:
> >>
> >> On Wed, Sep 18, 2019 at 12:23 PM Simon Goldschmidt
> >> <simon.k.r.goldschmidt@gmail.com> wrote:
> >>>
> >>>
> >>>
> >>> Ley Foon Tan <lftan.linux@gmail.com> schrieb am Mi., 18. Sep. 2019, 04:32:
> >>>>
> >>>> On Wed, Sep 18, 2019 at 6:33 AM Dinh Nguyen <dinguyen@kernel.org> wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>> On 9/10/19 3:37 AM, Ley Foon Tan wrote:
> >>>>>> This is 2nd version of patchset to convert reset, system and clock manager
> >>>>>> drivers to use #define instead of struct.
> >>>>>>
> >>>>>> Tested on Cyclone 5, Arria 10 and Stratix 10 devices.
> >>>>>>
> >>>>>> Patch 1 is new one, patch 2 to 4 have changes.
> >>>>>>
> >>>>>> Main changes in this version are:
> >>>>>> - Get base address from DT
> >>>>>> - Change to use writel(), readl(), setbits_le32() and clrbits_le32().
> >>>>>> - Add prefix to defines.
> >>>>>> - Add "u-boot,dm-pre-reloc" to clock and system manager nodes.
> >>>>>>
> >>>>>> History:
> >>>>>> v1: https://patchwork.ozlabs.org/cover/1149731/
> >>>>>>
> >>>>>
> >>>>> I think you also need to Simon Goldschmidt to this series.
> >>>> Simon is in the CC list in my original email.
> >>>
> >>>
> >>> And I'm trying my best to catch up with u-boot mails and patches. I already read it through but failed to find the time to review and test it. Next week, hopefully...
> >>>
> >>> Regards,
> >>> Simon
> >>>
> >>>>>
> >>>>> Beside the minor incorrect address missing a zero in patch 1, I've
> >>>>> tested this series on the Sockit.
> >>>>>
> >>>>> Tested-by: Dinh Nguyen <dinguyen@kernel.org>
> >>
> >> Hi Marek and Simon
> >>
> >> Any further comment for this series? Otherwise, I will send v3 with
> >> minor change for Dinh's comment.
> >
> > I did my best to catch up now. Ping back if there are still patches missing/
> > uncommented, please.
>
> So could we have v3 with those minor changes (and adjusted commit
> messages)? I'd like to base my series on these changes to prevent merge
> conflicts.
>
Sure, I have make those updates. Will send out today.

Thanks.

Regards
Ley Foon