0001
0002 #ifndef __ALPHA_POLARIS__H__
0003 #define __ALPHA_POLARIS__H__
0004
0005 #include <linux/types.h>
0006 #include <asm/compiler.h>
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #define POLARIS_SPARSE_MEM_BASE (IDENT_ADDR + 0xf800000000UL)
0023 #define POLARIS_DENSE_MEM_BASE (IDENT_ADDR + 0xf900000000UL)
0024 #define POLARIS_SPARSE_IO_BASE (IDENT_ADDR + 0xf980000000UL)
0025 #define POLARIS_SPARSE_CONFIG_BASE (IDENT_ADDR + 0xf9c0000000UL)
0026 #define POLARIS_IACK_BASE (IDENT_ADDR + 0xf9f8000000UL)
0027 #define POLARIS_DENSE_IO_BASE (IDENT_ADDR + 0xf9fc000000UL)
0028 #define POLARIS_DENSE_CONFIG_BASE (IDENT_ADDR + 0xf9fe000000UL)
0029
0030 #define POLARIS_IACK_SC POLARIS_IACK_BASE
0031
0032
0033
0034
0035 #define POLARIS_W_VENID (POLARIS_DENSE_CONFIG_BASE)
0036 #define POLARIS_W_DEVID (POLARIS_DENSE_CONFIG_BASE+2)
0037 #define POLARIS_W_CMD (POLARIS_DENSE_CONFIG_BASE+4)
0038 #define POLARIS_W_STATUS (POLARIS_DENSE_CONFIG_BASE+6)
0039
0040
0041
0042
0043 struct el_POLARIS_sysdata_mcheck {
0044 u_long psc_status;
0045 u_long psc_pcictl0;
0046 u_long psc_pcictl1;
0047 u_long psc_pcictl2;
0048 };
0049
0050 #ifdef __KERNEL__
0051
0052 #ifndef __EXTERN_INLINE
0053 #define __EXTERN_INLINE extern inline
0054 #define __IO_EXTERN_INLINE
0055 #endif
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074 __EXTERN_INLINE void __iomem *polaris_ioportmap(unsigned long addr)
0075 {
0076 return (void __iomem *)(addr + POLARIS_DENSE_IO_BASE);
0077 }
0078
0079 __EXTERN_INLINE void __iomem *polaris_ioremap(unsigned long addr,
0080 unsigned long size)
0081 {
0082 return (void __iomem *)(addr + POLARIS_DENSE_MEM_BASE);
0083 }
0084
0085 __EXTERN_INLINE int polaris_is_ioaddr(unsigned long addr)
0086 {
0087 return addr >= POLARIS_SPARSE_MEM_BASE;
0088 }
0089
0090 __EXTERN_INLINE int polaris_is_mmio(const volatile void __iomem *addr)
0091 {
0092 return (unsigned long)addr < POLARIS_SPARSE_IO_BASE;
0093 }
0094
0095 #undef __IO_PREFIX
0096 #define __IO_PREFIX polaris
0097 #define polaris_trivial_rw_bw 1
0098 #define polaris_trivial_rw_lq 1
0099 #define polaris_trivial_io_bw 1
0100 #define polaris_trivial_io_lq 1
0101 #define polaris_trivial_iounmap 1
0102 #include <asm/io_trivial.h>
0103
0104 #ifdef __IO_EXTERN_INLINE
0105 #undef __EXTERN_INLINE
0106 #undef __IO_EXTERN_INLINE
0107 #endif
0108
0109 #endif
0110
0111 #endif