Commit b94ce25b authored by Ivan Kokshaysky's avatar Ivan Kokshaysky Committed by Richard Henderson

[PATCH] alpha: lynx support

Forward port of Jay's 2.4 patch.
Also I've cleaned up EISA configury - we only need it for
systems with EISA.

Ivan.
parent d33a9219
...@@ -59,6 +59,7 @@ choice ...@@ -59,6 +59,7 @@ choice
Jensen DECpc 150, DEC 2000 model 300, Jensen DECpc 150, DEC 2000 model 300,
DEC 2000 model 500 DEC 2000 model 500
LX164 AlphaPC164-LX LX164 AlphaPC164-LX
Lynx AS 2100A
Miata Personal Workstation 433a, 433au, 500a, Miata Personal Workstation 433a, 433au, 500a,
500au, 600a, or 600au 500au, 600a, or 600au
Marvel AlphaServer ES47 / ES80 / GS1280 Marvel AlphaServer ES47 / ES80 / GS1280
...@@ -169,6 +170,11 @@ config ALPHA_LX164 ...@@ -169,6 +170,11 @@ config ALPHA_LX164
A technical overview of this board is available at A technical overview of this board is available at
<http://www.unix-ag.org/Linux-Alpha/Architectures/LX164.html>. <http://www.unix-ag.org/Linux-Alpha/Architectures/LX164.html>.
config ALPHA_LYNX
bool "Lynx"
help
AlphaServer 2100A-based systems.
config ALPHA_MARVEL config ALPHA_MARVEL
bool "Marvel" bool "Marvel"
help help
...@@ -263,22 +269,6 @@ config ISA ...@@ -263,22 +269,6 @@ config ISA
(MCA) or VESA. ISA is an older system, now being displaced by PCI; (MCA) or VESA. ISA is an older system, now being displaced by PCI;
newer boards don't support it. If you have ISA, say Y, otherwise N. newer boards don't support it. If you have ISA, say Y, otherwise N.
config EISA
bool
default y
---help---
The Extended Industry Standard Architecture (EISA) bus was
developed as an open alternative to the IBM MicroChannel bus.
The EISA bus provided some of the features of the IBM MicroChannel
bus while maintaining backward compatibility with cards made for
the older ISA bus. The EISA bus saw limited use between 1988 and
1995 when it was made obsolete by the PCI bus.
Say Y here if you are building a kernel for an EISA-based machine.
Otherwise, say N.
config SBUS config SBUS
bool bool
...@@ -325,8 +315,8 @@ config ALPHA_NONAME ...@@ -325,8 +315,8 @@ config ALPHA_NONAME
config ALPHA_EV4 config ALPHA_EV4
bool bool
depends on ALPHA_JENSEN || ALPHA_SABLE && !ALPHA_GAMMA || ALPHA_NORITAKE && !ALPHA_PRIMO || ALPHA_MIKASA && !ALPHA_PRIMO || ALPHA_CABRIOLET || ALPHA_AVANTI_CH || ALPHA_EB64P_CH || ALPHA_XL || ALPHA_NONAME || ALPHA_EB66 || ALPHA_EB66P || ALPHA_P2K depends on ALPHA_JENSEN || (ALPHA_SABLE && !ALPHA_GAMMA) || ALPHA_LYNX || ALPHA_NORITAKE && !ALPHA_PRIMO || ALPHA_MIKASA && !ALPHA_PRIMO || ALPHA_CABRIOLET || ALPHA_AVANTI_CH || ALPHA_EB64P_CH || ALPHA_XL || ALPHA_NONAME || ALPHA_EB66 || ALPHA_EB66P || ALPHA_P2K
default y default y if !ALPHA_LYNX
config ALPHA_LCA config ALPHA_LCA
bool bool
...@@ -351,9 +341,12 @@ config ALPHA_EB64P ...@@ -351,9 +341,12 @@ config ALPHA_EB64P
Runs from standard PC power supply. Runs from standard PC power supply.
config ALPHA_EV5 config ALPHA_EV5
bool "EV5 CPU(s) (model 5/xxx)?" if ALPHA_LYNX
default y if ALPHA_RX164 || ALPHA_RAWHIDE || ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_RUFFIAN || ALPHA_SABLE && ALPHA_GAMMA || ALPHA_NORITAKE && ALPHA_PRIMO || ALPHA_MIKASA && ALPHA_PRIMO || ALPHA_PC164 || ALPHA_TAKARA || ALPHA_EB164 || ALPHA_ALCOR
config ALPHA_EV4
bool bool
depends on ALPHA_RX164 || ALPHA_RAWHIDE || ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_RUFFIAN || ALPHA_SABLE && ALPHA_GAMMA || ALPHA_NORITAKE && ALPHA_PRIMO || ALPHA_MIKASA && ALPHA_PRIMO || ALPHA_PC164 || ALPHA_TAKARA || ALPHA_EB164 || ALPHA_ALCOR default y if ALPHA_LYNX && !ALPHA_EV5
default y
config ALPHA_CIA config ALPHA_CIA
bool bool
...@@ -384,9 +377,14 @@ config ALPHA_GAMMA ...@@ -384,9 +377,14 @@ config ALPHA_GAMMA
help help
Say Y if you have an AS 2000 5/xxx or an AS 2100 5/xxx. Say Y if you have an AS 2000 5/xxx or an AS 2100 5/xxx.
config ALPHA_GAMMA
bool
depends on ALPHA_LYNX
default y
config ALPHA_T2 config ALPHA_T2
bool bool
depends on ALPHA_SABLE depends on ALPHA_SABLE || ALPHA_LYNX
default y default y
config ALPHA_PYXIS config ALPHA_PYXIS
...@@ -431,9 +429,23 @@ config ALPHA_IRONGATE ...@@ -431,9 +429,23 @@ config ALPHA_IRONGATE
depends on ALPHA_NAUTILUS depends on ALPHA_NAUTILUS
default y default y
config ALPHA_AVANTI
bool
depends on ALPHA_XL || ALPHA_AVANTI_CH
default y
help
Avanti AS 200, AS 205, AS 250, AS 255, AS 300, and AS 400-based
Alphas. Info at
<http://www.unix-ag.org/Linux-Alpha/Architectures/Avanti.html>.
config ALPHA_BROKEN_IRQ_MASK
bool
depends on ALPHA_GENERIC || ALPHA_PC164
default y
config ALPHA_SRM config ALPHA_SRM
bool "Use SRM as bootloader" if ALPHA_CABRIOLET || ALPHA_AVANTI_CH || ALPHA_EB64P || ALPHA_PC164 || ALPHA_TAKARA || ALPHA_EB164 || ALPHA_ALCOR || ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_NAUTILUS || ALPHA_NONAME bool "Use SRM as bootloader" if ALPHA_CABRIOLET || ALPHA_AVANTI_CH || ALPHA_EB64P || ALPHA_PC164 || ALPHA_TAKARA || ALPHA_EB164 || ALPHA_ALCOR || ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_NAUTILUS || ALPHA_NONAME
default y if ALPHA_JENSEN || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_NORITAKE || ALPHA_DP264 || ALPHA_RAWHIDE || ALPHA_EIGER || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_SHARK || ALPHA_MARVEL default y if ALPHA_JENSEN || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_LYNX || ALPHA_NORITAKE || ALPHA_DP264 || ALPHA_RAWHIDE || ALPHA_EIGER || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_SHARK || ALPHA_MARVEL
---help--- ---help---
There are two different types of booting firmware on Alphas: SRM, There are two different types of booting firmware on Alphas: SRM,
which is command line driven, and ARC, which uses menus and arrow which is command line driven, and ARC, which uses menus and arrow
...@@ -459,28 +471,26 @@ config EARLY_PRINTK ...@@ -459,28 +471,26 @@ config EARLY_PRINTK
depends on ALPHA_GENERIC || ALPHA_SRM depends on ALPHA_GENERIC || ALPHA_SRM
default y default y
config ALPHA_EISA config EISA
bool bool
depends on ALPHA_ALCOR || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_NORITAKE || ALPHA_RAWHIDE depends on ALPHA_GENERIC || ALPHA_JENSEN || ALPHA_ALCOR || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_LYNX || ALPHA_NORITAKE || ALPHA_RAWHIDE
default y default y
---help---
The Extended Industry Standard Architecture (EISA) bus was
developed as an open alternative to the IBM MicroChannel bus.
config ALPHA_AVANTI The EISA bus provided some of the features of the IBM MicroChannel
bool bus while maintaining backward compatibility with cards made for
depends on ALPHA_XL || ALPHA_AVANTI_CH the older ISA bus. The EISA bus saw limited use between 1988 and
default y 1995 when it was made obsolete by the PCI bus.
help
Avanti AS 200, AS 205, AS 250, AS 255, AS 300, and AS 400-based
Alphas. Info at
<http://www.unix-ag.org/Linux-Alpha/Architectures/Avanti.html>.
config ALPHA_BROKEN_IRQ_MASK Say Y here if you are building a kernel for an EISA-based machine.
bool
depends on ALPHA_GENERIC || ALPHA_PC164 Otherwise, say N.
default y
config SMP config SMP
bool "Symmetric multi-processing support" bool "Symmetric multi-processing support"
depends on ALPHA_SABLE || ALPHA_RAWHIDE || ALPHA_DP264 || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_GENERIC || ALPHA_SHARK || ALPHA_MARVEL depends on ALPHA_SABLE || ALPHA_LYNX || ALPHA_RAWHIDE || ALPHA_DP264 || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_GENERIC || ALPHA_SHARK || ALPHA_MARVEL
---help--- ---help---
This enables support for systems with more than one CPU. If you have This enables support for systems with more than one CPU. If you have
a system with only one CPU, like most personal computers, say N. If a system with only one CPU, like most personal computers, say N. If
......
...@@ -83,6 +83,7 @@ obj-$(CONFIG_ALPHA_RAWHIDE) += sys_rawhide.o irq_i8259.o ...@@ -83,6 +83,7 @@ obj-$(CONFIG_ALPHA_RAWHIDE) += sys_rawhide.o irq_i8259.o
obj-$(CONFIG_ALPHA_RUFFIAN) += sys_ruffian.o irq_pyxis.o irq_i8259.o obj-$(CONFIG_ALPHA_RUFFIAN) += sys_ruffian.o irq_pyxis.o irq_i8259.o
obj-$(CONFIG_ALPHA_RX164) += sys_rx164.o irq_i8259.o obj-$(CONFIG_ALPHA_RX164) += sys_rx164.o irq_i8259.o
obj-$(CONFIG_ALPHA_SABLE) += sys_sable.o obj-$(CONFIG_ALPHA_SABLE) += sys_sable.o
obj-$(CONFIG_ALPHA_LYNX) += sys_sable.o
obj-$(CONFIG_ALPHA_BOOK1) += sys_sio.o irq_i8259.o irq_srm.o ns87312.o obj-$(CONFIG_ALPHA_BOOK1) += sys_sio.o irq_i8259.o irq_srm.o ns87312.o
obj-$(CONFIG_ALPHA_AVANTI) += sys_sio.o irq_i8259.o irq_srm.o ns87312.o obj-$(CONFIG_ALPHA_AVANTI) += sys_sio.o irq_i8259.o irq_srm.o ns87312.o
obj-$(CONFIG_ALPHA_NONAME) += sys_sio.o irq_i8259.o irq_srm.o ns87312.o obj-$(CONFIG_ALPHA_NONAME) += sys_sio.o irq_i8259.o irq_srm.o ns87312.o
......
This diff is collapsed.
...@@ -76,6 +76,7 @@ extern void polaris_machine_check(u64, u64, struct pt_regs *); ...@@ -76,6 +76,7 @@ extern void polaris_machine_check(u64, u64, struct pt_regs *);
/* core_t2.c */ /* core_t2.c */
extern struct pci_ops t2_pci_ops; extern struct pci_ops t2_pci_ops;
extern void t2_init_arch(void); extern void t2_init_arch(void);
extern void t2_kill_arch(int);
extern void t2_machine_check(u64, u64, struct pt_regs *); extern void t2_machine_check(u64, u64, struct pt_regs *);
extern void t2_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); extern void t2_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
......
...@@ -162,6 +162,7 @@ WEAK(eb66p_mv); ...@@ -162,6 +162,7 @@ WEAK(eb66p_mv);
WEAK(eiger_mv); WEAK(eiger_mv);
WEAK(jensen_mv); WEAK(jensen_mv);
WEAK(lx164_mv); WEAK(lx164_mv);
WEAK(lynx_mv);
WEAK(marvel_ev7_mv); WEAK(marvel_ev7_mv);
WEAK(miata_mv); WEAK(miata_mv);
WEAK(mikasa_mv); WEAK(mikasa_mv);
...@@ -739,7 +740,7 @@ get_sysvec(unsigned long type, unsigned long variation, unsigned long cpu) ...@@ -739,7 +740,7 @@ get_sysvec(unsigned long type, unsigned long variation, unsigned long cpu)
NULL, /* Turbolaser */ NULL, /* Turbolaser */
&avanti_mv, &avanti_mv,
NULL, /* Mustang */ NULL, /* Mustang */
&alcor_mv, /* Alcor, Bret, Maverick. */ NULL, /* Alcor, Bret, Maverick. HWRPB inaccurate? */
NULL, /* Tradewind */ NULL, /* Tradewind */
NULL, /* Mikasa -- see below. */ NULL, /* Mikasa -- see below. */
NULL, /* EB64 */ NULL, /* EB64 */
...@@ -748,7 +749,7 @@ get_sysvec(unsigned long type, unsigned long variation, unsigned long cpu) ...@@ -748,7 +749,7 @@ get_sysvec(unsigned long type, unsigned long variation, unsigned long cpu)
&alphabook1_mv, &alphabook1_mv,
&rawhide_mv, &rawhide_mv,
NULL, /* K2 */ NULL, /* K2 */
NULL, /* Lynx */ &lynx_mv, /* Lynx */
&xl_mv, &xl_mv,
NULL, /* EB164 -- see variation. */ NULL, /* EB164 -- see variation. */
NULL, /* Noritake -- see below. */ NULL, /* Noritake -- see below. */
...@@ -930,6 +931,7 @@ get_sysvec_byname(const char *name) ...@@ -930,6 +931,7 @@ get_sysvec_byname(const char *name)
&eiger_mv, &eiger_mv,
&jensen_mv, &jensen_mv,
&lx164_mv, &lx164_mv,
&lynx_mv,
&miata_mv, &miata_mv,
&mikasa_mv, &mikasa_mv,
&mikasa_primo_mv, &mikasa_primo_mv,
......
This diff is collapsed.
...@@ -3,8 +3,9 @@ ...@@ -3,8 +3,9 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/spinlock.h>
#include <asm/compiler.h> #include <asm/compiler.h>
#include <asm/system.h>
/* /*
* T2 is the internal name for the core logic chipset which provides * T2 is the internal name for the core logic chipset which provides
...@@ -22,6 +23,7 @@ ...@@ -22,6 +23,7 @@
#define T2_MEM_R1_MASK 0x07ffffff /* Mem sparse region 1 mask is 26 bits */ #define T2_MEM_R1_MASK 0x07ffffff /* Mem sparse region 1 mask is 26 bits */
/* GAMMA-SABLE is a SABLE with EV5-based CPUs */ /* GAMMA-SABLE is a SABLE with EV5-based CPUs */
/* All LYNX machines, EV4 or EV5, use the GAMMA bias also */
#define _GAMMA_BIAS 0x8000000000UL #define _GAMMA_BIAS 0x8000000000UL
#if defined(CONFIG_ALPHA_GENERIC) #if defined(CONFIG_ALPHA_GENERIC)
...@@ -57,10 +59,33 @@ ...@@ -57,10 +59,33 @@
#define T2_WMASK2 (IDENT_ADDR + GAMMA_BIAS + 0x38e0001c0UL) #define T2_WMASK2 (IDENT_ADDR + GAMMA_BIAS + 0x38e0001c0UL)
#define T2_TBASE2 (IDENT_ADDR + GAMMA_BIAS + 0x38e0001e0UL) #define T2_TBASE2 (IDENT_ADDR + GAMMA_BIAS + 0x38e0001e0UL)
#define T2_TLBBR (IDENT_ADDR + GAMMA_BIAS + 0x38e000200UL) #define T2_TLBBR (IDENT_ADDR + GAMMA_BIAS + 0x38e000200UL)
#define T2_IVR (IDENT_ADDR + GAMMA_BIAS + 0x38e000220UL)
#define T2_HAE_3 (IDENT_ADDR + GAMMA_BIAS + 0x38e000240UL) #define T2_HAE_3 (IDENT_ADDR + GAMMA_BIAS + 0x38e000240UL)
#define T2_HAE_4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000260UL) #define T2_HAE_4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000260UL)
/* The CSRs below are T3/T4 only */
#define T2_WBASE3 (IDENT_ADDR + GAMMA_BIAS + 0x38e000280UL)
#define T2_WMASK3 (IDENT_ADDR + GAMMA_BIAS + 0x38e0002a0UL)
#define T2_TBASE3 (IDENT_ADDR + GAMMA_BIAS + 0x38e0002c0UL)
#define T2_TDR0 (IDENT_ADDR + GAMMA_BIAS + 0x38e000300UL)
#define T2_TDR1 (IDENT_ADDR + GAMMA_BIAS + 0x38e000320UL)
#define T2_TDR2 (IDENT_ADDR + GAMMA_BIAS + 0x38e000340UL)
#define T2_TDR3 (IDENT_ADDR + GAMMA_BIAS + 0x38e000360UL)
#define T2_TDR4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000380UL)
#define T2_TDR5 (IDENT_ADDR + GAMMA_BIAS + 0x38e0003a0UL)
#define T2_TDR6 (IDENT_ADDR + GAMMA_BIAS + 0x38e0003c0UL)
#define T2_TDR7 (IDENT_ADDR + GAMMA_BIAS + 0x38e0003e0UL)
#define T2_WBASE4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000400UL)
#define T2_WMASK4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000420UL)
#define T2_TBASE4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000440UL)
#define T2_AIR (IDENT_ADDR + GAMMA_BIAS + 0x38e000460UL)
#define T2_VAR (IDENT_ADDR + GAMMA_BIAS + 0x38e000480UL)
#define T2_DIR (IDENT_ADDR + GAMMA_BIAS + 0x38e0004a0UL)
#define T2_ICE (IDENT_ADDR + GAMMA_BIAS + 0x38e0004c0UL)
#define T2_HAE_ADDRESS T2_HAE_1 #define T2_HAE_ADDRESS T2_HAE_1
/* T2 CSRs are in the non-cachable primary IO space from 3.8000.0000 to /* T2 CSRs are in the non-cachable primary IO space from 3.8000.0000 to
...@@ -100,6 +125,9 @@ ...@@ -100,6 +125,9 @@
#define T2_CPU1_BASE (IDENT_ADDR + GAMMA_BIAS + 0x381000000L) #define T2_CPU1_BASE (IDENT_ADDR + GAMMA_BIAS + 0x381000000L)
#define T2_CPU2_BASE (IDENT_ADDR + GAMMA_BIAS + 0x382000000L) #define T2_CPU2_BASE (IDENT_ADDR + GAMMA_BIAS + 0x382000000L)
#define T2_CPU3_BASE (IDENT_ADDR + GAMMA_BIAS + 0x383000000L) #define T2_CPU3_BASE (IDENT_ADDR + GAMMA_BIAS + 0x383000000L)
#define T2_CPUn_BASE(n) (T2_CPU0_BASE + (((n)&3) * 0x001000000L))
#define T2_MEM0_BASE (IDENT_ADDR + GAMMA_BIAS + 0x388000000L) #define T2_MEM0_BASE (IDENT_ADDR + GAMMA_BIAS + 0x388000000L)
#define T2_MEM1_BASE (IDENT_ADDR + GAMMA_BIAS + 0x389000000L) #define T2_MEM1_BASE (IDENT_ADDR + GAMMA_BIAS + 0x389000000L)
#define T2_MEM2_BASE (IDENT_ADDR + GAMMA_BIAS + 0x38a000000L) #define T2_MEM2_BASE (IDENT_ADDR + GAMMA_BIAS + 0x38a000000L)
...@@ -408,87 +436,120 @@ __EXTERN_INLINE void t2_outl(u32 b, unsigned long addr) ...@@ -408,87 +436,120 @@ __EXTERN_INLINE void t2_outl(u32 b, unsigned long addr)
set_hae(msb); \ set_hae(msb); \
} }
static spinlock_t t2_hae_lock = SPIN_LOCK_UNLOCKED;
__EXTERN_INLINE u8 t2_readb(unsigned long addr) __EXTERN_INLINE u8 t2_readb(unsigned long addr)
{ {
unsigned long result, msb; unsigned long result, msb;
unsigned long flags;
spin_lock_irqsave(&t2_hae_lock, flags);
t2_set_hae; t2_set_hae;
result = *(vip) ((addr << 5) + T2_SPARSE_MEM + 0x00); result = *(vip) ((addr << 5) + T2_SPARSE_MEM + 0x00);
spin_unlock_irqrestore(&t2_hae_lock, flags);
return __kernel_extbl(result, addr & 3); return __kernel_extbl(result, addr & 3);
} }
__EXTERN_INLINE u16 t2_readw(unsigned long addr) __EXTERN_INLINE u16 t2_readw(unsigned long addr)
{ {
unsigned long result, msb; unsigned long result, msb;
unsigned long flags;
spin_lock_irqsave(&t2_hae_lock, flags);
t2_set_hae; t2_set_hae;
result = *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x08); result = *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x08);
spin_unlock_irqrestore(&t2_hae_lock, flags);
return __kernel_extwl(result, addr & 3); return __kernel_extwl(result, addr & 3);
} }
/* On SABLE with T2, we must use SPARSE memory even for 32-bit access. */ /*
* On SABLE with T2, we must use SPARSE memory even for 32-bit access,
* because we cannot access all of DENSE without changing its HAE.
*/
__EXTERN_INLINE u32 t2_readl(unsigned long addr) __EXTERN_INLINE u32 t2_readl(unsigned long addr)
{ {
unsigned long msb; unsigned long result, msb;
unsigned long flags;
spin_lock_irqsave(&t2_hae_lock, flags);
t2_set_hae; t2_set_hae;
return *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x18); result = *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x18);
spin_unlock_irqrestore(&t2_hae_lock, flags);
return result & 0xffffffffUL;
} }
__EXTERN_INLINE u64 t2_readq(unsigned long addr) __EXTERN_INLINE u64 t2_readq(unsigned long addr)
{ {
unsigned long r0, r1, work, msb; unsigned long r0, r1, work, msb;
unsigned long flags;
spin_lock_irqsave(&t2_hae_lock, flags);
t2_set_hae; t2_set_hae;
work = (addr << 5) + T2_SPARSE_MEM + 0x18; work = (addr << 5) + T2_SPARSE_MEM + 0x18;
r0 = *(vuip)(work); r0 = *(vuip)(work);
r1 = *(vuip)(work + (4 << 5)); r1 = *(vuip)(work + (4 << 5));
spin_unlock_irqrestore(&t2_hae_lock, flags);
return r1 << 32 | r0; return r1 << 32 | r0;
} }
__EXTERN_INLINE void t2_writeb(u8 b, unsigned long addr) __EXTERN_INLINE void t2_writeb(u8 b, unsigned long addr)
{ {
unsigned long msb, w; unsigned long msb, w;
unsigned long flags;
spin_lock_irqsave(&t2_hae_lock, flags);
t2_set_hae; t2_set_hae;
w = __kernel_insbl(b, addr & 3); w = __kernel_insbl(b, addr & 3);
*(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x00) = w; *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x00) = w;
spin_unlock_irqrestore(&t2_hae_lock, flags);
} }
__EXTERN_INLINE void t2_writew(u16 b, unsigned long addr) __EXTERN_INLINE void t2_writew(u16 b, unsigned long addr)
{ {
unsigned long msb, w; unsigned long msb, w;
unsigned long flags;
spin_lock_irqsave(&t2_hae_lock, flags);
t2_set_hae; t2_set_hae;
w = __kernel_inswl(b, addr & 3); w = __kernel_inswl(b, addr & 3);
*(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x08) = w; *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x08) = w;
spin_unlock_irqrestore(&t2_hae_lock, flags);
} }
/* On SABLE with T2, we must use SPARSE memory even for 32-bit access. */ /*
* On SABLE with T2, we must use SPARSE memory even for 32-bit access,
* because we cannot access all of DENSE without changing its HAE.
*/
__EXTERN_INLINE void t2_writel(u32 b, unsigned long addr) __EXTERN_INLINE void t2_writel(u32 b, unsigned long addr)
{ {
unsigned long msb; unsigned long msb;
unsigned long flags;
spin_lock_irqsave(&t2_hae_lock, flags);
t2_set_hae; t2_set_hae;
*(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x18) = b; *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x18) = b;
spin_unlock_irqrestore(&t2_hae_lock, flags);
} }
__EXTERN_INLINE void t2_writeq(u64 b, unsigned long addr) __EXTERN_INLINE void t2_writeq(u64 b, unsigned long addr)
{ {
unsigned long msb, work; unsigned long msb, work;
unsigned long flags;
spin_lock_irqsave(&t2_hae_lock, flags);
t2_set_hae; t2_set_hae;
work = (addr << 5) + T2_SPARSE_MEM + 0x18; work = (addr << 5) + T2_SPARSE_MEM + 0x18;
*(vuip)work = b; *(vuip)work = b;
*(vuip)(work + (4 << 5)) = b >> 32; *(vuip)(work + (4 << 5)) = b >> 32;
spin_unlock_irqrestore(&t2_hae_lock, flags);
} }
__EXTERN_INLINE unsigned long t2_ioremap(unsigned long addr, __EXTERN_INLINE unsigned long t2_ioremap(unsigned long addr,
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
# define NR_IRQS 40 # define NR_IRQS 40
#elif defined(CONFIG_ALPHA_DP264) || \ #elif defined(CONFIG_ALPHA_DP264) || \
defined(CONFIG_ALPHA_LYNX) || \
defined(CONFIG_ALPHA_SHARK) || \ defined(CONFIG_ALPHA_SHARK) || \
defined(CONFIG_ALPHA_EIGER) defined(CONFIG_ALPHA_EIGER)
# define NR_IRQS 64 # define NR_IRQS 64
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment