Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Finish rename of all Cavium Octeon device driver fu...



details:   https://anonhg.NetBSD.org/src/rev/e4d2219b9dd7
branches:  trunk
changeset: 1010656:e4d2219b9dd7
user:      simonb <simonb%NetBSD.org@localhost>
date:      Sun May 31 14:05:21 2020 +0000

description:
Finish rename of all Cavium Octeon device driver functions, structs etc from
"octeon_foo" to "octfoo" (missed octeon_uart + entries in iobus config).

diffstat:

 sys/arch/evbmips/cavium/machdep.c      |   8 ++--
 sys/arch/mips/cavium/dev/octeon_uart.c |  52 +++++++++++++++++-----------------
 sys/arch/mips/cavium/octeon1p_iobus.c  |  52 +++++++++++++++++-----------------
 3 files changed, 56 insertions(+), 56 deletions(-)

diffs (truncated from 333 to 300 lines):

diff -r e03df755a7b3 -r e4d2219b9dd7 sys/arch/evbmips/cavium/machdep.c
--- a/sys/arch/evbmips/cavium/machdep.c Sun May 31 13:45:47 2020 +0000
+++ b/sys/arch/evbmips/cavium/machdep.c Sun May 31 14:05:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.10 2016/12/28 03:27:08 mrg Exp $ */
+/*     $NetBSD: machdep.c,v 1.11 2020/05/31 14:05:21 simonb Exp $      */
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -115,7 +115,7 @@
 #include "opt_cavium.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.10 2016/12/28 03:27:08 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.11 2020/05/31 14:05:21 simonb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -314,7 +314,7 @@
 #if NCOM > 0
        struct octeon_config *mcp = &octeon_configuration;
        int status;
-       extern int octeon_uart_com_cnattach(bus_space_tag_t, int, int);
+       extern int octuart_com_cnattach(bus_space_tag_t, int, int);
 
        /*
         * Delay to allow firmware putchars to complete.
@@ -323,7 +323,7 @@
         */
        delay(640000000 / comcnrate);
 
-       status = octeon_uart_com_cnattach(
+       status = octuart_com_cnattach(
                &mcp->mc_iobus_bust,
                0,      /* XXX port 0 */
                comcnrate);
diff -r e03df755a7b3 -r e4d2219b9dd7 sys/arch/mips/cavium/dev/octeon_uart.c
--- a/sys/arch/mips/cavium/dev/octeon_uart.c    Sun May 31 13:45:47 2020 +0000
+++ b/sys/arch/mips/cavium/dev/octeon_uart.c    Sun May 31 14:05:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: octeon_uart.c,v 1.4 2020/05/31 04:56:35 simonb Exp $   */
+/*     $NetBSD: octeon_uart.c,v 1.5 2020/05/31 14:05:21 simonb Exp $   */
 
 /*
  * Copyright (c) 2007 Internet Initiative Japan, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: octeon_uart.c,v 1.4 2020/05/31 04:56:35 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: octeon_uart.c,v 1.5 2020/05/31 14:05:21 simonb Exp $");
 
 #include "opt_octeon.h"
 
@@ -48,30 +48,30 @@
 #include <mips/cavium/dev/octeon_uartreg.h>
 #include <mips/cavium/dev/octeon_ciureg.h>
 
-struct octeon_uart_iobus_softc {
+struct octuart_iobus_softc {
        struct com_softc sc_com;
        int sc_irq;
        void *sc_ih;
 };
 
-static int     octeon_uart_iobus_match(device_t, struct cfdata *, void *);
-static void    octeon_uart_iobus_attach(device_t, device_t, void *);
-static int     octeon_uart_com_enable(struct com_softc *);
-static void    octeon_uart_com_disable(struct com_softc *);
+static int     octuart_iobus_match(device_t, struct cfdata *, void *);
+static void    octuart_iobus_attach(device_t, device_t, void *);
+static int     octuart_com_enable(struct com_softc *);
+static void    octuart_com_disable(struct com_softc *);
 
 
 #define CN30XXUART_BUSYDETECT  0x7
 
 
 /* XXX */
-int            octeon_uart_com_cnattach(bus_space_tag_t, int, int);
+int            octuart_com_cnattach(bus_space_tag_t, int, int);
 
 /* XXX */
-const bus_addr_t octeon_uart_com_bases[] = {
+const bus_addr_t octuart_com_bases[] = {
        MIO_UART0_BASE,
        MIO_UART1_BASE
 };
-const struct com_regs octeon_uart_com_regs = {
+const struct com_regs octuart_com_regs = {
        .cr_nports = COM_NPORTS,
        .cr_map = {
                [COM_REG_RXDATA] =      MIO_UART_RBR_OFFSET,
@@ -93,11 +93,11 @@
        }
 };
 
-CFATTACH_DECL_NEW(com_iobus, sizeof(struct octeon_uart_iobus_softc),
-    octeon_uart_iobus_match, octeon_uart_iobus_attach, NULL, NULL);
+CFATTACH_DECL_NEW(com_iobus, sizeof(struct octuart_iobus_softc),
+    octuart_iobus_match, octuart_iobus_attach, NULL, NULL);
 
 int
-octeon_uart_iobus_match(device_t parent, struct cfdata *cf, void *aux)
+octuart_iobus_match(device_t parent, struct cfdata *cf, void *aux)
 {
        struct iobus_attach_args *aa = aux;
        int result = 0;
@@ -113,15 +113,15 @@
 }
 
 void
-octeon_uart_iobus_attach(device_t parent, device_t self, void *aux)
+octuart_iobus_attach(device_t parent, device_t self, void *aux)
 {
-       struct octeon_uart_iobus_softc *sc = device_private(self);
+       struct octuart_iobus_softc *sc = device_private(self);
        struct com_softc *sc_com = &sc->sc_com;
        struct iobus_attach_args *aa = aux;
        int status;
 
        sc_com->sc_dev = self;
-       sc_com->sc_regs = octeon_uart_com_regs;
+       sc_com->sc_regs = octuart_com_regs;
        sc_com->sc_regs.cr_iot = aa->aa_bust;
        sc_com->sc_regs.cr_iobase = aa->aa_unit->addr;
 
@@ -140,10 +140,10 @@
 
        sc_com->sc_type = COM_TYPE_16550_NOERS;
        sc_com->sc_frequency = curcpu()->ci_cpu_freq;
-       sc_com->enable = octeon_uart_com_enable;
-       sc_com->disable = octeon_uart_com_disable;
+       sc_com->enable = octuart_com_enable;
+       sc_com->disable = octuart_com_disable;
 
-       octeon_uart_com_enable(sc_com);
+       octuart_com_enable(sc_com);
        sc_com->enabled = 1;
 
        com_attach_subr(sc_com);
@@ -160,16 +160,16 @@
 
 #if 0
 void
-octeon_uart_iobus_detach(device_t self, ...)
+octuart_iobus_detach(device_t self, ...)
 {
-       struct octeon_uart_iobus_softc *sc = (void *)self;
+       struct octuart_iobus_softc *sc = (void *)self;
 
        octeon_intr_disestablish(sc->ih);
 }
 #endif
 
 int
-octeon_uart_com_enable(struct com_softc *sc_com)
+octuart_com_enable(struct com_softc *sc_com)
 {
        struct com_regs *regsp = &sc_com->sc_regs;
 
@@ -181,7 +181,7 @@
 }
 
 void
-octeon_uart_com_disable(struct com_softc *sc_com)
+octuart_com_disable(struct com_softc *sc_com)
 {
        /*
         * XXX chip specific procedure
@@ -194,13 +194,13 @@
 #endif
 
 int
-octeon_uart_com_cnattach(bus_space_tag_t bust, int portno, int speed)
+octuart_com_cnattach(bus_space_tag_t bust, int portno, int speed)
 {
        struct com_regs regs;
 
-       (void)memcpy(&regs, &octeon_uart_com_regs, sizeof(regs));
+       (void)memcpy(&regs, &octuart_com_regs, sizeof(regs));
        regs.cr_iot = bust;
-       regs.cr_iobase = octeon_uart_com_bases[portno];
+       regs.cr_iobase = octuart_com_bases[portno];
 
        return comcnattach1(
                &regs,
diff -r e03df755a7b3 -r e4d2219b9dd7 sys/arch/mips/cavium/octeon1p_iobus.c
--- a/sys/arch/mips/cavium/octeon1p_iobus.c     Sun May 31 13:45:47 2020 +0000
+++ b/sys/arch/mips/cavium/octeon1p_iobus.c     Sun May 31 14:05:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: octeon1p_iobus.c,v 1.3 2020/05/31 04:56:35 simonb Exp $        */
+/*     $NetBSD: octeon1p_iobus.c,v 1.4 2020/05/31 14:05:21 simonb Exp $        */
 
 /*
  * Copyright (c) 2007 Internet Initiative Japan, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: octeon1p_iobus.c,v 1.3 2020/05/31 04:56:35 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: octeon1p_iobus.c,v 1.4 2020/05/31 14:05:21 simonb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -43,7 +43,7 @@
 /* ---- UART */
 
 #include <mips/cavium/dev/octeon_uartreg.h>
-static const struct iobus_unit iobus_units_octeon_uart[] = {
+static const struct iobus_unit iobus_units_octuart[] = {
        {
                .addr = MIO_UART0_BASE
        },
@@ -52,95 +52,95 @@
        }
 };
 
-static const struct iobus_dev iobus_dev_octeon_uart = {
+static const struct iobus_dev iobus_dev_octuart = {
        .name = "com",
        .nunits = 2,
-       .units = iobus_units_octeon_uart
+       .units = iobus_units_octuart
 };
 
 /* ---- RNM */
 
 #include <mips/cavium/dev/octeon_rnmreg.h>
-static const struct iobus_unit iobus_units_octeon_rnm[] = {
+static const struct iobus_unit iobus_units_octrnm[] = {
        {
                .addr = RNM_BASE
        }
 };
 
-static const struct iobus_dev iobus_dev_octeon_rnm = {
+static const struct iobus_dev iobus_dev_octrnm = {
        .name = "octrnm",
        .nunits = RNM_NUNITS,
-       .units = iobus_units_octeon_rnm
+       .units = iobus_units_octrnm
 };
 
 /* ---- TWSI */
 
 #include <mips/cavium/dev/octeon_twsireg.h>
-static const struct iobus_unit iobus_units_octeon_twsi[] = {
+static const struct iobus_unit iobus_units_octtwsi[] = {
        {
                .addr = MIO_TWS_BASE_0
        }
 };
 
-static const struct iobus_dev iobus_dev_octeon_twsi = {
+static const struct iobus_dev iobus_dev_octtwsi = {
        .name = "octtwsi",
        .nunits = MIO_TWS_NUNITS,
-       .units = iobus_units_octeon_twsi
+       .units = iobus_units_octtwsi
 };
 
 /* ---- MPI/SPI */
 
 #include <mips/cavium/dev/octeon_mpireg.h>
-static const struct iobus_unit iobus_units_octeon_mpi[] = {
+static const struct iobus_unit iobus_units_octmpi[] = {
        {
                .addr = MPI_BASE
        }
 };
 
-static const struct iobus_dev iobus_dev_octeon_mpi = {
+static const struct iobus_dev iobus_dev_octmpi = {
        .name = "octmpi",
        .nunits = MPI_NUNITS,
-       .units = iobus_units_octeon_mpi
+       .units = iobus_units_octmpi
 };
 /* ---- GMX */
 
 #include <mips/cavium/dev/octeon_gmxreg.h>
-static const struct iobus_unit iobus_units_octeon_gmx[] = {
+static const struct iobus_unit iobus_units_octgmx[] = {
        {
                .addr = GMX0_BASE_IF0
        }
 };
 
-static const struct iobus_dev iobus_dev_octeon_gmx = {
+static const struct iobus_dev iobus_dev_octgmx = {
        .name = "octgmx",
        .nunits = GMX_IF_NUNITS,
-       .units = iobus_units_octeon_gmx
+       .units = iobus_units_octgmx
 };
 
 
 /* ---- USBN */
 #include <mips/cavium/dev/octeon_usbnreg.h>



Home | Main Index | Thread Index | Old Index