[40a5d40] | 1 | /*
|
---|
[9dfb034] | 2 | * Copyright (c) 2025 Jiri Svoboda
|
---|
[0969e45e] | 3 | * Copyright (c) 2011 Jan Vesely
|
---|
| 4 | * Copyright (c) 2011 Vojtech Horky
|
---|
[e0a5d4c] | 5 | * Copyright (c) 2018 Ondrej Hlavaty, Petr Manek
|
---|
[40a5d40] | 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 | */
|
---|
[58563585] | 31 |
|
---|
[f123909] | 32 | /** @addtogroup drvusbehci
|
---|
[40a5d40] | 33 | * @{
|
---|
| 34 | */
|
---|
| 35 | /** @file
|
---|
[0969e45e] | 36 | * Main routines of EHCI driver.
|
---|
[40a5d40] | 37 | */
|
---|
[58563585] | 38 |
|
---|
[e6d7df1] | 39 | #include <io/logctl.h>
|
---|
[32fb6bce] | 40 | #include <usb/host/hcd.h>
|
---|
[40a5d40] | 41 |
|
---|
[dcffe95] | 42 | #include "res.h"
|
---|
[972e8a9] | 43 | #include "hc.h"
|
---|
[f9776ae5] | 44 |
|
---|
| 45 | #define NAME "ehci"
|
---|
[972e8a9] | 46 |
|
---|
[32fb6bce] | 47 | static const hc_driver_t ehci_driver = {
|
---|
| 48 | .name = NAME,
|
---|
| 49 | .hc_device_size = sizeof(hc_t),
|
---|
[b5f813c] | 50 |
|
---|
[32fb6bce] | 51 | .hc_add = hc_add,
|
---|
| 52 | .irq_code_gen = hc_gen_irq_code,
|
---|
| 53 | .claim = disable_legacy,
|
---|
| 54 | .start = hc_start,
|
---|
[129b821f] | 55 | .setup_root_hub = hc_setup_roothub,
|
---|
[32fb6bce] | 56 | .hc_gone = hc_gone,
|
---|
[9dfb034] | 57 | .hc_quiesce = hc_quiesce
|
---|
[b5f813c] | 58 | };
|
---|
| 59 |
|
---|
[13927cf] | 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.
|
---|
[0d3167e] | 65 | *
|
---|
| 66 | * Driver debug level is set here.
|
---|
[13927cf] | 67 | */
|
---|
[40a5d40] | 68 | int main(int argc, char *argv[])
|
---|
| 69 | {
|
---|
[920d0fc] | 70 | log_init(NAME);
|
---|
[4287578] | 71 | logctl_set_log_level(NAME, LVL_NOTE);
|
---|
[32fb6bce] | 72 | return hc_driver_main(&ehci_driver);
|
---|
[40a5d40] | 73 | }
|
---|
[58563585] | 74 |
|
---|
[40a5d40] | 75 | /**
|
---|
| 76 | * @}
|
---|
| 77 | */
|
---|