1/* 2 * Copyright 2014, General Dynamics C4 Systems 3 * 4 * This software may be distributed and modified according to the terms of 5 * the GNU General Public License version 2. Note that NO WARRANTY is provided. 6 * See "LICENSE_GPLv2.txt" for details. 7 * 8 * @TAG(GD_GPL) 9 */ 10 11#ifndef __PLAT_MACHINE_HARDWARE_H 12#define __PLAT_MACHINE_HARDWARE_H 13 14#include <basic_types.h> 15#include <linker.h> 16#include <plat/machine.h> 17#include <plat/machine/devices.h> 18#include <plat/machine/interrupt.h> 19 20#define physBase 0x80000000 21#define kernelBase 0xf0000000 22 23static const kernel_frame_t BOOT_RODATA kernel_devices[] = { 24 { 25 /* DM Timer 0 */ 26 DMTIMER0_PADDR, 27 DMTIMER0_PPTR, 28 true /* armExecuteNever */ 29 }, 30 /* INTC */ 31 { 32 INTC_PADDR, 33 INTC_PPTR, 34 true /* armExecuteNever */ 35 }, 36 { 37 /* WDT1 */ 38 WDT1_PADDR, 39 WDT1_PPTR, 40 true /* armExecuteNever */ 41 }, 42 { 43 /* CMPER */ 44 CMPER_PADDR, 45 CMPER_PPTR, 46 true /* armExecuteNever */ 47#ifdef CONFIG_PRINTING 48 }, 49 { 50 /* UART */ 51 UART0_PADDR, 52 UART0_PPTR, 53 true /* armExecuteNever */ 54#endif 55 } 56}; 57 58/* Available physical memory regions on platform (RAM minus kernel image). */ 59/* NOTE: Regions are not allowed to be adjacent! */ 60 61/* pointer to end of kernel image */ 62/* need a fake array to get the pointer from the linker script */ 63//TODO is this really needed? 64extern char ki_end[1]; 65 66static const p_region_t BOOT_RODATA avail_p_regs[] = { 67 /* 128 MiB of memory minus kernel image at its beginning */ 68 { /* .start = */ (pptr_t)ki_end - (kernelBase - physBase), /* .end = */ 0x88000000 } 69}; 70 71static const p_region_t BOOT_RODATA dev_p_regs[] = { 72 /* SoC devices: */ 73 { /* .start = */ UART0_PADDR, /* .end = */ UART0_PADDR + (1 << PAGE_BITS) }, 74 { /* .start = */ DMTIMER2_PADDR, /* .end = */ DMTIMER2_PADDR + (1 << PAGE_BITS) }, 75 { /* .start = */ DMTIMER3_PADDR, /* .end = */ DMTIMER3_PADDR + (1 << PAGE_BITS) }, 76 { /* .start = */ DMTIMER4_PADDR, /* .end = */ DMTIMER4_PADDR + (1 << PAGE_BITS) }, 77 { /* .start = */ DMTIMER5_PADDR, /* .end = */ DMTIMER5_PADDR + (1 << PAGE_BITS) }, 78 { /* .start = */ DMTIMER6_PADDR, /* .end = */ DMTIMER6_PADDR + (1 << PAGE_BITS) }, 79 { /* .start = */ DMTIMER7_PADDR, /* .end = */ DMTIMER7_PADDR + (1 << PAGE_BITS) }, 80 { /* .start = */ WDT1_PADDR, /* .end = */ WDT1_PADDR + (1 << PAGE_BITS) }, 81 { /* .start = */ CMPER_PADDR, /* .end = */ CMPER_PADDR + (1 << PAGE_BITS) }, 82 { /* .start = */ CTRL_PADDR, /* .end = */ CTRL_PADDR + (1 << PAGE_BITS) }, 83 { /* .start = */ PRCM_PADDR, /* .end = */ PRCM_PADDR + (1 << PAGE_BITS) }, 84 { /* .start = */ CPSW_PADDR, /* .end = */ CPSW_PADDR + (1 << (PAGE_BITS + 4)) } 85 /* Board devices. */ 86 /* TODO: This should ultimately be replaced with a more general solution. */ 87}; 88 89#endif 90