Merge tag 'for-gkh' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
[linux/fpc-iii.git] / drivers / phy / broadcom / phy-brcm-usb-init.h
blobbb77b863885e0e1c917239f0c34d7afe2bbe9fd2
1 /*
2 * Copyright (C) 2014-2017 Broadcom
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
14 #ifndef _USB_BRCM_COMMON_INIT_H
15 #define _USB_BRCM_COMMON_INIT_H
17 #define USB_CTLR_MODE_HOST 0
18 #define USB_CTLR_MODE_DEVICE 1
19 #define USB_CTLR_MODE_DRD 2
20 #define USB_CTLR_MODE_TYPEC_PD 3
22 struct brcm_usb_init_params;
24 struct brcm_usb_init_params {
25 void __iomem *ctrl_regs;
26 void __iomem *xhci_ec_regs;
27 int ioc;
28 int ipp;
29 int mode;
30 u32 family_id;
31 u32 product_id;
32 int selected_family;
33 const char *family_name;
34 const u32 *usb_reg_bits_map;
37 void brcm_usb_set_family_map(struct brcm_usb_init_params *params);
38 int brcm_usb_init_get_dual_select(struct brcm_usb_init_params *params);
39 void brcm_usb_init_set_dual_select(struct brcm_usb_init_params *params,
40 int mode);
42 void brcm_usb_init_ipp(struct brcm_usb_init_params *ini);
43 void brcm_usb_init_common(struct brcm_usb_init_params *ini);
44 void brcm_usb_init_eohci(struct brcm_usb_init_params *ini);
45 void brcm_usb_init_xhci(struct brcm_usb_init_params *ini);
46 void brcm_usb_uninit_common(struct brcm_usb_init_params *ini);
47 void brcm_usb_uninit_eohci(struct brcm_usb_init_params *ini);
48 void brcm_usb_uninit_xhci(struct brcm_usb_init_params *ini);
50 #endif /* _USB_BRCM_COMMON_INIT_H */