Path: blob/master/arch/parisc/include/asm/hardware.h
10819 views
#ifndef _PARISC_HARDWARE_H1#define _PARISC_HARDWARE_H23#include <linux/mod_devicetable.h>4#include <asm/pdc.h>56#define HWTYPE_ANY_ID PA_HWTYPE_ANY_ID7#define HVERSION_ANY_ID PA_HVERSION_ANY_ID8#define HVERSION_REV_ANY_ID PA_HVERSION_REV_ANY_ID9#define SVERSION_ANY_ID PA_SVERSION_ANY_ID1011struct hp_hardware {12unsigned short hw_type:5; /* HPHW_xxx */13unsigned short hversion;14unsigned long sversion:28;15unsigned short opt;16const char name[80]; /* The hardware description */17};1819struct parisc_device;2021enum cpu_type {22pcx = 0, /* pa7000 pa 1.0 */23pcxs = 1, /* pa7000 pa 1.1a */24pcxt = 2, /* pa7100 pa 1.1b */25pcxt_ = 3, /* pa7200 (t') pa 1.1c */26pcxl = 4, /* pa7100lc pa 1.1d */27pcxl2 = 5, /* pa7300lc pa 1.1e */28pcxu = 6, /* pa8000 pa 2.0 */29pcxu_ = 7, /* pa8200 (u+) pa 2.0 */30pcxw = 8, /* pa8500 pa 2.0 */31pcxw_ = 9, /* pa8600 (w+) pa 2.0 */32pcxw2 = 10, /* pa8700 pa 2.0 */33mako = 11, /* pa8800 pa 2.0 */34mako2 = 12 /* pa8900 pa 2.0 */35};3637extern const char * const cpu_name_version[][2]; /* mapping from enum cpu_type to strings */3839struct parisc_driver;4041struct io_module {42volatile uint32_t nothing; /* reg 0 */43volatile uint32_t io_eim;44volatile uint32_t io_dc_adata;45volatile uint32_t io_ii_cdata;46volatile uint32_t io_dma_link; /* reg 4 */47volatile uint32_t io_dma_command;48volatile uint32_t io_dma_address;49volatile uint32_t io_dma_count;50volatile uint32_t io_flex; /* reg 8 */51volatile uint32_t io_spa_address;52volatile uint32_t reserved1[2];53volatile uint32_t io_command; /* reg 12 */54volatile uint32_t io_status;55volatile uint32_t io_control;56volatile uint32_t io_data;57volatile uint32_t reserved2; /* reg 16 */58volatile uint32_t chain_addr;59volatile uint32_t sub_mask_clr;60volatile uint32_t reserved3[13];61volatile uint32_t undefined[480];62volatile uint32_t unpriv[512];63};6465struct bc_module {66volatile uint32_t unused1[12];67volatile uint32_t io_command;68volatile uint32_t io_status;69volatile uint32_t io_control;70volatile uint32_t unused2[1];71volatile uint32_t io_err_resp;72volatile uint32_t io_err_info;73volatile uint32_t io_err_req;74volatile uint32_t unused3[11];75volatile uint32_t io_io_low;76volatile uint32_t io_io_high;77};7879#define HPHW_NPROC 080#define HPHW_MEMORY 181#define HPHW_B_DMA 282#define HPHW_OBSOLETE 383#define HPHW_A_DMA 484#define HPHW_A_DIRECT 585#define HPHW_OTHER 686#define HPHW_BCPORT 787#define HPHW_CIO 888#define HPHW_CONSOLE 989#define HPHW_FIO 1090#define HPHW_BA 1191#define HPHW_IOA 1292#define HPHW_BRIDGE 1393#define HPHW_FABRIC 1494#define HPHW_MC 1595#define HPHW_FAULTY 31969798/* hardware.c: */99extern const char *parisc_hardware_description(struct parisc_device_id *id);100extern enum cpu_type parisc_get_cpu_type(unsigned long hversion);101102struct pci_dev;103104/* drivers.c: */105extern struct parisc_device *alloc_pa_dev(unsigned long hpa,106struct hardware_path *path);107extern int register_parisc_device(struct parisc_device *dev);108extern int register_parisc_driver(struct parisc_driver *driver);109extern int count_parisc_driver(struct parisc_driver *driver);110extern int unregister_parisc_driver(struct parisc_driver *driver);111extern void walk_central_bus(void);112extern const struct parisc_device *find_pa_parent_type(const struct parisc_device *, int);113extern void print_parisc_devices(void);114extern char *print_pa_hwpath(struct parisc_device *dev, char *path);115extern char *print_pci_hwpath(struct pci_dev *dev, char *path);116extern void get_pci_node_path(struct pci_dev *dev, struct hardware_path *path);117extern void init_parisc_bus(void);118extern struct device *hwpath_to_device(struct hardware_path *modpath);119extern void device_to_hwpath(struct device *dev, struct hardware_path *path);120121122/* inventory.c: */123extern void do_memory_inventory(void);124extern void do_device_inventory(void);125126#endif /* _PARISC_HARDWARE_H */127128129