[ARM] bcm2835: Implement arch_board_reset() & arch_board_shutdown() for Raspberry Pi

This patch does few cleanups and implements missing board functions required for Raspberry Pi.

With this patch, we have Xvisor ARM working on actual Raspberry Pi Mobel B board and Raspberry Pi emulated by QEMU.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] delay: Make loops_per_usec and loop_per_msec parameters as per-CPU

This patch removes the assumption made for SMP host that all host CPUs run at same speed.

In real world, SMP host can have per-CPU frequency scaling or symmetric CPUs running in different frequency and power domains (e.g. big.Little systems).

Having loops_per_usec and loop_per_msec as per-CPU parameters will also give more info to upcoming SMP load balancer for load balancing VCPUs on host CPUs.

The only constraint is that if frequency of any CPU in SMP host changes then we will have to do vmm_delay_recalibrate() on that CPU after frequency change.

Signed-off-by: Anup Patel <anup@brainfault.org>
[DOCS] Fix typo in sun4i doc

Signed-off-by: Anup Patel <anup@brainfault.org>
[DOCS] Add steps to boot Xvisor on actual Raspberry Pi board

Signed-off-by: Anup Patel <anup@brainfault.org>
[TOP] Update status of Raspberry Pi port

Signed-off-by: Anup Patel <anup@brainfault.org>
[TOP] Update README to reflect that we support ARMv6 architecture

Signed-off-by: Anup Patel <anup@brainfault.org>
[TOP] Update TODO list based on latest code

Signed-off-by: Anup Patel <anup@brainfault.org>
[DRIVERS] Add ENOSYS error code in linux compatible asm/errno.h

Signed-off-by: Anup Patel <anup@brainfault.org>
[DRIVERS] Include linux/err.h directly from linux/device.h

Signed-off-by: Anup Patel <anup@brainfault.org>
[LIBS] Add library APIs for log2 functions

Signed-off-by: Anup Patel <anup@brainfault.org>
[DRIVERS] Add linux compatible linux/leds.h and linux/log2.h

Signed-off-by: Anup Patel <anup@brainfault.org>
[DRIVERS] More linux compatible headers for driver porting

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] Add desc field to vmm_blockdev instance

In future, block devices such as SD, MMC, SATA, etc. would require some place in block device instance to provide detailed information about the underlying hardare device.

To solve this problem, we add description field to the vmm_blockdev instance.

Signed-off-by: Anup Patel <anup@brainfault.org>
[DRIVERS] First-cut implementation or light-weight MMC/SD/SDIO card support

This patch introduces a light-weight framework for MMC/SD/SDIO card support adapted from u-boot.

The whole idea here is to provide linux compatible MMC/SD/SDIO host controller driver APIs using u-boot like simple framework.

For now, we don't have linux compatible header under drivers/include/linux/mmc but in future we will provide this headers using drivers/include/drv/mmc_core.h

Signed-off-by: Anup Patel <anup@brainfault.org>
[DRIVERS] mmc: Ignore failure to detect card in mmc_add_host()

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] Implement arch specific cache flush operations for arch independent code

Signed-off-by: Anup Patel <anup@brainfault.org>
[DRIVERS] mmc: Add support for ARM Multimedia Card Interface PL180

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] Enable MMCI for Realview and VExpress boards

Signed-off-by: Anup Patel <anup@brainfault.org>
[DRIVERS] mmc: Minor cleanups in core framework.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] Fix likely(x) and unlikely(x) so that we can have x as pointer values too

Till now, if we used pointer values as argument to likely() and unlikely() macros then we would get compile time warnings.

This patch fixes this issue with likely() and unlikely() macros.

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