public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: tegra: Correct the length of AHB register space
@ 2013-11-07  5:32 Mark Zhang
       [not found] ` <1383802327-11908-1-git-send-email-markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Zhang @ 2013-11-07  5:32 UTC (permalink / raw)
  To: swarren-3lzwWm7+Weoh9ZMKESR00Q, hdoyu-DDmLM1+adcrQT0dZR+AlfA
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Mark Zhang

On Tegra114 it should be 0x12c.

Signed-off-by: Mark Zhang <markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/tegra114.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
index c79b1813c559..63ae6b3a64eb 100644
--- a/arch/arm/boot/dts/tegra114.dtsi
+++ b/arch/arm/boot/dts/tegra114.dtsi
@@ -85,7 +85,7 @@
 
 	ahb: ahb {
 		compatible = "nvidia,tegra114-ahb", "nvidia,tegra30-ahb";
-		reg = <0x6000c004 0x14c>;
+		reg = <0x6000c004 0x12c>;
 	};
 
 	gpio: gpio {
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: tegra: Correct the length of AHB register space
       [not found] ` <1383802327-11908-1-git-send-email-markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-11-12 19:05   ` Stephen Warren
       [not found]     ` <52827BF0.5070706-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Warren @ 2013-11-12 19:05 UTC (permalink / raw)
  To: Mark Zhang, hdoyu-DDmLM1+adcrQT0dZR+AlfA
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 11/06/2013 10:32 PM, Mark Zhang wrote:
> On Tegra114 it should be 0x12c.

> diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi

>  	ahb: ahb {
>  		compatible = "nvidia,tegra114-ahb", "nvidia,tegra30-ahb";
> -		reg = <0x6000c004 0x14c>;
> +		reg = <0x6000c004 0x12c>;
>  	};

I don't think this is correct.

0x12c /is/ the address of the last defined register that exists.
However, the system memory map table in the TRM indicates that 336 bytes
of address space are allocated for this module, so the value should be
0x150 (minus 4 due to the base address offset of 4, so 0x14c) for all of
Tegra30/114/124. That matches what's already in DT.

For Tegra20, the TRM says that 268 bytes of address space are allocated
(which already takes account of the 4-byte base address offset) yielding
a size of 0x10c, which matches what's already in the DT.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: tegra: Correct the length of AHB register space
       [not found]     ` <52827BF0.5070706-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2013-11-13  1:12       ` Mark Zhang
       [not found]         ` <5282D200.2090904-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Zhang @ 2013-11-13  1:12 UTC (permalink / raw)
  To: Stephen Warren, Hiroshi Doyu
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On 11/13/2013 03:05 AM, Stephen Warren wrote:
> On 11/06/2013 10:32 PM, Mark Zhang wrote:
>> On Tegra114 it should be 0x12c.
> 
>> diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
> 
>>  	ahb: ahb {
>>  		compatible = "nvidia,tegra114-ahb", "nvidia,tegra30-ahb";
>> -		reg = <0x6000c004 0x14c>;
>> +		reg = <0x6000c004 0x12c>;
>>  	};
> 
> I don't think this is correct.
> 
> 0x12c /is/ the address of the last defined register that exists.
> However, the system memory map table in the TRM indicates that 336 bytes
> of address space are allocated for this module, so the value should be
> 0x150 (minus 4 due to the base address offset of 4, so 0x14c) for all of
> Tegra30/114/124. That matches what's already in DT.
> 

Yeah, but the 0x12c - 0x14c is not defined in TRM, despite the address
space in memory map is 336 bytes. So if you add this section into
register map, that implies writing into this section is OK but this is
undefined behaviour.

Mark
> For Tegra20, the TRM says that 268 bytes of address space are allocated
> (which already takes account of the 4-byte base address offset) yielding
> a size of 0x10c, which matches what's already in the DT.
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: tegra: Correct the length of AHB register space
       [not found]         ` <5282D200.2090904-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-11-13  3:15           ` Stephen Warren
       [not found]             ` <5282EED2.3080603-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Warren @ 2013-11-13  3:15 UTC (permalink / raw)
  To: Mark Zhang, Hiroshi Doyu
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On 11/12/2013 06:12 PM, Mark Zhang wrote:
> On 11/13/2013 03:05 AM, Stephen Warren wrote:
>> On 11/06/2013 10:32 PM, Mark Zhang wrote:
>>> On Tegra114 it should be 0x12c.
>>
>>> diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
>>
>>>  	ahb: ahb {
>>>  		compatible = "nvidia,tegra114-ahb", "nvidia,tegra30-ahb";
>>> -		reg = <0x6000c004 0x14c>;
>>> +		reg = <0x6000c004 0x12c>;
>>>  	};
>>
>> I don't think this is correct.
>>
>> 0x12c /is/ the address of the last defined register that exists.
>> However, the system memory map table in the TRM indicates that 336 bytes
>> of address space are allocated for this module, so the value should be
>> 0x150 (minus 4 due to the base address offset of 4, so 0x14c) for all of
>> Tegra30/114/124. That matches what's already in DT.
>>
> 
> Yeah, but the 0x12c - 0x14c is not defined in TRM, despite the address
> space in memory map is 336 bytes. So if you add this section into
> register map, that implies writing into this section is OK but this is
> undefined behaviour.

I'm sure there are plenty of undefined register addresses in all the HW
modules in Tegra.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: tegra: Correct the length of AHB register space
       [not found]             ` <5282EED2.3080603-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2013-11-13  5:14               ` Mark Zhang
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Zhang @ 2013-11-13  5:14 UTC (permalink / raw)
  To: Stephen Warren, Hiroshi Doyu
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On 11/13/2013 11:15 AM, Stephen Warren wrote:
> On 11/12/2013 06:12 PM, Mark Zhang wrote:
>> On 11/13/2013 03:05 AM, Stephen Warren wrote:
>>> On 11/06/2013 10:32 PM, Mark Zhang wrote:
>>>> On Tegra114 it should be 0x12c.
>>>
>>>> diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
>>>
>>>>  	ahb: ahb {
>>>>  		compatible = "nvidia,tegra114-ahb", "nvidia,tegra30-ahb";
>>>> -		reg = <0x6000c004 0x14c>;
>>>> +		reg = <0x6000c004 0x12c>;
>>>>  	};
>>>
>>> I don't think this is correct.
>>>
>>> 0x12c /is/ the address of the last defined register that exists.
>>> However, the system memory map table in the TRM indicates that 336 bytes
>>> of address space are allocated for this module, so the value should be
>>> 0x150 (minus 4 due to the base address offset of 4, so 0x14c) for all of
>>> Tegra30/114/124. That matches what's already in DT.
>>>
>>
>> Yeah, but the 0x12c - 0x14c is not defined in TRM, despite the address
>> space in memory map is 336 bytes. So if you add this section into
>> register map, that implies writing into this section is OK but this is
>> undefined behaviour.
> 
> I'm sure there are plenty of undefined register addresses in all the HW
> modules in Tegra.
> 

Okay, if so I'm OK with that.

Mark

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-11-13  5:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-07  5:32 [PATCH] ARM: tegra: Correct the length of AHB register space Mark Zhang
     [not found] ` <1383802327-11908-1-git-send-email-markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-11-12 19:05   ` Stephen Warren
     [not found]     ` <52827BF0.5070706-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-11-13  1:12       ` Mark Zhang
     [not found]         ` <5282D200.2090904-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-11-13  3:15           ` Stephen Warren
     [not found]             ` <5282EED2.3080603-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-11-13  5:14               ` Mark Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox