xref: /openbmc/linux/arch/mips/include/asm/sibyte/sb1250.h (revision 384740dc)
1384740dcSRalf Baechle /*
2384740dcSRalf Baechle  * Copyright (C) 2000, 2001, 2002, 2003 Broadcom Corporation
3384740dcSRalf Baechle  *
4384740dcSRalf Baechle  * This program is free software; you can redistribute it and/or
5384740dcSRalf Baechle  * modify it under the terms of the GNU General Public License
6384740dcSRalf Baechle  * as published by the Free Software Foundation; either version 2
7384740dcSRalf Baechle  * of the License, or (at your option) any later version.
8384740dcSRalf Baechle  *
9384740dcSRalf Baechle  * This program is distributed in the hope that it will be useful,
10384740dcSRalf Baechle  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11384740dcSRalf Baechle  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12384740dcSRalf Baechle  * GNU General Public License for more details.
13384740dcSRalf Baechle  *
14384740dcSRalf Baechle  * You should have received a copy of the GNU General Public License
15384740dcSRalf Baechle  * along with this program; if not, write to the Free Software
16384740dcSRalf Baechle  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17384740dcSRalf Baechle  */
18384740dcSRalf Baechle 
19384740dcSRalf Baechle #ifndef _ASM_SIBYTE_SB1250_H
20384740dcSRalf Baechle #define _ASM_SIBYTE_SB1250_H
21384740dcSRalf Baechle 
22384740dcSRalf Baechle /*
23384740dcSRalf Baechle  * yymmddpp: year, month, day, patch.
24384740dcSRalf Baechle  * should sync with Makefile EXTRAVERSION
25384740dcSRalf Baechle  */
26384740dcSRalf Baechle #define SIBYTE_RELEASE 0x02111403
27384740dcSRalf Baechle 
28384740dcSRalf Baechle #define SB1250_NR_IRQS 64
29384740dcSRalf Baechle 
30384740dcSRalf Baechle #define BCM1480_NR_IRQS                 128
31384740dcSRalf Baechle #define BCM1480_NR_IRQS_HALF            64
32384740dcSRalf Baechle 
33384740dcSRalf Baechle #define SB1250_DUART_MINOR_BASE		64
34384740dcSRalf Baechle 
35384740dcSRalf Baechle #ifndef __ASSEMBLY__
36384740dcSRalf Baechle 
37384740dcSRalf Baechle #include <asm/addrspace.h>
38384740dcSRalf Baechle 
39384740dcSRalf Baechle /* For revision/pass information */
40384740dcSRalf Baechle #include <asm/sibyte/sb1250_scd.h>
41384740dcSRalf Baechle #include <asm/sibyte/bcm1480_scd.h>
42384740dcSRalf Baechle extern unsigned int sb1_pass;
43384740dcSRalf Baechle extern unsigned int soc_pass;
44384740dcSRalf Baechle extern unsigned int soc_type;
45384740dcSRalf Baechle extern unsigned int periph_rev;
46384740dcSRalf Baechle extern unsigned int zbbus_mhz;
47384740dcSRalf Baechle 
48384740dcSRalf Baechle extern void sb1250_time_init(void);
49384740dcSRalf Baechle extern void sb1250_mask_irq(int cpu, int irq);
50384740dcSRalf Baechle extern void sb1250_unmask_irq(int cpu, int irq);
51384740dcSRalf Baechle 
52384740dcSRalf Baechle extern void bcm1480_time_init(void);
53384740dcSRalf Baechle extern void bcm1480_mask_irq(int cpu, int irq);
54384740dcSRalf Baechle extern void bcm1480_unmask_irq(int cpu, int irq);
55384740dcSRalf Baechle 
56384740dcSRalf Baechle #define AT_spin \
57384740dcSRalf Baechle 	__asm__ __volatile__ (		\
58384740dcSRalf Baechle 		".set noat\n"		\
59384740dcSRalf Baechle 		"li $at, 0\n"		\
60384740dcSRalf Baechle 		"1: beqz $at, 1b\n"	\
61384740dcSRalf Baechle 		".set at\n"		\
62384740dcSRalf Baechle 		)
63384740dcSRalf Baechle 
64384740dcSRalf Baechle #endif
65384740dcSRalf Baechle 
66384740dcSRalf Baechle #define IOADDR(a) ((void __iomem *)(IO_BASE + (a)))
67384740dcSRalf Baechle 
68384740dcSRalf Baechle #endif
69