1 /* 2 * Copyright (c) 2020-2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef __ASM_PLATFORM_H__ 17 #define __ASM_PLATFORM_H__ 18 19 #include "asm/hal_platform_ints.h" 20 #include "soc/timer.h" 21 #include "soc/uart.h" 22 23 #ifdef __cplusplus 24 #if __cplusplus 25 extern "C" { 26 #endif /* __cplusplus */ 27 #endif /* __cplusplus */ 28 29 /*------------------------------------------------ 30 * GIC reg base address 31 *------------------------------------------------*/ 32 #define GIC_BASE_ADDR IO_DEVICE_ADDR(0x08000000) 33 #define GICD_OFFSET 0x00000 /* interrupt distributor offset */ 34 #define GICC_OFFSET 0x10000 /* CPU interface register offset */ 35 36 #define CRG_REG_BASE IO_DEVICE_ADDR(0x12010000) 37 38 #define UART0_REG_BASE IO_DEVICE_ADDR(0x09000000) 39 40 #if (CONSOLE_UART == UART0) 41 #define UART_BASE UART0_REG_BASE 42 #define UART0_INT_NUM NUM_HAL_INTERRUPT_UART0 43 #endif 44 45 #define DDR_MEM_BASE 0x40000000 46 47 #ifdef __cplusplus 48 #if __cplusplus 49 } 50 #endif /* __cplusplus */ 51 #endif /* __cplusplus */ 52 53 #endif 54 55