Skip to contentSkip to conversation

ARM: SOC PM domain for 4.12

GIT PULL Santosh Shilimkar 4 participants 5 messages Apr 6, 2017 – Apr 20, 2017

lore
Share & tools
lore
#0 lore raw

Hi Arnd, Olof,

As inidcated on the list, because of various dependencies, am senidng Dave Gerlach's full patchset in single pull request.

The following changes since commit 4495c08e84729385774601b5146d51d9e5849f81:

Linux 4.11-rc2 (2017-03-12 14:47:08 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git tags/arm-soc-pmdomain

for you to fetch changes up to ae3874cc931b760c08bd6617a45fec1ba97d87f8:

ARM: keystone: Drop PM domain support for k2g (2017-04-04 08:59:28 -0700)

----------------------------------------------------------------
ARM SOC PM domain support for 4.12

Dave Gerlach (5):
PM / Domains: Add generic data pointer to genpd data struct PM / Domains: Do not check if simple providers have phandle cells
dt-bindings: Add TI SCI PM Domains
soc: ti: Add ti_sci_pm_domains driver
ARM: keystone: Drop PM domain support for k2g

----------------------------------------------------------------
Dave Gerlach (5):
PM / Domains: Add generic data pointer to genpd data struct PM / Domains: Do not check if simple providers have phandle cells
dt-bindings: Add TI SCI PM Domains
soc: ti: Add ti_sci_pm_domains driver
ARM: keystone: Drop PM domain support for k2g

 .../devicetree/bindings/soc/ti/sci-pm-domain.txt   |  57 ++++++
 MAINTAINERS                                        |   3 +
 arch/arm/mach-keystone/Kconfig                     |   1 +
 arch/arm/mach-keystone/pm_domain.c                 |   4 +-
 drivers/base/power/domain.c                        |   2 -
 drivers/soc/ti/Kconfig                             |  12 ++
 drivers/soc/ti/Makefile                            |   1 +
 drivers/soc/ti/ti_sci_pm_domains.c                 | 202 +++++++++++++++++++++
 include/dt-bindings/genpd/k2g.h                    |  90 +++++++++
 include/linux/pm_domain.h                          |   1 +
 10 files changed, 370 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
 create mode 100644 drivers/soc/ti/ti_sci_pm_domains.c
 create mode 100644 include/dt-bindings/genpd/k2g.h
#1 lore raw
Quoted 20 lines · Santosh Shilimkar

Hi Arnd, Olof,

As inidcated on the list, because of various dependencies, am senidng Dave Gerlach's full patchset in single pull request.

The following changes since commit 4495c08e84729385774601b5146d51d9e5849f81:

Linux 4.11-rc2 (2017-03-12 14:47:08 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git tags/arm-soc-pmdomain

for you to fetch changes up to ae3874cc931b760c08bd6617a45fec1ba97d87f8:

ARM: keystone: Drop PM domain support for k2g (2017-04-04 08:59:28 -0700)

----------------------------------------------------------------
ARM SOC PM domain support for 4.12

Quoted 6 lines

Dave Gerlach (5):
PM / Domains: Add generic data pointer to genpd data struct PM / Domains: Do not check if simple providers have phandle cells
dt-bindings: Add TI SCI PM Domains
soc: ti: Add ti_sci_pm_domains driver
ARM: keystone: Drop PM domain support for k2g

I went through the list of arm at kernel.org emails that had not seen a reply after Olof's pull marathon today. I did not get a reply for this one, but I see that Olof
has merged it into next/drivers.

Since I was looking at it, I also took a closer look at the contents of the patch series. The driver itself looks fine, but for the record, I'm not that happy about seeing a header file duplicating the information from the data sheet: We only use dt-binding headers to establish an interface between the driver and the sources when there is well-defined fixed way to enumerate resources, but in this case there clearly is...

Arnd

#2 lore raw

+Dave,

Quoted 28 lines · Arnd Bergmann
Quoted 20 lines · Santosh Shilimkar

Hi Arnd, Olof,

As inidcated on the list, because of various dependencies, am senidng Dave Gerlach's full patchset in single pull request.

The following changes since commit 4495c08e84729385774601b5146d51d9e5849f81:

Linux 4.11-rc2 (2017-03-12 14:47:08 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git tags/arm-soc-pmdomain

for you to fetch changes up to ae3874cc931b760c08bd6617a45fec1ba97d87f8:

ARM: keystone: Drop PM domain support for k2g (2017-04-04 08:59:28 -0700)

----------------------------------------------------------------
ARM SOC PM domain support for 4.12

Quoted 6 lines

Dave Gerlach (5):
PM / Domains: Add generic data pointer to genpd data struct PM / Domains: Do not check if simple providers have phandle cells
dt-bindings: Add TI SCI PM Domains
soc: ti: Add ti_sci_pm_domains driver
ARM: keystone: Drop PM domain support for k2g

Quoted 5 lines

I went through the list of arm at kernel.org emails that had not seen a reply after Olof's pull marathon today. I did not get a reply for this one, but I see that Olof
has merged it into next/drivers.

Thanks.

Quoted 7 lines

Since I was looking at it, I also took a closer look at the contents of the patch series. The driver itself looks fine, but for the record, I'm not that happy about seeing a header file duplicating the information from the data sheet: We only use dt-binding headers to establish an interface between the driver and the sources when there is well-defined fixed way to enumerate resources, but in this case there clearly is...

Dave, please care to follow up Arnd's concerns on those defines.

Regards,
Santosh

#3 lore raw

Arnd,

Quoted 32 lines · santosh.shilimkar at oracle.com

+Dave,

Quoted 29 lines · Arnd Bergmann
Quoted 27 lines · Santosh Shilimkar

Hi Arnd, Olof,

As inidcated on the list, because of various dependencies, am senidng Dave Gerlach's full patchset in single pull request.

The following changes since commit 4495c08e84729385774601b5146d51d9e5849f81:

Linux 4.11-rc2 (2017-03-12 14:47:08 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git
tags/arm-soc-pmdomain

for you to fetch changes up to ae3874cc931b760c08bd6617a45fec1ba97d87f8:

ARM: keystone: Drop PM domain support for k2g (2017-04-04 08:59:28 -0700)

----------------------------------------------------------------
ARM SOC PM domain support for 4.12

Dave Gerlach (5):
PM / Domains: Add generic data pointer to genpd data struct PM / Domains: Do not check if simple providers have phandle cells
dt-bindings: Add TI SCI PM Domains
soc: ti: Add ti_sci_pm_domains driver
ARM: keystone: Drop PM domain support for k2g

Quoted 14 lines
Quoted 5 lines

I went through the list of arm at kernel.org emails that had not seen a reply after Olof's pull marathon today. I did not get a reply for this one, but I see that Olof
has merged it into next/drivers.

Thanks.

Quoted 7 lines

Since I was looking at it, I also took a closer look at the contents of the patch series. The driver itself looks fine, but for the record, I'm not that happy about seeing a header file duplicating the information from the data sheet: We only use dt-binding headers to establish an interface between the driver and the sources when there is well-defined fixed way to enumerate resources, but in this case there clearly is...

I apologize but I'm not clear on exactly what your concern is? Currently we define a device ID which is associated to a "device" in the firmware's view of the world, however the firmware has no knowledge of what goes on in the kernel and vice-versa. The device ID is associated to that device only on that hardware, it could be a different ID on a different SoC making use of SCI. The only way a device is identified to the firmware is through this number, it will also be used by the ti-sci-clock [1] and ti-sci-reset [2] drivers to identify the device.

I'm not sure what you mean by "We only use dt-binding headers to establish an interface between the driver and the sources when there is well-defined fixed way to enumerate resources."

Regards,
Dave

[1] https://www.spinics.net/lists/arm-kernel/msg537665.html
[2] https://www.spinics.net/lists/devicetree/msg151643.html

Quoted 9 lines

Dave, please care to follow up Arnd's concerns on those defines.

Regards,
Santosh

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#4 lore raw
Quoted 21 lines · Dave Gerlach
Quoted 10 lines · santosh.shilimkar at oracle.com
Quoted 7 lines · Arnd Bergmann

Since I was looking at it, I also took a closer look at the contents of the patch series. The driver itself looks fine, but for the record, I'm not that happy about seeing a header file duplicating the information from the data sheet: We only use dt-binding headers to establish an interface between the driver and the sources when there is well-defined fixed way to enumerate resources, but in this case there clearly is...

I apologize but I'm not clear on exactly what your concern is? Currently we define a device ID which is associated to a "device" in the firmware's view of the world, however the firmware has no knowledge of what goes on in the kernel and vice-versa. The device ID is associated to that device only on that hardware, it could be a different ID on a different SoC making use of SCI. The only way a device is identified to the firmware is through this number, it will also be used by the ti-sci-clock [1] and ti-sci-reset [2] drivers to identify the device.

Quoted 3 lines

I'm not sure what you mean by "We only use dt-binding headers to establish an interface between the driver and the sources when there is well-defined fixed way to enumerate resources."

More generally speaking, header files are used as interfaces when you want to ensure that a number you pick, or a function prototype is the same between two or more parts of a system.

For the reset handling and the pm domain, this is not the case: the header only gets included by the dts files and the driver does not use it at all, so you can simply remove the header and open-code the numbers in the dts file, as you do in the same files for all other numbers (register addresses, interrupts, gpio lines). Please remove these to save the pointless indirection.

For the clk driver, this is a little less obvious as you do use the K2G_DEV_* macros in both the dts files and in the driver. However, I think these still fall in the same basic category, as the numbers are not picked arbitrarily when writing the driver to describe the usual mess of register offsets in a clock controller. Rather this one is apparently used for communicating with the firmware using a proper interface, so you can simply move the header file contents into the driver.

Arnd