···11-/*22- * This file is provided under a dual BSD/GPLv2 license. When using or33- * redistributing this file, you may do so under either license.44- *55- * GPL LICENSE SUMMARY66- *77- * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.88- *99- * This program is free software; you can redistribute it and/or modify1010- * it under the terms of version 2 of the GNU General Public License as1111- * published by the Free Software Foundation.1212- *1313- * This program is distributed in the hope that it will be useful, but1414- * WITHOUT ANY WARRANTY; without even the implied warranty of1515- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU1616- * General Public License for more details.1717- *1818- * You should have received a copy of the GNU General Public License1919- * along with this program; if not, write to the Free Software2020- * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.2121- * The full GNU General Public License is included in this distribution2222- * in the file called LICENSE.GPL.2323- *2424- * BSD LICENSE2525- *2626- * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.2727- * All rights reserved.2828- *2929- * Redistribution and use in source and binary forms, with or without3030- * modification, are permitted provided that the following conditions3131- * are met:3232- *3333- * * Redistributions of source code must retain the above copyright3434- * notice, this list of conditions and the following disclaimer.3535- * * Redistributions in binary form must reproduce the above copyright3636- * notice, this list of conditions and the following disclaimer in3737- * the documentation and/or other materials provided with the3838- * distribution.3939- * * Neither the name of Intel Corporation nor the names of its4040- * contributors may be used to endorse or promote products derived4141- * from this software without specific prior written permission.4242- *4343- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS4444- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT4545- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR4646- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT4747- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,4848- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT4949- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,5050- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY5151- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT5252- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE5353- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.5454- */5555-5656-#ifndef _SCIC_SDS_PORT_REGISTERS_H_5757-#define _SCIC_SDS_PORT_REGISTERS_H_5858-5959-/**6060- * This file contains a set of macros that assist in reading the SCU hardware6161- * registers.6262- *6363- *6464- */6565-6666-#endif /* _SCIC_SDS_PORT_REGISTERS_H_ */
···11-/*22- * This file is provided under a dual BSD/GPLv2 license. When using or33- * redistributing this file, you may do so under either license.44- *55- * GPL LICENSE SUMMARY66- *77- * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.88- *99- * This program is free software; you can redistribute it and/or modify1010- * it under the terms of version 2 of the GNU General Public License as1111- * published by the Free Software Foundation.1212- *1313- * This program is distributed in the hope that it will be useful, but1414- * WITHOUT ANY WARRANTY; without even the implied warranty of1515- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU1616- * General Public License for more details.1717- *1818- * You should have received a copy of the GNU General Public License1919- * along with this program; if not, write to the Free Software2020- * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.2121- * The full GNU General Public License is included in this distribution2222- * in the file called LICENSE.GPL.2323- *2424- * BSD LICENSE2525- *2626- * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.2727- * All rights reserved.2828- *2929- * Redistribution and use in source and binary forms, with or without3030- * modification, are permitted provided that the following conditions3131- * are met:3232- *3333- * * Redistributions of source code must retain the above copyright3434- * notice, this list of conditions and the following disclaimer.3535- * * Redistributions in binary form must reproduce the above copyright3636- * notice, this list of conditions and the following disclaimer in3737- * the documentation and/or other materials provided with the3838- * distribution.3939- * * Neither the name of Intel Corporation nor the names of its4040- * contributors may be used to endorse or promote products derived4141- * from this software without specific prior written permission.4242- *4343- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS4444- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT4545- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR4646- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT4747- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,4848- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT4949- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,5050- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY5151- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT5252- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE5353- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.5454- */5555-5656-#ifndef _SCU_VIIT_DATA_HEADER_5757-#define _SCU_VIIT_DATA_HEADER_5858-5959-/**6060- * This file contains the constants and structures for the SCU hardware VIIT6161- * table entries.6262- *6363- *6464- */6565-6666-6767-#define SCU_VIIT_ENTRY_ID_MASK (0xC0000000)6868-#define SCU_VIIT_ENTRY_ID_SHIFT (30)6969-7070-#define SCU_VIIT_ENTRY_FUNCTION_MASK (0x0FF00000)7171-#define SCU_VIIT_ENTRY_FUNCTION_SHIFT (20)7272-7373-#define SCU_VIIT_ENTRY_IPPTMODE_MASK (0x0001F800)7474-#define SCU_VIIT_ENTRY_IPPTMODE_SHIFT (12)7575-7676-#define SCU_VIIT_ENTRY_LPVIE_MASK (0x00000F00)7777-#define SCU_VIIT_ENTRY_LPVIE_SHIFT (8)7878-7979-#define SCU_VIIT_ENTRY_STATUS_MASK (0x000000FF)8080-#define SCU_VIIT_ENTRY_STATUS_SHIFT (0)8181-8282-#define SCU_VIIT_ENTRY_ID_INVALID (0 << SCU_VIIT_ENTRY_ID_SHIFT)8383-#define SCU_VIIT_ENTRY_ID_VIIT (1 << SCU_VIIT_ENTRY_ID_SHIFT)8484-#define SCU_VIIT_ENTRY_ID_IIT (2 << SCU_VIIT_ENTRY_ID_SHIFT)8585-#define SCU_VIIT_ENTRY_ID_VIRT_EXP (3 << SCU_VIIT_ENTRY_ID_SHIFT)8686-8787-#define SCU_VIIT_IPPT_SSP_INITIATOR (0x01 << SCU_VIIT_ENTRY_IPPTMODE_SHIFT)8888-#define SCU_VIIT_IPPT_SMP_INITIATOR (0x02 << SCU_VIIT_ENTRY_IPPTMODE_SHIFT)8989-#define SCU_VIIT_IPPT_STP_INITIATOR (0x04 << SCU_VIIT_ENTRY_IPPTMODE_SHIFT)9090-#define SCU_VIIT_IPPT_INITIATOR \9191- (\9292- SCU_VIIT_IPPT_SSP_INITIATOR \9393- | SCU_VIIT_IPPT_SMP_INITIATOR \9494- | SCU_VIIT_IPPT_STP_INITIATOR \9595- )9696-9797-#define SCU_VIIT_STATUS_RNC_VALID (0x01 << SCU_VIIT_ENTRY_STATUS_SHIFT)9898-#define SCU_VIIT_STATUS_ADDRESS_VALID (0x02 << SCU_VIIT_ENTRY_STATUS_SHIFT)9999-#define SCU_VIIT_STATUS_RNI_VALID (0x04 << SCU_VIIT_ENTRY_STATUS_SHIFT)100100-#define SCU_VIIT_STATUS_ALL_VALID \101101- (\102102- SCU_VIIT_STATUS_RNC_VALID \103103- | SCU_VIIT_STATUS_ADDRESS_VALID \104104- | SCU_VIIT_STATUS_RNI_VALID \105105- )106106-107107-#define SCU_VIIT_IPPT_SMP_TARGET (0x10 << SCU_VIIT_ENTRY_IPPTMODE_SHIFT)108108-109109-/**110110- * struct scu_viit_entry - This is the SCU Virtual Initiator Table Entry111111- *112112- *113113- */114114-struct scu_viit_entry {115115- /**116116- * This must be encoded as to the type of initiator that is being constructed117117- * for this port.118118- */119119- u32 status;120120-121121- /**122122- * Virtual initiator high SAS Address123123- */124124- u32 initiator_sas_address_hi;125125-126126- /**127127- * Virtual initiator low SAS Address128128- */129129- u32 initiator_sas_address_lo;130130-131131- /**132132- * This must be 0133133- */134134- u32 reserved;135135-136136-};137137-138138-139139-/* IIT Status Defines */140140-#define SCU_IIT_ENTRY_ID_MASK (0xC0000000)141141-#define SCU_IIT_ENTRY_ID_SHIFT (30)142142-143143-#define SCU_IIT_ENTRY_STATUS_UPDATE_MASK (0x20000000)144144-#define SCU_IIT_ENTRY_STATUS_UPDATE_SHIFT (29)145145-146146-#define SCU_IIT_ENTRY_LPI_MASK (0x00000F00)147147-#define SCU_IIT_ENTRY_LPI_SHIFT (8)148148-149149-#define SCU_IIT_ENTRY_STATUS_MASK (0x000000FF)150150-#define SCU_IIT_ENTRY_STATUS_SHIFT (0)151151-152152-/* IIT Remote Initiator Defines */153153-#define SCU_IIT_ENTRY_REMOTE_TAG_MASK (0x0000FFFF)154154-#define SCU_IIT_ENTRY_REMOTE_TAG_SHIFT (0)155155-156156-#define SCU_IIT_ENTRY_REMOTE_RNC_MASK (0x0FFF0000)157157-#define SCU_IIT_ENTRY_REMOTE_RNC_SHIFT (16)158158-159159-#define SCU_IIT_ENTRY_ID_INVALID (0 << SCU_IIT_ENTRY_ID_SHIFT)160160-#define SCU_IIT_ENTRY_ID_VIIT (1 << SCU_IIT_ENTRY_ID_SHIFT)161161-#define SCU_IIT_ENTRY_ID_IIT (2 << SCU_IIT_ENTRY_ID_SHIFT)162162-#define SCU_IIT_ENTRY_ID_VIRT_EXP (3 << SCU_IIT_ENTRY_ID_SHIFT)163163-164164-/**165165- * struct scu_iit_entry - This will be implemented later when we support166166- * virtual functions167167- *168168- *169169- */170170-struct scu_iit_entry {171171- u32 status;172172- u32 remote_initiator_sas_address_hi;173173- u32 remote_initiator_sas_address_lo;174174- u32 remote_initiator;175175-176176-};177177-178178-#endif /* _SCU_VIIT_DATA_HEADER_ */