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 #include <asm/irq_handler.h>
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) \
29 (pdev ? (IS_ERR(devm_pinctrl_get_select_default(&pdev->dev)) \
31 #define peripheral_free_list(per)
33 int peripheral_request(unsigned short per
, const char *label
);
34 void peripheral_free(unsigned short per
);
35 int peripheral_request_list(const unsigned short per
[], const char *label
);
36 void peripheral_free_list(const unsigned short per
[]);
39 #include <linux/err.h>
40 #include <linux/pinctrl/pinctrl.h>
41 #include <mach/portmux.h>
42 #include <linux/gpio.h>
45 #define P_SPORT2_TFS P_UNDEF
48 #ifndef P_SPORT2_DTSEC
49 #define P_SPORT2_DTSEC P_UNDEF
52 #ifndef P_SPORT2_DTPRI
53 #define P_SPORT2_DTPRI P_UNDEF
56 #ifndef P_SPORT2_TSCLK
57 #define P_SPORT2_TSCLK P_UNDEF
61 #define P_SPORT2_RFS P_UNDEF
64 #ifndef P_SPORT2_DRSEC
65 #define P_SPORT2_DRSEC P_UNDEF
68 #ifndef P_SPORT2_DRPRI
69 #define P_SPORT2_DRPRI P_UNDEF
72 #ifndef P_SPORT2_RSCLK
73 #define P_SPORT2_RSCLK P_UNDEF
77 #define P_SPORT3_TFS P_UNDEF
80 #ifndef P_SPORT3_DTSEC
81 #define P_SPORT3_DTSEC P_UNDEF
84 #ifndef P_SPORT3_DTPRI
85 #define P_SPORT3_DTPRI P_UNDEF
88 #ifndef P_SPORT3_TSCLK
89 #define P_SPORT3_TSCLK P_UNDEF
93 #define P_SPORT3_RFS P_UNDEF
96 #ifndef P_SPORT3_DRSEC
97 #define P_SPORT3_DRSEC P_UNDEF
100 #ifndef P_SPORT3_DRPRI
101 #define P_SPORT3_DRPRI P_UNDEF
104 #ifndef P_SPORT3_RSCLK
105 #define P_SPORT3_RSCLK P_UNDEF
109 #define P_TMR4 P_UNDEF
113 #define P_TMR5 P_UNDEF
117 #define P_TMR6 P_UNDEF
121 #define P_TMR7 P_UNDEF
125 #define P_TWI1_SCL P_UNDEF
129 #define P_TWI1_SDA P_UNDEF
133 #define P_UART3_RTS P_UNDEF
137 #define P_UART3_CTS P_UNDEF
141 #define P_UART2_TX P_UNDEF
145 #define P_UART2_RX P_UNDEF
149 #define P_UART3_TX P_UNDEF
153 #define P_UART3_RX P_UNDEF
157 #define P_SPI2_SS P_UNDEF
161 #define P_SPI2_SSEL1 P_UNDEF
165 #define P_SPI2_SSEL2 P_UNDEF
169 #define P_SPI2_SSEL3 P_UNDEF
173 #define P_SPI2_SSEL4 P_UNDEF
177 #define P_SPI2_SSEL5 P_UNDEF
181 #define P_SPI2_SSEL6 P_UNDEF
185 #define P_SPI2_SSEL7 P_UNDEF
189 #define P_SPI2_SCK P_UNDEF
193 #define P_SPI2_MOSI P_UNDEF
197 #define P_SPI2_MISO P_UNDEF
201 #define P_TMR0 P_UNDEF
205 #define P_TMR1 P_UNDEF
209 #define P_TMR2 P_UNDEF
213 #define P_TMR3 P_UNDEF
217 #define P_SPORT0_TFS P_UNDEF
220 #ifndef P_SPORT0_DTSEC
221 #define P_SPORT0_DTSEC P_UNDEF
224 #ifndef P_SPORT0_DTPRI
225 #define P_SPORT0_DTPRI P_UNDEF
228 #ifndef P_SPORT0_TSCLK
229 #define P_SPORT0_TSCLK P_UNDEF
233 #define P_SPORT0_RFS P_UNDEF
236 #ifndef P_SPORT0_DRSEC
237 #define P_SPORT0_DRSEC P_UNDEF
240 #ifndef P_SPORT0_DRPRI
241 #define P_SPORT0_DRPRI P_UNDEF
244 #ifndef P_SPORT0_RSCLK
245 #define P_SPORT0_RSCLK P_UNDEF
249 #define P_SD_D0 P_UNDEF
253 #define P_SD_D1 P_UNDEF
257 #define P_SD_D2 P_UNDEF
261 #define P_SD_D3 P_UNDEF
265 #define P_SD_CLK P_UNDEF
269 #define P_SD_CMD P_UNDEF
273 #define P_MMCLK P_UNDEF
277 #define P_MBCLK P_UNDEF
281 #define P_PPI1_D0 P_UNDEF
285 #define P_PPI1_D1 P_UNDEF
289 #define P_PPI1_D2 P_UNDEF
293 #define P_PPI1_D3 P_UNDEF
297 #define P_PPI1_D4 P_UNDEF
301 #define P_PPI1_D5 P_UNDEF
305 #define P_PPI1_D6 P_UNDEF
309 #define P_PPI1_D7 P_UNDEF
313 #define P_PPI1_D8 P_UNDEF
317 #define P_PPI1_D9 P_UNDEF
321 #define P_PPI1_D10 P_UNDEF
325 #define P_PPI1_D11 P_UNDEF
329 #define P_PPI1_D12 P_UNDEF
333 #define P_PPI1_D13 P_UNDEF
337 #define P_PPI1_D14 P_UNDEF
341 #define P_PPI1_D15 P_UNDEF
345 #define P_HOST_D8 P_UNDEF
349 #define P_HOST_D9 P_UNDEF
353 #define P_HOST_D10 P_UNDEF
357 #define P_HOST_D11 P_UNDEF
361 #define P_HOST_D12 P_UNDEF
365 #define P_HOST_D13 P_UNDEF
369 #define P_HOST_D14 P_UNDEF
373 #define P_HOST_D15 P_UNDEF
377 #define P_HOST_D0 P_UNDEF
381 #define P_HOST_D1 P_UNDEF
385 #define P_HOST_D2 P_UNDEF
389 #define P_HOST_D3 P_UNDEF
393 #define P_HOST_D4 P_UNDEF
397 #define P_HOST_D5 P_UNDEF
401 #define P_HOST_D6 P_UNDEF
405 #define P_HOST_D7 P_UNDEF
409 #define P_SPORT1_TFS P_UNDEF
412 #ifndef P_SPORT1_DTSEC
413 #define P_SPORT1_DTSEC P_UNDEF
416 #ifndef P_SPORT1_DTPRI
417 #define P_SPORT1_DTPRI P_UNDEF
420 #ifndef P_SPORT1_TSCLK
421 #define P_SPORT1_TSCLK P_UNDEF
425 #define P_SPORT1_RFS P_UNDEF
428 #ifndef P_SPORT1_DRSEC
429 #define P_SPORT1_DRSEC P_UNDEF
432 #ifndef P_SPORT1_DRPRI
433 #define P_SPORT1_DRPRI P_UNDEF
436 #ifndef P_SPORT1_RSCLK
437 #define P_SPORT1_RSCLK P_UNDEF
441 #define P_PPI2_D0 P_UNDEF
445 #define P_PPI2_D1 P_UNDEF
449 #define P_PPI2_D2 P_UNDEF
453 #define P_PPI2_D3 P_UNDEF
457 #define P_PPI2_D4 P_UNDEF
461 #define P_PPI2_D5 P_UNDEF
465 #define P_PPI2_D6 P_UNDEF
469 #define P_PPI2_D7 P_UNDEF
473 #define P_PPI0_D18 P_UNDEF
477 #define P_PPI0_D19 P_UNDEF
481 #define P_PPI0_D20 P_UNDEF
485 #define P_PPI0_D21 P_UNDEF
489 #define P_PPI0_D22 P_UNDEF
493 #define P_PPI0_D23 P_UNDEF
497 #define P_KEY_ROW0 P_UNDEF
501 #define P_KEY_ROW1 P_UNDEF
505 #define P_KEY_ROW2 P_UNDEF
509 #define P_KEY_ROW3 P_UNDEF
513 #define P_KEY_COL0 P_UNDEF
517 #define P_KEY_COL1 P_UNDEF
521 #define P_KEY_COL2 P_UNDEF
525 #define P_KEY_COL3 P_UNDEF
529 #define P_SPI0_SCK P_UNDEF
533 #define P_SPI0_MISO P_UNDEF
537 #define P_SPI0_MOSI P_UNDEF
541 #define P_SPI0_SS P_UNDEF
545 #define P_SPI0_SSEL1 P_UNDEF
549 #define P_SPI0_SSEL2 P_UNDEF
553 #define P_SPI0_SSEL3 P_UNDEF
557 #define P_SPI0_SSEL4 P_UNDEF
561 #define P_SPI0_SSEL5 P_UNDEF
565 #define P_SPI0_SSEL6 P_UNDEF
569 #define P_SPI0_SSEL7 P_UNDEF
573 #define P_UART0_TX P_UNDEF
577 #define P_UART0_RX P_UNDEF
581 #define P_UART1_RTS P_UNDEF
585 #define P_UART1_CTS P_UNDEF
589 #define P_PPI1_CLK P_UNDEF
593 #define P_PPI1_FS1 P_UNDEF
597 #define P_PPI1_FS2 P_UNDEF
601 #define P_TWI0_SCL P_UNDEF
605 #define P_TWI0_SDA P_UNDEF
609 #define P_KEY_COL7 P_UNDEF
613 #define P_KEY_ROW6 P_UNDEF
617 #define P_KEY_COL6 P_UNDEF
621 #define P_KEY_ROW5 P_UNDEF
625 #define P_KEY_COL5 P_UNDEF
629 #define P_KEY_ROW4 P_UNDEF
633 #define P_KEY_COL4 P_UNDEF
637 #define P_KEY_ROW7 P_UNDEF
641 #define P_PPI0_D0 P_UNDEF
645 #define P_PPI0_D1 P_UNDEF
649 #define P_PPI0_D2 P_UNDEF
653 #define P_PPI0_D3 P_UNDEF
657 #define P_PPI0_D4 P_UNDEF
661 #define P_PPI0_D5 P_UNDEF
665 #define P_PPI0_D6 P_UNDEF
669 #define P_PPI0_D7 P_UNDEF
673 #define P_PPI0_D8 P_UNDEF
677 #define P_PPI0_D9 P_UNDEF
681 #define P_PPI0_D10 P_UNDEF
685 #define P_PPI0_D11 P_UNDEF
689 #define P_PPI0_D12 P_UNDEF
693 #define P_PPI0_D13 P_UNDEF
697 #define P_PPI0_D14 P_UNDEF
701 #define P_PPI0_D15 P_UNDEF
705 #define P_ATAPI_D0A P_UNDEF
709 #define P_ATAPI_D1A P_UNDEF
713 #define P_ATAPI_D2A P_UNDEF
717 #define P_ATAPI_D3A P_UNDEF
721 #define P_ATAPI_D4A P_UNDEF
725 #define P_ATAPI_D5A P_UNDEF
729 #define P_ATAPI_D6A P_UNDEF
733 #define P_ATAPI_D7A P_UNDEF
737 #define P_ATAPI_D8A P_UNDEF
741 #define P_ATAPI_D9A P_UNDEF
745 #define P_ATAPI_D10A P_UNDEF
749 #define P_ATAPI_D11A P_UNDEF
753 #define P_ATAPI_D12A P_UNDEF
757 #define P_ATAPI_D13A P_UNDEF
761 #define P_ATAPI_D14A P_UNDEF
765 #define P_ATAPI_D15A P_UNDEF
769 #define P_PPI0_CLK P_UNDEF
773 #define P_PPI0_FS1 P_UNDEF
777 #define P_PPI0_FS2 P_UNDEF
781 #define P_PPI0_D16 P_UNDEF
785 #define P_PPI0_D17 P_UNDEF
789 #define P_SPI1_SSEL1 P_UNDEF
793 #define P_SPI1_SSEL2 P_UNDEF
797 #define P_SPI1_SSEL3 P_UNDEF
802 #define P_SPI1_SSEL4 P_UNDEF
806 #define P_SPI1_SSEL5 P_UNDEF
810 #define P_SPI1_SSEL6 P_UNDEF
814 #define P_SPI1_SSEL7 P_UNDEF
818 #define P_SPI1_SCK P_UNDEF
822 #define P_SPI1_MISO P_UNDEF
826 #define P_SPI1_MOSI P_UNDEF
830 #define P_SPI1_SS P_UNDEF
834 #define P_CAN0_TX P_UNDEF
838 #define P_CAN0_RX P_UNDEF
842 #define P_CAN1_TX P_UNDEF
846 #define P_CAN1_RX P_UNDEF
850 #define P_ATAPI_A0A P_UNDEF
854 #define P_ATAPI_A1A P_UNDEF
858 #define P_ATAPI_A2A P_UNDEF
862 #define P_HOST_CE P_UNDEF
866 #define P_HOST_RD P_UNDEF
870 #define P_HOST_WR P_UNDEF
874 #define P_MTXONB P_UNDEF
878 #define P_PPI2_FS2 P_UNDEF
882 #define P_PPI2_FS1 P_UNDEF
886 #define P_PPI2_CLK P_UNDEF
890 #define P_CNT_CZM P_UNDEF
894 #define P_UART1_TX P_UNDEF
898 #define P_UART1_RX P_UNDEF
901 #ifndef P_ATAPI_RESET
902 #define P_ATAPI_RESET P_UNDEF
906 #define P_HOST_ADDR P_UNDEF
910 #define P_HOST_ACK P_UNDEF
914 #define P_MTX P_UNDEF
918 #define P_MRX P_UNDEF
922 #define P_MRXONB P_UNDEF
950 #define P_PPI1_FS3 P_UNDEF
954 #define P_PPI2_FS3 P_UNDEF
958 #define P_TMR8 P_UNDEF
962 #define P_TMR9 P_UNDEF
966 #define P_TMR10 P_UNDEF
969 #define P_TMR11 P_UNDEF
973 #define P_DMAR0 P_UNDEF
977 #define P_DMAR1 P_UNDEF
981 #define P_PPI0_FS3 P_UNDEF
985 #define P_CNT_CDG P_UNDEF
989 #define P_CNT_CUD P_UNDEF
993 #define P_A10 P_UNDEF
997 #define P_A11 P_UNDEF
1001 #define P_A12 P_UNDEF
1005 #define P_A13 P_UNDEF
1009 #define P_A14 P_UNDEF
1013 #define P_A15 P_UNDEF
1017 #define P_A16 P_UNDEF
1021 #define P_A17 P_UNDEF
1025 #define P_A18 P_UNDEF
1029 #define P_A19 P_UNDEF
1033 #define P_A20 P_UNDEF
1037 #define P_A21 P_UNDEF
1041 #define P_A22 P_UNDEF
1045 #define P_A23 P_UNDEF
1049 #define P_A24 P_UNDEF
1053 #define P_A25 P_UNDEF
1057 #define P_NOR_CLK P_UNDEF
1061 #define P_TMRCLK P_UNDEF
1064 #ifndef P_AMC_ARDY_NOR_WAIT
1065 #define P_AMC_ARDY_NOR_WAIT P_UNDEF
1069 #define P_NAND_CE P_UNDEF
1073 #define P_NAND_RB P_UNDEF
1076 #ifndef P_ATAPI_DIOR
1077 #define P_ATAPI_DIOR P_UNDEF
1080 #ifndef P_ATAPI_DIOW
1081 #define P_ATAPI_DIOW P_UNDEF
1085 #define P_ATAPI_CS0 P_UNDEF
1089 #define P_ATAPI_CS1 P_UNDEF
1092 #ifndef P_ATAPI_DMACK
1093 #define P_ATAPI_DMACK P_UNDEF
1096 #ifndef P_ATAPI_DMARQ
1097 #define P_ATAPI_DMARQ P_UNDEF
1100 #ifndef P_ATAPI_INTRQ
1101 #define P_ATAPI_INTRQ P_UNDEF
1104 #ifndef P_ATAPI_IORDY
1105 #define P_ATAPI_IORDY P_UNDEF
1109 #define P_AMC_BR P_UNDEF
1113 #define P_AMC_BG P_UNDEF
1117 #define P_AMC_BGH P_UNDEF
1122 #ifndef P_MII0_ETxD0
1123 #define P_MII0_ETxD0 P_UNDEF
1126 #ifndef P_MII0_ETxD1
1127 #define P_MII0_ETxD1 P_UNDEF
1130 #ifndef P_MII0_ETxD2
1131 #define P_MII0_ETxD2 P_UNDEF
1134 #ifndef P_MII0_ETxD3
1135 #define P_MII0_ETxD3 P_UNDEF
1138 #ifndef P_MII0_ETxEN
1139 #define P_MII0_ETxEN P_UNDEF
1142 #ifndef P_MII0_TxCLK
1143 #define P_MII0_TxCLK P_UNDEF
1146 #ifndef P_MII0_PHYINT
1147 #define P_MII0_PHYINT P_UNDEF
1151 #define P_MII0_COL P_UNDEF
1154 #ifndef P_MII0_ERxD0
1155 #define P_MII0_ERxD0 P_UNDEF
1158 #ifndef P_MII0_ERxD1
1159 #define P_MII0_ERxD1 P_UNDEF
1162 #ifndef P_MII0_ERxD2
1163 #define P_MII0_ERxD2 P_UNDEF
1166 #ifndef P_MII0_ERxD3
1167 #define P_MII0_ERxD3 P_UNDEF
1170 #ifndef P_MII0_ERxDV
1171 #define P_MII0_ERxDV P_UNDEF
1174 #ifndef P_MII0_ERxCLK
1175 #define P_MII0_ERxCLK P_UNDEF
1178 #ifndef P_MII0_ERxER
1179 #define P_MII0_ERxER P_UNDEF
1183 #define P_MII0_CRS P_UNDEF
1186 #ifndef P_RMII0_REF_CLK
1187 #define P_RMII0_REF_CLK P_UNDEF
1190 #ifndef P_RMII0_MDINT
1191 #define P_RMII0_MDINT P_UNDEF
1194 #ifndef P_RMII0_CRS_DV
1195 #define P_RMII0_CRS_DV P_UNDEF
1199 #define P_MDC P_UNDEF
1203 #define P_MDIO P_UNDEF
1206 #endif /* _PORTMUX_H_ */