Re: [RFC PATCH v3 3/9] clk: renesas: add R906G032 driver
On 2/24/23 19:00, Ralph Siemsen wrote: Hi Marek, On Fri, Feb 24, 2023 at 12:05 PM Marek Vasut wrote: Could you at least submit the clean up to Linux and then sync the result to U-Boot, and indicate the Linux clock table came from commit with extra patch on top ? Yes will do. I am refreshing my linux-side patch as we speak. Thanks !
Re: [RFC PATCH v3 3/9] clk: renesas: add R906G032 driver
Hi Marek, On Fri, Feb 24, 2023 at 12:05 PM Marek Vasut wrote: > > Could you at least submit the clean up to Linux and then sync the result > to U-Boot, and indicate the Linux clock table came from commit > with extra patch on top ? Yes will do. I am refreshing my linux-side patch as we speak. Ralph
Re: [RFC PATCH v3 3/9] clk: renesas: add R906G032 driver
On 2/24/23 16:14, Ralph Siemsen wrote: On Thu, Feb 23, 2023 at 9:09 AM Miquel Raynal wrote: Hi Marek, marek.va...@mailbox.org wrote on Thu, 23 Feb 2023 14:56:41 +0100: Either way is fine by me, I just want to be sure the u-boot clock tables are in sync with Linux as much as possible, and can be easily resynced in the future, that's all. Of course. The fix is mainline already, so on that regard we should be fine. Right, so mainline has all the fixes, the only thing missing there is the "cleanup" of the clock tables, which I have done in the u-boot version under review. Assuming this is satisfactory, I will aim to get the same cleanup done on the clock tables in the kernel side, so they are in sync with u-boot. Could you at least submit the clean up to Linux and then sync the result to U-Boot, and indicate the Linux clock table came from commit with extra patch on top ? I think that would be best.
Re: [RFC PATCH v3 3/9] clk: renesas: add R906G032 driver
On Thu, Feb 23, 2023 at 9:09 AM Miquel Raynal wrote: > > Hi Marek, > > marek.va...@mailbox.org wrote on Thu, 23 Feb 2023 14:56:41 +0100: > > > > Either way is fine by me, I just want to be sure the u-boot clock tables > > are in sync with Linux as much as possible, and can be easily resynced in > > the future, that's all. > > Of course. The fix is mainline already, so on that regard we should be > fine. Right, so mainline has all the fixes, the only thing missing there is the "cleanup" of the clock tables, which I have done in the u-boot version under review. Assuming this is satisfactory, I will aim to get the same cleanup done on the clock tables in the kernel side, so they are in sync with u-boot. Ralp
Re: [RFC PATCH v3 3/9] clk: renesas: add R906G032 driver
Hi Marek, marek.va...@mailbox.org wrote on Thu, 23 Feb 2023 14:56:41 +0100: > On 2/23/23 08:17, Miquel Raynal wrote: > > Hello Marek & Ralph, > > > > marek.va...@mailbox.org wrote on Thu, 23 Feb 2023 01:12:49 +0100: > > > >> On 2/22/23 20:32, Ralph Siemsen wrote: > >>> On Wed, Feb 22, 2023 at 07:45:45PM +0100, Marek Vasut wrote: > On 2/22/23 19:32, Ralph Siemsen wrote: > > On Wed, Feb 22, 2023 at 06:47:44PM +0100, Marek Vasut wrote: > >> Are those fixes in mainline Linux ? > > > > Yes, they are in mainline: > > 2dee50ab9e72 clk: renesas: r9a06g032: Fix UART clkgrp bitsel > > merged into 6.0, and also backported to earlier LTS branches > > 2a6da4a11f47 clk: renesas: r9a06g032: Fix the RTC hclock description > > merged into 5.19, seems to be missing from LTS branches > > Use Linux 6.2.y as a base then. > >>> > >>> Okay, done. > >>> And please submit the missing patches for LTS branch inclusion > >>> too if >> possible, I guess they were missing Fixes: tag ? > >>> > >>> Seems it was part of a series which added support for the RTC device: > >>> https://lore.kernel.org/all/20220421090016.79517-3-miquel.ray...@bootlin.com/ > >>> Since it is new feature, I guess one could argue that the clock table > > >>> fix is not needed in older LTS kernels, since no driver uses that clock. > >>> But most likely it was just overlooked. I'll check with Miquel. > >> > >> Much appreciated, thanks ! > >> > >> +CC Miquel > > > > As Ralph rightly pointed out, even though the clock description was > > wrong there was no user at that time so I did not bother with a Fixes > > tag. Anyhow, as the change does only impact the RTC clock, it should be > > harmless to backport if you want. > > Either way is fine by me, I just want to be sure the u-boot clock tables are > in sync with Linux as much as possible, and can be easily resynced in the > future, that's all. Of course. The fix is mainline already, so on that regard we should be fine. Thanks, Miquèl
Re: [RFC PATCH v3 3/9] clk: renesas: add R906G032 driver
On 2/23/23 08:17, Miquel Raynal wrote: Hello Marek & Ralph, marek.va...@mailbox.org wrote on Thu, 23 Feb 2023 01:12:49 +0100: On 2/22/23 20:32, Ralph Siemsen wrote: On Wed, Feb 22, 2023 at 07:45:45PM +0100, Marek Vasut wrote: On 2/22/23 19:32, Ralph Siemsen wrote: On Wed, Feb 22, 2023 at 06:47:44PM +0100, Marek Vasut wrote: Are those fixes in mainline Linux ? Yes, they are in mainline: 2dee50ab9e72 clk: renesas: r9a06g032: Fix UART clkgrp bitsel merged into 6.0, and also backported to earlier LTS branches 2a6da4a11f47 clk: renesas: r9a06g032: Fix the RTC hclock description merged into 5.19, seems to be missing from LTS branches Use Linux 6.2.y as a base then. Okay, done. And please submit the missing patches for LTS branch inclusion too if >> possible, I guess they were missing Fixes: tag ? Seems it was part of a series which added support for the RTC device: https://lore.kernel.org/all/20220421090016.79517-3-miquel.ray...@bootlin.com/ Since it is new feature, I guess one could argue that the clock table > fix is not needed in older LTS kernels, since no driver uses that clock. But most likely it was just overlooked. I'll check with Miquel. Much appreciated, thanks ! +CC Miquel As Ralph rightly pointed out, even though the clock description was wrong there was no user at that time so I did not bother with a Fixes tag. Anyhow, as the change does only impact the RTC clock, it should be harmless to backport if you want. Either way is fine by me, I just want to be sure the u-boot clock tables are in sync with Linux as much as possible, and can be easily resynced in the future, that's all.
Re: [RFC PATCH v3 3/9] clk: renesas: add R906G032 driver
Hello Marek & Ralph, marek.va...@mailbox.org wrote on Thu, 23 Feb 2023 01:12:49 +0100: > On 2/22/23 20:32, Ralph Siemsen wrote: > > On Wed, Feb 22, 2023 at 07:45:45PM +0100, Marek Vasut wrote: > >> On 2/22/23 19:32, Ralph Siemsen wrote: > >>> On Wed, Feb 22, 2023 at 06:47:44PM +0100, Marek Vasut wrote: > Are those fixes in mainline Linux ? > >>> > >>> Yes, they are in mainline: > >>> 2dee50ab9e72 clk: renesas: r9a06g032: Fix UART clkgrp bitsel > >>> merged into 6.0, and also backported to earlier LTS branches > >>> 2a6da4a11f47 clk: renesas: r9a06g032: Fix the RTC hclock description > >>> merged into 5.19, seems to be missing from LTS branches > >> > >> Use Linux 6.2.y as a base then. > > > > Okay, done. > > > >> And please submit the missing patches for LTS branch inclusion too if >> > >> possible, I guess they were missing Fixes: tag ? > > > > Seems it was part of a series which added support for the RTC device: > > https://lore.kernel.org/all/20220421090016.79517-3-miquel.ray...@bootlin.com/ > > Since it is new feature, I guess one could argue that the clock table > fix > > is not needed in older LTS kernels, since no driver uses that clock. > > But most likely it was just overlooked. I'll check with Miquel. > > Much appreciated, thanks ! > > +CC Miquel As Ralph rightly pointed out, even though the clock description was wrong there was no user at that time so I did not bother with a Fixes tag. Anyhow, as the change does only impact the RTC clock, it should be harmless to backport if you want. Thanks, Miquèl
Re: [RFC PATCH v3 3/9] clk: renesas: add R906G032 driver
On 2/22/23 20:32, Ralph Siemsen wrote: On Wed, Feb 22, 2023 at 07:45:45PM +0100, Marek Vasut wrote: On 2/22/23 19:32, Ralph Siemsen wrote: On Wed, Feb 22, 2023 at 06:47:44PM +0100, Marek Vasut wrote: Are those fixes in mainline Linux ? Yes, they are in mainline: 2dee50ab9e72 clk: renesas: r9a06g032: Fix UART clkgrp bitsel merged into 6.0, and also backported to earlier LTS branches 2a6da4a11f47 clk: renesas: r9a06g032: Fix the RTC hclock description merged into 5.19, seems to be missing from LTS branches Use Linux 6.2.y as a base then. Okay, done. And please submit the missing patches for LTS branch inclusion too if possible, I guess they were missing Fixes: tag ? Seems it was part of a series which added support for the RTC device: https://lore.kernel.org/all/20220421090016.79517-3-miquel.ray...@bootlin.com/ Since it is new feature, I guess one could argue that the clock table fix is not needed in older LTS kernels, since no driver uses that clock. But most likely it was just overlooked. I'll check with Miquel. Much appreciated, thanks ! +CC Miquel
Re: [RFC PATCH v3 3/9] clk: renesas: add R906G032 driver
On Wed, Feb 22, 2023 at 07:45:45PM +0100, Marek Vasut wrote: On 2/22/23 19:32, Ralph Siemsen wrote: On Wed, Feb 22, 2023 at 06:47:44PM +0100, Marek Vasut wrote: Are those fixes in mainline Linux ? Yes, they are in mainline: 2dee50ab9e72 clk: renesas: r9a06g032: Fix UART clkgrp bitsel merged into 6.0, and also backported to earlier LTS branches 2a6da4a11f47 clk: renesas: r9a06g032: Fix the RTC hclock description merged into 5.19, seems to be missing from LTS branches Use Linux 6.2.y as a base then. Okay, done. And please submit the missing patches for LTS branch inclusion too if possible, I guess they were missing Fixes: tag ? Seems it was part of a series which added support for the RTC device: https://lore.kernel.org/all/20220421090016.79517-3-miquel.ray...@bootlin.com/ Since it is new feature, I guess one could argue that the clock table fix is not needed in older LTS kernels, since no driver uses that clock. But most likely it was just overlooked. I'll check with Miquel. Regards, Ralph
Re: [RFC PATCH v3 3/9] clk: renesas: add R906G032 driver
On 2/22/23 19:32, Ralph Siemsen wrote: On Wed, Feb 22, 2023 at 06:47:44PM +0100, Marek Vasut wrote: On 2/22/23 18:21, Ralph Siemsen wrote: On Wed, Feb 22, 2023 at 06:07:45PM +0100, Marek Vasut wrote: On 2/22/23 17:57, Ralph Siemsen wrote: On Wed, Feb 22, 2023 at 05:06:14PM +0100, Marek Vasut wrote: On 2/22/23 16:44, Ralph Siemsen wrote: Clock driver for the Renesas RZ/N1 SoC family. This is based on the Linux kernel drivers/clk/renesas/r9a06g032-clocks.c. For starters, can you please include the exact kernel version , ideally commit ID, from which this way pulled, so that future updates can pull in the diffs from that commit easily ? Very reasonable request, but a bit difficult to give a concise answer. Originally I took the driver as found in the 5.15 kernel. The driver actually had not changed since 5.13 commit 6bd913f54f2f ("clk: renesas: r9a06g032: Switch to .determine_rate()"). So that's the starting point. I incorporated subsequent changes to the clock tables and related cleanups. Those were only merged into Linux much later: 2dee50ab9e72 clk: renesas: r9a06g032: Fix UART clkgrp bitsel f46efcc4746f clk: renesas: r9a06g032: Drop some unused fields 2a6da4a11f47 clk: renesas: r9a06g032: Fix the RTC hclock description Linux driver also had a few other commits, but these are not applicable to the u-boot version due to structural changes: 6bd913f54f2f clk: renesas: r9a06g032: Switch to .determine_rate() f2fb4fe62390 clk: renesas: Zero init clk_init_data 2182066d95c3 clk: renesas: r9a06g032: Probe possible children 885525c1e7e2 clk: renesas: r9a06g032: Export function to set dmamux 02693e11611e clk: renesas: r9a06g032: Repair grave increment error So I would say it is "up to date" with the lastest Linux commit, even though it is based on an earlier version. Is there a good way to include the above in the commit message, succinctly? Is this still in sync with Linux 6.1.y ? That's the latest LTS . Yes. Although the commits have different hashes than what I reported above, the 6.1.y LTS branch has the same changes. Then please include the Linux 6.1.y commit ID , or Torvalds' tree if that contains new fixes . Let's not use some old/downstream stuff . I've amended the commit message as follows: Clock driver for the Renesas RZ/N1 SoC family. This is based on the Linux kernel drivers/clk/renesas/r9a06g032-clocks.c as found in commit 02693e11611e ("clk: renesas: r9a06g032: Repair grave increment error") included in Torvalds kernel v6.2. Identical code is in LTS 6.1.y. Thank you ! Note that the u-boot version of the driver has changed considerably from the Linux version. In terms of pulling future diffs over, I would be concerned mostly about keeping the clock tables in sync. There have been a few mistakes found and fixed in those already. Are those fixes in mainline Linux ? Yes, they are in mainline: 2dee50ab9e72 clk: renesas: r9a06g032: Fix UART clkgrp bitsel merged into 6.0, and also backported to earlier LTS branches 2a6da4a11f47 clk: renesas: r9a06g032: Fix the RTC hclock description merged into 5.19, seems to be missing from LTS branches Use Linux 6.2.y as a base then. And please submit the missing patches for LTS branch inclusion too if possible, I guess they were missing Fixes: tag ?
Re: [RFC PATCH v3 3/9] clk: renesas: add R906G032 driver
On Wed, Feb 22, 2023 at 06:47:44PM +0100, Marek Vasut wrote: On 2/22/23 18:21, Ralph Siemsen wrote: On Wed, Feb 22, 2023 at 06:07:45PM +0100, Marek Vasut wrote: On 2/22/23 17:57, Ralph Siemsen wrote: On Wed, Feb 22, 2023 at 05:06:14PM +0100, Marek Vasut wrote: On 2/22/23 16:44, Ralph Siemsen wrote: Clock driver for the Renesas RZ/N1 SoC family. This is based on the Linux kernel drivers/clk/renesas/r9a06g032-clocks.c. For starters, can you please include the exact kernel version , ideally commit ID, from which this way pulled, so that future updates can pull in the diffs from that commit easily ? Very reasonable request, but a bit difficult to give a concise answer. Originally I took the driver as found in the 5.15 kernel. The driver actually had not changed since 5.13 commit 6bd913f54f2f ("clk: renesas: r9a06g032: Switch to .determine_rate()"). So that's the starting point. I incorporated subsequent changes to the clock tables and related cleanups. Those were only merged into Linux much later: 2dee50ab9e72 clk: renesas: r9a06g032: Fix UART clkgrp bitsel f46efcc4746f clk: renesas: r9a06g032: Drop some unused fields 2a6da4a11f47 clk: renesas: r9a06g032: Fix the RTC hclock description Linux driver also had a few other commits, but these are not applicable to the u-boot version due to structural changes: 6bd913f54f2f clk: renesas: r9a06g032: Switch to .determine_rate() f2fb4fe62390 clk: renesas: Zero init clk_init_data 2182066d95c3 clk: renesas: r9a06g032: Probe possible children 885525c1e7e2 clk: renesas: r9a06g032: Export function to set dmamux 02693e11611e clk: renesas: r9a06g032: Repair grave increment error So I would say it is "up to date" with the lastest Linux commit, even though it is based on an earlier version. Is there a good way to include the above in the commit message, succinctly? Is this still in sync with Linux 6.1.y ? That's the latest LTS . Yes. Although the commits have different hashes than what I reported above, the 6.1.y LTS branch has the same changes. Then please include the Linux 6.1.y commit ID , or Torvalds' tree if that contains new fixes . Let's not use some old/downstream stuff . I've amended the commit message as follows: Clock driver for the Renesas RZ/N1 SoC family. This is based on the Linux kernel drivers/clk/renesas/r9a06g032-clocks.c as found in commit 02693e11611e ("clk: renesas: r9a06g032: Repair grave increment error") included in Torvalds kernel v6.2. Identical code is in LTS 6.1.y. Note that the u-boot version of the driver has changed considerably from the Linux version. In terms of pulling future diffs over, I would be concerned mostly about keeping the clock tables in sync. There have been a few mistakes found and fixed in those already. Are those fixes in mainline Linux ? Yes, they are in mainline: 2dee50ab9e72 clk: renesas: r9a06g032: Fix UART clkgrp bitsel merged into 6.0, and also backported to earlier LTS branches 2a6da4a11f47 clk: renesas: r9a06g032: Fix the RTC hclock description merged into 5.19, seems to be missing from LTS branches Regards, Ralph
Re: [RFC PATCH v3 3/9] clk: renesas: add R906G032 driver
On 2/22/23 18:21, Ralph Siemsen wrote: On Wed, Feb 22, 2023 at 06:07:45PM +0100, Marek Vasut wrote: On 2/22/23 17:57, Ralph Siemsen wrote: On Wed, Feb 22, 2023 at 05:06:14PM +0100, Marek Vasut wrote: On 2/22/23 16:44, Ralph Siemsen wrote: Clock driver for the Renesas RZ/N1 SoC family. This is based on the Linux kernel drivers/clk/renesas/r9a06g032-clocks.c. For starters, can you please include the exact kernel version , ideally commit ID, from which this way pulled, so that future updates can pull in the diffs from that commit easily ? Very reasonable request, but a bit difficult to give a concise answer. Originally I took the driver as found in the 5.15 kernel. The driver actually had not changed since 5.13 commit 6bd913f54f2f ("clk: renesas: r9a06g032: Switch to .determine_rate()"). So that's the starting point. I incorporated subsequent changes to the clock tables and related cleanups. Those were only merged into Linux much later: 2dee50ab9e72 clk: renesas: r9a06g032: Fix UART clkgrp bitsel f46efcc4746f clk: renesas: r9a06g032: Drop some unused fields 2a6da4a11f47 clk: renesas: r9a06g032: Fix the RTC hclock description Linux driver also had a few other commits, but these are not applicable to the u-boot version due to structural changes: 6bd913f54f2f clk: renesas: r9a06g032: Switch to .determine_rate() f2fb4fe62390 clk: renesas: Zero init clk_init_data 2182066d95c3 clk: renesas: r9a06g032: Probe possible children 885525c1e7e2 clk: renesas: r9a06g032: Export function to set dmamux 02693e11611e clk: renesas: r9a06g032: Repair grave increment error So I would say it is "up to date" with the lastest Linux commit, even though it is based on an earlier version. Is there a good way to include the above in the commit message, succinctly? Is this still in sync with Linux 6.1.y ? That's the latest LTS . Yes. Although the commits have different hashes than what I reported above, the 6.1.y LTS branch has the same changes. Then please include the Linux 6.1.y commit ID , or Torvalds' tree if that contains new fixes . Let's not use some old/downstream stuff . Note that the u-boot version of the driver has changed considerably from the Linux version. In terms of pulling future diffs over, I would be concerned mostly about keeping the clock tables in sync. There have been a few mistakes found and fixed in those already. Are those fixes in mainline Linux ?
Re: [RFC PATCH v3 3/9] clk: renesas: add R906G032 driver
On Wed, Feb 22, 2023 at 06:07:45PM +0100, Marek Vasut wrote: On 2/22/23 17:57, Ralph Siemsen wrote: On Wed, Feb 22, 2023 at 05:06:14PM +0100, Marek Vasut wrote: On 2/22/23 16:44, Ralph Siemsen wrote: Clock driver for the Renesas RZ/N1 SoC family. This is based on the Linux kernel drivers/clk/renesas/r9a06g032-clocks.c. For starters, can you please include the exact kernel version , ideally commit ID, from which this way pulled, so that future updates can pull in the diffs from that commit easily ? Very reasonable request, but a bit difficult to give a concise answer. Originally I took the driver as found in the 5.15 kernel. The driver actually had not changed since 5.13 commit 6bd913f54f2f ("clk: renesas: r9a06g032: Switch to .determine_rate()"). So that's the starting point. I incorporated subsequent changes to the clock tables and related cleanups. Those were only merged into Linux much later: 2dee50ab9e72 clk: renesas: r9a06g032: Fix UART clkgrp bitsel f46efcc4746f clk: renesas: r9a06g032: Drop some unused fields 2a6da4a11f47 clk: renesas: r9a06g032: Fix the RTC hclock description Linux driver also had a few other commits, but these are not applicable to the u-boot version due to structural changes: 6bd913f54f2f clk: renesas: r9a06g032: Switch to .determine_rate() f2fb4fe62390 clk: renesas: Zero init clk_init_data 2182066d95c3 clk: renesas: r9a06g032: Probe possible children 885525c1e7e2 clk: renesas: r9a06g032: Export function to set dmamux 02693e11611e clk: renesas: r9a06g032: Repair grave increment error So I would say it is "up to date" with the lastest Linux commit, even though it is based on an earlier version. Is there a good way to include the above in the commit message, succinctly? Is this still in sync with Linux 6.1.y ? That's the latest LTS . Yes. Although the commits have different hashes than what I reported above, the 6.1.y LTS branch has the same changes. Note that the u-boot version of the driver has changed considerably from the Linux version. In terms of pulling future diffs over, I would be concerned mostly about keeping the clock tables in sync. There have been a few mistakes found and fixed in those already. Ralph
Re: [RFC PATCH v3 3/9] clk: renesas: add R906G032 driver
On 2/22/23 17:57, Ralph Siemsen wrote: On Wed, Feb 22, 2023 at 05:06:14PM +0100, Marek Vasut wrote: On 2/22/23 16:44, Ralph Siemsen wrote: Clock driver for the Renesas RZ/N1 SoC family. This is based on the Linux kernel drivers/clk/renesas/r9a06g032-clocks.c. For starters, can you please include the exact kernel version , ideally commit ID, from which this way pulled, so that future updates can pull in the diffs from that commit easily ? Very reasonable request, but a bit difficult to give a concise answer. Originally I took the driver as found in the 5.15 kernel. The driver actually had not changed since 5.13 commit 6bd913f54f2f ("clk: renesas: r9a06g032: Switch to .determine_rate()"). So that's the starting point. I incorporated subsequent changes to the clock tables and related cleanups. Those were only merged into Linux much later: 2dee50ab9e72 clk: renesas: r9a06g032: Fix UART clkgrp bitsel f46efcc4746f clk: renesas: r9a06g032: Drop some unused fields 2a6da4a11f47 clk: renesas: r9a06g032: Fix the RTC hclock description Linux driver also had a few other commits, but these are not applicable to the u-boot version due to structural changes: 6bd913f54f2f clk: renesas: r9a06g032: Switch to .determine_rate() f2fb4fe62390 clk: renesas: Zero init clk_init_data 2182066d95c3 clk: renesas: r9a06g032: Probe possible children 885525c1e7e2 clk: renesas: r9a06g032: Export function to set dmamux 02693e11611e clk: renesas: r9a06g032: Repair grave increment error So I would say it is "up to date" with the lastest Linux commit, even though it is based on an earlier version. Is there a good way to include the above in the commit message, succinctly? Is this still in sync with Linux 6.1.y ? That's the latest LTS . Also, can you please CC me on the entire series ? I've added you to series-cc for future versions. Note that some of the mails are currently stuck in moderation queue (too many recipients). I let patman pick the default recipients. Thanks
Re: [RFC PATCH v3 3/9] clk: renesas: add R906G032 driver
On Wed, Feb 22, 2023 at 05:06:14PM +0100, Marek Vasut wrote: On 2/22/23 16:44, Ralph Siemsen wrote: Clock driver for the Renesas RZ/N1 SoC family. This is based on the Linux kernel drivers/clk/renesas/r9a06g032-clocks.c. For starters, can you please include the exact kernel version , ideally commit ID, from which this way pulled, so that future updates can pull in the diffs from that commit easily ? Very reasonable request, but a bit difficult to give a concise answer. Originally I took the driver as found in the 5.15 kernel. The driver actually had not changed since 5.13 commit 6bd913f54f2f ("clk: renesas: r9a06g032: Switch to .determine_rate()"). So that's the starting point. I incorporated subsequent changes to the clock tables and related cleanups. Those were only merged into Linux much later: 2dee50ab9e72 clk: renesas: r9a06g032: Fix UART clkgrp bitsel f46efcc4746f clk: renesas: r9a06g032: Drop some unused fields 2a6da4a11f47 clk: renesas: r9a06g032: Fix the RTC hclock description Linux driver also had a few other commits, but these are not applicable to the u-boot version due to structural changes: 6bd913f54f2f clk: renesas: r9a06g032: Switch to .determine_rate() f2fb4fe62390 clk: renesas: Zero init clk_init_data 2182066d95c3 clk: renesas: r9a06g032: Probe possible children 885525c1e7e2 clk: renesas: r9a06g032: Export function to set dmamux 02693e11611e clk: renesas: r9a06g032: Repair grave increment error So I would say it is "up to date" with the lastest Linux commit, even though it is based on an earlier version. Is there a good way to include the above in the commit message, succinctly? Also, can you please CC me on the entire series ? I've added you to series-cc for future versions. Note that some of the mails are currently stuck in moderation queue (too many recipients). I let patman pick the default recipients. Ralph
Re: [RFC PATCH v3 3/9] clk: renesas: add R906G032 driver
On 2/22/23 16:44, Ralph Siemsen wrote: Clock driver for the Renesas RZ/N1 SoC family. This is based on the Linux kernel drivers/clk/renesas/r9a06g032-clocks.c. For starters, can you please include the exact kernel version , ideally commit ID, from which this way pulled, so that future updates can pull in the diffs from that commit easily ? Also, can you please CC me on the entire series ? Thanks
[RFC PATCH v3 3/9] clk: renesas: add R906G032 driver
Clock driver for the Renesas RZ/N1 SoC family. This is based on the Linux kernel drivers/clk/renesas/r9a06g032-clocks.c. Notable difference: this version avoids allocating a 'struct clk' for each clock source, as this is problematic before relocation. Instead, it uses the same approach as existing Renesas RCAR2/3 clock drivers, using a temporary structure filled on-the-fly. Signed-off-by: Ralph Siemsen --- Changes in v3: - convert data table to explicit reg/bit numbers - drop the unused scon, mirack, mirstat fields - added some kernel docs to structures - use enum for type field of struct r9a06g032_clkdesc - cleanup macros for one assignment per line - add a macro for top-most clock ID value ~0 - use dev_dbg() instead of debug/print - minor reformatting, declarations before code, etc - !foo instead of foo == 0 - IS_ERR / PTR_ERR where appropriate - implement div_table handling - remove some #if 0 old test code drivers/clk/renesas/Kconfig|6 + drivers/clk/renesas/Makefile |1 + drivers/clk/renesas/r9a06g032-clocks.c | 1077 3 files changed, 1084 insertions(+) create mode 100644 drivers/clk/renesas/r9a06g032-clocks.c diff --git a/drivers/clk/renesas/Kconfig b/drivers/clk/renesas/Kconfig index 6788415eed..bbc618f464 100644 --- a/drivers/clk/renesas/Kconfig +++ b/drivers/clk/renesas/Kconfig @@ -130,3 +130,9 @@ config CLK_R8A779A0 depends on CLK_RCAR_GEN3 help Enable this to support the clocks on Renesas R8A779A0 SoC. + +config CLK_R9A06G032 + bool "Renesas R9A06G032 clock driver" + depends on CLK_RENESAS + help + Enable this to support the clocks on Renesas R9A06G032 SoC. diff --git a/drivers/clk/renesas/Makefile b/drivers/clk/renesas/Makefile index a0d8c10bdb..7f0ef28367 100644 --- a/drivers/clk/renesas/Makefile +++ b/drivers/clk/renesas/Makefile @@ -19,3 +19,4 @@ obj-$(CONFIG_CLK_R8A77980) += r8a77980-cpg-mssr.o obj-$(CONFIG_CLK_R8A77990) += r8a77990-cpg-mssr.o obj-$(CONFIG_CLK_R8A77995) += r8a77995-cpg-mssr.o obj-$(CONFIG_CLK_R8A779A0) += r8a779a0-cpg-mssr.o +obj-$(CONFIG_CLK_R9A06G032) += r9a06g032-clocks.o diff --git a/drivers/clk/renesas/r9a06g032-clocks.c b/drivers/clk/renesas/r9a06g032-clocks.c new file mode 100644 index 00..5ea076ae8f --- /dev/null +++ b/drivers/clk/renesas/r9a06g032-clocks.c @@ -0,0 +1,1077 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * R9A06G032 clock driver + * + * Copyright (C) 2018 Renesas Electronics Europe Limited + * + * Michel Pollet , + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/** + * struct regbit - describe one bit in a register + * @reg: offset of register relative to base address, + * expressed in units of 32-bit words (not bytes), + * @bit: which bit (0 to 31) in the register + * + * This structure is used to compactly encode the location + * of a single bit in a register. Five bits are needed to + * encode the bit number. With uint16_t data type, this + * leaves 11 bits to encode a register offset up to 2047. + * + * Since registers are aligned on 32-bit boundaries, the + * offset will be specified in 32-bit words rather than bytes. + * This allows encoding an offset up to 0x1FFC (8188) bytes. + */ +struct regbit { + u16 reg:11; + u16 bit:5; +}; + +/** + * struct r9a06g032_gate - clock gate control bits + * @gate: bit which enables/disables the clock + * @reset: bit which controls module reset (active low) + * @ready: bit which indicates device is ready for access + * @midle: bit which requests to idle the NoC interconnect + * + * Each of these fields describes a single bit in a register, + * which controls some aspect of clock gating. The @gate field + * is mandatory, this one enables/disables the clock. The + * other fields are optional, with zero indicating "not used". + * + * In most cases there is a @reset bit which needs to be + * de-asserted to bring the module out of reset. + * + * Modules may also need to signal when the are @ready to + * handle requests (read/writes) from the NoC interconnect. + * + * Similarly, the @midle bit is used to idle the master. + */ +struct r9a06g032_gate { + struct regbit gate, reset, ready, midle; + /* Unused fields omitted to save space */ + /* struct regbit scon, mirack, mistat */; +}; + +enum gate_type { + K_GATE = 0, /* gate which enable/disable */ + K_FFC, /* fixed factor clock */ + K_DIV, /* divisor */ + K_BITSEL, /* special for UARTs */ + K_DUALGATE /* special for UARTs */ +}; + +/** + * struct r9a06g032_clkdesc - describe a single clock + * @name:string describing this clock + * @managed: not used in u-boot + * @type: see enum gate_type + * @index: the ID of this clock element + * @source: the ID+1 of the parent clock element. + * Root clock uses ID of ~0 (PARENT_ID); + * @gate: descri