arm: tegra: skip reset_handle_enable for dsim
Peng Du [Wed, 27 Feb 2013 20:15:05 +0000 (12:15 -0800)]
The memory map of DSIM/MTS in aarch64 config doesn't map
IRAM (0x40000000 is a hole). This change works around
this quirk by disabling the reset handler enable function.

Change-Id: I74efd5d0e78ee5fba51fe525ca98efc7e202dd68
Signed-off-by: Peng Du <pdu@nvidia.com>
Reviewed-on: http://git-master/r/206377
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com>

arch/arm/mach-tegra/reset.c

index ccb5ac2..ec8127d 100644 (file)
@@ -27,6 +27,7 @@
 #include "sleep.h"
 #include "pm.h"
 #include "fuse.h"
+#include "mach/hardware.h"
 
 #define TEGRA_IRAM_RESET_BASE (TEGRA_IRAM_BASE + \
                                TEGRA_IRAM_RESET_HANDLER_OFFSET)
@@ -120,5 +121,6 @@ void __init tegra_cpu_reset_handler_init(void)
        outer_clean_range(__pa(&__tegra_cpu_reset_handler_data[0]),
                          __pa(&__tegra_cpu_reset_handler_data[TEGRA_RESET_DATA_SIZE]));
 
-       tegra_cpu_reset_handler_enable();
+       if (!tegra_cpu_is_dsim()) /* Can't write IRAM on DSIM/MTS (yet) */
+               tegra_cpu_reset_handler_enable();
 }