Deleted Added
full compact
47a48
> #include "opt_at91.h"
50c51
< __FBSDID("$FreeBSD: head/sys/arm/at91/kb920x_machdep.c 160282 2006-07-12 00:48:50Z cognet $");
---
> __FBSDID("$FreeBSD: head/sys/arm/at91/kb920x_machdep.c 160363 2006-07-14 22:22:57Z imp $");
95a97,98
> #include <arm/at91/at91_piovar.h>
> #include <arm/at91/at91_pio_rm9200.h>
188c191
< board_init(void)
---
> ramsize(void)
192c195
< int banks, rows, cols, bw; /* log2 size */
---
> int banks, rows, cols, bw;
202a206,247
> static long
> board_init(void)
> {
> /*
> * Since the USART supprots RS-485 multidrop mode, it allows the
> * TX pins to float. However, for RS-232 operations, we don't want
> * these pins to float. Instead, they should be pulled up to avoid
> * mismatches. Linux does something similar when it configures the
> * TX lines. This implies that we also allow the RX lines to float
> * rather than be in the state they are left in by the boot loader.
> * Since they are input pins, I think that this is the right thing
> * to do.
> */
>
> /* PIOA's A periph: Turn USART 0 and 2's TX/RX pins */
> at91_pio_use_periph_a(AT91RM92_PIOA_BASE,
> AT91C_PA18_RXD0 | AT91C_PA22_RXD2, 0);
> at91_pio_use_periph_a(AT91RM92_PIOA_BASE,
> AT91C_PA17_TXD0 | AT91C_PA23_TXD2, 1);
> /* PIOA's B periph: Turn USART 3's TX/RX pins */
> at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PA6_RXD3, 0);
> at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PA5_TXD3, 1);
> #if AT91_TSC
> /* We're using TC0's A1 and A2 input */
> at91_pio_use_periph_b(AT91RM92_PIOA_BASE,
> AT91C_PA19_TIOA1 | AT91C_PA21_TIOA2, 0);
> #endif
> /* PIOB's A periph: Turn USART 1's TX/RX pins */
> at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PB21_RXD1, 0);
> at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PB20_TXD1, 1);
>
> /* Pin assignment */
> #if AT91_TSC
> /* Assert PA24 low -- talk to rubidium */
> at91_pio_use_gpio(AT91RM92_PIOA_BASE, AT91C_PIO_PA24);
> at91_pio_gpio_output(AT91RM92_PIOA_BASE, AT91C_PIO_PA24, 0);
> at91_pio_gpio_clear(AT91RM92_PIOA_BASE, AT91C_PIO_PA24);
> #endif
>
> return (ramsize());
> }
>