From 77805357f78fb49ebb9bbb1bccbade33affd176f Mon Sep 17 00:00:00 2001 From: skrll Date: Tue, 15 Oct 2013 09:07:48 +0000 Subject: [PATCH] Switch to dwctwo(4) from dotg(4) for the RaspberryPi port. This brings DMA support and (initial) isoc transfer support. Remove URTWN_DOTG_WORKAROUND as dwctwo doesn't appear to need it. --- sys/arch/arm/broadcom/bcm2835_obio.c | 6 +++--- sys/arch/arm/broadcom/files.bcm2835 | 6 +----- sys/arch/evbarm/conf/RPI | 6 +++--- sys/arch/evbarm/conf/std.rpi | 3 +-- sys/arch/evbarm/rpi/rpi_machdep.c | 8 ++++---- 5 files changed, 12 insertions(+), 17 deletions(-) diff --git a/sys/arch/arm/broadcom/bcm2835_obio.c b/sys/arch/arm/broadcom/bcm2835_obio.c index 942debc4cce5..0179b9e2e994 100644 --- a/sys/arch/arm/broadcom/bcm2835_obio.c +++ b/sys/arch/arm/broadcom/bcm2835_obio.c @@ -1,4 +1,4 @@ -/* $NetBSD: bcm2835_obio.c,v 1.18 2013/03/24 19:52:11 jmcneill Exp $ */ +/* $NetBSD: bcm2835_obio.c,v 1.19 2013/10/15 09:07:48 skrll Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bcm2835_obio.c,v 1.18 2013/03/24 19:52:11 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bcm2835_obio.c,v 1.19 2013/10/15 09:07:48 skrll Exp $"); #include "locators.h" #include "obio.h" @@ -134,7 +134,7 @@ static const struct ambadev_locators bcm2835_ambadev_locs[] = { }, { /* DesignWare_OTG USB controller */ - .ad_name = "dotg", + .ad_name = "dwctwo", .ad_addr = BCM2835_USB_BASE, .ad_size = BCM2835_USB_SIZE, .ad_intr = BCM2835_INT_USB, diff --git a/sys/arch/arm/broadcom/files.bcm2835 b/sys/arch/arm/broadcom/files.bcm2835 index c03a906207c3..1f378cc9e419 100644 --- a/sys/arch/arm/broadcom/files.bcm2835 +++ b/sys/arch/arm/broadcom/files.bcm2835 @@ -1,4 +1,4 @@ -# $NetBSD: files.bcm2835,v 1.18 2013/10/15 07:23:20 skrll Exp $ +# $NetBSD: files.bcm2835,v 1.19 2013/10/15 09:07:48 skrll Exp $ # # Configuration info for Broadcom BCM2835 ARM Peripherals # @@ -54,10 +54,6 @@ file arch/arm/broadcom/bcm2835_plcom.c bcmplcom attach sdhc at obio with bcmemmc file arch/arm/broadcom/bcm2835_emmc.c bcmemmc -# USB (BCM2835_USB_BASE) -attach dotg at obio with dotg_amba -file arch/arm/broadcom/bcm2835_dotg.c dotg needs-flag - # USB (BCM2835_USB_BASE) attach dwctwo at obio with bcmdwctwo file arch/arm/broadcom/bcm2835_dwctwo.c bcmdwctwo needs-flag diff --git a/sys/arch/evbarm/conf/RPI b/sys/arch/evbarm/conf/RPI index 647725e7aa5c..b6ed4b38518b 100644 --- a/sys/arch/evbarm/conf/RPI +++ b/sys/arch/evbarm/conf/RPI @@ -1,5 +1,5 @@ # -# $NetBSD: RPI,v 1.40 2013/08/12 23:41:54 matt Exp $ +# $NetBSD: RPI,v 1.41 2013/10/15 09:07:48 skrll Exp $ # # RPi -- Raspberry Pi # @@ -209,8 +209,8 @@ sdmmc* at sdhc? ld* at sdmmc? # On-board USB -dotg* at obio? -usb* at dotg? +dwctwo* at obio? +usb* at dwctwo? # USB device drivers include "dev/usb/usbdevices.config" diff --git a/sys/arch/evbarm/conf/std.rpi b/sys/arch/evbarm/conf/std.rpi index ede81fa717cf..fb8e4c725379 100644 --- a/sys/arch/evbarm/conf/std.rpi +++ b/sys/arch/evbarm/conf/std.rpi @@ -1,4 +1,4 @@ -# $NetBSD: std.rpi,v 1.10 2013/09/17 07:13:13 skrll Exp $ +# $NetBSD: std.rpi,v 1.11 2013/10/15 09:07:48 skrll Exp $ # # standard NetBSD/evbarm for Raspberry Pi options @@ -15,7 +15,6 @@ options __HAVE_CPU_UAREA_ALLOC_IDLELWP options TPIDRPRW_IS_CURCPU options ARM_HAS_VBAR options KERNEL_BASE_EXT=0xc0000000 -options URTWN_DOTG_WORKAROUND options EVBARM_BOARDTYPE="rpi" makeoptions BOARDMKFRAG="${THISARM}/conf/mk.rpi" diff --git a/sys/arch/evbarm/rpi/rpi_machdep.c b/sys/arch/evbarm/rpi/rpi_machdep.c index 704a19b02d70..88c766829d4e 100644 --- a/sys/arch/evbarm/rpi/rpi_machdep.c +++ b/sys/arch/evbarm/rpi/rpi_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: rpi_machdep.c,v 1.37 2013/05/11 14:19:44 skrll Exp $ */ +/* $NetBSD: rpi_machdep.c,v 1.38 2013/10/15 09:07:48 skrll Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,14 +30,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.37 2013/05/11 14:19:44 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.38 2013/10/15 09:07:48 skrll Exp $"); #include "opt_evbarm_boardtype.h" #include "opt_ddb.h" #include "opt_kgdb.h" #include "sdhc.h" -#include "dotg.h" +#include "bcmdwctwo.h" #include "bcmspi.h" #include "bsciic.h" #include "plcom.h" @@ -385,7 +385,7 @@ rpi_bootparams(void) #if (NPLCOM > 0) (1 << VCPM_POWER_UART0) | #endif -#if (NDOTG > 0) +#if (NBCMDWCTWO > 0) (1 << VCPM_POWER_USB) | #endif #if (NBSCIIC > 0)