Source-Changes-HG archive

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

[src/trunk]: src/sys Remove dotg(4) as it's been replaced by dwctwo(4).



details:   https://anonhg.NetBSD.org/src/rev/ad78c56fa073
branches:  trunk
changeset: 790505:ad78c56fa073
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Oct 15 15:13:17 2013 +0000

description:
Remove dotg(4) as it's been replaced by dwctwo(4).

diffstat:

 sys/conf/files            |     7 +-
 sys/dev/usb/dwc_otg.c     |  4431 ---------------------------------------------
 sys/dev/usb/dwc_otgreg.h  |   881 --------
 sys/dev/usb/dwc_otgvar.h  |   274 --
 sys/dev/usb/if_urtwnvar.h |     6 +-
 5 files changed, 2 insertions(+), 5597 deletions(-)

diffs (truncated from 5640 to 300 lines):

diff -r 53336ce5fc7a -r ad78c56fa073 sys/conf/files
--- a/sys/conf/files    Tue Oct 15 15:10:57 2013 +0000
+++ b/sys/conf/files    Tue Oct 15 15:13:17 2013 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files,v 1.1080 2013/09/21 13:22:48 skrll Exp $
+#      $NetBSD: files,v 1.1081 2013/10/15 15:13:17 skrll Exp $
 #      @(#)files.newconf       7.5 (Berkeley) 5/10/93
 
 version        20100430
@@ -1210,11 +1210,6 @@
 
 # DesignWare OTG host controller
 #
-device dotg: usbus, usbroothub, usb_dma
-file   dev/usb/dwc_otg.c               dotg                    needs-flag
-
-# DesignWare HS OTG host controller
-#
 include "external/bsd/dwc2/conf/files.dwc2"
 
 # USB HID processing (as used by bluetooth and usb code)
diff -r 53336ce5fc7a -r ad78c56fa073 sys/dev/usb/dwc_otg.c
--- a/sys/dev/usb/dwc_otg.c     Tue Oct 15 15:10:57 2013 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,4431 +0,0 @@
-/*     $NetBSD: dwc_otg.c,v 1.50 2013/08/01 10:47:51 jmcneill Exp $    */
-
-/*-
- * Copyright (c) 2012 Hans Petter Selasky. All rights reserved.
- * Copyright (c) 2010-2011 Aleksandr Rybalko. 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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.
- */
-
-/*-
- * Copyright (c) 2013 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Nick Hudson
- *
- * 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``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 FOUNDATION OR CONTRIBUTORS
- * 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.
- */
-
-/*
- * Designware USB 2.0 OTG
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc_otg.c,v 1.50 2013/08/01 10:47:51 jmcneill Exp $");
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kmem.h>
-#include <sys/kernel.h>
-#include <sys/device.h>
-#include <sys/select.h>
-#include <sys/proc.h>
-#include <sys/queue.h>
-#include <sys/cpu.h>
-
-#include <machine/endian.h>
-
-#include <dev/usb/usb.h>
-#include <dev/usb/usbdi.h>
-#include <dev/usb/usbdivar.h>
-#include <dev/usb/usb_mem.h>
-
-#include <dev/usb/dwc_otgreg.h>
-#include <dev/usb/dwc_otgvar.h>
-
-#include <dev/usb/usbroothub_subr.h>
-
-#ifdef DOTG_COUNTERS
-#define        DOTG_EVCNT_ADD(a,b)     ((void)((a).ev_count += (b)))
-#else
-#define        DOTG_EVCNT_ADD(a,b)     do { } while (/*CONSTCOND*/0)
-#endif
-#define        DOTG_EVCNT_INCR(a)      DOTG_EVCNT_ADD((a), 1)
-
-#ifdef DWC_OTG_DEBUG
-#define        DPRINTFN(n,fmt,...) do {                        \
-       if (dwc_otgdebug >= (n)) {                      \
-               printf("%s: " fmt,                      \
-               __FUNCTION__,## __VA_ARGS__);           \
-       }                                               \
-} while (0)
-#define        DPRINTF(...)    DPRINTFN(1, __VA_ARGS__)
-int dwc_otgdebug = 0;
-#else
-#define        DPRINTF(...) do { } while (0)
-#define        DPRINTFN(...) do { } while (0)
-#endif
-
-#define        DWC_OTG_MSK_GINT_ENABLED        \
-   (GINTMSK_ENUMDONEMSK |              \
-   GINTMSK_USBRSTMSK |                 \
-   GINTMSK_USBSUSPMSK |                        \
-   GINTMSK_IEPINTMSK |                 \
-   GINTMSK_RXFLVLMSK |                 \
-   GINTMSK_SESSREQINTMSK |             \
-   GINTMSK_OTGINTMSK |                 \
-   GINTMSK_HCHINTMSK |                 \
-   GINTMSK_PRTINTMSK)
-
-#define        DWC_OTG_BUS2SC(bus)     ((bus)->hci_private)
-
-#define        DWC_OTG_PIPE2SC(pipe)   DWC_OTG_BUS2SC((pipe)->device->bus)
-
-#define        DWC_OTG_XFER2SC(xfer)   DWC_OTG_PIPE2SC((xfer)->pipe)
-
-#define        DWC_OTG_TD2SC(td)       DWC_OTG_XFER2SC((td)->xfer)
-
-#define        DWC_OTG_DPIPE2SC(d) \
-    DWC_OTG_BUS2SC((d)->pipe.device->bus)
-
-#define        DWC_OTG_XFER2DXFER(x) (struct dwc_otg_xfer *)(x)
-
-#define        DWC_OTG_XFER2DPIPE(x) (struct dwc_otg_pipe *)(x)->pipe;
-
-#define        DWC_OTG_PIPE2DPIPE(p) (struct dwc_otg_pipe *)(p)
-
-#define usbd_copy_in(d, o, b, s) \
-    memcpy(((char *)(d) + (o)), (b), (s))
-
-#define usbd_copy_out(d, o, b, s) \
-    memcpy((b), ((char *)(d) + (o)), (s))
-
-struct dwc_otg_pipe;
-
-Static usbd_status     dwc_otg_open(usbd_pipe_handle);
-Static void            dwc_otg_poll(struct usbd_bus *);
-Static void            dwc_otg_softintr(void *);
-Static void            dwc_otg_waitintr(struct dwc_otg_softc *, usbd_xfer_handle);
-
-Static usbd_status     dwc_otg_allocm(struct usbd_bus *, usb_dma_t *, uint32_t);
-Static void            dwc_otg_freem(struct usbd_bus *, usb_dma_t *);
-
-Static usbd_xfer_handle        dwc_otg_allocx(struct usbd_bus *);
-Static void            dwc_otg_freex(struct usbd_bus *, usbd_xfer_handle);
-Static void            dwc_otg_get_lock(struct usbd_bus *, kmutex_t **);
-
-#if 0
-Static usbd_status     dwc_otg_setup_isoc(usbd_pipe_handle pipe);
-Static void            dwc_otg_device_isoc_enter(usbd_xfer_handle);
-#endif
-
-Static usbd_status     dwc_otg_root_ctrl_transfer(usbd_xfer_handle);
-Static usbd_status     dwc_otg_root_ctrl_start(usbd_xfer_handle);
-Static void            dwc_otg_root_ctrl_abort(usbd_xfer_handle);
-Static void            dwc_otg_root_ctrl_close(usbd_pipe_handle);
-Static void            dwc_otg_root_ctrl_done(usbd_xfer_handle);
-
-Static usbd_status     dwc_otg_root_intr_transfer(usbd_xfer_handle);
-Static usbd_status     dwc_otg_root_intr_start(usbd_xfer_handle);
-Static void            dwc_otg_root_intr_abort(usbd_xfer_handle);
-Static void            dwc_otg_root_intr_close(usbd_pipe_handle);
-Static void            dwc_otg_root_intr_done(usbd_xfer_handle);
-
-Static usbd_status     dwc_otg_device_ctrl_transfer(usbd_xfer_handle);
-Static usbd_status     dwc_otg_device_ctrl_start(usbd_xfer_handle);
-Static void            dwc_otg_device_ctrl_abort(usbd_xfer_handle);
-Static void            dwc_otg_device_ctrl_close(usbd_pipe_handle);
-Static void            dwc_otg_device_ctrl_done(usbd_xfer_handle);
-
-Static usbd_status     dwc_otg_device_bulk_transfer(usbd_xfer_handle);
-Static usbd_status     dwc_otg_device_bulk_start(usbd_xfer_handle);
-Static void            dwc_otg_device_bulk_abort(usbd_xfer_handle);
-Static void            dwc_otg_device_bulk_close(usbd_pipe_handle);
-Static void            dwc_otg_device_bulk_done(usbd_xfer_handle);
-
-Static usbd_status     dwc_otg_device_intr_transfer(usbd_xfer_handle);
-Static usbd_status     dwc_otg_device_intr_start(usbd_xfer_handle);
-Static void            dwc_otg_device_intr_abort(usbd_xfer_handle);
-Static void            dwc_otg_device_intr_close(usbd_pipe_handle);
-Static void            dwc_otg_device_intr_done(usbd_xfer_handle);
-
-Static usbd_status     dwc_otg_device_isoc_transfer(usbd_xfer_handle);
-Static usbd_status     dwc_otg_device_isoc_start(usbd_xfer_handle);
-Static void            dwc_otg_device_isoc_abort(usbd_xfer_handle);
-Static void            dwc_otg_device_isoc_close(usbd_pipe_handle);
-Static void            dwc_otg_device_isoc_done(usbd_xfer_handle);
-
-Static void            dwc_otg_close_pipe(usbd_pipe_handle);
-Static void            dwc_otg_abort_xfer(usbd_xfer_handle, usbd_status);
-
-Static void            dwc_otg_device_clear_toggle(usbd_pipe_handle pipe);
-Static void            dwc_otg_noop(usbd_pipe_handle pipe);
-
-#ifdef DWC_OTG_DEBUG
-Static void            dwc_otg_dump_global_regs(struct dwc_otg_softc *);
-Static void            dwc_otg_dump_host_regs(struct dwc_otg_softc *);
-#endif
-
-Static void            dwc_otg_setup_data_chain(usbd_xfer_handle);
-Static void            dwc_otg_setup_ctrl_chain(usbd_xfer_handle);
-Static void            dwc_otg_setup_intr_chain(usbd_xfer_handle);
-Static void            dwc_otg_setup_bulk_chain(usbd_xfer_handle);
-//Static void          dwc_otg_setup_isoc_chain(usbd_xfer_handle);
-
-Static void            dwc_otg_timeout(void *);
-Static void            dwc_otg_timeout_task(void *);
-
-Static void            dwc_otg_xfer_setup(usbd_xfer_handle);
-Static void            dwc_otg_xfer_start(usbd_xfer_handle);
-Static void            dwc_otg_xfer_end(usbd_xfer_handle);
-
-// static dwc_otg_cmd_t dwc_otg_setup_rx;
-// static dwc_otg_cmd_t dwc_otg_data_rx;
-// static dwc_otg_cmd_t dwc_otg_data_tx;
-// static dwc_otg_cmd_t dwc_otg_data_tx_sync;
-
-static dwc_otg_cmd_t   dwc_otg_host_setup_tx;
-static dwc_otg_cmd_t   dwc_otg_host_data_tx;
-static dwc_otg_cmd_t   dwc_otg_host_data_rx;
-
-Static int             dwc_otg_init_fifo(struct dwc_otg_softc *, uint8_t);
-Static void            dwc_otg_clocks_on(struct dwc_otg_softc*);
-Static void            dwc_otg_clocks_off(struct dwc_otg_softc*);
-Static void            dwc_otg_pull_up(struct dwc_otg_softc *);
-Static void            dwc_otg_pull_down(struct dwc_otg_softc *);
-Static void            dwc_otg_enable_sof_irq(struct dwc_otg_softc *);
-Static void            dwc_otg_resume_irq(struct dwc_otg_softc *);
-Static void            dwc_otg_suspend_irq(struct dwc_otg_softc *);
-Static void            dwc_otg_wakeup_peer(struct dwc_otg_softc *);
-Static int             dwc_otg_interrupt(struct dwc_otg_softc *);
-Static void            dwc_otg_timer(struct dwc_otg_softc *);
-Static void            dwc_otg_timer_tick(void *);
-Static void            dwc_otg_timer_start(struct dwc_otg_softc *);
-Static void            dwc_otg_timer_stop(struct dwc_otg_softc *);
-Static void            dwc_otg_interrupt_poll(struct dwc_otg_softc *);
-Static void            dwc_otg_do_poll(struct usbd_bus *);
-Static void            dwc_otg_worker(struct work *, void *);
-Static void            dwc_otg_rhc(void *);
-Static void            dwc_otg_vbus_interrupt(struct dwc_otg_softc *);
-Static void            dwc_otg_standard_done(usbd_xfer_handle);
-Static void            dwc_otg_setup_standard_chain(usbd_xfer_handle);
-Static void            dwc_otg_start_standard_chain(usbd_xfer_handle);
-Static void            dwc_otg_host_channel_free(struct dwc_otg_td *);
-
-Static void dwc_otg_core_reset(struct dwc_otg_softc *sc);
-
-static inline void
-dwc_otg_root_intr(struct dwc_otg_softc *sc)
-{
-
-       softint_schedule(sc->sc_rhc_si);
-}
-
-#define DWC_OTG_READ_4(sc, reg) \
-    bus_space_read_4((sc)->sc_iot, (sc)->sc_ioh, (reg))
-#define DWC_OTG_WRITE_4(sc, reg, data)  \
-    bus_space_write_4((sc)->sc_iot, (sc)->sc_ioh, (reg), (data));
-
-#define DWC_OTG_MODIFY_4(sc, reg, off, on) \
-  DWC_OTG_WRITE_4((sc),(reg),(DWC_OTG_READ_4((sc),(reg)) & ~(off)) | (on))
-
-
-struct dwc_otg_pipe {
-       struct usbd_pipe pipe;          /* Must be first */
-};
-



Home | Main Index | Thread Index | Old Index