162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci#ifndef _ASM_POWERPC_OHARE_H 362306a36Sopenharmony_ci#define _ASM_POWERPC_OHARE_H 462306a36Sopenharmony_ci#ifdef __KERNEL__ 562306a36Sopenharmony_ci/* 662306a36Sopenharmony_ci * ohare.h: definitions for using the "O'Hare" I/O controller chip. 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * Copyright (C) 1997 Paul Mackerras. 962306a36Sopenharmony_ci * 1062306a36Sopenharmony_ci * BenH: Changed to match those of heathrow (but not all of them). Please 1162306a36Sopenharmony_ci * check if I didn't break anything (especially the media bay). 1262306a36Sopenharmony_ci */ 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci/* offset from ohare base for feature control register */ 1562306a36Sopenharmony_ci#define OHARE_MBCR 0x34 1662306a36Sopenharmony_ci#define OHARE_FCR 0x38 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci/* 1962306a36Sopenharmony_ci * Bits in feature control register. 2062306a36Sopenharmony_ci * These were mostly derived by experiment on a powerbook 3400 2162306a36Sopenharmony_ci * and may differ for other machines. 2262306a36Sopenharmony_ci */ 2362306a36Sopenharmony_ci#define OH_SCC_RESET 1 2462306a36Sopenharmony_ci#define OH_BAY_POWER_N 2 /* a guess */ 2562306a36Sopenharmony_ci#define OH_BAY_PCI_ENABLE 4 /* a guess */ 2662306a36Sopenharmony_ci#define OH_BAY_IDE_ENABLE 8 2762306a36Sopenharmony_ci#define OH_BAY_FLOPPY_ENABLE 0x10 2862306a36Sopenharmony_ci#define OH_IDE0_ENABLE 0x20 2962306a36Sopenharmony_ci#define OH_IDE0_RESET_N 0x40 /* a guess */ 3062306a36Sopenharmony_ci#define OH_BAY_DEV_MASK 0x1c 3162306a36Sopenharmony_ci#define OH_BAY_RESET_N 0x80 3262306a36Sopenharmony_ci#define OH_IOBUS_ENABLE 0x100 /* IOBUS seems to be IDE */ 3362306a36Sopenharmony_ci#define OH_SCC_ENABLE 0x200 3462306a36Sopenharmony_ci#define OH_MESH_ENABLE 0x400 3562306a36Sopenharmony_ci#define OH_FLOPPY_ENABLE 0x800 3662306a36Sopenharmony_ci#define OH_SCCA_IO 0x4000 3762306a36Sopenharmony_ci#define OH_SCCB_IO 0x8000 3862306a36Sopenharmony_ci#define OH_VIA_ENABLE 0x10000 /* Is apparently wrong, to be verified */ 3962306a36Sopenharmony_ci#define OH_IDE1_RESET_N 0x800000 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ci/* 4262306a36Sopenharmony_ci * Bits to set in the feature control register on PowerBooks. 4362306a36Sopenharmony_ci */ 4462306a36Sopenharmony_ci#define PBOOK_FEATURES (OH_IDE_ENABLE | OH_SCC_ENABLE | \ 4562306a36Sopenharmony_ci OH_MESH_ENABLE | OH_SCCA_IO | OH_SCCB_IO) 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci/* 4862306a36Sopenharmony_ci * A magic value to put into the feature control register of the 4962306a36Sopenharmony_ci * "ohare" I/O controller on Starmaxes to enable the IDE CD interface. 5062306a36Sopenharmony_ci * Contributed by Harry Eaton. 5162306a36Sopenharmony_ci */ 5262306a36Sopenharmony_ci#define STARMAX_FEATURES 0xbeff7a 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ci#endif /* __KERNEL__ */ 5562306a36Sopenharmony_ci#endif /* _ASM_POWERPC_OHARE_H */ 56