\hypertarget{ehci__mv_8c_source}{}\doxysection{ehci\+\_\+mv.\+c}
\label{ehci__mv_8c_source}\index{dev/usb/controller/ehci\_mv.c@{dev/usb/controller/ehci\_mv.c}}
\mbox{\hyperlink{ehci__mv_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/3-\/Clause}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (C) 2008 MARVELL INTERNATIONAL LTD.}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00007}00007 \textcolor{comment}{ * Developed by Semihalf.}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00008}00008 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00009}00009 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00010}00010 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00011}00011 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00012}00012 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00014}00014 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00015}00015 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00016}00016 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00017}00017 \textcolor{comment}{ * 3. Neither the name of MARVELL nor the names of contributors}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00018}00018 \textcolor{comment}{ *    may be used to endorse or promote products derived from this software}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00019}00019 \textcolor{comment}{ *    without specific prior written permission.}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00020}00020 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00021}00021 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00022}00022 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00023}00023 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00024}00024 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00025}00025 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00026}00026 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00027}00027 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00028}00028 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00029}00029 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00030}00030 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00031}00031 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00032}00032 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00033}00033 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00034}00034 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00035}00035 \textcolor{comment}{ * FDT attachment driver for the USB Enhanced Host Controller.}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00036}00036 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00037}00037 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00039}\mbox{\hyperlink{ehci__mv_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00039}} \mbox{\hyperlink{ehci__mv_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00040}00040 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00041}00041 \textcolor{preprocessor}{\#include "{}opt\_bus.h"{}}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00042}00042 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/stdint.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/stddef.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <sys/condvar.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <sys/sx.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <sys/unistd.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <sys/callout.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <sys/priv.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00061}00061 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00062}00062 \textcolor{preprocessor}{\#include <dev/ofw/ofw\_bus.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00063}00063 \textcolor{preprocessor}{\#include <dev/ofw/ofw\_bus\_subr.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00064}00064 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00065}00065 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb_8h}{dev/usb/usb.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00066}00066 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi_8h}{dev/usb/usbdi.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00067}00067 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00068}00068 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__core_8h}{dev/usb/usb\_core.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00069}00069 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__busdma_8h}{dev/usb/usb\_busdma.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00070}00070 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__process_8h}{dev/usb/usb\_process.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00071}00071 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__util_8h}{dev/usb/usb\_util.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00072}00072 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00073}00073 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__controller_8h}{dev/usb/usb\_controller.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00074}00074 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__bus_8h}{dev/usb/usb\_bus.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00075}00075 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{ehci_8h}{dev/usb/controller/ehci.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00076}00076 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{ehcireg_8h}{dev/usb/controller/ehcireg.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00077}00077 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00078}00078 \textcolor{preprocessor}{\#if !defined(\_\_aarch64\_\_)}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00079}00079 \textcolor{preprocessor}{\#include <arm/mv/mvreg.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00080}00080 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00081}00081 \textcolor{preprocessor}{\#include <arm/mv/mvvar.h>}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00082}00082 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00083}\mbox{\hyperlink{ehci__mv_8c_a98d07ffb8a2881cb193191b7ec94155c}{00083}} \textcolor{preprocessor}{\#define EHCI\_VENDORID\_MRVL      0x1286}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00084}\mbox{\hyperlink{ehci__mv_8c_aed6adb222732b14bcec428dda4c82378}{00084}} \textcolor{preprocessor}{\#define EHCI\_HC\_DEVSTR          "{}Marvell Integrated USB 2.0 controller"{}}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00085}00085 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00086}\mbox{\hyperlink{ehci__mv_8c_ad8790f207ecf4ae666141123b0851e49}{00086}} \textcolor{keyword}{static} device\_attach\_t \mbox{\hyperlink{ehci__mv_8c_ad8790f207ecf4ae666141123b0851e49}{mv\_ehci\_attach}};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00087}\mbox{\hyperlink{ehci__mv_8c_a826c21bd55c3b7ce1c5befebb370f44a}{00087}} \textcolor{keyword}{static} device\_detach\_t \mbox{\hyperlink{ehci__mv_8c_a826c21bd55c3b7ce1c5befebb370f44a}{mv\_ehci\_detach}};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00089}00089 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci__mv_8c_adf34be6f446d0628d90eb1a85ffa4f44}{err\_intr}}(\textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00090}00090 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00091}\mbox{\hyperlink{ehci__mv_8c_a54c12ee90212694716d56d9e85687f8b}{00091}} \textcolor{keyword}{static} \textcolor{keyword}{struct }resource *\mbox{\hyperlink{ehci__mv_8c_a54c12ee90212694716d56d9e85687f8b}{irq\_err}};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00092}\mbox{\hyperlink{ehci__mv_8c_aaa3bd153e1dbf6202110270958bcc28a}{00092}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} *\mbox{\hyperlink{ehci__mv_8c_aaa3bd153e1dbf6202110270958bcc28a}{ih\_err}};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00093}00093 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00094}00094 \textcolor{comment}{/* EHCI HC regs start at this offset within USB range */}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00095}\mbox{\hyperlink{ehci__mv_8c_a86092f47cab73168add635b0d9a08a92}{00095}} \textcolor{preprocessor}{\#define MV\_USB\_HOST\_OFST        0x0100}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00096}00096 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00097}\mbox{\hyperlink{ehci__mv_8c_a26dbe1422995b2184d17f5cf33e5b6a0}{00097}} \textcolor{preprocessor}{\#define USB\_BRIDGE\_INTR\_CAUSE   0x210}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00098}\mbox{\hyperlink{ehci__mv_8c_a1610a2dc5558a262fa7d8bc26b384859}{00098}} \textcolor{preprocessor}{\#define USB\_BRIDGE\_INTR\_MASK    0x214}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00099}\mbox{\hyperlink{ehci__mv_8c_a2a3bf6784031dce9fa802bce62842e59}{00099}} \textcolor{preprocessor}{\#define USB\_BRIDGE\_ERR\_ADDR     0x21C}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00100}00100 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00101}\mbox{\hyperlink{ehci__mv_8c_a6aad5ec32cbce35b2a958ee3db9bff9f}{00101}} \textcolor{preprocessor}{\#define MV\_USB\_ADDR\_DECODE\_ERR (1 << 0)}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00102}\mbox{\hyperlink{ehci__mv_8c_a9bab9d1d528393cf95a06c406c45f8b6}{00102}} \textcolor{preprocessor}{\#define MV\_USB\_HOST\_UNDERFLOW  (1 << 1)}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00103}\mbox{\hyperlink{ehci__mv_8c_aead02d56f3671ddda582f4b79016443f}{00103}} \textcolor{preprocessor}{\#define MV\_USB\_HOST\_OVERFLOW   (1 << 2)}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00104}\mbox{\hyperlink{ehci__mv_8c_ac84abf0fe7e3f3cc77fab8ac1c175ea6}{00104}} \textcolor{preprocessor}{\#define MV\_USB\_DEVICE\_UNDERFLOW (1 << 3)}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00105}00105 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00106}\mbox{\hyperlink{ehci__mv_8c_ab22fb46080526e0e95076b8afa0ce793}{00106}} \textcolor{keyword}{enum} \mbox{\hyperlink{ehci__mv_8c_ab22fb46080526e0e95076b8afa0ce793}{mv\_ehci\_hwtype}} \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00107}\mbox{\hyperlink{ehci__mv_8c_ab22fb46080526e0e95076b8afa0ce793aa249cad7b8bd5a206497614371229f9f}{00107}}         \mbox{\hyperlink{ehci__mv_8c_ab22fb46080526e0e95076b8afa0ce793aa249cad7b8bd5a206497614371229f9f}{HWTYPE\_NONE}} = 0,}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00108}\mbox{\hyperlink{ehci__mv_8c_ab22fb46080526e0e95076b8afa0ce793a2a574c7d70624dc26ea041dd55a76c49}{00108}}         \mbox{\hyperlink{ehci__mv_8c_ab22fb46080526e0e95076b8afa0ce793a2a574c7d70624dc26ea041dd55a76c49}{HWTYPE\_MV\_EHCI\_V1}},}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00109}\mbox{\hyperlink{ehci__mv_8c_ab22fb46080526e0e95076b8afa0ce793acc9f413e7a380fe0092f4c031bdc881e}{00109}}         \mbox{\hyperlink{ehci__mv_8c_ab22fb46080526e0e95076b8afa0ce793acc9f413e7a380fe0092f4c031bdc881e}{HWTYPE\_MV\_EHCI\_V2}},}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00110}00110 \};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00111}00111 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00112}\mbox{\hyperlink{ehci__mv_8c_ab1bb129b8c62d8033fbb3adf82f284a0}{00112}} \textcolor{keyword}{static} \textcolor{keyword}{struct }ofw\_compat\_data \mbox{\hyperlink{ehci__mv_8c_ab1bb129b8c62d8033fbb3adf82f284a0}{compat\_data}}[] = \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00113}00113         \{\textcolor{stringliteral}{"{}mrvl,usb-\/ehci"{}},               \mbox{\hyperlink{ehci__mv_8c_ab22fb46080526e0e95076b8afa0ce793a2a574c7d70624dc26ea041dd55a76c49}{HWTYPE\_MV\_EHCI\_V1}}\},}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00114}00114         \{\textcolor{stringliteral}{"{}marvell,orion-\/ehci"{}},          \mbox{\hyperlink{ehci__mv_8c_ab22fb46080526e0e95076b8afa0ce793acc9f413e7a380fe0092f4c031bdc881e}{HWTYPE\_MV\_EHCI\_V2}}\},}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00115}00115         \{\textcolor{stringliteral}{"{}marvell,armada-\/3700-\/ehci"{}},    \mbox{\hyperlink{ehci__mv_8c_ab22fb46080526e0e95076b8afa0ce793acc9f413e7a380fe0092f4c031bdc881e}{HWTYPE\_MV\_EHCI\_V2}}\},}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00116}00116         \{NULL,                          \mbox{\hyperlink{ehci__mv_8c_ab22fb46080526e0e95076b8afa0ce793aa249cad7b8bd5a206497614371229f9f}{HWTYPE\_NONE}}\}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00117}00117 \};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00118}00118 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00119}00119 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00120}\mbox{\hyperlink{ehci__mv_8c_ad3c73369b5a804372ac80968f5a58b95}{00120}} \mbox{\hyperlink{ehci__mv_8c_ad3c73369b5a804372ac80968f5a58b95}{mv\_ehci\_post\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structehci__softc}{ehci\_softc}} *\mbox{\hyperlink{structehci__softc}{ehci\_softc}})}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00121}00121 \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00122}00122         uint32\_t usbmode;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00123}00123 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00124}00124         \textcolor{comment}{/* Force HOST mode */}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00125}00125         usbmode = \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(\mbox{\hyperlink{structehci__softc}{ehci\_softc}}, \mbox{\hyperlink{ehcireg_8h_afb0b9d7305878d3fc73fbc6580cb19fa}{EHCI\_USBMODE\_NOLPM}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00126}00126         usbmode \&= \string~EHCI\_UM\_CM;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00127}00127         usbmode |= \mbox{\hyperlink{ehcireg_8h_a0243db0a28904a83ec8984ada3ab6671}{EHCI\_UM\_CM\_HOST}};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00128}00128         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(\mbox{\hyperlink{structehci__softc}{ehci\_softc}}, \mbox{\hyperlink{ehcireg_8h_afb0b9d7305878d3fc73fbc6580cb19fa}{EHCI\_USBMODE\_NOLPM}}, usbmode);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00129}00129 \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00130}00130 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00131}00131 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00132}\mbox{\hyperlink{ehci__mv_8c_a3049c55ee1526e72053d7b1a5ed05292}{00132}} \mbox{\hyperlink{ehci__mv_8c_a3049c55ee1526e72053d7b1a5ed05292}{mv\_ehci\_probe}}(device\_t self)}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00133}00133 \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00134}00134 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00135}00135         \textcolor{keywordflow}{if} (!ofw\_bus\_status\_okay(self))}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00136}00136                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00137}00137 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00138}00138         \textcolor{keywordflow}{if} (!ofw\_bus\_search\_compatible(self, \mbox{\hyperlink{ehci__mv_8c_ab1bb129b8c62d8033fbb3adf82f284a0}{compat\_data}})-\/>ocd\_data)}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00139}00139                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00140}00140 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00141}00141         device\_set\_desc(self, \mbox{\hyperlink{ehci__mv_8c_aed6adb222732b14bcec428dda4c82378}{EHCI\_HC\_DEVSTR}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00142}00142 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00143}00143         \textcolor{keywordflow}{return} (BUS\_PROBE\_DEFAULT);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00144}00144 \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00146}00146 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00147}\mbox{\hyperlink{ehci__mv_8c_aa41625e25111f0f9d90aa44af5d65c57}{00147}} \mbox{\hyperlink{ehci__mv_8c_ad8790f207ecf4ae666141123b0851e49}{mv\_ehci\_attach}}(device\_t self)}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00148}00148 \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00149}00149         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = device\_get\_softc(self);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00150}00150         \textcolor{keyword}{enum} \mbox{\hyperlink{ehci__mv_8c_ab22fb46080526e0e95076b8afa0ce793}{mv\_ehci\_hwtype}} hwtype;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00151}00151         bus\_space\_handle\_t bsh;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00152}00152         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00153}00153         \textcolor{keywordtype}{int} rid;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00154}00154 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00155}00155         \textcolor{comment}{/* initialise some bus fields */}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00156}00156         sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a7855a7fc5c4b3f5289323c7743c6a975}{parent}} = self;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00157}00157         sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a9412f3e10804046f19d5e8ab00a38b59}{devices}} = sc-\/>\mbox{\hyperlink{structehci__softc_a0802e5ef39459d22c35166dccbcd337c}{sc\_devices}};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00158}00158         sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_ac665d059dd509782705e2eb35fdc9c58}{devices\_max}} = \mbox{\hyperlink{ehci_8h_accffc95758a4a2f4585ddaef5e522a28}{EHCI\_MAX\_DEVICES}};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00159}00159         sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_af7cf6d04a3d928e28be8825b637fab68}{dma\_bits}} = 32;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00160}00160 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00161}00161         hwtype = ofw\_bus\_search\_compatible(self, \mbox{\hyperlink{ehci__mv_8c_ab1bb129b8c62d8033fbb3adf82f284a0}{compat\_data}})-\/>ocd\_data;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00162}00162         \textcolor{keywordflow}{if} (hwtype == \mbox{\hyperlink{ehci__mv_8c_ab22fb46080526e0e95076b8afa0ce793aa249cad7b8bd5a206497614371229f9f}{HWTYPE\_NONE}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00163}00163                 device\_printf(self, \textcolor{stringliteral}{"{}Wrong HW type flag detected\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00164}00164                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00165}00165         \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00166}00166 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00167}00167         \textcolor{comment}{/* get all DMA memory */}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00168}00168         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__controller_8c_a736f5aa67bd8014944a1dc24fbf3fbb5}{usb\_bus\_mem\_alloc\_all}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}},}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00169}00169             \mbox{\hyperlink{usb__busdma_8h_acec0356df4d4a6905c59303652de41ad}{USB\_GET\_DMA\_TAG}}(self), \&\mbox{\hyperlink{ehci_8h_ac442dc73d309535c45d563b140daf901}{ehci\_iterate\_hw\_softc}})) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00170}00170                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00171}00171         \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00172}00172 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00173}00173         rid = 0;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00174}00174         sc-\/>\mbox{\hyperlink{structehci__softc_a50eaffc0569b91d99e647f1b059571c2}{sc\_io\_res}} = bus\_alloc\_resource\_any(self, SYS\_RES\_MEMORY, \&rid, RF\_ACTIVE);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00175}00175         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structehci__softc_a50eaffc0569b91d99e647f1b059571c2}{sc\_io\_res}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00176}00176                 device\_printf(self, \textcolor{stringliteral}{"{}Could not map memory\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00177}00177                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00178}00178         \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00179}00179         sc-\/>\mbox{\hyperlink{structehci__softc_a7cec17ef772fa77476e3911beee92aff}{sc\_io\_tag}} = rman\_get\_bustag(sc-\/>\mbox{\hyperlink{structehci__softc_a50eaffc0569b91d99e647f1b059571c2}{sc\_io\_res}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00180}00180         bsh = rman\_get\_bushandle(sc-\/>\mbox{\hyperlink{structehci__softc_a50eaffc0569b91d99e647f1b059571c2}{sc\_io\_res}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00181}00181         sc-\/>\mbox{\hyperlink{structehci__softc_a123f8105874f7a9b84db9b04fdf38778}{sc\_io\_size}} = rman\_get\_size(sc-\/>\mbox{\hyperlink{structehci__softc_a50eaffc0569b91d99e647f1b059571c2}{sc\_io\_res}}) -\/ \mbox{\hyperlink{ehci__mv_8c_a86092f47cab73168add635b0d9a08a92}{MV\_USB\_HOST\_OFST}};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00182}00182 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00183}00183         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00184}00184 \textcolor{comment}{         * Marvell EHCI host controller registers start at certain offset}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00185}00185 \textcolor{comment}{         * within the whole USB registers range, so create a subregion for the}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00186}00186 \textcolor{comment}{         * host mode configuration purposes.}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00187}00187 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00188}00188 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00189}00189         \textcolor{keywordflow}{if} (bus\_space\_subregion(sc-\/>\mbox{\hyperlink{structehci__softc_a7cec17ef772fa77476e3911beee92aff}{sc\_io\_tag}}, bsh, \mbox{\hyperlink{ehci__mv_8c_a86092f47cab73168add635b0d9a08a92}{MV\_USB\_HOST\_OFST}},}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00190}00190             sc-\/>\mbox{\hyperlink{structehci__softc_a123f8105874f7a9b84db9b04fdf38778}{sc\_io\_size}}, \&sc-\/>\mbox{\hyperlink{structehci__softc_a37d4db155aa3c0b309ef66274193f626}{sc\_io\_hdl}}) != 0)}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00191}00191                 panic(\textcolor{stringliteral}{"{}\%s: unable to subregion USB host registers"{}},}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00192}00192                     device\_get\_name(self));}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00194}00194         rid = 0;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00195}00195         \textcolor{keywordflow}{if} (hwtype == \mbox{\hyperlink{ehci__mv_8c_ab22fb46080526e0e95076b8afa0ce793a2a574c7d70624dc26ea041dd55a76c49}{HWTYPE\_MV\_EHCI\_V1}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00196}00196                 \mbox{\hyperlink{ehci__mv_8c_a54c12ee90212694716d56d9e85687f8b}{irq\_err}} = bus\_alloc\_resource\_any(self, SYS\_RES\_IRQ, \&rid,}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00197}00197                     RF\_SHAREABLE | RF\_ACTIVE);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00198}00198                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci__mv_8c_a54c12ee90212694716d56d9e85687f8b}{irq\_err}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00199}00199                         device\_printf(self, \textcolor{stringliteral}{"{}Could not allocate error irq\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00200}00200                         \mbox{\hyperlink{ehci__mv_8c_a826c21bd55c3b7ce1c5befebb370f44a}{mv\_ehci\_detach}}(self);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00201}00201                         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00202}00202                 \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00203}00203                 rid = 1;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00204}00204         \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00205}00205 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00206}00206         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00207}00207 \textcolor{comment}{         * Notice: Marvell EHCI controller has TWO interrupt lines, so make}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00208}00208 \textcolor{comment}{         * sure to use the correct rid for the main one (controller interrupt)}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00209}00209 \textcolor{comment}{         * -\/-\/ refer to DTS for the right resource number to use here.}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00210}00210 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00211}00211         sc-\/>\mbox{\hyperlink{structehci__softc_a25322dcf9605477b63aa53cf44ad6404}{sc\_irq\_res}} = bus\_alloc\_resource\_any(self, SYS\_RES\_IRQ, \&rid,}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00212}00212             RF\_SHAREABLE | RF\_ACTIVE);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00213}00213         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structehci__softc_a25322dcf9605477b63aa53cf44ad6404}{sc\_irq\_res}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00214}00214                 device\_printf(self, \textcolor{stringliteral}{"{}Could not allocate irq\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00215}00215                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00216}00216         \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00217}00217 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00218}00218         sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}} = device\_add\_child(self, \textcolor{stringliteral}{"{}usbus"{}}, -\/1);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00219}00219         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00220}00220                 device\_printf(self, \textcolor{stringliteral}{"{}Could not add USB device\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00221}00221                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00222}00222         \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00223}00223         device\_set\_ivars(sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}}, \&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00224}00224         device\_set\_desc(sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}}, \mbox{\hyperlink{ehci__mv_8c_aed6adb222732b14bcec428dda4c82378}{EHCI\_HC\_DEVSTR}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00225}00225 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00226}00226         sprintf(sc-\/>\mbox{\hyperlink{structehci__softc_a0a38070806b7d156e746430f4b54e81d}{sc\_vendor}}, \textcolor{stringliteral}{"{}Marvell"{}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00227}00227 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00228}00228         \textcolor{keywordflow}{if} (hwtype == \mbox{\hyperlink{ehci__mv_8c_ab22fb46080526e0e95076b8afa0ce793a2a574c7d70624dc26ea041dd55a76c49}{HWTYPE\_MV\_EHCI\_V1}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00229}00229                 err = bus\_setup\_intr(self, \mbox{\hyperlink{ehci__mv_8c_a54c12ee90212694716d56d9e85687f8b}{irq\_err}}, INTR\_TYPE\_BIO,}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00230}00230                     \mbox{\hyperlink{ehci__mv_8c_adf34be6f446d0628d90eb1a85ffa4f44}{err\_intr}}, NULL, sc, \&\mbox{\hyperlink{ehci__mv_8c_aaa3bd153e1dbf6202110270958bcc28a}{ih\_err}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00231}00231                 \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00232}00232                         device\_printf(self, \textcolor{stringliteral}{"{}Could not setup error irq, \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00233}00233                         \mbox{\hyperlink{ehci__mv_8c_aaa3bd153e1dbf6202110270958bcc28a}{ih\_err}} = NULL;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00234}00234                         \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00235}00235                 \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00236}00236         \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00237}00237 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00238}00238         \mbox{\hyperlink{ehci_8h_afee7af676da5e93958cab5fa54694f50}{EWRITE4}}(sc, \mbox{\hyperlink{ehci__mv_8c_a1610a2dc5558a262fa7d8bc26b384859}{USB\_BRIDGE\_INTR\_MASK}}, \mbox{\hyperlink{ehci__mv_8c_a6aad5ec32cbce35b2a958ee3db9bff9f}{MV\_USB\_ADDR\_DECODE\_ERR}} |}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00239}00239             \mbox{\hyperlink{ehci__mv_8c_a9bab9d1d528393cf95a06c406c45f8b6}{MV\_USB\_HOST\_UNDERFLOW}} | \mbox{\hyperlink{ehci__mv_8c_aead02d56f3671ddda582f4b79016443f}{MV\_USB\_HOST\_OVERFLOW}} |}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00240}00240             \mbox{\hyperlink{ehci__mv_8c_ac84abf0fe7e3f3cc77fab8ac1c175ea6}{MV\_USB\_DEVICE\_UNDERFLOW}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00241}00241 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00242}00242         err = bus\_setup\_intr(self, sc-\/>\mbox{\hyperlink{structehci__softc_a25322dcf9605477b63aa53cf44ad6404}{sc\_irq\_res}}, INTR\_TYPE\_BIO | INTR\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00243}00243             NULL, (driver\_intr\_t *)\mbox{\hyperlink{ehci_8c_a29753f8b40af28deb1954e1c728a306b}{ehci\_interrupt}}, sc, \&sc-\/>\mbox{\hyperlink{structehci__softc_a2d11b55fee6de8b402bd60b6947f3d80}{sc\_intr\_hdl}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00244}00244         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00245}00245                 device\_printf(self, \textcolor{stringliteral}{"{}Could not setup irq, \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00246}00246                 sc-\/>\mbox{\hyperlink{structehci__softc_a2d11b55fee6de8b402bd60b6947f3d80}{sc\_intr\_hdl}} = NULL;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00247}00247                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00248}00248         \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00249}00249 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00250}00250         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00251}00251 \textcolor{comment}{         * Workaround for Marvell integrated EHCI controller: reset of}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00252}00252 \textcolor{comment}{         * the EHCI core clears the USBMODE register, which sets the core in}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00253}00253 \textcolor{comment}{         * an undefined state (neither host nor agent), so it needs to be set}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00254}00254 \textcolor{comment}{         * again for proper operation.}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00255}00255 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00256}00256 \textcolor{comment}{         * Refer to errata document MV-\/S500832-\/00D.pdf (p. 5.24 GL USB-\/2) for}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00257}00257 \textcolor{comment}{         * details.}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00258}00258 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00259}00259         sc-\/>\mbox{\hyperlink{structehci__softc_a55a05d052f6b5eb40d3c6f90d3213cb5}{sc\_vendor\_post\_reset}} = \mbox{\hyperlink{ehci__mv_8c_ad3c73369b5a804372ac80968f5a58b95}{mv\_ehci\_post\_reset}};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00260}00260         \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00261}00261                 device\_printf(self, \textcolor{stringliteral}{"{}5.24 GL USB-\/2 workaround enabled\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00262}00262 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00263}00263         \textcolor{comment}{/* XXX all MV chips need it? */}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00264}00264         sc-\/>\mbox{\hyperlink{structehci__softc_ad443ed297f00f3febfe77d06855081b2}{sc\_flags}} |= \mbox{\hyperlink{ehci_8h_ac31d087886e6d19027a3f08d44d7f579}{EHCI\_SCFLG\_TT}} | \mbox{\hyperlink{ehci_8h_a8632cbeff2acad776a6b4753d1d1faaa}{EHCI\_SCFLG\_NORESTERM}};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00265}00265         sc-\/>\mbox{\hyperlink{structehci__softc_af8ff650e5547c6ca1f6de7a1d2b86693}{sc\_vendor\_get\_port\_speed}} = \mbox{\hyperlink{ehci_8c_aeb866c18c344370d8adc24958b873828}{ehci\_get\_port\_speed\_portsc}};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00266}00266         err = \mbox{\hyperlink{ehci_8c_ae09cd35aac92ce20149a1714a7109613}{ehci\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00267}00267         \textcolor{keywordflow}{if} (!err) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00268}00268                 err = device\_probe\_and\_attach(sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00269}00269         \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00270}00270         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00271}00271                 device\_printf(self, \textcolor{stringliteral}{"{}USB init failed err=\%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00272}00272                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00273}00273         \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00274}00274         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00275}00275 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00276}00276 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}:}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00277}00277         \mbox{\hyperlink{ehci__mv_8c_a826c21bd55c3b7ce1c5befebb370f44a}{mv\_ehci\_detach}}(self);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00278}00278         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00279}00279 \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00280}00280 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00281}00281 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00282}\mbox{\hyperlink{ehci__mv_8c_aa3a24d711a05cea7d6b6dc006e54d21b}{00282}} \mbox{\hyperlink{ehci__mv_8c_a826c21bd55c3b7ce1c5befebb370f44a}{mv\_ehci\_detach}}(device\_t self)}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00283}00283 \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00284}00284         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = device\_get\_softc(self);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00285}00285         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00286}00286 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00287}00287         \textcolor{comment}{/* during module unload there are lots of children leftover */}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00288}00288         device\_delete\_children(self);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00289}00289 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00290}00290         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00291}00291 \textcolor{comment}{         * disable interrupts that might have been switched on in mv\_ehci\_attach}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00292}00292 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00293}00293         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structehci__softc_a50eaffc0569b91d99e647f1b059571c2}{sc\_io\_res}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00294}00294                 \mbox{\hyperlink{ehci_8h_afee7af676da5e93958cab5fa54694f50}{EWRITE4}}(sc, \mbox{\hyperlink{ehci__mv_8c_a1610a2dc5558a262fa7d8bc26b384859}{USB\_BRIDGE\_INTR\_MASK}}, 0);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00295}00295         \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00296}00296         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structehci__softc_a25322dcf9605477b63aa53cf44ad6404}{sc\_irq\_res}} \&\& sc-\/>\mbox{\hyperlink{structehci__softc_a2d11b55fee6de8b402bd60b6947f3d80}{sc\_intr\_hdl}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00297}00297                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00298}00298 \textcolor{comment}{                 * only call ehci\_detach() after ehci\_init()}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00299}00299 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00300}00300                 \mbox{\hyperlink{ehci_8c_a4d9677740a3aa048c4b03e13bdafe43a}{ehci\_detach}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00301}00301 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00302}00302                 err = bus\_teardown\_intr(self, sc-\/>\mbox{\hyperlink{structehci__softc_a25322dcf9605477b63aa53cf44ad6404}{sc\_irq\_res}}, sc-\/>\mbox{\hyperlink{structehci__softc_a2d11b55fee6de8b402bd60b6947f3d80}{sc\_intr\_hdl}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00303}00303 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00304}00304                 \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00305}00305                         \textcolor{comment}{/* XXX or should we panic? */}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00306}00306                         device\_printf(self, \textcolor{stringliteral}{"{}Could not tear down irq, \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00307}00307                             err);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00308}00308                 sc-\/>\mbox{\hyperlink{structehci__softc_a2d11b55fee6de8b402bd60b6947f3d80}{sc\_intr\_hdl}} = NULL;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00309}00309         \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00310}00310         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci__mv_8c_a54c12ee90212694716d56d9e85687f8b}{irq\_err}} \&\& \mbox{\hyperlink{ehci__mv_8c_aaa3bd153e1dbf6202110270958bcc28a}{ih\_err}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00311}00311                 err = bus\_teardown\_intr(self, \mbox{\hyperlink{ehci__mv_8c_a54c12ee90212694716d56d9e85687f8b}{irq\_err}}, \mbox{\hyperlink{ehci__mv_8c_aaa3bd153e1dbf6202110270958bcc28a}{ih\_err}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00312}00312 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00313}00313                 \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00314}00314                         device\_printf(self, \textcolor{stringliteral}{"{}Could not tear down irq, \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00315}00315                             err);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00316}00316                 \mbox{\hyperlink{ehci__mv_8c_aaa3bd153e1dbf6202110270958bcc28a}{ih\_err}} = NULL;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00317}00317         \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00318}00318         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci__mv_8c_a54c12ee90212694716d56d9e85687f8b}{irq\_err}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00319}00319                 bus\_release\_resource(self, SYS\_RES\_IRQ, 0, \mbox{\hyperlink{ehci__mv_8c_a54c12ee90212694716d56d9e85687f8b}{irq\_err}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00320}00320                 \mbox{\hyperlink{ehci__mv_8c_a54c12ee90212694716d56d9e85687f8b}{irq\_err}} = NULL;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00321}00321         \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00322}00322         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structehci__softc_a25322dcf9605477b63aa53cf44ad6404}{sc\_irq\_res}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00323}00323                 bus\_release\_resource(self, SYS\_RES\_IRQ, 1, sc-\/>\mbox{\hyperlink{structehci__softc_a25322dcf9605477b63aa53cf44ad6404}{sc\_irq\_res}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00324}00324                 sc-\/>\mbox{\hyperlink{structehci__softc_a25322dcf9605477b63aa53cf44ad6404}{sc\_irq\_res}} = NULL;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00325}00325         \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00326}00326         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structehci__softc_a50eaffc0569b91d99e647f1b059571c2}{sc\_io\_res}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00327}00327                 bus\_release\_resource(self, SYS\_RES\_MEMORY, 0,}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00328}00328                     sc-\/>\mbox{\hyperlink{structehci__softc_a50eaffc0569b91d99e647f1b059571c2}{sc\_io\_res}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00329}00329                 sc-\/>\mbox{\hyperlink{structehci__softc_a50eaffc0569b91d99e647f1b059571c2}{sc\_io\_res}} = NULL;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00330}00330         \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00331}00331         \mbox{\hyperlink{usb__controller_8c_a0a85a587a062a4af3f1df6fc298a02b2}{usb\_bus\_mem\_free\_all}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}, \&\mbox{\hyperlink{ehci_8h_ac442dc73d309535c45d563b140daf901}{ehci\_iterate\_hw\_softc}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00332}00332 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00333}00333         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00334}00334 \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00335}00335 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00336}00336 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00337}\mbox{\hyperlink{ehci__mv_8c_adf34be6f446d0628d90eb1a85ffa4f44}{00337}} \mbox{\hyperlink{ehci__mv_8c_adf34be6f446d0628d90eb1a85ffa4f44}{err\_intr}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00338}00338 \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00339}00339         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00340}00340         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} cause;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00341}00341 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00342}00342         cause = \mbox{\hyperlink{ehci_8h_aca8562aa9c2b4bfcc55f66c00c0c1110}{EREAD4}}(sc, \mbox{\hyperlink{ehci__mv_8c_a26dbe1422995b2184d17f5cf33e5b6a0}{USB\_BRIDGE\_INTR\_CAUSE}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00343}00343         \textcolor{keywordflow}{if} (cause) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00344}00344                 printf(\textcolor{stringliteral}{"{}USB error: "{}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00345}00345                 \textcolor{keywordflow}{if} (cause \& \mbox{\hyperlink{ehci__mv_8c_a6aad5ec32cbce35b2a958ee3db9bff9f}{MV\_USB\_ADDR\_DECODE\_ERR}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00346}00346                         uint32\_t addr;}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00347}00347 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00348}00348                         addr = \mbox{\hyperlink{ehci_8h_aca8562aa9c2b4bfcc55f66c00c0c1110}{EREAD4}}(sc, \mbox{\hyperlink{ehci__mv_8c_a2a3bf6784031dce9fa802bce62842e59}{USB\_BRIDGE\_ERR\_ADDR}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00349}00349                         printf(\textcolor{stringliteral}{"{}address decoding error (addr=\%\#x)\(\backslash\)n"{}}, addr);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00350}00350                 \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00351}00351                 \textcolor{keywordflow}{if} (cause \& \mbox{\hyperlink{ehci__mv_8c_a9bab9d1d528393cf95a06c406c45f8b6}{MV\_USB\_HOST\_UNDERFLOW}})}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00352}00352                         printf(\textcolor{stringliteral}{"{}host underflow\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00353}00353                 \textcolor{keywordflow}{if} (cause \& \mbox{\hyperlink{ehci__mv_8c_aead02d56f3671ddda582f4b79016443f}{MV\_USB\_HOST\_OVERFLOW}})}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00354}00354                         printf(\textcolor{stringliteral}{"{}host overflow\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00355}00355                 \textcolor{keywordflow}{if} (cause \& \mbox{\hyperlink{ehci__mv_8c_ac84abf0fe7e3f3cc77fab8ac1c175ea6}{MV\_USB\_DEVICE\_UNDERFLOW}})}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00356}00356                         printf(\textcolor{stringliteral}{"{}device underflow\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00357}00357                 \textcolor{keywordflow}{if} (cause \& \string~(\mbox{\hyperlink{ehci__mv_8c_a6aad5ec32cbce35b2a958ee3db9bff9f}{MV\_USB\_ADDR\_DECODE\_ERR}} | \mbox{\hyperlink{ehci__mv_8c_a9bab9d1d528393cf95a06c406c45f8b6}{MV\_USB\_HOST\_UNDERFLOW}} |}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00358}00358                     \mbox{\hyperlink{ehci__mv_8c_aead02d56f3671ddda582f4b79016443f}{MV\_USB\_HOST\_OVERFLOW}} | \mbox{\hyperlink{ehci__mv_8c_ac84abf0fe7e3f3cc77fab8ac1c175ea6}{MV\_USB\_DEVICE\_UNDERFLOW}}))}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00359}00359                         printf(\textcolor{stringliteral}{"{}unknown cause (cause=\%\#x)\(\backslash\)n"{}}, cause);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00360}00360 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00361}00361                 \mbox{\hyperlink{ehci_8h_afee7af676da5e93958cab5fa54694f50}{EWRITE4}}(sc, \mbox{\hyperlink{ehci__mv_8c_a26dbe1422995b2184d17f5cf33e5b6a0}{USB\_BRIDGE\_INTR\_CAUSE}}, 0);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00362}00362         \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00363}00363         \textcolor{keywordflow}{return} (FILTER\_HANDLED);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00364}00364 \}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00365}00365 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00366}\mbox{\hyperlink{ehci__mv_8c_acc094e926270667636d78b4ed64c481b}{00366}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{ehci__mv_8c_acc094e926270667636d78b4ed64c481b}{ehci\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00367}00367         \textcolor{comment}{/* Device interface */}}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00368}00368         DEVMETHOD(device\_probe, \mbox{\hyperlink{ehci__mv_8c_a3049c55ee1526e72053d7b1a5ed05292}{mv\_ehci\_probe}}),}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00369}00369         DEVMETHOD(device\_attach, \mbox{\hyperlink{ehci__mv_8c_ad8790f207ecf4ae666141123b0851e49}{mv\_ehci\_attach}}),}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00370}00370         DEVMETHOD(device\_detach, \mbox{\hyperlink{ehci__mv_8c_a826c21bd55c3b7ce1c5befebb370f44a}{mv\_ehci\_detach}}),}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00371}00371         DEVMETHOD(device\_suspend, bus\_generic\_suspend),}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00372}00372         DEVMETHOD(device\_resume, bus\_generic\_resume),}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00373}00373         DEVMETHOD(device\_shutdown, bus\_generic\_shutdown),}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00374}00374 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00375}00375         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00376}00376 \};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00377}00377 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00378}\mbox{\hyperlink{ehci__mv_8c_afee8c0eb6173d0449096dbaed5da602a}{00378}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{ehci__mv_8c_afee8c0eb6173d0449096dbaed5da602a}{ehci\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00379}00379         \textcolor{stringliteral}{"{}ehci"{}},}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00380}00380         \mbox{\hyperlink{ehci__mv_8c_acc094e926270667636d78b4ed64c481b}{ehci\_methods}},}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00381}00381         \textcolor{keyword}{sizeof}(\mbox{\hyperlink{ehci_8h_a08e7a4502c867321f396abeb2b62ba6d}{ehci\_softc\_t}}),}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00382}00382 \};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00383}00383 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00384}\mbox{\hyperlink{ehci__mv_8c_aad032634e20e0d13d4b63c8bcebf4e17}{00384}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{ehci__mv_8c_aad032634e20e0d13d4b63c8bcebf4e17}{ehci\_devclass}};}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00385}00385 }
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00386}\mbox{\hyperlink{ehci__mv_8c_a8914918d3725905b48942a6145658b83}{00386}} \mbox{\hyperlink{ehci__mv_8c_a8914918d3725905b48942a6145658b83}{DRIVER\_MODULE}}(ehci\_mv, simplebus, \mbox{\hyperlink{ehci__mv_8c_afee8c0eb6173d0449096dbaed5da602a}{ehci\_driver}}, \mbox{\hyperlink{ehci__mv_8c_aad032634e20e0d13d4b63c8bcebf4e17}{ehci\_devclass}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{ehci__mv_8c_source_l00387}\mbox{\hyperlink{ehci__mv_8c_ac640d52b31b3329cb6621b97187a7b6e}{00387}} \mbox{\hyperlink{ehci__mv_8c_ac640d52b31b3329cb6621b97187a7b6e}{MODULE\_DEPEND}}(ehci\_mv, \mbox{\hyperlink{usb__if_8m_adfa3f6da9c4881e494b180c4ebb06470}{usb}}, 1, 1, 1);}

\end{DoxyCode}
