2 * This file is provided under a dual BSD/GPLv2 license. When using or
3 * redistributing this file, you may do so under either license.
7 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of version 2 of the GNU General Public License as
11 * published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
21 * The full GNU General Public License is included in this distribution
22 * in the file called LICENSE.GPL.
26 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
27 * All rights reserved.
29 * Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions
33 * * Redistributions of source code must retain the above copyright
34 * notice, this list of conditions and the following disclaimer.
35 * * Redistributions in binary form must reproduce the above copyright
36 * notice, this list of conditions and the following disclaimer in
37 * the documentation and/or other materials provided with the
39 * * Neither the name of Intel Corporation nor the names of its
40 * contributors may be used to endorse or promote products derived
41 * from this software without specific prior written permission.
43 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
44 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
45 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
46 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
47 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
48 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
49 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
50 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
51 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
52 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
53 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
56 #ifndef _SCIC_SDS_USER_PARAMETERS_H_
57 #define _SCIC_SDS_USER_PARAMETERS_H_
59 #include "probe_roms.h"
61 struct scic_sds_controller
;
66 * SCIC_SDS_PARM_PHY_SPEED These constants define the speeds utilized for a
69 #define SCIC_SDS_PARM_NO_SPEED 0
74 * This value of 1 indicates generation 1 (i.e. 1.5 Gb/s).
76 #define SCIC_SDS_PARM_GEN1_SPEED 1
81 * This value of 2 indicates generation 2 (i.e. 3.0 Gb/s).
83 #define SCIC_SDS_PARM_GEN2_SPEED 2
88 * This value of 3 indicates generation 3 (i.e. 6.0 Gb/s).
90 #define SCIC_SDS_PARM_GEN3_SPEED 3
95 * For range checks, the max speed generation
97 #define SCIC_SDS_PARM_MAX_SPEED SCIC_SDS_PARM_GEN3_SPEED
100 * struct scic_sds_user_parameters - This structure delineates the various user
101 * parameters that can be changed by the core user.
105 struct scic_sds_user_parameters
{
106 struct sci_phy_user_params
{
108 * This field specifies the NOTIFY (ENABLE SPIN UP) primitive
109 * insertion frequency for this phy index.
111 u32 notify_enable_spin_up_insertion_frequency
;
114 * This method specifies the number of transmitted DWORDs within which
115 * to transmit a single ALIGN primitive. This value applies regardless
116 * of what type of device is attached or connection state. A value of
117 * 0 indicates that no ALIGN primitives will be inserted.
119 u16 align_insertion_frequency
;
122 * This method specifies the number of transmitted DWORDs within which
123 * to transmit 2 ALIGN primitives. This applies for SAS connections
124 * only. A minimum value of 3 is required for this field.
126 u16 in_connection_align_insertion_frequency
;
129 * This field indicates the maximum speed generation to be utilized
130 * by phys in the supplied port.
131 * - A value of 1 indicates generation 1 (i.e. 1.5 Gb/s).
132 * - A value of 2 indicates generation 2 (i.e. 3.0 Gb/s).
133 * - A value of 3 indicates generation 3 (i.e. 6.0 Gb/s).
135 u8 max_speed_generation
;
137 } phys
[SCI_MAX_PHYS
];
140 * This field specifies the maximum number of direct attached devices
141 * that can have power supplied to them simultaneously.
143 u8 max_number_concurrent_device_spin_up
;
146 * This field specifies the number of seconds to allow a phy to consume
147 * power before yielding to another phy.
150 u8 phy_spin_up_delay_interval
;
153 * These timer values specifies how long a link will remain open with no
154 * activity in increments of a microsecond, it can be in increments of
155 * 100 microseconds if the upper most bit is set.
158 u16 stp_inactivity_timeout
;
159 u16 ssp_inactivity_timeout
;
162 * These timer values specifies how long a link will remain open in increments
163 * of 100 microseconds.
166 u16 stp_max_occupancy_timeout
;
167 u16 ssp_max_occupancy_timeout
;
170 * This timer value specifies how long a link will remain open with no
171 * outbound traffic in increments of a microsecond.
174 u8 no_outbound_task_timeout
;
179 * This structure/union specifies the various different user parameter sets
180 * available. Each type is specific to a hardware controller version.
182 * union scic_user_parameters
184 union scic_user_parameters
{
186 * This field specifies the user parameters specific to the
187 * Storage Controller Unit (SCU) Driver Standard (SDS) version
190 struct scic_sds_user_parameters sds1
;
198 * SCIC_SDS_OEM_PHY_MASK These constants define the valid values for phy_mask
204 * This is the min value assignable to a port's phy mask
206 #define SCIC_SDS_PARM_PHY_MASK_MIN 0x0
211 * This is the max value assignable to a port's phy mask
213 #define SCIC_SDS_PARM_PHY_MASK_MAX 0xF
215 #define MAX_CONCURRENT_DEVICE_SPIN_UP_COUNT 4
218 * This structure/union specifies the various different OEM parameter sets
219 * available. Each type is specific to a hardware controller version.
221 * union scic_oem_parameters
223 union scic_oem_parameters
{
225 * This field specifies the OEM parameters specific to the
226 * Storage Controller Unit (SCU) Driver Standard (SDS) version
229 struct scic_sds_oem_params sds1
;
232 int scic_oem_parameters_validate(struct scic_sds_oem_params
*oem
);
235 * scic_oem_parameters_get() - This method allows the user to retreive the OEM
236 * parameters utilized by the controller.
237 * @controller: This parameter specifies the controller on which to set the
239 * @oem_parameters: This parameter specifies the OEM parameters object in which
240 * to write the core's OEM parameters.
243 void scic_oem_parameters_get(
244 struct scic_sds_controller
*controller
,
245 union scic_oem_parameters
*oem_parameters
);
248 #endif /* _SCIC_SDS_USER_PARAMETERS_H_ */