Sun Dec 27 12:21:12 2015 UTC ()
update exynosfdt_init to match the devices in exynos5422-odroidxu3.dts


(jmcneill)
diff -r1.2 -r1.3 src/sys/arch/arm/samsung/exynos_fdt.c

cvs diff -r1.2 -r1.3 src/sys/arch/arm/samsung/Attic/exynos_fdt.c (expand / switch to unified diff)

--- src/sys/arch/arm/samsung/Attic/exynos_fdt.c 2015/12/15 23:13:51 1.2
+++ src/sys/arch/arm/samsung/Attic/exynos_fdt.c 2015/12/27 12:21:12 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: exynos_fdt.c,v 1.2 2015/12/15 23:13:51 marty Exp $ */ 1/* $NetBSD: exynos_fdt.c,v 1.3 2015/12/27 12:21:12 jmcneill Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2015 Jared D. McNeill <jmcneill@invisible.ca> 4 * Copyright (c) 2015 Jared D. 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.
@@ -19,27 +19,27 @@ @@ -19,27 +19,27 @@
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 "opt_exynos.h" 29#include "opt_exynos.h"
30 30
31#include <sys/cdefs.h> 31#include <sys/cdefs.h>
32__KERNEL_RCSID(0, "$NetBSD: exynos_fdt.c,v 1.2 2015/12/15 23:13:51 marty Exp $"); 32__KERNEL_RCSID(0, "$NetBSD: exynos_fdt.c,v 1.3 2015/12/27 12:21:12 jmcneill Exp $");
33 33
34#include <sys/param.h> 34#include <sys/param.h>
35#include <sys/systm.h> 35#include <sys/systm.h>
36#include <sys/device.h> 36#include <sys/device.h>
37 37
38#include <machine/cpu.h> 38#include <machine/cpu.h>
39#include <sys/bus.h> 39#include <sys/bus.h>
40 40
41#include <arm/mainbus/mainbus.h> 41#include <arm/mainbus/mainbus.h>
42#include <arm/samsung/exynos_reg.h> 42#include <arm/samsung/exynos_reg.h>
43#include <arm/samsung/exynos_var.h> 43#include <arm/samsung/exynos_var.h>
44 44
45#include <dev/fdt/fdtvar.h> 45#include <dev/fdt/fdtvar.h>
@@ -56,35 +56,30 @@ static bool exynosfdt_found = false; @@ -56,35 +56,30 @@ static bool exynosfdt_found = false;
56int 56int
57exynosfdt_match(device_t parent, cfdata_t cf, void *aux) 57exynosfdt_match(device_t parent, cfdata_t cf, void *aux)
58{ 58{
59 if (exynosfdt_found) 59 if (exynosfdt_found)
60 return 0; 60 return 0;
61 return 1; 61 return 1;
62} 62}
63 63
64void 64void
65exynosfdt_attach(device_t parent, device_t self, void *aux) 65exynosfdt_attach(device_t parent, device_t self, void *aux)
66{ 66{
67 const char *exynosfdt_init[] = { 67 const char *exynosfdt_init[] = {
68 "interrupt-controller", 68 "interrupt-controller",
69 "clock", 69 "clock-controller",
70 "pinmux", 70 "pinctrl",
71 "gpio", 
72 "regulators", 
73 "dma", 
74 "pmc", 
75 "memory-controller", 
76 "i2c", 71 "i2c",
77 "usb-phy" 72 "phy"
78 }; 73 };
79 74
80 exynosfdt_found = true; 75 exynosfdt_found = true;
81 76
82 aprint_naive("\n"); 77 aprint_naive("\n");
83 aprint_normal("\n"); 78 aprint_normal("\n");
84 79
85 struct fdt_attach_args faa = { 80 struct fdt_attach_args faa = {
86 .faa_name = "", 81 .faa_name = "",
87 .faa_bst = &armv7_generic_bs_tag, 82 .faa_bst = &armv7_generic_bs_tag,
88 .faa_a4x_bst = &armv7_generic_a4x_bs_tag, 83 .faa_a4x_bst = &armv7_generic_a4x_bs_tag,
89 .faa_dmat = &exynos_bus_dma_tag, 84 .faa_dmat = &exynos_bus_dma_tag,
90 .faa_phandle = OF_peer(0), 85 .faa_phandle = OF_peer(0),