1 // SPDX-License-Identifier: GPL-2.0+ 2 /* 3 * usb_c67x00.h: platform definitions for the Cypress C67X00 USB chip 4 * 5 * Copyright (C) 2006-2008 Barco N.V. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 20 * MA 02110-1301 USA. 21 */ 22 23 #ifndef _LINUX_USB_C67X00_H 24 #define _LINUX_USB_C67X00_H 25 26 /* SIE configuration */ 27 #define C67X00_SIE_UNUSED 0 28 #define C67X00_SIE_HOST 1 29 #define C67X00_SIE_PERIPHERAL_A 2 /* peripheral on A port */ 30 #define C67X00_SIE_PERIPHERAL_B 3 /* peripheral on B port */ 31 32 #define c67x00_sie_config(config, n) (((config)>>(4*(n)))&0x3) 33 34 #define C67X00_SIE1_UNUSED (C67X00_SIE_UNUSED << 0) 35 #define C67X00_SIE1_HOST (C67X00_SIE_HOST << 0) 36 #define C67X00_SIE1_PERIPHERAL_A (C67X00_SIE_PERIPHERAL_A << 0) 37 #define C67X00_SIE1_PERIPHERAL_B (C67X00_SIE_PERIPHERAL_B << 0) 38 39 #define C67X00_SIE2_UNUSED (C67X00_SIE_UNUSED << 4) 40 #define C67X00_SIE2_HOST (C67X00_SIE_HOST << 4) 41 #define C67X00_SIE2_PERIPHERAL_A (C67X00_SIE_PERIPHERAL_A << 4) 42 #define C67X00_SIE2_PERIPHERAL_B (C67X00_SIE_PERIPHERAL_B << 4) 43 44 struct c67x00_platform_data { 45 int sie_config; /* SIEs config (C67X00_SIEx_*) */ 46 unsigned long hpi_regstep; /* Step between HPI registers */ 47 }; 48 49 #endif /* _LINUX_USB_C67X00_H */ 50