1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22 /* 23 * Copyright (c) 2009-2012 Emulex. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 28 /* 29 * Header file containing the definitions specific to 30 * SLI4 hardware 31 */ 32 33 #ifndef _OCE_SLI4_H_ 34 #define _OCE_SLI4_H_ 35 36 /* SLI_INTF */ 37 #define SLI_INTF_REG_OFFSET 0x58 38 #define SLI_INTF_VALID_MASK 0xE0000000 39 #define SLI_INTF_VALID 0xC0000000 40 #define SLI_INTF_HINT2_MASK 0x1F000000 41 #define SLI_INTF_HINT2_SHIFT 24 42 #define SLI_INTF_HINT1_MASK 0x00FF0000 43 #define SLI_INTF_HINT1_SHIFT 16 44 #define SLI_INTF_FAMILY_MASK 0x00000F00 45 #define SLI_INTF_FAMILY_SHIFT 8 46 #define SLI_INTF_IF_TYPE_MASK 0x0000F000 47 #define SLI_INTF_IF_TYPE_SHIFT 12 48 #define SLI_INTF_REV_MASK 0x000000F0 49 #define SLI_INTF_REV_SHIFT 4 50 #define SLI_INTF_FT_MASK 0x00000001 51 52 /* SLI family */ 53 #define BE_SLI_FAMILY 0x0 54 #define LANCER_A0_SLI_FAMILY 0xA 55 56 #define LANCER_A0_CHIP(device) \ 57 (device->sli_family == LANCER_A0_SLI_FAMILY) 58 59 /* Lancer SLIPORT_CONTROL SLIPORT_STATUS registers */ 60 #define SLIPORT_STATUS_OFFSET 0x404 61 #define SLIPORT_CONTROL_OFFSET 0x408 62 63 #define SLIPORT_STATUS_ERR_MASK 0x80000000 64 #define SLIPORT_STATUS_RN_MASK 0x01000000 65 #define SLIPORT_STATUS_RDY_MASK 0x00800000 66 #define SLI_PORT_CONTROL_IP_MASK 0x08000000 67 #define LANCER_IP_RESET \ 68 (OCE_DB_WRITE32(dev, SLIPORT_CONTROL_OFFSET, SLI_PORT_CONTROL_IP_MASK)) 69 70 /* Lancer POST offset in DB BAR */ 71 #define MPU_EP_SEMAPHORE_IF_TYPE2_OFFSET 0x400 72 #define EP_SEMAPHORE_POST_STAGE_MASK 0x0000FFFF 73 #define EP_SEMAPHORE_POST_ERR_MASK 0x1 74 #define EP_SEMAPHORE_POST_ERR_SHIFT 31 75 76 /* Lancer POST Timeout */ 77 #define SLIPORT_READY_TIMEOUT 500 78 79 #endif /* _OCE_SLI4_H_ */