Mon Jan 25 14:25:09 2021 UTC ()
Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.


(thorpej)
diff -r1.3 -r1.4 src/sys/dev/fdt/amdccp_fdt.c
diff -r1.3 -r1.4 src/sys/dev/fdt/panel_fdt.c
diff -r1.2 -r1.3 src/sys/dev/fdt/connector_fdt.c
diff -r1.2 -r1.3 src/sys/dev/fdt/pinctrl_single.c
diff -r1.2 -r1.3 src/sys/dev/fdt/vmt_fdt.c
diff -r1.7 -r1.8 src/sys/dev/fdt/dwc2_fdt.c
diff -r1.7 -r1.8 src/sys/dev/fdt/i2cmux_fdt.c
diff -r1.13 -r1.14 src/sys/dev/fdt/dwcmmc_fdt.c
diff -r1.4 -r1.5 src/sys/dev/fdt/ns8250_uart.c

cvs diff -r1.3 -r1.4 src/sys/dev/fdt/amdccp_fdt.c (expand / switch to unified diff)

--- src/sys/dev/fdt/amdccp_fdt.c 2021/01/18 02:35:49 1.3
+++ src/sys/dev/fdt/amdccp_fdt.c 2021/01/25 14:25:09 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: amdccp_fdt.c,v 1.3 2021/01/18 02:35:49 thorpej Exp $ */ 1/* $NetBSD: amdccp_fdt.c,v 1.4 2021/01/25 14:25:09 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2018 Jonathan A. Kollasch 4 * Copyright (c) 2018 Jonathan A. Kollasch
5 * All rights reserved. 5 * All rights reserved.
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.
@@ -18,51 +18,50 @@ @@ -18,51 +18,50 @@
18 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
20 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
23 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
25 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
26 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29#include <sys/cdefs.h> 29#include <sys/cdefs.h>
30 30
31__KERNEL_RCSID(0, "$NetBSD: amdccp_fdt.c,v 1.3 2021/01/18 02:35:49 thorpej Exp $"); 31__KERNEL_RCSID(0, "$NetBSD: amdccp_fdt.c,v 1.4 2021/01/25 14:25:09 thorpej Exp $");
32 32
33#include <sys/param.h> 33#include <sys/param.h>
34#include <sys/systm.h> 34#include <sys/systm.h>
35#include <sys/device.h> 35#include <sys/device.h>
36#include <sys/bus.h> 36#include <sys/bus.h>
37 37
38#include <dev/fdt/fdtvar.h> 38#include <dev/fdt/fdtvar.h>
39 39
40#include <dev/ic/amdccpvar.h> 40#include <dev/ic/amdccpvar.h>
41 41
42struct amdccp_fdt_softc { 42struct amdccp_fdt_softc {
43 struct amdccp_softc sc_sc; 43 struct amdccp_softc sc_sc;
44}; 44};
45 45
46static int amdccp_fdt_match(device_t, cfdata_t, void *); 46static int amdccp_fdt_match(device_t, cfdata_t, void *);
47static void amdccp_fdt_attach(device_t, device_t, void *); 47static void amdccp_fdt_attach(device_t, device_t, void *);
48 48
49CFATTACH_DECL_NEW(amdccp_fdt, sizeof(struct amdccp_fdt_softc), 49CFATTACH_DECL_NEW(amdccp_fdt, sizeof(struct amdccp_fdt_softc),
50 amdccp_fdt_match, amdccp_fdt_attach, NULL, NULL); 50 amdccp_fdt_match, amdccp_fdt_attach, NULL, NULL);
51 51
52static const struct device_compatible_entry compat_data[] = { 52static const struct device_compatible_entry compat_data[] = {
53 { .compat = "amd,ccp-seattle-v1a" }, 53 { .compat = "amd,ccp-seattle-v1a" },
54 54 { }
55 { 0 } 
56}; 55};
57 56
58static int 57static int
59amdccp_fdt_match(device_t parent, cfdata_t cf, void *aux) 58amdccp_fdt_match(device_t parent, cfdata_t cf, void *aux)
60{ 59{
61 const struct fdt_attach_args * const faa = aux; 60 const struct fdt_attach_args * const faa = aux;
62 61
63 return of_match_compat_data(faa->faa_phandle, compat_data); 62 return of_match_compat_data(faa->faa_phandle, compat_data);
64} 63}
65 64
66static void 65static void
67amdccp_fdt_attach(device_t parent, device_t self, void *aux) 66amdccp_fdt_attach(device_t parent, device_t self, void *aux)
68{ 67{

cvs diff -r1.3 -r1.4 src/sys/dev/fdt/panel_fdt.c (expand / switch to unified diff)

--- src/sys/dev/fdt/panel_fdt.c 2021/01/18 02:35:49 1.3
+++ src/sys/dev/fdt/panel_fdt.c 2021/01/25 14:25:09 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: panel_fdt.c,v 1.3 2021/01/18 02:35:49 thorpej Exp $ */ 1/* $NetBSD: panel_fdt.c,v 1.4 2021/01/25 14:25:09 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2018 The NetBSD Foundation, Inc. 4 * Copyright (c) 2018 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Manuel Bouyer. 8 * by Manuel Bouyer.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -29,27 +29,27 @@ @@ -29,27 +29,27 @@
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32/* 32/*
33 * lvds panel driver. 33 * lvds panel driver.
34 * specified in linux/Documentation/devicetree/bindings/display/panel/ 34 * specified in linux/Documentation/devicetree/bindings/display/panel/
35 * Simple RGB panels could be added as well 35 * Simple RGB panels could be added as well
36 * registers an endpoint for use by graphic controller drivers 36 * registers an endpoint for use by graphic controller drivers
37 * 37 *
38 */ 38 */
39 39
40#include <sys/cdefs.h> 40#include <sys/cdefs.h>
41 41
42__KERNEL_RCSID(1, "$NetBSD: panel_fdt.c,v 1.3 2021/01/18 02:35:49 thorpej Exp $"); 42__KERNEL_RCSID(1, "$NetBSD: panel_fdt.c,v 1.4 2021/01/25 14:25:09 thorpej Exp $");
43 43
44#include <sys/param.h> 44#include <sys/param.h>
45#include <sys/systm.h> 45#include <sys/systm.h>
46#include <sys/device.h> 46#include <sys/device.h>
47#include <sys/bus.h> 47#include <sys/bus.h>
48#include <sys/gpio.h> 48#include <sys/gpio.h>
49 49
50#include <dev/fdt/fdtvar.h> 50#include <dev/fdt/fdtvar.h>
51#include <dev/fdt/panel_fdt.h> 51#include <dev/fdt/panel_fdt.h>
52 52
53static int fdt_panel_match(device_t, cfdata_t, void *); 53static int fdt_panel_match(device_t, cfdata_t, void *);
54static void fdt_panel_attach(device_t, device_t, void *); 54static void fdt_panel_attach(device_t, device_t, void *);
55static void *fdt_panel_get_data(device_t, struct fdt_endpoint *); 55static void *fdt_panel_get_data(device_t, struct fdt_endpoint *);
@@ -61,28 +61,27 @@ struct fdt_panel_softc { @@ -61,28 +61,27 @@ struct fdt_panel_softc {
61 struct fdt_panel sc_panel; 61 struct fdt_panel sc_panel;
62 struct fdt_device_ports sc_ports; 62 struct fdt_device_ports sc_ports;
63#define MAX_GPIO_ENABLES 8 63#define MAX_GPIO_ENABLES 8
64 struct fdtbus_gpio_pin *sc_gpios_enable[MAX_GPIO_ENABLES]; 64 struct fdtbus_gpio_pin *sc_gpios_enable[MAX_GPIO_ENABLES];
65}; 65};
66 66
67 67
68CFATTACH_DECL_NEW(fdt_panel, sizeof(struct fdt_panel_softc), 68CFATTACH_DECL_NEW(fdt_panel, sizeof(struct fdt_panel_softc),
69 fdt_panel_match, fdt_panel_attach, NULL, NULL); 69 fdt_panel_match, fdt_panel_attach, NULL, NULL);
70 70
71static const struct device_compatible_entry compat_data[] = { 71static const struct device_compatible_entry compat_data[] = {
72 { .compat = "panel-lvds", .value = PANEL_LVDS}, 72 { .compat = "panel-lvds", .value = PANEL_LVDS},
73 { .compat = "panel-dual-lvds", .value = PANEL_DUAL_LVDS}, 73 { .compat = "panel-dual-lvds", .value = PANEL_DUAL_LVDS},
74 74 { }
75 { 0 } 
76}; 75};
77 76
78static int 77static int
79fdt_panel_match(device_t parent, cfdata_t cf, void *aux) 78fdt_panel_match(device_t parent, cfdata_t cf, void *aux)
80{ 79{
81 const struct fdt_attach_args *faa = aux; 80 const struct fdt_attach_args *faa = aux;
82 81
83 return of_match_compat_data(faa->faa_phandle, compat_data); 82 return of_match_compat_data(faa->faa_phandle, compat_data);
84} 83}
85 84
86static void 85static void
87fdt_panel_attach(device_t parent, device_t self, void *aux) 86fdt_panel_attach(device_t parent, device_t self, void *aux)
88{ 87{

cvs diff -r1.2 -r1.3 src/sys/dev/fdt/connector_fdt.c (expand / switch to unified diff)

--- src/sys/dev/fdt/connector_fdt.c 2021/01/18 02:35:49 1.2
+++ src/sys/dev/fdt/connector_fdt.c 2021/01/25 14:25:09 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: connector_fdt.c,v 1.2 2021/01/18 02:35:49 thorpej Exp $ */ 1/* $NetBSD: connector_fdt.c,v 1.3 2021/01/25 14:25:09 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2018 The NetBSD Foundation, Inc. 4 * Copyright (c) 2018 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Manuel Bouyer. 8 * by Manuel Bouyer.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -27,27 +27,27 @@ @@ -27,27 +27,27 @@
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32/* 32/*
33 * connector driver. 33 * connector driver.
34 * specified in linux/Documentation/devicetree/bindings/display/connector/ 34 * specified in linux/Documentation/devicetree/bindings/display/connector/
35 * basically it only register its endpoint. 35 * basically it only register its endpoint.
36 */ 36 */
37 37
38#include <sys/cdefs.h> 38#include <sys/cdefs.h>
39 39
40__KERNEL_RCSID(1, "$NetBSD: connector_fdt.c,v 1.2 2021/01/18 02:35:49 thorpej Exp $"); 40__KERNEL_RCSID(1, "$NetBSD: connector_fdt.c,v 1.3 2021/01/25 14:25:09 thorpej Exp $");
41 41
42#include <sys/param.h> 42#include <sys/param.h>
43#include <sys/systm.h> 43#include <sys/systm.h>
44#include <sys/device.h> 44#include <sys/device.h>
45#include <sys/bus.h> 45#include <sys/bus.h>
46#include <sys/kmem.h> 46#include <sys/kmem.h>
47 47
48#include <dev/fdt/fdtvar.h> 48#include <dev/fdt/fdtvar.h>
49#include <dev/fdt/fdt_port.h> 49#include <dev/fdt/fdt_port.h>
50#include <dev/fdt/connector_fdt.h> 50#include <dev/fdt/connector_fdt.h>
51 51
52static int fdt_connector_match(device_t, cfdata_t, void *); 52static int fdt_connector_match(device_t, cfdata_t, void *);
53static void fdt_connector_attach(device_t, device_t, void *); 53static void fdt_connector_attach(device_t, device_t, void *);
@@ -64,28 +64,27 @@ struct fdt_connector_softc { @@ -64,28 +64,27 @@ struct fdt_connector_softc {
64 struct fdt_device_ports sc_ports; 64 struct fdt_device_ports sc_ports;
65}; 65};
66 66
67#define sc_type sc_con.con_type 67#define sc_type sc_con.con_type
68 68
69CFATTACH_DECL_NEW(fdt_connector, sizeof(struct fdt_connector_softc), 69CFATTACH_DECL_NEW(fdt_connector, sizeof(struct fdt_connector_softc),
70 fdt_connector_match, fdt_connector_attach, NULL, NULL); 70 fdt_connector_match, fdt_connector_attach, NULL, NULL);
71 71
72static const struct device_compatible_entry compat_data[] = { 72static const struct device_compatible_entry compat_data[] = {
73 { .compat = "composite-video-connector", .value = CON_TV}, 73 { .compat = "composite-video-connector", .value = CON_TV},
74 { .compat = "dvi-connector", .value = CON_DVI}, 74 { .compat = "dvi-connector", .value = CON_DVI},
75 { .compat = "hdmi-connector", .value = CON_HDMI}, 75 { .compat = "hdmi-connector", .value = CON_HDMI},
76 { .compat = "vga-connector", .value = CON_VGA}, 76 { .compat = "vga-connector", .value = CON_VGA},
77 77 { }
78 { 0 } 
79}; 78};
80 79
81static int 80static int
82fdt_connector_match(device_t parent, cfdata_t cf, void *aux) 81fdt_connector_match(device_t parent, cfdata_t cf, void *aux)
83{ 82{
84 const struct fdt_attach_args *faa = aux; 83 const struct fdt_attach_args *faa = aux;
85 84
86 return of_match_compat_data(faa->faa_phandle, compat_data); 85 return of_match_compat_data(faa->faa_phandle, compat_data);
87} 86}
88 87
89static void 88static void
90fdt_connector_attach(device_t parent, device_t self, void *aux) 89fdt_connector_attach(device_t parent, device_t self, void *aux)
91{ 90{

cvs diff -r1.2 -r1.3 src/sys/dev/fdt/pinctrl_single.c (expand / switch to unified diff)

--- src/sys/dev/fdt/pinctrl_single.c 2021/01/18 02:35:49 1.2
+++ src/sys/dev/fdt/pinctrl_single.c 2021/01/25 14:25:09 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pinctrl_single.c,v 1.2 2021/01/18 02:35:49 thorpej Exp $ */ 1/* $NetBSD: pinctrl_single.c,v 1.3 2021/01/25 14:25:09 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2019 Jared McNeill <jmcneill@invisible.ca> 4 * Copyright (c) 2019 Jared McNeill <jmcneill@invisible.ca>
5 * All rights reserved. 5 * All rights reserved.
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,54 +17,53 @@ @@ -17,54 +17,53 @@
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: pinctrl_single.c,v 1.2 2021/01/18 02:35:49 thorpej Exp $"); 30__KERNEL_RCSID(0, "$NetBSD: pinctrl_single.c,v 1.3 2021/01/25 14:25:09 thorpej Exp $");
31 31
32#include <sys/param.h> 32#include <sys/param.h>
33#include <sys/bus.h> 33#include <sys/bus.h>
34#include <sys/device.h> 34#include <sys/device.h>
35#include <sys/systm.h> 35#include <sys/systm.h>
36#include <sys/gpio.h> 36#include <sys/gpio.h>
37 37
38#include <dev/fdt/fdtvar.h> 38#include <dev/fdt/fdtvar.h>
39 39
40#define PINCTRL_FLAG_PINCONF __BIT(0) /* supports generic pinconf */ 40#define PINCTRL_FLAG_PINCONF __BIT(0) /* supports generic pinconf */
41 41
42struct pinctrl_single_config { 42struct pinctrl_single_config {
43 uint32_t flags; 43 uint32_t flags;
44}; 44};
45 45
46static const struct pinctrl_single_config pinctrl_config = { 46static const struct pinctrl_single_config pinctrl_config = {
47}; 47};
48 48
49static const struct pinctrl_single_config pinconf_config = { 49static const struct pinctrl_single_config pinconf_config = {
50 .flags = PINCTRL_FLAG_PINCONF 50 .flags = PINCTRL_FLAG_PINCONF
51}; 51};
52 52
53static const struct device_compatible_entry compat_data[] = { 53static const struct device_compatible_entry compat_data[] = {
54 { .compat = "pinctrl-single", .data = &pinctrl_config }, 54 { .compat = "pinctrl-single", .data = &pinctrl_config },
55 { .compat = "pinconf-single", .data = &pinconf_config }, 55 { .compat = "pinconf-single", .data = &pinconf_config },
56 56 { }
57 { 0 } 
58}; 57};
59 58
60struct pinctrl_single_softc { 59struct pinctrl_single_softc {
61 device_t sc_dev; 60 device_t sc_dev;
62 int sc_phandle; 61 int sc_phandle;
63 bus_space_tag_t sc_bst; 62 bus_space_tag_t sc_bst;
64 bus_space_handle_t sc_bsh; 63 bus_space_handle_t sc_bsh;
65 uint32_t sc_flags; 64 uint32_t sc_flags;
66 u_int sc_regwidth; 65 u_int sc_regwidth;
67 u_int sc_funcmask; 66 u_int sc_funcmask;
68}; 67};
69 68
70static void 69static void

cvs diff -r1.2 -r1.3 src/sys/dev/fdt/vmt_fdt.c (expand / switch to unified diff)

--- src/sys/dev/fdt/vmt_fdt.c 2021/01/18 02:35:49 1.2
+++ src/sys/dev/fdt/vmt_fdt.c 2021/01/25 14:25:09 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: vmt_fdt.c,v 1.2 2021/01/18 02:35:49 thorpej Exp $ */ 1/* $NetBSD: vmt_fdt.c,v 1.3 2021/01/25 14:25:09 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2020 Ryo Shimizu <ryo@nerv.org> 4 * Copyright (c) 2020 Ryo Shimizu <ryo@nerv.org>
5 * All rights reserved. 5 * All rights reserved.
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,46 +17,45 @@ @@ -17,46 +17,45 @@
17 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
20 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
24 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
25 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE. 26 * POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29#include <sys/cdefs.h> 29#include <sys/cdefs.h>
30__KERNEL_RCSID(0, "$NetBSD: vmt_fdt.c,v 1.2 2021/01/18 02:35:49 thorpej Exp $"); 30__KERNEL_RCSID(0, "$NetBSD: vmt_fdt.c,v 1.3 2021/01/25 14:25:09 thorpej Exp $");
31 31
32#include <sys/param.h> 32#include <sys/param.h>
33#include <sys/systm.h> 33#include <sys/systm.h>
34#include <sys/device.h> 34#include <sys/device.h>
35 35
36#include <dev/fdt/fdtvar.h> 36#include <dev/fdt/fdtvar.h>
37#include <dev/vmt/vmtreg.h> 37#include <dev/vmt/vmtreg.h>
38#include <dev/vmt/vmtvar.h> 38#include <dev/vmt/vmtvar.h>
39 39
40static int vmt_fdt_match(device_t, cfdata_t, void *); 40static int vmt_fdt_match(device_t, cfdata_t, void *);
41static void vmt_fdt_attach(device_t, device_t, void *); 41static void vmt_fdt_attach(device_t, device_t, void *);
42 42
43CFATTACH_DECL_NEW(vmt_fdt, sizeof(struct vmt_softc), 43CFATTACH_DECL_NEW(vmt_fdt, sizeof(struct vmt_softc),
44 vmt_fdt_match, vmt_fdt_attach, NULL, NULL); 44 vmt_fdt_match, vmt_fdt_attach, NULL, NULL);
45 45
46static const struct device_compatible_entry compat_data[] = { 46static const struct device_compatible_entry compat_data[] = {
47 { .compat = "vmware" }, 47 { .compat = "vmware" },
48 48 { }
49 { 0 } 
50}; 49};
51 50
52static int 51static int
53vmt_fdt_match(device_t parent, cfdata_t cf, void *aux) 52vmt_fdt_match(device_t parent, cfdata_t cf, void *aux)
54{ 53{
55 const struct fdt_attach_args * const faa = aux; 54 const struct fdt_attach_args * const faa = aux;
56 55
57 if (OF_finddevice("/hypervisor") != faa->faa_phandle) 56 if (OF_finddevice("/hypervisor") != faa->faa_phandle)
58 return 0; 57 return 0;
59 return of_match_compat_data(faa->faa_phandle, compat_data); 58 return of_match_compat_data(faa->faa_phandle, compat_data);
60} 59}
61 60
62static void 61static void

cvs diff -r1.7 -r1.8 src/sys/dev/fdt/dwc2_fdt.c (expand / switch to unified diff)

--- src/sys/dev/fdt/dwc2_fdt.c 2021/01/18 02:35:49 1.7
+++ src/sys/dev/fdt/dwc2_fdt.c 2021/01/25 14:25:09 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: dwc2_fdt.c,v 1.7 2021/01/18 02:35:49 thorpej Exp $ */ 1/* $NetBSD: dwc2_fdt.c,v 1.8 2021/01/25 14:25:09 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2013 The NetBSD Foundation, Inc. 4 * Copyright (c) 2013 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Nick Hudson 8 * by Nick Hudson
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -20,27 +20,27 @@ @@ -20,27 +20,27 @@
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33__KERNEL_RCSID(0, "$NetBSD: dwc2_fdt.c,v 1.7 2021/01/18 02:35:49 thorpej Exp $"); 33__KERNEL_RCSID(0, "$NetBSD: dwc2_fdt.c,v 1.8 2021/01/25 14:25:09 thorpej Exp $");
34 34
35#include <sys/param.h> 35#include <sys/param.h>
36#include <sys/systm.h> 36#include <sys/systm.h>
37#include <sys/device.h> 37#include <sys/device.h>
38#include <sys/mutex.h> 38#include <sys/mutex.h>
39#include <sys/bus.h> 39#include <sys/bus.h>
40#include <sys/workqueue.h> 40#include <sys/workqueue.h>
41 41
42#include <dev/fdt/fdtvar.h> 42#include <dev/fdt/fdtvar.h>
43 43
44#include <dev/usb/usb.h> 44#include <dev/usb/usb.h>
45#include <dev/usb/usbdi.h> 45#include <dev/usb/usbdi.h>
46#include <dev/usb/usbdivar.h> 46#include <dev/usb/usbdivar.h>
@@ -82,27 +82,27 @@ static const struct dwc2_fdt_config dwc2 @@ -82,27 +82,27 @@ static const struct dwc2_fdt_config dwc2
82static const struct dwc2_fdt_config dwc2_fdt_generic_config = { 82static const struct dwc2_fdt_config dwc2_fdt_generic_config = {
83}; 83};
84 84
85static const struct device_compatible_entry compat_data[] = { 85static const struct device_compatible_entry compat_data[] = {
86 { .compat = "amlogic,meson8b-usb", 86 { .compat = "amlogic,meson8b-usb",
87 .data = &dwc2_fdt_meson8b_config }, 87 .data = &dwc2_fdt_meson8b_config },
88 { .compat = "amlogic,meson-gxbb-usb", 88 { .compat = "amlogic,meson-gxbb-usb",
89 .data = &dwc2_fdt_meson8b_config }, 89 .data = &dwc2_fdt_meson8b_config },
90 { .compat = "rockchip,rk3066-usb", 90 { .compat = "rockchip,rk3066-usb",
91 .data = &dwc2_fdt_rk3066_config }, 91 .data = &dwc2_fdt_rk3066_config },
92 { .compat = "snps,dwc2", 92 { .compat = "snps,dwc2",
93 .data = &dwc2_fdt_generic_config }, 93 .data = &dwc2_fdt_generic_config },
94 94
95 { 0 } 95 { }
96}; 96};
97 97
98CFATTACH_DECL_NEW(dwc2_fdt, sizeof(struct dwc2_fdt_softc), 98CFATTACH_DECL_NEW(dwc2_fdt, sizeof(struct dwc2_fdt_softc),
99 dwc2_fdt_match, dwc2_fdt_attach, NULL, NULL); 99 dwc2_fdt_match, dwc2_fdt_attach, NULL, NULL);
100 100
101/* ARGSUSED */ 101/* ARGSUSED */
102static int 102static int
103dwc2_fdt_match(device_t parent, struct cfdata *match, void *aux) 103dwc2_fdt_match(device_t parent, struct cfdata *match, void *aux)
104{ 104{
105 struct fdt_attach_args * const faa = aux; 105 struct fdt_attach_args * const faa = aux;
106 106
107 return of_match_compat_data(faa->faa_phandle, compat_data); 107 return of_match_compat_data(faa->faa_phandle, compat_data);
108} 108}

cvs diff -r1.7 -r1.8 src/sys/dev/fdt/i2cmux_fdt.c (expand / switch to unified diff)

--- src/sys/dev/fdt/i2cmux_fdt.c 2021/01/25 12:18:18 1.7
+++ src/sys/dev/fdt/i2cmux_fdt.c 2021/01/25 14:25:09 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: i2cmux_fdt.c,v 1.7 2021/01/25 12:18:18 jmcneill Exp $ */ 1/* $NetBSD: i2cmux_fdt.c,v 1.8 2021/01/25 14:25:09 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2020 The NetBSD Foundation, Inc. 4 * Copyright (c) 2020 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe. 8 * by Jason R. Thorpe.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -20,27 +20,27 @@ @@ -20,27 +20,27 @@
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33__KERNEL_RCSID(0, "$NetBSD: i2cmux_fdt.c,v 1.7 2021/01/25 12:18:18 jmcneill Exp $"); 33__KERNEL_RCSID(0, "$NetBSD: i2cmux_fdt.c,v 1.8 2021/01/25 14:25:09 thorpej Exp $");
34 34
35#include <sys/types.h> 35#include <sys/types.h>
36#include <sys/device.h> 36#include <sys/device.h>
37#include <sys/kernel.h> 37#include <sys/kernel.h>
38#include <sys/kmem.h> 38#include <sys/kmem.h>
39#include <sys/bus.h> 39#include <sys/bus.h>
40#include <sys/gpio.h> 40#include <sys/gpio.h>
41 41
42#include <dev/fdt/fdtvar.h> 42#include <dev/fdt/fdtvar.h>
43#include <dev/i2c/i2cmuxvar.h> 43#include <dev/i2c/i2cmuxvar.h>
44 44
45/*****************************************************************************/ 45/*****************************************************************************/
46 46
@@ -233,27 +233,27 @@ static const struct iicmux_config iicmux @@ -233,27 +233,27 @@ static const struct iicmux_config iicmux
233 .acquire_bus = iicmux_pinctrl_acquire_bus, 233 .acquire_bus = iicmux_pinctrl_acquire_bus,
234 .release_bus = iicmux_pinctrl_release_bus, 234 .release_bus = iicmux_pinctrl_release_bus,
235}; 235};
236 236
237/*****************************************************************************/ 237/*****************************************************************************/
238 238
239static const struct device_compatible_entry compat_data[] = { 239static const struct device_compatible_entry compat_data[] = {
240 { .compat = "i2c-mux-gpio", 240 { .compat = "i2c-mux-gpio",
241 .data = &iicmux_gpio_config }, 241 .data = &iicmux_gpio_config },
242 242
243 { .compat = "i2c-mux-pinctrl", 243 { .compat = "i2c-mux-pinctrl",
244 .data = &iicmux_pinctrl_config }, 244 .data = &iicmux_pinctrl_config },
245 245
246 { NULL } 246 { }
247}; 247};
248 248
249static int 249static int
250iicmux_fdt_match(device_t const parent, cfdata_t const match, void * const aux) 250iicmux_fdt_match(device_t const parent, cfdata_t const match, void * const aux)
251{ 251{
252 struct fdt_attach_args * const faa = aux; 252 struct fdt_attach_args * const faa = aux;
253 253
254 return of_match_compat_data(faa->faa_phandle, compat_data); 254 return of_match_compat_data(faa->faa_phandle, compat_data);
255} 255}
256 256
257static void 257static void
258iicmux_fdt_attach(device_t const parent, device_t const self, void * const aux) 258iicmux_fdt_attach(device_t const parent, device_t const self, void * const aux)
259{ 259{

cvs diff -r1.13 -r1.14 src/sys/dev/fdt/dwcmmc_fdt.c (expand / switch to unified diff)

--- src/sys/dev/fdt/dwcmmc_fdt.c 2021/01/18 02:35:49 1.13
+++ src/sys/dev/fdt/dwcmmc_fdt.c 2021/01/25 14:25:09 1.14
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: dwcmmc_fdt.c,v 1.13 2021/01/18 02:35:49 thorpej Exp $ */ 1/* $NetBSD: dwcmmc_fdt.c,v 1.14 2021/01/25 14:25:09 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2015-2018 Jared McNeill <jmcneill@invisible.ca> 4 * Copyright (c) 2015-2018 Jared McNeill <jmcneill@invisible.ca>
5 * All rights reserved. 5 * All rights reserved.
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: dwcmmc_fdt.c,v 1.13 2021/01/18 02:35:49 thorpej Exp $"); 30__KERNEL_RCSID(0, "$NetBSD: dwcmmc_fdt.c,v 1.14 2021/01/25 14:25:09 thorpej Exp $");
31 31
32#include <sys/param.h> 32#include <sys/param.h>
33#include <sys/bus.h> 33#include <sys/bus.h>
34#include <sys/device.h> 34#include <sys/device.h>
35#include <sys/intr.h> 35#include <sys/intr.h>
36#include <sys/systm.h> 36#include <sys/systm.h>
37#include <sys/kernel.h> 37#include <sys/kernel.h>
38#include <sys/mutex.h> 38#include <sys/mutex.h>
39#include <sys/condvar.h> 39#include <sys/condvar.h>
40#include <sys/gpio.h> 40#include <sys/gpio.h>
41 41
42#include <dev/ic/dwc_mmc_var.h> 42#include <dev/ic/dwc_mmc_var.h>
43#include <dev/sdmmc/sdmmcchip.h> 43#include <dev/sdmmc/sdmmcchip.h>
@@ -58,28 +58,27 @@ struct dwcmmc_fdt_config { @@ -58,28 +58,27 @@ struct dwcmmc_fdt_config {
58 u_int flags; 58 u_int flags;
59 uint32_t intr_cardmask; 59 uint32_t intr_cardmask;
60}; 60};
61 61
62static const struct dwcmmc_fdt_config dwcmmc_rk3288_config = { 62static const struct dwcmmc_fdt_config dwcmmc_rk3288_config = {
63 .ciu_div = 2, 63 .ciu_div = 2,
64 .flags = DWC_MMC_F_USE_HOLD_REG | 64 .flags = DWC_MMC_F_USE_HOLD_REG |
65 DWC_MMC_F_DMA, 65 DWC_MMC_F_DMA,
66 .intr_cardmask = __BIT(24), 66 .intr_cardmask = __BIT(24),
67}; 67};
68 68
69static const struct device_compatible_entry compat_data[] = { 69static const struct device_compatible_entry compat_data[] = {
70 { .compat = "rockchip,rk3288-dw-mshc", .data = &dwcmmc_rk3288_config }, 70 { .compat = "rockchip,rk3288-dw-mshc", .data = &dwcmmc_rk3288_config },
71 71 { }
72 { 0 } 
73}; 72};
74 73
75struct dwcmmc_fdt_softc { 74struct dwcmmc_fdt_softc {
76 struct dwc_mmc_softc sc; 75 struct dwc_mmc_softc sc;
77 struct clk *sc_clk_biu; 76 struct clk *sc_clk_biu;
78 struct clk *sc_clk_ciu; 77 struct clk *sc_clk_ciu;
79 struct fdtbus_gpio_pin *sc_pin_cd; 78 struct fdtbus_gpio_pin *sc_pin_cd;
80 const struct dwcmmc_fdt_config *sc_conf; 79 const struct dwcmmc_fdt_config *sc_conf;
81 u_int sc_ciu_div; 80 u_int sc_ciu_div;
82 struct fdtbus_regulator *sc_vqmmc; 81 struct fdtbus_regulator *sc_vqmmc;
83 struct fdtbus_mmc_pwrseq *sc_pwrseq; 82 struct fdtbus_mmc_pwrseq *sc_pwrseq;
84}; 83};
85 84

cvs diff -r1.4 -r1.5 src/sys/dev/fdt/ns8250_uart.c (expand / switch to unified diff)

--- src/sys/dev/fdt/ns8250_uart.c 2021/01/18 02:35:49 1.4
+++ src/sys/dev/fdt/ns8250_uart.c 2021/01/25 14:25:09 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ns8250_uart.c,v 1.4 2021/01/18 02:35:49 thorpej Exp $ */ 1/* $NetBSD: ns8250_uart.c,v 1.5 2021/01/25 14:25:09 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2017-2020 Jared McNeill <jmcneill@invisible.ca> 4 * Copyright (c) 2017-2020 Jared McNeill <jmcneill@invisible.ca>
5 * All rights reserved. 5 * All rights reserved.
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.
@@ -18,27 +18,27 @@ @@ -18,27 +18,27 @@
18 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE. 26 * POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29#include <sys/cdefs.h> 29#include <sys/cdefs.h>
30 30
31__KERNEL_RCSID(1, "$NetBSD: ns8250_uart.c,v 1.4 2021/01/18 02:35:49 thorpej Exp $"); 31__KERNEL_RCSID(1, "$NetBSD: ns8250_uart.c,v 1.5 2021/01/25 14:25:09 thorpej Exp $");
32 32
33#include <sys/param.h> 33#include <sys/param.h>
34#include <sys/bus.h> 34#include <sys/bus.h>
35#include <sys/device.h> 35#include <sys/device.h>
36#include <sys/intr.h> 36#include <sys/intr.h>
37#include <sys/systm.h> 37#include <sys/systm.h>
38#include <sys/time.h> 38#include <sys/time.h>
39#include <sys/termios.h> 39#include <sys/termios.h>
40 40
41#include <dev/ic/comvar.h> 41#include <dev/ic/comvar.h>
42 42
43#include <dev/fdt/fdtvar.h> 43#include <dev/fdt/fdtvar.h>
44 44
@@ -74,28 +74,27 @@ ns8250_octeon_enable(struct com_softc *s @@ -74,28 +74,27 @@ ns8250_octeon_enable(struct com_softc *s
74 74
75static const struct ns8250_config octeon_config = { 75static const struct ns8250_config octeon_config = {
76 .type = COM_TYPE_16550_NOERS, 76 .type = COM_TYPE_16550_NOERS,
77 .enable = ns8250_octeon_enable, 77 .enable = ns8250_octeon_enable,
78}; 78};
79 79
80static const struct device_compatible_entry compat_data[] = { 80static const struct device_compatible_entry compat_data[] = {
81 { .compat = "cavium,octeon-3860-uart", .data = &octeon_config }, 81 { .compat = "cavium,octeon-3860-uart", .data = &octeon_config },
82 { .compat = "ns8250", .data = &ns8250_config }, 82 { .compat = "ns8250", .data = &ns8250_config },
83 { .compat = "ns16450", .data = &ns8250_config }, 83 { .compat = "ns16450", .data = &ns8250_config },
84 { .compat = "ns16550a", .data = &ns8250_config }, 84 { .compat = "ns16550a", .data = &ns8250_config },
85 { .compat = "ns16550", .data = &ns8250_config }, 85 { .compat = "ns16550", .data = &ns8250_config },
86 { .compat = "ns16750", .data = &ns16750_config }, 86 { .compat = "ns16750", .data = &ns16750_config },
87 87 { }
88 { 0 } 
89}; 88};
90 89
91CFATTACH_DECL_NEW(ns8250_uart, sizeof(struct com_softc), 90CFATTACH_DECL_NEW(ns8250_uart, sizeof(struct com_softc),
92 ns8250_uart_match, ns8250_uart_attach, NULL, NULL); 91 ns8250_uart_match, ns8250_uart_attach, NULL, NULL);
93 92
94static int 93static int
95ns8250_uart_match(device_t parent, cfdata_t cf, void *aux) 94ns8250_uart_match(device_t parent, cfdata_t cf, void *aux)
96{ 95{
97 struct fdt_attach_args * const faa = aux; 96 struct fdt_attach_args * const faa = aux;
98 97
99 return of_match_compat_data(faa->faa_phandle, compat_data); 98 return of_match_compat_data(faa->faa_phandle, compat_data);
100} 99}
101 100