Mike Frysinger | d4d7730 | 2008-02-04 19:26:55 -0500 | [diff] [blame^] | 1 | /* |
| 2 | * Port Masks |
| 3 | */ |
| 4 | |
| 5 | #ifndef __BFIN_PERIPHERAL_PORT__ |
| 6 | #define __BFIN_PERIPHERAL_PORT__ |
| 7 | |
| 8 | /* PORTx_MUX Masks */ |
| 9 | #define PORT_x_MUX_0_MASK 0x0003 |
| 10 | #define PORT_x_MUX_1_MASK 0x000C |
| 11 | #define PORT_x_MUX_2_MASK 0x0030 |
| 12 | #define PORT_x_MUX_3_MASK 0x00C0 |
| 13 | #define PORT_x_MUX_4_MASK 0x0300 |
| 14 | #define PORT_x_MUX_5_MASK 0x0C00 |
| 15 | #define PORT_x_MUX_6_MASK 0x3000 |
| 16 | #define PORT_x_MUX_7_MASK 0xC000 |
| 17 | |
| 18 | #define PORT_x_MUX_FUNC_1 (0x0) |
| 19 | #define PORT_x_MUX_FUNC_2 (0x1) |
| 20 | #define PORT_x_MUX_FUNC_3 (0x2) |
| 21 | #define PORT_x_MUX_FUNC_4 (0x3) |
| 22 | #define PORT_x_MUX_0_FUNC_1 (PORT_x_MUX_FUNC_1 << 0) |
| 23 | #define PORT_x_MUX_0_FUNC_2 (PORT_x_MUX_FUNC_2 << 0) |
| 24 | #define PORT_x_MUX_0_FUNC_3 (PORT_x_MUX_FUNC_3 << 0) |
| 25 | #define PORT_x_MUX_0_FUNC_4 (PORT_x_MUX_FUNC_4 << 0) |
| 26 | #define PORT_x_MUX_1_FUNC_1 (PORT_x_MUX_FUNC_1 << 2) |
| 27 | #define PORT_x_MUX_1_FUNC_2 (PORT_x_MUX_FUNC_2 << 2) |
| 28 | #define PORT_x_MUX_1_FUNC_3 (PORT_x_MUX_FUNC_3 << 2) |
| 29 | #define PORT_x_MUX_1_FUNC_4 (PORT_x_MUX_FUNC_4 << 2) |
| 30 | #define PORT_x_MUX_2_FUNC_1 (PORT_x_MUX_FUNC_1 << 4) |
| 31 | #define PORT_x_MUX_2_FUNC_2 (PORT_x_MUX_FUNC_2 << 4) |
| 32 | #define PORT_x_MUX_2_FUNC_3 (PORT_x_MUX_FUNC_3 << 4) |
| 33 | #define PORT_x_MUX_2_FUNC_4 (PORT_x_MUX_FUNC_4 << 4) |
| 34 | #define PORT_x_MUX_3_FUNC_1 (PORT_x_MUX_FUNC_1 << 6) |
| 35 | #define PORT_x_MUX_3_FUNC_2 (PORT_x_MUX_FUNC_2 << 6) |
| 36 | #define PORT_x_MUX_3_FUNC_3 (PORT_x_MUX_FUNC_3 << 6) |
| 37 | #define PORT_x_MUX_3_FUNC_4 (PORT_x_MUX_FUNC_4 << 6) |
| 38 | #define PORT_x_MUX_4_FUNC_1 (PORT_x_MUX_FUNC_1 << 8) |
| 39 | #define PORT_x_MUX_4_FUNC_2 (PORT_x_MUX_FUNC_2 << 8) |
| 40 | #define PORT_x_MUX_4_FUNC_3 (PORT_x_MUX_FUNC_3 << 8) |
| 41 | #define PORT_x_MUX_4_FUNC_4 (PORT_x_MUX_FUNC_4 << 8) |
| 42 | #define PORT_x_MUX_5_FUNC_1 (PORT_x_MUX_FUNC_1 << 10) |
| 43 | #define PORT_x_MUX_5_FUNC_2 (PORT_x_MUX_FUNC_2 << 10) |
| 44 | #define PORT_x_MUX_5_FUNC_3 (PORT_x_MUX_FUNC_3 << 10) |
| 45 | #define PORT_x_MUX_5_FUNC_4 (PORT_x_MUX_FUNC_4 << 10) |
| 46 | #define PORT_x_MUX_6_FUNC_1 (PORT_x_MUX_FUNC_1 << 12) |
| 47 | #define PORT_x_MUX_6_FUNC_2 (PORT_x_MUX_FUNC_2 << 12) |
| 48 | #define PORT_x_MUX_6_FUNC_3 (PORT_x_MUX_FUNC_3 << 12) |
| 49 | #define PORT_x_MUX_6_FUNC_4 (PORT_x_MUX_FUNC_4 << 12) |
| 50 | #define PORT_x_MUX_7_FUNC_1 (PORT_x_MUX_FUNC_1 << 14) |
| 51 | #define PORT_x_MUX_7_FUNC_2 (PORT_x_MUX_FUNC_2 << 14) |
| 52 | #define PORT_x_MUX_7_FUNC_3 (PORT_x_MUX_FUNC_3 << 14) |
| 53 | #define PORT_x_MUX_7_FUNC_4 (PORT_x_MUX_FUNC_4 << 14) |
| 54 | |
| 55 | /* Port F Masks */ |
| 56 | #define PF0 0x0001 |
| 57 | #define PF1 0x0002 |
| 58 | #define PF2 0x0004 |
| 59 | #define PF3 0x0008 |
| 60 | #define PF4 0x0010 |
| 61 | #define PF5 0x0020 |
| 62 | #define PF6 0x0040 |
| 63 | #define PF7 0x0080 |
| 64 | #define PF8 0x0100 |
| 65 | #define PF9 0x0200 |
| 66 | #define PF10 0x0400 |
| 67 | #define PF11 0x0800 |
| 68 | #define PF12 0x1000 |
| 69 | #define PF13 0x2000 |
| 70 | #define PF14 0x4000 |
| 71 | #define PF15 0x8000 |
| 72 | |
| 73 | /* Port G Masks */ |
| 74 | #define PG0 0x0001 |
| 75 | #define PG1 0x0002 |
| 76 | #define PG2 0x0004 |
| 77 | #define PG3 0x0008 |
| 78 | #define PG4 0x0010 |
| 79 | #define PG5 0x0020 |
| 80 | #define PG6 0x0040 |
| 81 | #define PG7 0x0080 |
| 82 | #define PG8 0x0100 |
| 83 | #define PG9 0x0200 |
| 84 | #define PG10 0x0400 |
| 85 | #define PG11 0x0800 |
| 86 | #define PG12 0x1000 |
| 87 | #define PG13 0x2000 |
| 88 | #define PG14 0x4000 |
| 89 | #define PG15 0x8000 |
| 90 | |
| 91 | /* Port H Masks */ |
| 92 | #define PH0 0x0001 |
| 93 | #define PH1 0x0002 |
| 94 | #define PH2 0x0004 |
| 95 | #define PH3 0x0008 |
| 96 | #define PH4 0x0010 |
| 97 | #define PH5 0x0020 |
| 98 | #define PH6 0x0040 |
| 99 | #define PH7 0x0080 |
| 100 | #define PH8 0x0100 |
| 101 | #define PH9 0x0200 |
| 102 | #define PH10 0x0400 |
| 103 | #define PH11 0x0800 |
| 104 | #define PH12 0x1000 |
| 105 | #define PH13 0x2000 |
| 106 | #define PH14 0x4000 |
| 107 | #define PH15 0x8000 |
| 108 | |
| 109 | /* Port J Masks */ |
| 110 | #define PJ0 0x0001 |
| 111 | #define PJ1 0x0002 |
| 112 | #define PJ2 0x0004 |
| 113 | #define PJ3 0x0008 |
| 114 | #define PJ4 0x0010 |
| 115 | #define PJ5 0x0020 |
| 116 | #define PJ6 0x0040 |
| 117 | #define PJ7 0x0080 |
| 118 | #define PJ8 0x0100 |
| 119 | #define PJ9 0x0200 |
| 120 | #define PJ10 0x0400 |
| 121 | #define PJ11 0x0800 |
| 122 | #define PJ12 0x1000 |
| 123 | #define PJ13 0x2000 |
| 124 | #define PJ14 0x4000 |
| 125 | #define PJ15 0x8000 |
| 126 | |
| 127 | #endif |