1/* ********************************************************************* 2 * Broadcom Common Firmware Environment (CFE) 3 * 4 * IDE disk driver File: dev_ide.h 5 * 6 * Probe constants for the IDE disk device. Various flags 7 * can be passed to the probe routine to configure various 8 * things. This is where they are defined. 9 * 10 * Author: Mitch Lichtenberg 11 * 12 ********************************************************************* 13 * 14 * Copyright 2000,2001,2002,2003 15 * Broadcom Corporation. All rights reserved. 16 * 17 * This software is furnished under license and may be used and 18 * copied only in accordance with the following terms and 19 * conditions. Subject to these conditions, you may download, 20 * copy, install, use, modify and distribute modified or unmodified 21 * copies of this software in source and/or binary form. No title 22 * or ownership is transferred hereby. 23 * 24 * 1) Any source code used, modified or distributed must reproduce 25 * and retain this copyright notice and list of conditions 26 * as they appear in the source file. 27 * 28 * 2) No right is granted to use any trade name, trademark, or 29 * logo of Broadcom Corporation. The "Broadcom Corporation" 30 * name may not be used to endorse or promote products derived 31 * from this software without the prior written permission of 32 * Broadcom Corporation. 33 * 34 * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR 35 * IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED 36 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 37 * PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT 38 * SHALL BROADCOM BE LIABLE FOR ANY DAMAGES WHATSOEVER, AND IN 39 * PARTICULAR, BROADCOM SHALL NOT BE LIABLE FOR DIRECT, INDIRECT, 40 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 41 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 42 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 43 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 44 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 45 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE), EVEN IF ADVISED OF 46 * THE POSSIBILITY OF SUCH DAMAGE. 47 ********************************************************************* */ 48 49 50/* ********************************************************************* 51 * Constants 52 ********************************************************************* */ 53 54/* 55 * Use the macros below to set the type of the master and slave devices 56 * on the IDE bus. If you want automatic probing, then you need 57 * to specify that IDE_DEV_TYPE_AUTO as the device type. 58 */ 59 60 61/* 62 * XXX: If you have more than one PCI IDE controller 63 * installed, this will be applied to all installed 64 * controllers. Clearly not right, we'll need to add 65 * a field here for a controller index. 66 */ 67 68 69#define IDE_PROBE_TYPE_MASK 0x0F 70#define IDE_PROBE_MASTER_SHIFT 0 71#define IDE_PROBE_SLAVE_SHIFT 4 72 73#define IDE_PROBE_MASTER_TYPE(x) ((x) << IDE_PROBE_MASTER_SHIFT) 74#define IDE_PROBE_SLAVE_TYPE(x) ((x) << IDE_PROBE_SLAVE_SHIFT) 75 76#define IDE_PROBE_GET_TYPE(pb,unit) (((pb) >> (unit*4)) & IDE_PROBE_TYPE_MASK) 77 78/* 79 * Device types. 80 */ 81 82#define IDE_DEVTYPE_NOPROBE 0 /* none */ 83#define IDE_DEVTYPE_AUTO 0x0F /* automatically probe */ 84 85#define IDE_DEVTYPE_DISK 1 /* hard drives */ 86#define IDE_DEVTYPE_CDROM 2 /* CD-ROMs */ 87#define IDE_DEVTYPE_ATAPIDISK 3 /* ZIP disks, etc. */ 88 89 90 91