Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Author: MontaVista Software, Inc.
0003  *     source@mvista.com
0004  *
0005  * Copyright 2001-2002 MontaVista Software Inc.
0006  *
0007  *  This program is free software; you can redistribute it and/or modify it
0008  *  under the terms of the GNU General Public License as published by the
0009  *  Free Software Foundation; either version 2 of the License, or (at your
0010  *  option) any later version.
0011  *
0012  *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
0013  *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
0014  *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
0015  *  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
0016  *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
0017  *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
0018  *  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
0019  *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
0020  *  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
0021  *  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0022  *
0023  *  You should have received a copy of the GNU General Public License along
0024  *  with this program; if not, write to the Free Software Foundation, Inc.,
0025  *  675 Mass Ave, Cambridge, MA 02139, USA.
0026  */
0027 #ifndef __ASM_TXX9_RBTX4927_H
0028 #define __ASM_TXX9_RBTX4927_H
0029 
0030 #include <asm/txx9/tx4927.h>
0031 
0032 #define RBTX4927_PCIMEM     0x08000000
0033 #define RBTX4927_PCIMEM_SIZE    0x08000000
0034 #define RBTX4927_PCIIO      0x16000000
0035 #define RBTX4927_PCIIO_SIZE 0x01000000
0036 
0037 #define RBTX4927_LED_ADDR   (IO_BASE + TXX9_CE(2) + 0x00001000)
0038 #define RBTX4927_IMASK_ADDR (IO_BASE + TXX9_CE(2) + 0x00002000)
0039 #define RBTX4927_IMSTAT_ADDR    (IO_BASE + TXX9_CE(2) + 0x00002006)
0040 #define RBTX4927_SOFTINT_ADDR   (IO_BASE + TXX9_CE(2) + 0x00003000)
0041 #define RBTX4927_SOFTRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x0000f000)
0042 #define RBTX4927_SOFTRESETLOCK_ADDR (IO_BASE + TXX9_CE(2) + 0x0000f002)
0043 #define RBTX4927_PCIRESET_ADDR  (IO_BASE + TXX9_CE(2) + 0x0000f006)
0044 #define RBTX4927_BRAMRTC_BASE   (IO_BASE + TXX9_CE(2) + 0x00010000)
0045 #define RBTX4927_ETHER_BASE (IO_BASE + TXX9_CE(2) + 0x00020000)
0046 
0047 /* Ethernet port address */
0048 #define RBTX4927_ETHER_ADDR (RBTX4927_ETHER_BASE + 0x280)
0049 
0050 #define rbtx4927_imask_addr ((__u8 __iomem *)RBTX4927_IMASK_ADDR)
0051 #define rbtx4927_imstat_addr    ((__u8 __iomem *)RBTX4927_IMSTAT_ADDR)
0052 #define rbtx4927_softint_addr   ((__u8 __iomem *)RBTX4927_SOFTINT_ADDR)
0053 #define rbtx4927_softreset_addr ((__u8 __iomem *)RBTX4927_SOFTRESET_ADDR)
0054 #define rbtx4927_softresetlock_addr \
0055                 ((__u8 __iomem *)RBTX4927_SOFTRESETLOCK_ADDR)
0056 #define rbtx4927_pcireset_addr  ((__u8 __iomem *)RBTX4927_PCIRESET_ADDR)
0057 
0058 /* bits for ISTAT/IMASK/IMSTAT */
0059 #define RBTX4927_INTB_PCID  0
0060 #define RBTX4927_INTB_PCIC  1
0061 #define RBTX4927_INTB_PCIB  2
0062 #define RBTX4927_INTB_PCIA  3
0063 #define RBTX4927_INTF_PCID  (1 << RBTX4927_INTB_PCID)
0064 #define RBTX4927_INTF_PCIC  (1 << RBTX4927_INTB_PCIC)
0065 #define RBTX4927_INTF_PCIB  (1 << RBTX4927_INTB_PCIB)
0066 #define RBTX4927_INTF_PCIA  (1 << RBTX4927_INTB_PCIA)
0067 
0068 #define RBTX4927_NR_IRQ_IOC 8   /* IOC */
0069 
0070 #define RBTX4927_IRQ_IOC    (TXX9_IRQ_BASE + TX4927_NUM_IR)
0071 #define RBTX4927_IRQ_IOC_PCID   (RBTX4927_IRQ_IOC + RBTX4927_INTB_PCID)
0072 #define RBTX4927_IRQ_IOC_PCIC   (RBTX4927_IRQ_IOC + RBTX4927_INTB_PCIC)
0073 #define RBTX4927_IRQ_IOC_PCIB   (RBTX4927_IRQ_IOC + RBTX4927_INTB_PCIB)
0074 #define RBTX4927_IRQ_IOC_PCIA   (RBTX4927_IRQ_IOC + RBTX4927_INTB_PCIA)
0075 
0076 #define RBTX4927_IRQ_IOCINT (TXX9_IRQ_BASE + TX4927_IR_INT(1))
0077 
0078 #ifdef CONFIG_PCI
0079 #define RBTX4927_ISA_IO_OFFSET RBTX4927_PCIIO
0080 #else
0081 #define RBTX4927_ISA_IO_OFFSET 0
0082 #endif
0083 
0084 #define RBTX4927_RTL_8019_BASE (RBTX4927_ETHER_ADDR - mips_io_port_base)
0085 #define RBTX4927_RTL_8019_IRQ  (TXX9_IRQ_BASE + TX4927_IR_INT(3))
0086 
0087 void rbtx4927_prom_init(void);
0088 void rbtx4927_irq_setup(void);
0089 struct pci_dev;
0090 int rbtx4927_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
0091 
0092 #endif /* __ASM_TXX9_RBTX4927_H */