public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Tero Kristo <tero.kristo@nokia.com>
Cc: linux-omap@vger.kernel.org, Paul Walmsley <paul@pwsan.com>
Subject: Re: [PATCH 02/23] OMAP3 SRAM: mark OCM RAM as Non-cacheable Normal memory
Date: Mon, 15 Dec 2008 11:07:10 -0800	[thread overview]
Message-ID: <20081215190708.GB10664@atomide.com> (raw)
In-Reply-To: <1229010762-3150-3-git-send-email-tero.kristo@nokia.com>

* Tero Kristo <tero.kristo@nokia.com> [081211 07:58]:
> From: Paul Walmsley <paul@pwsan.com>
> 
> Mark the SRAM (aka OCM RAM) as Non-cacheable Normal memory[1].  This
> is to prevent the ARM from evicting existing cache lines to SDRAM
> while code is executing from the SRAM.  Necessary since one of the
> primary uses for the SRAM is to hold the code and data for the CORE
> DPLL M2 divider reprogramming code, which must execute while the SDRC
> is idled.  If the ARM attempts to write cache lines back to the while
> the SRAM code is running, the ARM will stall[2].
> 
> TI deals with this problem in the CDP kernel by marking the SRAM as
> Strongly-ordered memory.
> 
> Tero Kristo <tero.kristo@nokia.com> caught a bug in an earlier version of
> this patch - thanks Tero.

As I talked with Paul, we might want to set up two sections in SRAM.
One section that is cached and another that is not.

Tony

> 
> ...
> 
> 1. ARMv7 ARM (DDI 0406A) pp. A3-30, A3-31, B3-32.
> 
> 2. Private communication with Richard Woodruff <r-woodruff2@ti.com>
> 
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> Cc: Tero Kristo <tero.kristo@nokia.com>
> Cc: Richard Woodruff <r-woodruff2@ti.com>
> ---
>  arch/arm/plat-omap/sram.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
>  mode change 100755 => 100644 arch/arm/plat-omap/sram.c
> 
> diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
> old mode 100755
> new mode 100644
> index abcc05b..04214e1
> --- a/arch/arm/plat-omap/sram.c
> +++ b/arch/arm/plat-omap/sram.c
> @@ -207,6 +207,15 @@ void __init omap_map_sram(void)
>  		base = OMAP3_SRAM_PA;
>  		base = ROUND_DOWN(base, PAGE_SIZE);
>  		omap_sram_io_desc[0].pfn = __phys_to_pfn(base);
> +
> +		/*
> +		 * SRAM must be marked as non-cached on OMAP3 since the
> +		 * CORE DPLL M2 divider change code (in SRAM) runs with the
> +		 * SDRAM controller disabled, and if it is marked cached,
> +		 * the ARM may attempt to write cache lines back to SDRAM
> +		 * which will cause the system to hang.
> +		 */
> +		omap_sram_io_desc[0].type = MT_MEMORY_NONCACHED;
>  	}
>  
>  	omap_sram_io_desc[0].length = 1024 * 1024;	/* Use section desc */
> -- 
> 1.5.4.3
> 
> --
> 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

  parent reply	other threads:[~2008-12-15 19:07 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-11 15:52 OMAP3: DVFS core patch set Tero Kristo
2008-12-11 15:52 ` [PATCH 01/23] ARM: MMU: add a Non-cacheable Normal executable memory type Tero Kristo
2008-12-11 15:52   ` [PATCH 02/23] OMAP3 SRAM: mark OCM RAM as Non-cacheable Normal memory Tero Kristo
2008-12-11 15:52     ` [PATCH 03/23] OMAP3 SRAM: add ARM barriers to omap3_sram_configure_core_dpll Tero Kristo
2008-12-11 15:52       ` [PATCH 04/23] OMAP3 clock: add interconnect barriers to CORE DPLL M2 change Tero Kristo
2008-12-11 15:52         ` [PATCH 05/23] OMAP3 SRAM: clear the SDRC PWRENA bit during SDRC frequency change Tero Kristo
2008-12-11 15:52           ` [PATCH 06/23] OMAP3 SDRC: Add 166MHz, 83MHz SDRC settings for the BeagleBoard Tero Kristo
2008-12-11 15:52             ` [PATCH 07/23] OMAP3 SDRC: initialize SDRC_POWER at boot Tero Kristo
2008-12-11 15:52               ` [PATCH 08/23] OMAP3 SRAM: renumber registers to make space for argument passing Tero Kristo
2008-12-11 15:52                 ` [PATCH 09/23] OMAP3 clock: only unlock SDRC DLL if SDRC clk < 83MHz Tero Kristo
2008-12-11 15:52                   ` [PATCH 10/23] OMAP3 clock: use pr_debug() rather than pr_info() in some clock change code Tero Kristo
2008-12-11 15:52                     ` [PATCH 11/23] OMAP3 clock: remove wait for DPLL3 M2 clock to stabilize Tero Kristo
2008-12-11 15:52                       ` [PATCH 12/23] OMAP3 clock: initialize SDRC timings at kernel start Tero Kristo
2008-12-11 15:52                         ` [PATCH 13/23] OMAP3 clock: add a short delay when lowering CORE clk rate Tero Kristo
2008-12-11 15:52                           ` [PATCH 14/23] OMAP3 clock/SDRC: program SDRC_MR register during SDRC clock change Tero Kristo
2008-12-11 15:52                             ` [PATCH 15/23] OMAP3 SRAM: add more comments on the SRAM code Tero Kristo
2008-12-11 15:52                               ` [PATCH 16/23] OMAP3 SRAM: convert SRAM code to use macros rather than magic numbers Tero Kristo
2008-12-11 15:52                                 ` [PATCH 17/23] OMAP3: PM: Fixed VDD2 control to work from both sysfs and SRF API Tero Kristo
2008-12-11 15:52                                   ` [PATCH 18/23] OMAP3: PM: Added DVFS OPP locking interface for VDD1 and VDD2 Tero Kristo
2008-12-11 15:52                                     ` [PATCH 19/23] OMAP3: Fix rate calculation bug in omap3_select_table_rate Tero Kristo
2008-12-11 15:52                                       ` [PATCH 20/23] OMAP3: Add support for DPLL3 divisor values higher than 2 Tero Kristo
2008-12-11 15:52                                         ` [PATCH 21/23] OMAP3: PM: Prevented DVFS state switches when enabling off-mode Tero Kristo
2008-12-11 15:52                                           ` [PATCH 22/23] OMAP3: PM: Enable VDD2 OPP1 Tero Kristo
2008-12-11 15:52                                             ` [PATCH 23/23] OMAP3: PM: Fix linker error without CONFIG_PM option Tero Kristo
2008-12-11 16:06                                         ` [PATCH 20/23] OMAP3: Add support for DPLL3 divisor values higher than 2 Paul Walmsley
2008-12-11 16:38                                           ` Tero.Kristo
2008-12-15 19:07     ` Tony Lindgren [this message]
2008-12-15 19:06   ` [PATCH 01/23] ARM: MMU: add a Non-cacheable Normal executable memory type Tony Lindgren
2008-12-15 19:58     ` Paul Walmsley
2008-12-12  1:59 ` OMAP3: DVFS core patch set Paul Walmsley
2008-12-18  8:22   ` Paul Walmsley
2008-12-15 21:48 ` Kevin Hilman

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=20081215190708.GB10664@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=tero.kristo@nokia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox