1633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham/* 2633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * Copyright (C) 2000, 2001, 2002, 2003 Broadcom Corporation 3633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * 4633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * This program is free software; you can redistribute it and/or 5633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * modify it under the terms of the GNU General Public License 6633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * as published by the Free Software Foundation; either version 2 7633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * of the License, or (at your option) any later version. 8633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * 9633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * This program is distributed in the hope that it will be useful, 10633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * but WITHOUT ANY WARRANTY; without even the implied warranty of 11633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * GNU General Public License for more details. 13633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * 14633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * You should have received a copy of the GNU General Public License 15633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * along with this program; if not, write to the Free Software 16633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham */ 18633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham 19633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#ifndef _ASM_SIBYTE_SB1250_H 20633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define _ASM_SIBYTE_SB1250_H 21633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham 22633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham/* 23633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * yymmddpp: year, month, day, patch. 24633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * should sync with Makefile EXTRAVERSION 25633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham */ 26633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define SIBYTE_RELEASE 0x02111403 27633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham 28633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define SB1250_NR_IRQS 64 29633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham 30633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define BCM1480_NR_IRQS 128 31633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define BCM1480_NR_IRQS_HALF 64 32633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham 33633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define SB1250_DUART_MINOR_BASE 64 34633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham 35633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#ifndef __ASSEMBLY__ 36633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham 37633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#include <asm/addrspace.h> 38633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham 39633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham/* For revision/pass information */ 40633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#include <asm/sibyte/sb1250_scd.h> 41633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#include <asm/sibyte/bcm1480_scd.h> 42633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandhamextern unsigned int sb1_pass; 43633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandhamextern unsigned int soc_pass; 44633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandhamextern unsigned int soc_type; 45633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandhamextern unsigned int periph_rev; 46633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandhamextern unsigned int zbbus_mhz; 47633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham 48633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandhamextern void sb1250_time_init(void); 49633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandhamextern void sb1250_mask_irq(int cpu, int irq); 50633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandhamextern void sb1250_unmask_irq(int cpu, int irq); 51633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham 52633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandhamextern void bcm1480_time_init(void); 53633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandhamextern void bcm1480_mask_irq(int cpu, int irq); 54633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandhamextern void bcm1480_unmask_irq(int cpu, int irq); 55633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham 56633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define AT_spin \ 57633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham __asm__ __volatile__ ( \ 58633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham ".set noat\n" \ 59633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham "li $at, 0\n" \ 60633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham "1: beqz $at, 1b\n" \ 61633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham ".set at\n" \ 62633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham ) 63633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham 64633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#endif 65633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham 66633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define IOADDR(a) ((void __iomem *)(IO_BASE + (a))) 67633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham 68633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#endif 69