Home | History | Annotate | Line # | Download | only in ep93xx
ep93xxreg.h revision 1.2.6.1
      1  1.2.6.1  yamt /*	$NetBSD: ep93xxreg.h,v 1.2.6.1 2005/02/12 18:17:30 yamt Exp $ */
      2      1.1  joff 
      3      1.1  joff /*
      4      1.1  joff  * Copyright (c) 2004 Jesse Off
      5      1.1  joff  * All rights reserved.
      6      1.1  joff  *
      7      1.1  joff  * Redistribution and use in source and binary forms, with or without
      8      1.1  joff  * modification, are permitted provided that the following conditions
      9      1.1  joff  * are met:
     10      1.1  joff  * 1. Redistributions of source code must retain the above copyright
     11      1.1  joff  *    notice, this list of conditions and the following disclaimer.
     12      1.1  joff  * 2. Redistributions in binary form must reproduce the above copyright
     13      1.1  joff  *    notice, this list of conditions and the following disclaimer in the
     14      1.1  joff  *    documentation and/or other materials provided with the distribution.
     15      1.1  joff  * 3. All advertising materials mentioning features or use of this software
     16      1.1  joff  *    must display the following acknowledgement:
     17      1.1  joff  *	This product includes software developed by Ichiro FUKUHARA.
     18      1.1  joff  * 4. The name of the company nor the name of the author may be used to
     19      1.1  joff  *    endorse or promote products derived from this software without specific
     20      1.1  joff  *    prior written permission.
     21      1.1  joff  *
     22      1.1  joff  * THIS SOFTWARE IS PROVIDED BY ICHIRO FUKUHARA ``AS IS'' AND ANY EXPRESS OR
     23      1.1  joff  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     24      1.1  joff  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     25      1.1  joff  * IN NO EVENT SHALL ICHIRO FUKUHARA OR THE VOICES IN HIS HEAD BE LIABLE FOR
     26      1.1  joff  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     27      1.1  joff  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     28      1.1  joff  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     29      1.1  joff  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     30      1.1  joff  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     31      1.1  joff  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     32      1.1  joff  * SUCH DAMAGE.
     33      1.1  joff  */
     34      1.1  joff 
     35      1.1  joff #ifndef _EP93XXREG_H_
     36      1.1  joff #define _EP93XXREG_H_
     37      1.1  joff 
     38      1.1  joff /*
     39      1.1  joff  * Physical memory map for the Cirrus Logic EP93XX
     40      1.1  joff  */
     41      1.1  joff 
     42      1.1  joff /*
     43      1.1  joff  * FFFF FFFF ---------------------------
     44      1.1  joff  *            Device 12
     45      1.1  joff  *            External SMC CS#0 ROM/SRAM
     46      1.1  joff  * F000 0000 ---------------------------
     47      1.1  joff  *            Device 11
     48      1.1  joff  *            SDRAM CS#2
     49      1.1  joff  * E000 0000 ---------------------------
     50      1.1  joff  *            Device 10
     51      1.1  joff  *            SDRAM CS#1
     52      1.1  joff  * D000 0000 ---------------------------
     53      1.1  joff  *            Device 9
     54      1.1  joff  *            SDRAM CS#0
     55      1.1  joff  * C000 0000 ---------------------------
     56      1.1  joff  *            Device 8
     57      1.1  joff  *            Not used
     58      1.1  joff  * 9000 0000 ---------------------------
     59      1.1  joff  *            Device 7
     60      1.1  joff  *            EP93XX System Registers
     61      1.1  joff  *              8080 0000 - 8094 FFFF
     62      1.1  joff  *                  APB Mapped Registers
     63      1.1  joff  *              8010 0000 - 807F FFFF
     64      1.1  joff  *                  Reserved
     65      1.1  joff  *              8000 0000 - 800F FFFF
     66      1.1  joff  *                  AHB Mapped Registers
     67      1.1  joff  * 8000 0000 ---------------------------
     68      1.1  joff  *            Device 6
     69      1.1  joff  *            External SMC CS#7 ROM/SRAM
     70      1.1  joff  * 7000 0000 ---------------------------
     71      1.1  joff  *            Device 5
     72      1.1  joff  *            External SMC CS#6 ROM/SRAM
     73      1.1  joff  * 6000 0000 ---------------------------
     74      1.1  joff  *            Device 4
     75      1.1  joff  *            Reserved
     76      1.1  joff  * 4000 0000 ---------------------------
     77      1.1  joff  *            Device 3
     78      1.1  joff  *            External SMC CS#3 ROM/SRAM
     79      1.1  joff  * 3000 0000 ---------------------------
     80      1.1  joff  *            Device 2
     81      1.1  joff  *            External SMC CS#2 ROM/SRAM
     82      1.1  joff  * 2000 0000 ---------------------------
     83      1.1  joff  *            Device 1
     84      1.1  joff  *            External SMC CS#1 ROM/SRAM
     85      1.1  joff  * 1000 0000 ---------------------------
     86      1.1  joff  *            Device 0
     87      1.1  joff  *            SDRAM CS#3
     88      1.1  joff  * 0000 0000 ---------------------------
     89      1.1  joff  */
     90      1.1  joff 
     91      1.1  joff 
     92      1.1  joff /*
     93      1.1  joff  * Virtual memory map for the Cirrus Logic EP93XX integrated devices
     94      1.1  joff  *
     95      1.1  joff  * Some device registers are staticaly mapped on upper address region.
     96      1.1  joff  * because we have to access them before bus_space is initialized.
     97      1.1  joff  * Most device is dynamicaly mapped by bus_space_map().  In this case,
     98      1.1  joff  * the actual mapped (virtual) address are not cared by device drivers.
     99      1.1  joff  */
    100      1.1  joff 
    101      1.1  joff /*
    102      1.1  joff  * FFFF FFFF ---------------------------
    103      1.1  joff  *            not used
    104      1.1  joff  * F030 0000 ---------------------------
    105      1.1  joff  *            APB bus (2Mbyte)
    106      1.1  joff  * F010 0000 ---------------------------
    107      1.1  joff  *            AHB bus (1Mbyte)
    108      1.1  joff  * F000 0000 ---------------------------
    109      1.1  joff  *            Kernel text and data
    110      1.1  joff  * C000 0000 ---------------------------
    111      1.1  joff  * 0000 0000 ---------------------------
    112      1.1  joff  *
    113      1.1  joff  */
    114      1.1  joff 
    115      1.1  joff /* Virtual address for I/O space */
    116      1.1  joff #define	EP93XX_IO_VBASE		0xf0000000UL
    117      1.1  joff 
    118      1.1  joff /* EP93xx System and Peripheral Registers */
    119      1.1  joff #define	EP93XX_AHB_VBASE	0xf0000000UL
    120      1.1  joff #define	EP93XX_AHB_HWBASE	0x80000000UL
    121      1.1  joff #define	EP93XX_AHB_SIZE		0x00100000UL	/* 1Mbyte */
    122      1.1  joff #define  EP93XX_AHB_VIC1	0x000b0000UL
    123      1.1  joff #define  EP93XX_AHB_VIC2	0x000c0000UL
    124      1.1  joff #define   EP93XX_VIC_IRQStatus	0x00000000UL
    125      1.1  joff #define   EP93XX_VIC_FIQStatus	0x00000004UL
    126      1.1  joff #define   EP93XX_VIC_RawIntr	0x00000008UL
    127      1.1  joff #define   EP93XX_VIC_IntSelect	0x0000000cUL
    128      1.1  joff #define   EP93XX_VIC_IntEnable	0x00000010UL
    129      1.1  joff #define   EP93XX_VIC_IntEnClear	0x00000014UL
    130      1.1  joff #define   EP93XX_VIC_SoftInt	0x00000018UL
    131      1.1  joff #define   EP93XX_VIC_SoftIntClear	0x0000001cUL
    132      1.1  joff #define   EP93XX_VIC_Protection	0x00000020UL
    133      1.1  joff #define   EP93XX_VIC_VectAddr	0x00000030UL
    134      1.1  joff #define   EP93XX_VIC_DefVectAddr	0x00000034UL
    135      1.1  joff #define   EP93XX_VIC_VectAddr0	0x00000100UL
    136      1.1  joff #define   EP93XX_VIC_VectCntl0	0x00000200UL
    137      1.1  joff #define   EP93XX_VIC_PeriphID0	0x00000fe0UL
    138      1.1  joff 
    139      1.1  joff #define	EP93XX_APB_VBASE	0xf0100000UL
    140      1.1  joff #define	EP93XX_APB_HWBASE	0x80800000UL
    141      1.1  joff #define	EP93XX_APB_SIZE		0x00200000UL	/* 2Mbyte */
    142      1.2  joff #define  EP93XX_APB_GPIO	0x00040000UL
    143      1.2  joff #define  EP93XX_APB_GPIO_SIZE	0x000000d0UL
    144      1.2  joff #define   EP93XX_GPIO_PADR	0x00000000UL
    145  1.2.6.1  yamt #define   EP93XX_GPIO_PBDR	0x00000004UL
    146      1.2  joff #define   EP93XX_GPIO_PADDR	0x00000010UL
    147  1.2.6.1  yamt #define   EP93XX_GPIO_PBDDR	0x00000014UL
    148      1.2  joff #define   EP93XX_GPIO_PHDR	0x00000040UL
    149      1.2  joff #define   EP93XX_GPIO_PHDDR	0x00000044UL
    150      1.1  joff #define  EP93XX_APB_SYSCON	0x00130000UL
    151      1.1  joff #define  EP93XX_APB_SYSCON_SIZE	0x000000c0UL
    152      1.1  joff #define   EP93XX_SYSCON_PwrSts	0x00000000UL
    153      1.1  joff #define   EP93XX_SYSCON_PwrCnt	0x00000004UL
    154      1.1  joff #define    PwrCnt_UARTBAUD	0x20000000UL
    155      1.1  joff #define   EP93XX_SYSCON_TEOI	0x00000018UL
    156      1.1  joff #define   EP93XX_SYSCON_ClkSet1	0x00000020UL
    157      1.1  joff #define   EP93XX_SYSCON_ClkSet2	0x00000024UL
    158      1.1  joff #define   EP93XX_SYSCON_ChipID	0x00000094UL
    159      1.1  joff #define  EP93XX_APB_TIMERS	0x00010000UL
    160      1.1  joff #define   EP93XX_TIMERS_Timer4Enable	0x00000064UL
    161      1.1  joff #define   EP93XX_TIMERS_Timer4ValueHigh	0x00000064UL
    162      1.1  joff #define   EP93XX_TIMERS_Timer4ValueLow	0x00000060UL
    163      1.1  joff #define  EP93XX_APB_UART1	0x000c0000UL
    164      1.1  joff #define  EP93XX_APB_UART2	0x000d0000UL
    165      1.1  joff #define  EP93XX_APB_UART_SIZE	0x00000220UL
    166      1.1  joff #define   EP93XX_UART_Flag	0x00000018UL
    167      1.1  joff #define   EP93XX_UART_Data	0x00000000UL
    168      1.1  joff 
    169      1.1  joff #define NIRQ			64
    170      1.1  joff #define VIC_NIRQ		32
    171      1.1  joff 
    172      1.1  joff #define	EP93XX_INTR_bit31	31
    173      1.1  joff #define	EP93XX_INTR_bit30	30
    174      1.1  joff #define	EP93XX_INTR_bit29	29
    175      1.1  joff #define	EP93XX_INTR_bit28	28
    176      1.1  joff #define	EP93XX_INTR_bit27	27
    177      1.1  joff #define	EP93XX_INTR_bit26	26
    178      1.1  joff #define	EP93XX_INTR_bit25	25
    179      1.1  joff #define	EP93XX_INTR_bit24	24
    180      1.1  joff #define	EP93XX_INTR_bit23	23
    181      1.1  joff #define	EP93XX_INTR_bit22	22
    182      1.1  joff #define	EP93XX_INTR_bit21	21
    183      1.1  joff #define	EP93XX_INTR_bit20	20
    184      1.1  joff #define	EP93XX_INTR_bit19	19
    185      1.1  joff #define	EP93XX_INTR_bit18	18
    186      1.1  joff #define	EP93XX_INTR_bit17	17
    187      1.1  joff #define	EP93XX_INTR_bit16	16
    188      1.1  joff #define	EP93XX_INTR_bit15	15
    189      1.1  joff #define	EP93XX_INTR_bit14	14
    190      1.1  joff #define	EP93XX_INTR_bit13	13
    191      1.1  joff #define	EP93XX_INTR_bit12	12
    192      1.1  joff #define	EP93XX_INTR_bit11	11
    193      1.1  joff #define	EP93XX_INTR_bit10	10
    194      1.1  joff #define	EP93XX_INTR_bit9	9
    195      1.1  joff #define	EP93XX_INTR_bit8	8
    196      1.1  joff #define	EP93XX_INTR_bit7	7
    197      1.1  joff #define	EP93XX_INTR_bit6	6
    198      1.1  joff #define	EP93XX_INTR_bit5	5
    199      1.1  joff #define	EP93XX_INTR_bit4	4
    200      1.1  joff #define	EP93XX_INTR_bit3	3
    201      1.1  joff #define	EP93XX_INTR_bit2	2
    202      1.1  joff #define	EP93XX_INTR_bit1	1
    203      1.1  joff #define	EP93XX_INTR_bit0	0
    204      1.1  joff 
    205      1.1  joff #endif /* _EP93XXREG_H_ */
    206