Kconfig: Add EXPERT option

For similar reasons to why the Linux Kernel has an EXPERT option, we too
want an option to allow for tweaking of some options that while normally
should remain hidden, may need to be changed in some cases.

Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun7i: Drop CONFIG_ARMV7_PSCI_NR_CPUS

It is not used anywhere.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: Add arch/arm/cpu/armv7/Kconfig with non-secure and virt options

Add arch/arm/cpu/armv7/Kconfig with non-secure and virt options, so that
we can have CONFIG_ARMV7_SEC_BY_DEFAULT as a proper Kconfig option.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: bootm: Allow booting in secure mode on hyp capable systems

Older Linux kernels will not properly boot in hyp mode, add support for a
bootm_boot_mode environment variable, which can be set to "sec" or "nonsec"
to force booting in secure or non-secure mode when build with non-sec support.

The default behavior can be selected through CONFIG_ARMV7_BOOT_SEC_DEFAULT,
when this is set booting in secure mode is the default. The default setting
for this Kconfig option is N, preserving the current behavior of booting in
non-secure mode by default when non-secure mode is supported.

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_BOOT_SEC_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
Changes in v4:
-Add a Kconfig option to select to boot in secure or non-secure mode by default
sun7i: Set ARMV7_BOOT_SEC_DEFAULT when OLD_SUNXI_KERNEL_COMPAT is set

Old kernels cannot handle booting in non-secure (hyp) mode, so when
OLD_SUNXI_KERNEL_COMPAT is set, also set ARMV7_BOOT_SEC_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>
--
Changes in v2:
-Use Kconfig rather the a hard-define in include/configs/sun7i.h
sunxi: Add video pll clock functions

This is a preparation patch for adding support for HDMI out.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi: video: Add cfb console driver for sunxi

This adds a fixed mode hdmi driver for the sunxi platform. The fixed
mode is a relatively safe 1024x768, more complete EDID handling is
currently not provided. Only HDMI is supported today.

This code is enabled when HPD detects an attached monitor, which works
well on even A13, where no HDMI signals are externally available on the
package.

Current config is such that 8MB is shaved off at the top of the RAM.
This avoids several memory handling issues, most significant is the fact
that on linux on ARM you are not allowed to remap known RAM as IO. A
clued in display driver will be able to recycle this reserved RAM in
future though.

cfbconsole was chosen as it provides the most important functionality: a
working u-boot console, allowing for the debugging of certain issues
without the need for a UART.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
[hdegoede@redhat.com: Major cleanups and some small bugfixes]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

sun6i-hdmi-hack

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi: video: Add simplefb support

Add simplefb support, note this depends on the kernel having support for
the clocks property which has recently been added to the simplefb devicetree
binding.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi: Add usb keyboard Kconfig option

For use together with the hdmi console.

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