18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef _ASM_PARISC_ROPES_H_
38c2ecf20Sopenharmony_ci#define _ASM_PARISC_ROPES_H_
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <asm/parisc-device.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#ifdef CONFIG_64BIT
88c2ecf20Sopenharmony_ci/* "low end" PA8800 machines use ZX1 chipset: PAT PDC and only run 64-bit */
98c2ecf20Sopenharmony_ci#define ZX1_SUPPORT
108c2ecf20Sopenharmony_ci#endif
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#ifdef CONFIG_PROC_FS
138c2ecf20Sopenharmony_ci/* depends on proc fs support. But costs CPU performance */
148c2ecf20Sopenharmony_ci#undef SBA_COLLECT_STATS
158c2ecf20Sopenharmony_ci#endif
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci/*
188c2ecf20Sopenharmony_ci** The number of pdir entries to "free" before issuing
198c2ecf20Sopenharmony_ci** a read to PCOM register to flush out PCOM writes.
208c2ecf20Sopenharmony_ci** Interacts with allocation granularity (ie 4 or 8 entries
218c2ecf20Sopenharmony_ci** allocated and free'd/purged at a time might make this
228c2ecf20Sopenharmony_ci** less interesting).
238c2ecf20Sopenharmony_ci*/
248c2ecf20Sopenharmony_ci#define DELAYED_RESOURCE_CNT	16
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci#define MAX_IOC		2	/* per Ike. Pluto/Astro only have 1. */
278c2ecf20Sopenharmony_ci#define ROPES_PER_IOC	8	/* per Ike half or Pluto/Astro */
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_cistruct ioc {
308c2ecf20Sopenharmony_ci	void __iomem	*ioc_hpa;	/* I/O MMU base address */
318c2ecf20Sopenharmony_ci	char		*res_map;	/* resource map, bit == pdir entry */
328c2ecf20Sopenharmony_ci	u64		*pdir_base;	/* physical base address */
338c2ecf20Sopenharmony_ci	unsigned long	ibase;		/* pdir IOV Space base - shared w/lba_pci */
348c2ecf20Sopenharmony_ci	unsigned long	imask;		/* pdir IOV Space mask - shared w/lba_pci */
358c2ecf20Sopenharmony_ci#ifdef ZX1_SUPPORT
368c2ecf20Sopenharmony_ci	unsigned long	iovp_mask;	/* help convert IOVA to IOVP */
378c2ecf20Sopenharmony_ci#endif
388c2ecf20Sopenharmony_ci	unsigned long	*res_hint;	/* next avail IOVP - circular search */
398c2ecf20Sopenharmony_ci	spinlock_t	res_lock;
408c2ecf20Sopenharmony_ci	unsigned int	res_bitshift;	/* from the LEFT! */
418c2ecf20Sopenharmony_ci	unsigned int	res_size;	/* size of resource map in bytes */
428c2ecf20Sopenharmony_ci#ifdef SBA_HINT_SUPPORT
438c2ecf20Sopenharmony_ci/* FIXME : DMA HINTs not used */
448c2ecf20Sopenharmony_ci	unsigned long	hint_mask_pdir; /* bits used for DMA hints */
458c2ecf20Sopenharmony_ci	unsigned int	hint_shift_pdir;
468c2ecf20Sopenharmony_ci#endif
478c2ecf20Sopenharmony_ci#if DELAYED_RESOURCE_CNT > 0
488c2ecf20Sopenharmony_ci	int		saved_cnt;
498c2ecf20Sopenharmony_ci	struct sba_dma_pair {
508c2ecf20Sopenharmony_ci			dma_addr_t	iova;
518c2ecf20Sopenharmony_ci			size_t		size;
528c2ecf20Sopenharmony_ci        } saved[DELAYED_RESOURCE_CNT];
538c2ecf20Sopenharmony_ci#endif
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci#ifdef SBA_COLLECT_STATS
568c2ecf20Sopenharmony_ci#define SBA_SEARCH_SAMPLE	0x100
578c2ecf20Sopenharmony_ci	unsigned long	avg_search[SBA_SEARCH_SAMPLE];
588c2ecf20Sopenharmony_ci	unsigned long	avg_idx;	/* current index into avg_search */
598c2ecf20Sopenharmony_ci	unsigned long	used_pages;
608c2ecf20Sopenharmony_ci	unsigned long	msingle_calls;
618c2ecf20Sopenharmony_ci	unsigned long	msingle_pages;
628c2ecf20Sopenharmony_ci	unsigned long	msg_calls;
638c2ecf20Sopenharmony_ci	unsigned long	msg_pages;
648c2ecf20Sopenharmony_ci	unsigned long	usingle_calls;
658c2ecf20Sopenharmony_ci	unsigned long	usingle_pages;
668c2ecf20Sopenharmony_ci	unsigned long	usg_calls;
678c2ecf20Sopenharmony_ci	unsigned long	usg_pages;
688c2ecf20Sopenharmony_ci#endif
698c2ecf20Sopenharmony_ci        /* STUFF We don't need in performance path */
708c2ecf20Sopenharmony_ci	unsigned int	pdir_size;	/* in bytes, determined by IOV Space size */
718c2ecf20Sopenharmony_ci};
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_cistruct sba_device {
748c2ecf20Sopenharmony_ci	struct sba_device	*next;  /* list of SBA's in system */
758c2ecf20Sopenharmony_ci	struct parisc_device	*dev;   /* dev found in bus walk */
768c2ecf20Sopenharmony_ci	const char		*name;
778c2ecf20Sopenharmony_ci	void __iomem		*sba_hpa; /* base address */
788c2ecf20Sopenharmony_ci	spinlock_t		sba_lock;
798c2ecf20Sopenharmony_ci	unsigned int		flags;  /* state/functionality enabled */
808c2ecf20Sopenharmony_ci	unsigned int		hw_rev;  /* HW revision of chip */
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ci	struct resource		chip_resv; /* MMIO reserved for chip */
838c2ecf20Sopenharmony_ci	struct resource		iommu_resv; /* MMIO reserved for iommu */
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ci	unsigned int		num_ioc;  /* number of on-board IOC's */
868c2ecf20Sopenharmony_ci	struct ioc		ioc[MAX_IOC];
878c2ecf20Sopenharmony_ci};
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ci/* list of SBA's in system, see drivers/parisc/sba_iommu.c */
908c2ecf20Sopenharmony_ciextern struct sba_device *sba_list;
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ci#define ASTRO_RUNWAY_PORT	0x582
938c2ecf20Sopenharmony_ci#define IKE_MERCED_PORT		0x803
948c2ecf20Sopenharmony_ci#define REO_MERCED_PORT		0x804
958c2ecf20Sopenharmony_ci#define REOG_MERCED_PORT	0x805
968c2ecf20Sopenharmony_ci#define PLUTO_MCKINLEY_PORT	0x880
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_cistatic inline int IS_ASTRO(struct parisc_device *d) {
998c2ecf20Sopenharmony_ci	return d->id.hversion == ASTRO_RUNWAY_PORT;
1008c2ecf20Sopenharmony_ci}
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_cistatic inline int IS_IKE(struct parisc_device *d) {
1038c2ecf20Sopenharmony_ci	return d->id.hversion == IKE_MERCED_PORT;
1048c2ecf20Sopenharmony_ci}
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_cistatic inline int IS_PLUTO(struct parisc_device *d) {
1078c2ecf20Sopenharmony_ci	return d->id.hversion == PLUTO_MCKINLEY_PORT;
1088c2ecf20Sopenharmony_ci}
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ci#define PLUTO_IOVA_BASE	(1UL*1024*1024*1024)	/* 1GB */
1118c2ecf20Sopenharmony_ci#define PLUTO_IOVA_SIZE	(1UL*1024*1024*1024)	/* 1GB */
1128c2ecf20Sopenharmony_ci#define PLUTO_GART_SIZE	(PLUTO_IOVA_SIZE / 2)
1138c2ecf20Sopenharmony_ci
1148c2ecf20Sopenharmony_ci#define SBA_PDIR_VALID_BIT	0x8000000000000000ULL
1158c2ecf20Sopenharmony_ci
1168c2ecf20Sopenharmony_ci#define SBA_AGPGART_COOKIE	0x0000badbadc0ffeeULL
1178c2ecf20Sopenharmony_ci
1188c2ecf20Sopenharmony_ci#define SBA_FUNC_ID	0x0000	/* function id */
1198c2ecf20Sopenharmony_ci#define SBA_FCLASS	0x0008	/* function class, bist, header, rev... */
1208c2ecf20Sopenharmony_ci
1218c2ecf20Sopenharmony_ci#define SBA_FUNC_SIZE 4096   /* SBA configuration function reg set */
1228c2ecf20Sopenharmony_ci
1238c2ecf20Sopenharmony_ci#define ASTRO_IOC_OFFSET	(32 * SBA_FUNC_SIZE)
1248c2ecf20Sopenharmony_ci#define PLUTO_IOC_OFFSET	(1 * SBA_FUNC_SIZE)
1258c2ecf20Sopenharmony_ci/* Ike's IOC's occupy functions 2 and 3 */
1268c2ecf20Sopenharmony_ci#define IKE_IOC_OFFSET(p)	((p+2) * SBA_FUNC_SIZE)
1278c2ecf20Sopenharmony_ci
1288c2ecf20Sopenharmony_ci#define IOC_CTRL          0x8	/* IOC_CTRL offset */
1298c2ecf20Sopenharmony_ci#define IOC_CTRL_TC       (1 << 0) /* TOC Enable */
1308c2ecf20Sopenharmony_ci#define IOC_CTRL_CE       (1 << 1) /* Coalesce Enable */
1318c2ecf20Sopenharmony_ci#define IOC_CTRL_DE       (1 << 2) /* Dillon Enable */
1328c2ecf20Sopenharmony_ci#define IOC_CTRL_RM       (1 << 8) /* Real Mode */
1338c2ecf20Sopenharmony_ci#define IOC_CTRL_NC       (1 << 9) /* Non Coherent Mode */
1348c2ecf20Sopenharmony_ci#define IOC_CTRL_D4       (1 << 11) /* Disable 4-byte coalescing */
1358c2ecf20Sopenharmony_ci#define IOC_CTRL_DD       (1 << 13) /* Disable distr. LMMIO range coalescing */
1368c2ecf20Sopenharmony_ci
1378c2ecf20Sopenharmony_ci/*
1388c2ecf20Sopenharmony_ci** Offsets into MBIB (Function 0 on Ike and hopefully Astro)
1398c2ecf20Sopenharmony_ci** Firmware programs this stuff. Don't touch it.
1408c2ecf20Sopenharmony_ci*/
1418c2ecf20Sopenharmony_ci#define LMMIO_DIRECT0_BASE  0x300
1428c2ecf20Sopenharmony_ci#define LMMIO_DIRECT0_MASK  0x308
1438c2ecf20Sopenharmony_ci#define LMMIO_DIRECT0_ROUTE 0x310
1448c2ecf20Sopenharmony_ci
1458c2ecf20Sopenharmony_ci#define LMMIO_DIST_BASE  0x360
1468c2ecf20Sopenharmony_ci#define LMMIO_DIST_MASK  0x368
1478c2ecf20Sopenharmony_ci#define LMMIO_DIST_ROUTE 0x370
1488c2ecf20Sopenharmony_ci
1498c2ecf20Sopenharmony_ci#define IOS_DIST_BASE	0x390
1508c2ecf20Sopenharmony_ci#define IOS_DIST_MASK	0x398
1518c2ecf20Sopenharmony_ci#define IOS_DIST_ROUTE	0x3A0
1528c2ecf20Sopenharmony_ci
1538c2ecf20Sopenharmony_ci#define IOS_DIRECT_BASE	0x3C0
1548c2ecf20Sopenharmony_ci#define IOS_DIRECT_MASK	0x3C8
1558c2ecf20Sopenharmony_ci#define IOS_DIRECT_ROUTE 0x3D0
1568c2ecf20Sopenharmony_ci
1578c2ecf20Sopenharmony_ci/*
1588c2ecf20Sopenharmony_ci** Offsets into I/O TLB (Function 2 and 3 on Ike)
1598c2ecf20Sopenharmony_ci*/
1608c2ecf20Sopenharmony_ci#define ROPE0_CTL	0x200  /* "regbus pci0" */
1618c2ecf20Sopenharmony_ci#define ROPE1_CTL	0x208
1628c2ecf20Sopenharmony_ci#define ROPE2_CTL	0x210
1638c2ecf20Sopenharmony_ci#define ROPE3_CTL	0x218
1648c2ecf20Sopenharmony_ci#define ROPE4_CTL	0x220
1658c2ecf20Sopenharmony_ci#define ROPE5_CTL	0x228
1668c2ecf20Sopenharmony_ci#define ROPE6_CTL	0x230
1678c2ecf20Sopenharmony_ci#define ROPE7_CTL	0x238
1688c2ecf20Sopenharmony_ci
1698c2ecf20Sopenharmony_ci#define IOC_ROPE0_CFG	0x500	/* pluto only */
1708c2ecf20Sopenharmony_ci#define   IOC_ROPE_AO	  0x10	/* Allow "Relaxed Ordering" */
1718c2ecf20Sopenharmony_ci
1728c2ecf20Sopenharmony_ci#define HF_ENABLE	0x40
1738c2ecf20Sopenharmony_ci
1748c2ecf20Sopenharmony_ci#define IOC_IBASE	0x300	/* IO TLB */
1758c2ecf20Sopenharmony_ci#define IOC_IMASK	0x308
1768c2ecf20Sopenharmony_ci#define IOC_PCOM	0x310
1778c2ecf20Sopenharmony_ci#define IOC_TCNFG	0x318
1788c2ecf20Sopenharmony_ci#define IOC_PDIR_BASE	0x320
1798c2ecf20Sopenharmony_ci
1808c2ecf20Sopenharmony_ci/*
1818c2ecf20Sopenharmony_ci** IOC supports 4/8/16/64KB page sizes (see TCNFG register)
1828c2ecf20Sopenharmony_ci** It's safer (avoid memory corruption) to keep DMA page mappings
1838c2ecf20Sopenharmony_ci** equivalently sized to VM PAGE_SIZE.
1848c2ecf20Sopenharmony_ci**
1858c2ecf20Sopenharmony_ci** We really can't avoid generating a new mapping for each
1868c2ecf20Sopenharmony_ci** page since the Virtual Coherence Index has to be generated
1878c2ecf20Sopenharmony_ci** and updated for each page.
1888c2ecf20Sopenharmony_ci**
1898c2ecf20Sopenharmony_ci** PAGE_SIZE could be greater than IOVP_SIZE. But not the inverse.
1908c2ecf20Sopenharmony_ci*/
1918c2ecf20Sopenharmony_ci#define IOVP_SIZE	PAGE_SIZE
1928c2ecf20Sopenharmony_ci#define IOVP_SHIFT	PAGE_SHIFT
1938c2ecf20Sopenharmony_ci#define IOVP_MASK	PAGE_MASK
1948c2ecf20Sopenharmony_ci
1958c2ecf20Sopenharmony_ci#define SBA_PERF_CFG	0x708	/* Performance Counter stuff */
1968c2ecf20Sopenharmony_ci#define SBA_PERF_MASK1	0x718
1978c2ecf20Sopenharmony_ci#define SBA_PERF_MASK2	0x730
1988c2ecf20Sopenharmony_ci
1998c2ecf20Sopenharmony_ci/*
2008c2ecf20Sopenharmony_ci** Offsets into PCI Performance Counters (functions 12 and 13)
2018c2ecf20Sopenharmony_ci** Controlled by PERF registers in function 2 & 3 respectively.
2028c2ecf20Sopenharmony_ci*/
2038c2ecf20Sopenharmony_ci#define SBA_PERF_CNT1	0x200
2048c2ecf20Sopenharmony_ci#define SBA_PERF_CNT2	0x208
2058c2ecf20Sopenharmony_ci#define SBA_PERF_CNT3	0x210
2068c2ecf20Sopenharmony_ci
2078c2ecf20Sopenharmony_ci/*
2088c2ecf20Sopenharmony_ci** lba_device: Per instance Elroy data structure
2098c2ecf20Sopenharmony_ci*/
2108c2ecf20Sopenharmony_cistruct lba_device {
2118c2ecf20Sopenharmony_ci	struct pci_hba_data	hba;
2128c2ecf20Sopenharmony_ci
2138c2ecf20Sopenharmony_ci	spinlock_t		lba_lock;
2148c2ecf20Sopenharmony_ci	void			*iosapic_obj;
2158c2ecf20Sopenharmony_ci
2168c2ecf20Sopenharmony_ci#ifdef CONFIG_64BIT
2178c2ecf20Sopenharmony_ci	void __iomem		*iop_base;	/* PA_VIEW - for IO port accessor funcs */
2188c2ecf20Sopenharmony_ci#endif
2198c2ecf20Sopenharmony_ci
2208c2ecf20Sopenharmony_ci	int			flags;		/* state/functionality enabled */
2218c2ecf20Sopenharmony_ci	int			hw_rev;		/* HW revision of chip */
2228c2ecf20Sopenharmony_ci};
2238c2ecf20Sopenharmony_ci
2248c2ecf20Sopenharmony_ci#define ELROY_HVERS		0x782
2258c2ecf20Sopenharmony_ci#define MERCURY_HVERS		0x783
2268c2ecf20Sopenharmony_ci#define QUICKSILVER_HVERS	0x784
2278c2ecf20Sopenharmony_ci
2288c2ecf20Sopenharmony_cistatic inline int IS_ELROY(struct parisc_device *d) {
2298c2ecf20Sopenharmony_ci	return (d->id.hversion == ELROY_HVERS);
2308c2ecf20Sopenharmony_ci}
2318c2ecf20Sopenharmony_ci
2328c2ecf20Sopenharmony_cistatic inline int IS_MERCURY(struct parisc_device *d) {
2338c2ecf20Sopenharmony_ci	return (d->id.hversion == MERCURY_HVERS);
2348c2ecf20Sopenharmony_ci}
2358c2ecf20Sopenharmony_ci
2368c2ecf20Sopenharmony_cistatic inline int IS_QUICKSILVER(struct parisc_device *d) {
2378c2ecf20Sopenharmony_ci	return (d->id.hversion == QUICKSILVER_HVERS);
2388c2ecf20Sopenharmony_ci}
2398c2ecf20Sopenharmony_ci
2408c2ecf20Sopenharmony_cistatic inline int agp_mode_mercury(void __iomem *hpa) {
2418c2ecf20Sopenharmony_ci	u64 bus_mode;
2428c2ecf20Sopenharmony_ci
2438c2ecf20Sopenharmony_ci	bus_mode = readl(hpa + 0x0620);
2448c2ecf20Sopenharmony_ci	if (bus_mode & 1)
2458c2ecf20Sopenharmony_ci		return 1;
2468c2ecf20Sopenharmony_ci
2478c2ecf20Sopenharmony_ci	return 0;
2488c2ecf20Sopenharmony_ci}
2498c2ecf20Sopenharmony_ci
2508c2ecf20Sopenharmony_ci/*
2518c2ecf20Sopenharmony_ci** I/O SAPIC init function
2528c2ecf20Sopenharmony_ci** Caller knows where an I/O SAPIC is. LBA has an integrated I/O SAPIC.
2538c2ecf20Sopenharmony_ci** Call setup as part of per instance initialization.
2548c2ecf20Sopenharmony_ci** (ie *not* init_module() function unless only one is present.)
2558c2ecf20Sopenharmony_ci** fixup_irq is to initialize PCI IRQ line support and
2568c2ecf20Sopenharmony_ci** virtualize pcidev->irq value. To be called by pci_fixup_bus().
2578c2ecf20Sopenharmony_ci*/
2588c2ecf20Sopenharmony_ciextern void *iosapic_register(unsigned long hpa);
2598c2ecf20Sopenharmony_ciextern int iosapic_fixup_irq(void *obj, struct pci_dev *pcidev);
2608c2ecf20Sopenharmony_ci
2618c2ecf20Sopenharmony_ci#define LBA_FUNC_ID	0x0000	/* function id */
2628c2ecf20Sopenharmony_ci#define LBA_FCLASS	0x0008	/* function class, bist, header, rev... */
2638c2ecf20Sopenharmony_ci#define LBA_CAPABLE	0x0030	/* capabilities register */
2648c2ecf20Sopenharmony_ci
2658c2ecf20Sopenharmony_ci#define LBA_PCI_CFG_ADDR	0x0040	/* poke CFG address here */
2668c2ecf20Sopenharmony_ci#define LBA_PCI_CFG_DATA	0x0048	/* read or write data here */
2678c2ecf20Sopenharmony_ci
2688c2ecf20Sopenharmony_ci#define LBA_PMC_MTLT	0x0050	/* Firmware sets this - read only. */
2698c2ecf20Sopenharmony_ci#define LBA_FW_SCRATCH	0x0058	/* Firmware writes the PCI bus number here. */
2708c2ecf20Sopenharmony_ci#define LBA_ERROR_ADDR	0x0070	/* On error, address gets logged here */
2718c2ecf20Sopenharmony_ci
2728c2ecf20Sopenharmony_ci#define LBA_ARB_MASK	0x0080	/* bit 0 enable arbitration. PAT/PDC enables */
2738c2ecf20Sopenharmony_ci#define LBA_ARB_PRI	0x0088	/* firmware sets this. */
2748c2ecf20Sopenharmony_ci#define LBA_ARB_MODE	0x0090	/* firmware sets this. */
2758c2ecf20Sopenharmony_ci#define LBA_ARB_MTLT	0x0098	/* firmware sets this. */
2768c2ecf20Sopenharmony_ci
2778c2ecf20Sopenharmony_ci#define LBA_MOD_ID	0x0100	/* Module ID. PDC_PAT_CELL reports 4 */
2788c2ecf20Sopenharmony_ci
2798c2ecf20Sopenharmony_ci#define LBA_STAT_CTL	0x0108	/* Status & Control */
2808c2ecf20Sopenharmony_ci#define   LBA_BUS_RESET		0x01	/*  Deassert PCI Bus Reset Signal */
2818c2ecf20Sopenharmony_ci#define   CLEAR_ERRLOG		0x10	/*  "Clear Error Log" cmd */
2828c2ecf20Sopenharmony_ci#define   CLEAR_ERRLOG_ENABLE	0x20	/*  "Clear Error Log" Enable */
2838c2ecf20Sopenharmony_ci#define   HF_ENABLE	0x40	/*    enable HF mode (default is -1 mode) */
2848c2ecf20Sopenharmony_ci
2858c2ecf20Sopenharmony_ci#define LBA_LMMIO_BASE	0x0200	/* < 4GB I/O address range */
2868c2ecf20Sopenharmony_ci#define LBA_LMMIO_MASK	0x0208
2878c2ecf20Sopenharmony_ci
2888c2ecf20Sopenharmony_ci#define LBA_GMMIO_BASE	0x0210	/* > 4GB I/O address range */
2898c2ecf20Sopenharmony_ci#define LBA_GMMIO_MASK	0x0218
2908c2ecf20Sopenharmony_ci
2918c2ecf20Sopenharmony_ci#define LBA_WLMMIO_BASE	0x0220	/* All < 4GB ranges under the same *SBA* */
2928c2ecf20Sopenharmony_ci#define LBA_WLMMIO_MASK	0x0228
2938c2ecf20Sopenharmony_ci
2948c2ecf20Sopenharmony_ci#define LBA_WGMMIO_BASE	0x0230	/* All > 4GB ranges under the same *SBA* */
2958c2ecf20Sopenharmony_ci#define LBA_WGMMIO_MASK	0x0238
2968c2ecf20Sopenharmony_ci
2978c2ecf20Sopenharmony_ci#define LBA_IOS_BASE	0x0240	/* I/O port space for this LBA */
2988c2ecf20Sopenharmony_ci#define LBA_IOS_MASK	0x0248
2998c2ecf20Sopenharmony_ci
3008c2ecf20Sopenharmony_ci#define LBA_ELMMIO_BASE	0x0250	/* Extra LMMIO range */
3018c2ecf20Sopenharmony_ci#define LBA_ELMMIO_MASK	0x0258
3028c2ecf20Sopenharmony_ci
3038c2ecf20Sopenharmony_ci#define LBA_EIOS_BASE	0x0260	/* Extra I/O port space */
3048c2ecf20Sopenharmony_ci#define LBA_EIOS_MASK	0x0268
3058c2ecf20Sopenharmony_ci
3068c2ecf20Sopenharmony_ci#define LBA_GLOBAL_MASK	0x0270	/* Mercury only: Global Address Mask */
3078c2ecf20Sopenharmony_ci#define LBA_DMA_CTL	0x0278	/* firmware sets this */
3088c2ecf20Sopenharmony_ci
3098c2ecf20Sopenharmony_ci#define LBA_IBASE	0x0300	/* SBA DMA support */
3108c2ecf20Sopenharmony_ci#define LBA_IMASK	0x0308
3118c2ecf20Sopenharmony_ci
3128c2ecf20Sopenharmony_ci/* FIXME: ignore DMA Hint stuff until we can measure performance */
3138c2ecf20Sopenharmony_ci#define LBA_HINT_CFG	0x0310
3148c2ecf20Sopenharmony_ci#define LBA_HINT_BASE	0x0380	/* 14 registers at every 8 bytes. */
3158c2ecf20Sopenharmony_ci
3168c2ecf20Sopenharmony_ci#define LBA_BUS_MODE	0x0620
3178c2ecf20Sopenharmony_ci
3188c2ecf20Sopenharmony_ci/* ERROR regs are needed for config cycle kluges */
3198c2ecf20Sopenharmony_ci#define LBA_ERROR_CONFIG 0x0680
3208c2ecf20Sopenharmony_ci#define     LBA_SMART_MODE 0x20
3218c2ecf20Sopenharmony_ci#define LBA_ERROR_STATUS 0x0688
3228c2ecf20Sopenharmony_ci#define LBA_ROPE_CTL     0x06A0
3238c2ecf20Sopenharmony_ci
3248c2ecf20Sopenharmony_ci#define LBA_IOSAPIC_BASE	0x800 /* Offset of IRQ logic */
3258c2ecf20Sopenharmony_ci
3268c2ecf20Sopenharmony_ci#endif /*_ASM_PARISC_ROPES_H_*/
327