navienginebsp/naviengine_assp/naviengine.h
author Cheng-Shiun Tsai <cheng-shiun.tsai@accenture.com>
Fri, 08 Oct 2010 14:36:55 +0100
changeset 4 5937e08d5244
parent 0 5de814552237
permissions -rw-r--r--
Implement new version of DNE1_TBPowerResourceController::DoRegisterStaticResources, to fix Bug 3803
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
     1
/*
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
     8
*
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    11
*
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    12
* Contributors:
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    13
*
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    14
* Description:  
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    15
* naviengine_assp\naviengine.h
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    16
* Definitions for NE1_TBVariant ASSP
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    17
*
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    18
*/
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    19
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    20
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    21
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    22
#ifndef __A32NAVIENGINE_H__
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    23
#define __A32NAVIENGINE_H__
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    24
#include <e32const.h>
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    25
#include <e32hal.h>
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    26
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    27
//-------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    28
// Constant conventions:
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    29
//-------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    30
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    31
// KH       Hardware definition
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    32
// KHw      4-byte word definition prefix
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    33
// KHb      Byte definition prefix
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    34
// KHt      Bit definition prefix
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    35
// KHm      Mask definition prefix
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    36
// KHs      Shift definition prefix
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    37
// KHo      Offset definition prefix
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    38
// KHwRo    Read-only register
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    39
// KHwWo    Write-only register
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    40
// KHwRw    Read/write register
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    41
// KHwBase  Base address within memory map
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    42
// _i       Input suffix
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    43
// _o       Output suffix
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    44
// _b       Input/output suffix
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    45
//
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    46
// ALL ASSP specific hardware registers should be defined in this file, not
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    47
// in local files.  The register belongs to the ASSP, not the driver.
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    48
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    49
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    50
// Memory map: physical addresses
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    51
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    52
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    53
// These details are taken directly from the NaviEngine SoC TRM "S18599EJ1V0UM00.pdf"
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    54
// Table 4-1 Address Map
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    55
const TUint KHwBaseMPcorePrivatePhys = 0xc0000000; // Private MPcore region for SCU and Interrupt controller (8k address space)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    56
const TUint KHwDDR2RamBasePhys       = 0x80000000; // 256MB of DDR2 RAM sits here (in a 1GB address space)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    57
const TUint KHwPCIPhys               = 0x20000000; // PCI controller (128MB address space)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    58
const TUint KHwInternal              = 0x18000000; // Internal SoC peripherals reside in this area (16MB address space)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    59
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    60
// Table 4-2 AXI Address Map
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    61
const TUint KHwAXI64IC2Phys          = 0x80000000; // AXI64 bus base address
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    62
const TUint KHwSATAPhys              = 0x18016000; // SATA Controller
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    63
const TUint KHwAXI64DMACPhys         = 0x18015000; // DMA Controller for the AXI64 bus
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    64
const TUint KHwVideoPhys             = 0x18014000; // External Video Controller
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    65
const TUint KHwDispPhys              = 0x18010000; // LCD/VGA display controller
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    66
const TUint KHwSGXPhys               = 0x18000000; // SGX display controller
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    67
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    68
// Table 4-3 AHB Address Map
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    69
const TUint KHwCFWindow2Phys         = 0x18070000;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    70
const TUint KHwCFWindow1Phys         = 0x18060000;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    71
const TUint KHwCFWindow0Phys         = 0x18050000;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    72
const TUint KHwATA6_CS1Phys          = 0x18029000;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    73
const TUint KHwATA6_CS0Phys          = 0x18028000;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    74
const TUint KHwUSBHPhys              = 0x18024000; // Internal PCI controller memory window
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    75
const TUint KHwAHB32PCI_USBPhys      = 0x18023000; // PCI controller for the internal USB controller
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    76
const TUint KHwAHB32PCI_ExtPhys      = 0x18022000; // PCI controller for the external PCI bus
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    77
const TUint KHwDDR2RegPhys           = 0x18021000; // DDR2 memory control registers
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    78
const TUint KHwAHB0DMAC4Phys         = 0x18020000; // AHB bus DMA Controller 4
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    79
const TUint KHwAHB0DMAC3Phys         = 0x1801f000; // AHB bus DMA Controller 3
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    80
const TUint KHwAHB0DMAC2Phys         = 0x1801e000; // AHB bus DMA Controller 2
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    81
const TUint KHwAHB0DMAC1Phys         = 0x1801d000; // AHB bus DMA Controller 1
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    82
const TUint KHwAHB0DMAC0Phys         = 0x1801c000; // AHB bus DMA Controller 0
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    83
const TUint KHwAHBEXDMACPhys         = 0x1801b000; // AHB bus DMA Controller on external bus
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    84
const TUint KHwEXBUSPhys             = 0x18018000; // External Bus / NAND / CF
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    85
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    86
// Table 4-4 APB Address Map
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    87
const TUint KHwDTVIfPhys             = 0x1804C000; // Digital TV interface
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    88
const TUint KHwAPB1Phys              = 0x18030000; // AHB32APB bus base address
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    89
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    90
const TUint KHwPWM7Phys              = 0x1803AC00;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    91
const TUint KHwPWM6Phys              = 0x1803A800;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    92
const TUint KHwPWM5Phys              = 0x1803A400;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    93
const TUint KHwPWM4Phys              = 0x1803A000;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    94
const TUint KHwPWM3Phys              = 0x18039C00;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    95
const TUint KHwPWM2Phys              = 0x18039800;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    96
const TUint KHwPWM1Phys              = 0x18039400;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    97
const TUint KHwPWM0Phys              = 0x18039000;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    98
const TUint KHwGPIOPhys              = 0x18038000; // GPIO module
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
    99
const TUint KHwSYSCTRLPhys           = 0x18037C00; // System Control Unit
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   100
const TUint KHweWDTPhys              = 0x18037800; // External Watchdog Timer
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   101
const TUint KHwTimer5Phys            = 0x18037400; // Timers
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   102
const TUint KHwTimer4Phys            = 0x18037000;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   103
const TUint KHwTimer3Phys            = 0x18036C00;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   104
const TUint KHwTimer2Phys            = 0x18036800;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   105
const TUint KHwTimer1Phys            = 0x18036400;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   106
const TUint KHwTimer0Phys            = 0x18036000;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   107
const TUint KHwUART7Phys             = 0x18035C00; // UARTs
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   108
const TUint KHwUART6Phys             = 0x18035800;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   109
const TUint KHwUART5Phys             = 0x18035400;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   110
const TUint KHwUART4Phys             = 0x18035000;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   111
const TUint KHwUART3Phys             = 0x18034C00;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   112
const TUint KHwUART2Phys             = 0x18034800;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   113
const TUint KHwUART1Phys             = 0x18034400;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   114
const TUint KHwUART0Phys             = 0x18034000;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   115
const TUint KHwI2S3Phys              = 0x18033000; // I2S
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   116
const TUint KHwI2S2Phys              = 0x18032C00;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   117
const TUint KHwI2S1Phys              = 0x18032800;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   118
const TUint KHwI2S0Phys              = 0x18032400;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   119
const TUint KHwI2CPhys               = 0x18032000; // I2C
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   120
const TUint KHwCSI1Phys              = 0x18031800; // CSI
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   121
const TUint KHwCSI0Phys              = 0x18031400;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   122
const TUint KHwSPDIFPhys             = 0x18031000; // SPDIF
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   123
const TUint KHwSDPhys                = 0x18030000; // SD
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   124
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   125
// Taken from the NE1-TB Hardware Specification "NE1-TB_HW-Spec_R1p0_20071221.pdf"
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   126
// Section 5
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   127
const TUint KHwFPGAPhys              = 0x04010000; // FPGA registers
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   128
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   129
// Taken from an email Section 4 and email exchange with NEC
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   130
const TUint KHwLANPhys               = 0x04000000; // SMCS 9118 LAN Controller
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   131
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   132
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   133
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   134
// Memory map: linear addresses
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   135
// This has to be consistent with HwBanks mappings in bootrom (see, ne1_tb.s).
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   136
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   137
#ifdef __MEMMODEL_DIRECT__
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   138
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   139
const TUint KHwBaseUart0            = KHwUART0Phys;              // serial port #0
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   140
const TUint KHwBaseMPCorePrivate    = KHwBaseMPcorePrivatePhys;  // 4KB of private MPcore region for SCU and Interrupt controller
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   141
const TUint KHwTimersBase           = KHwTimer0Phys;             // six SoC timers
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   142
const TUint KHwDisplayBase          = KHwDispPhys;               // SoC display controller
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   143
const TUint KHwBaseI2C              = KHwI2CPhys;                // I2C
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   144
const TUint KHwFPGABase             = KHwFPGAPhys;               // FPGA registers
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   145
const TUint KHwSPDIFBase            = KHwSPDIFPhys;              // SPDIF
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   146
const TUint KHwBaseSDCtrl           = KHwSDPhys;                 // SD
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   147
const TUint KDMACExBusBase          = KHwAHBEXDMACPhys;          // DMAC(4C) 4KB
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   148
const TUint KDMAC32Base             = KHwAHB0DMAC0Phys;          // DMAC(8C) 20KB
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   149
const TUint KHwDMAC64Base           = KHwAXI64DMACPhys;          // DMAC(4C) 4KB on AXI bus - 64bit
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   150
const TUint KHwBaseEthernet         = KHwLANPhys;                // Ethernet
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   151
const TUint KHwGPIOBase             = KHwGPIOPhys;               // GPIO
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   152
const TUint KHwPciBase              = KHwAHB32PCI_ExtPhys;       // PCI Bridges
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   153
const TUint KHwUsbHWindow           = KHwUSBHPhys;               // Internal PCI window
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   154
//const TUint KHw xxx Base          = KHw xxx Phys;              // xxx
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   155
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   156
#else
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   157
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   158
const TLinAddr KHWIOBase            = 0xC6000000u;               // Base address of virtual address range used for HW mappings
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   159
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   160
const TUint KHwBaseUart0            = KHWIOBase;                 //Bank # 0, ofset      0,  size 4K         // serial port #0                                                ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   161
const TUint KHwBaseMPCorePrivate    = KHWIOBase + 0x01000;       //Bank # 1, offset  1000h, size 2*4K       // 4KB of private MPcore region for SCU and Interrupt controller ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   162
const TUint KHwTimersBase           = KHWIOBase + 0x03000;       //Bank # 2, offset  3000h, size 2*K        // six SoC timers                                                ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   163
const TUint KHwDisplayBase          = KHWIOBase + 0x05000;       //Bank # 3, offset  4000h, size 4*K        // SoC display controller                                        ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   164
const TUint KHwBaseI2C              = KHWIOBase + 0x09000;       //Bank # 4, offset  9000h, size 2*4K       // I2C                                                           ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   165
const TUint KHwFPGABase             = KHWIOBase + 0x0B000;       //Bank # 5, offset  B000h, size 4K         // FPGA registers                                                ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   166
const TUint KHwSPDIFBase            = KHWIOBase + 0x0C000;       //Bank # 6, offset  C000h, size 4K         // SPDIF                                                         ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   167
const TUint KHwBaseSDCtrl           = KHWIOBase + 0x0D000;       //Bank # 7, offset  D000h, size 4K         // SD                                                            ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   168
const TUint KDMACExBusBase          = KHWIOBase + 0x0E000;       //Bank # 8, offset  D000h, size 6*4K = 24K // DMAC(4C) 4KB                                                  ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   169
const TUint KDMAC32Base             = KHWIOBase + 0x0F000;       //Bank # 9, offset  D000h, size 6*4K = 24K // DMAC(8C) 20KB                                                 ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   170
const TUint KHwBaseEthernet         = KHWIOBase + 0x14000;       //Bank #10, offset 14000h, size 4K         // Ethernet                                                      ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   171
const TUint KHwGPIOBase             = KHWIOBase + 0x15000;       //Bank #11, offset 15000h, size 4K         // GPIO                                                          ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   172
const TUint KHwPciBase              = KHWIOBase + 0x16000;       //Bank #12, offset 16000h, size 2*4K       // PCI Bridges                                                   ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   173
const TUint KHwUsbHWindow           = KHWIOBase + 0x18000;       //Bank #13, offset 18000h, size 2*4K       // Internal PCI window                                           ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   174
const TUint KHwDMAC64Base           = KHWIOBase + 0x1A000;       //Bank #14, offset 1A000h, size 4k         // DMAC(4C) 4KB on AXI bus - 64bit                               ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   175
//const TUint KHw xxx Base            = KHWIOBase + 0x1B000;     //Bank #15, offset 1B000h, size xK         // xxx                                                           ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   176
#endif
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   177
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   178
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   179
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   180
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   181
const TUint KHwBaseUart1            = KHwBaseUart0         + 0x400;  // serial port #1               ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   182
const TUint KHwBaseUart2            = KHwBaseUart0         + 0x800;  // serial port #2               ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   183
const TUint KHwBaseSCU              = KHwBaseMPCorePrivate;          // Snoop Control Unit           ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   184
const TUint KHwBaseIntIf            = KHwBaseMPCorePrivate + 0x100;  // CPU interrupt interface      ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   185
const TUint KHwBaseGlobalIntDist    = KHwBaseMPCorePrivate + 0x1000; // Global Interrupt Distributer ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   186
const TUint KHwWatchdog             = KHwTimersBase        + 0x1800; // eWDT (Watchdog Timer)        ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   187
const TUint KHwSystemCtrlBase       = KHwTimersBase        + 0x1c00; // system control unit          ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   188
const TUint KHwBaseI2S0             = KHwBaseI2C           + 0x400;  // I2S0                         ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   189
const TUint KHwBaseI2S1             = KHwBaseI2S0          + 0x400;  // I2S1                         ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   190
const TUint KHwBaseI2S2             = KHwBaseI2S0          + 0x800;  // I2S2                         ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   191
const TUint KHwBaseI2S3             = KHwBaseI2S0          + 0xC00;  // I2S3                         ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   192
const TUint KHwBaseCSI0             = KHwSPDIFBase         + 0x400;  // CSI0                         ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   193
const TUint KHwBaseCSI1             = KHwBaseCSI0          + 0x400;  // CSI1                         ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   194
const TUint KHwLCDDispBase          = KHwFPGABase          + 0x0400; // LCD display                  ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   195
const TUint KHwTSPBase              = KHwFPGABase          + 0x0600; // Digitiser                    ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   196
const TUint KHwPciBridgeExtern      = KHwPciBase;                    // External PCI Bridge          ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   197
const TUint KHwPciBridgeUsb         = KHwPciBase           + 0x1000; // UsbHost dedicated PCI Bridge ///< Internal, clients get value from HCR
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   198
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   199
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   200
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   201
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   202
// CPU interrupt interface registers' addresses.
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   203
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   204
const TUint KHwCIIControl     = KHwBaseIntIf + 0x00; // Control
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   205
const TUint KHwCIIPrioMask    = KHwBaseIntIf + 0x04; // Priority mask
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   206
const TUint KHwCIIBinPoint    = KHwBaseIntIf + 0x08; // Binary point
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   207
const TUint KHwCIIIntAck      = KHwBaseIntIf + 0x0C; // Interrupt acknowledge RO
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   208
const TUint KHwCIIEndOfInt    = KHwBaseIntIf + 0x10; // End of interrupt WO
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   209
const TUint KHwCIIPrioRun     = KHwBaseIntIf + 0x14; // Running Interrupt RO
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   210
const TUint KHwCIIHighPend    = KHwBaseIntIf + 0x18; // Highest pending interrupt RO
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   211
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   212
const TUint KHoCIIIntAck      = 0x0C;                // Interrupt acknowledge RO
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   213
const TUint KHoCIIEndOfInt    = 0x10;                // End of interrupt WO
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   214
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   215
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   216
// Global Interrupt Distributor registers' addresses
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   217
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   218
const TUint KHoGidControl         = KHwBaseGlobalIntDist + 0x000; // Control Register. Holds enable bit.
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   219
const TUint KHoGidType            = KHwBaseGlobalIntDist + 0x004; // Controller type. Read only register
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   220
const TUint KHoGidIntEnableBase   = KHwBaseGlobalIntDist + 0x100; // Writing into these registers will enable appropriate interrupt(s), 1 bit per interrupt
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   221
const TUint KHoGidIntDisableBase  = KHwBaseGlobalIntDist + 0x180; // Writing into these registers will disable appropriate interrupt(s), 1 bit per interrupt
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   222
const TUint KHoGidPendSetBase     = KHwBaseGlobalIntDist + 0x200; // Writing into these registers will return appropriate interrupt(s) from Pending to Inactive state. Active state is not modified, 1 bit per interrupt
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   223
const TUint KHoGidPendClearBase   = KHwBaseGlobalIntDist + 0x280; // Writing into these registers will put appropriate interrupt(s) into  Pending state, 1 bit per interrupt
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   224
const TUint KHoGidActiveBase      = KHwBaseGlobalIntDist + 0x300; // Indicates if corresponding interrupt is active. Ints 0-31 (the first reg.) are aliased for each CPU, 1 bit per interrupt
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   225
const TUint KHoGidPriorityBase    = KHwBaseGlobalIntDist + 0x400; // Priority of the interrupts, 8 bits per int, only 4 used
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   226
const TUint KHoGidTargetBase      = KHwBaseGlobalIntDist + 0x800; // Interrupt CPU targets, 8 bits per int, only 4 used
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   227
const TUint KHoGidConfigBase      = KHwBaseGlobalIntDist + 0xC00; // Interrupt configuration register: edge or leveled; 1-N or N-N software model,  2 bits per interrupt
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   228
const TUint KHoGidSoftwareTrigger = KHwBaseGlobalIntDist + 0xF00; // Software interrupt Trigger Register. A single register for all ints.
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   229
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   230
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   231
// SystemControlUnit registers' addresses
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   232
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   233
const TUint KHoSCUClockMaskCtrl                     = 0x80; // Mask control
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   234
const TUint KHoSCUDisplayDCLKCtrl                   = 0x8c; // Display DCLK control
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   235
const TUint KHw60HzDisplay                          = 11;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   236
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   237
// Divide I2S CLK Control Register
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   238
const TUint KHoSCUDivideI2SCLKCtrl = 0x94;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   239
const TUint KHtSCUDivI2SCLKCtrl_I2S0MCLK_SEL        = (1<<4); // Selects the I2S0 MCLK source: 1-SPDIF, 0-external input.
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   240
const TUint KHsSCUDivI2SCLKCtrl_I2S0MCLK_FREQ       = 0;      // shift for the MCK clock frequency for I2S0 unit
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   241
const TUint KHsSCUDivI2SCLKCtrl_I2S1MCLK_FREQ       = 8;      // shift for the MCK clock frequency for I2S1 unit
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   242
const TUint KHsSCUDivI2SCLKCtrl_I2S2MCLK_FREQ       = 16;     // shift for the MCK clock frequency for I2S2 unit
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   243
const TUint KHsSCUDivI2SCLKCtrl_I2S3MCLK_FREQ       = 24;     // shift for the MCK clock frequency for I2S3 unit
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   244
// values for MCK clock frequency
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   245
const TUint KHSCUDivI2SCLKCtrl_I2SMCLK_FREQ36_864M  = 0;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   246
const TUint KHSCUDivI2SCLKCtrl_I2SMCLK_FREQ24_576M  = 1;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   247
const TUint KHSCUDivI2SCLKCtrl_I2SMCLK_FREQ18_432M  = 2;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   248
const TUint KHSCUDivI2SCLKCtrl_I2SMCLK_FREQ33_8688M = 4;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   249
const TUint KHSCUDivI2SCLKCtrl_I2SMCLK_FREQ22_5792M = 5;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   250
const TUint KHSCUDivI2SCLKCtrl_I2SMCLK_FREQ16_9344M = 6;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   251
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   252
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   253
// I2S Register Addresses
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   254
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   255
const TUint KHoI2SCtrl              = 0x00;    // I2S Control register offset
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   256
const TUint KHtI2SCtrl_MSMODE       = (1<<28); // master/slave mode (1-master, 0-slave)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   257
const TUint KHtI2SCtrl_TEN          = (1<<25); // transmission enable (1-enable, 0-disable)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   258
const TUint KHtI2SCtrl_REN          = (1<<24); // reception (1-enable, 0-disable)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   259
const TUint KHsI2SCtrl_FCKLKSEL     = 16;      // [3:0] clock select mask (Sampling fq)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   260
const TUint KHsI2SCtrl_FSMODE       = 12;      // [1:0] number of SCLK cycles in one frame (1WS cycle)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   261
const TUint KHsI2SCtrl_FORMAT       = 8;       // [2:0] transfer format (I2S = 100b)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   262
const TUint KHtI2SCtrl_INVALID      = (1<<6);  // Invalid data format(1 - outputs "1" as invalid data)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   263
const TUint KHsI2SCtrl_DLENGTH      = 0;       // [4:0] sampling data length
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   264
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   265
const TUint KHoI2SFifoCtrl          = 0x04;    // I2S Fifo Control register offset
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   266
const TUint KHtI2SFifoCtrl_TDMAEN   = (1<<23); // Enables DMA req on transmit side
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   267
const TUint KHtI2SFifoCtrl_TFIFOCLR = (1<<22); // transmit FIFO initialisation
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   268
const TUint KHsI2SFifoCtrl_TFIFOLT  = 19;      // [2:0] L-ch transmit FIFO trigger level (0-3: 2-16 word space avl)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   269
const TUint KHsI2SFifoCtrl_TFIFORT  = 16;      // [2:0] R-ch transmit FIFO trigger level (0-3: 2-16 word space avl)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   270
const TUint KHtI2SFifoCtrl_RDMAEN   = (1<<7);  // Enables DMA req on receive side
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   271
const TUint KHtI2SFifoCtrl_RFIFOCLR = (1<<6);  // receive FIFO initialisation
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   272
const TUint KHsI2SFifoCtrl_RFIFOLT  = 3;       // [2:0] L-ch receive FIFO-full trigger level (0-3: 2-16 word space avl)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   273
const TUint KHsI2SFifoCtrl_RFIFORT  = 0;       // [2:0] R-ch receive FIFO-full trigger level (0-3: 2-16 word space avl)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   274
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   275
const TUint KHoI2SFifoSts           = 0x08;    // I2S Fifo status register offset
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   276
const TUint KHtI2SFifoSts_TFL_FULL	= (1<<17); // L-ch transmit FIFO full (32 words)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   277
const TUint KHtI2SFifoSts_TFR_FULL	= (1<<16); // R-ch transmit FIFO full (32 words)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   278
const TUint KHtI2SFifoSts_RFL_EMPTY = (1<<1);  // L-ch receive FIFO empty
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   279
const TUint KHtI2SFifoSts_RFR_EMPTY = (1<<0);  // R-ch receive FIFO empty
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   280
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   281
const TUint KHoI2SIntFlg            = 0x0C;    // I2S interrupt flag register offset
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   282
const TUint KHtI2SIntFlg_TFLURINT	= (1<<19); // L-ch transmit FIFO underrun
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   283
const TUint KHtI2SIntFlg_TFLEINT    = (1<<18); // L-ch transmit FIFO reached the empty trigger level
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   284
const TUint KHtI2SIntFlg_TFRURINT   = (1<<17); // R-ch transmit FIFO underrun
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   285
const TUint KHtI2SIntFlg_TFREINT    = (1<<16); // R-ch transmit FIFO reached the empty trigger level
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   286
const TUint KHtI2SIntFlg_RFLORINT   = (1<<3);  // L-ch receive FIFO overrun
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   287
const TUint KHtI2SIntFlg_RFLFINT    = (1<<2);  // L-ch receive FIFO reached the full trigger level
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   288
const TUint KHtI2SIntFlg_RFRORINT   = (1<<1);  // R-ch receive FIFO overrun
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   289
const TUint KHtI2SIntFlg_RFRFINT    = (1<<0);  // R-ch receive FIFO reached the full trigger level
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   290
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   291
const TUint KHoI2SIntMask           = 0x10;    // I2S interrupt mask register offset
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   292
const TUint KHtI2SIntMask_TFLURINT  = (1<<19); // L-ch transmit FIFO underrun int enable
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   293
const TUint KHtI2SIntMask_TFLEINT   = (1<<18); // L-ch transmit FIFO reached the empty trigger level int enable
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   294
const TUint KHtI2SIntMask_TFRURINT  = (1<<17); // R-ch transmit FIFO underrun int enable
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   295
const TUint KHtI2SIntMask_TFREINT   = (1<<16); // R-ch transmit FIFO reached the empty trigger level int enable
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   296
const TUint KHtI2SIntMask_RFLORINT  = (1<<3);  // L-ch receive FIFO overrun int enable
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   297
const TUint KHtI2SIntMask_RFLFINT   = (1<<2);  // L-ch receive FIFO reached the full trigger level int enable
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   298
const TUint KHtI2SIntMask_RFRORINT  = (1<<1);  // R-ch receive FIFO overrun int enable
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   299
const TUint KHtI2SIntMask_RFRFINT   = (1<<0);  // R-ch receive FIFO reached the full trigger level int enable
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   300
const TUint KHmI2SIntMask_ALL       = 0xF000F; // All interrupts mask
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   301
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   302
const TUint KHoI2SRx                = 0x20;    // I2S receive data FIFO register offset
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   303
const TUint KHoI2STx                = 0x30;    // I2S transmit data FIFO register offset
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   304
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   305
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   306
//FPGA Register Addresses
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   307
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   308
const TUint KHoLCDControl      = 0x400;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   309
const TUint KHoSystemPowerDown = 0xF10;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   310
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   311
const TUint KHwIDMODE          = KHwFPGABase+0x0810;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   312
const TUint KHmUserSwitches    = 0x3C00;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   313
const TUint KHsUserSwitches    = 10;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   314
const TUint KHmLcdSwitches     = 0x3000;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   315
const TUint KHsLcdSwitches     = 12;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   316
const TUint KHmKeyConfigSwitch = 0x800;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   317
const TUint KHsKeyConfigSwitch = 11;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   318
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   319
// There are 4 red LEDs that can be controlled by the FPGA
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   320
// Each LED has a bit in the register, where 0==off and 1==on
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   321
const TUint KHoFpgaLeds        = 0x0A06;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   322
const TUint KHwFpgaLeds        = KHwFPGABase+KHoFpgaLeds;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   323
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   324
const TUint KHmFpgaLeds        = 0xF;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   325
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   326
const TUint KHsFpgaLed0        = 0x0;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   327
const TUint KHsFpgaLed1        = 0x1;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   328
const TUint KHsFpgaLed2        = 0x2;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   329
const TUint KHsFpgaLed3        = 0x3;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   330
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   331
const TUint KHtFpgaLed0        = 1 << KHsFpgaLed0;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   332
const TUint KHtFpgaLed1        = 1 << KHsFpgaLed1;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   333
const TUint KHtFpgaLed2        = 1 << KHsFpgaLed2;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   334
const TUint KHtFpgaLed3        = 1 << KHsFpgaLed3;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   335
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   336
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   337
//CSI Register Addresses
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   338
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   339
const TUint KHoCSIModeControl       = 0x00;  // CSI Mode Control Register
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   340
const TUint KHsCSIModeTWait         = 16;    // CSI waiting time for transaction shift
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   341
const TUint KHtCSIModeEnable        = 1<<7;  // CSI enable
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   342
const TUint KHtCSIModeTrEnable      = 1<<6;  // CSI transmission and reception mode select
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   343
const TUint KHtCSIModeDataLen       = 1<<5;  // CSI Data length select: 0-8bits, 1-16bits
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   344
const TUint KHtCSIModeTransferDir   = 1<<4;  // CSI Transfer direction mode: 0-MSB first, 1-LSB first
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   345
const TUint KHtCSIModeTransferState = 1<<0;  // CSI Transfer state indication flag: 0-idle first, 1-transmission
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   346
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   347
const TUint KHoCSIClockSelect       = 0x04;  // CSI Clock Select Register
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   348
const TUint KHtCSIClockSelectSSE    = 1<<9;  // SS pin enable
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   349
const TUint KHtCSIClockSelectSSPol  = 1<<8;  // SS pin polarity select (0: SS pin low active,  1: SS pin high active)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   350
const TUint KHtCSIClockSelectCKP    = 1<<4;  // Clock polarity select
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   351
const TUint KHtCSIClockSelectDAP    = 1<<3;  // Clock phase select
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   352
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   353
const TUint KHsCSIClockSelect       = 0;     // Communication clock select shift CKS[2:0]
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   354
const TUint KHCSIClockValPCLKdiv4   = 0;     //  1/4 PCLK (master mode)   16.67 MHz
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   355
const TUint KHCSIClockValPCLKdiv16  = 1;     //  1/16 PCLK (master mode)	4.17 MHz
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   356
const TUint KHCSIClockValPCLKdiv32  = 2;     //  1/32 PCLK (master mode)	2.08 MHz
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   357
const TUint KHCSIClockValPCLKdiv64  = 3;     //  1/64 PCLK (master mode)	1.04 MHz
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   358
const TUint KHCSIClockValPCLKdiv128 = 4;     //  1/128 PCLK (master mode)	 521 kHz
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   359
const TUint KHCSIClockValPCLKdiv256 = 5;     //  1/256 PCLK (master mode)	 260 kHz
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   360
const TUint KHCSIClockValPCLKdiv512 = 6;     //  1/512 PCLK (master mode)	 130 kHz
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   361
const TUint KHCSIClockValSlave      = 7;     //  SCKI (slave mode)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   362
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   363
const TUint KHoCSIControl           = 0x08;  // CSI Control Register
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   364
const TUint KHtCSIControlCSIRst     = 1<<28; // CSI unit reset
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   365
const TUint KHtCSIControlTxTrgEn    = 1<<27; // Permission of CSI_FIFOTRG.bit10-8(T_TRG[2:0]) operation
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   366
const TUint KHtCSIControlTxFifoFull = 1<<26; // State of Tx FIFO buffer
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   367
const TUint KHtCSIControlTxDMAE     = 1<<24; // Tx DMA mode
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   368
const TUint KHtCSIControlSSMon      = 1<<21; // SS signal monitor
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   369
const TUint KHtCSIControlRxTrgEn    = 1<<19; // Permission of CSI_FIFOTRG.bit2-0(R_TRG[2:0]) operation
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   370
const TUint KHtCSIControlRxFifoFull = 1<<18; // State of Rx FIFO buffer
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   371
const TUint KHtCSIControlRxDMAE     = 1<<16; // Rx DMA mode
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   372
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   373
const TUint KHtCSIControlSSDnIE     = 1<<15; // SS signal negative-edge interrupt (CSI_INT.bit15(SS_DN)) enable
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   374
const TUint KHtCSIControlSSUpIE     = 1<<14; // SS signal positive-edge interrupt (CSI_INT.bit14(SS_UP)) enable
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   375
const TUint KHtCSIControlTxUndIE    = 1<<13; // Tx FIFO buffer under-run error interrupt (CSI_INT.bit13(UNDER)) enable
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   376
const TUint KHtCSIControlRxOvfIE    = 1<<12; // Rx FIFO buffer overflow error interrupt (CSI_INT.bit12(OVERF)) enable
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   377
const TUint KHtCSIControlTEndIE     = 1<<8;  // Transmission end interrupt (CSI_INT.bit8(CSIEND)) enable
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   378
const TUint KHtCSIControlTxTrgIE    = 1<<4;  // Tx trigger level interrupt (CSI_INT.bit4(T_TRGR)) enable
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   379
const TUint KHtCSIControlRxTrgIE    = 1<<0;  // Rx trigger level interrupt (CSI_INT.bit0(R_TRGR bit) enable
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   380
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   381
const TUint KHoCSIIntStatus   = 0x0C;  // CSI Interrupt Status Register
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   382
const TUint KHtCSIIntStatusSSDn    = 1<<15;  // SS signal negative-edge interrupt
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   383
const TUint KHtCSIIntStatusSSUp    = 1<<14;  // SS signal positive-edge interrupt
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   384
const TUint KHtCSIIntStatusTxUnd   = 1<<13;  // Tx FIFO buffer under-run error interrupt
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   385
const TUint KHtCSIIntStatusRxOvf   = 1<<12;  // Rx FIFO buffer overflow error interrupt
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   386
const TUint KHtCSIIntStatusTEnd    = 1<<8;   // Transmission end interrupt
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   387
const TUint KHtCSIIntStatusTxTrgIE = 1<<4;   // Tx trigger level interrupt
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   388
const TUint KHtCSIIntStatusRxTrgIE = 1<<0;   // Rx trigger level interrupt
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   389
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   390
const TUint KHoCSIIFifoL           = 0x10;   // CSI Receive FIFO level indicate Register
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   391
const TUint KHoCSIOFifoL           = 0x14;   // CSI Transmit FIFO level indicate Register
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   392
const TUint KHoCSIIFifo            = 0x18;   // CSI Receive FIFO Window Register
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   393
const TUint KHoCSIOFifo            = 0x1C;   // CSI Transmit FIFO Window Register
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   394
const TUint KHwCSIFifoLMax         = 32;     // maximum amount of data in the CSI FIFO
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   395
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   396
const TUint KHoCSIFifoTrgLvl       = 0x20;   // CSI FIFO Trigger Level Register
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   397
const TUint KHsCSITxFifoTrgLvl     = 8;      // transmit FIFO trigger level shift [10:8]
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   398
const TUint KHsCSIRxFifoTrgLvl     = 0;      // receive FIFO trigger level shift [2:0]
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   399
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   400
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   401
// GPIO Register Addresses
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   402
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   403
const TUint KHwRwGpio_Port_Control_Enable   = KHwGPIOBase + 0x00;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   404
const TUint KHwWoGpio_Port_Control_Disable  = KHwGPIOBase + 0x04;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   405
const TUint KHwWoGpio_Port_Set_Clear_Hi     = KHwGPIOBase + 0x08;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   406
const TUint KHwWoGpio_Port_Set_Clear_Lo     = KHwGPIOBase + 0x0c;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   407
const TUint KHwRoGpio_Port_Value            = KHwGPIOBase + 0x10;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   408
const TUint KHwRwGpio_Int                   = KHwGPIOBase + 0x14;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   409
const TUint KHwRwGpio_Int_Enable            = KHwGPIOBase + 0x18;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   410
const TUint KHwWoGpio_Int_Disable           = KHwGPIOBase + 0x1c;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   411
const TUint KHwRwGpio_Int_Hold              = KHwGPIOBase + 0x20;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   412
const TUint KHwRwGpio_Int_Mode0             = KHwGPIOBase + 0x24;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   413
const TUint KHwRwGpio_Int_Mode1             = KHwGPIOBase + 0x28;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   414
const TUint KHwRwGpio_Int_Mode2             = KHwGPIOBase + 0x2c;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   415
const TUint KHwRwGpio_Int_Mode3             = KHwGPIOBase + 0x30;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   416
const TUint KHwRwGpi_Polarity_Invert        = KHwGPIOBase + 0x38;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   417
const TUint KHwWoGpi_Polarity_Reset         = KHwGPIOBase + 0x3c;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   418
const TUint KHwRwGpo_Polarity_Invert        = KHwGPIOBase + 0x40;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   419
const TUint KHwWoGpo_Polarity_Reset         = KHwGPIOBase + 0x44;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   420
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   421
const TUint KGpio_Ethernet_Int_Pin          = 20;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   422
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   423
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   424
// eWDT Register Addresses
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   425
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   426
const TUint KHwWatchdog_WDTCNT (KHwWatchdog +  0); // Control register
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   427
const TUint KHwWatchdog_WDTSET (KHwWatchdog +  4); // Period setting register
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   428
const TUint KHwWatchdog_WDTTIM (KHwWatchdog +  8); // Lapsed time register
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   429
const TUint KHwWatchdog_WDTINT (KHwWatchdog + 12); // Interrupt register
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   430
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   431
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   432
// Baud Rate Divisor values
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   433
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   434
const TUint KBaudRateDiv_50      = 0;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   435
const TUint KBaudRateDiv_75      = 0;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   436
const TUint KBaudRateDiv_110     = 0;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   437
const TUint KBaudRateDiv_134     = 0;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   438
const TUint KBaudRateDiv_150     = 55417;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   439
const TUint KBaudRateDiv_300     = 27708;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   440
const TUint KBaudRateDiv_600     = 13854;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   441
const TUint KBaudRateDiv_1200    = 6927;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   442
const TUint KBaudRateDiv_1800    = 4618;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   443
const TUint KBaudRateDiv_2000    = 4156;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   444
const TUint KBaudRateDiv_2400    = 3464;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   445
const TUint KBaudRateDiv_3600    = 2309;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   446
const TUint KBaudRateDiv_4800    = 1732;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   447
const TUint KBaudRateDiv_7200    = 1155;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   448
const TUint KBaudRateDiv_9600    = 866;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   449
const TUint KBaudRateDiv_19200   = 433;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   450
const TUint KBaudRateDiv_38400   = 216;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   451
const TUint KBaudRateDiv_57600   = 144;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   452
const TUint KBaudRateDiv_115200  = 72;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   453
const TUint KBaudRateDiv_230400  = 36;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   454
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   455
const TUint KBaudRateDiv_default = 72; // Set to KBaudRateDiv_115200 but h2inc.pl doesn't support token replacement.
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   456
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   457
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   458
// Memory Layout addresses for BootLoader / bootstrap interaction
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   459
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   460
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   461
const TUint KRamTargetAddr                = 0x88000000;      // Phys. addr. of the image to be started by bootloader.
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   462
const TUint KCoreLoaderAddress            = 0x8D000000;      // base of ram + 208MB
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   463
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   464
const TUint xKMega                        = (1024*1024);     // we can't use KMega because h2inc won't resolve tokens from other includes
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   465
const TLinAddr KNORFlashTargetAddr        = 0x00000000;      // Onboard NOR flash starts at phys addr 0x0
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   466
const TLinAddr KNORFlashTargetSize        = ( 64 * xKMega);  // and is 64MB is size
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   467
const TLinAddr KRamTargetSize             = (128 * xKMega);  // Reserved RAM starts at phys addr 0x88000000 and is 128MB is size
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   468
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   469
// The layout of the onboard NOR is
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   470
// [bootloader][configblock][flashedimage][reserved]
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   471
const TLinAddr KNORFlashMaxBootloaderSize = (5 * xKMega);
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   472
const TLinAddr KNORFlashMaxImageSize      = KNORFlashTargetSize - KNORFlashMaxBootloaderSize;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   473
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   474
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   475
// Restart Reason Codes
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   476
//----------------------------------------------------------------------------
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   477
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   478
// Restart types (bits 31-29)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   479
const TUint KmRestartReasonsActions            = 0xE0000000; // Bits 31 to 29
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   480
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   481
// These three bits are indications for the bootloader to perform some activity
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   482
const TUint KtRestartReasonHardRestart         = 0x80000000; // Bit31 back to bootloader
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   483
const TUint KtRestartReasonSoftRestart         = 0x40000000; // Bit30 back to same image (will need image location too)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   484
const TUint KtRestartReasonBootRestart         = 0x20000000; // Bit29 back into new image (will need image location too)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   485
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   486
// This bit is an indicator for ane image to detect it is being warm booted
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   487
const TUint KtRestartReasonWarmBoot            = 0x10000000; // Bit28 this boot is "warm"
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   488
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   489
// Image locations (bits 27-20)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   490
const TUint KmRestartImageLocations            = 0x0FF00000; // Bits 27 to 20
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   491
const TUint KtRestartReasonRAMImage            = 0x08000000; // Bit27
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   492
const TUint KtRestartReasonNORImage            = 0x04000000; // Bit26
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   493
const TUint KtRestartReasonNANDImage           = 0x02000000; // Bit25
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   494
const TUint KtRestartReasonONENANDImage        = 0x01000000; // Bit24
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   495
const TUint KtRestartReasonSIBLEYImage         = 0x00800000; // Bit23
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   496
const TUint KtRestartReasonOTAUpgrade          = 0x00400000; // Bit22
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   497
const TUint KtRestartReasonCoreLdr             = 0x00200000; // Bit21  This platform specific reason introduced to start SMP enabled CoreLdr
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   498
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   499
// Restart startup Mode (bits 19-16)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   500
const TUint KmRestartStartupModes              = 0x000F0000; // Bits 19 to 16
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   501
const TUint KsRestartStartupModes              = 16;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   502
const TUint KRestartStartupModesSize           = 4;          // size in bits
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   503
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   504
// Custom restart reasons (bits 15-8)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   505
const TUint KmRestartCustomRestartReasons      = 0x0000FF00; // Bits 15 to 8
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   506
const TUint KsRestartCustomRestartReasons      = 8;
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   507
const TUint KRestartCustomRestartReasonsSize   = 8;          // size in bits
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   508
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   509
// Define USB loader restart (after USB link dropped)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   510
const TUint KtRestartCustomRestartUSBLoader    = 0x00008000; // Bit 15
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   511
const TUint KtRestartCustomRestartMemCheck     = 0x00004000; // Bit 14
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   512
const TUint KtRestartCustomRestartMemCheckPass = 0x00002000; // Bit 13
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   513
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   514
// Mask of all the bits used during the memory test (but not the start)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   515
const TUint KmRestartCustomRestartMemCheckBits = 0x00003F00; // Bits 13 to 8
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   516
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   517
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   518
// Gap (bits 7-0)
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   519
5de814552237 Initial contribution supporting NaviEngine 1
Ryan Harkin <ryan.harkin@nokia.com>
parents:
diff changeset
   520
#endif