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
21 int bfin_internal_set_wake(unsigned int irq
, unsigned int state
);
23 #define gpio_pint_regs bfin_pint_regs
24 #define adi_internal_set_wake bfin_internal_set_wake
26 #define peripheral_request(per, label) (0)
27 #define peripheral_free(per)
28 #define peripheral_request_list(per, label) (0)
29 #define peripheral_free_list(per)
31 int peripheral_request(unsigned short per
, const char *label
);
32 void peripheral_free(unsigned short per
);
33 int peripheral_request_list(const unsigned short per
[], const char *label
);
34 void peripheral_free_list(const unsigned short per
[]);
37 #include <linux/err.h>
38 #include <linux/pinctrl/pinctrl.h>
39 #include <mach/portmux.h>
40 #include <mach/gpio.h>
43 #define P_SPORT2_TFS P_UNDEF
46 #ifndef P_SPORT2_DTSEC
47 #define P_SPORT2_DTSEC P_UNDEF
50 #ifndef P_SPORT2_DTPRI
51 #define P_SPORT2_DTPRI P_UNDEF
54 #ifndef P_SPORT2_TSCLK
55 #define P_SPORT2_TSCLK P_UNDEF
59 #define P_SPORT2_RFS P_UNDEF
62 #ifndef P_SPORT2_DRSEC
63 #define P_SPORT2_DRSEC P_UNDEF
66 #ifndef P_SPORT2_DRPRI
67 #define P_SPORT2_DRPRI P_UNDEF
70 #ifndef P_SPORT2_RSCLK
71 #define P_SPORT2_RSCLK P_UNDEF
75 #define P_SPORT3_TFS P_UNDEF
78 #ifndef P_SPORT3_DTSEC
79 #define P_SPORT3_DTSEC P_UNDEF
82 #ifndef P_SPORT3_DTPRI
83 #define P_SPORT3_DTPRI P_UNDEF
86 #ifndef P_SPORT3_TSCLK
87 #define P_SPORT3_TSCLK P_UNDEF
91 #define P_SPORT3_RFS P_UNDEF
94 #ifndef P_SPORT3_DRSEC
95 #define P_SPORT3_DRSEC P_UNDEF
98 #ifndef P_SPORT3_DRPRI
99 #define P_SPORT3_DRPRI P_UNDEF
102 #ifndef P_SPORT3_RSCLK
103 #define P_SPORT3_RSCLK P_UNDEF
107 #define P_TMR4 P_UNDEF
111 #define P_TMR5 P_UNDEF
115 #define P_TMR6 P_UNDEF
119 #define P_TMR7 P_UNDEF
123 #define P_TWI1_SCL P_UNDEF
127 #define P_TWI1_SDA P_UNDEF
131 #define P_UART3_RTS P_UNDEF
135 #define P_UART3_CTS P_UNDEF
139 #define P_UART2_TX P_UNDEF
143 #define P_UART2_RX P_UNDEF
147 #define P_UART3_TX P_UNDEF
151 #define P_UART3_RX P_UNDEF
155 #define P_SPI2_SS P_UNDEF
159 #define P_SPI2_SSEL1 P_UNDEF
163 #define P_SPI2_SSEL2 P_UNDEF
167 #define P_SPI2_SSEL3 P_UNDEF
171 #define P_SPI2_SSEL4 P_UNDEF
175 #define P_SPI2_SSEL5 P_UNDEF
179 #define P_SPI2_SSEL6 P_UNDEF
183 #define P_SPI2_SSEL7 P_UNDEF
187 #define P_SPI2_SCK P_UNDEF
191 #define P_SPI2_MOSI P_UNDEF
195 #define P_SPI2_MISO P_UNDEF
199 #define P_TMR0 P_UNDEF
203 #define P_TMR1 P_UNDEF
207 #define P_TMR2 P_UNDEF
211 #define P_TMR3 P_UNDEF
215 #define P_SPORT0_TFS P_UNDEF
218 #ifndef P_SPORT0_DTSEC
219 #define P_SPORT0_DTSEC P_UNDEF
222 #ifndef P_SPORT0_DTPRI
223 #define P_SPORT0_DTPRI P_UNDEF
226 #ifndef P_SPORT0_TSCLK
227 #define P_SPORT0_TSCLK P_UNDEF
231 #define P_SPORT0_RFS P_UNDEF
234 #ifndef P_SPORT0_DRSEC
235 #define P_SPORT0_DRSEC P_UNDEF
238 #ifndef P_SPORT0_DRPRI
239 #define P_SPORT0_DRPRI P_UNDEF
242 #ifndef P_SPORT0_RSCLK
243 #define P_SPORT0_RSCLK P_UNDEF
247 #define P_SD_D0 P_UNDEF
251 #define P_SD_D1 P_UNDEF
255 #define P_SD_D2 P_UNDEF
259 #define P_SD_D3 P_UNDEF
263 #define P_SD_CLK P_UNDEF
267 #define P_SD_CMD P_UNDEF
271 #define P_MMCLK P_UNDEF
275 #define P_MBCLK P_UNDEF
279 #define P_PPI1_D0 P_UNDEF
283 #define P_PPI1_D1 P_UNDEF
287 #define P_PPI1_D2 P_UNDEF
291 #define P_PPI1_D3 P_UNDEF
295 #define P_PPI1_D4 P_UNDEF
299 #define P_PPI1_D5 P_UNDEF
303 #define P_PPI1_D6 P_UNDEF
307 #define P_PPI1_D7 P_UNDEF
311 #define P_PPI1_D8 P_UNDEF
315 #define P_PPI1_D9 P_UNDEF
319 #define P_PPI1_D10 P_UNDEF
323 #define P_PPI1_D11 P_UNDEF
327 #define P_PPI1_D12 P_UNDEF
331 #define P_PPI1_D13 P_UNDEF
335 #define P_PPI1_D14 P_UNDEF
339 #define P_PPI1_D15 P_UNDEF
343 #define P_HOST_D8 P_UNDEF
347 #define P_HOST_D9 P_UNDEF
351 #define P_HOST_D10 P_UNDEF
355 #define P_HOST_D11 P_UNDEF
359 #define P_HOST_D12 P_UNDEF
363 #define P_HOST_D13 P_UNDEF
367 #define P_HOST_D14 P_UNDEF
371 #define P_HOST_D15 P_UNDEF
375 #define P_HOST_D0 P_UNDEF
379 #define P_HOST_D1 P_UNDEF
383 #define P_HOST_D2 P_UNDEF
387 #define P_HOST_D3 P_UNDEF
391 #define P_HOST_D4 P_UNDEF
395 #define P_HOST_D5 P_UNDEF
399 #define P_HOST_D6 P_UNDEF
403 #define P_HOST_D7 P_UNDEF
407 #define P_SPORT1_TFS P_UNDEF
410 #ifndef P_SPORT1_DTSEC
411 #define P_SPORT1_DTSEC P_UNDEF
414 #ifndef P_SPORT1_DTPRI
415 #define P_SPORT1_DTPRI P_UNDEF
418 #ifndef P_SPORT1_TSCLK
419 #define P_SPORT1_TSCLK P_UNDEF
423 #define P_SPORT1_RFS P_UNDEF
426 #ifndef P_SPORT1_DRSEC
427 #define P_SPORT1_DRSEC P_UNDEF
430 #ifndef P_SPORT1_DRPRI
431 #define P_SPORT1_DRPRI P_UNDEF
434 #ifndef P_SPORT1_RSCLK
435 #define P_SPORT1_RSCLK P_UNDEF
439 #define P_PPI2_D0 P_UNDEF
443 #define P_PPI2_D1 P_UNDEF
447 #define P_PPI2_D2 P_UNDEF
451 #define P_PPI2_D3 P_UNDEF
455 #define P_PPI2_D4 P_UNDEF
459 #define P_PPI2_D5 P_UNDEF
463 #define P_PPI2_D6 P_UNDEF
467 #define P_PPI2_D7 P_UNDEF
471 #define P_PPI0_D18 P_UNDEF
475 #define P_PPI0_D19 P_UNDEF
479 #define P_PPI0_D20 P_UNDEF
483 #define P_PPI0_D21 P_UNDEF
487 #define P_PPI0_D22 P_UNDEF
491 #define P_PPI0_D23 P_UNDEF
495 #define P_KEY_ROW0 P_UNDEF
499 #define P_KEY_ROW1 P_UNDEF
503 #define P_KEY_ROW2 P_UNDEF
507 #define P_KEY_ROW3 P_UNDEF
511 #define P_KEY_COL0 P_UNDEF
515 #define P_KEY_COL1 P_UNDEF
519 #define P_KEY_COL2 P_UNDEF
523 #define P_KEY_COL3 P_UNDEF
527 #define P_SPI0_SCK P_UNDEF
531 #define P_SPI0_MISO P_UNDEF
535 #define P_SPI0_MOSI P_UNDEF
539 #define P_SPI0_SS P_UNDEF
543 #define P_SPI0_SSEL1 P_UNDEF
547 #define P_SPI0_SSEL2 P_UNDEF
551 #define P_SPI0_SSEL3 P_UNDEF
555 #define P_SPI0_SSEL4 P_UNDEF
559 #define P_SPI0_SSEL5 P_UNDEF
563 #define P_SPI0_SSEL6 P_UNDEF
567 #define P_SPI0_SSEL7 P_UNDEF
571 #define P_UART0_TX P_UNDEF
575 #define P_UART0_RX P_UNDEF
579 #define P_UART1_RTS P_UNDEF
583 #define P_UART1_CTS P_UNDEF
587 #define P_PPI1_CLK P_UNDEF
591 #define P_PPI1_FS1 P_UNDEF
595 #define P_PPI1_FS2 P_UNDEF
599 #define P_TWI0_SCL P_UNDEF
603 #define P_TWI0_SDA P_UNDEF
607 #define P_KEY_COL7 P_UNDEF
611 #define P_KEY_ROW6 P_UNDEF
615 #define P_KEY_COL6 P_UNDEF
619 #define P_KEY_ROW5 P_UNDEF
623 #define P_KEY_COL5 P_UNDEF
627 #define P_KEY_ROW4 P_UNDEF
631 #define P_KEY_COL4 P_UNDEF
635 #define P_KEY_ROW7 P_UNDEF
639 #define P_PPI0_D0 P_UNDEF
643 #define P_PPI0_D1 P_UNDEF
647 #define P_PPI0_D2 P_UNDEF
651 #define P_PPI0_D3 P_UNDEF
655 #define P_PPI0_D4 P_UNDEF
659 #define P_PPI0_D5 P_UNDEF
663 #define P_PPI0_D6 P_UNDEF
667 #define P_PPI0_D7 P_UNDEF
671 #define P_PPI0_D8 P_UNDEF
675 #define P_PPI0_D9 P_UNDEF
679 #define P_PPI0_D10 P_UNDEF
683 #define P_PPI0_D11 P_UNDEF
687 #define P_PPI0_D12 P_UNDEF
691 #define P_PPI0_D13 P_UNDEF
695 #define P_PPI0_D14 P_UNDEF
699 #define P_PPI0_D15 P_UNDEF
703 #define P_ATAPI_D0A P_UNDEF
707 #define P_ATAPI_D1A P_UNDEF
711 #define P_ATAPI_D2A P_UNDEF
715 #define P_ATAPI_D3A P_UNDEF
719 #define P_ATAPI_D4A P_UNDEF
723 #define P_ATAPI_D5A P_UNDEF
727 #define P_ATAPI_D6A P_UNDEF
731 #define P_ATAPI_D7A P_UNDEF
735 #define P_ATAPI_D8A P_UNDEF
739 #define P_ATAPI_D9A P_UNDEF
743 #define P_ATAPI_D10A P_UNDEF
747 #define P_ATAPI_D11A P_UNDEF
751 #define P_ATAPI_D12A P_UNDEF
755 #define P_ATAPI_D13A P_UNDEF
759 #define P_ATAPI_D14A P_UNDEF
763 #define P_ATAPI_D15A P_UNDEF
767 #define P_PPI0_CLK P_UNDEF
771 #define P_PPI0_FS1 P_UNDEF
775 #define P_PPI0_FS2 P_UNDEF
779 #define P_PPI0_D16 P_UNDEF
783 #define P_PPI0_D17 P_UNDEF
787 #define P_SPI1_SSEL1 P_UNDEF
791 #define P_SPI1_SSEL2 P_UNDEF
795 #define P_SPI1_SSEL3 P_UNDEF
800 #define P_SPI1_SSEL4 P_UNDEF
804 #define P_SPI1_SSEL5 P_UNDEF
808 #define P_SPI1_SSEL6 P_UNDEF
812 #define P_SPI1_SSEL7 P_UNDEF
816 #define P_SPI1_SCK P_UNDEF
820 #define P_SPI1_MISO P_UNDEF
824 #define P_SPI1_MOSI P_UNDEF
828 #define P_SPI1_SS P_UNDEF
832 #define P_CAN0_TX P_UNDEF
836 #define P_CAN0_RX P_UNDEF
840 #define P_CAN1_TX P_UNDEF
844 #define P_CAN1_RX P_UNDEF
848 #define P_ATAPI_A0A P_UNDEF
852 #define P_ATAPI_A1A P_UNDEF
856 #define P_ATAPI_A2A P_UNDEF
860 #define P_HOST_CE P_UNDEF
864 #define P_HOST_RD P_UNDEF
868 #define P_HOST_WR P_UNDEF
872 #define P_MTXONB P_UNDEF
876 #define P_PPI2_FS2 P_UNDEF
880 #define P_PPI2_FS1 P_UNDEF
884 #define P_PPI2_CLK P_UNDEF
888 #define P_CNT_CZM P_UNDEF
892 #define P_UART1_TX P_UNDEF
896 #define P_UART1_RX P_UNDEF
899 #ifndef P_ATAPI_RESET
900 #define P_ATAPI_RESET P_UNDEF
904 #define P_HOST_ADDR P_UNDEF
908 #define P_HOST_ACK P_UNDEF
912 #define P_MTX P_UNDEF
916 #define P_MRX P_UNDEF
920 #define P_MRXONB P_UNDEF
948 #define P_PPI1_FS3 P_UNDEF
952 #define P_PPI2_FS3 P_UNDEF
956 #define P_TMR8 P_UNDEF
960 #define P_TMR9 P_UNDEF
964 #define P_TMR10 P_UNDEF
967 #define P_TMR11 P_UNDEF
971 #define P_DMAR0 P_UNDEF
975 #define P_DMAR1 P_UNDEF
979 #define P_PPI0_FS3 P_UNDEF
983 #define P_CNT_CDG P_UNDEF
987 #define P_CNT_CUD P_UNDEF
991 #define P_A10 P_UNDEF
995 #define P_A11 P_UNDEF
999 #define P_A12 P_UNDEF
1003 #define P_A13 P_UNDEF
1007 #define P_A14 P_UNDEF
1011 #define P_A15 P_UNDEF
1015 #define P_A16 P_UNDEF
1019 #define P_A17 P_UNDEF
1023 #define P_A18 P_UNDEF
1027 #define P_A19 P_UNDEF
1031 #define P_A20 P_UNDEF
1035 #define P_A21 P_UNDEF
1039 #define P_A22 P_UNDEF
1043 #define P_A23 P_UNDEF
1047 #define P_A24 P_UNDEF
1051 #define P_A25 P_UNDEF
1055 #define P_NOR_CLK P_UNDEF
1059 #define P_TMRCLK P_UNDEF
1062 #ifndef P_AMC_ARDY_NOR_WAIT
1063 #define P_AMC_ARDY_NOR_WAIT P_UNDEF
1067 #define P_NAND_CE P_UNDEF
1071 #define P_NAND_RB P_UNDEF
1074 #ifndef P_ATAPI_DIOR
1075 #define P_ATAPI_DIOR P_UNDEF
1078 #ifndef P_ATAPI_DIOW
1079 #define P_ATAPI_DIOW P_UNDEF
1083 #define P_ATAPI_CS0 P_UNDEF
1087 #define P_ATAPI_CS1 P_UNDEF
1090 #ifndef P_ATAPI_DMACK
1091 #define P_ATAPI_DMACK P_UNDEF
1094 #ifndef P_ATAPI_DMARQ
1095 #define P_ATAPI_DMARQ P_UNDEF
1098 #ifndef P_ATAPI_INTRQ
1099 #define P_ATAPI_INTRQ P_UNDEF
1102 #ifndef P_ATAPI_IORDY
1103 #define P_ATAPI_IORDY P_UNDEF
1107 #define P_AMC_BR P_UNDEF
1111 #define P_AMC_BG P_UNDEF
1115 #define P_AMC_BGH P_UNDEF
1120 #ifndef P_MII0_ETxD0
1121 #define P_MII0_ETxD0 P_UNDEF
1124 #ifndef P_MII0_ETxD1
1125 #define P_MII0_ETxD1 P_UNDEF
1128 #ifndef P_MII0_ETxD2
1129 #define P_MII0_ETxD2 P_UNDEF
1132 #ifndef P_MII0_ETxD3
1133 #define P_MII0_ETxD3 P_UNDEF
1136 #ifndef P_MII0_ETxEN
1137 #define P_MII0_ETxEN P_UNDEF
1140 #ifndef P_MII0_TxCLK
1141 #define P_MII0_TxCLK P_UNDEF
1144 #ifndef P_MII0_PHYINT
1145 #define P_MII0_PHYINT P_UNDEF
1149 #define P_MII0_COL P_UNDEF
1152 #ifndef P_MII0_ERxD0
1153 #define P_MII0_ERxD0 P_UNDEF
1156 #ifndef P_MII0_ERxD1
1157 #define P_MII0_ERxD1 P_UNDEF
1160 #ifndef P_MII0_ERxD2
1161 #define P_MII0_ERxD2 P_UNDEF
1164 #ifndef P_MII0_ERxD3
1165 #define P_MII0_ERxD3 P_UNDEF
1168 #ifndef P_MII0_ERxDV
1169 #define P_MII0_ERxDV P_UNDEF
1172 #ifndef P_MII0_ERxCLK
1173 #define P_MII0_ERxCLK P_UNDEF
1176 #ifndef P_MII0_ERxER
1177 #define P_MII0_ERxER P_UNDEF
1181 #define P_MII0_CRS P_UNDEF
1184 #ifndef P_RMII0_REF_CLK
1185 #define P_RMII0_REF_CLK P_UNDEF
1188 #ifndef P_RMII0_MDINT
1189 #define P_RMII0_MDINT P_UNDEF
1192 #ifndef P_RMII0_CRS_DV
1193 #define P_RMII0_CRS_DV P_UNDEF
1197 #define P_MDC P_UNDEF
1201 #define P_MDIO P_UNDEF
1204 #endif /* _PORTMUX_H_ */