18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef _ASM_POWERPC_OHARE_H
38c2ecf20Sopenharmony_ci#define _ASM_POWERPC_OHARE_H
48c2ecf20Sopenharmony_ci#ifdef __KERNEL__
58c2ecf20Sopenharmony_ci/*
68c2ecf20Sopenharmony_ci * ohare.h: definitions for using the "O'Hare" I/O controller chip.
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci * Copyright (C) 1997 Paul Mackerras.
98c2ecf20Sopenharmony_ci *
108c2ecf20Sopenharmony_ci * BenH: Changed to match those of heathrow (but not all of them). Please
118c2ecf20Sopenharmony_ci *       check if I didn't break anything (especially the media bay).
128c2ecf20Sopenharmony_ci */
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci/* offset from ohare base for feature control register */
158c2ecf20Sopenharmony_ci#define OHARE_MBCR	0x34
168c2ecf20Sopenharmony_ci#define OHARE_FCR	0x38
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci/*
198c2ecf20Sopenharmony_ci * Bits in feature control register.
208c2ecf20Sopenharmony_ci * These were mostly derived by experiment on a powerbook 3400
218c2ecf20Sopenharmony_ci * and may differ for other machines.
228c2ecf20Sopenharmony_ci */
238c2ecf20Sopenharmony_ci#define OH_SCC_RESET		1
248c2ecf20Sopenharmony_ci#define OH_BAY_POWER_N		2	/* a guess */
258c2ecf20Sopenharmony_ci#define OH_BAY_PCI_ENABLE	4	/* a guess */
268c2ecf20Sopenharmony_ci#define OH_BAY_IDE_ENABLE	8
278c2ecf20Sopenharmony_ci#define OH_BAY_FLOPPY_ENABLE	0x10
288c2ecf20Sopenharmony_ci#define OH_IDE0_ENABLE		0x20
298c2ecf20Sopenharmony_ci#define OH_IDE0_RESET_N		0x40	/* a guess */
308c2ecf20Sopenharmony_ci#define OH_BAY_DEV_MASK		0x1c
318c2ecf20Sopenharmony_ci#define OH_BAY_RESET_N		0x80
328c2ecf20Sopenharmony_ci#define OH_IOBUS_ENABLE		0x100	/* IOBUS seems to be IDE */
338c2ecf20Sopenharmony_ci#define OH_SCC_ENABLE		0x200
348c2ecf20Sopenharmony_ci#define OH_MESH_ENABLE		0x400
358c2ecf20Sopenharmony_ci#define OH_FLOPPY_ENABLE	0x800
368c2ecf20Sopenharmony_ci#define OH_SCCA_IO		0x4000
378c2ecf20Sopenharmony_ci#define OH_SCCB_IO		0x8000
388c2ecf20Sopenharmony_ci#define OH_VIA_ENABLE		0x10000	/* Is apparently wrong, to be verified */
398c2ecf20Sopenharmony_ci#define OH_IDE1_RESET_N		0x800000
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci/*
428c2ecf20Sopenharmony_ci * Bits to set in the feature control register on PowerBooks.
438c2ecf20Sopenharmony_ci */
448c2ecf20Sopenharmony_ci#define PBOOK_FEATURES		(OH_IDE_ENABLE | OH_SCC_ENABLE | \
458c2ecf20Sopenharmony_ci				 OH_MESH_ENABLE | OH_SCCA_IO | OH_SCCB_IO)
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci/*
488c2ecf20Sopenharmony_ci * A magic value to put into the feature control register of the
498c2ecf20Sopenharmony_ci * "ohare" I/O controller on Starmaxes to enable the IDE CD interface.
508c2ecf20Sopenharmony_ci * Contributed by Harry Eaton.
518c2ecf20Sopenharmony_ci */
528c2ecf20Sopenharmony_ci#define STARMAX_FEATURES	0xbeff7a
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci#endif /* __KERNEL__ */
558c2ecf20Sopenharmony_ci#endif /* _ASM_POWERPC_OHARE_H */
56