ARM: cache: introduce weak arm_setup_identity_mapping

Separate the MMU identity mapping for ARM in a weak function, to allow
redefinition with platform specific function.

This is motivated by the need to unmap the region near address zero on HS OMAP
devices, to avoid speculative accesses. Accessing this region causes security
violations, which we want to avoid.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Cc: Tom Rini <trini@ti.com>

Changes for v3:
  - Add definition of __arm_setup_identity_mapping() into asm/cache.h
  - Fix comments style
ARM: OMAP5: redefine arm_setup_identity_mapping

We introduce an OMAP5 specific version of arm_setup_identity_mapping(), which
makes the first page of the identity mapping invalid.

We want to unmap the region near address zero on HS OMAP devices, to avoid
speculative accesses. Accessing this region causes security violations, which
we want to avoid.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Cc: Tom Rini <trini@ti.com>

Changes for v3:
  - Use definition of __arm_setup_identity_mapping() from asm/cache.h

Changes for v2:
  - Fix missing page_table argument
  - Add extern definition to fix compilation warning
Hack! Print reloc_off for debug

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
omap24xx_i2c: Handle wait_for_bb error

We add a return code to wait_for_bb() to be able to report errors to the
callers properly. We in turn handle this new error code in i2c_read, i2c_write
and i2c_probe.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
power: twl6035: complain on LDO9 error

We handle i2c_write return code and complain in case of error. We propagate the
error, too, to allow better handling at the upper level in the future.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
omap24xx_i2c: Handle OMAP5 like OMAP2,3,4

OMAP5 has 8b i2c data register field, like OMAP2, 3 and 4. Handle in the same
way. This fixes the following error on OMAP5:

  OMAP5430 EVM # mmc rescan
  timed out in wait_for_bb: I2C_STAT=1410
  twl6035: could not turn on LDO9.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
omap5: mux: Mux gpio8_234 pin to MSECURE mode.

This is required for enabling the RTC functionality
on GP devices.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
OMAP5: trim DDR i/o for 4 lots only

Only 4 lots missed the h/w production trim on OMAP5. Trace them through
CONTROL_DIE_ID_1 and apply DDR i/o trim values, but only for those. Otherwise,
leave the trimming values unchanged.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Hack! Enable all clocks

Prevents Linaro kernel v3.4.10+ to complain about lots of clocks when booting
on PandaBoard 5.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Hack! Grab USB EHCI bits from old, working u-boot OMAP5

This "repairs" USB with Linaro kernel v3.4.10+ on PandaBoard 5.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Hack! Disable ulpi_reset

Fixes link issue.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Hack! Adapt omap5 USB EHCI to new lowlevel API

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
omap: 5432: remove non-essential padconf settings

We want to get rid off the non-essential padconf settings from bootloader,
so start by not handling them at least for 5432 (handled as required within
kernel).
Will have to remove the entry completely when the equivalent will be
implemented for 5430.

Signed-off-by: Sebastien Jan <s-jan@ti.com>

[Do that for all OMAP5.]
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Hack! Detect and disable faulty EMIF dynamically

This is a quick hack to quickly detect if EMIF1 or EMIF2 is faulty, and disable
it in LISA_MAP accordingly. We leave the faulty EMIF "on", to avoid later
kernel crash at boot.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Marquette changes for ES2, rebased

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
omap5: More 5430 ES2 additions

FIXME! DIE ID for ES2

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
omap5: Add OMAP5432 ES2

FIXME! DIE ID for ES2

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Hack! Enable ES2

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Hack! LDO magic config not for ES2

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Hack! Default to 5430, NOT 5432

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>