| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: imx6_usb.c,v 1.3 2021/01/27 03:10:20 thorpej Exp $ */ | | 1 | /* $NetBSD: imx6_usb.c,v 1.4 2021/01/30 09:48:59 skrll Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2019 Genetec Corporation. All rights reserved. | | 4 | * Copyright (c) 2019 Genetec Corporation. All rights reserved. |
5 | * Written by Hashimoto Kenichi for Genetec Corporation. | | 5 | * Written by Hashimoto Kenichi for Genetec Corporation. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -17,27 +17,27 @@ | | | @@ -17,27 +17,27 @@ |
17 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | | 17 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
18 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | | 18 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
19 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | | 19 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | | 20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
21 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | | 21 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | | 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
24 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 24 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
26 | * SUCH DAMAGE. | | 26 | * SUCH DAMAGE. |
27 | */ | | 27 | */ |
28 | | | 28 | |
29 | #include <sys/cdefs.h> | | 29 | #include <sys/cdefs.h> |
30 | __KERNEL_RCSID(0, "$NetBSD: imx6_usb.c,v 1.3 2021/01/27 03:10:20 thorpej Exp $"); | | 30 | __KERNEL_RCSID(0, "$NetBSD: imx6_usb.c,v 1.4 2021/01/30 09:48:59 skrll Exp $"); |
31 | | | 31 | |
32 | #include "opt_fdt.h" | | 32 | #include "opt_fdt.h" |
33 | | | 33 | |
34 | #include <locators.h> | | 34 | #include <locators.h> |
35 | | | 35 | |
36 | #include <sys/param.h> | | 36 | #include <sys/param.h> |
37 | #include <sys/systm.h> | | 37 | #include <sys/systm.h> |
38 | #include <sys/conf.h> | | 38 | #include <sys/conf.h> |
39 | #include <sys/kernel.h> | | 39 | #include <sys/kernel.h> |
40 | #include <sys/device.h> | | 40 | #include <sys/device.h> |
41 | #include <sys/intr.h> | | 41 | #include <sys/intr.h> |
42 | #include <sys/bus.h> | | 42 | #include <sys/bus.h> |
43 | | | 43 | |
| @@ -166,27 +166,27 @@ imx6_usb_attach(device_t parent, device_ | | | @@ -166,27 +166,27 @@ imx6_usb_attach(device_t parent, device_ |
166 | iaa.aa_irq = IMXUSBCCF_IRQ_DEFAULT; | | 166 | iaa.aa_irq = IMXUSBCCF_IRQ_DEFAULT; |
167 | config_found_sm_loc(self, "imxusbc", NULL, &iaa, imxusbc_print, NULL); | | 167 | config_found_sm_loc(self, "imxusbc", NULL, &iaa, imxusbc_print, NULL); |
168 | | | 168 | |
169 | return; | | 169 | return; |
170 | } | | 170 | } |
171 | | | 171 | |
172 | static int | | 172 | static int |
173 | imxusbc_print(void *aux, const char *name __unused) | | 173 | imxusbc_print(void *aux, const char *name __unused) |
174 | { | | 174 | { |
175 | struct imxusbc_attach_args *iaa; | | 175 | struct imxusbc_attach_args *iaa; |
176 | | | 176 | |
177 | iaa = (struct imxusbc_attach_args *)aux; | | 177 | iaa = (struct imxusbc_attach_args *)aux; |
178 | | | 178 | |
179 | aprint_normal(" unit %d intr %d", iaa->aa_unit, iaa->aa_irq); | | 179 | aprint_normal(" unit %d", iaa->aa_unit); |
180 | return UNCONF; | | 180 | return UNCONF; |
181 | } | | 181 | } |
182 | | | 182 | |
183 | | | 183 | |
184 | static int | | 184 | static int |
185 | imx6_usb_init_clocks(struct imxusbc_softc *sc) | | 185 | imx6_usb_init_clocks(struct imxusbc_softc *sc) |
186 | { | | 186 | { |
187 | int error; | | 187 | int error; |
188 | | | 188 | |
189 | error = clk_enable(sc->sc_clk); | | 189 | error = clk_enable(sc->sc_clk); |
190 | if (error) { | | 190 | if (error) { |
191 | aprint_error_dev(sc->sc_dev, "couldn't enable: %d\n", error); | | 191 | aprint_error_dev(sc->sc_dev, "couldn't enable: %d\n", error); |
192 | return error; | | 192 | return error; |