diff mbox series

[5/8] soc: ti: omap-prm: add omap4 PRM data

Message ID 1565164139-21886-6-git-send-email-t-kristo@ti.com (mailing list archive)
State New, archived
Headers show
Series soc: ti: Add OMAP PRM driver | expand

Commit Message

Tero Kristo Aug. 7, 2019, 7:48 a.m. UTC
Add PRM data for omap4 family of SoCs.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 drivers/soc/ti/omap_prm.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

J, KEERTHY Aug. 8, 2019, 5:30 a.m. UTC | #1
On 07/08/19 1:18 PM, Tero Kristo wrote:
> Add PRM data for omap4 family of SoCs.
> 
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
> ---
>   drivers/soc/ti/omap_prm.c | 20 ++++++++++++++++++++
>   1 file changed, 20 insertions(+)
> 
> diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c
> index 870515e3..9b8d5945 100644
> --- a/drivers/soc/ti/omap_prm.c
> +++ b/drivers/soc/ti/omap_prm.c
> @@ -54,7 +54,27 @@ struct omap_reset_data {
>   
>   #define OMAP_PRM_NO_RSTST	BIT(0)
>   
> +struct omap_prm_data omap4_prm_data[] = {
> +	{ .name = "mpu", .base = 0x4a306300, .pwstst = 0x4 },
> +	{ .name = "tesla", .base = 0x4a306400, .pwstst = 0x4, .rstctl = 0x10, .rstst = 0x14 },
> +	{ .name = "abe", .base = 0x4a306500, .pwstst = 0x4 },
> +	{ .name = "always_on_core", .base = 0x4a306600, .pwstst = 0x4 },
> +	{ .name = "core", .base = 0x4a306700, .pwstst = 0x4, .rstctl = 0x210, .rstst = 0x214 },
> +	{ .name = "ivahd", .base = 0x4a306f00, .pwstst = 0x4, .rstctl = 0x10, .rstst = 0x14 },
> +	{ .name = "cam", .base = 0x4a307000, .pwstst = 0x4 },
> +	{ .name = "dss", .base = 0x4a307100, .pwstst = 0x4 },
> +	{ .name = "gfx", .base = 0x4a307200, .pwstst = 0x4 },
> +	{ .name = "l3init", .base = 0x4a307300, .pwstst = 0x4 },
> +	{ .name = "l4per", .base = 0x4a307400, .pwstst = 0x4 },
> +	{ .name = "cefuse", .base = 0x4a307600, .pwstst = 0x4 },
> +	{ .name = "wkup", .base = 0x4a307700, .pwstst = 0x4 },
> +	{ .name = "emu", .base = 0x4a307900, .pwstst = 0x4 },
> +	{ .name = "device", .base = 0x4a307b00, .rstctl = 0x0, .rstst = 0x4 },
> +	{ },
> +};

So at some point arch/arm/mach-omap2/powerdomains44xx_data.c
duplicated data will be removed?

> +
>   static const struct of_device_id omap_prm_id_table[] = {
> +	{ .compatible = "ti,omap4-prm-inst", .data = omap4_prm_data },
>   	{ },
>   };
>   
>
Tero Kristo Aug. 19, 2019, 9:32 a.m. UTC | #2
On 08/08/2019 08:30, Keerthy wrote:
> 
> 
> On 07/08/19 1:18 PM, Tero Kristo wrote:
>> Add PRM data for omap4 family of SoCs.
>>
>> Signed-off-by: Tero Kristo <t-kristo@ti.com>
>> ---
>>   drivers/soc/ti/omap_prm.c | 20 ++++++++++++++++++++
>>   1 file changed, 20 insertions(+)
>>
>> diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c
>> index 870515e3..9b8d5945 100644
>> --- a/drivers/soc/ti/omap_prm.c
>> +++ b/drivers/soc/ti/omap_prm.c
>> @@ -54,7 +54,27 @@ struct omap_reset_data {
>>   #define OMAP_PRM_NO_RSTST    BIT(0)
>> +struct omap_prm_data omap4_prm_data[] = {
>> +    { .name = "mpu", .base = 0x4a306300, .pwstst = 0x4 },
>> +    { .name = "tesla", .base = 0x4a306400, .pwstst = 0x4, .rstctl = 
>> 0x10, .rstst = 0x14 },
>> +    { .name = "abe", .base = 0x4a306500, .pwstst = 0x4 },
>> +    { .name = "always_on_core", .base = 0x4a306600, .pwstst = 0x4 },
>> +    { .name = "core", .base = 0x4a306700, .pwstst = 0x4, .rstctl = 
>> 0x210, .rstst = 0x214 },
>> +    { .name = "ivahd", .base = 0x4a306f00, .pwstst = 0x4, .rstctl = 
>> 0x10, .rstst = 0x14 },
>> +    { .name = "cam", .base = 0x4a307000, .pwstst = 0x4 },
>> +    { .name = "dss", .base = 0x4a307100, .pwstst = 0x4 },
>> +    { .name = "gfx", .base = 0x4a307200, .pwstst = 0x4 },
>> +    { .name = "l3init", .base = 0x4a307300, .pwstst = 0x4 },
>> +    { .name = "l4per", .base = 0x4a307400, .pwstst = 0x4 },
>> +    { .name = "cefuse", .base = 0x4a307600, .pwstst = 0x4 },
>> +    { .name = "wkup", .base = 0x4a307700, .pwstst = 0x4 },
>> +    { .name = "emu", .base = 0x4a307900, .pwstst = 0x4 },
>> +    { .name = "device", .base = 0x4a307b00, .rstctl = 0x0, .rstst = 
>> 0x4 },
>> +    { },
>> +};
> 
> So at some point arch/arm/mach-omap2/powerdomains44xx_data.c
> duplicated data will be removed?

Yes, that would be the path forward eventually.

-Tero

> 
>> +
>>   static const struct of_device_id omap_prm_id_table[] = {
>> +    { .compatible = "ti,omap4-prm-inst", .data = omap4_prm_data },
>>       { },
>>   };
>>

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Suman Anna Aug. 19, 2019, 11:08 p.m. UTC | #3
On 8/7/19 2:48 AM, Tero Kristo wrote:
> Add PRM data for omap4 family of SoCs.
> 
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
> ---
>  drivers/soc/ti/omap_prm.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c
> index 870515e3..9b8d5945 100644
> --- a/drivers/soc/ti/omap_prm.c
> +++ b/drivers/soc/ti/omap_prm.c
> @@ -54,7 +54,27 @@ struct omap_reset_data {
>  
>  #define OMAP_PRM_NO_RSTST	BIT(0)
>  
> +struct omap_prm_data omap4_prm_data[] = {

static const

regards
Suman

> +	{ .name = "mpu", .base = 0x4a306300, .pwstst = 0x4 },
> +	{ .name = "tesla", .base = 0x4a306400, .pwstst = 0x4, .rstctl = 0x10, .rstst = 0x14 },
> +	{ .name = "abe", .base = 0x4a306500, .pwstst = 0x4 },
> +	{ .name = "always_on_core", .base = 0x4a306600, .pwstst = 0x4 },
> +	{ .name = "core", .base = 0x4a306700, .pwstst = 0x4, .rstctl = 0x210, .rstst = 0x214 },
> +	{ .name = "ivahd", .base = 0x4a306f00, .pwstst = 0x4, .rstctl = 0x10, .rstst = 0x14 },
> +	{ .name = "cam", .base = 0x4a307000, .pwstst = 0x4 },
> +	{ .name = "dss", .base = 0x4a307100, .pwstst = 0x4 },
> +	{ .name = "gfx", .base = 0x4a307200, .pwstst = 0x4 },
> +	{ .name = "l3init", .base = 0x4a307300, .pwstst = 0x4 },
> +	{ .name = "l4per", .base = 0x4a307400, .pwstst = 0x4 },
> +	{ .name = "cefuse", .base = 0x4a307600, .pwstst = 0x4 },
> +	{ .name = "wkup", .base = 0x4a307700, .pwstst = 0x4 },
> +	{ .name = "emu", .base = 0x4a307900, .pwstst = 0x4 },
> +	{ .name = "device", .base = 0x4a307b00, .rstctl = 0x0, .rstst = 0x4 },
> +	{ },
> +};
> +
>  static const struct of_device_id omap_prm_id_table[] = {
> +	{ .compatible = "ti,omap4-prm-inst", .data = omap4_prm_data },
>  	{ },
>  };
>  
>
Tero Kristo Aug. 20, 2019, 7:52 a.m. UTC | #4
On 20.8.2019 2.08, Suman Anna wrote:
> On 8/7/19 2:48 AM, Tero Kristo wrote:
>> Add PRM data for omap4 family of SoCs.
>>
>> Signed-off-by: Tero Kristo <t-kristo@ti.com>
>> ---
>>   drivers/soc/ti/omap_prm.c | 20 ++++++++++++++++++++
>>   1 file changed, 20 insertions(+)
>>
>> diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c
>> index 870515e3..9b8d5945 100644
>> --- a/drivers/soc/ti/omap_prm.c
>> +++ b/drivers/soc/ti/omap_prm.c
>> @@ -54,7 +54,27 @@ struct omap_reset_data {
>>   
>>   #define OMAP_PRM_NO_RSTST	BIT(0)
>>   
>> +struct omap_prm_data omap4_prm_data[] = {
> 
> static const

Will fix this and rest of the similar comments.

-Tero

> 
> regards
> Suman
> 
>> +	{ .name = "mpu", .base = 0x4a306300, .pwstst = 0x4 },
>> +	{ .name = "tesla", .base = 0x4a306400, .pwstst = 0x4, .rstctl = 0x10, .rstst = 0x14 },
>> +	{ .name = "abe", .base = 0x4a306500, .pwstst = 0x4 },
>> +	{ .name = "always_on_core", .base = 0x4a306600, .pwstst = 0x4 },
>> +	{ .name = "core", .base = 0x4a306700, .pwstst = 0x4, .rstctl = 0x210, .rstst = 0x214 },
>> +	{ .name = "ivahd", .base = 0x4a306f00, .pwstst = 0x4, .rstctl = 0x10, .rstst = 0x14 },
>> +	{ .name = "cam", .base = 0x4a307000, .pwstst = 0x4 },
>> +	{ .name = "dss", .base = 0x4a307100, .pwstst = 0x4 },
>> +	{ .name = "gfx", .base = 0x4a307200, .pwstst = 0x4 },
>> +	{ .name = "l3init", .base = 0x4a307300, .pwstst = 0x4 },
>> +	{ .name = "l4per", .base = 0x4a307400, .pwstst = 0x4 },
>> +	{ .name = "cefuse", .base = 0x4a307600, .pwstst = 0x4 },
>> +	{ .name = "wkup", .base = 0x4a307700, .pwstst = 0x4 },
>> +	{ .name = "emu", .base = 0x4a307900, .pwstst = 0x4 },
>> +	{ .name = "device", .base = 0x4a307b00, .rstctl = 0x0, .rstst = 0x4 },
>> +	{ },
>> +};
>> +
>>   static const struct of_device_id omap_prm_id_table[] = {
>> +	{ .compatible = "ti,omap4-prm-inst", .data = omap4_prm_data },
>>   	{ },
>>   };
>>   
>>
> 

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Suman Anna Aug. 20, 2019, 5:23 p.m. UTC | #5
On 8/20/19 2:52 AM, Tero Kristo wrote:
> On 20.8.2019 2.08, Suman Anna wrote:
>> On 8/7/19 2:48 AM, Tero Kristo wrote:
>>> Add PRM data for omap4 family of SoCs.
>>>
>>> Signed-off-by: Tero Kristo <t-kristo@ti.com>
>>> ---
>>>   drivers/soc/ti/omap_prm.c | 20 ++++++++++++++++++++
>>>   1 file changed, 20 insertions(+)
>>>
>>> diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c
>>> index 870515e3..9b8d5945 100644
>>> --- a/drivers/soc/ti/omap_prm.c
>>> +++ b/drivers/soc/ti/omap_prm.c
>>> @@ -54,7 +54,27 @@ struct omap_reset_data {
>>>     #define OMAP_PRM_NO_RSTST    BIT(0)
>>>   +struct omap_prm_data omap4_prm_data[] = {
>>
>> static const
> 
> Will fix this and rest of the similar comments.
> 
> -Tero
> 
>>
>> regards
>> Suman
>>
>>> +    { .name = "mpu", .base = 0x4a306300, .pwstst = 0x4 },
>>> +    { .name = "tesla", .base = 0x4a306400, .pwstst = 0x4, .rstctl =
>>> 0x10, .rstst = 0x14 },
>>> +    { .name = "abe", .base = 0x4a306500, .pwstst = 0x4 },
>>> +    { .name = "always_on_core", .base = 0x4a306600, .pwstst = 0x4 },
>>> +    { .name = "core", .base = 0x4a306700, .pwstst = 0x4, .rstctl =
>>> 0x210, .rstst = 0x214 },
>>> +    { .name = "ivahd", .base = 0x4a306f00, .pwstst = 0x4, .rstctl =
>>> 0x10, .rstst = 0x14 },
>>> +    { .name = "cam", .base = 0x4a307000, .pwstst = 0x4 },
>>> +    { .name = "dss", .base = 0x4a307100, .pwstst = 0x4 },
>>> +    { .name = "gfx", .base = 0x4a307200, .pwstst = 0x4 },
>>> +    { .name = "l3init", .base = 0x4a307300, .pwstst = 0x4 },
>>> +    { .name = "l4per", .base = 0x4a307400, .pwstst = 0x4 },
>>> +    { .name = "cefuse", .base = 0x4a307600, .pwstst = 0x4 },
>>> +    { .name = "wkup", .base = 0x4a307700, .pwstst = 0x4 },
>>> +    { .name = "emu", .base = 0x4a307900, .pwstst = 0x4 },
>>> +    { .name = "device", .base = 0x4a307b00, .rstctl = 0x0, .rstst =
>>> 0x4 },

So, looks like you are using pwstctrl as 0 by default, but some of them
will neither have pwstctrl or pwstst like "device" PRM here. Is the plan
to use -1 for the fields, or a flags field?

regards
Suman

>>> +    { },
>>> +};
>>> +
>>>   static const struct of_device_id omap_prm_id_table[] = {
>>> +    { .compatible = "ti,omap4-prm-inst", .data = omap4_prm_data },
>>>       { },
>>>   };
>>>  
>>
> 
> -- 
> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
> Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Tero Kristo Aug. 21, 2019, 6:38 a.m. UTC | #6
On 20.8.2019 20.23, Suman Anna wrote:
> On 8/20/19 2:52 AM, Tero Kristo wrote:
>> On 20.8.2019 2.08, Suman Anna wrote:
>>> On 8/7/19 2:48 AM, Tero Kristo wrote:
>>>> Add PRM data for omap4 family of SoCs.
>>>>
>>>> Signed-off-by: Tero Kristo <t-kristo@ti.com>
>>>> ---
>>>>    drivers/soc/ti/omap_prm.c | 20 ++++++++++++++++++++
>>>>    1 file changed, 20 insertions(+)
>>>>
>>>> diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c
>>>> index 870515e3..9b8d5945 100644
>>>> --- a/drivers/soc/ti/omap_prm.c
>>>> +++ b/drivers/soc/ti/omap_prm.c
>>>> @@ -54,7 +54,27 @@ struct omap_reset_data {
>>>>      #define OMAP_PRM_NO_RSTST    BIT(0)
>>>>    +struct omap_prm_data omap4_prm_data[] = {
>>>
>>> static const
>>
>> Will fix this and rest of the similar comments.
>>
>> -Tero
>>
>>>
>>> regards
>>> Suman
>>>
>>>> +    { .name = "mpu", .base = 0x4a306300, .pwstst = 0x4 },
>>>> +    { .name = "tesla", .base = 0x4a306400, .pwstst = 0x4, .rstctl =
>>>> 0x10, .rstst = 0x14 },
>>>> +    { .name = "abe", .base = 0x4a306500, .pwstst = 0x4 },
>>>> +    { .name = "always_on_core", .base = 0x4a306600, .pwstst = 0x4 },
>>>> +    { .name = "core", .base = 0x4a306700, .pwstst = 0x4, .rstctl =
>>>> 0x210, .rstst = 0x214 },
>>>> +    { .name = "ivahd", .base = 0x4a306f00, .pwstst = 0x4, .rstctl =
>>>> 0x10, .rstst = 0x14 },
>>>> +    { .name = "cam", .base = 0x4a307000, .pwstst = 0x4 },
>>>> +    { .name = "dss", .base = 0x4a307100, .pwstst = 0x4 },
>>>> +    { .name = "gfx", .base = 0x4a307200, .pwstst = 0x4 },
>>>> +    { .name = "l3init", .base = 0x4a307300, .pwstst = 0x4 },
>>>> +    { .name = "l4per", .base = 0x4a307400, .pwstst = 0x4 },
>>>> +    { .name = "cefuse", .base = 0x4a307600, .pwstst = 0x4 },
>>>> +    { .name = "wkup", .base = 0x4a307700, .pwstst = 0x4 },
>>>> +    { .name = "emu", .base = 0x4a307900, .pwstst = 0x4 },
>>>> +    { .name = "device", .base = 0x4a307b00, .rstctl = 0x0, .rstst =
>>>> 0x4 },
> 
> So, looks like you are using pwstctrl as 0 by default, but some of them
> will neither have pwstctrl or pwstst like "device" PRM here. Is the plan
> to use -1 for the fields, or a flags field?

Multiple paths are possible, I will see what makes most sense once I 
implement it.

-Tero

> 
> regards
> Suman
> 
>>>> +    { },
>>>> +};
>>>> +
>>>>    static const struct of_device_id omap_prm_id_table[] = {
>>>> +    { .compatible = "ti,omap4-prm-inst", .data = omap4_prm_data },
>>>>        { },
>>>>    };
>>>>   
>>>
>>
>> -- 
> 

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
diff mbox series

Patch

diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c
index 870515e3..9b8d5945 100644
--- a/drivers/soc/ti/omap_prm.c
+++ b/drivers/soc/ti/omap_prm.c
@@ -54,7 +54,27 @@  struct omap_reset_data {
 
 #define OMAP_PRM_NO_RSTST	BIT(0)
 
+struct omap_prm_data omap4_prm_data[] = {
+	{ .name = "mpu", .base = 0x4a306300, .pwstst = 0x4 },
+	{ .name = "tesla", .base = 0x4a306400, .pwstst = 0x4, .rstctl = 0x10, .rstst = 0x14 },
+	{ .name = "abe", .base = 0x4a306500, .pwstst = 0x4 },
+	{ .name = "always_on_core", .base = 0x4a306600, .pwstst = 0x4 },
+	{ .name = "core", .base = 0x4a306700, .pwstst = 0x4, .rstctl = 0x210, .rstst = 0x214 },
+	{ .name = "ivahd", .base = 0x4a306f00, .pwstst = 0x4, .rstctl = 0x10, .rstst = 0x14 },
+	{ .name = "cam", .base = 0x4a307000, .pwstst = 0x4 },
+	{ .name = "dss", .base = 0x4a307100, .pwstst = 0x4 },
+	{ .name = "gfx", .base = 0x4a307200, .pwstst = 0x4 },
+	{ .name = "l3init", .base = 0x4a307300, .pwstst = 0x4 },
+	{ .name = "l4per", .base = 0x4a307400, .pwstst = 0x4 },
+	{ .name = "cefuse", .base = 0x4a307600, .pwstst = 0x4 },
+	{ .name = "wkup", .base = 0x4a307700, .pwstst = 0x4 },
+	{ .name = "emu", .base = 0x4a307900, .pwstst = 0x4 },
+	{ .name = "device", .base = 0x4a307b00, .rstctl = 0x0, .rstst = 0x4 },
+	{ },
+};
+
 static const struct of_device_id omap_prm_id_table[] = {
+	{ .compatible = "ti,omap4-prm-inst", .data = omap4_prm_data },
 	{ },
 };