source: mainline/uspace/drv/bus/usb/ehci/main.c

Last change on this file was 9dfb034, checked in by Jiri Svoboda <jiri@…>, 4 months ago

Implement quiesce for EHCI and OHCI.

  • Property mode set to 100644
File size: 2.4 KB
Line 
1/*
2 * Copyright (c) 2025 Jiri Svoboda
3 * Copyright (c) 2011 Jan Vesely
4 * Copyright (c) 2011 Vojtech Horky
5 * Copyright (c) 2018 Ondrej Hlavaty, Petr Manek
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * - Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * - Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * - The name of the author may not be used to endorse or promote products
18 * derived from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32/** @addtogroup drvusbehci
33 * @{
34 */
35/** @file
36 * Main routines of EHCI driver.
37 */
38
39#include <io/logctl.h>
40#include <usb/host/hcd.h>
41
42#include "res.h"
43#include "hc.h"
44
45#define NAME "ehci"
46
47static const hc_driver_t ehci_driver = {
48 .name = NAME,
49 .hc_device_size = sizeof(hc_t),
50
51 .hc_add = hc_add,
52 .irq_code_gen = hc_gen_irq_code,
53 .claim = disable_legacy,
54 .start = hc_start,
55 .setup_root_hub = hc_setup_roothub,
56 .hc_gone = hc_gone,
57 .hc_quiesce = hc_quiesce
58};
59
60/** Initializes global driver structures (NONE).
61 *
62 * @param[in] argc Nmber of arguments in argv vector (ignored).
63 * @param[in] argv Cmdline argument vector (ignored).
64 * @return Error code.
65 *
66 * Driver debug level is set here.
67 */
68int main(int argc, char *argv[])
69{
70 log_init(NAME);
71 logctl_set_log_level(NAME, LVL_NOTE);
72 return hc_driver_main(&ehci_driver);
73}
74
75/**
76 * @}
77 */
Note: See TracBrowser for help on using the repository browser.