diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-03-29 17:18:49 -0500 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-03-29 17:18:49 -0500 |
| commit | e02a4cabfcb9a999b74a2e2e6f13ffcb7ff2d606 (patch) | |
| tree | 2f3db60be4c57eca2a4c3ab3f3122dcf1ec0c624 /include/asm-arm | |
| parent | 600511e86babe3727264a0883a3a264f6fb6caf5 (diff) | |
| parent | f3cab8a0b1a772dc8b055b7affa567a366627c9e (diff) | |
Merge branch 'master'
Diffstat (limited to 'include/asm-arm')
57 files changed, 1670 insertions, 515 deletions
diff --git a/include/asm-arm/arch-aaec2000/uncompress.h b/include/asm-arm/arch-aaec2000/uncompress.h index fff0c94b75..300f4bf3bc 100644 --- a/include/asm-arm/arch-aaec2000/uncompress.h +++ b/include/asm-arm/arch-aaec2000/uncompress.h | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | #define UART(x) (*(volatile unsigned long *)(serial_port + (x))) | 16 | #define UART(x) (*(volatile unsigned long *)(serial_port + (x))) |
| 17 | 17 | ||
| 18 | static void putstr( const char *s ) | 18 | static void putc(int c) |
| 19 | { | 19 | { |
| 20 | unsigned long serial_port; | 20 | unsigned long serial_port; |
| 21 | do { | 21 | do { |
| @@ -28,17 +28,16 @@ static void putstr( const char *s ) | |||
| 28 | return; | 28 | return; |
| 29 | } while (0); | 29 | } while (0); |
| 30 | 30 | ||
| 31 | for (; *s; s++) { | 31 | /* wait for space in the UART's transmitter */ |
| 32 | /* wait for space in the UART's transmitter */ | 32 | while ((UART(UART_SR) & UART_SR_TxFF)) |
| 33 | while ((UART(UART_SR) & UART_SR_TxFF)); | 33 | barrier(); |
| 34 | /* send the character out. */ | 34 | |
| 35 | UART(UART_DR) = *s; | 35 | /* send the character out. */ |
| 36 | /* if a LF, also do CR... */ | 36 | UART(UART_DR) = c; |
| 37 | if (*s == 10) { | 37 | } |
| 38 | while ((UART(UART_SR) & UART_SR_TxFF)); | 38 | |
| 39 | UART(UART_DR) = 13; | 39 | static inline void flush(void) |
| 40 | } | 40 | { |
| 41 | } | ||
| 42 | } | 41 | } |
| 43 | 42 | ||
| 44 | #define arch_decomp_setup() | 43 | #define arch_decomp_setup() |
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_emac.h b/include/asm-arm/arch-at91rm9200/at91rm9200_emac.h new file mode 100644 index 0000000000..fbc091e61e --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91rm9200_emac.h | |||
| @@ -0,0 +1,138 @@ | |||
| 1 | /* | ||
| 2 | * include/asm-arm/arch-at91rm9200/at91rm9200_emac.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
| 5 | * Copyright (C) SAN People | ||
| 6 | * | ||
| 7 | * Ethernet MAC registers. | ||
| 8 | * Based on AT91RM9200 datasheet revision E. | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License as published by | ||
| 12 | * the Free Software Foundation; either version 2 of the License, or | ||
| 13 | * (at your option) any later version. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #ifndef AT91RM9200_EMAC_H | ||
| 17 | #define AT91RM9200_EMAC_H | ||
| 18 | |||
| 19 | #define AT91_EMAC_CTL 0x00 /* Control Register */ | ||
| 20 | #define AT91_EMAC_LB (1 << 0) /* Loopback */ | ||
| 21 | #define AT91_EMAC_LBL (1 << 1) /* Loopback Local */ | ||
| 22 | #define AT91_EMAC_RE (1 << 2) /* Receive Enable */ | ||
| 23 | #define AT91_EMAC_TE (1 << 3) /* Transmit Enable */ | ||
| 24 | #define AT91_EMAC_MPE (1 << 4) /* Management Port Enable */ | ||
| 25 | #define AT91_EMAC_CSR (1 << 5) /* Clear Statistics Registers */ | ||
| 26 | #define AT91_EMAC_INCSTAT (1 << 6) /* Increment Statistics Registers */ | ||
| 27 | #define AT91_EMAC_WES (1 << 7) /* Write Enable for Statistics Registers */ | ||
| 28 | #define AT91_EMAC_BP (1 << 8) /* Back Pressure */ | ||
| 29 | |||
| 30 | #define AT91_EMAC_CFG 0x04 /* Configuration Register */ | ||
| 31 | #define AT91_EMAC_SPD (1 << 0) /* Speed */ | ||
| 32 | #define AT91_EMAC_FD (1 << 1) /* Full Duplex */ | ||
| 33 | #define AT91_EMAC_BR (1 << 2) /* Bit Rate */ | ||
| 34 | #define AT91_EMAC_CAF (1 << 4) /* Copy All Frames */ | ||
| 35 | #define AT91_EMAC_NBC (1 << 5) /* No Broadcast */ | ||
| 36 | #define AT91_EMAC_MTI (1 << 6) /* Multicast Hash Enable */ | ||
| 37 | #define AT91_EMAC_UNI (1 << 7) /* Unicast Hash Enable */ | ||
| 38 | #define AT91_EMAC_BIG (1 << 8) /* Receive 1522 Bytes */ | ||
| 39 | #define AT91_EMAC_EAE (1 << 9) /* External Address Match Enable */ | ||
| 40 | #define AT91_EMAC_CLK (3 << 10) /* MDC Clock Divisor */ | ||
| 41 | #define AT91_EMAC_CLK_DIV8 (0 << 10) | ||
| 42 | #define AT91_EMAC_CLK_DIV16 (1 << 10) | ||
| 43 | #define AT91_EMAC_CLK_DIV32 (2 << 10) | ||
| 44 | #define AT91_EMAC_CLK_DIV64 (3 << 10) | ||
| 45 | #define AT91_EMAC_RTY (1 << 12) /* Retry Test */ | ||
| 46 | #define AT91_EMAC_RMII (1 << 13) /* Reduce MII (RMII) */ | ||
| 47 | |||
| 48 | #define AT91_EMAC_SR 0x08 /* Status Register */ | ||
| 49 | #define AT91_EMAC_SR_LINK (1 << 0) /* Link */ | ||
| 50 | #define AT91_EMAC_SR_MDIO (1 << 1) /* MDIO pin */ | ||
| 51 | #define AT91_EMAC_SR_IDLE (1 << 2) /* PHY idle */ | ||
| 52 | |||
| 53 | #define AT91_EMAC_TAR 0x0c /* Transmit Address Register */ | ||
| 54 | |||
| 55 | #define AT91_EMAC_TCR 0x10 /* Transmit Control Register */ | ||
| 56 | #define AT91_EMAC_LEN (0x7ff << 0) /* Transmit Frame Length */ | ||
| 57 | #define AT91_EMAC_NCRC (1 << 15) /* No CRC */ | ||
| 58 | |||
| 59 | #define AT91_EMAC_TSR 0x14 /* Transmit Status Register */ | ||
| 60 | #define AT91_EMAC_TSR_OVR (1 << 0) /* Transmit Buffer Overrun */ | ||
| 61 | #define AT91_EMAC_TSR_COL (1 << 1) /* Collision Occurred */ | ||
| 62 | #define AT91_EMAC_TSR_RLE (1 << 2) /* Retry Limit Exceeded */ | ||
| 63 | #define AT91_EMAC_TSR_IDLE (1 << 3) /* Transmitter Idle */ | ||
| 64 | #define AT91_EMAC_TSR_BNQ (1 << 4) /* Transmit Buffer not Queued */ | ||
| 65 | #define AT91_EMAC_TSR_COMP (1 << 5) /* Transmit Complete */ | ||
| 66 | #define AT91_EMAC_TSR_UND (1 << 6) /* Transmit Underrun */ | ||
