2 * Common header file for Blackfin family of processors
4 * Copyright 2007-2008 Analog Devices Inc.
6 * Licensed under the GPL-2 or later.
12 #define P_IDENT(x) ((x) & 0x1FF)
13 #define P_FUNCT(x) (((x) & 0x3) << 9)
14 #define P_FUNCT2MUX(x) (((x) >> 9) & 0x3)
15 #define P_DEFINED 0x8000
16 #define P_UNDEF 0x4000
17 #define P_MAYSHARE 0x2000
18 #define P_DONTCARE 0x1000
22 int peripheral_request(unsigned short per, const char *label);
23 void peripheral_free(unsigned short per);
24 int peripheral_request_list(const unsigned short per[], const char *label);
25 void peripheral_free_list(const unsigned short per[]);
29 #include <asm/blackfin.h>
32 #define P_SPORT2_TFS P_UNDEF
35 #ifndef P_SPORT2_DTSEC
36 #define P_SPORT2_DTSEC P_UNDEF
39 #ifndef P_SPORT2_DTPRI
40 #define P_SPORT2_DTPRI P_UNDEF
43 #ifndef P_SPORT2_TSCLK
44 #define P_SPORT2_TSCLK P_UNDEF
48 #define P_SPORT2_RFS P_UNDEF
51 #ifndef P_SPORT2_DRSEC
52 #define P_SPORT2_DRSEC P_UNDEF
55 #ifndef P_SPORT2_DRPRI
56 #define P_SPORT2_DRPRI P_UNDEF
59 #ifndef P_SPORT2_RSCLK
60 #define P_SPORT2_RSCLK P_UNDEF
64 #define P_SPORT3_TFS P_UNDEF
67 #ifndef P_SPORT3_DTSEC
68 #define P_SPORT3_DTSEC P_UNDEF
71 #ifndef P_SPORT3_DTPRI
72 #define P_SPORT3_DTPRI P_UNDEF
75 #ifndef P_SPORT3_TSCLK
76 #define P_SPORT3_TSCLK P_UNDEF
80 #define P_SPORT3_RFS P_UNDEF
83 #ifndef P_SPORT3_DRSEC
84 #define P_SPORT3_DRSEC P_UNDEF
87 #ifndef P_SPORT3_DRPRI
88 #define P_SPORT3_DRPRI P_UNDEF
91 #ifndef P_SPORT3_RSCLK
92 #define P_SPORT3_RSCLK P_UNDEF
96 #define P_TMR4 P_UNDEF
100 #define P_TMR5 P_UNDEF
104 #define P_TMR6 P_UNDEF
108 #define P_TMR7 P_UNDEF
112 #define P_TWI1_SCL P_UNDEF
116 #define P_TWI1_SDA P_UNDEF
120 #define P_UART3_RTS P_UNDEF
124 #define P_UART3_CTS P_UNDEF
128 #define P_UART2_TX P_UNDEF
132 #define P_UART2_RX P_UNDEF
136 #define P_UART3_TX P_UNDEF
140 #define P_UART3_RX P_UNDEF
144 #define P_SPI2_SS P_UNDEF
148 #define P_SPI2_SSEL1 P_UNDEF
152 #define P_SPI2_SSEL2 P_UNDEF
156 #define P_SPI2_SSEL3 P_UNDEF
160 #define P_SPI2_SSEL4 P_UNDEF
164 #define P_SPI2_SSEL5 P_UNDEF
168 #define P_SPI2_SSEL6 P_UNDEF
172 #define P_SPI2_SSEL7 P_UNDEF
176 #define P_SPI2_SCK P_UNDEF
180 #define P_SPI2_MOSI P_UNDEF
184 #define P_SPI2_MISO P_UNDEF
188 #define P_TMR0 P_UNDEF
192 #define P_TMR1 P_UNDEF
196 #define P_TMR2 P_UNDEF
200 #define P_TMR3 P_UNDEF
204 #define P_SPORT0_TFS P_UNDEF
207 #ifndef P_SPORT0_DTSEC
208 #define P_SPORT0_DTSEC P_UNDEF
211 #ifndef P_SPORT0_DTPRI
212 #define P_SPORT0_DTPRI P_UNDEF
215 #ifndef P_SPORT0_TSCLK
216 #define P_SPORT0_TSCLK P_UNDEF
220 #define P_SPORT0_RFS P_UNDEF
223 #ifndef P_SPORT0_DRSEC
224 #define P_SPORT0_DRSEC P_UNDEF
227 #ifndef P_SPORT0_DRPRI
228 #define P_SPORT0_DRPRI P_UNDEF
231 #ifndef P_SPORT0_RSCLK
232 #define P_SPORT0_RSCLK P_UNDEF
236 #define P_SD_D0 P_UNDEF
240 #define P_SD_D1 P_UNDEF
244 #define P_SD_D2 P_UNDEF
248 #define P_SD_D3 P_UNDEF
252 #define P_SD_CLK P_UNDEF
256 #define P_SD_CMD P_UNDEF
260 #define P_MMCLK P_UNDEF
264 #define P_MBCLK P_UNDEF
268 #define P_PPI1_D0 P_UNDEF
272 #define P_PPI1_D1 P_UNDEF
276 #define P_PPI1_D2 P_UNDEF
280 #define P_PPI1_D3 P_UNDEF
284 #define P_PPI1_D4 P_UNDEF
288 #define P_PPI1_D5 P_UNDEF
292 #define P_PPI1_D6 P_UNDEF
296 #define P_PPI1_D7 P_UNDEF
300 #define P_PPI1_D8 P_UNDEF
304 #define P_PPI1_D9 P_UNDEF
308 #define P_PPI1_D10 P_UNDEF
312 #define P_PPI1_D11 P_UNDEF
316 #define P_PPI1_D12 P_UNDEF
320 #define P_PPI1_D13 P_UNDEF
324 #define P_PPI1_D14 P_UNDEF
328 #define P_PPI1_D15 P_UNDEF
332 #define P_HOST_D8 P_UNDEF
336 #define P_HOST_D9 P_UNDEF
340 #define P_HOST_D10 P_UNDEF
344 #define P_HOST_D11 P_UNDEF
348 #define P_HOST_D12 P_UNDEF
352 #define P_HOST_D13 P_UNDEF
356 #define P_HOST_D14 P_UNDEF
360 #define P_HOST_D15 P_UNDEF
364 #define P_HOST_D0 P_UNDEF
368 #define P_HOST_D1 P_UNDEF
372 #define P_HOST_D2 P_UNDEF
376 #define P_HOST_D3 P_UNDEF
380 #define P_HOST_D4 P_UNDEF
384 #define P_HOST_D5 P_UNDEF
388 #define P_HOST_D6 P_UNDEF
392 #define P_HOST_D7 P_UNDEF
396 #define P_SPORT1_TFS P_UNDEF
399 #ifndef P_SPORT1_DTSEC
400 #define P_SPORT1_DTSEC P_UNDEF
403 #ifndef P_SPORT1_DTPRI
404 #define P_SPORT1_DTPRI P_UNDEF
407 #ifndef P_SPORT1_TSCLK
408 #define P_SPORT1_TSCLK P_UNDEF
412 #define P_SPORT1_RFS P_UNDEF
415 #ifndef P_SPORT1_DRSEC
416 #define P_SPORT1_DRSEC P_UNDEF
419 #ifndef P_SPORT1_DRPRI
420 #define P_SPORT1_DRPRI P_UNDEF
423 #ifndef P_SPORT1_RSCLK
424 #define P_SPORT1_RSCLK P_UNDEF
428 #define P_PPI2_D0 P_UNDEF
432 #define P_PPI2_D1 P_UNDEF
436 #define P_PPI2_D2 P_UNDEF
440 #define P_PPI2_D3 P_UNDEF
444 #define P_PPI2_D4 P_UNDEF
448 #define P_PPI2_D5 P_UNDEF
452 #define P_PPI2_D6 P_UNDEF
456 #define P_PPI2_D7 P_UNDEF
460 #define P_PPI0_D18 P_UNDEF
464 #define P_PPI0_D19 P_UNDEF
468 #define P_PPI0_D20 P_UNDEF
472 #define P_PPI0_D21 P_UNDEF
476 #define P_PPI0_D22 P_UNDEF
480 #define P_PPI0_D23 P_UNDEF
484 #define P_KEY_ROW0 P_UNDEF
488 #define P_KEY_ROW1 P_UNDEF
492 #define P_KEY_ROW2 P_UNDEF
496 #define P_KEY_ROW3 P_UNDEF
500 #define P_KEY_COL0 P_UNDEF
504 #define P_KEY_COL1 P_UNDEF
508 #define P_KEY_COL2 P_UNDEF
512 #define P_KEY_COL3 P_UNDEF
516 #define P_SPI0_SCK P_UNDEF
520 #define P_SPI0_MISO P_UNDEF
524 #define P_SPI0_MOSI P_UNDEF
528 #define P_SPI0_SS P_UNDEF
532 #define P_SPI0_SSEL1 P_UNDEF
536 #define P_SPI0_SSEL2 P_UNDEF
540 #define P_SPI0_SSEL3 P_UNDEF
544 #define P_SPI0_SSEL4 P_UNDEF
548 #define P_SPI0_SSEL5 P_UNDEF
552 #define P_SPI0_SSEL6 P_UNDEF
556 #define P_SPI0_SSEL7 P_UNDEF
560 #define P_UART0_TX P_UNDEF
564 #define P_UART0_RX P_UNDEF
568 #define P_UART1_RTS P_UNDEF
572 #define P_UART1_CTS P_UNDEF
576 #define P_PPI1_CLK P_UNDEF
580 #define P_PPI1_FS1 P_UNDEF
584 #define P_PPI1_FS2 P_UNDEF
588 #define P_TWI0_SCL P_UNDEF
592 #define P_TWI0_SDA P_UNDEF
596 #define P_KEY_COL7 P_UNDEF
600 #define P_KEY_ROW6 P_UNDEF
604 #define P_KEY_COL6 P_UNDEF
608 #define P_KEY_ROW5 P_UNDEF
612 #define P_KEY_COL5 P_UNDEF
616 #define P_KEY_ROW4 P_UNDEF
620 #define P_KEY_COL4 P_UNDEF
624 #define P_KEY_ROW7 P_UNDEF
628 #define P_PPI0_D0 P_UNDEF
632 #define P_PPI0_D1 P_UNDEF
636 #define P_PPI0_D2 P_UNDEF
640 #define P_PPI0_D3 P_UNDEF
644 #define P_PPI0_D4 P_UNDEF
648 #define P_PPI0_D5 P_UNDEF
652 #define P_PPI0_D6 P_UNDEF
656 #define P_PPI0_D7 P_UNDEF
660 #define P_PPI0_D8 P_UNDEF
664 #define P_PPI0_D9 P_UNDEF
668 #define P_PPI0_D10 P_UNDEF
672 #define P_PPI0_D11 P_UNDEF
676 #define P_PPI0_D12 P_UNDEF
680 #define P_PPI0_D13 P_UNDEF
684 #define P_PPI0_D14 P_UNDEF
688 #define P_PPI0_D15 P_UNDEF
692 #define P_ATAPI_D0A P_UNDEF
696 #define P_ATAPI_D1A P_UNDEF
700 #define P_ATAPI_D2A P_UNDEF
704 #define P_ATAPI_D3A P_UNDEF
708 #define P_ATAPI_D4A P_UNDEF
712 #define P_ATAPI_D5A P_UNDEF
716 #define P_ATAPI_D6A P_UNDEF
720 #define P_ATAPI_D7A P_UNDEF
724 #define P_ATAPI_D8A P_UNDEF
728 #define P_ATAPI_D9A P_UNDEF
732 #define P_ATAPI_D10A P_UNDEF
736 #define P_ATAPI_D11A P_UNDEF
740 #define P_ATAPI_D12A P_UNDEF
744 #define P_ATAPI_D13A P_UNDEF
748 #define P_ATAPI_D14A P_UNDEF
752 #define P_ATAPI_D15A P_UNDEF
756 #define P_PPI0_CLK P_UNDEF
760 #define P_PPI0_FS1 P_UNDEF
764 #define P_PPI0_FS2 P_UNDEF
768 #define P_PPI0_D16 P_UNDEF
772 #define P_PPI0_D17 P_UNDEF
776 #define P_SPI1_SSEL1 P_UNDEF
780 #define P_SPI1_SSEL2 P_UNDEF
784 #define P_SPI1_SSEL3 P_UNDEF
789 #define P_SPI1_SSEL4 P_UNDEF
793 #define P_SPI1_SSEL5 P_UNDEF
797 #define P_SPI1_SSEL6 P_UNDEF
801 #define P_SPI1_SSEL7 P_UNDEF
805 #define P_SPI1_SCK P_UNDEF
809 #define P_SPI1_MISO P_UNDEF
813 #define P_SPI1_MOSI P_UNDEF
817 #define P_SPI1_SS P_UNDEF
821 #define P_CAN0_TX P_UNDEF
825 #define P_CAN0_RX P_UNDEF
829 #define P_CAN1_TX P_UNDEF
833 #define P_CAN1_RX P_UNDEF
837 #define P_ATAPI_A0A P_UNDEF
841 #define P_ATAPI_A1A P_UNDEF
845 #define P_ATAPI_A2A P_UNDEF
849 #define P_HOST_CE P_UNDEF
853 #define P_HOST_RD P_UNDEF
857 #define P_HOST_WR P_UNDEF
861 #define P_MTXONB P_UNDEF
865 #define P_PPI2_FS2 P_UNDEF
869 #define P_PPI2_FS1 P_UNDEF
873 #define P_PPI2_CLK P_UNDEF
877 #define P_CNT_CZM P_UNDEF
881 #define P_UART1_TX P_UNDEF
885 #define P_UART1_RX P_UNDEF
888 #ifndef P_ATAPI_RESET
889 #define P_ATAPI_RESET P_UNDEF
893 #define P_HOST_ADDR P_UNDEF
897 #define P_HOST_ACK P_UNDEF
901 #define P_MTX P_UNDEF
905 #define P_MRX P_UNDEF
909 #define P_MRXONB P_UNDEF
937 #define P_PPI1_FS3 P_UNDEF
941 #define P_PPI2_FS3 P_UNDEF
945 #define P_TMR8 P_UNDEF
949 #define P_TMR9 P_UNDEF
953 #define P_TMR10 P_UNDEF
956 #define P_TMR11 P_UNDEF
960 #define P_DMAR0 P_UNDEF
964 #define P_DMAR1 P_UNDEF
968 #define P_PPI0_FS3 P_UNDEF
972 #define P_CNT_CDG P_UNDEF
976 #define P_CNT_CUD P_UNDEF
980 #define P_A10 P_UNDEF
984 #define P_A11 P_UNDEF
988 #define P_A12 P_UNDEF
992 #define P_A13 P_UNDEF
996 #define P_A14 P_UNDEF
1000 #define P_A15 P_UNDEF
1004 #define P_A16 P_UNDEF
1008 #define P_A17 P_UNDEF
1012 #define P_A18 P_UNDEF
1016 #define P_A19 P_UNDEF
1020 #define P_A20 P_UNDEF
1024 #define P_A21 P_UNDEF
1028 #define P_A22 P_UNDEF
1032 #define P_A23 P_UNDEF
1036 #define P_A24 P_UNDEF
1040 #define P_A25 P_UNDEF
1044 #define P_NOR_CLK P_UNDEF
1048 #define P_TMRCLK P_UNDEF
1051 #ifndef P_AMC_ARDY_NOR_WAIT
1052 #define P_AMC_ARDY_NOR_WAIT P_UNDEF
1056 #define P_NAND_CE P_UNDEF
1060 #define P_NAND_RB P_UNDEF
1063 #ifndef P_ATAPI_DIOR
1064 #define P_ATAPI_DIOR P_UNDEF
1067 #ifndef P_ATAPI_DIOW
1068 #define P_ATAPI_DIOW P_UNDEF
1072 #define P_ATAPI_CS0 P_UNDEF
1076 #define P_ATAPI_CS1 P_UNDEF
1079 #ifndef P_ATAPI_DMACK
1080 #define P_ATAPI_DMACK P_UNDEF
1083 #ifndef P_ATAPI_DMARQ
1084 #define P_ATAPI_DMARQ P_UNDEF
1087 #ifndef P_ATAPI_INTRQ
1088 #define P_ATAPI_INTRQ P_UNDEF
1091 #ifndef P_ATAPI_IORDY
1092 #define P_ATAPI_IORDY P_UNDEF
1096 #define P_AMC_BR P_UNDEF
1100 #define P_AMC_BG P_UNDEF
1104 #define P_AMC_BGH P_UNDEF
1109 #ifndef P_MII0_ETxD0
1110 #define P_MII0_ETxD0 P_UNDEF
1113 #ifndef P_MII0_ETxD1
1114 #define P_MII0_ETxD1 P_UNDEF
1117 #ifndef P_MII0_ETxD2
1118 #define P_MII0_ETxD2 P_UNDEF
1121 #ifndef P_MII0_ETxD3
1122 #define P_MII0_ETxD3 P_UNDEF
1125 #ifndef P_MII0_ETxEN
1126 #define P_MII0_ETxEN P_UNDEF
1129 #ifndef P_MII0_TxCLK
1130 #define P_MII0_TxCLK P_UNDEF
1133 #ifndef P_MII0_PHYINT
1134 #define P_MII0_PHYINT P_UNDEF
1138 #define P_MII0_COL P_UNDEF
1141 #ifndef P_MII0_ERxD0
1142 #define P_MII0_ERxD0 P_UNDEF
1145 #ifndef P_MII0_ERxD1
1146 #define P_MII0_ERxD1 P_UNDEF
1149 #ifndef P_MII0_ERxD2
1150 #define P_MII0_ERxD2 P_UNDEF
1153 #ifndef P_MII0_ERxD3
1154 #define P_MII0_ERxD3 P_UNDEF
1157 #ifndef P_MII0_ERxDV
1158 #define P_MII0_ERxDV P_UNDEF
1161 #ifndef P_MII0_ERxCLK
1162 #define P_MII0_ERxCLK P_UNDEF
1165 #ifndef P_MII0_ERxER
1166 #define P_MII0_ERxER P_UNDEF
1170 #define P_MII0_CRS P_UNDEF
1173 #ifndef P_RMII0_REF_CLK
1174 #define P_RMII0_REF_CLK P_UNDEF
1177 #ifndef P_RMII0_MDINT
1178 #define P_RMII0_MDINT P_UNDEF
1181 #ifndef P_RMII0_CRS_DV
1182 #define P_RMII0_CRS_DV P_UNDEF
1186 #define P_MDC P_UNDEF
1190 #define P_MDIO P_UNDEF
1193 #endif /* _PORTMUX_H_ */