Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/samsung Provide exynos_sysreg_bsh as a global b...



details:   https://anonhg.NetBSD.org/src/rev/60f5ef166814
branches:  trunk
changeset: 332597:60f5ef166814
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Tue Sep 30 12:55:29 2014 +0000

description:
Provide exynos_sysreg_bsh as a global bus_space_subregion

diffstat:

 sys/arch/arm/samsung/exynos_soc.c |  15 +++++++++++++--
 sys/arch/arm/samsung/exynos_var.h |   3 ++-
 2 files changed, 15 insertions(+), 3 deletions(-)

diffs (81 lines):

diff -r a38da0224657 -r 60f5ef166814 sys/arch/arm/samsung/exynos_soc.c
--- a/sys/arch/arm/samsung/exynos_soc.c Tue Sep 30 11:34:07 2014 +0000
+++ b/sys/arch/arm/samsung/exynos_soc.c Tue Sep 30 12:55:29 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exynos_soc.c,v 1.21 2014/09/29 14:47:52 reinoud Exp $  */
+/*     $NetBSD: exynos_soc.c,v 1.22 2014/09/30 12:55:29 reinoud Exp $  */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #define        _ARM32_BUS_DMA_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: exynos_soc.c,v 1.21 2014/09/29 14:47:52 reinoud Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exynos_soc.c,v 1.22 2014/09/30 12:55:29 reinoud Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -127,6 +127,7 @@
 bus_space_handle_t exynos_pmu_bsh;
 bus_space_handle_t exynos_cmu_bsh;
 bus_space_handle_t exynos_cmu_apll_bsh;
+bus_space_handle_t exynos_sysreg_bsh;
 
 
 static int sysctl_cpufreq_target(SYSCTLFN_ARGS);
@@ -509,6 +510,7 @@
        bus_addr_t audiocore_vbase __diagused;
        bus_addr_t exynos_wdt_offset;
        bus_addr_t exynos_pmu_offset;
+       bus_addr_t exynos_sysreg_offset;
        bus_addr_t exynos_cmu_apll_offset;
 
        /* set up early console so we can use printf() and friends */
@@ -525,6 +527,7 @@
        audiocore_vbase = EXYNOS4_AUDIOCORE_VBASE;
        exynos_wdt_offset = EXYNOS4_WDT_OFFSET;
        exynos_pmu_offset = EXYNOS4_PMU_OFFSET;
+       exynos_sysreg_offset = EXYNOS4_SYSREG_OFFSET;
        exynos_cmu_apll_offset = EXYNOS4_CMU_APLL;
 
        cpu_freq_settings = cpu_freq_settings_exynos4;
@@ -538,6 +541,7 @@
        audiocore_vbase = EXYNOS5_AUDIOCORE_VBASE;
        exynos_wdt_offset = EXYNOS5_WDT_OFFSET;
        exynos_pmu_offset = EXYNOS5_PMU_OFFSET;
+       exynos_sysreg_offset = EXYNOS5_SYSREG_OFFSET;
        exynos_cmu_apll_offset = EXYNOS5_CMU_APLL;
 
        cpu_freq_settings = cpu_freq_settings_exynos5;
@@ -573,6 +577,13 @@
                        __func__, error);
 
        exynos_cmu_bsh = exynos_core_bsh;
+       bus_space_subregion(&exynos_bs_tag, exynos_core_bsh,
+               exynos_sysreg_offset, EXYNOS_BLOCK_SIZE,
+               &exynos_sysreg_bsh);
+       if (error)
+               panic("%s: failed to subregion sysreg registers: %d",
+                       __func__, error);
+
        error = bus_space_subregion(&exynos_bs_tag, exynos_cmu_bsh,
                exynos_cmu_apll_offset, 0xfff, &exynos_cmu_apll_bsh);
        if (error)
diff -r a38da0224657 -r 60f5ef166814 sys/arch/arm/samsung/exynos_var.h
--- a/sys/arch/arm/samsung/exynos_var.h Tue Sep 30 11:34:07 2014 +0000
+++ b/sys/arch/arm/samsung/exynos_var.h Tue Sep 30 12:55:29 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exynos_var.h,v 1.16 2014/09/29 14:47:52 reinoud Exp $  */
+/*     $NetBSD: exynos_var.h,v 1.17 2014/09/30 12:55:29 reinoud Exp $  */
 
 /*-
  * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
@@ -119,6 +119,7 @@
 extern bus_space_handle_t exynos_wdt_bsh;
 extern bus_space_handle_t exynos_pmu_bsh;
 extern bus_space_handle_t exynos_cmu_bsh;
+extern bus_space_handle_t exynos_sysreg_bsh;
 
 extern void exynos_bootstrap(vaddr_t, vaddr_t);
 extern void exynos_dma_bootstrap(psize_t memsize);



Home | Main Index | Thread Index | Old Index