diff mbox

[v2,1/3] ARM: DRA7: hwmod: Add OCP2SCP3 module

Message ID 1404385274-5093-2-git-send-email-rogerq@ti.com
State Accepted
Commit df0d0f11ff00db0b880e632549619a1b86b190d2
Headers show

Commit Message

Roger Quadros July 3, 2014, 11:01 a.m. UTC
This module is needed for the SATA and PCIe PHYs.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Rajendra Nayak <rnayak@ti.com>
Tested-by: Sekhar Nori <nsekhar@ti.com>>
---
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

Comments

Paul Walmsley July 3, 2014, 7:48 p.m. UTC | #1
On Thu, 3 Jul 2014, Roger Quadros wrote:

> This module is needed for the SATA and PCIe PHYs.
> 
> Signed-off-by: Roger Quadros <rogerq@ti.com>
> Reviewed-by: Rajendra Nayak <rnayak@ti.com>
> Tested-by: Sekhar Nori <nsekhar@ti.com>>

This looks like adding support for a new device, so, after 
discussing with Tony, queuing for v3.17.


- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Roger Quadros July 4, 2014, 9:49 a.m. UTC | #2
Hi Paul & Tony,

On 07/03/2014 10:48 PM, Paul Walmsley wrote:
> On Thu, 3 Jul 2014, Roger Quadros wrote:
> 
>> This module is needed for the SATA and PCIe PHYs.
>>
>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>> Reviewed-by: Rajendra Nayak <rnayak@ti.com>
>> Tested-by: Sekhar Nori <nsekhar@ti.com>>
> 
> This looks like adding support for a new device, so, after 
> discussing with Tony, queuing for v3.17.

We should treat it as missing device (bug) rather than new device (feature) as the corresponding device tree node is already present.
Without this patch we get the following message in kernel boot log

[    0.261680] platform 4a090000.ocp2scp: Cannot lookup hwmod 'ocp2scp3'

I would consider this patch as a fix rather than a new feature.

cheers,
-roger
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Paul Walmsley July 6, 2014, 12:23 a.m. UTC | #3
Hi

On Fri, 4 Jul 2014, Roger Quadros wrote:

> On 07/03/2014 10:48 PM, Paul Walmsley wrote:
> > On Thu, 3 Jul 2014, Roger Quadros wrote:
> > 
> >> This module is needed for the SATA and PCIe PHYs.
> >>
> >> Signed-off-by: Roger Quadros <rogerq@ti.com>
> >> Reviewed-by: Rajendra Nayak <rnayak@ti.com>
> >> Tested-by: Sekhar Nori <nsekhar@ti.com>>
> > 
> > This looks like adding support for a new device, so, after 
> > discussing with Tony, queuing for v3.17.
> 
> We should treat it as missing device (bug) rather than new device 
> (feature) as the corresponding device tree node is already present.
> Without this patch we get the following message in kernel boot log
> 
> [    0.261680] platform 4a090000.ocp2scp: Cannot lookup hwmod 'ocp2scp3'
> 
> I would consider this patch as a fix rather than a new feature.

Just to make sure I'm correctly applying the rules for sequencing -rc 
patches vs. merge window patches, could you please confirm my 
understanding of the situation:

1. The OCP2SCP3 device (and the devices that rely on it) never worked on 
DRA7xx in earlier kernels

2. Even with this support added, neither SATA nor PCIe will work in 3.16 
on DRA7xx (SATA for unknown reasons, PCIe because the patches are targeted 
for 3.17).

3. The warning doesn't prevent the machine from booting and does not 
impair any previously working functionality

4. There are other DRA7xx warning messages on boot in 3.16-rc: for 
example, http://paste.ubuntu.com/7701601/ lists:

[    0.009931] omap_hwmod: l3_main_2 using broken dt data from ocp

...

[    0.291802] platform 4e000000.dmm: Cannot lookup hwmod 'dmm'


Are these four statements correct?

If so, is there some other reason why we should rush this in for 3.16-rc?  
Put differently: how can we justify adding this device in 3.16-rc rather 
than 3.17 to Linus Torvalds?


- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Roger Quadros July 7, 2014, 8:44 a.m. UTC | #4
Paul,

On 07/06/2014 03:23 AM, Paul Walmsley wrote:
> Hi
> 
> On Fri, 4 Jul 2014, Roger Quadros wrote:
> 
>> On 07/03/2014 10:48 PM, Paul Walmsley wrote:
>>> On Thu, 3 Jul 2014, Roger Quadros wrote:
>>>
>>>> This module is needed for the SATA and PCIe PHYs.
>>>>
>>>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>>>> Reviewed-by: Rajendra Nayak <rnayak@ti.com>
>>>> Tested-by: Sekhar Nori <nsekhar@ti.com>>
>>>
>>> This looks like adding support for a new device, so, after 
>>> discussing with Tony, queuing for v3.17.
>>
>> We should treat it as missing device (bug) rather than new device 
>> (feature) as the corresponding device tree node is already present.
>> Without this patch we get the following message in kernel boot log
>>
>> [    0.261680] platform 4a090000.ocp2scp: Cannot lookup hwmod 'ocp2scp3'
>>
>> I would consider this patch as a fix rather than a new feature.
> 
> Just to make sure I'm correctly applying the rules for sequencing -rc 
> patches vs. merge window patches, could you please confirm my 
> understanding of the situation:
> 
> 1. The OCP2SCP3 device (and the devices that rely on it) never worked on 
> DRA7xx in earlier kernels
> 
> 2. Even with this support added, neither SATA nor PCIe will work in 3.16 
> on DRA7xx (SATA for unknown reasons, PCIe because the patches are targeted 
> for 3.17).

The reason for SATA not working has been identified and the fix is posted here
https://lkml.org/lkml/2014/7/4/166
So this hwmod patch is the only missing piece why SATA won't work on 3.16.

> 
> 3. The warning doesn't prevent the machine from booting and does not 
> impair any previously working functionality
> 
> 4. There are other DRA7xx warning messages on boot in 3.16-rc: for 
> example, http://paste.ubuntu.com/7701601/ lists:
> 
> [    0.009931] omap_hwmod: l3_main_2 using broken dt data from ocp
> 
> ...
> 
> [    0.291802] platform 4e000000.dmm: Cannot lookup hwmod 'dmm'
> 
> 
> Are these four statements correct?

Yes for 1,3 and 4.

> 
> If so, is there some other reason why we should rush this in for 3.16-rc?  
> Put differently: how can we justify adding this device in 3.16-rc rather 
> than 3.17 to Linus Torvalds?

Nothing else that I can think of apart from SATA not working on 3.16.

cheers,
-roger
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index 20b4398..c9daee4 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -1215,6 +1215,21 @@  static struct omap_hwmod dra7xx_ocp2scp1_hwmod = {
 	},
 };
 
+/* ocp2scp3 */
+static struct omap_hwmod dra7xx_ocp2scp3_hwmod = {
+	.name		= "ocp2scp3",
+	.class		= &dra7xx_ocp2scp_hwmod_class,
+	.clkdm_name	= "l3init_clkdm",
+	.main_clk	= "l4_root_clk_div",
+	.prcm = {
+		.omap4 = {
+			.clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET,
+			.context_offs = DRA7XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET,
+			.modulemode   = MODULEMODE_HWCTRL,
+		},
+	},
+};
+
 /*
  * 'qspi' class
  *
@@ -2326,6 +2341,14 @@  static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = {
 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
 };
 
+/* l4_cfg -> ocp2scp3 */
+static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp3 = {
+	.master		= &dra7xx_l4_cfg_hwmod,
+	.slave		= &dra7xx_ocp2scp3_hwmod,
+	.clk		= "l4_root_clk_div",
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+};
+
 static struct omap_hwmod_addr_space dra7xx_qspi_addrs[] = {
 	{
 		.pa_start	= 0x4b300000,
@@ -2672,6 +2695,7 @@  static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
 	&dra7xx_l4_per1__mmc4,
 	&dra7xx_l4_cfg__mpu,
 	&dra7xx_l4_cfg__ocp2scp1,
+	&dra7xx_l4_cfg__ocp2scp3,
 	&dra7xx_l3_main_1__qspi,
 	&dra7xx_l4_cfg__sata,
 	&dra7xx_l4_cfg__smartreflex_core,