OLD | NEW |
(Empty) | |
| 1 //------------------------------------------------------------------------------ |
| 2 // <copyright file="addrs.h" company="Atheros"> |
| 3 // Copyright (c) 2004-2009 Atheros Corporation. All rights reserved. |
| 4 // |
| 5 // This program is free software; you can redistribute it and/or modify |
| 6 // it under the terms of the GNU General Public License version 2 as |
| 7 // published by the Free Software Foundation; |
| 8 // |
| 9 // Software distributed under the License is distributed on an "AS |
| 10 // IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or |
| 11 // implied. See the License for the specific language governing |
| 12 // rights and limitations under the License. |
| 13 // |
| 14 // |
| 15 //------------------------------------------------------------------------------ |
| 16 //============================================================================== |
| 17 // Author(s): ="Atheros" |
| 18 //============================================================================== |
| 19 |
| 20 #ifndef __ADDRS_H__ |
| 21 #define __ADDRS_H__ |
| 22 |
| 23 /* |
| 24 * Special AR6002 Addresses that may be needed by special |
| 25 * applications (e.g. ART) on the Host as well as Target. |
| 26 */ |
| 27 |
| 28 #if defined(AR6002_REV2) |
| 29 #define AR6K_RAM_START 0x00500000 |
| 30 #define TARG_RAM_OFFSET(vaddr) ((A_UINT32)(vaddr) & 0xfffff) |
| 31 #define TARG_RAM_SZ (184*1024) |
| 32 #define TARG_ROM_SZ (80*1024) |
| 33 #endif |
| 34 #if defined(AR6002_REV4) || defined(AR6003) |
| 35 #define AR6K_RAM_START 0x00540000 |
| 36 #define TARG_RAM_OFFSET(vaddr) (((A_UINT32)(vaddr) & 0xfffff) - 0x40000) |
| 37 #define TARG_RAM_SZ (256*1024) |
| 38 #define TARG_ROM_SZ (256*1024) |
| 39 #endif |
| 40 |
| 41 #define AR6002_BOARD_DATA_SZ 768 |
| 42 #define AR6003_BOARD_DATA_SZ 1024 |
| 43 |
| 44 #define AR6K_RAM_ADDR(byte_offset) (AR6K_RAM_START+(byte_offset)) |
| 45 #define TARG_RAM_ADDRS(byte_offset) AR6K_RAM_ADDR(byte_offset) |
| 46 |
| 47 #define AR6K_ROM_START 0x004e0000 |
| 48 #define TARG_ROM_OFFSET(vaddr) (((A_UINT32)(vaddr) & 0x1fffff) - 0xe0000) |
| 49 #define AR6K_ROM_ADDR(byte_offset) (AR6K_ROM_START+(byte_offset)) |
| 50 #define TARG_ROM_ADDRS(byte_offset) AR6K_ROM_ADDR(byte_offset) |
| 51 |
| 52 /* |
| 53 * At this ROM address is a pointer to the start of the ROM DataSet Index. |
| 54 * If there are no ROM DataSets, there's a 0 at this address. |
| 55 */ |
| 56 #define ROM_DATASET_INDEX_ADDR (TARG_ROM_ADDRS(TARG_ROM_SZ)-8) |
| 57 #define ROM_MBIST_CKSUM_ADDR (TARG_ROM_ADDRS(TARG_ROM_SZ)-4) |
| 58 |
| 59 /* |
| 60 * The API A_BOARD_DATA_ADDR() is the proper way to get a read pointer to |
| 61 * board data. |
| 62 */ |
| 63 |
| 64 /* Size of Board Data, in bytes */ |
| 65 #if defined(AR6002_REV4) || defined(AR6003) |
| 66 #define BOARD_DATA_SZ AR6003_BOARD_DATA_SZ |
| 67 #else |
| 68 #define BOARD_DATA_SZ AR6002_BOARD_DATA_SZ |
| 69 #endif |
| 70 |
| 71 |
| 72 /* |
| 73 * Constants used by ASM code to access fields of host_interest_s, |
| 74 * which is at a fixed location in RAM. |
| 75 */ |
| 76 #if defined(AR6002_REV4) || defined(AR6003) |
| 77 #define HOST_INTEREST_FLASH_IS_PRESENT_ADDR (AR6K_RAM_START + 0x60c) |
| 78 #else |
| 79 #define HOST_INTEREST_FLASH_IS_PRESENT_ADDR (AR6K_RAM_START + 0x40c) |
| 80 #endif |
| 81 #define FLASH_IS_PRESENT_TARGADDR HOST_INTEREST_FLASH_IS_PRESENT_ADDR |
| 82 |
| 83 #endif /* __ADDRS_H__ */ |
| 84 |
| 85 |
| 86 |
OLD | NEW |