Linux Audio

Check our new training course

Loading...
v3.1
 
  1#ifndef __ALPHA_MACHVEC_H
  2#define __ALPHA_MACHVEC_H 1
  3
  4#include <linux/types.h>
  5
  6/*
  7 *	This file gets pulled in by asm/io.h from user space. We don't
  8 *	want most of this escaping.
  9 */
 10 
 11#ifdef __KERNEL__
 12
 13/* The following structure vectors all of the I/O and IRQ manipulation
 14   from the generic kernel to the hardware specific backend.  */
 15
 16struct task_struct;
 17struct mm_struct;
 18struct vm_area_struct;
 19struct linux_hose_info;
 20struct pci_dev;
 21struct pci_ops;
 22struct pci_controller;
 23struct _alpha_agp_info;
 24struct rtc_time;
 25
 26struct alpha_machine_vector
 27{
 28	/* This "belongs" down below with the rest of the runtime
 29	   variables, but it is convenient for entry.S if these 
 30	   two slots are at the beginning of the struct.  */
 31	unsigned long hae_cache;
 32	unsigned long *hae_register;
 33
 34	int nr_irqs;
 35	int rtc_port;
 
 36	unsigned int max_asn;
 37	unsigned long max_isa_dma_address;
 38	unsigned long irq_probe_mask;
 39	unsigned long iack_sc;
 40	unsigned long min_io_address;
 41	unsigned long min_mem_address;
 42	unsigned long pci_dac_offset;
 43
 44	void (*mv_pci_tbi)(struct pci_controller *hose,
 45			   dma_addr_t start, dma_addr_t end);
 46
 47	unsigned int (*mv_ioread8)(void __iomem *);
 48	unsigned int (*mv_ioread16)(void __iomem *);
 49	unsigned int (*mv_ioread32)(void __iomem *);
 50
 51	void (*mv_iowrite8)(u8, void __iomem *);
 52	void (*mv_iowrite16)(u16, void __iomem *);
 53	void (*mv_iowrite32)(u32, void __iomem *);
 54
 55	u8 (*mv_readb)(const volatile void __iomem *);
 56	u16 (*mv_readw)(const volatile void __iomem *);
 57	u32 (*mv_readl)(const volatile void __iomem *);
 58	u64 (*mv_readq)(const volatile void __iomem *);
 59
 60	void (*mv_writeb)(u8, volatile void __iomem *);
 61	void (*mv_writew)(u16, volatile void __iomem *);
 62	void (*mv_writel)(u32, volatile void __iomem *);
 63	void (*mv_writeq)(u64, volatile void __iomem *);
 64
 65	void __iomem *(*mv_ioportmap)(unsigned long);
 66	void __iomem *(*mv_ioremap)(unsigned long, unsigned long);
 67	void (*mv_iounmap)(volatile void __iomem *);
 68	int (*mv_is_ioaddr)(unsigned long);
 69	int (*mv_is_mmio)(const volatile void __iomem *);
 70
 71	void (*mv_switch_mm)(struct mm_struct *, struct mm_struct *,
 72			     struct task_struct *);
 73	void (*mv_activate_mm)(struct mm_struct *, struct mm_struct *);
 74
 75	void (*mv_flush_tlb_current)(struct mm_struct *);
 76	void (*mv_flush_tlb_current_page)(struct mm_struct * mm,
 77					  struct vm_area_struct *vma,
 78					  unsigned long addr);
 79
 80	void (*update_irq_hw)(unsigned long, unsigned long, int);
 81	void (*ack_irq)(unsigned long);
 82	void (*device_interrupt)(unsigned long vector);
 83	void (*machine_check)(unsigned long vector, unsigned long la);
 84
 85	void (*smp_callin)(void);
 86	void (*init_arch)(void);
 87	void (*init_irq)(void);
 88	void (*init_rtc)(void);
 89	void (*init_pci)(void);
 90	void (*kill_arch)(int);
 91
 92	u8 (*pci_swizzle)(struct pci_dev *, u8 *);
 93	int (*pci_map_irq)(struct pci_dev *, u8, u8);
 94	struct pci_ops *pci_ops;
 95
 96	struct _alpha_agp_info *(*agp_info)(void);
 97
 98	unsigned int (*rtc_get_time)(struct rtc_time *);
 99	int (*rtc_set_time)(struct rtc_time *);
100
101	const char *vector_name;
102
103	/* NUMA information */
104	int (*pa_to_nid)(unsigned long);
105	int (*cpuid_to_nid)(int);
106	unsigned long (*node_mem_start)(int);
107	unsigned long (*node_mem_size)(int);
108
109	/* System specific parameters.  */
110	union {
111	    struct {
112		unsigned long gru_int_req_bits;
113	    } cia;
114
115	    struct {
116		unsigned long gamma_bias;
117	    } t2;
118
119	    struct {
120		unsigned int route_tab;
121	    } sio;
122	} sys;
123};
124
125extern struct alpha_machine_vector alpha_mv;
126
127#ifdef CONFIG_ALPHA_GENERIC
128extern int alpha_using_srm;
 
129#else
130#ifdef CONFIG_ALPHA_SRM
131#define alpha_using_srm 1
132#else
133#define alpha_using_srm 0
134#endif
 
 
 
 
 
135#endif /* GENERIC */
136
137#endif
138#endif /* __ALPHA_MACHVEC_H */
v5.9
  1/* SPDX-License-Identifier: GPL-2.0 */
  2#ifndef __ALPHA_MACHVEC_H
  3#define __ALPHA_MACHVEC_H 1
  4
  5#include <linux/types.h>
  6
  7/*
  8 *	This file gets pulled in by asm/io.h from user space. We don't
  9 *	want most of this escaping.
 10 */
 11 
 12#ifdef __KERNEL__
 13
 14/* The following structure vectors all of the I/O and IRQ manipulation
 15   from the generic kernel to the hardware specific backend.  */
 16
 17struct task_struct;
 18struct mm_struct;
 19struct vm_area_struct;
 20struct linux_hose_info;
 21struct pci_dev;
 22struct pci_ops;
 23struct pci_controller;
 24struct _alpha_agp_info;
 25struct rtc_time;
 26
 27struct alpha_machine_vector
 28{
 29	/* This "belongs" down below with the rest of the runtime
 30	   variables, but it is convenient for entry.S if these 
 31	   two slots are at the beginning of the struct.  */
 32	unsigned long hae_cache;
 33	unsigned long *hae_register;
 34
 35	int nr_irqs;
 36	int rtc_port;
 37	int rtc_boot_cpu_only;
 38	unsigned int max_asn;
 39	unsigned long max_isa_dma_address;
 40	unsigned long irq_probe_mask;
 41	unsigned long iack_sc;
 42	unsigned long min_io_address;
 43	unsigned long min_mem_address;
 44	unsigned long pci_dac_offset;
 45
 46	void (*mv_pci_tbi)(struct pci_controller *hose,
 47			   dma_addr_t start, dma_addr_t end);
 48
 49	unsigned int (*mv_ioread8)(const void __iomem *);
 50	unsigned int (*mv_ioread16)(const void __iomem *);
 51	unsigned int (*mv_ioread32)(const void __iomem *);
 52
 53	void (*mv_iowrite8)(u8, void __iomem *);
 54	void (*mv_iowrite16)(u16, void __iomem *);
 55	void (*mv_iowrite32)(u32, void __iomem *);
 56
 57	u8 (*mv_readb)(const volatile void __iomem *);
 58	u16 (*mv_readw)(const volatile void __iomem *);
 59	u32 (*mv_readl)(const volatile void __iomem *);
 60	u64 (*mv_readq)(const volatile void __iomem *);
 61
 62	void (*mv_writeb)(u8, volatile void __iomem *);
 63	void (*mv_writew)(u16, volatile void __iomem *);
 64	void (*mv_writel)(u32, volatile void __iomem *);
 65	void (*mv_writeq)(u64, volatile void __iomem *);
 66
 67	void __iomem *(*mv_ioportmap)(unsigned long);
 68	void __iomem *(*mv_ioremap)(unsigned long, unsigned long);
 69	void (*mv_iounmap)(volatile void __iomem *);
 70	int (*mv_is_ioaddr)(unsigned long);
 71	int (*mv_is_mmio)(const volatile void __iomem *);
 72
 73	void (*mv_switch_mm)(struct mm_struct *, struct mm_struct *,
 74			     struct task_struct *);
 75	void (*mv_activate_mm)(struct mm_struct *, struct mm_struct *);
 76
 77	void (*mv_flush_tlb_current)(struct mm_struct *);
 78	void (*mv_flush_tlb_current_page)(struct mm_struct * mm,
 79					  struct vm_area_struct *vma,
 80					  unsigned long addr);
 81
 82	void (*update_irq_hw)(unsigned long, unsigned long, int);
 83	void (*ack_irq)(unsigned long);
 84	void (*device_interrupt)(unsigned long vector);
 85	void (*machine_check)(unsigned long vector, unsigned long la);
 86
 87	void (*smp_callin)(void);
 88	void (*init_arch)(void);
 89	void (*init_irq)(void);
 90	void (*init_rtc)(void);
 91	void (*init_pci)(void);
 92	void (*kill_arch)(int);
 93
 94	u8 (*pci_swizzle)(struct pci_dev *, u8 *);
 95	int (*pci_map_irq)(const struct pci_dev *, u8, u8);
 96	struct pci_ops *pci_ops;
 97
 98	struct _alpha_agp_info *(*agp_info)(void);
 99
 
 
 
100	const char *vector_name;
101
102	/* NUMA information */
103	int (*pa_to_nid)(unsigned long);
104	int (*cpuid_to_nid)(int);
105	unsigned long (*node_mem_start)(int);
106	unsigned long (*node_mem_size)(int);
107
108	/* System specific parameters.  */
109	union {
110	    struct {
111		unsigned long gru_int_req_bits;
112	    } cia;
113
114	    struct {
115		unsigned long gamma_bias;
116	    } t2;
117
118	    struct {
119		unsigned int route_tab;
120	    } sio;
121	} sys;
122};
123
124extern struct alpha_machine_vector alpha_mv;
125
126#ifdef CONFIG_ALPHA_GENERIC
127extern int alpha_using_srm;
128extern int alpha_using_qemu;
129#else
130# ifdef CONFIG_ALPHA_SRM
131#  define alpha_using_srm 1
132# else
133#  define alpha_using_srm 0
134# endif
135# ifdef CONFIG_ALPHA_QEMU
136#  define alpha_using_qemu 1
137# else
138#  define alpha_using_qemu 0
139# endif
140#endif /* GENERIC */
141
142#endif /* __KERNEL__ */
143#endif /* __ALPHA_MACHVEC_H */