Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Move Rockchip port to the attic. It is not very use...



details:   https://anonhg.NetBSD.org/src/rev/bf674aa00040
branches:  trunk
changeset: 829655:bf674aa00040
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Thu Feb 08 00:10:26 2018 +0000

description:
Move Rockchip port to the attic. It is not very useful.

diffstat:

 sys/arch/arm/rockchip/files.rockchip        |   67 --
 sys/arch/arm/rockchip/obio.c                |  451 -------------
 sys/arch/arm/rockchip/obio_com.c            |  152 ----
 sys/arch/arm/rockchip/rockchip_board.c      |  463 -------------
 sys/arch/arm/rockchip/rockchip_cpufreq.c    |  468 -------------
 sys/arch/arm/rockchip/rockchip_crureg.h     |  129 ---
 sys/arch/arm/rockchip/rockchip_dma.c        |   63 -
 sys/arch/arm/rockchip/rockchip_dwcmmc.c     |   92 --
 sys/arch/arm/rockchip/rockchip_dwctmr.c     |   75 --
 sys/arch/arm/rockchip/rockchip_dwctwo.c     |  166 ----
 sys/arch/arm/rockchip/rockchip_emac.c       |  938 ----------------------------
 sys/arch/arm/rockchip/rockchip_emacreg.h    |  139 ----
 sys/arch/arm/rockchip/rockchip_i2c.c        |  440 -------------
 sys/arch/arm/rockchip/rockchip_i2creg.h     |   82 --
 sys/arch/arm/rockchip/rockchip_intr.h       |   41 -
 sys/arch/arm/rockchip/rockchip_reg.h        |  103 ---
 sys/arch/arm/rockchip/rockchip_timer.c      |  111 ---
 sys/arch/arm/rockchip/rockchip_timerreg.h   |   78 --
 sys/arch/arm/rockchip/rockchip_var.h        |   86 --
 sys/arch/evbarm/conf/ROCKCHIP               |   85 --
 sys/arch/evbarm/conf/files.rockchip         |   10 -
 sys/arch/evbarm/conf/mk.rockchip            |   33 -
 sys/arch/evbarm/conf/std.rockchip           |   28 -
 sys/arch/evbarm/rockchip/genassym.cf        |   38 -
 sys/arch/evbarm/rockchip/platform.h         |   41 -
 sys/arch/evbarm/rockchip/rockchip_machdep.c |  806 ------------------------
 sys/arch/evbarm/rockchip/rockchip_start.S   |  328 ---------
 27 files changed, 0 insertions(+), 5513 deletions(-)

diffs (truncated from 5621 to 300 lines):

diff -r fe9ba18dabb5 -r bf674aa00040 sys/arch/arm/rockchip/files.rockchip
--- a/sys/arch/arm/rockchip/files.rockchip      Wed Feb 07 22:51:31 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-#      $NetBSD: files.rockchip,v 1.11 2015/03/29 22:56:23 jmcneill Exp $
-#
-# Configuration info for Rockchip ARM Peripherals
-#
-
-include "arch/arm/pic/files.pic"
-include "arch/arm/cortex/files.cortex"
-
-file   arch/arm/arm32/arm32_boot.c
-file   arch/arm/arm32/arm32_kvminit.c
-file   arch/arm/arm32/arm32_reboot.c
-file   arch/arm/arm32/irq_dispatch.S
-file   arch/arm/arm32/armv7_generic_space.c
-file   arch/arm/arm/bus_space_a4x.S
-
-file   arch/arm/rockchip/rockchip_board.c
-file   arch/arm/rockchip/rockchip_cpufreq.c
-file   arch/arm/rockchip/rockchip_dma.c
-
-# On-board I/O
-device obio {[addr = -1], [size = -1], [width = -1], [intr = -1], [mult = 1], [port = -1], [crit = 0]}: bus_space_generic
-attach obio at mainbus
-file arch/arm/rockchip/obio.c          obio
-
-# serial
-attach com at obio with obiouart
-file   arch/arm/rockchip/obio_com.c    obiouart
-
-# I2C controller
-device rkiic: i2cbus, i2cexec
-attach rkiic at obio
-file   arch/arm/rockchip/rockchip_i2c.c        rkiic
-
-# RK3066 Timer (Synopsys DesignWare)
-attach dwctmr at obio with rkdwctmr
-file   arch/arm/rockchip/rockchip_dwctmr.c     rkdwctmr
-
-# RK3188 Timer
-device rktimer
-attach rktimer at obio
-file   arch/arm/rockchip/rockchip_timer.c      rktimer
-
-# SD/MMC (Synopsys DesignWare)
-attach dwcmmc at obio with rkdwcmmc
-file   arch/arm/rockchip/rockchip_dwcmmc.c     rkdwcmmc
-
-# USB OTG (Synopsys DesignWare OTG)
-attach  dwctwo at obio with rkdwctwo
-file    arch/arm/rockchip/rockchip_dwctwo.c    rkdwctwo        needs-flag
-
-# VMAC Ethernet Controller
-device rkemac: arp, ether, ifnet, mii
-attach rkemac at obio
-file   arch/arm/rockchip/rockchip_emac.c       rkemac
-
-# Console parameters
-defparam opt_rockchip.h                        CONADDR
-defparam opt_rockchip.h                        CONSPEED
-defparam opt_rockchip.h                        CONMODE
-
-# Memory parameters
-defparam opt_rockchip.h                        MEMSIZE
-
-# Debugging parameters
-defflag opt_rockchip.h                 ROCKCHIP_CLOCK_DEBUG
-defflag opt_rkiic.h                    RKIIC_DEBUG
-defflag opt_rkemac.h                   RKEMAC_DEBUG
diff -r fe9ba18dabb5 -r bf674aa00040 sys/arch/arm/rockchip/obio.c
--- a/sys/arch/arm/rockchip/obio.c      Wed Feb 07 22:51:31 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,451 +0,0 @@
-/*     $NetBSD: obio.c,v 1.19 2015/04/02 15:48:38 jmcneill Exp $       */
-
-/*
- * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
- * All rights reserved.
- *
- * Written by Jason R. Thorpe for Wasabi Systems, Inc.
- *
- * 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed for the NetBSD Project by
- *     Wasabi Systems, Inc.
- * 4. The name of Wasabi Systems, Inc. may not be used to endorse
- *    or promote products derived from this software without specific prior
- *    written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC
- * 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 "opt_rockchip.h"
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.19 2015/04/02 15:48:38 jmcneill Exp $");
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/device.h>
-
-#include <machine/cpu.h>
-#include <sys/bus.h>
-
-#include <arm/mainbus/mainbus.h>
-#include <arm/rockchip/rockchip_reg.h>
-#include <arm/rockchip/rockchip_var.h>
-
-
-#include "locators.h"
-
-int    obio_match(device_t, cfdata_t, void *);
-void   obio_attach(device_t, device_t, void *);
-
-CFATTACH_DECL_NEW(obio, 0,
-    obio_match, obio_attach, NULL, NULL);
-
-int    obio_print(void *, const char *);
-int    obio_search(device_t, cfdata_t, const int *, void *);
-
-static void    obio_init_rk3066(void);
-static void    obio_init_rk3188(void);
-static void    obio_grf_set(uint32_t, uint32_t);
-static int     obio_gpio_set_out(u_int, u_int, u_int);
-
-#ifdef ROCKCHIP_CLOCK_DEBUG
-static void    obio_dump_clocks(void);
-#endif
-
-/* there can be only one */
-bool   obio_found;
-
-int
-obio_match(device_t parent, cfdata_t cf, void *aux)
-{
-
-       if (obio_found)
-               return 0;
-       return 1;
-}
-
-void
-obio_attach(device_t parent, device_t self, void *aux)
-{
-       obio_found = true;
-
-       aprint_naive("\n");
-       aprint_normal(": %s\n", rockchip_chip_name());
-
-#ifdef ROCKCHIP_CLOCK_DEBUG
-       obio_dump_clocks();
-#endif
-
-       switch (rockchip_chip_id()) {
-       case ROCKCHIP_CHIP_ID_RK3066:
-               obio_init_rk3066();
-               break;
-       case ROCKCHIP_CHIP_ID_RK3188:
-       case ROCKCHIP_CHIP_ID_RK3188PLUS:
-               obio_init_rk3188();
-               break;
-       default:
-               break;
-       }
-
-       /*
-        * Attach all on-board devices as described in the kernel
-        * configuration file. Attach devices marked "crit 1" first.
-        */
-       for (int crit = 1; crit >= 0; crit--) {
-               config_search_ia(obio_search, self, "obio", &crit);
-       }
-}
-
-int
-obio_print(void *aux, const char *pnp)
-{
-       struct obio_attach_args *obio = aux;
-       bus_addr_t addr = obio->obio_base + obio->obio_offset;
-
-       aprint_normal(": addr 0x%08lx", addr);
-       aprint_normal("-0x%08lx", addr + (obio->obio_size - 1));
-       if (obio->obio_width != OBIOCF_WIDTH_DEFAULT)
-               aprint_normal(" width %d", obio->obio_width);
-       if (obio->obio_intr != OBIOCF_INTR_DEFAULT)
-               aprint_normal(" intr %d", obio->obio_intr);
-       if (obio->obio_mult != OBIOCF_MULT_DEFAULT)
-               aprint_normal(" mult %d", obio->obio_mult);
-       if (obio->obio_port != OBIOCF_PORT_DEFAULT)
-               aprint_normal(" port %d", obio->obio_port);
-
-       return UNCONF;
-}
-
-int
-obio_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
-{
-       struct obio_attach_args obio;
-       bus_addr_t addr = cf->cf_loc[OBIOCF_ADDR];
-       int crit = *(int *)aux;
-
-       if (cf->cf_loc[OBIOCF_CRIT] != crit)
-               return 0;
-
-       if (addr >= ROCKCHIP_CORE0_BASE &&
-           addr < ROCKCHIP_CORE0_BASE + ROCKCHIP_CORE0_SIZE) {
-               obio.obio_base = ROCKCHIP_CORE0_BASE;
-               obio.obio_bsh = rockchip_core0_bsh;
-       } else if (addr >= ROCKCHIP_CORE1_BASE &&
-           addr < ROCKCHIP_CORE1_BASE + ROCKCHIP_CORE1_SIZE) {
-               obio.obio_base = ROCKCHIP_CORE1_BASE;
-               obio.obio_bsh = rockchip_core1_bsh;
-       } else {
-               panic("addr %#llx is not in CORE0 or CORE1 space",
-                   (long long unsigned int)addr);
-       }
-       obio.obio_offset = addr - obio.obio_base;
-       obio.obio_size = cf->cf_loc[OBIOCF_SIZE];
-       obio.obio_width = cf->cf_loc[OBIOCF_WIDTH];
-       obio.obio_intr = cf->cf_loc[OBIOCF_INTR];
-       obio.obio_mult = cf->cf_loc[OBIOCF_MULT];
-       obio.obio_port = cf->cf_loc[OBIOCF_PORT];
-       obio.obio_dmat = &rockchip_bus_dma_tag;
-
-       bus_space_subregion(&armv7_generic_bs_tag, rockchip_core1_bsh,
-           ROCKCHIP_GRF_OFFSET, ROCKCHIP_GRF_SIZE, &obio.obio_grf_bsh);
-
-       switch (cf->cf_loc[OBIOCF_MULT]) {
-       case 1:
-               obio.obio_bst = &armv7_generic_bs_tag;
-               break;
-       case 4:
-               obio.obio_bst = &armv7_generic_a4x_bs_tag;
-               break;
-       default:
-               panic("Unsupported EMIFS multiplier.");
-               break;
-       }
-       if (config_match(parent, cf, &obio) > 0) {
-               config_attach(parent, cf, &obio, obio_print);
-       }
-       return 0;
-}
-
-#define GRF_GPIO0A_IOMUX_OFFSET        0x00a8
-#define GRF_GPIO0B_IOMUX_OFFSET        0x00ac
-#define GRF_GPIO0C_IOMUX_OFFSET        0x00b0
-#define GRF_GPIO0D_IOMUX_OFFSET        0x00b4
-
-#define GRF_GPIO1A_IOMUX_OFFSET        0x00b8
-#define GRF_GPIO1B_IOMUX_OFFSET        0x00bc
-#define GRF_GPIO1C_IOMUX_OFFSET        0x00c0
-#define GRF_GPIO1D_IOMUX_OFFSET        0x00c4
-
-#define GRF_GPIO2A_IOMUX_OFFSET        0x00c8
-#define GRF_GPIO2B_IOMUX_OFFSET        0x00cc
-#define GRF_GPIO2C_IOMUX_OFFSET        0x00d0
-#define GRF_GPIO2D_IOMUX_OFFSET        0x00d4
-
-#define GRF_GPIO3A_IOMUX_OFFSET        0x00d8
-#define GRF_GPIO3B_IOMUX_OFFSET        0x00dc
-#define GRF_GPIO3C_IOMUX_OFFSET        0x00e0
-#define GRF_GPIO3D_IOMUX_OFFSET        0x00e4
-
-#define GRF_GPIO4A_IOMUX_OFFSET        0x00e8
-#define GRF_GPIO4B_IOMUX_OFFSET        0x00ec
-#define GRF_GPIO4C_IOMUX_OFFSET        0x00f0
-#define GRF_GPIO4D_IOMUX_OFFSET        0x00f4
-
-#define GRF_GPIO6B_IOMUX_OFFSET        0x010c
-
-#define GRF_SOC_CON0_OFFSET    0x0150
-#define GRF_SOC_CON1_OFFSET    0x0154
-#define GRF_SOC_CON2_OFFSET    0x0158
-
-static void
-obio_init_rk3066(void)
-{
-       /* dwctwo[01] */
-       obio_grf_set(GRF_GPIO0A_IOMUX_OFFSET, 0x14001400);



Home | Main Index | Thread Index | Old Index