CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Thu Nov 28 14:13:37 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_com.c Log Message: Remove FDT_INTR_MPSAFE flag. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/fdt/imx6_com.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_com.c diff -u src/sys/arch/arm/imx/fdt/imx6_com.c:1.1 src/sys/arch/arm/imx/fdt/imx6_com.c:1.2 --- src/sys/arch/arm/imx/fdt/imx6_com.c:1.1 Wed Jul 24 13:12:33 2019 +++ src/sys/arch/arm/imx/fdt/imx6_com.c Thu Nov 28 14:13:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_com.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $ */ +/* $NetBSD: imx6_com.c,v 1.2 2019/11/28 14:13:37 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_com.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx6_com.c,v 1.2 2019/11/28 14:13:37 hkenken Exp $"); #include "opt_fdt.h" #include "opt_imxuart.h" @@ -99,9 +99,11 @@ imx6_com_attach(device_t parent, device_ } sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_SERIAL, - FDT_INTR_MPSAFE, imxuintr, sc); - if (sc->sc_ih == NULL) + 0, imxuintr, sc); + if (sc->sc_ih == NULL) { aprint_error_dev(self, "failed to establish interrupt\n"); + return; + } aprint_normal_dev(self, "interrupting on %s\n", intrstr);
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Thu Nov 28 14:13:37 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_com.c Log Message: Remove FDT_INTR_MPSAFE flag. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/fdt/imx6_com.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Thu Nov 14 06:00:16 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: if_enet_imx.c Log Message: Fixed bug. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/imx/fdt/if_enet_imx.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/if_enet_imx.c diff -u src/sys/arch/arm/imx/fdt/if_enet_imx.c:1.7 src/sys/arch/arm/imx/fdt/if_enet_imx.c:1.8 --- src/sys/arch/arm/imx/fdt/if_enet_imx.c:1.7 Wed Nov 13 07:56:10 2019 +++ src/sys/arch/arm/imx/fdt/if_enet_imx.c Thu Nov 14 06:00:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_enet_imx.c,v 1.7 2019/11/13 07:56:10 hkenken Exp $ */ +/* $NetBSD: if_enet_imx.c,v 1.8 2019/11/14 06:00:16 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: if_enet_imx.c,v 1.7 2019/11/13 07:56:10 hkenken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_enet_imx.c,v 1.8 2019/11/14 06:00:16 hkenken Exp $"); #include "opt_fdt.h" @@ -210,7 +210,7 @@ enet_phy_reset(struct enet_fdt_softc *sc fdtbus_gpio_write(sc->sc_pin_reset, 0); /* Post delay */ - if (!of_getprop_uint32(phandle, "phy-reset-post-delay", &msec)) + if (of_getprop_uint32(phandle, "phy-reset-post-delay", &msec)) msec = 0; delay(msec * 1000);
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Thu Nov 14 06:00:16 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: if_enet_imx.c Log Message: Fixed bug. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/imx/fdt/if_enet_imx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Wed Nov 13 07:56:11 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: if_enet_imx.c Log Message: Add support "phy-reset-post-delay". To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/imx/fdt/if_enet_imx.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/if_enet_imx.c diff -u src/sys/arch/arm/imx/fdt/if_enet_imx.c:1.6 src/sys/arch/arm/imx/fdt/if_enet_imx.c:1.7 --- src/sys/arch/arm/imx/fdt/if_enet_imx.c:1.6 Tue Nov 12 08:40:57 2019 +++ src/sys/arch/arm/imx/fdt/if_enet_imx.c Wed Nov 13 07:56:10 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_enet_imx.c,v 1.6 2019/11/12 08:40:57 hkenken Exp $ */ +/* $NetBSD: if_enet_imx.c,v 1.7 2019/11/13 07:56:10 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: if_enet_imx.c,v 1.6 2019/11/12 08:40:57 hkenken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_enet_imx.c,v 1.7 2019/11/13 07:56:10 hkenken Exp $"); #include "opt_fdt.h" @@ -195,19 +195,23 @@ enet_init_clocks(struct enet_softc *sc) static void enet_phy_reset(struct enet_fdt_softc *sc, const int phandle) { - int error; + u_int msec; sc->sc_pin_reset = fdtbus_gpio_acquire(phandle, "phy-reset-gpios", GPIO_PIN_OUTPUT); if (sc->sc_pin_reset == NULL) return; - u_int msec; - error = of_getprop_uint32(phandle, "phy-reset-duration", &msec); - if (error) + if (of_getprop_uint32(phandle, "phy-reset-duration", &msec)) msec = 1; /* Reset */ fdtbus_gpio_write(sc->sc_pin_reset, 1); delay(msec * 1000); fdtbus_gpio_write(sc->sc_pin_reset, 0); + + /* Post delay */ + if (!of_getprop_uint32(phandle, "phy-reset-post-delay", &msec)) + msec = 0; + + delay(msec * 1000); }
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Wed Nov 13 07:56:11 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: if_enet_imx.c Log Message: Add support "phy-reset-post-delay". To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/imx/fdt/if_enet_imx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Tue Nov 12 08:40:57 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: if_enet_imx.c Log Message: Fixed bug. * typo To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/imx/fdt/if_enet_imx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Tue Nov 12 08:40:57 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: if_enet_imx.c Log Message: Fixed bug. * typo To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/imx/fdt/if_enet_imx.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/if_enet_imx.c diff -u src/sys/arch/arm/imx/fdt/if_enet_imx.c:1.5 src/sys/arch/arm/imx/fdt/if_enet_imx.c:1.6 --- src/sys/arch/arm/imx/fdt/if_enet_imx.c:1.5 Tue Nov 12 05:09:29 2019 +++ src/sys/arch/arm/imx/fdt/if_enet_imx.c Tue Nov 12 08:40:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_enet_imx.c,v 1.5 2019/11/12 05:09:29 hkenken Exp $ */ +/* $NetBSD: if_enet_imx.c,v 1.6 2019/11/12 08:40:57 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: if_enet_imx.c,v 1.5 2019/11/12 05:09:29 hkenken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_enet_imx.c,v 1.6 2019/11/12 08:40:57 hkenken Exp $"); #include "opt_fdt.h" @@ -91,7 +91,7 @@ enet_attach(device_t parent, device_t se } sc->sc_clk_ipg = fdtbus_clock_get(phandle, "ipg"); - if (sc->sc_clk_enet == NULL) { + if (sc->sc_clk_ipg == NULL) { aprint_error(": couldn't get clock ipg\n"); goto failure; }
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Wed Oct 23 02:34:43 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_platform.c Log Message: Implement platform reset for i.MX6. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 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.7 src/sys/arch/arm/imx/fdt/imx6_platform.c:1.8 --- src/sys/arch/arm/imx/fdt/imx6_platform.c:1.7 Fri Oct 18 12:53:08 2019 +++ src/sys/arch/arm/imx/fdt/imx6_platform.c Wed Oct 23 02:34:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_platform.c,v 1.7 2019/10/18 12:53:08 hkenken Exp $ */ +/* $NetBSD: imx6_platform.c,v 1.8 2019/10/23 02:34:43 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_platform.c,v 1.7 2019/10/18 12:53:08 hkenken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx6_platform.c,v 1.8 2019/10/23 02:34:43 hkenken Exp $"); #include "arml2cc.h" #include "opt_console.h" @@ -57,6 +57,7 @@ __KERNEL_RCSID(0, "$NetBSD: imx6_platfor #include #include #include +#include #include @@ -197,6 +198,27 @@ imx_platform_mpstart(void) static void imx6_platform_reset(void) { + bus_space_tag_t bst = &armv7_generic_bs_tag; + bus_space_handle_t bsh; + + if (bus_space_map(bst, IMX6_AIPS1_BASE + AIPS1_WDOG1_BASE, AIPS1_WDOG_SIZE, 0, &bsh)) + panic("couldn't map wdog1 registers"); + + delay(1000); /* wait for flushing FIFO of serial console */ + + cpsid(I32_bit|F32_bit); + + /* software reset signal on wdog */ + bus_space_write_2(bst, bsh, IMX_WDOG_WCR, WCR_WDE); + + /* + * write twice due to errata. + * Reference: ERR004346: IMX6DQCE Chip Errata for the i.MX 6Dual/6Quad + */ + bus_space_write_2(bst, bsh, IMX_WDOG_WCR, WCR_WDE); + + for (;;) + __asm("wfi"); } const struct arm_platform imx6_platform = {
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Wed Oct 23 02:34:43 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_platform.c Log Message: Implement platform reset for i.MX6. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 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.
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Fri Oct 4 06:49:40 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_ahcisata.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_ahcisata.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_ahcisata.c diff -u src/sys/arch/arm/imx/fdt/imx6_ahcisata.c:1.2 src/sys/arch/arm/imx/fdt/imx6_ahcisata.c:1.3 --- src/sys/arch/arm/imx/fdt/imx6_ahcisata.c:1.2 Mon Aug 19 03:45:51 2019 +++ src/sys/arch/arm/imx/fdt/imx6_ahcisata.c Fri Oct 4 06:49:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_ahcisata.c,v 1.2 2019/08/19 03:45:51 hkenken Exp $ */ +/* $NetBSD: imx6_ahcisata.c,v 1.3 2019/10/04 06:49:40 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_ahcisata.c,v 1.2 2019/08/19 03:45:51 hkenken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx6_ahcisata.c,v 1.3 2019/10/04 06:49:40 hkenken Exp $"); #include #include @@ -116,6 +116,8 @@ imx6_ahcisata_attach(device_t parent, de sc->sc_rx_eq = 3000; if (of_getprop_bool(phandle, "fsl,no-spread-spectrum") == false) sc->sc_ss = 1; + else + sc->sc_ss = 0; sc->sc_clk_sata = fdtbus_clock_get(phandle, "sata"); if (sc->sc_clk_sata == NULL) { @@ -181,8 +183,8 @@ imx6_ahcisata_attach(device_t parent, de return; } - sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_BIO, - FDT_INTR_MPSAFE, ahci_intr, &sc->sc); + sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_BIO, 0, + ahci_intr, &sc->sc); if (sc->sc_ih == NULL) { aprint_error_dev(self, "failed to establish interrupt on %s\n", intrstr); @@ -412,10 +414,10 @@ imx6_ahcisata_init(struct imx6_ahcisata_ val = gpr13_sata_phy_settings[i].def_val; v |= __SHIFTIN(val, gpr13_sata_phy_settings[i].mask); } - v |= __SHIFTIN(sc->sc_ss, IOMUX_GPR13_SATA_PHY_5); v |= __SHIFTIN(0x12, IOMUX_GPR13_SATA_PHY_7); /* Rx SATA2m */ v |= __SHIFTIN(3, IOMUX_GPR13_SATA_PHY_6); /* Rx DPLL mode */ v |= __SHIFTIN(1, IOMUX_GPR13_SATA_SPEED); /* 3.0GHz */ + v |= __SHIFTIN(sc->sc_ss, IOMUX_GPR13_SATA_PHY_5); v |= __SHIFTIN(1, IOMUX_GPR13_SATA_PHY_1); /* PLL clock enable */ bus_space_write_4(sc->sc_iot, sc->sc_gpr_ioh, IOMUX_GPR13, v);
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Fri Oct 4 06:49:40 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_ahcisata.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_ahcisata.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Wed Oct 2 01:34:09 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_iomux.c Log Message: Fixed compile error. remove fdtbus_pinctrl_configure(). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 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.
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Wed Oct 2 01:34:09 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_iomux.c Log Message: Fixed compile error. remove fdtbus_pinctrl_configure(). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 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.1 src/sys/arch/arm/imx/fdt/imx6_iomux.c:1.2 --- src/sys/arch/arm/imx/fdt/imx6_iomux.c:1.1 Wed Jul 24 13:12:33 2019 +++ src/sys/arch/arm/imx/fdt/imx6_iomux.c Wed Oct 2 01:34:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_iomux.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $ */ +/* $NetBSD: imx6_iomux.c,v 1.2 2019/10/02 01:34:09 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_iomux.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx6_iomux.c,v 1.2 2019/10/02 01:34:09 hkenken Exp $"); #include "opt_fdt.h" @@ -172,7 +172,5 @@ imxiomux_attach(device_t parent, device_ fdtbus_register_pinctrl_config(self, sub, &imx6_pinctrl_funcs); } } - - fdtbus_pinctrl_configure(); }
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Fri Sep 27 02:54:57 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_sdhc.c Log Message: Add SDHC_FLAG_NO_BUSY_INTR flag. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/fdt/imx6_sdhc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Fri Sep 27 02:54:57 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_sdhc.c Log Message: Add SDHC_FLAG_NO_BUSY_INTR flag. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/fdt/imx6_sdhc.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_sdhc.c diff -u src/sys/arch/arm/imx/fdt/imx6_sdhc.c:1.2 src/sys/arch/arm/imx/fdt/imx6_sdhc.c:1.3 --- src/sys/arch/arm/imx/fdt/imx6_sdhc.c:1.2 Mon Aug 19 03:48:41 2019 +++ src/sys/arch/arm/imx/fdt/imx6_sdhc.c Fri Sep 27 02:54:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_sdhc.c,v 1.2 2019/08/19 03:48:41 hkenken Exp $ */ +/* $NetBSD: imx6_sdhc.c,v 1.3 2019/09/27 02:54:57 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_sdhc.c,v 1.2 2019/08/19 03:48:41 hkenken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx6_sdhc.c,v 1.3 2019/09/27 02:54:57 hkenken Exp $"); #include "opt_fdt.h" @@ -119,7 +119,8 @@ imx6_sdhc_attach(device_t parent, device SDHC_FLAG_HAVE_DVS | SDHC_FLAG_32BIT_ACCESS | SDHC_FLAG_USE_ADMA2 | - SDHC_FLAG_USDHC; + SDHC_FLAG_USDHC | + SDHC_FLAG_NO_BUSY_INTR; if (bus_width == 8) sc->sc_sdhc.sc_flags |= SDHC_FLAG_8BIT_MODE;
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Mon Aug 19 10:44:35 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_platform.c Log Message: Use a9ptmr_delay(). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 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.5 src/sys/arch/arm/imx/fdt/imx6_platform.c:1.6 --- src/sys/arch/arm/imx/fdt/imx6_platform.c:1.5 Mon Aug 5 12:44:01 2019 +++ src/sys/arch/arm/imx/fdt/imx6_platform.c Mon Aug 19 10:44:35 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_platform.c,v 1.5 2019/08/05 12:44:01 hkenken Exp $ */ +/* $NetBSD: imx6_platform.c,v 1.6 2019/08/19 10:44:35 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_platform.c,v 1.5 2019/08/05 12:44:01 hkenken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx6_platform.c,v 1.6 2019/08/19 10:44:35 hkenken Exp $"); #include "arml2cc.h" #include "opt_console.h" @@ -191,7 +191,7 @@ const struct arm_platform imx6_platform .ap_init_attach_args = imx_platform_init_attach_args, .ap_device_register = imx_platform_device_register, .ap_reset = imx6_platform_reset, - .ap_delay = a9tmr_delay, + .ap_delay = a9ptmr_delay, .ap_uart_freq = imx_platform_uart_freq, .ap_mpstart = imx_platform_mpstart, };
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Mon Aug 19 10:44:35 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_platform.c Log Message: Use a9ptmr_delay(). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 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.
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Mon Aug 19 03:48:41 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_sdhc.c Log Message: Support write protect gpio pin. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/fdt/imx6_sdhc.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_sdhc.c diff -u src/sys/arch/arm/imx/fdt/imx6_sdhc.c:1.1 src/sys/arch/arm/imx/fdt/imx6_sdhc.c:1.2 --- src/sys/arch/arm/imx/fdt/imx6_sdhc.c:1.1 Wed Jul 24 13:12:33 2019 +++ src/sys/arch/arm/imx/fdt/imx6_sdhc.c Mon Aug 19 03:48:41 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_sdhc.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $ */ +/* $NetBSD: imx6_sdhc.c,v 1.2 2019/08/19 03:48:41 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_sdhc.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx6_sdhc.c,v 1.2 2019/08/19 03:48:41 hkenken Exp $"); #include "opt_fdt.h" @@ -50,6 +50,7 @@ static int imx6_sdhc_match(device_t, cfd static void imx6_sdhc_attach(device_t, device_t, void *); static int imx6_sdhc_card_detect(struct sdhc_softc *); +static int imx6_sdhc_write_protect(struct sdhc_softc *); struct imx6_sdhc_softc { struct sdhc_softc sc_sdhc; @@ -64,6 +65,7 @@ struct imx6_sdhc_softc { struct clk *sc_clk_per; struct fdtbus_gpio_pin *sc_pin_cd; + struct fdtbus_gpio_pin *sc_pin_wp; }; CFATTACH_DECL_NEW(imx6_sdhc, sizeof(struct imx6_sdhc_softc), @@ -116,13 +118,12 @@ imx6_sdhc_attach(device_t parent, device SDHC_FLAG_NO_PWR0 | SDHC_FLAG_HAVE_DVS | SDHC_FLAG_32BIT_ACCESS | - SDHC_FLAG_8BIT_MODE | SDHC_FLAG_USE_ADMA2 | SDHC_FLAG_USDHC; - if (bus_width == 8) { + if (bus_width == 8) sc->sc_sdhc.sc_flags |= SDHC_FLAG_8BIT_MODE; - } + sc->sc_sdhc.sc_host = &sc->sc_host; sc->sc_bst = faa->faa_bst; @@ -135,12 +136,17 @@ imx6_sdhc_attach(device_t parent, device sc->sc_pin_cd = fdtbus_gpio_acquire(faa->faa_phandle, "cd-gpios", GPIO_PIN_INPUT); - if (sc->sc_pin_cd) { sc->sc_sdhc.sc_vendor_card_detect = imx6_sdhc_card_detect; sc->sc_sdhc.sc_flags |= SDHC_FLAG_POLL_CARD_DET; } + sc->sc_pin_wp = fdtbus_gpio_acquire(faa->faa_phandle, + "wp-gpios", GPIO_PIN_INPUT); + if (sc->sc_pin_wp) { + sc->sc_sdhc.sc_vendor_write_protect = imx6_sdhc_write_protect; + } + error = clk_enable(sc->sc_clk_per); if (error) { aprint_error(": couldn't enable clock: %d\n", error); @@ -160,8 +166,8 @@ imx6_sdhc_attach(device_t parent, device return; } - sc->sc_ih = fdtbus_intr_establish(faa->faa_phandle, 0, IPL_SDMMC, 0, - sdhc_intr, &sc->sc_sdhc); + sc->sc_ih = fdtbus_intr_establish(faa->faa_phandle, 0, IPL_SDMMC, + FDT_INTR_MPSAFE, sdhc_intr, &sc->sc_sdhc); if (sc->sc_ih == NULL) { aprint_error_dev(self, "couldn't establish interrupt on %s\n", intrstr); @@ -189,3 +195,13 @@ imx6_sdhc_card_detect(struct sdhc_softc return fdtbus_gpio_read(sc->sc_pin_cd); } +static int +imx6_sdhc_write_protect(struct sdhc_softc *ssc) +{ + struct imx6_sdhc_softc *sc = device_private(ssc->sc_dev); + + KASSERT(sc->sc_pin_wp != NULL); + + return fdtbus_gpio_read(sc->sc_pin_wp); +} +
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Mon Aug 19 03:48:41 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_sdhc.c Log Message: Support write protect gpio pin. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/fdt/imx6_sdhc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Mon Aug 19 03:45:51 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: if_enet_imx.c imx6_ahcisata.c imx6_gpio.c imx6_pcie.c imx6_usb.c Log Message: Enable FDT_INTR_MPSAFE flag. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/fdt/if_enet_imx.c \ src/sys/arch/arm/imx/fdt/imx6_pcie.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/fdt/imx6_ahcisata.c \ src/sys/arch/arm/imx/fdt/imx6_gpio.c src/sys/arch/arm/imx/fdt/imx6_usb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Mon Aug 19 03:45:51 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: if_enet_imx.c imx6_ahcisata.c imx6_gpio.c imx6_pcie.c imx6_usb.c Log Message: Enable FDT_INTR_MPSAFE flag. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/fdt/if_enet_imx.c \ src/sys/arch/arm/imx/fdt/imx6_pcie.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/fdt/imx6_ahcisata.c \ src/sys/arch/arm/imx/fdt/imx6_gpio.c src/sys/arch/arm/imx/fdt/imx6_usb.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/if_enet_imx.c diff -u src/sys/arch/arm/imx/fdt/if_enet_imx.c:1.2 src/sys/arch/arm/imx/fdt/if_enet_imx.c:1.3 --- src/sys/arch/arm/imx/fdt/if_enet_imx.c:1.2 Tue Jul 30 06:26:31 2019 +++ src/sys/arch/arm/imx/fdt/if_enet_imx.c Mon Aug 19 03:45:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_enet_imx.c,v 1.2 2019/07/30 06:26:31 hkenken Exp $ */ +/* $NetBSD: if_enet_imx.c,v 1.3 2019/08/19 03:45:51 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: if_enet_imx.c,v 1.2 2019/07/30 06:26:31 hkenken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_enet_imx.c,v 1.3 2019/08/19 03:45:51 hkenken Exp $"); #include "opt_fdt.h" @@ -118,8 +118,8 @@ enet_attach(device_t parent, device_t se aprint_error_dev(self, "failed to decode interrupt\n"); goto failure; } - sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_NET, 0, - enet_intr, sc); + sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_NET, + FDT_INTR_MPSAFE, enet_intr, sc); if (sc->sc_ih == NULL) { aprint_error_dev(self, "failed to establish interrupt on %s\n", intrstr); Index: src/sys/arch/arm/imx/fdt/imx6_pcie.c diff -u src/sys/arch/arm/imx/fdt/imx6_pcie.c:1.2 src/sys/arch/arm/imx/fdt/imx6_pcie.c:1.3 --- src/sys/arch/arm/imx/fdt/imx6_pcie.c:1.2 Fri Jul 26 06:57:54 2019 +++ src/sys/arch/arm/imx/fdt/imx6_pcie.c Mon Aug 19 03:45:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_pcie.c,v 1.2 2019/07/26 06:57:54 skrll Exp $ */ +/* $NetBSD: imx6_pcie.c,v 1.3 2019/08/19 03:45:51 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.2 2019/07/26 06:57:54 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx6_pcie.c,v 1.3 2019/08/19 03:45:51 hkenken Exp $"); #include "opt_pci.h" #include "opt_fdt.h" @@ -179,7 +179,8 @@ imx6_pcie_attach(device_t parent, device return; } - sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_VM, 0, imxpcie_intr, sc); + sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_VM, + FDT_INTR_MPSAFE, imxpcie_intr, sc); if (sc->sc_ih == NULL) { aprint_error_dev(self, "failed to establish interrupt on %s\n", intrstr); Index: src/sys/arch/arm/imx/fdt/imx6_ahcisata.c diff -u src/sys/arch/arm/imx/fdt/imx6_ahcisata.c:1.1 src/sys/arch/arm/imx/fdt/imx6_ahcisata.c:1.2 --- src/sys/arch/arm/imx/fdt/imx6_ahcisata.c:1.1 Wed Jul 24 13:12:33 2019 +++ src/sys/arch/arm/imx/fdt/imx6_ahcisata.c Mon Aug 19 03:45:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_ahcisata.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $ */ +/* $NetBSD: imx6_ahcisata.c,v 1.2 2019/08/19 03:45:51 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_ahcisata.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx6_ahcisata.c,v 1.2 2019/08/19 03:45:51 hkenken Exp $"); #include #include @@ -181,8 +181,8 @@ imx6_ahcisata_attach(device_t parent, de return; } - sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_BIO, 0, - ahci_intr, &sc->sc); + sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_BIO, + FDT_INTR_MPSAFE, ahci_intr, &sc->sc); if (sc->sc_ih == NULL) { aprint_error_dev(self, "failed to establish interrupt on %s\n", intrstr); Index: src/sys/arch/arm/imx/fdt/imx6_gpio.c diff -u src/sys/arch/arm/imx/fdt/imx6_gpio.c:1.1 src/sys/arch/arm/imx/fdt/imx6_gpio.c:1.2 --- src/sys/arch/arm/imx/fdt/imx6_gpio.c:1.1 Wed Jul 24 13:12:33 2019 +++ src/sys/arch/arm/imx/fdt/imx6_gpio.c Mon Aug 19 03:45:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_gpio.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $ */ +/* $NetBSD: imx6_gpio.c,v 1.2 2019/08/19 03:45:51 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_gpio.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $"); +__KE
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Mon Aug 5 12:44:01 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_platform.c Log Message: Add "fsl,imx6qp" (i.MX6QP) to ARM_PLATFORM list. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 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.4 src/sys/arch/arm/imx/fdt/imx6_platform.c:1.5 --- src/sys/arch/arm/imx/fdt/imx6_platform.c:1.4 Sat Jul 27 07:41:43 2019 +++ src/sys/arch/arm/imx/fdt/imx6_platform.c Mon Aug 5 12:44:01 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_platform.c,v 1.4 2019/07/27 07:41:43 skrll Exp $ */ +/* $NetBSD: imx6_platform.c,v 1.5 2019/08/05 12:44:01 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_platform.c,v 1.4 2019/07/27 07:41:43 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx6_platform.c,v 1.5 2019/08/05 12:44:01 hkenken Exp $"); #include "arml2cc.h" #include "opt_console.h" @@ -196,5 +196,6 @@ const struct arm_platform imx6_platform .ap_mpstart = imx_platform_mpstart, }; -ARM_PLATFORM(imx6, "fsl,imx6q", &imx6_platform); +ARM_PLATFORM(imx6q, "fsl,imx6q", &imx6_platform); +ARM_PLATFORM(imx6qp, "fsl,imx6qp", &imx6_platform);
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Mon Aug 5 12:44:01 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_platform.c Log Message: Add "fsl,imx6qp" (i.MX6QP) to ARM_PLATFORM list. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 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.
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: skrll Date: Sat Jul 27 07:41:43 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_platform.c Log Message: Need opt_console for CONSADDR, etc To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 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.3 src/sys/arch/arm/imx/fdt/imx6_platform.c:1.4 --- src/sys/arch/arm/imx/fdt/imx6_platform.c:1.3 Fri Jul 26 06:59:48 2019 +++ src/sys/arch/arm/imx/fdt/imx6_platform.c Sat Jul 27 07:41:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_platform.c,v 1.3 2019/07/26 06:59:48 skrll Exp $ */ +/* $NetBSD: imx6_platform.c,v 1.4 2019/07/27 07:41:43 skrll Exp $ */ /*- * Copyright (c) 2019 Genetec Corporation. All rights reserved. * Written by Hashimoto Kenichi for Genetec Corporation. @@ -25,9 +25,10 @@ * SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: imx6_platform.c,v 1.3 2019/07/26 06:59:48 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx6_platform.c,v 1.4 2019/07/27 07:41:43 skrll Exp $"); #include "arml2cc.h" +#include "opt_console.h" #include "opt_fdt.h" #include "opt_multiprocessor.h" #include "opt_soc.h"
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: skrll Date: Sat Jul 27 07:41:43 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_platform.c Log Message: Need opt_console for CONSADDR, etc To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 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.
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: skrll Date: Fri Jul 26 06:59:48 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_platform.c Log Message: KNF on #includes To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 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.2 src/sys/arch/arm/imx/fdt/imx6_platform.c:1.3 --- src/sys/arch/arm/imx/fdt/imx6_platform.c:1.2 Fri Jul 26 06:57:55 2019 +++ src/sys/arch/arm/imx/fdt/imx6_platform.c Fri Jul 26 06:59:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_platform.c,v 1.2 2019/07/26 06:57:55 skrll Exp $ */ +/* $NetBSD: imx6_platform.c,v 1.3 2019/07/26 06:59:48 skrll Exp $ */ /*- * Copyright (c) 2019 Genetec Corporation. All rights reserved. * Written by Hashimoto Kenichi for Genetec Corporation. @@ -25,12 +25,12 @@ * SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: imx6_platform.c,v 1.2 2019/07/26 06:57:55 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx6_platform.c,v 1.3 2019/07/26 06:59:48 skrll Exp $"); -#include "opt_soc.h" #include "arml2cc.h" -#include "opt_multiprocessor.h" #include "opt_fdt.h" +#include "opt_multiprocessor.h" +#include "opt_soc.h" #include #include
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: skrll Date: Fri Jul 26 06:59:48 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_platform.c Log Message: KNF on #includes To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 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.