Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Another kernel bites te dust.
details: https://anonhg.NetBSD.org/src/rev/6020b8fb2a9b
branches: trunk
changeset: 447645:6020b8fb2a9b
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Jan 20 10:18:03 2019 +0000
description:
Another kernel bites te dust.
Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
diffstat:
distrib/utils/embedded/conf/armv7.conf | 9 +-
etc/etc.evbarm/Makefile.inc | 4 +-
sys/arch/arm/amlogic/amlogic_board.c | 597 --------------------
sys/arch/arm/amlogic/amlogic_canvasreg.h | 54 -
sys/arch/arm/amlogic/amlogic_com.c | 461 ----------------
sys/arch/arm/amlogic/amlogic_comreg.h | 57 -
sys/arch/arm/amlogic/amlogic_comvar.h | 37 -
sys/arch/arm/amlogic/amlogic_cpufreq.c | 303 ----------
sys/arch/arm/amlogic/amlogic_crureg.h | 181 ------
sys/arch/arm/amlogic/amlogic_dwctwo.c | 155 -----
sys/arch/arm/amlogic/amlogic_genfb.c | 686 -----------------------
sys/arch/arm/amlogic/amlogic_gmac.c | 114 ---
sys/arch/arm/amlogic/amlogic_gpio.c | 302 ----------
sys/arch/arm/amlogic/amlogic_hdmireg.h | 38 -
sys/arch/arm/amlogic/amlogic_intr.h | 47 -
sys/arch/arm/amlogic/amlogic_io.c | 146 -----
sys/arch/arm/amlogic/amlogic_reg.h | 102 ---
sys/arch/arm/amlogic/amlogic_rng.c | 112 ---
sys/arch/arm/amlogic/amlogic_rtc.c | 370 ------------
sys/arch/arm/amlogic/amlogic_rtcreg.h | 101 ---
sys/arch/arm/amlogic/amlogic_sdhc.c | 864 ------------------------------
sys/arch/arm/amlogic/amlogic_sdhcreg.h | 150 -----
sys/arch/arm/amlogic/amlogic_sdio.c | 575 -------------------
sys/arch/arm/amlogic/amlogic_sdioreg.h | 116 ----
sys/arch/arm/amlogic/amlogic_var.h | 106 ---
sys/arch/arm/amlogic/amlogic_vpureg.h | 151 -----
sys/arch/evbarm/amlogic/amlogic_machdep.c | 765 --------------------------
sys/arch/evbarm/amlogic/platform.h | 39 -
sys/arch/evbarm/conf/ODROID-C1 | 98 ---
sys/arch/evbarm/conf/files.amlogic | 8 -
sys/arch/evbarm/conf/mk.amlogic | 28 -
sys/arch/evbarm/conf/std.amlogic | 29 -
32 files changed, 5 insertions(+), 6800 deletions(-)
diffs (truncated from 6974 to 300 lines):
diff -r 4ff4c5605c59 -r 6020b8fb2a9b distrib/utils/embedded/conf/armv7.conf
--- a/distrib/utils/embedded/conf/armv7.conf Sun Jan 20 00:44:17 2019 +0000
+++ b/distrib/utils/embedded/conf/armv7.conf Sun Jan 20 10:18:03 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: armv7.conf,v 1.28 2018/11/30 20:53:02 jmcneill Exp $
+# $NetBSD: armv7.conf,v 1.29 2019/01/20 10:18:03 skrll Exp $
# ARMv7 customization script used by mkimage
#
board=armv7
@@ -10,7 +10,6 @@
# altera, exynos, sunxi, tegra
kernels_generic="GENERIC"
# non-FDTised / special kernels
-kernels_amlogic="ODROID-C1"
kernels_beagle="BEAGLEBOARD BEAGLEBONE"
kernels_rpi="RPI2"
@@ -95,7 +94,7 @@
}
populate_amlogic() {
- odroidc1_kernelimg=netbsd-ODROID-C1.ub
+ odroidc1_kernelimg=netbsd-GENERIC.ub
# Create a boot.ini for Amlogic U-Boot
cat >> "${mnt}/boot/boot.ini" << EOF
@@ -121,7 +120,7 @@
echo "${bar} looking for kernels in ${kernel} ${bar}"
kernels=""
# .ub kernels
- for k in $kernels_generic $kernels_amlogic $kernels_beagle; do
+ for k in $kernels_generic $kernels_beagle; do
f="${kernel}/netbsd-${k}.ub.gz"
test -f "${f}" && kernels="${kernels} ${f}"
done
@@ -131,7 +130,7 @@
test -f "${f}" && kernels="${kernels} ${f}"
done
# .dtb files
- for k in $kernels_generic $kernels_amlogic $kernels_rpi $; do
+ for k in $kernels_generic $kernels_rpi $; do
test -d "${KERNOBJDIR}/${k}" && \
dtbs="$(${MAKE} -C ${KERNOBJDIR}/${k} -v DTB)" || \
dtbs=
diff -r 4ff4c5605c59 -r 6020b8fb2a9b etc/etc.evbarm/Makefile.inc
--- a/etc/etc.evbarm/Makefile.inc Sun Jan 20 00:44:17 2019 +0000
+++ b/etc/etc.evbarm/Makefile.inc Sun Jan 20 10:18:03 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.99 2018/11/05 21:34:33 skrll Exp $
+# $NetBSD: Makefile.inc,v 1.100 2019/01/20 10:18:04 skrll Exp $
#
# etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
#
@@ -106,8 +106,6 @@
#EVBARM_BOARDS.armv7+= N900
EVBARM_BOARDS.armv7+= NETWALKER
EVBARM_BOARDS.armv7hf+= NETWALKER
-KERNEL_SETS.armv7+= ODROID-C1
-KERNEL_SETS.armv7hf+= ODROID-C1
EVBARM_BOARDS.armv7+= OMAP5EVM
EVBARM_BOARDS.armv7hf+= OMAP5EVM
EVBARM_BOARDS.armv7+= OVERO
diff -r 4ff4c5605c59 -r 6020b8fb2a9b sys/arch/arm/amlogic/amlogic_board.c
--- a/sys/arch/arm/amlogic/amlogic_board.c Sun Jan 20 00:44:17 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,597 +0,0 @@
-/* $NetBSD: amlogic_board.c,v 1.17 2018/09/21 12:04:06 skrll Exp $ */
-
-/*-
- * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amlogic_board.c,v 1.17 2018/09/21 12:04:06 skrll Exp $");
-
-#define _ARM32_BUS_DMA_PRIVATE
-#include <sys/param.h>
-#include <sys/bus.h>
-#include <sys/cpu.h>
-#include <sys/device.h>
-#include <sys/wdog.h>
-
-#include <dev/sysmon/sysmonvar.h>
-
-#include <uvm/uvm_extern.h>
-
-#include <arm/bootconfig.h>
-#include <arm/cpufunc.h>
-
-#include <arm/amlogic/amlogic_reg.h>
-#include <arm/amlogic/amlogic_crureg.h>
-#include <arm/amlogic/amlogic_var.h>
-
-#define AMLOGIC_EE_WDOG_PERIOD_DEFAULT 8
-#define AMLOGIC_EE_WDOG_PERIOD_MAX 8
-#define AMLOGIC_EE_WDOG_TICKS_PER_SEC 7812
-
-bus_space_handle_t amlogic_core_bsh;
-
-static int amlogic_ee_wdog_setmode(struct sysmon_wdog *);
-static int amlogic_ee_wdog_tickle(struct sysmon_wdog *);
-
-static struct sysmon_wdog amlogic_ee_wdog = {
- .smw_name = "EE-watchdog",
- .smw_setmode = amlogic_ee_wdog_setmode,
- .smw_tickle = amlogic_ee_wdog_tickle,
- .smw_period = AMLOGIC_EE_WDOG_PERIOD_DEFAULT
-};
-
-struct arm32_bus_dma_tag amlogic_dma_tag = {
- _BUS_DMAMAP_FUNCS,
- _BUS_DMAMEM_FUNCS,
- _BUS_DMATAG_FUNCS,
-};
-
-#define CBUS_READ(x) \
- bus_space_read_4(&armv7_generic_bs_tag, amlogic_core_bsh, \
- AMLOGIC_CBUS_OFFSET + (x))
-#define CBUS_WRITE(x, v) \
- bus_space_write_4(&armv7_generic_bs_tag, amlogic_core_bsh, \
- AMLOGIC_CBUS_OFFSET + (x), (v))
-
-#define CBUS_SET_CLEAR(x, s, c) \
- amlogic_reg_set_clear(&armv7_generic_bs_tag, amlogic_core_bsh, \
- AMLOGIC_CBUS_OFFSET + (x), (s), (c))
-
-void
-amlogic_bootstrap(void)
-{
- int error;
-
- error = bus_space_map(&armv7_generic_bs_tag, AMLOGIC_CORE_BASE,
- AMLOGIC_CORE_SIZE, 0, &amlogic_core_bsh);
- if (error)
- panic("%s: failed to map CORE registers: %d", __func__, error);
-
- curcpu()->ci_data.cpu_cc_freq = amlogic_get_rate_a9();
-}
-
-uint32_t
-amlogic_get_rate_xtal(void)
-{
- uint32_t ctlreg0;
-
- ctlreg0 = CBUS_READ(PREG_CTLREG0_ADDR_REG);
-
- return __SHIFTOUT(ctlreg0, PREG_CTLREG0_ADDR_CLKRATE) * 1000000;
-}
-
-uint32_t
-amlogic_get_rate_sys(void)
-{
- uint32_t cntl;
- uint64_t clk;
- u_int mul, div, od;
-
- clk = amlogic_get_rate_xtal();
- cntl = CBUS_READ(HHI_SYS_PLL_CNTL_REG);
- mul = __SHIFTOUT(cntl, HHI_SYS_PLL_CNTL_MUL);
- div = __SHIFTOUT(cntl, HHI_SYS_PLL_CNTL_DIV);
- od = __SHIFTOUT(cntl, HHI_SYS_PLL_CNTL_OD);
-
- clk *= mul;
- clk /= div;
- clk >>= od;
-
- return (uint32_t)clk;
-}
-
-uint32_t
-amlogic_get_rate_clk81(void)
-{
- uint32_t cc, rate;
-
- rate = amlogic_get_rate_fixed();
- cc = CBUS_READ(HHI_MPEG_CLK_CNTL_REG);
-
- switch (__SHIFTOUT(cc, HHI_MPEG_CLK_CNTL_DIV_SRC)) {
- case 7:
- rate /= 5;
- break;
- case 6:
- rate /= 3;
- break;
- case 5:
- rate /= 4;
- break;
- default:
- panic("CLK81: unknown rate, HHI_MPEG_CLK_CNTL_REG = %#x", cc);
- }
-
- return rate / (__SHIFTOUT(cc, HHI_MPEG_CLK_CNTL_DIV_N) + 1);
-}
-
-uint32_t
-amlogic_get_rate_fixed(void)
-{
- uint32_t cntl;
- uint64_t clk;
- u_int mul, div, od;
-
- clk = amlogic_get_rate_xtal();
- cntl = CBUS_READ(HHI_MPLL_CNTL_REG);
- mul = __SHIFTOUT(cntl, HHI_MPLL_CNTL_MUL);
- div = __SHIFTOUT(cntl, HHI_MPLL_CNTL_DIV);
- od = __SHIFTOUT(cntl, HHI_MPLL_CNTL_OD);
-
- clk *= mul;
- clk /= div;
- clk >>= od;
-
- return (uint32_t)clk;
-}
-
-uint32_t
-amlogic_get_rate_a9(void)
-{
- uint32_t cntl0, cntl1;
- uint32_t rate = 0;
-
- cntl0 = CBUS_READ(HHI_SYS_CPU_CLK_CNTL0_REG);
- if (cntl0 & HHI_SYS_CPU_CLK_CNTL0_CLKSEL) {
- switch (__SHIFTOUT(cntl0, HHI_SYS_CPU_CLK_CNTL0_PLLSEL)) {
- case 0:
- rate = amlogic_get_rate_xtal();
- break;
- case 1:
- rate = amlogic_get_rate_sys();
- break;
- case 2:
- rate = 1250000000;
- break;
- }
- } else {
- rate = amlogic_get_rate_xtal();
- }
-
- KASSERTMSG(rate != 0, "couldn't determine A9 rate");
-
- switch (__SHIFTOUT(cntl0, HHI_SYS_CPU_CLK_CNTL0_SOUTSEL)) {
- case 0:
- break;
- case 1:
- rate /= 2;
- break;
- case 2:
- rate /= 3;
- break;
- case 3:
- cntl1 = CBUS_READ(HHI_SYS_CPU_CLK_CNTL1_REG);
- rate /= (__SHIFTOUT(cntl1, HHI_SYS_CPU_CLK_CNTL1_SDIV) + 1);
- break;
- }
-
- return rate;
-}
-
-uint32_t
-amlogic_get_rate_a9periph(void)
-{
- const uint32_t cntl1 = CBUS_READ(HHI_SYS_CPU_CLK_CNTL1_REG);
- const u_int div = __SHIFTOUT(cntl1,
- HHI_SYS_CPU_CLK_CNTL1_PERIPH_CLK_MUX) + 2;
-
- return amlogic_get_rate_a9() / div;
-}
-
-void
-amlogic_eth_init(void)
-{
- CBUS_WRITE(EE_CLK_GATING1_REG,
- CBUS_READ(EE_CLK_GATING1_REG) | EE_CLK_GATING1_ETHERNET);
-}
-
-void
-amlogic_rng_init(void)
-{
- CBUS_SET_CLEAR(EE_CLK_GATING0_REG, EE_CLK_GATING0_RNG, 0);
Home |
Main Index |
Thread Index |
Old Index