From owner-freebsd-arm@FreeBSD.ORG Mon Jun 9 02:43:12 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAE02106566B; Mon, 9 Jun 2008 02:43:12 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe16.swipnet.se [212.247.155.225]) by mx1.freebsd.org (Postfix) with ESMTP id E80678FC13; Mon, 9 Jun 2008 02:43:11 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=faEYrYjoFTgA:10 a=u9M7xhqZxC0A:10 a=UlUzKLwsL7l1WSYqPADo3w==:17 a=1CKOg6U5CFv3fHrwbq4A:9 a=A0Lg2sBi2MApIks5X3MA:7 a=sugeplIOG6BGyF0_Z5BDhm5oQUMA:4 a=50e4U0PicR4A:10 Received: from [62.113.132.30] (account mc467741@c2i.net [62.113.132.30] verified) by mailfe16.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 227640817; Mon, 09 Jun 2008 03:43:08 +0200 From: Hans Petter Selasky To: freebsd-arm@freebsd.org Date: Mon, 9 Jun 2008 03:44:37 +0200 User-Agent: KMail/1.9.7 References: <200804222024.m3MKOXZN097466@casselton.net> <200804222301.28841.hselasky@c2i.net> In-Reply-To: <200804222301.28841.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200806090344.38252.hselasky@c2i.net> Cc: Mark Tinguely , jhb@freebsd.org Subject: Re: AT91RM9200 and possibly other ARM targets are broken in 8-current after recent commit (solution) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2008 02:43:12 -0000 Hi ! Thanks for all the support on this issue. Now I finally found out what the= =20 problem was: Index: src/sys/dev/usb/usb_transfer.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- src/sys/dev/usb/usb_transfer.c (revision 738) +++ src/sys/dev/usb/usb_transfer.c (working copy) @@ -1990,9 +1990,11 @@ xfer->flags_int.control_hdr) { /* special case */ if (xfer->flags_int.usb_mode =3D=3D USB_MODE_DEVICE) { + /* The device controller writes to memory */ + xfer->frbuffers[0].isread =3D 1; + } else { + /* The host controller reads from memory */ xfer->frbuffers[0].isread =3D 0; =2D } else { =2D xfer->frbuffers[0].isread =3D 1; } } else { /* default case */ I had switched around flush and invalidate for a small tiny little USB SETU= P=20 packet of 8-bytes. Grrr. Now it works! And I celebrate with the following=20 dmesg: Bytes transferred =3D 12010912 (b745a0 hex) ## Starting application at 0x200000E0 ... KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2008 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. =46reeBSD is a registered trademark of The FreeBSD Foundation. =46reeBSD 8.0-CURRENT #445: Mon Jun 9 03:33:05 CEST 2008 hans_other@server0.selasky.org:/usr/obj/arm/usr/7-current/src/sys/custom CPU: ARM920T rev 0 (ARM9TDMI core) DC enabled IC enabled WB enabled LABT 16KB/32B 64-way Instruction cache 16KB/32B 64-way write-back-locking-A Data cache real memory =3D 67108864 (64 MB) avail memory =3D 49553408 (47 MB) atmelarm0: on motherboard at91_st0: mem 0xdffffd00-0xdffffdff irq 1 on atmelarm0 at91_st0: watchdog registered, timeout intervall max. 64 sec at91_pio0: mem 0xdffff400-0xdffff5ff irq 1 on atmelarm0 at91_pio0: ABSR: 0x60 OSR: 0 PSR:0x3938001f ODSR: 0 at91_pio0: [FILTER] at91_pio1: mem 0xdffff600-0xdffff7ff irq 1 on atmelarm0 at91_pio1: ABSR: 0xff301 OSR: 0x2 PSR:0x3fc00cfe ODSR: 0 at91_pio1: [FILTER] at91_pio2: mem 0xdffff800-0xdffff9ff irq 1 on atmelarm0 at91_pio2: ABSR: 0 OSR: 0x1000000a PSR:0xffffc075 ODSR: 0x10000000 at91_pio2: [FILTER] at91_pio3: mem 0xdffffa00-0xdffffbff irq 1 on atmelarm0 at91_pio3: ABSR: 0 OSR: 0 PSR:0xfffffff ODSR: 0 at91_pio3: [FILTER] at91_pmc0: mem 0xdffffc00-0xdffffcff irq 1 on atmelarm0 at91_pmc0: Primary: 10000000 Hz PLLA: 180 MHz CPU: 180 MHz MCK: 60 MHz at91_udp0: mem 0xdffb0000-0xdffb3fff = irq=20 11,3 on atmelarm0 at91_udp0: [ITHREAD] at91_udp0: [ITHREAD] usb0 on at91_udp0 at91_mci0: mem 0xdffb4000-0xdffb7fff irq 10 on=20 atmelarm0 at91_mci0: [ITHREAD] mmc0: on at91_mci0 at91_twi0: mem 0xdffb8000-0xdffbbfff irq 12 on atmelarm0 at91_twi0: [ITHREAD] iicbus0: on at91_twi0 setting cwgr to 0x1a4a4 iicbus0: at addr 0 iic0: on iicbus0 icee0: at addr 0xa0 on iicbus0 ate0: mem 0xdffbc000-0xdffbffff irq 24 on atmelarm0 ate0: No MAC address set device_attach: ate0 attach returned 6 uart0: mem 0xdffff200-0xdffff3ff irq 1 on atmelarm0 uart0: [FILTER]M]X....=BD..=BD=B1..(115200,n,8,1) uart1: mem 0xdffc0000-0xdffc3fff irq 6 on atmelarm0 uart1: [FILTER] uart2: mem 0xdffc4000-0xdffc7fff irq 7 on atmelarm0 uart2: [FILTER] uart3: mem 0xdffc8000-0xdffcbfff irq 8 on atmelarm0 uart3: [FILTER] uart4: mem 0xdffcc000-0xdffcffff irq 9 on atmelarm0 uart4: [FILTER] at91_spi0: mem 0xdffe0000-0xdffe3fff irq 13 on atmelarm0 at91_spi0: [ITHREAD] spibus0: on at91_spi0 ohci0: mem 0xdfe00000-0xdfefffff irq 23 o= n=20 atmelarm0 ohci0: [ITHREAD] usb1 on ohci0 Cannot get 100 Hz clock; using 100Hz at91_st0: [FILTER] Timecounter "AT91RM9200 timer" frequency 32768 Hz quality 1000 Timecounters tick every 10.000 msec mmc0: setting transfer rate to 30.000MHz usb0: 12Mbps Full Speed USB v1.1 uhub0: on usb0 uhub0: 1 port with 1 removable, self powered usb1: 12Mbps Full Speed USB v1.0 uhub1: on usb1 uhub1: 2 ports with 2 removable, self powered aue0: on usb1 miibus0: on aue0 ukphy0: PHY 1 on miibus0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto aue0: Ethernet address: 00:c0:26:10:0d:40 aue0: link state changed to DOWN usbd_alloc_device: set address 3 failed (ignored) usbd_alloc_device: getting device descriptor at addr 3 failed! uhub1:uhub_reattach_port: could not allocate new device! Trying to mount root from ufs:/dev/md0 Now it is bedtime. =2D-HPS