sunxi-hci.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. /**
  2. * drivers/usb/host/sunxi_hci.h
  3. * (C) Copyright 2010-2015
  4. * Allwinner Technology Co., Ltd. <www.allwinnertech.com>
  5. * yangnaitian, 2011-5-24, create this file
  6. *
  7. * Include file for SUNXI HCI Host Controller Driver
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. */
  15. #ifndef __SUNXI_HCI_SUNXI_H__
  16. #define __SUNXI_HCI_SUNXI_H__
  17. //#include <linux/delay.h>
  18. //#include <linux/types.h>
  19. //
  20. //#include <linux/io.h>
  21. //#include <linux/irq.h>
  22. //#include <linux/of_gpio.h>
  23. //#include <linux/sunxi-gpio.h>
  24. //
  25. //#include <log.h>
  26. //
  27. //#include <linux/pm_wakeirq.h>
  28. //#include <linux/regulator/consumer.h>
  29. #include <platform_usb.h>
  30. #include <usb_os_platform.h>
  31. #include <stdlib.h>
  32. #include <hal_clk.h>
  33. extern int usb_disabled(void);
  34. #if defined(CONFIG_AW_AXP)
  35. extern s32 axp_usb_vbus_output(int high);
  36. #endif
  37. #define DMSG_ERR(format, args...) pr_err("hci: "format, ##args)
  38. #define DMSG_PRINT(stuff...) printk(stuff)
  39. #define HCI_USBC_NO "hci_ctrl_no"
  40. #define HCI0_USBC_NO 0
  41. #define HCI1_USBC_NO 1
  42. #define HCI2_USBC_NO 2
  43. #define HCI3_USBC_NO 3
  44. //static uint32_t hci_irq_num[] =
  45. //{
  46. // SUNXI_USB_EHCI0_IRQ,
  47. // SUNXI_USB_EHCI1_IRQ,
  48. //};
  49. #define STANDBY_TIMEOUT 30000
  50. /*
  51. * Support Low-power mode USB standby.
  52. */
  53. #if defined(CONFIG_ARCH_SUN8IW15) || defined(CONFIG_ARCH_SUN50IW9) \
  54. || defined(CONFIG_ARCH_SUN50IW10)
  55. #define SUNXI_USB_STANDBY_LOW_POW_MODE
  56. #endif
  57. /*no cpus*/
  58. #if defined(CONFIG_ARCH_SUN50IW9) || defined(CONFIG_ARCH_SUN50IW10)
  59. #define SUNXI_USB_STANDBY_NEW_MODE
  60. #endif
  61. #if 0
  62. #define DMSG_DEBUG DMSG_PRINT
  63. #else
  64. #define DMSG_DEBUG(...)
  65. #endif
  66. #if 1
  67. #define DMSG_INFO DMSG_PRINT
  68. #else
  69. #define DMSG_INFO(...)
  70. #endif
  71. #if 1
  72. #define DMSG_PANIC DMSG_ERR
  73. #else
  74. #define DMSG_PANIC(...)
  75. #endif
  76. #define USBC_Readb(reg) (*((volatile unsigned char *)(long)(reg)))
  77. #define USBC_Readw(reg) (*((volatile unsigned short *)(reg)))
  78. #define USBC_Readl(reg) (*((volatile unsigned int *)(long)(reg)))
  79. #define USBC_Writeb(value, reg) (*((volatile unsigned char *)(long)(reg)) = (unsigned char)(value))
  80. #define USBC_Writew(value, reg) (*((volatile unsigned short *)(reg)) = (unsigned short)(value))
  81. #define USBC_Writel(value, reg) (*((volatile unsigned int *)(long)(reg)) = (unsigned int)(value))
  82. #define USBC_REG_test_bit_b(bp, reg) (USBC_Readb(reg) & (1 << (bp)))
  83. #define USBC_REG_test_bit_w(bp, reg) (USBC_Readw(reg) & (1 << (bp)))
  84. #define USBC_REG_test_bit_l(bp, reg) (USBC_Readl(reg) & (1 << (bp)))
  85. #define USBC_REG_set_bit_b(bp, reg) (USBC_Writeb((USBC_Readb(reg) | (1 << (bp))), (reg)))
  86. #define USBC_REG_set_bit_w(bp, reg) (USBC_Writew((USBC_Readw(reg) | (1 << (bp))), (reg)))
  87. #define USBC_REG_set_bit_l(bp, reg) (USBC_Writel((USBC_Readl(reg) | (1 << (bp))), (reg)))
  88. #define USBC_REG_clear_bit_b(bp, reg) (USBC_Writeb((USBC_Readb(reg) & (~(1 << (bp)))), (reg)))
  89. #define USBC_REG_clear_bit_w(bp, reg) (USBC_Writew((USBC_Readw(reg) & (~(1 << (bp)))), (reg)))
  90. #define USBC_REG_clear_bit_l(bp, reg) (USBC_Writel((USBC_Readl(reg) & (~(1 << (bp)))), (reg)))
  91. #define SUNXI_USB_EHCI_BASE_OFFSET 0x00
  92. #define SUNXI_USB_OHCI_BASE_OFFSET 0x400
  93. #define SUNXI_USB_EHCI_LEN 0x58
  94. #define SUNXI_USB_OHCI_LEN 0x58
  95. #define SUNXI_USB_EHCI_TIME_INT 0x30
  96. #define SUNXI_USB_EHCI_STANDBY_IRQ_STATUS 1
  97. #define SUNXI_USB_EHCI_STANDBY_IRQ 2
  98. #define SUNXI_USB_PMU_IRQ_ENABLE 0x800
  99. #define SUNXI_HCI_CTRL_3 0X808
  100. #define SUNXI_HCI_PHY_CTRL 0x810
  101. #define SUNXI_HCI_PHY_TUNE 0x818
  102. #define SUNXI_HCI_UTMI_PHY_STATUS 0x824
  103. #define SUNXI_HCI_CTRL_3_REMOTE_WAKEUP 3
  104. #define SUNXI_HCI_RC16M_CLK_ENBALE 2
  105. #define SUNXI_HCI_PHY_CTRL_SIDDQ 3
  106. #define SUNXI_OTG_PHY_CTRL 0x410
  107. #define SUNXI_OTG_PHY_CFG 0x420
  108. #define SUNXI_OTG_PHY_STATUS 0x424
  109. #define SUNXI_USBC_REG_INTUSBE 0x0050
  110. #define EHCI_CAP_OFFSET (0x00)
  111. #define EHCI_CAP_LEN (0x10)
  112. #define EHCI_CAP_CAPLEN (EHCI_CAP_OFFSET + 0x00)
  113. #define EHCI_CAP_HCIVER (EHCI_CAP_OFFSET + 0x00)
  114. #define EHCI_CAP_HCSPAR (EHCI_CAP_OFFSET + 0x04)
  115. #define EHCI_CAP_HCCPAR (EHCI_CAP_OFFSET + 0x08)
  116. #define EHCI_CAP_COMPRD (EHCI_CAP_OFFSET + 0x0c)
  117. #define EHCI_OPR_OFFSET (EHCI_CAP_OFFSET + EHCI_CAP_LEN)
  118. #define EHCI_OPR_USBCMD (EHCI_OPR_OFFSET + 0x00)
  119. #define EHCI_OPR_USBSTS (EHCI_OPR_OFFSET + 0x04)
  120. #define EHCI_OPR_USBINTR (EHCI_OPR_OFFSET + 0x08)
  121. #define EHCI_OPR_FRINDEX (EHCI_OPR_OFFSET + 0x0c)
  122. #define EHCI_OPR_CRTLDSS (EHCI_OPR_OFFSET + 0x10)
  123. #define EHCI_OPR_PDLIST (EHCI_OPR_OFFSET + 0x14)
  124. #define EHCI_OPR_ASLIST (EHCI_OPR_OFFSET + 0x18)
  125. #define EHCI_OPR_CFGFLAG (EHCI_OPR_OFFSET + 0x40)
  126. #define EHCI_OPR_PORTSC (EHCI_OPR_OFFSET + 0x44)
  127. /**
  128. * PORT Control and Status Register
  129. * port_no is 0 based, 0, 1, 2, .....
  130. *
  131. * Reg EHCI_OPR_PORTSC
  132. */
  133. /* Port Test Control bits */
  134. #define EHCI_PORTSC_PTC_MASK (0xf<<16)
  135. #define EHCI_PORTSC_PTC_DIS (0x0<<16)
  136. #define EHCI_PORTSC_PTC_J (0x1<<16)
  137. #define EHCI_PORTSC_PTC_K (0x2<<16)
  138. #define EHCI_PORTSC_PTC_SE0NAK (0x3<<16)
  139. #define EHCI_PORTSC_PTC_PACKET (0x4<<16)
  140. #define EHCI_PORTSC_PTC_FORCE (0x5<<16)
  141. #define EHCI_PORTSC_OWNER (0x1<<13)
  142. #define EHCI_PORTSC_POWER (0x1<<12)
  143. #define EHCI_PORTSC_LS_MASK (0x3<<10)
  144. #define EHCI_PORTSC_LS_SE0 (0x0<<10)
  145. #define EHCI_PORTSC_LS_J (0x2<<10)
  146. #define EHCI_PORTSC_LS_K (0x1<<10)
  147. #define EHCI_PORTSC_LS_UDF (0x3<<10)
  148. #define EHCI_PORTSC_RESET (0x1<<8)
  149. #define EHCI_PORTSC_SUSPEND (0x1<<7)
  150. #define EHCI_PORTSC_RESUME (0x1<<6)
  151. #define EHCI_PORTSC_OCC (0x1<<5)
  152. #define EHCI_PORTSC_OC (0x1<<4)
  153. #define EHCI_PORTSC_PEC (0x1<<3)
  154. #define EHCI_PORTSC_PE (0x1<<2)
  155. #define EHCI_PORTSC_CSC (0x1<<1)
  156. #define EHCI_PORTSC_CCS (0x1<<0)
  157. #define EHCI_PORTSC_CHANGE (EHCI_PORTSC_OCC | EHCI_PORTSC_PEC | EHCI_PORTSC_CSC)
  158. #define SUNXI_USB_HCI_DEBUG
  159. #define KEY_USB_ENABLE "usb_used"
  160. #define KEY_USB_DRVVBUS_TYPE "usb_drv_vbus_type"
  161. #define KEY_USB_DRVVBUS_GPIO "usb_drv_vbus_gpio"
  162. #define KEY_USB_REGULATOR_IO "usb_regulator_io"
  163. #define KEY_USB_REGULATOR_IO_VOL "usb_regulator_vol"
  164. #define KEY_USB_WAKEUP_SUSPEND "usb_wakeup_suspend"
  165. #define KEY_USB_HSIC_USBED "usb_hsic_used"
  166. #define KEY_USB_HSIC_CTRL "usb_hsic_ctrl"
  167. #define KEY_USB_HSIC_RDY_GPIO "usb_hsic_rdy_gpio"
  168. #define KEY_USB_HSIC_REGULATOR_IO "usb_hsic_regulator_io"
  169. #define KEY_WAKEUP_SOURCE "wakeup-source"
  170. #define KEY_USB_PORT_TYPE "usb_port_type"
  171. #define KEY_USB_DRIVER_LEVEL "usbh_driver_level"
  172. #define KEY_USB_IRQ_FLAG "usbh_irq_flag"
  173. /* xHCI */
  174. #define XHCI_RESOURCES_NUM 2
  175. #define XHCI_REGS_START 0x0
  176. #define XHCI_REGS_END 0x7fff
  177. /* xHCI Operational Registers */
  178. #define XHCI_OP_REGS_HCUSBCMD 0X0020
  179. #define XHCI_OP_REGS_HCUSBSTS 0X0024
  180. #define XHCI_OP_REGS_HCPORT1SC 0X0420
  181. #define XHCI_OP_REGS_HCPORT1PMSC 0X0424
  182. #define SUNXI_GLOBALS_REGS_START 0xc100
  183. #define SUNXI_GLOBALS_REGS_END 0xc6ff
  184. /* Global Registers */
  185. #define SUNXI_GLOBALS_REGS_GCTL 0xc110
  186. #define SUNXI_GUSB2PHYCFG(n) (0xc200 + (n * 0x04))
  187. #define SUNXI_GUSB3PIPECTL(n) (0xc2c0 + (n * 0x04))
  188. /* Interface Status and Control Register */
  189. #define SUNXI_APP 0x10000
  190. #define SUNXI_PIPE_CLOCK_CONTROL 0x10014
  191. #define SUNXI_PHY_TUNE_LOW 0x10018
  192. #define SUNXI_PHY_TUNE_HIGH 0x1001c
  193. #define SUNXI_PHY_EXTERNAL_CONTROL 0x10020
  194. /* Bit fields */
  195. /* Global Configuration Register */
  196. #define SUNXI_GCTL_PRTCAPDIR(n) ((n) << 12)
  197. #define SUNXI_GCTL_PRTCAP_HOST 1
  198. #define SUNXI_GCTL_PRTCAP_DEVICE 2
  199. #define SUNXI_GCTL_PRTCAP_OTG 3
  200. #define SUNXI_GCTL_SOFITPSYNC (0x01 << 10)
  201. #define SUNXI_GCTL_CORESOFTRESET (1 << 11)
  202. /* Global USB2 PHY Configuration Register n */
  203. #define SUNXI_USB2PHYCFG_SUSPHY (0x01 << 6)
  204. #define SUNXI_USB2PHYCFG_PHYSOFTRST (1 << 31)
  205. /* Global USB3 PIPE Control Register */
  206. #define SUNXI_USB3PIPECTL_PHYSOFTRST (1 << 31)
  207. /* USB2.0 Interface Status and Control Register */
  208. #define SUNXI_APP_FOCE_VBUS (0x03 << 12)
  209. /* PIPE Clock Control Register */
  210. #define SUNXI_PPC_PIPE_CLK_OPEN (0x01 << 6)
  211. /* PHY External Control Register */
  212. #define SUNXI_PEC_EXTERN_VBUS (0x03 << 1)
  213. #define SUNXI_PEC_SSC_EN (0x01 << 24)
  214. #define SUNXI_PEC_REF_SSP_EN (0x01 << 26)
  215. /* PHY Tune High Register */
  216. #define SUNXI_TX_DEEMPH_3P5DB(n) ((n) << 19)
  217. #define SUNXI_TX_DEEMPH_6DB(n) ((n) << 13)
  218. #define SUNXI_TX_SWING_FULL(n) ((n) << 6)
  219. #define SUNXI_LOS_BIAS(n) ((n) << 3)
  220. #define SUNXI_TXVBOOSTLVL(n) ((n) << 0)
  221. /* HCI UTMI PHY TUNE */
  222. #define SUNXI_TX_VREF_TUNE_OFFSET 8
  223. #define SUNXI_TX_RISE_TUNE_OFFSET 4
  224. #define SUNXI_TX_RES_TUNE_OFFSET 2
  225. #define SUNXI_TX_PREEMPAMP_TUNE_OFFSET 0
  226. #define SUNXI_TX_VREF_TUNE (0xf << SUNXI_TX_VREF_TUNE_OFFSET)
  227. #define SUNXI_TX_RISE_TUNE (0x3 << SUNXI_TX_RISE_TUNE_OFFSET)
  228. #define SUNXI_TX_RES_TUNE (0x3 << SUNXI_TX_RES_TUNE_OFFSET)
  229. #define SUNXI_TX_PREEMPAMP_TUNE (0x3 << SUNXI_TX_PREEMPAMP_TUNE_OFFSET)
  230. enum sunxi_usbc_used {
  231. SUNXI_USB_DISABLE = 0,
  232. SUNXI_USB_ENABLE,
  233. };
  234. /*usb_type*/
  235. enum sunxi_usbc_type {
  236. SUNXI_USB_UNKNOWN = 0,
  237. SUNXI_USB_EHCI,
  238. SUNXI_USB_OHCI,
  239. SUNXI_USB_XHCI,
  240. };
  241. enum usb_drv_vbus_type {
  242. USB_DRV_VBUS_TYPE_NULL = 0,
  243. USB_DRV_VBUS_TYPE_GIPO,
  244. USB_DRV_VBUS_TYPE_AXP,
  245. };
  246. /* 0: device only; 1: host only; 2: otg */
  247. enum usb_port_type {
  248. USB_PORT_TYPE_DEVICE = 0,
  249. USB_PORT_TYPE_HOST,
  250. USB_PORT_TYPE_OTG,
  251. };
  252. enum usb_wakeup_source_type {
  253. SUPER_STANDBY = 0,
  254. USB_STANDBY,
  255. NORMAL_STANDBY,
  256. };
  257. // static hal_clk_id_t ehci_clk[] =
  258. // {
  259. // HAL_CLK_PERIPH_USBEHCI0,
  260. // HAL_CLK_PERIPH_USBEHCI1,
  261. // };
  262. // static hal_clk_id_t phy_clk[] =
  263. // {
  264. // SUNXI_CLK_USB0,
  265. // SUNXI_CLK_USB1,
  266. // };
  267. struct sunxi_hci_hcd {
  268. uint32_t usbc_no; /* usb controller number */
  269. uint32_t irq_no; /* interrupt number */
  270. char hci_name[32]; /* hci name */
  271. int usbc_type; /* usb controller type*/
  272. struct resource *usb_base_res; /* USB resources */
  273. struct resource *usb_base_req; /* USB resources */
  274. uint32_t usb_vbase; /* USB base address */
  275. uint32_t otg_vbase; /* USB base address */
  276. uint32_t ehci_base;
  277. uint32_t ehci_reg_length;
  278. uint32_t *ohci_base;
  279. uint32_t ohci_reg_length;
  280. struct resource *sram_base_res; /* SRAM resources */
  281. struct resource *sram_base_req; /* SRAM resources */
  282. uint32_t *sram_vbase; /* SRAM base address */
  283. uint32_t sram_reg_start;
  284. uint32_t sram_reg_length;
  285. struct resource *clock_base_res; /* clock resources */
  286. struct resource *clock_base_req; /* clock resources */
  287. uint32_t *clock_vbase; /* clock base address */
  288. uint32_t clock_reg_start;
  289. uint32_t clock_reg_length;
  290. struct resource *gpio_base_res; /* gpio resources */
  291. struct resource *gpio_base_req; /* gpio resources */
  292. uint32_t *gpio_vbase; /* gpio base address */
  293. uint32_t gpio_reg_start;
  294. uint32_t gpio_reg_length;
  295. struct resource *sdram_base_res; /* sdram resources */
  296. struct resource *sdram_base_req; /* sdram resources */
  297. uint32_t *sdram_vbase; /* sdram base address */
  298. uint32_t sdram_reg_start;
  299. uint32_t sdram_reg_length;
  300. struct platform_device *pdev;
  301. struct hc_gen_dev *hcd;
  302. struct clk *ahb; /* ahb clock handle */
  303. struct clk *mod_usb; /* mod_usb otg clock handle */
  304. struct clk *mod_usbphy; /* PHY0 clock handle */
  305. struct clk *hsic_usbphy; /* hsic clock handle */
  306. struct clk *pll_hsic; /* pll_hsic clock handle */
  307. struct clk *clk_usbhsic12m; /* pll_hsic clock handle */
  308. struct clk *clk_usbohci12m; /* clk_usbohci12m clock handle */
  309. struct clk *clk_hoscx2; /* clk_hoscx2 clock handle */
  310. struct clk *clk_hosc; /* clk_hosc clock handle */
  311. struct clk *clk_losc; /* clk_losc clock handle */
  312. uint32_t clk_is_open; /* is usb clock open */
  313. hal_clk_id_t bus_clk_id;
  314. hal_clk_id_t phy_clk_id;
  315. uint32_t reset_phy_clk;
  316. uint32_t reset_bus_clk;
  317. hal_clk_id_t ohci_clk_id;
  318. hal_clk_t bus_clk;
  319. hal_clk_t phy_clk;
  320. hal_clk_t ohci_clk;
  321. struct reset_control *reset_hci;
  322. struct reset_control *reset_phy;
  323. //struct gpio_config drv_vbus_gpio_set;
  324. int drv_vbus_gpio_set;
  325. const char *regulator_io;
  326. const char *used_status;
  327. int regulator_value;
  328. struct regulator *regulator_io_hdle;
  329. enum usb_drv_vbus_type drv_vbus_type;
  330. const char *drv_vbus_name;
  331. const char *det_vbus_name;
  332. int drv_vbus_gpio;
  333. int usb_irq_flag;
  334. int usb_driver_level;
  335. u32 drv_vbus_gpio_valid;
  336. u32 usb_restrict_valid;
  337. uint8_t power_flag; /* flag. power on or not */
  338. struct regulator *supply;
  339. int used; /* flag. in use or not */
  340. uint8_t probe; /* hc initialize */
  341. uint8_t no_suspend; /* when usb is being enable, stop system suspend */
  342. enum usb_port_type port_type; /* usb port type */
  343. int wakeup_suspend; /* flag. not suspend */
  344. int wakeup_source_flag;
  345. int (*open_clock)(struct sunxi_hci_hcd *sunxi_hci, u32 ohci);
  346. int (*close_clock)(struct sunxi_hci_hcd *sunxi_hci, u32 ohci);
  347. void (*set_power)(struct sunxi_hci_hcd *sunxi_hci, int is_on);
  348. void (*port_configure)(struct sunxi_hci_hcd *sunxi_hci, u32 enable);
  349. void (*usb_passby)(struct sunxi_hci_hcd *sunxi_hci, u32 enable);
  350. void (*hci_phy_ctrl)(struct sunxi_hci_hcd *sunxi_hci, u32 enable);
  351. #if 0
  352. /* xhci */
  353. struct resource xhci_resources[XHCI_RESOURCES_NUM];
  354. spinlock_t lock;
  355. struct device *dev;
  356. void *mem;
  357. uint32_t *regs;
  358. size_t regs_size;
  359. uint32_t *xhci_base;
  360. uint32_t xhci_reg_length;
  361. #endif
  362. /* resume work */
  363. //struct work_struct resume_work;
  364. //struct completion standby_complete;
  365. };
  366. #ifdef CONFIG_PM
  367. extern atomic_t g_sunxi_usb_super_standby;
  368. #endif
  369. int sunxi_hci_standby_completion(int usbc_type);
  370. int init_sunxi_hci(int usbc_type, int hci_num);
  371. int exit_sunxi_hci(struct sunxi_hci_hcd *sunxi_hci);
  372. int sunxi_get_hci_num(struct platform_device *pdev);
  373. void sunxi_set_host_hisc_rdy(struct sunxi_hci_hcd *sunxi_hci, int is_on);
  374. void sunxi_set_host_vbus(struct sunxi_hci_hcd *sunxi_hci, int is_on);
  375. int usb_phyx_tp_write(struct sunxi_hci_hcd *sunxi_hci,
  376. int addr, int data, int len);
  377. int usb_phyx_write(struct sunxi_hci_hcd *sunxi_hci, int data);
  378. int usb_phyx_read(struct sunxi_hci_hcd *sunxi_hci);
  379. int usb_phyx_tp_read(struct sunxi_hci_hcd *sunxi_hci, int addr, int len);
  380. int sunxi_usb_enable_xhci(void);
  381. int sunxi_usb_disable_xhci(void);
  382. #ifdef SUNXI_USB_STANDBY_LOW_POW_MODE
  383. void sunxi_hci_set_siddq(struct sunxi_hci_hcd *sunxi_hci, int is_on);
  384. void sunxi_hci_set_wakeup_ctrl(struct sunxi_hci_hcd *sunxi_hci, int is_on);
  385. void sunxi_hci_set_rc_clk(struct sunxi_hci_hcd *sunxi_hci, int is_on);
  386. void sunxi_hci_set_standby_irq(struct sunxi_hci_hcd *sunxi_hci, int is_on);
  387. void sunxi_hci_clean_standby_irq(struct sunxi_hci_hcd *sunxi_hci);
  388. #endif
  389. int hci_clock_init(struct sunxi_hci_hcd *sunxi_hci);
  390. int open_clock(struct sunxi_hci_hcd *sunxi_hci, u32 ohci);
  391. void usb_passby(struct sunxi_hci_hcd *sunxi_hci, u32 enable);
  392. int close_clock(struct sunxi_hci_hcd *sunxi_hci, u32 ohci);
  393. void sunxi_set_vbus(struct sunxi_hci_hcd *sunxi_hci, int is_on);
  394. void sunxi_hci_get_config_param(struct sunxi_hci_hcd *sunxi_hci);
  395. void usb_new_phy_adjust(struct sunxi_hci_hcd *sunxi_hci, int driver_level);
  396. #endif /* __SUNXI_HCI_SUNXI_H__ */