ARM: am33xx: Remove unneeded switch from thumb.

This comment looks to be a red hearing. The previous call to kernel_flush
does not need this switch from THUMB, why should this call?

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
ARM: am33xx: Use blx instead of mov/bx

Instead of manually saving the pc to lr, let blx do it.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
ARM: am33xx: Comment and standardize WFI implementation

Change the order of the WFI sequence to match that of omap4 for consistency.
Also, properly comment what is going on.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
ARM: am33xx: Fix function prototypes

This isn't c++, don't leave out void.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
ARM: am33xx: Add missing return 0;

wkup_m3_remove was missing its return value, fix that.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
ARM: am33xx: Make sleep actions configurable.

This patch makes sleep actions in sleep33xx.S configurable. This is necessary to
to allow the cpuidle to share the same code. It allows different actions to be taken
depending on the desired target state.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
ARM: OMAP2+: hwmod: rt address space index for DT

Address space is being removed from hwmod database and DT information
in <reg> property is being used. Currently the 0th index of device
address space is used to map for register target address. This is not
always true, eg. cpgmac has it's sysconfig in second address space.

Handle it by specifying index of device address space to be used for
register target. As default value of this field would be zero with
static initialization, existing behaviour of using first address space
for register target while using DT would be kept as such.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
ARM: OMAP2+: hwmod: AM335x: fix cpgmac address space

Register target address to be used for cpgmac is the second device
address space. By default, hwmod picks first address space (0th index)
for register target.

With removal of address space from hwmod and using DT instead, cpgmac
is getting wrong address space for register target.

Fix it by indicating the address space to be used for register target.

Signed-off-by: Afzal Mohammed <afzal@ti.com>