mbox series

[V8,0/9] Refactor and add AHCI support for Tegra210

Message ID 1520854838-21779-1-git-send-email-pchandru@nvidia.com
Headers show
Series Refactor and add AHCI support for Tegra210 | expand

Message

Preetham Chandru Ramchandra March 12, 2018, 11:40 a.m. UTC
From: Preetham Ramchandra <pchandru@nvidia.com>

1. ADD AHCI support for Tegra210
2. Extend the Tegra AHCI controller device tree binding with Tegra210
3. Update initialization sequence
4. Initialize regulators based on chip
5. Disable DevSlp
6. Disable DIPM
---

Preetham Ramchandra (9):
  dt-bindings: Tegra210: add binding documentation
  arm64: tegra: Add SATA node for Tegra210
  arm64: tegra: Enable AHCI on Jetson TX1
  ata: ahci_tegra: Update initialization sequence
  ata: ahci_tegra: initialize regulators from soc struct
  ata: ahci_tegra: disable devslp for Tegra124
  ata: ahci_tegra: disable DIPM
  ata: ahci_tegra: Add AHCI support for Tegra210
  ata: change Tegra124 to Tegra

 .../bindings/ata/nvidia,tegra124-ahci.txt          |  36 ++-
 arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi     |   5 +
 arch/arm64/boot/dts/nvidia/tegra210.dtsi           |  16 +
 drivers/ata/Kconfig                                |   4 +-
 drivers/ata/ahci_tegra.c                           | 359 ++++++++++++++++-----
 5 files changed, 330 insertions(+), 90 deletions(-)

Comments

Thierry Reding March 12, 2018, 12:14 p.m. UTC | #1
On Mon, Mar 12, 2018 at 05:10:33PM +0530, Preetham Chandru Ramchandra wrote:
> From: Preetham Ramchandra <pchandru@nvidia.com>
> 
> Update the controller initialization sequence and move Tegra124
> specifics to tegra124_ahci_init.
> 
> Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
> ---
> v8:
> * Renamed soc_data variable to soc and made it const.
> * Removed unneeded whitespace change.
> * Made use the full width of a line for comments.
> * Renamed tegra124_ahci_soc_data to tegra124_ahci_soc.
> * Made ops a pointer to a function table.
> v7:
> * moved tegra124_ahci_soc_data definition to be
>   just above the of_device_id table.
> ---
>  drivers/ata/ahci_tegra.c | 288 ++++++++++++++++++++++++++++++++++++-----------
>  1 file changed, 224 insertions(+), 64 deletions(-)

Acked-by: Thierry Reding <treding@nvidia.com>
Thierry Reding March 12, 2018, 12:14 p.m. UTC | #2
On Mon, Mar 12, 2018 at 05:10:34PM +0530, Preetham Chandru Ramchandra wrote:
> From: Preetham Ramchandra <pchandru@nvidia.com>
> 
> Get the regulator names to be initialized from soc structure
> and initialize them.
> 
> Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
> ---
> v8:
> * renamed tegra->soc_data to tegra->soc
> v7:
> * moved tegra124_supply_names definition to just above
>    the tegra124_ahci_soc_data structure.
> ---
>  drivers/ata/ahci_tegra.c | 33 +++++++++++++++++++++++----------
>  1 file changed, 23 insertions(+), 10 deletions(-)


Acked-by: Thierry Reding <treding@nvidia.com>
Thierry Reding March 12, 2018, 12:15 p.m. UTC | #3
On Mon, Mar 12, 2018 at 05:10:35PM +0530, Preetham Chandru Ramchandra wrote:
> From: Preetham Ramchandra <pchandru@nvidia.com>
> 
> Tegra124 does not support devslp and it should be disabled.
> 
> Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
> ---
> v8:
> * spelled out t124 as Tegra124
> * changed u32 quirks to boolean supports_devslp
> * moved the aux register comments above platform_get_resource()
> ---
>  drivers/ata/ahci_tegra.c | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)

Acked-by: Thierry Reding <treding@nvidia.com>
Thierry Reding March 12, 2018, 12:15 p.m. UTC | #4
On Mon, Mar 12, 2018 at 05:10:36PM +0530, Preetham Chandru Ramchandra wrote:
> From: Preetham Ramchandra <pchandru@nvidia.com>
> 
> Tegra does not support DIPM and it should be disabled.
> 
> Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
> ---
> v8:
> * renamed tegra to Tegra in commit message
> ---
>  drivers/ata/ahci_tegra.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Thierry Reding <treding@nvidia.com>
Thierry Reding March 12, 2018, 12:15 p.m. UTC | #5
On Mon, Mar 12, 2018 at 05:10:37PM +0530, Preetham Chandru Ramchandra wrote:
> From: Preetham Ramchandra <pchandru@nvidia.com>
> 
> Add support for the AHCI-compliant Serial ATA host controller on the
> Tegra210 system-on-chip.
> 
> Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
> ---
> v8:
> * renamed the structure tegra210_ahci_soc_data to tegra210_ahci_soc
> v7:
> * Added commit message
> ---
>  drivers/ata/ahci_tegra.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)

Acked-by: Thierry Reding <treding@nvidia.com>
Thierry Reding March 12, 2018, 12:15 p.m. UTC | #6
On Mon, Mar 12, 2018 at 05:10:38PM +0530, Preetham Chandru Ramchandra wrote:
> From: Preetham Ramchandra <pchandru@nvidia.com>
> 
> ahci_tegra driver now supports Tegra124, Tegra132 and Tegra210,
> so change Tegra124 to Tegra.
> 
> Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
> ---
>  drivers/ata/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Thierry Reding <treding@nvidia.com>
Tejun Heo March 13, 2018, 9:06 p.m. UTC | #7
On Mon, Mar 12, 2018 at 05:10:29PM +0530, Preetham Chandru Ramchandra wrote:
> From: Preetham Ramchandra <pchandru@nvidia.com>
> 
> 1. ADD AHCI support for Tegra210
> 2. Extend the Tegra AHCI controller device tree binding with Tegra210
> 3. Update initialization sequence
> 4. Initialize regulators based on chip
> 5. Disable DevSlp
> 6. Disable DIPM

All look good to me.  How should the patches be routed?

Thanks.
Thierry Reding March 13, 2018, 10:42 p.m. UTC | #8
On Tue, Mar 13, 2018 at 02:06:33PM -0700, Tejun Heo wrote:
> On Mon, Mar 12, 2018 at 05:10:29PM +0530, Preetham Chandru Ramchandra wrote:
> > From: Preetham Ramchandra <pchandru@nvidia.com>
> > 
> > 1. ADD AHCI support for Tegra210
> > 2. Extend the Tegra AHCI controller device tree binding with Tegra210
> > 3. Update initialization sequence
> > 4. Initialize regulators based on chip
> > 5. Disable DevSlp
> > 6. Disable DIPM
> 
> All look good to me.  How should the patches be routed?

My suggestion would be that I pick up the arm64 patches (2 and 3) into
the Tegra tree and you take the rest (dt-bindings and driver changes)
through libata? There are no dependencies between the two sets, other
than maybe checkpatch.pl complaining about using an undocumented
compatible string until both get merged into v4.17-rc1.

I think that's fine, but we can be extra pedantic and carry patch 1 on
a stable branch that is merged into both the libata and Tegra trees to
avoid that warning.

Thierry
Thierry Reding March 14, 2018, 9:50 a.m. UTC | #9
On Mon, Mar 12, 2018 at 05:10:29PM +0530, Preetham Chandru Ramchandra wrote:
> From: Preetham Ramchandra <pchandru@nvidia.com>
> 
> 1. ADD AHCI support for Tegra210
> 2. Extend the Tegra AHCI controller device tree binding with Tegra210
> 3. Update initialization sequence
> 4. Initialize regulators based on chip
> 5. Disable DevSlp
> 6. Disable DIPM
> ---
> 
> Preetham Ramchandra (9):
>   dt-bindings: Tegra210: add binding documentation
>   arm64: tegra: Add SATA node for Tegra210
>   arm64: tegra: Enable AHCI on Jetson TX1
>   ata: ahci_tegra: Update initialization sequence
>   ata: ahci_tegra: initialize regulators from soc struct
>   ata: ahci_tegra: disable devslp for Tegra124
>   ata: ahci_tegra: disable DIPM
>   ata: ahci_tegra: Add AHCI support for Tegra210
>   ata: change Tegra124 to Tegra
> 
>  .../bindings/ata/nvidia,tegra124-ahci.txt          |  36 ++-
>  arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi     |   5 +
>  arch/arm64/boot/dts/nvidia/tegra210.dtsi           |  16 +
>  drivers/ata/Kconfig                                |   4 +-
>  drivers/ata/ahci_tegra.c                           | 359 ++++++++++++++++-----
>  5 files changed, 330 insertions(+), 90 deletions(-)

The series, on Jetson TX1:

Tested-by: Thierry Reding <treding@nvidia.com>
Tejun Heo March 14, 2018, 3:25 p.m. UTC | #10
Hello,

On Tue, Mar 13, 2018 at 11:42:59PM +0100, Thierry Reding wrote:
> My suggestion would be that I pick up the arm64 patches (2 and 3) into
> the Tegra tree and you take the rest (dt-bindings and driver changes)
> through libata? There are no dependencies between the two sets, other
> than maybe checkpatch.pl complaining about using an undocumented
> compatible string until both get merged into v4.17-rc1.

Applied 1, 4-9 to libata/for-4.17.

Thanks a lot.
Thierry Reding March 14, 2018, 4:38 p.m. UTC | #11
On Wed, Mar 14, 2018 at 08:25:13AM -0700, Tejun Heo wrote:
> Hello,
> 
> On Tue, Mar 13, 2018 at 11:42:59PM +0100, Thierry Reding wrote:
> > My suggestion would be that I pick up the arm64 patches (2 and 3) into
> > the Tegra tree and you take the rest (dt-bindings and driver changes)
> > through libata? There are no dependencies between the two sets, other
> > than maybe checkpatch.pl complaining about using an undocumented
> > compatible string until both get merged into v4.17-rc1.
> 
> Applied 1, 4-9 to libata/for-4.17.

Patches 2 and 3 applied to for-4.17/arm64/dt.

Thanks,
Thierry