162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Author: MontaVista Software, Inc. 362306a36Sopenharmony_ci * source@mvista.com 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright 2001-2002 MontaVista Software Inc. 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * This program is free software; you can redistribute it and/or modify it 862306a36Sopenharmony_ci * under the terms of the GNU General Public License as published by the 962306a36Sopenharmony_ci * Free Software Foundation; either version 2 of the License, or (at your 1062306a36Sopenharmony_ci * option) any later version. 1162306a36Sopenharmony_ci * 1262306a36Sopenharmony_ci * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 1362306a36Sopenharmony_ci * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 1462306a36Sopenharmony_ci * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1562306a36Sopenharmony_ci * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 1662306a36Sopenharmony_ci * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 1762306a36Sopenharmony_ci * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 1862306a36Sopenharmony_ci * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 1962306a36Sopenharmony_ci * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 2062306a36Sopenharmony_ci * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 2162306a36Sopenharmony_ci * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2262306a36Sopenharmony_ci * 2362306a36Sopenharmony_ci * You should have received a copy of the GNU General Public License along 2462306a36Sopenharmony_ci * with this program; if not, write to the Free Software Foundation, Inc., 2562306a36Sopenharmony_ci * 675 Mass Ave, Cambridge, MA 02139, USA. 2662306a36Sopenharmony_ci */ 2762306a36Sopenharmony_ci#ifndef __ASM_TXX9_RBTX4927_H 2862306a36Sopenharmony_ci#define __ASM_TXX9_RBTX4927_H 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci#include <asm/txx9/tx4927.h> 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci#define RBTX4927_PCIMEM 0x08000000 3362306a36Sopenharmony_ci#define RBTX4927_PCIMEM_SIZE 0x08000000 3462306a36Sopenharmony_ci#define RBTX4927_PCIIO 0x16000000 3562306a36Sopenharmony_ci#define RBTX4927_PCIIO_SIZE 0x01000000 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci#define RBTX4927_LED_ADDR (IO_BASE + TXX9_CE(2) + 0x00001000) 3862306a36Sopenharmony_ci#define RBTX4927_IMASK_ADDR (IO_BASE + TXX9_CE(2) + 0x00002000) 3962306a36Sopenharmony_ci#define RBTX4927_IMSTAT_ADDR (IO_BASE + TXX9_CE(2) + 0x00002006) 4062306a36Sopenharmony_ci#define RBTX4927_SOFTINT_ADDR (IO_BASE + TXX9_CE(2) + 0x00003000) 4162306a36Sopenharmony_ci#define RBTX4927_SOFTRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x0000f000) 4262306a36Sopenharmony_ci#define RBTX4927_SOFTRESETLOCK_ADDR (IO_BASE + TXX9_CE(2) + 0x0000f002) 4362306a36Sopenharmony_ci#define RBTX4927_PCIRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x0000f006) 4462306a36Sopenharmony_ci#define RBTX4927_BRAMRTC_BASE (IO_BASE + TXX9_CE(2) + 0x00010000) 4562306a36Sopenharmony_ci#define RBTX4927_ETHER_BASE (IO_BASE + TXX9_CE(2) + 0x00020000) 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci/* Ethernet port address */ 4862306a36Sopenharmony_ci#define RBTX4927_ETHER_ADDR (RBTX4927_ETHER_BASE + 0x280) 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci#define rbtx4927_imask_addr ((__u8 __iomem *)RBTX4927_IMASK_ADDR) 5162306a36Sopenharmony_ci#define rbtx4927_imstat_addr ((__u8 __iomem *)RBTX4927_IMSTAT_ADDR) 5262306a36Sopenharmony_ci#define rbtx4927_softint_addr ((__u8 __iomem *)RBTX4927_SOFTINT_ADDR) 5362306a36Sopenharmony_ci#define rbtx4927_softreset_addr ((__u8 __iomem *)RBTX4927_SOFTRESET_ADDR) 5462306a36Sopenharmony_ci#define rbtx4927_softresetlock_addr \ 5562306a36Sopenharmony_ci ((__u8 __iomem *)RBTX4927_SOFTRESETLOCK_ADDR) 5662306a36Sopenharmony_ci#define rbtx4927_pcireset_addr ((__u8 __iomem *)RBTX4927_PCIRESET_ADDR) 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci/* bits for ISTAT/IMASK/IMSTAT */ 5962306a36Sopenharmony_ci#define RBTX4927_INTB_PCID 0 6062306a36Sopenharmony_ci#define RBTX4927_INTB_PCIC 1 6162306a36Sopenharmony_ci#define RBTX4927_INTB_PCIB 2 6262306a36Sopenharmony_ci#define RBTX4927_INTB_PCIA 3 6362306a36Sopenharmony_ci#define RBTX4927_INTF_PCID (1 << RBTX4927_INTB_PCID) 6462306a36Sopenharmony_ci#define RBTX4927_INTF_PCIC (1 << RBTX4927_INTB_PCIC) 6562306a36Sopenharmony_ci#define RBTX4927_INTF_PCIB (1 << RBTX4927_INTB_PCIB) 6662306a36Sopenharmony_ci#define RBTX4927_INTF_PCIA (1 << RBTX4927_INTB_PCIA) 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ci#define RBTX4927_NR_IRQ_IOC 8 /* IOC */ 6962306a36Sopenharmony_ci 7062306a36Sopenharmony_ci#define RBTX4927_IRQ_IOC (TXX9_IRQ_BASE + TX4927_NUM_IR) 7162306a36Sopenharmony_ci#define RBTX4927_IRQ_IOC_PCID (RBTX4927_IRQ_IOC + RBTX4927_INTB_PCID) 7262306a36Sopenharmony_ci#define RBTX4927_IRQ_IOC_PCIC (RBTX4927_IRQ_IOC + RBTX4927_INTB_PCIC) 7362306a36Sopenharmony_ci#define RBTX4927_IRQ_IOC_PCIB (RBTX4927_IRQ_IOC + RBTX4927_INTB_PCIB) 7462306a36Sopenharmony_ci#define RBTX4927_IRQ_IOC_PCIA (RBTX4927_IRQ_IOC + RBTX4927_INTB_PCIA) 7562306a36Sopenharmony_ci 7662306a36Sopenharmony_ci#define RBTX4927_IRQ_IOCINT (TXX9_IRQ_BASE + TX4927_IR_INT(1)) 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ci#ifdef CONFIG_PCI 7962306a36Sopenharmony_ci#define RBTX4927_ISA_IO_OFFSET RBTX4927_PCIIO 8062306a36Sopenharmony_ci#else 8162306a36Sopenharmony_ci#define RBTX4927_ISA_IO_OFFSET 0 8262306a36Sopenharmony_ci#endif 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_ci#define RBTX4927_RTL_8019_BASE (RBTX4927_ETHER_ADDR - mips_io_port_base) 8562306a36Sopenharmony_ci#define RBTX4927_RTL_8019_IRQ (TXX9_IRQ_BASE + TX4927_IR_INT(3)) 8662306a36Sopenharmony_ci 8762306a36Sopenharmony_civoid rbtx4927_prom_init(void); 8862306a36Sopenharmony_civoid rbtx4927_irq_setup(void); 8962306a36Sopenharmony_cistruct pci_dev; 9062306a36Sopenharmony_ciint rbtx4927_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); 9162306a36Sopenharmony_ci 9262306a36Sopenharmony_ci#endif /* __ASM_TXX9_RBTX4927_H */ 93