diff options
author | cognet <cognet@FreeBSD.org> | 2006-05-13 23:41:16 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2006-05-13 23:41:16 +0000 |
commit | 2e58b619628d5c8e5ecbe445140aade714d9c2f3 (patch) | |
tree | ad2cd12970015c6c1b03b6f9f087319ea6f2e34f /sys/arm/at91/uart_bus_at91usart.c | |
parent | 456f2593a536e19a6666580ad6ede280d3e7459e (diff) | |
download | FreeBSD-src-2e58b619628d5c8e5ecbe445140aade714d9c2f3.zip FreeBSD-src-2e58b619628d5c8e5ecbe445140aade714d9c2f3.tar.gz |
Resurrect Skyeye support :
Add a new option, SKYEYE_WORKAROUNDS, which as the name suggests adds
workarounds for things skyeye doesn't simulate. Specifically :
- Use USART0 instead of DBGU as the console, make it not use DMA, and manually provoke an interrupt when we're done in the transmit function.
- Skyeye maintains an internal counter for clock, but apparently there's
no way to access it, so hack the timecounter code to return a value which
is increased at every clock interrupts. This is gross, but I didn't find a
better way to implement timecounters without hacking Skyeye to get the
counter value.
- Force the write-back of PTEs once we're done writing them, even if they
are supposed to be write-through. I don't know why I have to do that.
Diffstat (limited to 'sys/arm/at91/uart_bus_at91usart.c')
-rw-r--r-- | sys/arm/at91/uart_bus_at91usart.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/arm/at91/uart_bus_at91usart.c b/sys/arm/at91/uart_bus_at91usart.c index c9ab85c..af1773b 100644 --- a/sys/arm/at91/uart_bus_at91usart.c +++ b/sys/arm/at91/uart_bus_at91usart.c @@ -76,22 +76,20 @@ usart_at91rm92_probe(device_t dev) switch (device_get_unit(dev)) { case 0: +#ifdef SKYEYE_WORKAROUNDS + device_set_desc(dev, "USART0"); +#else device_set_desc(dev, "DBGU"); -#ifndef USART0_CONSOLE +#endif /* * Setting sc_sysdev makes this device a 'system device' and * indirectly makes it the system console. */ sc->sc_sysdev = SLIST_FIRST(&uart_sysdevs); bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas)); -#endif break; case 1: device_set_desc(dev, "USART0"); -#ifdef USART0_CONSOLE - sc->sc_sysdev = SLIST_FIRST(&uart_sysdevs); - bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas)); -#endif break; case 2: device_set_desc(dev, "USART1"); @@ -104,7 +102,7 @@ usart_at91rm92_probe(device_t dev) break; } sc->sc_class = &at91_usart_class; - return (uart_bus_probe(dev, 0, 0, 0, 0)); + return (uart_bus_probe(dev, 0, 0, 0, device_get_unit(dev))); } |