1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun #ifndef _ASM_POWERPC_OHARE_H 3*4882a593Smuzhiyun #define _ASM_POWERPC_OHARE_H 4*4882a593Smuzhiyun #ifdef __KERNEL__ 5*4882a593Smuzhiyun /* 6*4882a593Smuzhiyun * ohare.h: definitions for using the "O'Hare" I/O controller chip. 7*4882a593Smuzhiyun * 8*4882a593Smuzhiyun * Copyright (C) 1997 Paul Mackerras. 9*4882a593Smuzhiyun * 10*4882a593Smuzhiyun * BenH: Changed to match those of heathrow (but not all of them). Please 11*4882a593Smuzhiyun * check if I didn't break anything (especially the media bay). 12*4882a593Smuzhiyun */ 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun /* offset from ohare base for feature control register */ 15*4882a593Smuzhiyun #define OHARE_MBCR 0x34 16*4882a593Smuzhiyun #define OHARE_FCR 0x38 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun /* 19*4882a593Smuzhiyun * Bits in feature control register. 20*4882a593Smuzhiyun * These were mostly derived by experiment on a powerbook 3400 21*4882a593Smuzhiyun * and may differ for other machines. 22*4882a593Smuzhiyun */ 23*4882a593Smuzhiyun #define OH_SCC_RESET 1 24*4882a593Smuzhiyun #define OH_BAY_POWER_N 2 /* a guess */ 25*4882a593Smuzhiyun #define OH_BAY_PCI_ENABLE 4 /* a guess */ 26*4882a593Smuzhiyun #define OH_BAY_IDE_ENABLE 8 27*4882a593Smuzhiyun #define OH_BAY_FLOPPY_ENABLE 0x10 28*4882a593Smuzhiyun #define OH_IDE0_ENABLE 0x20 29*4882a593Smuzhiyun #define OH_IDE0_RESET_N 0x40 /* a guess */ 30*4882a593Smuzhiyun #define OH_BAY_DEV_MASK 0x1c 31*4882a593Smuzhiyun #define OH_BAY_RESET_N 0x80 32*4882a593Smuzhiyun #define OH_IOBUS_ENABLE 0x100 /* IOBUS seems to be IDE */ 33*4882a593Smuzhiyun #define OH_SCC_ENABLE 0x200 34*4882a593Smuzhiyun #define OH_MESH_ENABLE 0x400 35*4882a593Smuzhiyun #define OH_FLOPPY_ENABLE 0x800 36*4882a593Smuzhiyun #define OH_SCCA_IO 0x4000 37*4882a593Smuzhiyun #define OH_SCCB_IO 0x8000 38*4882a593Smuzhiyun #define OH_VIA_ENABLE 0x10000 /* Is apparently wrong, to be verified */ 39*4882a593Smuzhiyun #define OH_IDE1_RESET_N 0x800000 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun /* 42*4882a593Smuzhiyun * Bits to set in the feature control register on PowerBooks. 43*4882a593Smuzhiyun */ 44*4882a593Smuzhiyun #define PBOOK_FEATURES (OH_IDE_ENABLE | OH_SCC_ENABLE | \ 45*4882a593Smuzhiyun OH_MESH_ENABLE | OH_SCCA_IO | OH_SCCB_IO) 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun /* 48*4882a593Smuzhiyun * A magic value to put into the feature control register of the 49*4882a593Smuzhiyun * "ohare" I/O controller on Starmaxes to enable the IDE CD interface. 50*4882a593Smuzhiyun * Contributed by Harry Eaton. 51*4882a593Smuzhiyun */ 52*4882a593Smuzhiyun #define STARMAX_FEATURES 0xbeff7a 53*4882a593Smuzhiyun 54*4882a593Smuzhiyun #endif /* __KERNEL__ */ 55*4882a593Smuzhiyun #endif /* _ASM_POWERPC_OHARE_H */ 56