OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2010 NVIDIA Corporation. |
| 3 * All rights reserved. |
| 4 * |
| 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: |
| 7 * |
| 8 * Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. |
| 10 * |
| 11 * Redistributions in binary form must reproduce the above copyright notice, |
| 12 * this list of conditions and the following disclaimer in the documentation |
| 13 * and/or other materials provided with the distribution. |
| 14 * |
| 15 * Neither the name of the NVIDIA Corporation nor the names of its contributors |
| 16 * may be used to endorse or promote products derived from this software |
| 17 * without specific prior written permission. |
| 18 * |
| 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
| 23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 29 * POSSIBILITY OF SUCH DAMAGE. |
| 30 * |
| 31 */ |
| 32 |
| 33 #ifndef INCLUDED_AVP_H |
| 34 #define INCLUDED_AVP_H |
| 35 |
| 36 #include "ap15/arictlr.h" |
| 37 #include "ap15/artimer.h" |
| 38 // FIXME: get the ararmev header |
| 39 |
| 40 // 3 controllers in contiguous memory starting at INTERRUPT_BASE, each |
| 41 // controller's aperture is INTERRUPT_SIZE large |
| 42 #define INTERRUPT_BASE 0x60004000 |
| 43 #define INTERRUPT_SIZE 0x100 |
| 44 #define INTERRUPT_NUM_CONTROLLERS 3 |
| 45 |
| 46 #define INTERRUPT_PENDING( ctlr ) \ |
| 47 (INTERRUPT_BASE + ((ctlr) * INTERRUPT_SIZE) + ICTLR_VIRQ_COP_0) |
| 48 |
| 49 #define INTERRUPT_SET( ctlr ) \ |
| 50 (INTERRUPT_BASE + ((ctlr) * INTERRUPT_SIZE) + ICTLR_COP_IER_SET_0) |
| 51 |
| 52 #define INTERRUPT_CLR( ctlr ) \ |
| 53 (INTERRUPT_BASE + ((ctlr) * INTERRUPT_SIZE) + ICTLR_COP_IER_CLR_0) |
| 54 |
| 55 #define OSC_CTRL ( 0x60006000 + 0x50 ) |
| 56 #define OSC_FREQ_DET ( 0x60006000 + 0x58 ) |
| 57 #define OSC_DET_STATUS ( 0x60006000 + 0x5C ) |
| 58 |
| 59 #define TIMER_USEC ( 0x60005010 ) |
| 60 #define TIMER_CFG ( 0x60005014 ) |
| 61 #define TIMER_0_BASE ( 0x60005000 ) |
| 62 #define TIMER_0 ( TIMER_0_BASE + TIMER_TMR_PTV_0 ) |
| 63 #define TIMER_0_CLEAR ( TIMER_0_BASE + TIMER_TMR_PCR_0 ) |
| 64 #define TIMER_1_BASE ( 0x60005008 ) |
| 65 #define TIMER_1 ( TIMER_1_BASE + TIMER_TMR_PTV_0 ) |
| 66 #define TIMER_1_CLEAR ( TIMER_1_BASE + TIMER_TMR_PCR_0 ) |
| 67 |
| 68 #define CLOCK_RST_LO (0x60006004) |
| 69 #define CLOCK_CTLR_HI (0x60006014) |
| 70 #define CLOCK_CTLR_LO (0x60006010) |
| 71 |
| 72 #define CACHE_CTLR (0x6000C000) |
| 73 #define CACHE_CONTROL_0 (0x0) |
| 74 |
| 75 #define PPI_INTR_ID_TIMER_0 (0) |
| 76 #define PPI_INTR_ID_TIMER_1 (1) |
| 77 #define PPI_INTR_ID_TIMER_2 (9) |
| 78 #define PPI_INTR_ID_TIMER_3 (10) |
| 79 |
| 80 /* flow controller */ |
| 81 #define FLOW_CONTROLLER (0x60007004) |
| 82 |
| 83 /* exception vectors */ |
| 84 #define VECTOR_BASE ( 0x6000F200 ) |
| 85 #define VECTOR_RESET ( VECTOR_BASE + 0 ) |
| 86 #define VECTOR_UNDEF ( VECTOR_BASE + 4 ) |
| 87 #define VECTOR_SWI ( VECTOR_BASE + 8 ) |
| 88 #define VECTOR_PREFETCH_ABORT ( VECTOR_BASE + 12 ) |
| 89 #define VECTOR_DATA_ABORT ( VECTOR_BASE + 16 ) |
| 90 #define VECTOR_IRQ ( VECTOR_BASE + 24 ) |
| 91 #define VECTOR_FIQ ( VECTOR_BASE + 28 ) |
| 92 |
| 93 #define MODE_DISABLE_INTR 0xc0 |
| 94 #define MODE_USR 0x10 |
| 95 #define MODE_FIQ 0x11 |
| 96 #define MODE_IRQ 0x12 |
| 97 #define MODE_SVC 0x13 |
| 98 #define MODE_ABT 0x17 |
| 99 #define MODE_UND 0x1B |
| 100 #define MODE_SYS 0x1F |
| 101 |
| 102 #define AP15_CACHE_LINE_SIZE 32 |
| 103 |
| 104 #define AP15_APB_L2_CACHE_BASE 0x7000e800 |
| 105 #define AP15_APB_CLK_RST_BASE 0x60006000 |
| 106 #define AP15_APB_MISC_BASE 0x70000000 |
| 107 |
| 108 #define AP10_APB_CLK_RST_BASE 0x60006000 |
| 109 #define AP10_APB_MISC_BASE 0x70000000 |
| 110 |
| 111 #define MMU_TLB_BASE 0xf000f000 |
| 112 #define MMU_TLB_CACHE_WINDOW_0 0x40 |
| 113 #define MMU_TLB_CACHE_OPTIONS_0 0x44 |
| 114 |
| 115 #define AP15_PINMUX_CFG_CTL_0 0x70000024 |
| 116 #define AP15_AVP_JTAG_ENABLE 0xC0 |
| 117 |
| 118 #define PMC_SCRATCH22_REG_LP0 0x7000e4a8 |
| 119 |
| 120 #define AVP_WDT_RESET 0x2F00BAD0 |
| 121 |
| 122 /* Cached to uncached offset for AVP |
| 123 * |
| 124 * Hardware has uncached remap aperture for AVP as AVP doesn't have MMU |
| 125 * but still has cache (named COP cache). |
| 126 * |
| 127 * This aperture moved between AP15 and AP20. |
| 128 */ |
| 129 #define AP15_CACHED_TO_UNCACHED_OFFSET 0x90000000 |
| 130 #define AP20_CACHED_TO_UNCACHED_OFFSET 0x80000000 |
| 131 |
| 132 #define APXX_EXT_MEM_START 0x00000000 |
| 133 #define APXX_EXT_MEM_END 0x40000000 |
| 134 |
| 135 #define APXX_MMIO_START 0x40000000 |
| 136 #define APXX_MMIO_END 0xFFF00000 |
| 137 |
| 138 #define TXX_EXT_MEM_START 0x80000000 |
| 139 #define TXX_EXT_MEM_END 0xc0000000 |
| 140 |
| 141 #define TXX_MMIO_START 0x40000000 |
| 142 #define TXX_MMIO_END 0x80000000 |
| 143 |
| 144 #endif |
OLD | NEW |