[DRIVERS] video: Remove unnecessary #ifdef from amba-clcd driver

We don't require any #ifdef for Versatile CLCD (i.e. modified PL110)
in amba-clcd driver instead we can use device tree compatible string
to distinguish Versatile CLCD.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] Rename versatile_clcd_setup() to versatile_clcd_setup_dma()

We will be soon having CLCD support for Versatile platform which
would require us to define separate versatile_clcd_setup() for
Versatile platform.

This patch rename versatile_clcd_setup() to versatile_clcd_setup_dma()
so that it is easy for us to define separate versatile_clcd_setup()
for Versatile platform.

Signed-off-by: Anup Patel <anup@brainfault.org>
[DRIVERS] clk: Add dummy clocks for Versatile platform

The CLCD driver requires oscillator based clock on Versatile platform
hence this patch adds dummy clocks for Versatile platform.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] generic: Add CLCD support for Versatile platform

This patch add CLCD platform data for Versatile platform.

Signed-off-by: Anup Patel <anup@brainfault.org>
Merge x86-next from https://github.com/hschauhan/xvisor-x86_64
[ARM] generic: Add DTS file for two VExpress-A15 guests on VExpress-A15 host

There is lot of interest in having more than one instance of VExpress-A15
guests hence this patch adds an example DTS for having two pre-configured
VExpress-A15 guests on VExpress-A15 host.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] arm32ve: Fix HTCR and VTCR programing

Currently, we did not explicitly clear crucial fields of HTCR
and VTCR before re-programing new values in them.

This patch improves and fixes HTCR and VTCR programing. We also
update HTCR and VTCR programing to ensure cacheable + write-back
translation table walks for hypervisor stage1 and stage2.

Signed-off-by: Anup Patel <anup@brainfault.org>
[DRIVERS] include: Fixing ioreadxx and iowritexx functions.

Making ioreadxx and iowritexx functions behave as a linux like functions.

Signed-off-by: Pranavkumar Sawargaonkar <pranav.sawargaonkar@gmail.com>
[DRIVERS] New driver support for GPIO And Pinctrl devices.

This patch has:
- Initial version of GPIO and Pin control device driver support.
- Ported from linux's code inside drivers/gpio and drivers/pinctrl
- GPIO base layer code farely completely ported from linux.
- Pinctrl will need more code porting from linux.
- This is an experimental code and will get improved over time.

Signed-off-by: Pranavkumar Sawargaonkar <pranav.sawargaonkar@gmail.com>
[CORE] vmm_heap: Adding allocation size retrival functions.

This patch adds:

vmm_alloc_size() and vmm_dma_alloc_size() functions to retrive allocation
size of alloced memory when required later.

This patch also adds linux like api of ksize() using vmm_alloc_size().
ksize() assumes that you are asking a size of a normal memory
and not dma memory which was allocated.
For dma memory one can directly call vmm_dma_alloc_size()

Signed-off-by: Pranavkumar Sawargaonkar <pranav.sawargaonkar@gmail.com>
[ARM] arm64: Cleanup TCR_EL2 and VTCR_EL2 programming

This patch makes TCR_EL2 and VTCR_EL2 programming less cryptic
(i.e. more readable) by introducing more #define for field values.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] generic: Add more DTS files for Foundation-v8 model

This patch add more example DTS files for Foundation-v8 model to have
multiple pre-configured guests.

Signed-off-by: Anup Patel <anup@brainfault.org>
[DOCS] Update arm docs to reflect DTB based booting for Xvisor

We have moved to DTB based booting for almost all arm32, arm32ve,
and arm64 boards hence this patch updates all relevant arm docs
which did not reflect this.

Signed-off-by: Anup Patel <anup@brainfault.org>
[LIBS] buddy: Fix potential race in buddy_mem_free() & buddy_mem_partial_free()

Both buddy_mem_free() and buddy_mem_partial_free() first find a
buddy_area from alloc tree and then delete it from alloc tree.
On a SMP host, buddy_mem_free() and buddy_mem_partial_free() can
be called simultaneously from different host CPUs hence find and
delete of buddy_area has to be single operation protected by lock.

This patch makes find & delete buddy_area in buddy_mem_free() and
buddy_mem_partial_free() as single operation protected by alloc_lock.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] Introduce linux-like device resource managment APIs

The linux kernel developers are moving most of the device drivers
to use devm_xxxx() APIs for managing device resource.

We will soon require linux-like device resource managment APIs
for porting drivers from Linux.

This patch adds stripped down version of linux-like device resource
managment APIs so that we can implement devm_xxxx() APIs for drivers
ported from linux.

Signed-off-by: Anup Patel <anup@brainfault.org>
[DRIVERS] Add linux-compatible devres_xxx() APIs to linux/device.h

This patch maps linux-compatible devres_xxx() APIs to vmm_devres_xxx() APIs.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] vmm_devres: Add resource managed malloc, zalloc, and free APIs

This patch adds linux-like resource-managed memory allocation APIs
for driver porting.

Signed-off-by: Anup Patel <anup@brainfault.org>
[DRIVERS] Linux compatible devm_xxx() memory allocation APIs

This patch adds Linux compatible resource managed memory allocation
devm_xxx() APIs to linux/device.h

Signed-off-by: Anup Patel <anup@brainfault.org>
[x86] Make arch_delay_loop() static inline.

Currently for x86, we dont have low-level implementation of
arch_delay_loop(). Instead we have it as non-inlined function in
arch_delay.h. This prevents us from including arch_delay.h at
multiple locations for x86 hence for time-being make this
function as static inline for x86.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] Make size_t and ssize_t compliant with stddef.h

We have stddef.h included at number of places (mostly lwIP) which
has conflicting typedef for size_t and ssize_t hence to avoid
issues in compilation we make our version of size_t and ssize_t
compliant with GCC stddef.h

Signed-off-by: Anup Patel <anup@brainfault.org>