Commit 1d597b07 authored by Rajendra Nayak's avatar Rajendra Nayak Committed by Paul Walmsley

ARM: OMAP: DRA7: Reuse the omap44xx_restart and fix the device instance

The omap44xx_restart used on omap4 and omap5 devices can be reused
on dra7 devices as well. The device instance however is different
across omap5 and dra7 as compared to omap4. So fix this for omap5
as well as dra7.
Signed-off-by: default avatarRajendra Nayak <rnayak@ti.com>
Signed-off-by: default avatarR Sricharan <r.sricharan@ti.com>
Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
parent 9a4e301d
...@@ -63,6 +63,7 @@ obj-$(CONFIG_SOC_AM33XX) += am33xx-restart.o ...@@ -63,6 +63,7 @@ obj-$(CONFIG_SOC_AM33XX) += am33xx-restart.o
obj-$(CONFIG_ARCH_OMAP3) += omap3-restart.o obj-$(CONFIG_ARCH_OMAP3) += omap3-restart.o
obj-$(CONFIG_ARCH_OMAP4) += omap4-restart.o obj-$(CONFIG_ARCH_OMAP4) += omap4-restart.o
obj-$(CONFIG_SOC_OMAP5) += omap4-restart.o obj-$(CONFIG_SOC_OMAP5) += omap4-restart.o
obj-$(CONFIG_SOC_DRA7XX) += omap4-restart.o
# Pin multiplexing # Pin multiplexing
obj-$(CONFIG_SOC_OMAP2420) += mux2420.o obj-$(CONFIG_SOC_OMAP2420) += mux2420.o
......
...@@ -238,5 +238,6 @@ DT_MACHINE_START(DRA7XX_DT, "Generic DRA7XX (Flattened Device Tree)") ...@@ -238,5 +238,6 @@ DT_MACHINE_START(DRA7XX_DT, "Generic DRA7XX (Flattened Device Tree)")
.init_machine = omap_generic_init, .init_machine = omap_generic_init,
.init_time = omap5_realtime_timer_init, .init_time = omap5_realtime_timer_init,
.dt_compat = dra7xx_boards_compat, .dt_compat = dra7xx_boards_compat,
.restart = omap44xx_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -20,10 +20,13 @@ ...@@ -20,10 +20,13 @@
#include "common.h" #include "common.h"
#include "prcm-common.h" #include "prcm-common.h"
#include "prm44xx.h" #include "prm44xx.h"
#include "prm54xx.h"
#include "prm7xx.h"
#include "prminst44xx.h" #include "prminst44xx.h"
#include "prm-regbits-44xx.h" #include "prm-regbits-44xx.h"
#include "prcm44xx.h" #include "prcm44xx.h"
#include "prcm_mpu44xx.h" #include "prcm_mpu44xx.h"
#include "soc.h"
static void __iomem *_prm_bases[OMAP4_MAX_PRCM_PARTITIONS]; static void __iomem *_prm_bases[OMAP4_MAX_PRCM_PARTITIONS];
...@@ -165,9 +168,18 @@ int omap4_prminst_deassert_hardreset(u8 shift, u8 part, s16 inst, ...@@ -165,9 +168,18 @@ int omap4_prminst_deassert_hardreset(u8 shift, u8 part, s16 inst,
void omap4_prminst_global_warm_sw_reset(void) void omap4_prminst_global_warm_sw_reset(void)
{ {
u32 v; u32 v;
s16 dev_inst;
v = omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION,
OMAP4430_PRM_DEVICE_INST, if (cpu_is_omap44xx())
dev_inst = OMAP4430_PRM_DEVICE_INST;
else if (soc_is_omap54xx())
dev_inst = OMAP54XX_PRM_DEVICE_INST;
else if (soc_is_dra7xx())
dev_inst = DRA7XX_PRM_DEVICE_INST;
else
return;
v = omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION, dev_inst,
OMAP4_PRM_RSTCTRL_OFFSET); OMAP4_PRM_RSTCTRL_OFFSET);
v |= OMAP4430_RST_GLOBAL_WARM_SW_MASK; v |= OMAP4430_RST_GLOBAL_WARM_SW_MASK;
omap4_prminst_write_inst_reg(v, OMAP4430_PRM_PARTITION, omap4_prminst_write_inst_reg(v, OMAP4430_PRM_PARTITION,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment