From: Sekhar Nori <nsekhar@ti.com>
To: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>,
tony@atomide.com, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, bcousson@baylibre.com,
paul@pwsan.com
Subject: Re: [PATCH v2 2/3] ARM: OMAP4+: Move SRAM data to DT
Date: Tue, 3 Sep 2013 19:07:54 +0530 [thread overview]
Message-ID: <5225E632.7010707@ti.com> (raw)
In-Reply-To: <5224C4E5.7020002@ti.com>
On 9/2/2013 10:33 PM, Sekhar Nori wrote:
> On 8/29/2013 7:21 PM, Santosh Shilimkar wrote:
>> On Thursday 29 August 2013 09:50 AM, Rajendra Nayak wrote:
>>> On Thursday 29 August 2013 07:01 PM, Santosh Shilimkar wrote:
>>>> On Thursday 29 August 2013 09:26 AM, Sekhar Nori wrote:
>>>>> On 8/29/2013 4:53 PM, Rajendra Nayak wrote:
>>>>>> diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
>>>>>> index 22d9f2b..1ba6a77 100644
>>>>>> --- a/arch/arm/boot/dts/omap4.dtsi
>>>>>> +++ b/arch/arm/boot/dts/omap4.dtsi
>>>>>> @@ -126,6 +126,11 @@
>>>>>> pinctrl-single,function-mask = <0x7fff>;
>>>>>> };
>>>>>>
>>>>>> + ocmcram: ocmcram@40304000 {
>>>>>
>>>>> This can now be changed to 0x40300000 now that you have moved to
>>>>> gen_pool_alloc()?
>>>>>
>>>> NO.
>>>> It won't work on secure devices since first 16 KB is occupied for
>>>> default configuration. Its not worth trouble also to handle
>>>> secure/non-secure considering the use of SRAM which is actually just
>>>> limited to errata. 40304000 will work for both devices.
>>>
>>> Right. Sekhar, you might have confused because of the existing buggy code
>>> in sram.c and sram.h which did this (and is removed in this series)
>>>
>>> from sram.c
>>> -----------
>>> #define OMAP2_SRAM_PUB_PA (OMAP2_SRAM_PA + 0xf800)
>>> #define OMAP3_SRAM_PUB_PA (OMAP3_SRAM_PA + 0x8000)
>>> -#ifdef CONFIG_OMAP4_ERRATA_I688
>>> -#define OMAP4_SRAM_PUB_PA OMAP4_SRAM_PA
>>> -#else
>>> -#define OMAP4_SRAM_PUB_PA (OMAP4_SRAM_PA + 0x4000)
>>> -#endif
>>> -#define OMAP5_SRAM_PA 0x40300000
>>>
>>> from sram.h
>>> -----------
>>> #define OMAP2_SRAM_PA 0x40200000
>>> #define OMAP3_SRAM_PA 0x40200000
>>> -#ifdef CONFIG_OMAP4_ERRATA_I688
>>> -#define OMAP4_SRAM_PA 0x40304000
>>> -#define OMAP4_SRAM_VA 0xfe404000
>>> -#else
>>> -#define OMAP4_SRAM_PA 0x40300000
>>> -#endif
>>>
>>> I am not sure where the checks for CONFIG_OMAP4_ERRATA_I688
>>> came in from, but these are done, like Santosh said, to handle
>>> secure and non-secure sram across GP and HS devices and in
>>> no way related to handling errata I688.
>>>
>> The check was to ensure that with errata enabled, we don't care
>> about first 16 KB ;-)
>
> Hi Rajendra, thanks for the explanation. Other devices like AM437x which
> have HS variants might need such adjustment too. It will be nice to
> check that.
So I checked with folks working on the HS variant and what you have for
AM437x is just fine. The secure runtime uses a different SRAM bank and
even if there is a need to use the GP SRAM, the space will first be
carved using gen_pool APIs on Linux. Only requirement from secure
runtime software is physically contiguous area - which I think
gen_pool_alloc() guarantees.
Thanks,
Sekhar
WARNING: multiple messages have this Message-ID (diff)
From: nsekhar@ti.com (Sekhar Nori)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/3] ARM: OMAP4+: Move SRAM data to DT
Date: Tue, 3 Sep 2013 19:07:54 +0530 [thread overview]
Message-ID: <5225E632.7010707@ti.com> (raw)
In-Reply-To: <5224C4E5.7020002@ti.com>
On 9/2/2013 10:33 PM, Sekhar Nori wrote:
> On 8/29/2013 7:21 PM, Santosh Shilimkar wrote:
>> On Thursday 29 August 2013 09:50 AM, Rajendra Nayak wrote:
>>> On Thursday 29 August 2013 07:01 PM, Santosh Shilimkar wrote:
>>>> On Thursday 29 August 2013 09:26 AM, Sekhar Nori wrote:
>>>>> On 8/29/2013 4:53 PM, Rajendra Nayak wrote:
>>>>>> diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
>>>>>> index 22d9f2b..1ba6a77 100644
>>>>>> --- a/arch/arm/boot/dts/omap4.dtsi
>>>>>> +++ b/arch/arm/boot/dts/omap4.dtsi
>>>>>> @@ -126,6 +126,11 @@
>>>>>> pinctrl-single,function-mask = <0x7fff>;
>>>>>> };
>>>>>>
>>>>>> + ocmcram: ocmcram at 40304000 {
>>>>>
>>>>> This can now be changed to 0x40300000 now that you have moved to
>>>>> gen_pool_alloc()?
>>>>>
>>>> NO.
>>>> It won't work on secure devices since first 16 KB is occupied for
>>>> default configuration. Its not worth trouble also to handle
>>>> secure/non-secure considering the use of SRAM which is actually just
>>>> limited to errata. 40304000 will work for both devices.
>>>
>>> Right. Sekhar, you might have confused because of the existing buggy code
>>> in sram.c and sram.h which did this (and is removed in this series)
>>>
>>> from sram.c
>>> -----------
>>> #define OMAP2_SRAM_PUB_PA (OMAP2_SRAM_PA + 0xf800)
>>> #define OMAP3_SRAM_PUB_PA (OMAP3_SRAM_PA + 0x8000)
>>> -#ifdef CONFIG_OMAP4_ERRATA_I688
>>> -#define OMAP4_SRAM_PUB_PA OMAP4_SRAM_PA
>>> -#else
>>> -#define OMAP4_SRAM_PUB_PA (OMAP4_SRAM_PA + 0x4000)
>>> -#endif
>>> -#define OMAP5_SRAM_PA 0x40300000
>>>
>>> from sram.h
>>> -----------
>>> #define OMAP2_SRAM_PA 0x40200000
>>> #define OMAP3_SRAM_PA 0x40200000
>>> -#ifdef CONFIG_OMAP4_ERRATA_I688
>>> -#define OMAP4_SRAM_PA 0x40304000
>>> -#define OMAP4_SRAM_VA 0xfe404000
>>> -#else
>>> -#define OMAP4_SRAM_PA 0x40300000
>>> -#endif
>>>
>>> I am not sure where the checks for CONFIG_OMAP4_ERRATA_I688
>>> came in from, but these are done, like Santosh said, to handle
>>> secure and non-secure sram across GP and HS devices and in
>>> no way related to handling errata I688.
>>>
>> The check was to ensure that with errata enabled, we don't care
>> about first 16 KB ;-)
>
> Hi Rajendra, thanks for the explanation. Other devices like AM437x which
> have HS variants might need such adjustment too. It will be nice to
> check that.
So I checked with folks working on the HS variant and what you have for
AM437x is just fine. The secure runtime uses a different SRAM bank and
even if there is a need to use the GP SRAM, the space will first be
carved using gen_pool APIs on Linux. Only requirement from secure
runtime software is physically contiguous area - which I think
gen_pool_alloc() guarantees.
Thanks,
Sekhar
next prev parent reply other threads:[~2013-09-03 13:38 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-29 11:23 [PATCH v2 0/3] OMAP4+: Get rid of internal SRAM handling Rajendra Nayak
2013-08-29 11:23 ` Rajendra Nayak
2013-08-29 11:23 ` [PATCH v2 1/3] ARM: AM335x: Get rid of unused sram init function Rajendra Nayak
2013-08-29 11:23 ` Rajendra Nayak
2013-08-29 11:23 ` [PATCH v2 2/3] ARM: OMAP4+: Move SRAM data to DT Rajendra Nayak
2013-08-29 11:23 ` Rajendra Nayak
2013-08-29 13:26 ` Sekhar Nori
2013-08-29 13:26 ` Sekhar Nori
2013-08-29 13:31 ` Santosh Shilimkar
2013-08-29 13:31 ` Santosh Shilimkar
2013-08-29 13:44 ` Sekhar Nori
2013-08-29 13:44 ` Sekhar Nori
2013-08-29 13:48 ` Santosh Shilimkar
2013-08-29 13:48 ` Santosh Shilimkar
2013-08-29 13:50 ` Rajendra Nayak
2013-08-29 13:50 ` Rajendra Nayak
2013-08-29 13:51 ` Santosh Shilimkar
2013-08-29 13:51 ` Santosh Shilimkar
2013-09-02 17:03 ` Sekhar Nori
2013-09-02 17:03 ` Sekhar Nori
2013-09-03 13:37 ` Sekhar Nori [this message]
2013-09-03 13:37 ` Sekhar Nori
2013-08-29 11:23 ` [PATCH v2 3/3] ARM: OMAP4+: Remove static iotable mappings for SRAM Rajendra Nayak
2013-08-29 11:23 ` Rajendra Nayak
2013-08-29 13:23 ` Santosh Shilimkar
2013-08-29 13:23 ` Santosh Shilimkar
2013-08-29 13:56 ` Rajendra Nayak
2013-08-29 13:56 ` Rajendra Nayak
2013-08-29 17:20 ` Kevin Hilman
2013-08-29 17:20 ` Kevin Hilman
2013-08-29 17:25 ` Santosh Shilimkar
2013-08-29 17:25 ` Santosh Shilimkar
2013-08-30 9:27 ` Rajendra Nayak
2013-08-30 9:27 ` Rajendra Nayak
2013-08-30 14:39 ` Kevin Hilman
2013-08-30 14:39 ` Kevin Hilman
2013-08-30 14:41 ` Santosh Shilimkar
2013-08-30 14:41 ` Santosh Shilimkar
2013-08-29 13:24 ` [PATCH v2 0/3] OMAP4+: Get rid of internal SRAM handling Santosh Shilimkar
2013-08-29 13:24 ` Santosh Shilimkar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5225E632.7010707@ti.com \
--to=nsekhar@ti.com \
--cc=bcousson@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=rnayak@ti.com \
--cc=santosh.shilimkar@ti.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.