sunxi: Add CONFIG_OLD_SUNXI_KERNEL_COMPAT Kconfig option

Add a Kconfig option which users can select when they want to boot older
kernels, e.g. the linux-sunxi 3.4 kernels. For now this just forces the pll5
"p" value to 1 (divide by 2) as that is what those kernels are hardcoded too,
in the future this may enable further workarounds.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Tom Rini <trini@ti.com>
--
Changes in v2:
-s/CONFIG_OLD_KERNEL_COMPAT/CONFIG_OLD_SUNXI_KERNEL_COMPAT.
-Move the code block setting P(1) for old kernels to where P gets cleared
ARM: bootm: Allow booting in secure mode on hyp capable systems

Older Linux kernels will not properly boot in hype mode, add support for a
bootm_boot_mode environment variable, which when set to "sec" will cause
u-boot to boot in secure mode even when build with non-sec (and hyp) support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>

--
Changes in v2:
-Allow changing the default boot mode to secure through defining
 CONFIG_ARMV7_SEC_BY_DEFAULT, this is useful for archs which have a Kconfig
 option for compatibility with older kernels
Changes in v3:
-Add an else at the end of the #ifdef NONSEC block so that if do_nonsec_entry
 fails we do not end up re-trying in secure mode
sun7i: Set CONFIG_ARMV7_SEC_BY_DEFAULT when CONFIG_OLD_SUNXI_KERNEL_COMPAT is set

Old kernels cannot handle booting in non-secure (hyp) mode, so when
CONFIG_OLD_SUNXI_KERNEL_COMPAT is set, also set CONFIG_ARMV7_SEC_BY_DEFAULT.

Note that whether to booting secure or non-secure can always be overriden
using the bootm_boot_mode environment variable.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>