18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef __ALPHA_MACHVEC_H 38c2ecf20Sopenharmony_ci#define __ALPHA_MACHVEC_H 1 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <linux/types.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci/* 88c2ecf20Sopenharmony_ci * This file gets pulled in by asm/io.h from user space. We don't 98c2ecf20Sopenharmony_ci * want most of this escaping. 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#ifdef __KERNEL__ 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci/* The following structure vectors all of the I/O and IRQ manipulation 158c2ecf20Sopenharmony_ci from the generic kernel to the hardware specific backend. */ 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_cistruct task_struct; 188c2ecf20Sopenharmony_cistruct mm_struct; 198c2ecf20Sopenharmony_cistruct vm_area_struct; 208c2ecf20Sopenharmony_cistruct linux_hose_info; 218c2ecf20Sopenharmony_cistruct pci_dev; 228c2ecf20Sopenharmony_cistruct pci_ops; 238c2ecf20Sopenharmony_cistruct pci_controller; 248c2ecf20Sopenharmony_cistruct _alpha_agp_info; 258c2ecf20Sopenharmony_cistruct rtc_time; 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_cistruct alpha_machine_vector 288c2ecf20Sopenharmony_ci{ 298c2ecf20Sopenharmony_ci /* This "belongs" down below with the rest of the runtime 308c2ecf20Sopenharmony_ci variables, but it is convenient for entry.S if these 318c2ecf20Sopenharmony_ci two slots are at the beginning of the struct. */ 328c2ecf20Sopenharmony_ci unsigned long hae_cache; 338c2ecf20Sopenharmony_ci unsigned long *hae_register; 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci int nr_irqs; 368c2ecf20Sopenharmony_ci int rtc_port; 378c2ecf20Sopenharmony_ci int rtc_boot_cpu_only; 388c2ecf20Sopenharmony_ci unsigned int max_asn; 398c2ecf20Sopenharmony_ci unsigned long max_isa_dma_address; 408c2ecf20Sopenharmony_ci unsigned long irq_probe_mask; 418c2ecf20Sopenharmony_ci unsigned long iack_sc; 428c2ecf20Sopenharmony_ci unsigned long min_io_address; 438c2ecf20Sopenharmony_ci unsigned long min_mem_address; 448c2ecf20Sopenharmony_ci unsigned long pci_dac_offset; 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci void (*mv_pci_tbi)(struct pci_controller *hose, 478c2ecf20Sopenharmony_ci dma_addr_t start, dma_addr_t end); 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci unsigned int (*mv_ioread8)(const void __iomem *); 508c2ecf20Sopenharmony_ci unsigned int (*mv_ioread16)(const void __iomem *); 518c2ecf20Sopenharmony_ci unsigned int (*mv_ioread32)(const void __iomem *); 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci void (*mv_iowrite8)(u8, void __iomem *); 548c2ecf20Sopenharmony_ci void (*mv_iowrite16)(u16, void __iomem *); 558c2ecf20Sopenharmony_ci void (*mv_iowrite32)(u32, void __iomem *); 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci u8 (*mv_readb)(const volatile void __iomem *); 588c2ecf20Sopenharmony_ci u16 (*mv_readw)(const volatile void __iomem *); 598c2ecf20Sopenharmony_ci u32 (*mv_readl)(const volatile void __iomem *); 608c2ecf20Sopenharmony_ci u64 (*mv_readq)(const volatile void __iomem *); 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci void (*mv_writeb)(u8, volatile void __iomem *); 638c2ecf20Sopenharmony_ci void (*mv_writew)(u16, volatile void __iomem *); 648c2ecf20Sopenharmony_ci void (*mv_writel)(u32, volatile void __iomem *); 658c2ecf20Sopenharmony_ci void (*mv_writeq)(u64, volatile void __iomem *); 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci void __iomem *(*mv_ioportmap)(unsigned long); 688c2ecf20Sopenharmony_ci void __iomem *(*mv_ioremap)(unsigned long, unsigned long); 698c2ecf20Sopenharmony_ci void (*mv_iounmap)(volatile void __iomem *); 708c2ecf20Sopenharmony_ci int (*mv_is_ioaddr)(unsigned long); 718c2ecf20Sopenharmony_ci int (*mv_is_mmio)(const volatile void __iomem *); 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci void (*mv_switch_mm)(struct mm_struct *, struct mm_struct *, 748c2ecf20Sopenharmony_ci struct task_struct *); 758c2ecf20Sopenharmony_ci void (*mv_activate_mm)(struct mm_struct *, struct mm_struct *); 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ci void (*mv_flush_tlb_current)(struct mm_struct *); 788c2ecf20Sopenharmony_ci void (*mv_flush_tlb_current_page)(struct mm_struct * mm, 798c2ecf20Sopenharmony_ci struct vm_area_struct *vma, 808c2ecf20Sopenharmony_ci unsigned long addr); 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci void (*update_irq_hw)(unsigned long, unsigned long, int); 838c2ecf20Sopenharmony_ci void (*ack_irq)(unsigned long); 848c2ecf20Sopenharmony_ci void (*device_interrupt)(unsigned long vector); 858c2ecf20Sopenharmony_ci void (*machine_check)(unsigned long vector, unsigned long la); 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ci void (*smp_callin)(void); 888c2ecf20Sopenharmony_ci void (*init_arch)(void); 898c2ecf20Sopenharmony_ci void (*init_irq)(void); 908c2ecf20Sopenharmony_ci void (*init_rtc)(void); 918c2ecf20Sopenharmony_ci void (*init_pci)(void); 928c2ecf20Sopenharmony_ci void (*kill_arch)(int); 938c2ecf20Sopenharmony_ci 948c2ecf20Sopenharmony_ci u8 (*pci_swizzle)(struct pci_dev *, u8 *); 958c2ecf20Sopenharmony_ci int (*pci_map_irq)(const struct pci_dev *, u8, u8); 968c2ecf20Sopenharmony_ci struct pci_ops *pci_ops; 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_ci struct _alpha_agp_info *(*agp_info)(void); 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci const char *vector_name; 1018c2ecf20Sopenharmony_ci 1028c2ecf20Sopenharmony_ci /* NUMA information */ 1038c2ecf20Sopenharmony_ci int (*pa_to_nid)(unsigned long); 1048c2ecf20Sopenharmony_ci int (*cpuid_to_nid)(int); 1058c2ecf20Sopenharmony_ci unsigned long (*node_mem_start)(int); 1068c2ecf20Sopenharmony_ci unsigned long (*node_mem_size)(int); 1078c2ecf20Sopenharmony_ci 1088c2ecf20Sopenharmony_ci /* System specific parameters. */ 1098c2ecf20Sopenharmony_ci union { 1108c2ecf20Sopenharmony_ci struct { 1118c2ecf20Sopenharmony_ci unsigned long gru_int_req_bits; 1128c2ecf20Sopenharmony_ci } cia; 1138c2ecf20Sopenharmony_ci 1148c2ecf20Sopenharmony_ci struct { 1158c2ecf20Sopenharmony_ci unsigned long gamma_bias; 1168c2ecf20Sopenharmony_ci } t2; 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_ci struct { 1198c2ecf20Sopenharmony_ci unsigned int route_tab; 1208c2ecf20Sopenharmony_ci } sio; 1218c2ecf20Sopenharmony_ci } sys; 1228c2ecf20Sopenharmony_ci}; 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_ciextern struct alpha_machine_vector alpha_mv; 1258c2ecf20Sopenharmony_ci 1268c2ecf20Sopenharmony_ci#ifdef CONFIG_ALPHA_GENERIC 1278c2ecf20Sopenharmony_ciextern int alpha_using_srm; 1288c2ecf20Sopenharmony_ciextern int alpha_using_qemu; 1298c2ecf20Sopenharmony_ci#else 1308c2ecf20Sopenharmony_ci# ifdef CONFIG_ALPHA_SRM 1318c2ecf20Sopenharmony_ci# define alpha_using_srm 1 1328c2ecf20Sopenharmony_ci# else 1338c2ecf20Sopenharmony_ci# define alpha_using_srm 0 1348c2ecf20Sopenharmony_ci# endif 1358c2ecf20Sopenharmony_ci# ifdef CONFIG_ALPHA_QEMU 1368c2ecf20Sopenharmony_ci# define alpha_using_qemu 1 1378c2ecf20Sopenharmony_ci# else 1388c2ecf20Sopenharmony_ci# define alpha_using_qemu 0 1398c2ecf20Sopenharmony_ci# endif 1408c2ecf20Sopenharmony_ci#endif /* GENERIC */ 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ci#endif /* __KERNEL__ */ 1438c2ecf20Sopenharmony_ci#endif /* __ALPHA_MACHVEC_H */ 144