Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/sys/arch Pull up following revision(s) (requested by jmcn...



details:   https://anonhg.NetBSD.org/src/rev/c714ca5b8a5e
branches:  netbsd-9
changeset: 461200:c714ca5b8a5e
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Nov 18 19:36:03 2019 +0000

description:
Pull up following revision(s) (requested by jmcneill in ticket #439):

        sys/arch/evbarm/conf/GENERIC64: revision 1.115
        sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.15

Add SPI clocks
Add sun6ispi

diffstat:

 sys/arch/arm/sunxi/sun50i_a64_ccu.c |  32 ++++++++++++++++++++++++++++++--
 sys/arch/evbarm/conf/GENERIC64      |   3 ++-
 2 files changed, 32 insertions(+), 3 deletions(-)

diffs (92 lines):

diff -r 3c26b9000af3 -r c714ca5b8a5e sys/arch/arm/sunxi/sun50i_a64_ccu.c
--- a/sys/arch/arm/sunxi/sun50i_a64_ccu.c       Mon Nov 18 19:33:10 2019 +0000
+++ b/sys/arch/arm/sunxi/sun50i_a64_ccu.c       Mon Nov 18 19:36:03 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sun50i_a64_ccu.c,v 1.13.2.1 2019/11/18 19:31:00 martin Exp $ */
+/* $NetBSD: sun50i_a64_ccu.c,v 1.13.2.2 2019/11/18 19:36:03 martin Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: sun50i_a64_ccu.c,v 1.13.2.1 2019/11/18 19:31:00 martin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sun50i_a64_ccu.c,v 1.13.2.2 2019/11/18 19:36:03 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -60,6 +60,8 @@
 #define        SDMMC0_CLK_REG          0x088
 #define        SDMMC1_CLK_REG          0x08c
 #define        SDMMC2_CLK_REG          0x090
+#define        SPI0_CLK_REG            0x0a0
+#define        SPI1_CLK_REG            0x0a4
 #define        I2SPCM0_CLK_REG         0x0b0
 #define        I2SPCM1_CLK_REG         0x0b4
 #define        I2SPCM2_CLK_REG         0x0b8
@@ -158,6 +160,7 @@
 static const char *de_parents[] = { "pll_periph0_2x", "pll_de" };
 static const char *hdmi_parents[] = { "pll_video0", "pll_video1" };
 static const char *i2s_parents[] = { "pll_audio_8x", "pll_audio_4x", "pll_audio_2x", "pll_audio" };
+static const char *spi_parents[] = { "hosc", "pll_periph0", "pll_periph1", NULL };
 static const char *tcon1_parents[] = { "pll_video0", NULL, "pll_video1", NULL };
 static const char *gpu_parents[] = { "pll_gpu" };
 
@@ -260,6 +263,16 @@
            SUNXI_CCU_NKMP_DIVIDE_BY_TWO),
        SUNXI_CCU_FIXED_FACTOR(A64_CLK_PLL_PERIPH0_2X, "pll_periph0_2x", "pll_periph0", 1, 2),
 
+       SUNXI_CCU_NKMP(A64_CLK_PLL_PERIPH1, "pll_periph1", "hosc",
+           PLL_PERIPH1_CTRL_REG,       /* reg */
+           __BITS(12,8),               /* n */
+           __BITS(5,4),                /* k */
+           0,                          /* m */
+           __BITS(17,16),              /* p */
+           __BIT(31),                  /* enable */
+           SUNXI_CCU_NKMP_DIVIDE_BY_TWO),
+       SUNXI_CCU_FIXED_FACTOR(A64_CLK_PLL_PERIPH1_2X, "pll_periph1_2x", "pll_periph1", 1, 2),
+
        SUNXI_CCU_NKMP_TABLE(A64_CLK_PLL_AUDIO_BASE, "pll_audio_base", "hosc",
            PLL_AUDIO_CTRL_REG,         /* reg */
            __BITS(14,8),               /* n */
@@ -430,6 +443,21 @@
            __BIT(31),          /* enable */
            0),
 
+       SUNXI_CCU_NM(A64_CLK_SPI0, "spi0", spi_parents,
+           SPI0_CLK_REG,       /* reg */
+           __BITS(17,16),      /* n */
+           __BITS(3,0),        /* m */
+           __BITS(25,24),      /* sel */
+           __BIT(31),          /* enable */
+           SUNXI_CCU_NM_POWER_OF_TWO|SUNXI_CCU_NM_ROUND_DOWN),
+
+       SUNXI_CCU_NM(A64_CLK_SPI1, "spi1", spi_parents,
+           SPI1_CLK_REG,       /* reg */
+           __BITS(17,16),      /* n */
+           __BITS(3,0),        /* m */
+           __BITS(25,24),      /* sel */
+           __BIT(31),          /* enable */
+           SUNXI_CCU_NM_POWER_OF_TWO|SUNXI_CCU_NM_ROUND_DOWN),
 
        SUNXI_CCU_DIV_GATE(A64_CLK_TCON1, "tcon1", tcon1_parents,
            TCON1_CLK_REG,      /* reg */
diff -r 3c26b9000af3 -r c714ca5b8a5e sys/arch/evbarm/conf/GENERIC64
--- a/sys/arch/evbarm/conf/GENERIC64    Mon Nov 18 19:33:10 2019 +0000
+++ b/sys/arch/evbarm/conf/GENERIC64    Mon Nov 18 19:36:03 2019 +0000
@@ -1,5 +1,5 @@
 #
-#      $NetBSD: GENERIC64,v 1.103.2.4 2019/11/18 19:33:10 martin Exp $
+#      $NetBSD: GENERIC64,v 1.103.2.5 2019/11/18 19:36:03 martin Exp $
 #
 #      GENERIC ARM (aarch64) kernel
 #
@@ -402,6 +402,7 @@
 
 # SPI controllers
 bcmspi*                at fdt?                 # Broadcom BCM283x SPI
+sun6ispi*      at fdt?                 # Allwinner SPI
 spi*           at spibus?
 
 # Audio support



Home | Main Index | Thread Index | Old Index