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