xref: /openbmc/linux/arch/mips/include/asm/sibyte/sb1250.h (revision 1a59d1b8)
11a59d1b8SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
2384740dcSRalf Baechle /*
3384740dcSRalf Baechle  * Copyright (C) 2000, 2001, 2002, 2003 Broadcom Corporation
4384740dcSRalf Baechle  */
5384740dcSRalf Baechle 
6384740dcSRalf Baechle #ifndef _ASM_SIBYTE_SB1250_H
7384740dcSRalf Baechle #define _ASM_SIBYTE_SB1250_H
8384740dcSRalf Baechle 
9384740dcSRalf Baechle /*
10384740dcSRalf Baechle  * yymmddpp: year, month, day, patch.
11384740dcSRalf Baechle  * should sync with Makefile EXTRAVERSION
12384740dcSRalf Baechle  */
13384740dcSRalf Baechle #define SIBYTE_RELEASE 0x02111403
14384740dcSRalf Baechle 
15384740dcSRalf Baechle #define SB1250_NR_IRQS 64
16384740dcSRalf Baechle 
17384740dcSRalf Baechle #define BCM1480_NR_IRQS			128
18384740dcSRalf Baechle #define BCM1480_NR_IRQS_HALF		64
19384740dcSRalf Baechle 
20384740dcSRalf Baechle #define SB1250_DUART_MINOR_BASE		64
21384740dcSRalf Baechle 
22384740dcSRalf Baechle #ifndef __ASSEMBLY__
23384740dcSRalf Baechle 
24384740dcSRalf Baechle #include <asm/addrspace.h>
25384740dcSRalf Baechle 
26384740dcSRalf Baechle /* For revision/pass information */
27384740dcSRalf Baechle #include <asm/sibyte/sb1250_scd.h>
28384740dcSRalf Baechle #include <asm/sibyte/bcm1480_scd.h>
29384740dcSRalf Baechle extern unsigned int sb1_pass;
30384740dcSRalf Baechle extern unsigned int soc_pass;
31384740dcSRalf Baechle extern unsigned int soc_type;
32384740dcSRalf Baechle extern unsigned int periph_rev;
33384740dcSRalf Baechle extern unsigned int zbbus_mhz;
34384740dcSRalf Baechle 
35384740dcSRalf Baechle extern void sb1250_time_init(void);
36384740dcSRalf Baechle extern void sb1250_mask_irq(int cpu, int irq);
37384740dcSRalf Baechle extern void sb1250_unmask_irq(int cpu, int irq);
38384740dcSRalf Baechle 
39384740dcSRalf Baechle extern void bcm1480_time_init(void);
40384740dcSRalf Baechle extern void bcm1480_mask_irq(int cpu, int irq);
41384740dcSRalf Baechle extern void bcm1480_unmask_irq(int cpu, int irq);
42384740dcSRalf Baechle 
43384740dcSRalf Baechle #define AT_spin \
44384740dcSRalf Baechle 	__asm__ __volatile__ (		\
45384740dcSRalf Baechle 		".set noat\n"		\
46384740dcSRalf Baechle 		"li $at, 0\n"		\
47384740dcSRalf Baechle 		"1: beqz $at, 1b\n"	\
48384740dcSRalf Baechle 		".set at\n"		\
49384740dcSRalf Baechle 		)
50384740dcSRalf Baechle 
51384740dcSRalf Baechle #endif
52384740dcSRalf Baechle 
53384740dcSRalf Baechle #define IOADDR(a) ((void __iomem *)(IO_BASE + (a)))
54384740dcSRalf Baechle 
55384740dcSRalf Baechle #endif
56