Date: Mon, 9 Jun 2008 03:44:37 +0200 From: Hans Petter Selasky <hselasky@c2i.net> To: freebsd-arm@freebsd.org Cc: Mark Tinguely <tinguely@casselton.net>, jhb@freebsd.org Subject: Re: AT91RM9200 and possibly other ARM targets are broken in 8-current after recent commit (solution) Message-ID: <200806090344.38252.hselasky@c2i.net> In-Reply-To: <200804222301.28841.hselasky@c2i.net> References: <200804222024.m3MKOXZN097466@casselton.net> <200804222301.28841.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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: <AT91 device bus> on motherboard at91_st0: <ST> mem 0xdffffd00-0xdffffdff irq 1 on atmelarm0 at91_st0: watchdog registered, timeout intervall max. 64 sec at91_pio0: <PIOA> mem 0xdffff400-0xdffff5ff irq 1 on atmelarm0 at91_pio0: ABSR: 0x60 OSR: 0 PSR:0x3938001f ODSR: 0 at91_pio0: [FILTER] at91_pio1: <PIOB> mem 0xdffff600-0xdffff7ff irq 1 on atmelarm0 at91_pio1: ABSR: 0xff301 OSR: 0x2 PSR:0x3fc00cfe ODSR: 0 at91_pio1: [FILTER] at91_pio2: <PIOC> mem 0xdffff800-0xdffff9ff irq 1 on atmelarm0 at91_pio2: ABSR: 0 OSR: 0x1000000a PSR:0xffffc075 ODSR: 0x10000000 at91_pio2: [FILTER] at91_pio3: <PIOD> mem 0xdffffa00-0xdffffbff irq 1 on atmelarm0 at91_pio3: ABSR: 0 OSR: 0 PSR:0xfffffff ODSR: 0 at91_pio3: [FILTER] at91_pmc0: <PMC> mem 0xdffffc00-0xdffffcff irq 1 on atmelarm0 at91_pmc0: Primary: 10000000 Hz PLLA: 180 MHz CPU: 180 MHz MCK: 60 MHz at91_udp0: <AT91 integrated AT91_UDP controller> mem 0xdffb0000-0xdffb3fff = irq=20 11,3 on atmelarm0 at91_udp0: [ITHREAD] at91_udp0: [ITHREAD] usb0 on at91_udp0 at91_mci0: <MCI mmc/sd host bridge> mem 0xdffb4000-0xdffb7fff irq 10 on=20 atmelarm0 at91_mci0: [ITHREAD] mmc0: <mmc/sd bus> on at91_mci0 at91_twi0: <TWI> mem 0xdffb8000-0xdffbbfff irq 12 on atmelarm0 at91_twi0: [ITHREAD] iicbus0: <Philips I2C bus> on at91_twi0 setting cwgr to 0x1a4a4 iicbus0: <unknown card> at addr 0 iic0: <I2C generic I/O> on iicbus0 icee0: <I2C EEPROM> at addr 0xa0 on iicbus0 ate0: <EMAC> mem 0xdffbc000-0xdffbffff irq 24 on atmelarm0 ate0: No MAC address set device_attach: ate0 attach returned 6 uart0: <DBGU> mem 0xdffff200-0xdffff3ff irq 1 on atmelarm0 uart0: [FILTER]M]X....=BD..=BD=B1..(115200,n,8,1) uart1: <USART0> mem 0xdffc0000-0xdffc3fff irq 6 on atmelarm0 uart1: [FILTER] uart2: <USART1> mem 0xdffc4000-0xdffc7fff irq 7 on atmelarm0 uart2: [FILTER] uart3: <USART2> mem 0xdffc8000-0xdffcbfff irq 8 on atmelarm0 uart3: [FILTER] uart4: <USART3> mem 0xdffcc000-0xdffcffff irq 9 on atmelarm0 uart4: [FILTER] at91_spi0: <SPI> mem 0xdffe0000-0xdffe3fff irq 13 on atmelarm0 at91_spi0: [ITHREAD] spibus0: <spibus bus> on at91_spi0 ohci0: <AT91 integrated OHCI controller> 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: <ATMEL DCI Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usb0 uhub0: 1 port with 1 removable, self powered usb1: 12Mbps Full Speed USB v1.0 uhub1: <Atmel OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usb1 uhub1: 2 ports with 2 removable, self powered aue0: <ADMtek USB To LAN Converter, rev 1.10/2.01, addr 2> on usb1 miibus0: <MII bus> on aue0 ukphy0: <Generic IEEE 802.3u media interface> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806090344.38252.hselasky>