CVS commit: src/sys/arch/arm/imx/fdt

2020-11-24 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Wed Nov 25 05:18:39 UTC 2020

Modified Files:
src/sys/arch/arm/imx/fdt: imx_ccm_div.c

Log Message:
`best_diff' should be kept to a positive number


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/fdt/imx_ccm_div.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/imx/fdt/imx_ccm_div.c
diff -u src/sys/arch/arm/imx/fdt/imx_ccm_div.c:1.1 src/sys/arch/arm/imx/fdt/imx_ccm_div.c:1.2
--- src/sys/arch/arm/imx/fdt/imx_ccm_div.c:1.1	Wed Jun 10 17:57:50 2020
+++ src/sys/arch/arm/imx/fdt/imx_ccm_div.c	Wed Nov 25 05:18:39 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: imx_ccm_div.c,v 1.1 2020/06/10 17:57:50 jmcneill Exp $ */
+/* $NetBSD: imx_ccm_div.c,v 1.2 2020/11/25 05:18:39 ryo Exp $ */
 
 /*-
  * Copyright (c) 2020 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx_ccm_div.c,v 1.1 2020/06/10 17:57:50 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx_ccm_div.c,v 1.2 2020/11/25 05:18:39 ryo Exp $");
 
 #include 
 #include 
@@ -97,7 +97,7 @@ imx_ccm_div_set_rate(struct imx_ccm_soft
 		} else {
 			if (abs(diff) < abs(best_diff)) {
 best_n = n;
-best_diff = diff;
+best_diff = abs(diff);
 			}
 		}
 	}



CVS commit: src/sys/arch/arm/imx/fdt

2020-09-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Sep 28 12:15:23 UTC 2020

Modified Files:
src/sys/arch/arm/imx/fdt: imx6_platform.c

Log Message:
faa_a4x_bst is no more


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/imx/fdt/imx6_platform.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/imx/fdt/imx6_platform.c
diff -u src/sys/arch/arm/imx/fdt/imx6_platform.c:1.10 src/sys/arch/arm/imx/fdt/imx6_platform.c:1.11
--- src/sys/arch/arm/imx/fdt/imx6_platform.c:1.10	Fri Jul 10 12:25:09 2020
+++ src/sys/arch/arm/imx/fdt/imx6_platform.c	Mon Sep 28 12:15:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx6_platform.c,v 1.10 2020/07/10 12:25:09 skrll Exp $	*/
+/*	$NetBSD: imx6_platform.c,v 1.11 2020/09/28 12:15:23 jmcneill Exp $	*/
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec Corporation.
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx6_platform.c,v 1.10 2020/07/10 12:25:09 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_platform.c,v 1.11 2020/09/28 12:15:23 jmcneill Exp $");
 
 #include "arml2cc.h"
 #include "opt_console.h"
@@ -72,7 +72,6 @@ __KERNEL_RCSID(0, "$NetBSD: imx6_platfor
 #endif
 
 extern struct bus_space armv7_generic_bs_tag;
-extern struct bus_space armv7_generic_a4x_bs_tag;
 extern struct arm32_bus_dma_tag arm_generic_dma_tag;
 
 static const struct pmap_devmap *
@@ -91,7 +90,6 @@ static void
 imx_platform_init_attach_args(struct fdt_attach_args *faa)
 {
 	faa->faa_bst = _generic_bs_tag;
-	faa->faa_a4x_bst = _generic_a4x_bs_tag;
 	faa->faa_dmat = _generic_dma_tag;
 }
 



CVS commit: src/sys/arch/arm/imx/fdt

2020-06-11 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Jun 11 11:05:29 UTC 2020

Modified Files:
src/sys/arch/arm/imx/fdt: imx6_iomux.c

Log Message:
Match fsl,imx7d-iomuxc


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/imx/fdt/imx6_iomux.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/imx/fdt/imx6_iomux.c
diff -u src/sys/arch/arm/imx/fdt/imx6_iomux.c:1.3 src/sys/arch/arm/imx/fdt/imx6_iomux.c:1.4
--- src/sys/arch/arm/imx/fdt/imx6_iomux.c:1.3	Wed Jan 15 01:09:56 2020
+++ src/sys/arch/arm/imx/fdt/imx6_iomux.c	Thu Jun 11 11:05:29 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx6_iomux.c,v 1.3 2020/01/15 01:09:56 jmcneill Exp $	*/
+/*	$NetBSD: imx6_iomux.c,v 1.4 2020/06/11 11:05:29 jmcneill Exp $	*/
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec Corporation.
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx6_iomux.c,v 1.3 2020/01/15 01:09:56 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_iomux.c,v 1.4 2020/06/11 11:05:29 jmcneill Exp $");
 
 #include "opt_fdt.h"
 
@@ -134,6 +134,7 @@ imxiomux_match(device_t parent, cfdata_t
 {
 	const char * const compatible[] = {
 		"fsl,imx6q-iomuxc",
+		"fsl,imx7d-iomuxc",
 		"fsl,imx8mq-iomuxc",
 		NULL
 	};



CVS commit: src/sys/arch/arm/imx/fdt

2020-06-11 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Jun 11 11:01:16 UTC 2020

Modified Files:
src/sys/arch/arm/imx/fdt: imx6_usb.c imx7d_ccm.c

Log Message:
Add i.MX7 USB support


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/imx/fdt/imx6_usb.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/fdt/imx7d_ccm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/imx/fdt/imx6_usb.c
diff -u src/sys/arch/arm/imx/fdt/imx6_usb.c:1.3 src/sys/arch/arm/imx/fdt/imx6_usb.c:1.4
--- src/sys/arch/arm/imx/fdt/imx6_usb.c:1.3	Sun Nov 24 11:07:19 2019
+++ src/sys/arch/arm/imx/fdt/imx6_usb.c	Thu Jun 11 11:01:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx6_usb.c,v 1.3 2019/11/24 11:07:19 skrll Exp $	*/
+/*	$NetBSD: imx6_usb.c,v 1.4 2020/06/11 11:01:16 jmcneill Exp $	*/
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec Corporation.
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx6_usb.c,v 1.3 2019/11/24 11:07:19 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_usb.c,v 1.4 2020/06/11 11:01:16 jmcneill Exp $");
 
 #include "opt_fdt.h"
 
@@ -75,6 +75,7 @@ CFATTACH_DECL_NEW(imxusbc_fdt, sizeof(st
 
 static const char * const compatible[] = {
 	"fsl,imx6q-usb",
+	"fsl,imx7d-usb",
 	NULL
 };
 

Index: src/sys/arch/arm/imx/fdt/imx7d_ccm.c
diff -u src/sys/arch/arm/imx/fdt/imx7d_ccm.c:1.1 src/sys/arch/arm/imx/fdt/imx7d_ccm.c:1.2
--- src/sys/arch/arm/imx/fdt/imx7d_ccm.c:1.1	Wed Jun 10 17:57:50 2020
+++ src/sys/arch/arm/imx/fdt/imx7d_ccm.c	Thu Jun 11 11:01:16 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: imx7d_ccm.c,v 1.1 2020/06/10 17:57:50 jmcneill Exp $ */
+/* $NetBSD: imx7d_ccm.c,v 1.2 2020/06/11 11:01:16 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2020 Jared McNeill 
@@ -28,7 +28,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: imx7d_ccm.c,v 1.1 2020/06/10 17:57:50 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx7d_ccm.c,v 1.2 2020/06/11 11:01:16 jmcneill Exp $");
 
 #include 
 #include 
@@ -269,6 +269,10 @@ static struct imx_ccm_clk imx7d_ccm_clks
 	IMX_GATE(USDHC1_ROOT_CLK, "usdhc1_root_clk", "usdhc1_post_div", 0x46c0, __BIT(0)),
 	IMX_GATE(USDHC2_ROOT_CLK, "usdhc2_root_clk", "usdhc2_post_div", 0x46d0, __BIT(0)),
 	IMX_GATE(USDHC3_ROOT_CLK, "usdhc3_root_clk", "usdhc3_post_div", 0x46e0, __BIT(0)),
+
+	IMX_GATE(USB_CTRL_CLK, "usb_ctrl_clk", "ahb_root_clk", 0x4680, __BIT(0)),
+	IMX_GATE(USB_PHY1_CLK, "usb_phy1_clk", "pll_usb1_main_clk", 0x46a0, __BIT(0)),
+	IMX_GATE(USB_PHY2_CLK, "usb_phy2_clk", "pll_usb_main_clk", 0x46b0, __BIT(0)),
 };
 
 static int



CVS commit: src/sys/arch/arm/imx/fdt

2020-06-10 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jun 10 19:30:23 UTC 2020

Modified Files:
src/sys/arch/arm/imx/fdt: files.imx6
Removed Files:
src/sys/arch/arm/imx/fdt: imx7_platform.c imx7_platform.h

Log Message:
Use generic platform definition for i.MX7


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/imx/fdt/files.imx6
cvs rdiff -u -r1.1 -r0 src/sys/arch/arm/imx/fdt/imx7_platform.c \
src/sys/arch/arm/imx/fdt/imx7_platform.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/imx/fdt/files.imx6
diff -u src/sys/arch/arm/imx/fdt/files.imx6:1.13 src/sys/arch/arm/imx/fdt/files.imx6:1.14
--- src/sys/arch/arm/imx/fdt/files.imx6:1.13	Wed Jun 10 17:57:50 2020
+++ src/sys/arch/arm/imx/fdt/files.imx6	Wed Jun 10 19:30:23 2020
@@ -1,10 +1,9 @@
-#	$NetBSD: files.imx6,v 1.13 2020/06/10 17:57:50 jmcneill Exp $
+#	$NetBSD: files.imx6,v 1.14 2020/06/10 19:30:23 jmcneill Exp $
 #
 # Configuration info for the Freescale i.MX6
 #
 
 file	arch/arm/imx/fdt/imx6_platform.c	soc_imx
-file	arch/arm/imx/fdt/imx7_platform.c	soc_imx
 
 # SOC parameters
 defflag	opt_soc.h			SOC_IMX



CVS commit: src/sys/arch/arm/imx/fdt

2020-06-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jun  3 13:14:01 UTC 2020

Modified Files:
src/sys/arch/arm/imx/fdt: files.imx6

Log Message:
defflag SOC_IMX6DL and SOC_IMX6Q


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/imx/fdt/files.imx6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/imx/fdt/files.imx6
diff -u src/sys/arch/arm/imx/fdt/files.imx6:1.11 src/sys/arch/arm/imx/fdt/files.imx6:1.12
--- src/sys/arch/arm/imx/fdt/files.imx6:1.11	Sat May 23 13:39:24 2020
+++ src/sys/arch/arm/imx/fdt/files.imx6	Wed Jun  3 13:14:01 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: files.imx6,v 1.11 2020/05/23 13:39:24 rin Exp $
+#	$NetBSD: files.imx6,v 1.12 2020/06/03 13:14:01 jmcneill Exp $
 #
 # Configuration info for the Freescale i.MX6
 #
@@ -7,6 +7,8 @@ file	arch/arm/imx/fdt/imx6_platform.c	so
 
 # SOC parameters
 defflag	opt_soc.h			SOC_IMX
+defflag	opt_soc.h			SOC_IMX6DL: SOC_IMX
+defflag	opt_soc.h			SOC_IMX6Q: SOC_IMX
 defflag	opt_soc.h			SOC_IMX6QDL: SOC_IMX
 
 # Clock



CVS commit: src/sys/arch/arm/imx/fdt

2020-05-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun May 24 08:47:19 UTC 2020

Modified Files:
src/sys/arch/arm/imx/fdt: imx6_platform.c

Log Message:
Misc whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/imx/fdt/imx6_platform.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/imx/fdt/imx6_platform.c
diff -u src/sys/arch/arm/imx/fdt/imx6_platform.c:1.8 src/sys/arch/arm/imx/fdt/imx6_platform.c:1.9
--- src/sys/arch/arm/imx/fdt/imx6_platform.c:1.8	Wed Oct 23 02:34:43 2019
+++ src/sys/arch/arm/imx/fdt/imx6_platform.c	Sun May 24 08:47:19 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx6_platform.c,v 1.8 2019/10/23 02:34:43 hkenken Exp $	*/
+/*	$NetBSD: imx6_platform.c,v 1.9 2020/05/24 08:47:19 skrll Exp $	*/
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec Corporation.
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx6_platform.c,v 1.8 2019/10/23 02:34:43 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_platform.c,v 1.9 2020/05/24 08:47:19 skrll Exp $");
 
 #include "arml2cc.h"
 #include "opt_console.h"
@@ -82,7 +82,7 @@ imx_platform_devmap(void)
 		DEVMAP_ENTRY(KERNEL_IO_IOREG_VBASE, IMX6_IOREG_PBASE, IMX6_IOREG_SIZE),
 		DEVMAP_ENTRY(KERNEL_IO_ARMCORE_VBASE, IMX6_ARMCORE_PBASE, IMX6_ARMCORE_SIZE),
 		DEVMAP_ENTRY_END
-};
+	};
 
 	return devmap;
 }
@@ -174,7 +174,6 @@ imx_platform_mpstart(void)
 	if (bus_space_map(bst, IMX6_AIPS1_BASE + AIPS1_SRC_BASE, AIPS1_SRC_SIZE, 0, ) != 0)
 		panic("couldn't map SRC");
 
-
 	uint32_t srcctl = bus_space_read_4(bst, bsh, SRC_SCR);
 	const paddr_t mpstart = KERN_VTOPHYS((vaddr_t)cpu_mpstart);
 
@@ -234,4 +233,3 @@ const struct arm_platform imx6_platform 
 
 ARM_PLATFORM(imx6q, "fsl,imx6q", _platform);
 ARM_PLATFORM(imx6qp, "fsl,imx6qp", _platform);
-



CVS commit: src/sys/arch/arm/imx/fdt

2020-05-23 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat May 23 13:39:24 UTC 2020

Modified Files:
src/sys/arch/arm/imx/fdt: files.imx6

Log Message:
Oops, two more missing clk dependencies...


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/imx/fdt/files.imx6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/imx/fdt/files.imx6
diff -u src/sys/arch/arm/imx/fdt/files.imx6:1.10 src/sys/arch/arm/imx/fdt/files.imx6:1.11
--- src/sys/arch/arm/imx/fdt/files.imx6:1.10	Sat May 23 13:24:08 2020
+++ src/sys/arch/arm/imx/fdt/files.imx6	Sat May 23 13:39:24 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: files.imx6,v 1.10 2020/05/23 13:24:08 skrll Exp $
+#	$NetBSD: files.imx6,v 1.11 2020/05/23 13:39:24 rin Exp $
 #
 # Configuration info for the Freescale i.MX6
 #
@@ -16,7 +16,7 @@ file	arch/arm/imx/imx6_ccm.c		imxccm
 file	arch/arm/imx/fdt/imx6_clk.c	imxccm
 
 # Common FDT clock framework
-define	imx_ccm
+define	imx_ccm: clk
 file	arch/arm/imx/fdt/imx_ccm.c		imx_ccm
 file	arch/arm/imx/fdt/imx_ccm_extclk.c	imx_ccm
 file	arch/arm/imx/fdt/imx_ccm_gate.c		imx_ccm
@@ -106,7 +106,7 @@ file	arch/arm/imx/fdt/imx6_spi.c		imxspi
 defparam opt_imxspi.h   	IMXSPINSLAVES
 
 # PWM
-device	imxpwm: pwm
+device	imxpwm: pwm, clk
 attach	imxpwm at fdt with imxpwm_fdt
 file	arch/arm/imx/imxpwm.c			imxpwm
 file	arch/arm/imx/fdt/imx6_pwm.c		imxpwm_fdt



CVS commit: src/sys/arch/arm/imx/fdt

2020-01-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jan 15 11:36:34 UTC 2020

Modified Files:
src/sys/arch/arm/imx/fdt: imx8mq_ccm.c

Log Message:
Add i2c clocks


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/fdt/imx8mq_ccm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/imx/fdt/imx8mq_ccm.c
diff -u src/sys/arch/arm/imx/fdt/imx8mq_ccm.c:1.1 src/sys/arch/arm/imx/fdt/imx8mq_ccm.c:1.2
--- src/sys/arch/arm/imx/fdt/imx8mq_ccm.c:1.1	Wed Jan 15 01:09:56 2020
+++ src/sys/arch/arm/imx/fdt/imx8mq_ccm.c	Wed Jan 15 11:36:34 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: imx8mq_ccm.c,v 1.1 2020/01/15 01:09:56 jmcneill Exp $ */
+/* $NetBSD: imx8mq_ccm.c,v 1.2 2020/01/15 11:36:34 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2020 Jared McNeill 
@@ -28,7 +28,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: imx8mq_ccm.c,v 1.1 2020/01/15 01:09:56 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx8mq_ccm.c,v 1.2 2020/01/15 11:36:34 jmcneill Exp $");
 
 #include 
 #include 
@@ -72,6 +72,9 @@ static const char *usb_bus_p[] = {
 static const char *usb_core_phy_p[] = {
 	"osc_25m", "sys1_pll_100m", "sys1_pll_40m", "sys2_pll_100m", "sys2_pll_200m", "clk_ext2", "clk_ext3", "audio_pll2_out"
 };
+static const char *i2c_p[] = {
+	"osc_25m", "sys1_pll_160m", "sys2_pll_50m", "sys3_pll_out", "audio_pll1_out", "video_pll1_out", "audio_pll2_out", "sys1_pll_133m"
+};
 
 CFATTACH_DECL_NEW(imx8mq_ccm, sizeof(struct imx_ccm_softc),
 	imx8mq_ccm_match, imx8mq_ccm_attach, NULL, NULL);
@@ -161,6 +164,16 @@ static struct imx_ccm_clk imx8mq_ccm_clk
 	IMX_ROOT_GATE(CLK_USB2_CTRL_ROOT, "usb2_ctrl_root_clk", "usb_bus", 0x44e0),
 	IMX_ROOT_GATE(CLK_USB1_PHY_ROOT, "usb1_phy_root_clk", "usb_phy_ref", 0x44f0),
 	IMX_ROOT_GATE(CLK_USB2_PHY_ROOT, "usb2_phy_root_clk", "usb_phy_ref", 0x4500),
+
+	IMX_COMPOSITE(CLK_I2C1, "i2c1", i2c_p, 0xad00, 0),
+	IMX_COMPOSITE(CLK_I2C2, "i2c2", i2c_p, 0xad80, 0),
+	IMX_COMPOSITE(CLK_I2C3, "i2c3", i2c_p, 0xae00, 0),
+	IMX_COMPOSITE(CLK_I2C4, "i2c4", i2c_p, 0xae80, 0),
+
+	IMX_ROOT_GATE(CLK_I2C1_ROOT, "i2c1_root_clk", "i2c1", 0x4170),
+	IMX_ROOT_GATE(CLK_I2C2_ROOT, "i2c2_root_clk", "i2c2", 0x4180),
+	IMX_ROOT_GATE(CLK_I2C3_ROOT, "i2c3_root_clk", "i2c3", 0x4190),
+	IMX_ROOT_GATE(CLK_I2C4_ROOT, "i2c4_root_clk", "i2c4", 0x41a0),
 };
 
 static int



CVS commit: src/sys/arch/arm/imx/fdt

2020-01-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jan 15 11:35:58 UTC 2020

Modified Files:
src/sys/arch/arm/imx/fdt: imx6_i2c.c

Log Message:
Match the more generic fsl,imx21-i2c compat string


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/fdt/imx6_i2c.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/imx/fdt/imx6_i2c.c
diff -u src/sys/arch/arm/imx/fdt/imx6_i2c.c:1.2 src/sys/arch/arm/imx/fdt/imx6_i2c.c:1.3
--- src/sys/arch/arm/imx/fdt/imx6_i2c.c:1.2	Mon Aug  5 12:21:00 2019
+++ src/sys/arch/arm/imx/fdt/imx6_i2c.c	Wed Jan 15 11:35:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx6_i2c.c,v 1.2 2019/08/05 12:21:00 hkenken Exp $	*/
+/*	$NetBSD: imx6_i2c.c,v 1.3 2020/01/15 11:35:58 jmcneill Exp $	*/
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec Corporation.
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx6_i2c.c,v 1.2 2019/08/05 12:21:00 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_i2c.c,v 1.3 2020/01/15 11:35:58 jmcneill Exp $");
 
 #include 
 
@@ -36,7 +36,7 @@ __KERNEL_RCSID(0, "$NetBSD: imx6_i2c.c,v
 int
 imxi2c_match(device_t parent, cfdata_t cf, void *aux)
 {
-	const char * const compatible[] = { "fsl,imx6q-i2c", NULL };
+	const char * const compatible[] = { "fsl,imx21-i2c", NULL };
 	struct fdt_attach_args * const faa = aux;
 
 	return of_match_compatible(faa->faa_phandle, compatible);



CVS commit: src/sys/arch/arm/imx/fdt

2019-12-04 Thread Kenichi Hashimoto
Module Name:src
Committed By:   hkenken
Date:   Thu Dec  5 00:31:14 UTC 2019

Modified Files:
src/sys/arch/arm/imx/fdt: imx6_pcie.c

Log Message:
Remove unnecessary code.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/imx/fdt/imx6_pcie.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/imx/fdt/imx6_pcie.c
diff -u src/sys/arch/arm/imx/fdt/imx6_pcie.c:1.5 src/sys/arch/arm/imx/fdt/imx6_pcie.c:1.6
--- src/sys/arch/arm/imx/fdt/imx6_pcie.c:1.5	Wed Oct 16 11:16:30 2019
+++ src/sys/arch/arm/imx/fdt/imx6_pcie.c	Thu Dec  5 00:31:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx6_pcie.c,v 1.5 2019/10/16 11:16:30 hkenken Exp $	*/
+/*	$NetBSD: imx6_pcie.c,v 1.6 2019/12/05 00:31:14 hkenken Exp $	*/
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec Corporation.
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx6_pcie.c,v 1.5 2019/10/16 11:16:30 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_pcie.c,v 1.6 2019/12/05 00:31:14 hkenken Exp $");
 
 #include "opt_pci.h"
 #include "opt_fdt.h"
@@ -204,10 +204,6 @@ imx6_pcie_attach(device_t parent, device
 		sc->sc_clk_pcie_ext_src = NULL;
 	}
 
-
-	TAILQ_INIT(>sc_intrs);
-	mutex_init(>sc_lock, MUTEX_DEFAULT, IPL_VM);
-
 	if (!fdtbus_intr_str(phandle, 0, intrstr, sizeof(intrstr))) {
 		aprint_error_dev(self, "failed to decode interrupt\n");
 		return;



CVS commit: src/sys/arch/arm/imx/fdt

2019-12-03 Thread Kenichi Hashimoto
Module Name:src
Committed By:   hkenken
Date:   Tue Dec  3 10:32:53 UTC 2019

Modified Files:
src/sys/arch/arm/imx/fdt: imx6_spi.c

Log Message:
Remove FDT_INTR_MPSAFE flag.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/fdt/imx6_spi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/imx/fdt/imx6_spi.c
diff -u src/sys/arch/arm/imx/fdt/imx6_spi.c:1.2 src/sys/arch/arm/imx/fdt/imx6_spi.c:1.3
--- src/sys/arch/arm/imx/fdt/imx6_spi.c:1.2	Fri Sep 27 02:59:21 2019
+++ src/sys/arch/arm/imx/fdt/imx6_spi.c	Tue Dec  3 10:32:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx6_spi.c,v 1.2 2019/09/27 02:59:21 hkenken Exp $	*/
+/*	$NetBSD: imx6_spi.c,v 1.3 2019/12/03 10:32:53 hkenken Exp $	*/
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi for Genetec Corporation.
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx6_spi.c,v 1.2 2019/09/27 02:59:21 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_spi.c,v 1.3 2019/12/03 10:32:53 hkenken Exp $");
 
 #include "opt_imxspi.h"
 
@@ -157,7 +157,7 @@ imxspi_attach(device_t parent, device_t 
 	}
 
 	sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_VM,
-	FDT_INTR_MPSAFE, imxspi_intr, >sc_imxspi);
+	0, imxspi_intr, >sc_imxspi);
 	if (sc->sc_ih == NULL) {
 		aprint_error_dev(self, "couldn't establish interrupt on %s\n",
 		intrstr);