\hypertarget{pl061_8c_source}{}\doxysection{pl061.\+c}
\label{pl061_8c_source}\index{dev/gpio/pl061.c@{dev/gpio/pl061.c}}
\mbox{\hyperlink{pl061_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2020 Amazon.com, Inc. or its affiliates.}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00029}00029 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00030}\mbox{\hyperlink{pl061_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00030}} \mbox{\hyperlink{pl061_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/proc.h>}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/rman.h>}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/gpio.h>}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/interrupt.h>}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00043}00043 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <machine/bus.h>}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <machine/intr.h>}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <machine/resource.h>}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{gpiobusvar_8h}{dev/gpio/gpiobusvar.h}}>}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00049}00049 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00050}00050 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{pl061_8h}{pl061.h}}"{}}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00051}00051 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00052}00052 \textcolor{preprocessor}{\#include "{}gpio\_if.h"{}}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00053}00053 \textcolor{preprocessor}{\#include "{}pic\_if.h"{}}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00054}00054 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00055}\mbox{\hyperlink{pl061_8c_a8b34e4ccbac8d23d3705889280033b4a}{00055}} \textcolor{preprocessor}{\#define PL061\_LOCK(\_sc)                 mtx\_lock\_spin(\&(\_sc)-\/>sc\_mtx)}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00056}\mbox{\hyperlink{pl061_8c_ace86625075390909c715f237546c8f06}{00056}} \textcolor{preprocessor}{\#define PL061\_UNLOCK(\_sc)               mtx\_unlock\_spin(\&(\_sc)-\/>sc\_mtx)}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00057}\mbox{\hyperlink{pl061_8c_a4c2878bfee4e9d3e09f37d6900bf049c}{00057}} \textcolor{preprocessor}{\#define PL061\_LOCK\_DESTROY(\_sc)         mtx\_destroy(\&(\_sc)-\/>sc\_mtx)}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00058}\mbox{\hyperlink{pl061_8c_aac64c5a70045eac2077c7d63d1c1723d}{00058}} \textcolor{preprocessor}{\#define PL061\_ASSERT\_LOCKED(\_sc)        mtx\_assert(\&(\_sc)-\/>sc\_mtx, MA\_OWNED)}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00059}\mbox{\hyperlink{pl061_8c_abde9f119f707d431e526aaaade17a66c}{00059}} \textcolor{preprocessor}{\#define PL061\_ASSERT\_UNLOCKED(\_sc)      mtx\_assert(\&(\_sc)-\/>sc\_mtx, MA\_NOTOWNED)}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00060}00060 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00061}00061 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00062}00062 \textcolor{preprocessor}{\#define dprintf(fmt, args...) do \{      \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00063}00063 \textcolor{preprocessor}{        printf(fmt, \#\#args);            \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00064}00064 \textcolor{preprocessor}{\} while (0)}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00065}00065 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00066}\mbox{\hyperlink{pl061_8c_af24eafbfd3a4fcc1cacac5512d5f9e4a}{00066}} \textcolor{preprocessor}{\#define dprintf(fmt, args...)}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00067}00067 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00068}00068 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00069}\mbox{\hyperlink{pl061_8c_a240c8a51bc0d5785f6b609ad4e8fa5c7}{00069}} \textcolor{preprocessor}{\#define PL061\_PIN\_TO\_ADDR(pin)  (1 << (pin + 2))}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00070}\mbox{\hyperlink{pl061_8c_ac3299c56d921a70cd0783dad881c0ecc}{00070}} \textcolor{preprocessor}{\#define PL061\_DATA              0x3FC}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00071}\mbox{\hyperlink{pl061_8c_a9c6894a69fd33210041ac102d4065473}{00071}} \textcolor{preprocessor}{\#define PL061\_DIR               0x400}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00072}\mbox{\hyperlink{pl061_8c_a954491737bfbf3adf65a8ada93fc1242}{00072}} \textcolor{preprocessor}{\#define PL061\_INTSENSE          0x404}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00073}\mbox{\hyperlink{pl061_8c_a68d5de72a14bf54b27ccfd749043788c}{00073}} \textcolor{preprocessor}{\#define PL061\_INTBOTHEDGES      0x408}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00074}\mbox{\hyperlink{pl061_8c_a43c13081782e4233f8a2d62aff8793d2}{00074}} \textcolor{preprocessor}{\#define PL061\_INTEVENT          0x40C}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00075}\mbox{\hyperlink{pl061_8c_ae90bb7ed7713c4de24a66680ce1d8360}{00075}} \textcolor{preprocessor}{\#define PL061\_INTMASK           0x410}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00076}\mbox{\hyperlink{pl061_8c_a0a11a7cddc9153dd50acb234155d28a8}{00076}} \textcolor{preprocessor}{\#define PL061\_RAWSTATUS         0x414}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00077}\mbox{\hyperlink{pl061_8c_a026f10400094589789bcc130f8176d1a}{00077}} \textcolor{preprocessor}{\#define PL061\_STATUS            0x418}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00078}\mbox{\hyperlink{pl061_8c_a0d8826fd2aa2183067c7b16c000919d0}{00078}} \textcolor{preprocessor}{\#define PL061\_INTCLR            0x41C}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00079}\mbox{\hyperlink{pl061_8c_a22674cf6b67b8a03a429f5536735e45f}{00079}} \textcolor{preprocessor}{\#define PL061\_MODECTRL          0x420}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00080}00080 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00081}\mbox{\hyperlink{pl061_8c_ab2af750ced2048875d54eaf48d56a0ca}{00081}} \textcolor{preprocessor}{\#define PL061\_ALLOWED\_CAPS     (GPIO\_PIN\_INPUT | GPIO\_PIN\_OUTPUT | GPIO\_INTR\_EDGE\_BOTH | \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00082}00082 \textcolor{preprocessor}{                                GPIO\_INTR\_EDGE\_RISING | GPIO\_INTR\_EDGE\_FALLING | \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00083}00083 \textcolor{preprocessor}{                                GPIO\_INTR\_LEVEL\_HIGH | GPIO\_INTR\_LEVEL\_LOW )}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00084}00084 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00085}\mbox{\hyperlink{pl061_8c_af25451020f0b46f4136b2cfdda1b28e2}{00085}} \textcolor{preprocessor}{\#define PIC\_INTR\_ISRC(sc, irq) (\&(sc-\/>sc\_isrcs[irq].isrc))}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00086}00086 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00087}00087 \textcolor{keyword}{static} device\_t}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00088}\mbox{\hyperlink{pl061_8c_a76be95db0ccbaa6a88efd6306bd981d8}{00088}} \mbox{\hyperlink{pl061_8c_a76be95db0ccbaa6a88efd6306bd981d8}{pl061\_get\_bus}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00089}00089 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00090}00090         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00091}00091 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00092}00092         sc = device\_get\_softc(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00093}00093         \textcolor{keywordflow}{return} (sc-\/>\mbox{\hyperlink{structpl061__softc_a5b390f7c493e2386c5db452946404293}{sc\_busdev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00094}00094 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00095}00095 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00096}00096 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00097}\mbox{\hyperlink{pl061_8c_a24762b2926eca65bb87a31ddb092aaf8}{00097}} \mbox{\hyperlink{pl061_8c_a24762b2926eca65bb87a31ddb092aaf8}{pl061\_pin\_max}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{keywordtype}{int} *\mbox{\hyperlink{gpio__if_8m_a90066eeddbbaa9bc74a1b49fa7327b4d}{maxpin}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00098}00098 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00099}00099         *\mbox{\hyperlink{gpio__if_8m_a90066eeddbbaa9bc74a1b49fa7327b4d}{maxpin}} = \mbox{\hyperlink{pl061_8h_a7ad704cfedcf75048edbc02e8635c643}{PL061\_NUM\_GPIO}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00100}00100         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00101}00101 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00102}00102 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00103}00103 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00104}\mbox{\hyperlink{pl061_8c_a53ad55ee4cfe3cd773031d51f333f68f}{00104}} \mbox{\hyperlink{pl061_8c_a53ad55ee4cfe3cd773031d51f333f68f}{pl061\_pin\_getname}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, uint32\_t \mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}}, \textcolor{keywordtype}{char} *\mbox{\hyperlink{gpio__if_8m_afcd1706c9144e6d6eee6127661ae3be2}{name}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00105}00105 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00106}00106         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00107}00107 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00108}00108         sc = device\_get\_softc(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00109}00109         \textcolor{keywordflow}{if} (\mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}} >= \mbox{\hyperlink{pl061_8h_a7ad704cfedcf75048edbc02e8635c643}{PL061\_NUM\_GPIO}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00110}00110                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00111}00111 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00112}00112         snprintf(\mbox{\hyperlink{gpio__if_8m_afcd1706c9144e6d6eee6127661ae3be2}{name}}, GPIOMAXNAME, \textcolor{stringliteral}{"{}p\%u"{}}, \mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00113}00113         \mbox{\hyperlink{gpio__if_8m_afcd1706c9144e6d6eee6127661ae3be2}{name}}[GPIOMAXNAME -\/ 1] = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00114}00114 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00115}00115         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00116}00116 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00117}00117 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00118}00118 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00119}\mbox{\hyperlink{pl061_8c_adee2b85c71a46cd216982599aaf71747}{00119}} \mbox{\hyperlink{pl061_8c_adee2b85c71a46cd216982599aaf71747}{pl061\_pin\_getflags}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, uint32\_t \mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}}, uint32\_t *\mbox{\hyperlink{gpio__if_8m_a773b39d480759f67926cb18ae2219281}{flags}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00120}00120 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00121}00121         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00122}00122         uint8\_t mask = 1 << \mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}};}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00123}00123 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00124}00124         sc = device\_get\_softc(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00125}00125         \textcolor{keywordflow}{if} (\mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}} >= \mbox{\hyperlink{pl061_8h_a7ad704cfedcf75048edbc02e8635c643}{PL061\_NUM\_GPIO}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00126}00126                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00127}00127 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00128}00128         \mbox{\hyperlink{pl061_8c_a8b34e4ccbac8d23d3705889280033b4a}{PL061\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00129}00129         *\mbox{\hyperlink{gpio__if_8m_a773b39d480759f67926cb18ae2219281}{flags}} = 0;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00130}00130 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00131}00131         \textcolor{keywordflow}{if} (mask \& bus\_read\_1(sc-\/>\mbox{\hyperlink{structpl061__softc_aec50ebf74c1fb8128a88931fad7b1b39}{sc\_mem\_res}}, \mbox{\hyperlink{pl061_8c_a9c6894a69fd33210041ac102d4065473}{PL061\_DIR}}))}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00132}00132                 *\mbox{\hyperlink{gpio__if_8m_a773b39d480759f67926cb18ae2219281}{flags}} |= GPIO\_PIN\_OUTPUT;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00133}00133         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00134}00134                 *\mbox{\hyperlink{gpio__if_8m_a773b39d480759f67926cb18ae2219281}{flags}} |= GPIO\_PIN\_INPUT;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00135}00135 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00136}00136         \mbox{\hyperlink{pl061_8c_ace86625075390909c715f237546c8f06}{PL061\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00137}00137         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00138}00138 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00139}00139 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00140}00140 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00141}\mbox{\hyperlink{pl061_8c_a6a068f6945c2eb80ed7e2427113dae3c}{00141}} \mbox{\hyperlink{pl061_8c_a6a068f6945c2eb80ed7e2427113dae3c}{pl061\_pin\_getcaps}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, uint32\_t \mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}}, uint32\_t *\mbox{\hyperlink{gpio__if_8m_a49a05dd301ee4bf71c43fb7bcb57c93b}{caps}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00142}00142 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00143}00143         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00144}00144 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00145}00145         sc = device\_get\_softc(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00146}00146         \textcolor{keywordflow}{if} (\mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}} >= \mbox{\hyperlink{pl061_8h_a7ad704cfedcf75048edbc02e8635c643}{PL061\_NUM\_GPIO}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00147}00147                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00148}00148 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00149}00149         *\mbox{\hyperlink{gpio__if_8m_a49a05dd301ee4bf71c43fb7bcb57c93b}{caps}} = \mbox{\hyperlink{pl061_8c_ab2af750ced2048875d54eaf48d56a0ca}{PL061\_ALLOWED\_CAPS}};}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00150}00150 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00151}00151         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00152}00152 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00153}00153 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00154}00154 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00155}\mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{00155}} \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc, \textcolor{keywordtype}{long} a, uint8\_t m, uint8\_t b)}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00156}00156 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00157}00157         uint8\_t tmp;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00158}00158 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00159}00159         tmp = bus\_read\_1(sc-\/>\mbox{\hyperlink{structpl061__softc_aec50ebf74c1fb8128a88931fad7b1b39}{sc\_mem\_res}}, a);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00160}00160         tmp \&= \string~m;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00161}00161         tmp |= b;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00162}00162         bus\_write\_1(sc-\/>\mbox{\hyperlink{structpl061__softc_aec50ebf74c1fb8128a88931fad7b1b39}{sc\_mem\_res}}, a, tmp);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00163}00163         \mbox{\hyperlink{pl061_8c_af24eafbfd3a4fcc1cacac5512d5f9e4a}{dprintf}}(\textcolor{stringliteral}{"{}\%s: writing \%\#x to register \%\#lx\(\backslash\)n"{}}, \_\_func\_\_, tmp, a);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00164}00164 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00165}00165 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00166}00166 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00167}\mbox{\hyperlink{pl061_8c_a4c0c7d850c6319a256f9c9883ee80a54}{00167}} \mbox{\hyperlink{pl061_8c_a4c0c7d850c6319a256f9c9883ee80a54}{pl061\_pin\_setflags}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, uint32\_t \mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}}, uint32\_t \mbox{\hyperlink{gpio__if_8m_a773b39d480759f67926cb18ae2219281}{flags}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00168}00168 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00169}00169         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00170}00170         uint8\_t mask = 1 << \mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}};}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00171}00171         \textcolor{keyword}{const} uint32\_t in\_out = (GPIO\_PIN\_INPUT | GPIO\_PIN\_OUTPUT);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00172}00172 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00173}00173         sc = device\_get\_softc(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00174}00174         \textcolor{keywordflow}{if} (\mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}} >= \mbox{\hyperlink{pl061_8h_a7ad704cfedcf75048edbc02e8635c643}{PL061\_NUM\_GPIO}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00175}00175                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00176}00176 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00177}00177         \textcolor{keywordflow}{if} (\mbox{\hyperlink{gpio__if_8m_a773b39d480759f67926cb18ae2219281}{flags}} \& \string~\mbox{\hyperlink{pl061_8c_ab2af750ced2048875d54eaf48d56a0ca}{PL061\_ALLOWED\_CAPS}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00178}00178                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00179}00179 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00180}00180         \textcolor{comment}{/* can't be both input and output */}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00181}00181         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{gpio__if_8m_a773b39d480759f67926cb18ae2219281}{flags}} \& in\_out) == in\_out)}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00182}00182                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00183}00183 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00184}00184 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00185}00185         \mbox{\hyperlink{pl061_8c_a8b34e4ccbac8d23d3705889280033b4a}{PL061\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00186}00186         \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(sc, \mbox{\hyperlink{pl061_8c_a9c6894a69fd33210041ac102d4065473}{PL061\_DIR}}, mask, \mbox{\hyperlink{gpio__if_8m_a773b39d480759f67926cb18ae2219281}{flags}} \& GPIO\_PIN\_OUTPUT ? mask : 0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00187}00187         \mbox{\hyperlink{pl061_8c_ace86625075390909c715f237546c8f06}{PL061\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00188}00188         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00189}00189 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00190}00190 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00191}00191 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00192}\mbox{\hyperlink{pl061_8c_ab6f8b072396a1f3390eb9de1bc411c8c}{00192}} \mbox{\hyperlink{pl061_8c_ab6f8b072396a1f3390eb9de1bc411c8c}{pl061\_pin\_get}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, uint32\_t \mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}}, uint32\_t *value)}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00193}00193 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00194}00194         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00195}00195 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00196}00196         sc = device\_get\_softc(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00197}00197         \textcolor{keywordflow}{if} (\mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}} >= \mbox{\hyperlink{pl061_8h_a7ad704cfedcf75048edbc02e8635c643}{PL061\_NUM\_GPIO}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00198}00198                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00199}00199 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00200}00200         \mbox{\hyperlink{pl061_8c_a8b34e4ccbac8d23d3705889280033b4a}{PL061\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00201}00201         \textcolor{keywordflow}{if} (bus\_read\_1(sc-\/>\mbox{\hyperlink{structpl061__softc_aec50ebf74c1fb8128a88931fad7b1b39}{sc\_mem\_res}}, \mbox{\hyperlink{pl061_8c_a240c8a51bc0d5785f6b609ad4e8fa5c7}{PL061\_PIN\_TO\_ADDR}}(\mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}})))}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00202}00202                 *value = GPIO\_PIN\_HIGH;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00203}00203         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00204}00204                 *value = GPIO\_PIN\_LOW;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00205}00205         \mbox{\hyperlink{pl061_8c_ace86625075390909c715f237546c8f06}{PL061\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00206}00206 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00207}00207         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00208}00208 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00209}00209 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00210}00210 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00211}\mbox{\hyperlink{pl061_8c_ab2608733a96cb4cb8798eee47c87e613}{00211}} \mbox{\hyperlink{pl061_8c_ab2608733a96cb4cb8798eee47c87e613}{pl061\_pin\_set}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, uint32\_t \mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}}, uint32\_t value)}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00212}00212 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00213}00213         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00214}00214         uint8\_t d = (value == GPIO\_PIN\_HIGH) ? 0xff : 0x00;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00215}00215 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00216}00216         sc = device\_get\_softc(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00217}00217         \textcolor{keywordflow}{if} (\mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}} >= \mbox{\hyperlink{pl061_8h_a7ad704cfedcf75048edbc02e8635c643}{PL061\_NUM\_GPIO}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00218}00218                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00219}00219 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00220}00220         \mbox{\hyperlink{pl061_8c_a8b34e4ccbac8d23d3705889280033b4a}{PL061\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00221}00221         bus\_write\_1(sc-\/>\mbox{\hyperlink{structpl061__softc_aec50ebf74c1fb8128a88931fad7b1b39}{sc\_mem\_res}}, \mbox{\hyperlink{pl061_8c_a240c8a51bc0d5785f6b609ad4e8fa5c7}{PL061\_PIN\_TO\_ADDR}}(\mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}}), d);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00222}00222         \mbox{\hyperlink{pl061_8c_ace86625075390909c715f237546c8f06}{PL061\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00223}00223 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00224}00224         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00225}00225 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00226}00226 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00227}00227 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00228}\mbox{\hyperlink{pl061_8c_a7cc64a88ca91c425b6e091fc60961c85}{00228}} \mbox{\hyperlink{pl061_8c_a7cc64a88ca91c425b6e091fc60961c85}{pl061\_pin\_toggle}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, uint32\_t \mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00229}00229 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00230}00230         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00231}00231         uint8\_t d;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00232}00232 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00233}00233         sc = device\_get\_softc(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00234}00234         \textcolor{keywordflow}{if} (\mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}} >= \mbox{\hyperlink{pl061_8h_a7ad704cfedcf75048edbc02e8635c643}{PL061\_NUM\_GPIO}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00235}00235                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00236}00236 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00237}00237         \mbox{\hyperlink{pl061_8c_a8b34e4ccbac8d23d3705889280033b4a}{PL061\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00238}00238         d = \string~bus\_read\_1(sc-\/>\mbox{\hyperlink{structpl061__softc_aec50ebf74c1fb8128a88931fad7b1b39}{sc\_mem\_res}}, \mbox{\hyperlink{pl061_8c_a240c8a51bc0d5785f6b609ad4e8fa5c7}{PL061\_PIN\_TO\_ADDR}}(\mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}}));}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00239}00239         bus\_write\_1(sc-\/>\mbox{\hyperlink{structpl061__softc_aec50ebf74c1fb8128a88931fad7b1b39}{sc\_mem\_res}}, \mbox{\hyperlink{pl061_8c_a240c8a51bc0d5785f6b609ad4e8fa5c7}{PL061\_PIN\_TO\_ADDR}}(\mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}}), d);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00240}00240         \mbox{\hyperlink{pl061_8c_ace86625075390909c715f237546c8f06}{PL061\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00241}00241 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00242}00242         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00243}00243 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00244}00244 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00245}00245 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00246}\mbox{\hyperlink{pl061_8c_af9b21e0f6b049e124803a9a2ed8a74e7}{00246}} \mbox{\hyperlink{pl061_8c_af9b21e0f6b049e124803a9a2ed8a74e7}{pl061\_pic\_disable\_intr}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{keyword}{struct} intr\_irqsrc *isrc)}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00247}00247 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00248}00248         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00249}00249         uint8\_t mask;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00250}00250 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00251}00251         sc = device\_get\_softc(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00252}00252         mask = 1 << ((\textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__pin__irqsrc}{pl061\_pin\_irqsrc}} *)\mbox{\hyperlink{structpl061__pin__irqsrc_a69cfca7b37f1eb7d6e6045a2e3d5290f}{isrc}})-\/>irq;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00253}00253 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00254}00254         \mbox{\hyperlink{pl061_8c_af24eafbfd3a4fcc1cacac5512d5f9e4a}{dprintf}}(\textcolor{stringliteral}{"{}\%s: calling disable interrupt \%\#x\(\backslash\)n"{}}, \_\_func\_\_, mask);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00255}00255         \mbox{\hyperlink{pl061_8c_a8b34e4ccbac8d23d3705889280033b4a}{PL061\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00256}00256         \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(sc, \mbox{\hyperlink{pl061_8c_ae90bb7ed7713c4de24a66680ce1d8360}{PL061\_INTMASK}}, mask, 0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00257}00257         \mbox{\hyperlink{pl061_8c_ace86625075390909c715f237546c8f06}{PL061\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00258}00258 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00259}00259 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00260}00260 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00261}00261 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00262}00262 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00263}\mbox{\hyperlink{pl061_8c_a0a52e286161f379154c9f51630395073}{00263}} \mbox{\hyperlink{pl061_8c_a0a52e286161f379154c9f51630395073}{pl061\_pic\_enable\_intr}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{keyword}{struct} intr\_irqsrc *\mbox{\hyperlink{structpl061__pin__irqsrc_a69cfca7b37f1eb7d6e6045a2e3d5290f}{isrc}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00264}00264 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00265}00265         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00266}00266         uint8\_t mask;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00267}00267 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00268}00268         sc = device\_get\_softc(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00269}00269         mask = 1 << ((\textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__pin__irqsrc}{pl061\_pin\_irqsrc}} *)\mbox{\hyperlink{structpl061__pin__irqsrc_a69cfca7b37f1eb7d6e6045a2e3d5290f}{isrc}})-\/>irq;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00270}00270 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00271}00271 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00272}00272         \mbox{\hyperlink{pl061_8c_af24eafbfd3a4fcc1cacac5512d5f9e4a}{dprintf}}(\textcolor{stringliteral}{"{}\%s: calling enable interrupt \%\#x\(\backslash\)n"{}}, \_\_func\_\_, mask);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00273}00273         \mbox{\hyperlink{pl061_8c_a8b34e4ccbac8d23d3705889280033b4a}{PL061\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00274}00274         \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(sc, \mbox{\hyperlink{pl061_8c_ae90bb7ed7713c4de24a66680ce1d8360}{PL061\_INTMASK}}, mask, mask);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00275}00275         \mbox{\hyperlink{pl061_8c_ace86625075390909c715f237546c8f06}{PL061\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00276}00276 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00277}00277 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00278}00278 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00279}\mbox{\hyperlink{pl061_8c_a1de43a918f4cad593365f0d0fd4c1296}{00279}} \mbox{\hyperlink{pl061_8c_a1de43a918f4cad593365f0d0fd4c1296}{pl061\_pic\_map\_intr}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{keyword}{struct} intr\_map\_data *data,}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00280}00280         \textcolor{keyword}{struct} intr\_irqsrc **isrcp)}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00281}00281 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00282}00282         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00283}00283         \textcolor{keyword}{struct }intr\_map\_data\_gpio *gdata;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00284}00284         uint32\_t irq;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00285}00285 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00286}00286         sc = device\_get\_softc(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00287}00287         \textcolor{keywordflow}{if} (data-\/>type != INTR\_MAP\_DATA\_GPIO)}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00288}00288                 \textcolor{keywordflow}{return} (ENOTSUP);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00289}00289 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00290}00290         gdata = (\textcolor{keyword}{struct }intr\_map\_data\_gpio *)data;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00291}00291         irq = gdata-\/>gpio\_pin\_num;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00292}00292         \textcolor{keywordflow}{if} (irq >= \mbox{\hyperlink{pl061_8h_a7ad704cfedcf75048edbc02e8635c643}{PL061\_NUM\_GPIO}}) \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00293}00293                 device\_printf(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{stringliteral}{"{}invalid interrupt number \%u\(\backslash\)n"{}}, irq);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00294}00294                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00295}00295         \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00296}00296 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00297}00297         \mbox{\hyperlink{pl061_8c_af24eafbfd3a4fcc1cacac5512d5f9e4a}{dprintf}}(\textcolor{stringliteral}{"{}\%s: calling map interrupt \%u\(\backslash\)n"{}}, \_\_func\_\_, irq);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00298}00298         *isrcp = \mbox{\hyperlink{pl061_8c_af25451020f0b46f4136b2cfdda1b28e2}{PIC\_INTR\_ISRC}}(sc, irq);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00299}00299 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00300}00300         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00301}00301 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00302}00302 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00303}00303 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00304}\mbox{\hyperlink{pl061_8c_a35f028e67d6623a16b68ffdf2abfee30}{00304}} \mbox{\hyperlink{pl061_8c_a35f028e67d6623a16b68ffdf2abfee30}{pl061\_pic\_setup\_intr}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{keyword}{struct} intr\_irqsrc *isrc,}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00305}00305         \textcolor{keyword}{struct} resource *res, \textcolor{keyword}{struct} intr\_map\_data *data)}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00306}00306 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00307}00307         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00308}00308         \textcolor{keyword}{struct }intr\_map\_data\_gpio *gdata;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00309}00309         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__pin__irqsrc}{pl061\_pin\_irqsrc}} *irqsrc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00310}00310         uint32\_t \mbox{\hyperlink{structpl061__pin__irqsrc_af502105c78769d66eeea26ca9bf220c7}{mode}};}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00311}00311         uint8\_t mask;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00312}00312 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00313}00313         \textcolor{keywordflow}{if} (data == NULL)}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00314}00314                 \textcolor{keywordflow}{return} (ENOTSUP);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00315}00315 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00316}00316         sc = device\_get\_softc(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00317}00317         gdata = (\textcolor{keyword}{struct }intr\_map\_data\_gpio *)data;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00318}00318         irqsrc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__pin__irqsrc}{pl061\_pin\_irqsrc}} *)\mbox{\hyperlink{structpl061__pin__irqsrc_a69cfca7b37f1eb7d6e6045a2e3d5290f}{isrc}};}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00319}00319 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00320}00320         \mbox{\hyperlink{structpl061__pin__irqsrc_af502105c78769d66eeea26ca9bf220c7}{mode}} = gdata-\/>gpio\_intr\_mode;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00321}00321         mask = 1 << gdata-\/>gpio\_pin\_num;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00322}00322 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00323}00323         \mbox{\hyperlink{pl061_8c_af24eafbfd3a4fcc1cacac5512d5f9e4a}{dprintf}}(\textcolor{stringliteral}{"{}\%s: calling setup interrupt \%u mode \%\#x\(\backslash\)n"{}}, \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00324}00324             irqsrc-\/>\mbox{\hyperlink{structpl061__pin__irqsrc_a57c2770193bad3e54787d69b46373649}{irq}}, \mbox{\hyperlink{structpl061__pin__irqsrc_af502105c78769d66eeea26ca9bf220c7}{mode}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00325}00325         \textcolor{keywordflow}{if} (irqsrc-\/>\mbox{\hyperlink{structpl061__pin__irqsrc_a57c2770193bad3e54787d69b46373649}{irq}} != gdata-\/>gpio\_pin\_num) \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00326}00326                 \mbox{\hyperlink{pl061_8c_af24eafbfd3a4fcc1cacac5512d5f9e4a}{dprintf}}(\textcolor{stringliteral}{"{}\%s: interrupts don't match\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00327}00327                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00328}00328         \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00329}00329 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00330}00330         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structpl061__pin__irqsrc_a69cfca7b37f1eb7d6e6045a2e3d5290f}{isrc}}-\/>isrc\_handlers != 0) \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00331}00331                 \mbox{\hyperlink{pl061_8c_af24eafbfd3a4fcc1cacac5512d5f9e4a}{dprintf}}(\textcolor{stringliteral}{"{}\%s: handler already attached\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00332}00332                 \textcolor{keywordflow}{return} (irqsrc-\/>\mbox{\hyperlink{structpl061__pin__irqsrc_af502105c78769d66eeea26ca9bf220c7}{mode}} == \mbox{\hyperlink{structpl061__pin__irqsrc_af502105c78769d66eeea26ca9bf220c7}{mode}} ? 0 : EINVAL);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00333}00333         \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00334}00334         irqsrc-\/>\mbox{\hyperlink{structpl061__pin__irqsrc_af502105c78769d66eeea26ca9bf220c7}{mode}} = \mbox{\hyperlink{structpl061__pin__irqsrc_af502105c78769d66eeea26ca9bf220c7}{mode}};}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00335}00335 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00336}00336         \mbox{\hyperlink{pl061_8c_a8b34e4ccbac8d23d3705889280033b4a}{PL061\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00337}00337 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00338}00338         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structpl061__pin__irqsrc_af502105c78769d66eeea26ca9bf220c7}{mode}} \& GPIO\_INTR\_EDGE\_BOTH) \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00339}00339                 \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(sc, \mbox{\hyperlink{pl061_8c_a68d5de72a14bf54b27ccfd749043788c}{PL061\_INTBOTHEDGES}}, mask, mask);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00340}00340                 \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(sc, \mbox{\hyperlink{pl061_8c_a954491737bfbf3adf65a8ada93fc1242}{PL061\_INTSENSE}}, mask, 0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00341}00341         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{structpl061__pin__irqsrc_af502105c78769d66eeea26ca9bf220c7}{mode}} \& GPIO\_INTR\_EDGE\_RISING) \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00342}00342                 \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(sc, \mbox{\hyperlink{pl061_8c_a68d5de72a14bf54b27ccfd749043788c}{PL061\_INTBOTHEDGES}}, mask, 0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00343}00343                 \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(sc, \mbox{\hyperlink{pl061_8c_a954491737bfbf3adf65a8ada93fc1242}{PL061\_INTSENSE}}, mask, 0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00344}00344                 \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(sc, \mbox{\hyperlink{pl061_8c_a43c13081782e4233f8a2d62aff8793d2}{PL061\_INTEVENT}}, mask, mask);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00345}00345         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{structpl061__pin__irqsrc_af502105c78769d66eeea26ca9bf220c7}{mode}} \& GPIO\_INTR\_EDGE\_FALLING) \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00346}00346                 \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(sc, \mbox{\hyperlink{pl061_8c_a68d5de72a14bf54b27ccfd749043788c}{PL061\_INTBOTHEDGES}}, mask, 0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00347}00347                 \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(sc, \mbox{\hyperlink{pl061_8c_a954491737bfbf3adf65a8ada93fc1242}{PL061\_INTSENSE}}, mask, 0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00348}00348                 \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(sc, \mbox{\hyperlink{pl061_8c_a43c13081782e4233f8a2d62aff8793d2}{PL061\_INTEVENT}}, mask, 0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00349}00349         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{structpl061__pin__irqsrc_af502105c78769d66eeea26ca9bf220c7}{mode}} \& GPIO\_INTR\_LEVEL\_HIGH) \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00350}00350                 \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(sc, \mbox{\hyperlink{pl061_8c_a68d5de72a14bf54b27ccfd749043788c}{PL061\_INTBOTHEDGES}}, mask, 0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00351}00351                 \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(sc, \mbox{\hyperlink{pl061_8c_a954491737bfbf3adf65a8ada93fc1242}{PL061\_INTSENSE}}, mask, mask);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00352}00352                 \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(sc, \mbox{\hyperlink{pl061_8c_a43c13081782e4233f8a2d62aff8793d2}{PL061\_INTEVENT}}, mask, mask);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00353}00353         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{structpl061__pin__irqsrc_af502105c78769d66eeea26ca9bf220c7}{mode}} \& GPIO\_INTR\_LEVEL\_LOW) \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00354}00354                 \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(sc, \mbox{\hyperlink{pl061_8c_a68d5de72a14bf54b27ccfd749043788c}{PL061\_INTBOTHEDGES}}, mask, 0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00355}00355                 \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(sc, \mbox{\hyperlink{pl061_8c_a954491737bfbf3adf65a8ada93fc1242}{PL061\_INTSENSE}}, mask, mask);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00356}00356                 \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(sc, \mbox{\hyperlink{pl061_8c_a43c13081782e4233f8a2d62aff8793d2}{PL061\_INTEVENT}}, mask, 0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00357}00357         \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00358}00358         \mbox{\hyperlink{pl061_8c_ace86625075390909c715f237546c8f06}{PL061\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00359}00359         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00360}00360 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00361}00361 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00362}00362 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00363}\mbox{\hyperlink{pl061_8c_a4e104cb6ac85b15d19fe630b08c54814}{00363}} \mbox{\hyperlink{pl061_8c_a4e104cb6ac85b15d19fe630b08c54814}{pl061\_pic\_teardown\_intr}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{keyword}{struct} intr\_irqsrc *\mbox{\hyperlink{structpl061__pin__irqsrc_a69cfca7b37f1eb7d6e6045a2e3d5290f}{isrc}},}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00364}00364         \textcolor{keyword}{struct} resource *res, \textcolor{keyword}{struct} intr\_map\_data *data)}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00365}00365 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00366}00366         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00367}00367         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__pin__irqsrc}{pl061\_pin\_irqsrc}} *irqsrc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00368}00368         uint8\_t mask;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00369}00369 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00370}00370         irqsrc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__pin__irqsrc}{pl061\_pin\_irqsrc}} *)\mbox{\hyperlink{structpl061__pin__irqsrc_a69cfca7b37f1eb7d6e6045a2e3d5290f}{isrc}};}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00371}00371         mask = 1 << irqsrc-\/>\mbox{\hyperlink{structpl061__pin__irqsrc_a57c2770193bad3e54787d69b46373649}{irq}};}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00372}00372         \mbox{\hyperlink{pl061_8c_af24eafbfd3a4fcc1cacac5512d5f9e4a}{dprintf}}(\textcolor{stringliteral}{"{}\%s: calling teardown interrupt \%\#x\(\backslash\)n"{}}, \_\_func\_\_, mask);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00373}00373 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00374}00374         sc = device\_get\_softc(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00375}00375         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structpl061__pin__irqsrc_a69cfca7b37f1eb7d6e6045a2e3d5290f}{isrc}}-\/>isrc\_handlers == 0) \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00376}00376                 irqsrc-\/>\mbox{\hyperlink{structpl061__pin__irqsrc_af502105c78769d66eeea26ca9bf220c7}{mode}} = \mbox{\hyperlink{gpiobusvar_8h_a31dd0d314ac17c32504b81c240347298}{GPIO\_INTR\_CONFORM}};}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00377}00377                 \mbox{\hyperlink{pl061_8c_a8b34e4ccbac8d23d3705889280033b4a}{PL061\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00378}00378                 \mbox{\hyperlink{pl061_8c_a9877d96bf4da6d3272e1a451d808e042}{mask\_and\_set}}(sc, \mbox{\hyperlink{pl061_8c_ae90bb7ed7713c4de24a66680ce1d8360}{PL061\_INTMASK}}, mask, 0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00379}00379                 \mbox{\hyperlink{pl061_8c_ace86625075390909c715f237546c8f06}{PL061\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00380}00380         \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00381}00381         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00382}00382 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00383}00383 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00384}00384 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00385}\mbox{\hyperlink{pl061_8c_a787bc898c13059fa00bfd2aa4cab475a}{00385}} \mbox{\hyperlink{pl061_8c_a787bc898c13059fa00bfd2aa4cab475a}{pl061\_pic\_post\_filter}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{keyword}{struct} intr\_irqsrc *\mbox{\hyperlink{structpl061__pin__irqsrc_a69cfca7b37f1eb7d6e6045a2e3d5290f}{isrc}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00386}00386 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00387}00387         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00388}00388         uint8\_t mask;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00389}00389 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00390}00390         sc = device\_get\_softc(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00391}00391         mask = 1 << ((\textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__pin__irqsrc}{pl061\_pin\_irqsrc}} *)\mbox{\hyperlink{structpl061__pin__irqsrc_a69cfca7b37f1eb7d6e6045a2e3d5290f}{isrc}})-\/>irq;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00392}00392         \mbox{\hyperlink{pl061_8c_af24eafbfd3a4fcc1cacac5512d5f9e4a}{dprintf}}(\textcolor{stringliteral}{"{}\%s: calling post filter \%\#x\(\backslash\)n"{}}, \_\_func\_\_, mask);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00393}00393 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00394}00394         bus\_write\_1(sc-\/>\mbox{\hyperlink{structpl061__softc_aec50ebf74c1fb8128a88931fad7b1b39}{sc\_mem\_res}}, \mbox{\hyperlink{pl061_8c_a0d8826fd2aa2183067c7b16c000919d0}{PL061\_INTCLR}}, mask);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00395}00395 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00396}00396 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00397}00397 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00398}\mbox{\hyperlink{pl061_8c_ac2f6e697d0c970c66bb9ef07aac0be78}{00398}} \mbox{\hyperlink{pl061_8c_ac2f6e697d0c970c66bb9ef07aac0be78}{pl061\_pic\_post\_ithread}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{keyword}{struct} intr\_irqsrc *\mbox{\hyperlink{structpl061__pin__irqsrc_a69cfca7b37f1eb7d6e6045a2e3d5290f}{isrc}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00399}00399 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00400}00400         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00401}00401         uint8\_t mask;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00402}00402 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00403}00403         sc = device\_get\_softc(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00404}00404         mask = 1 << ((\textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__pin__irqsrc}{pl061\_pin\_irqsrc}} *)\mbox{\hyperlink{structpl061__pin__irqsrc_a69cfca7b37f1eb7d6e6045a2e3d5290f}{isrc}})-\/>irq;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00405}00405         \mbox{\hyperlink{pl061_8c_af24eafbfd3a4fcc1cacac5512d5f9e4a}{dprintf}}(\textcolor{stringliteral}{"{}\%s: calling post ithread \%\#x\(\backslash\)n"{}}, \_\_func\_\_, mask);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00406}00406         bus\_write\_1(sc-\/>\mbox{\hyperlink{structpl061__softc_aec50ebf74c1fb8128a88931fad7b1b39}{sc\_mem\_res}}, \mbox{\hyperlink{pl061_8c_a0d8826fd2aa2183067c7b16c000919d0}{PL061\_INTCLR}}, mask);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00407}00407 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00408}00408         \mbox{\hyperlink{pl061_8c_a0a52e286161f379154c9f51630395073}{pl061\_pic\_enable\_intr}}(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \mbox{\hyperlink{structpl061__pin__irqsrc_a69cfca7b37f1eb7d6e6045a2e3d5290f}{isrc}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00409}00409 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00410}00410 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00411}00411 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00412}\mbox{\hyperlink{pl061_8c_a1957666d458761c67129274176fe2cb4}{00412}} \mbox{\hyperlink{pl061_8c_a1957666d458761c67129274176fe2cb4}{pl061\_pic\_pre\_ithread}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{keyword}{struct} intr\_irqsrc *\mbox{\hyperlink{structpl061__pin__irqsrc_a69cfca7b37f1eb7d6e6045a2e3d5290f}{isrc}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00413}00413 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00414}00414         \mbox{\hyperlink{pl061_8c_af9b21e0f6b049e124803a9a2ed8a74e7}{pl061\_pic\_disable\_intr}}(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \mbox{\hyperlink{structpl061__pin__irqsrc_a69cfca7b37f1eb7d6e6045a2e3d5290f}{isrc}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00415}00415 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00416}00416 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00417}00417 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00418}\mbox{\hyperlink{pl061_8c_affd207fa3a6b0d200cf81f77be359724}{00418}} \mbox{\hyperlink{pl061_8c_affd207fa3a6b0d200cf81f77be359724}{pl061\_intr}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00419}00419 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00420}00420         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00421}00421         \textcolor{keyword}{struct }trapframe *tf;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00422}00422         uint8\_t status;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00423}00423         \textcolor{keywordtype}{int} \mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}};}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00424}00424 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00425}00425         sc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *)arg;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00426}00426         tf = curthread-\/>td\_intr\_frame;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00427}00427 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00428}00428         status = bus\_read\_1(sc-\/>\mbox{\hyperlink{structpl061__softc_aec50ebf74c1fb8128a88931fad7b1b39}{sc\_mem\_res}}, \mbox{\hyperlink{pl061_8c_a026f10400094589789bcc130f8176d1a}{PL061\_STATUS}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00429}00429 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00430}00430         \textcolor{keywordflow}{while} (status != 0) \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00431}00431                 \mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}} = ffs(status) -\/ 1;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00432}00432                 status \&= \string~(1 << \mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00433}00433 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00434}00434                 \textcolor{keywordflow}{if} (intr\_isrc\_dispatch(\mbox{\hyperlink{pl061_8c_af25451020f0b46f4136b2cfdda1b28e2}{PIC\_INTR\_ISRC}}(sc, \mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}}), tf) != 0)}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00435}00435                         device\_printf(sc-\/>\mbox{\hyperlink{structpl061__softc_a107d6b4459b326ab6db270fab75c023e}{sc\_dev}}, \textcolor{stringliteral}{"{}spurious interrupt \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00436}00436                             \mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00437}00437 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00438}00438                 \mbox{\hyperlink{pl061_8c_af24eafbfd3a4fcc1cacac5512d5f9e4a}{dprintf}}(\textcolor{stringliteral}{"{}got IRQ on \%d\(\backslash\)n"{}}, \mbox{\hyperlink{gpio__if_8m_ad42c8c8e9330d63f923bc677a1810042}{pin}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00439}00439 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00440}00440         \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00441}00441         \textcolor{keywordflow}{return} (FILTER\_HANDLED);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00442}00442 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00443}00443 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00444}00444 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00445}\mbox{\hyperlink{pl061_8c_af8e43142326c5cfde81fa3d2c67e8ed2}{00445}} \mbox{\hyperlink{pl061_8c_af8e43142326c5cfde81fa3d2c67e8ed2}{pl061\_attach}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00446}00446 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00447}00447         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00448}00448         \textcolor{keywordtype}{int} ret;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00449}00449         \textcolor{keywordtype}{int} irq;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00450}00450         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{gpio__if_8m_afcd1706c9144e6d6eee6127661ae3be2}{name}};}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00451}00451 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00452}00452         sc = device\_get\_softc(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00453}00453         sc-\/>\mbox{\hyperlink{structpl061__softc_a107d6b4459b326ab6db270fab75c023e}{sc\_dev}} = \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}};}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00454}00454 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00455}00455         sc-\/>\mbox{\hyperlink{structpl061__softc_aa3e7c33dbad3002d6be60eefe5cce358}{sc\_mem\_rid}} = 0;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00456}00456         sc-\/>\mbox{\hyperlink{structpl061__softc_aec50ebf74c1fb8128a88931fad7b1b39}{sc\_mem\_res}} = bus\_alloc\_resource\_any(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00457}00457             \&sc-\/>\mbox{\hyperlink{structpl061__softc_aa3e7c33dbad3002d6be60eefe5cce358}{sc\_mem\_rid}}, RF\_ACTIVE);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00458}00458         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structpl061__softc_aec50ebf74c1fb8128a88931fad7b1b39}{sc\_mem\_res}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00459}00459                 device\_printf(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{stringliteral}{"{}can't allocate memory resource\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00460}00460                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00461}00461         \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00462}00462 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00463}00463         sc-\/>\mbox{\hyperlink{structpl061__softc_a969d6991152086147af15cb1282a3ee6}{sc\_irq\_rid}} = 0;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00464}00464         sc-\/>\mbox{\hyperlink{structpl061__softc_a6bc5b6b590698c7059b9a6344d5859db}{sc\_irq\_res}} = bus\_alloc\_resource\_any(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, SYS\_RES\_IRQ,}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00465}00465             \&sc-\/>\mbox{\hyperlink{structpl061__softc_a969d6991152086147af15cb1282a3ee6}{sc\_irq\_rid}}, RF\_ACTIVE);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00466}00466 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00467}00467         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structpl061__softc_a6bc5b6b590698c7059b9a6344d5859db}{sc\_irq\_res}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00468}00468                 device\_printf(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{stringliteral}{"{}can't allocate IRQ resource\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00469}00469                 \textcolor{keywordflow}{goto} free\_mem;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00470}00470         \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00471}00471 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00472}00472         ret = bus\_setup\_intr(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, sc-\/>\mbox{\hyperlink{structpl061__softc_a6bc5b6b590698c7059b9a6344d5859db}{sc\_irq\_res}}, INTR\_TYPE\_MISC | INTR\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00473}00473             \mbox{\hyperlink{pl061_8c_affd207fa3a6b0d200cf81f77be359724}{pl061\_intr}}, NULL, sc, \&sc-\/>\mbox{\hyperlink{structpl061__softc_a9514961cc239d2c204caccc36083c550}{sc\_irq\_hdlr}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00474}00474         \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00475}00475                 device\_printf(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{stringliteral}{"{}can't setup IRQ\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00476}00476                 \textcolor{keywordflow}{goto} free\_pic;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00477}00477         \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00478}00478 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00479}00479         \mbox{\hyperlink{gpio__if_8m_afcd1706c9144e6d6eee6127661ae3be2}{name}} = device\_get\_nameunit(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00480}00480 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00481}00481         \textcolor{keywordflow}{for} (irq = 0; irq < \mbox{\hyperlink{pl061_8h_a7ad704cfedcf75048edbc02e8635c643}{PL061\_NUM\_GPIO}}; irq++) \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00482}00482                 \textcolor{keywordflow}{if} (bootverbose) \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00483}00483                         device\_printf(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}},}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00484}00484                             \textcolor{stringliteral}{"{}trying to register pin \%d name \%s\(\backslash\)n"{}}, irq, \mbox{\hyperlink{gpio__if_8m_afcd1706c9144e6d6eee6127661ae3be2}{name}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00485}00485                 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00486}00486                 sc-\/>\mbox{\hyperlink{structpl061__softc_ad5220b631f543e7c14825c4fdf6bad8b}{sc\_isrcs}}[irq].\mbox{\hyperlink{structpl061__pin__irqsrc_a57c2770193bad3e54787d69b46373649}{irq}} = irq;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00487}00487                 sc-\/>\mbox{\hyperlink{structpl061__softc_ad5220b631f543e7c14825c4fdf6bad8b}{sc\_isrcs}}[irq].\mbox{\hyperlink{structpl061__pin__irqsrc_af502105c78769d66eeea26ca9bf220c7}{mode}} = \mbox{\hyperlink{gpiobusvar_8h_a31dd0d314ac17c32504b81c240347298}{GPIO\_INTR\_CONFORM}};}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00488}00488                 ret = intr\_isrc\_register(\mbox{\hyperlink{pl061_8c_af25451020f0b46f4136b2cfdda1b28e2}{PIC\_INTR\_ISRC}}(sc, irq), \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, 0,}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00489}00489                     \textcolor{stringliteral}{"{}\%s"{}}, \mbox{\hyperlink{gpio__if_8m_afcd1706c9144e6d6eee6127661ae3be2}{name}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00490}00490                 \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00491}00491                         device\_printf(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{stringliteral}{"{}can't register isrc \%d\(\backslash\)n"{}}, ret);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00492}00492                         \textcolor{keywordflow}{goto} free\_isrc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00493}00493                 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00494}00494         \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00495}00495 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00496}00496         sc-\/>\mbox{\hyperlink{structpl061__softc_a5b390f7c493e2386c5db452946404293}{sc\_busdev}} = \mbox{\hyperlink{gpiobus_8c_a7b6323e37b10110960f27a34d6fff620}{gpiobus\_attach\_bus}}(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00497}00497         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structpl061__softc_a5b390f7c493e2386c5db452946404293}{sc\_busdev}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00498}00498                 device\_printf(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{stringliteral}{"{}couldn't attach gpio bus\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00499}00499                 \textcolor{keywordflow}{goto} free\_isrc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00500}00500         \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00501}00501 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00502}00502         mtx\_init(\&sc-\/>\mbox{\hyperlink{structpl061__softc_a107cf42faf222cca50ce19f580325c0c}{sc\_mtx}}, device\_get\_nameunit(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}), \textcolor{stringliteral}{"{}pl061"{}}, MTX\_SPIN);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00503}00503 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00504}00504         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00505}00505 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00506}00506 free\_isrc:}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00507}00507         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00508}00508 \textcolor{comment}{         * XXX isrc\_release\_counters() not implemented}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00509}00509 \textcolor{comment}{         * for (irq = 0; irq < PL061\_NUM\_GPIO; irq++)}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00510}00510 \textcolor{comment}{         *      intr\_isrc\_deregister(PIC\_INTR\_ISRC(sc, irq));}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00511}00511 \textcolor{comment}{        */}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00512}00512         bus\_release\_resource(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, SYS\_RES\_IRQ, sc-\/>\mbox{\hyperlink{structpl061__softc_a969d6991152086147af15cb1282a3ee6}{sc\_irq\_rid}},}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00513}00513             sc-\/>\mbox{\hyperlink{structpl061__softc_a6bc5b6b590698c7059b9a6344d5859db}{sc\_irq\_res}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00514}00514 free\_pic:}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00515}00515         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00516}00516 \textcolor{comment}{         * XXX intr\_pic\_deregister: not implemented}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00517}00517 \textcolor{comment}{         * intr\_pic\_deregister(dev, 0);}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00518}00518 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00519}00519 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00520}00520 free\_mem:}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00521}00521         bus\_release\_resource(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, SYS\_RES\_MEMORY, sc-\/>\mbox{\hyperlink{structpl061__softc_aa3e7c33dbad3002d6be60eefe5cce358}{sc\_mem\_rid}},}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00522}00522             sc-\/>\mbox{\hyperlink{structpl061__softc_aec50ebf74c1fb8128a88931fad7b1b39}{sc\_mem\_res}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00523}00523 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00524}00524         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00525}00525 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00526}00526 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00527}00527 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00528}00528 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00529}\mbox{\hyperlink{pl061_8c_af236a3e3e082930c4465756668298780}{00529}} \mbox{\hyperlink{pl061_8c_af236a3e3e082930c4465756668298780}{pl061\_detach}}(device\_t \mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00530}00530 \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00531}00531         \textcolor{keyword}{struct }\mbox{\hyperlink{structpl061__softc}{pl061\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00532}00532         sc = device\_get\_softc(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00533}00533 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00534}00534         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structpl061__softc_a5b390f7c493e2386c5db452946404293}{sc\_busdev}})}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00535}00535                 \mbox{\hyperlink{gpiobus_8c_a950ebeeeccb7a9a69ba9e5c3411e85fe}{gpiobus\_detach\_bus}}(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00536}00536 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00537}00537         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structpl061__softc_a9514961cc239d2c204caccc36083c550}{sc\_irq\_hdlr}} != NULL)}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00538}00538                 bus\_teardown\_intr(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, sc-\/>\mbox{\hyperlink{structpl061__softc_a6bc5b6b590698c7059b9a6344d5859db}{sc\_irq\_res}}, sc-\/>\mbox{\hyperlink{structpl061__softc_a9514961cc239d2c204caccc36083c550}{sc\_irq\_hdlr}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00539}00539 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00540}00540         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structpl061__softc_a6bc5b6b590698c7059b9a6344d5859db}{sc\_irq\_res}} != NULL)}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00541}00541                 bus\_release\_resource(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, SYS\_RES\_IRQ, sc-\/>\mbox{\hyperlink{structpl061__softc_a969d6991152086147af15cb1282a3ee6}{sc\_irq\_rid}},}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00542}00542                     sc-\/>\mbox{\hyperlink{structpl061__softc_a6bc5b6b590698c7059b9a6344d5859db}{sc\_irq\_res}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00543}00543 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00544}00544         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structpl061__softc_aec50ebf74c1fb8128a88931fad7b1b39}{sc\_mem\_res}} != NULL)}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00545}00545                 bus\_release\_resource(\mbox{\hyperlink{gpio__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, SYS\_RES\_MEMORY, sc-\/>\mbox{\hyperlink{structpl061__softc_aa3e7c33dbad3002d6be60eefe5cce358}{sc\_mem\_rid}},}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00546}00546                     sc-\/>\mbox{\hyperlink{structpl061__softc_aec50ebf74c1fb8128a88931fad7b1b39}{sc\_mem\_res}});}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00547}00547         \mbox{\hyperlink{pl061_8c_a4c2878bfee4e9d3e09f37d6900bf049c}{PL061\_LOCK\_DESTROY}}(sc);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00548}00548         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00549}00549 \}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00550}00550 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00551}\mbox{\hyperlink{pl061_8c_a1120bce7ff273b8c1a6c4505b1121c70}{00551}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{pl061_8c_a1120bce7ff273b8c1a6c4505b1121c70}{pl061\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00552}00552         \textcolor{comment}{/* Device interface */}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00553}00553         DEVMETHOD(device\_attach,        \mbox{\hyperlink{pl061_8c_af8e43142326c5cfde81fa3d2c67e8ed2}{pl061\_attach}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00554}00554         DEVMETHOD(device\_detach,        \mbox{\hyperlink{pl061_8c_af236a3e3e082930c4465756668298780}{pl061\_detach}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00555}00555 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00556}00556         \textcolor{comment}{/* Bus interface */}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00557}00557         DEVMETHOD(bus\_setup\_intr,       bus\_generic\_setup\_intr),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00558}00558         DEVMETHOD(bus\_activate\_resource,        bus\_generic\_activate\_resource),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00559}00559         DEVMETHOD(bus\_deactivate\_resource,      bus\_generic\_deactivate\_resource),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00560}00560 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00561}00561         \textcolor{comment}{/* GPIO protocol */}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00562}00562         DEVMETHOD(gpio\_get\_bus,         \mbox{\hyperlink{pl061_8c_a76be95db0ccbaa6a88efd6306bd981d8}{pl061\_get\_bus}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00563}00563         DEVMETHOD(gpio\_pin\_max,         \mbox{\hyperlink{pl061_8c_a24762b2926eca65bb87a31ddb092aaf8}{pl061\_pin\_max}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00564}00564         DEVMETHOD(gpio\_pin\_getname,     \mbox{\hyperlink{pl061_8c_a53ad55ee4cfe3cd773031d51f333f68f}{pl061\_pin\_getname}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00565}00565         DEVMETHOD(gpio\_pin\_getflags,    \mbox{\hyperlink{pl061_8c_adee2b85c71a46cd216982599aaf71747}{pl061\_pin\_getflags}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00566}00566         DEVMETHOD(\mbox{\hyperlink{gpiobus_8c_a8e7a10a0251ef6ad8d399f97f421a381}{gpio\_pin\_getcaps}},     \mbox{\hyperlink{pl061_8c_a6a068f6945c2eb80ed7e2427113dae3c}{pl061\_pin\_getcaps}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00567}00567         DEVMETHOD(\mbox{\hyperlink{gpiobus_8c_acf33df01cece89c7a6ce8c41c378d376}{gpio\_pin\_setflags}},   \mbox{\hyperlink{pl061_8c_a4c0c7d850c6319a256f9c9883ee80a54}{pl061\_pin\_setflags}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00568}00568         DEVMETHOD(gpio\_pin\_get,         \mbox{\hyperlink{pl061_8c_ab6f8b072396a1f3390eb9de1bc411c8c}{pl061\_pin\_get}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00569}00569         DEVMETHOD(gpio\_pin\_set,         \mbox{\hyperlink{pl061_8c_ab2608733a96cb4cb8798eee47c87e613}{pl061\_pin\_set}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00570}00570         DEVMETHOD(gpio\_pin\_toggle,      \mbox{\hyperlink{pl061_8c_a7cc64a88ca91c425b6e091fc60961c85}{pl061\_pin\_toggle}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00571}00571 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00572}00572         \textcolor{comment}{/* Interrupt controller interface */}}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00573}00573         DEVMETHOD(pic\_disable\_intr,     \mbox{\hyperlink{pl061_8c_af9b21e0f6b049e124803a9a2ed8a74e7}{pl061\_pic\_disable\_intr}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00574}00574         DEVMETHOD(pic\_enable\_intr,      \mbox{\hyperlink{pl061_8c_a0a52e286161f379154c9f51630395073}{pl061\_pic\_enable\_intr}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00575}00575         DEVMETHOD(pic\_map\_intr,         \mbox{\hyperlink{pl061_8c_a1de43a918f4cad593365f0d0fd4c1296}{pl061\_pic\_map\_intr}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00576}00576         DEVMETHOD(pic\_setup\_intr,       \mbox{\hyperlink{pl061_8c_a35f028e67d6623a16b68ffdf2abfee30}{pl061\_pic\_setup\_intr}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00577}00577         DEVMETHOD(pic\_teardown\_intr,    \mbox{\hyperlink{pl061_8c_a4e104cb6ac85b15d19fe630b08c54814}{pl061\_pic\_teardown\_intr}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00578}00578         DEVMETHOD(pic\_post\_filter,      \mbox{\hyperlink{pl061_8c_a787bc898c13059fa00bfd2aa4cab475a}{pl061\_pic\_post\_filter}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00579}00579         DEVMETHOD(pic\_post\_ithread,     \mbox{\hyperlink{pl061_8c_ac2f6e697d0c970c66bb9ef07aac0be78}{pl061\_pic\_post\_ithread}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00580}00580         DEVMETHOD(pic\_pre\_ithread,      \mbox{\hyperlink{pl061_8c_a1957666d458761c67129274176fe2cb4}{pl061\_pic\_pre\_ithread}}),}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00581}00581 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00582}00582         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00583}00583 \};}
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00584}00584 }
\DoxyCodeLine{\Hypertarget{pl061_8c_source_l00585}\mbox{\hyperlink{pl061_8c_a5d3812a857c2c23a9eba450cc2c773d9}{00585}} \mbox{\hyperlink{pl061_8c_a5d3812a857c2c23a9eba450cc2c773d9}{DEFINE\_CLASS\_0}}(\mbox{\hyperlink{gpio__if_8m_a8bf36e19752c12457973c5efece64294}{gpio}}, pl061\_driver, \mbox{\hyperlink{pl061_8c_a1120bce7ff273b8c1a6c4505b1121c70}{pl061\_methods}}, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structpl061__softc}{pl061\_softc}}));}

\end{DoxyCode}
