Skip to content

Commit

Permalink
ARM: OMAP2+: Fix imprecise external abort caused by bogus SRAM init
Browse files Browse the repository at this point in the history
Some omaps are producing imprecise external aborts because we are
wrongly trying to init SRAM for device tree based booting. Only
omap3 is still using the legacy SRAM code, so we need to make it
omap3 specific. Otherwise we can get errors like this on at least
dm814x:

Unhandled fault: imprecise external abort (0xc06) at 0xc08b156c
...
(omap_rev) from [<c08b12e0>] (omap_sram_init+0xf8/0x3e0)
(omap_sram_init) from [<c08aca0c>] (omap_sdrc_init+0x10/0xb0)
(omap_sdrc_init) from [<c08b581c>] (pdata_quirks_init+0x18/0x44)
(pdata_quirks_init) from [<c08b5478>] (omap_generic_init+0x10/0x1c)
(omap_generic_init) from [<c08a57e0>] (customize_machine+0x1c/0x40)
(customize_machine) from [<c00098a4>] (do_one_initcall+0x80/0x1dc)
(do_one_initcall) from [<c08a2ec4>] (kernel_init_freeable+0x218/0x2e8)
(kernel_init_freeable) from [<c063a554>] (kernel_init+0x8/0xec)
(kernel_init) from [<c000f890>] (ret_from_fork+0x14/0x24)

Let's fix the issue by making sure omap_sdrc_init only gets called for
omap3. To do that, we need to have compatible "ti,omap3" in the dts
files. And let's also use "ti,omap3630" instead of "ti,omap36xx" like
we're supposed to.

Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Tony Lindgren committed Oct 19, 2015
1 parent 6a3b764 commit 57df538
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

/ {
model = "LogicPD Zoom DM3730 Torpedo Development Kit";
compatible = "logicpd,dm3730-torpedo-devkit", "ti,omap36xx";
compatible = "logicpd,dm3730-torpedo-devkit", "ti,omap3630", "ti,omap3";

gpio_keys {
compatible = "gpio-keys";
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/omap3-evm-37xx.dts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

/ {
model = "TI OMAP37XX EVM (TMDSEVM3730)";
compatible = "ti,omap3-evm-37xx", "ti,omap36xx";
compatible = "ti,omap3-evm-37xx", "ti,omap3630", "ti,omap3";

memory {
device_type = "memory";
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-omap2/board-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
MACHINE_END

static const char *const omap36xx_boards_compat[] __initconst = {
"ti,omap3630",
"ti,omap36xx",
NULL,
};
Expand Down
9 changes: 8 additions & 1 deletion arch/arm/mach-omap2/pdata-quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,14 @@ static void pdata_quirks_check(struct pdata_init *quirks)

void __init pdata_quirks_init(const struct of_device_id *omap_dt_match_table)
{
omap_sdrc_init(NULL, NULL);
/*
* We still need this for omap2420 and omap3 PM to work, others are
* using drivers/misc/sram.c already.
*/
if (of_machine_is_compatible("ti,omap2420") ||
of_machine_is_compatible("ti,omap3"))
omap_sdrc_init(NULL, NULL);

pdata_quirks_check(auxdata_quirks);
of_platform_populate(NULL, omap_dt_match_table,
omap_auxdata_lookup, NULL);
Expand Down

0 comments on commit 57df538

Please sign in to comment.