diff options
Diffstat (limited to 'include/asm-blackfin/mach-bf548/bfin_sir.h')
-rw-r--r-- | include/asm-blackfin/mach-bf548/bfin_sir.h | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/include/asm-blackfin/mach-bf548/bfin_sir.h b/include/asm-blackfin/mach-bf548/bfin_sir.h index 5e94271c7e3b..c41f9cf00268 100644 --- a/include/asm-blackfin/mach-bf548/bfin_sir.h +++ b/include/asm-blackfin/mach-bf548/bfin_sir.h | |||
@@ -124,26 +124,43 @@ struct bfin_sir_self { | |||
124 | 124 | ||
125 | #define DRIVER_NAME "bfin_sir" | 125 | #define DRIVER_NAME "bfin_sir" |
126 | 126 | ||
127 | static void bfin_sir_hw_init(void) | 127 | static int bfin_sir_hw_init(void) |
128 | { | 128 | { |
129 | int ret = -ENODEV; | ||
129 | #ifdef CONFIG_BFIN_SIR0 | 130 | #ifdef CONFIG_BFIN_SIR0 |
130 | peripheral_request(P_UART0_TX, DRIVER_NAME); | 131 | ret = peripheral_request(P_UART0_TX, DRIVER_NAME); |
131 | peripheral_request(P_UART0_RX, DRIVER_NAME); | 132 | if (ret) |
133 | return ret; | ||
134 | ret = peripheral_request(P_UART0_RX, DRIVER_NAME); | ||
135 | if (ret) | ||
136 | return ret; | ||
132 | #endif | 137 | #endif |
133 | 138 | ||
134 | #ifdef CONFIG_BFIN_SIR1 | 139 | #ifdef CONFIG_BFIN_SIR1 |
135 | peripheral_request(P_UART1_TX, DRIVER_NAME); | 140 | ret = peripheral_request(P_UART1_TX, DRIVER_NAME); |
136 | peripheral_request(P_UART1_RX, DRIVER_NAME); | 141 | if (ret) |
142 | return ret; | ||
143 | ret = peripheral_request(P_UART1_RX, DRIVER_NAME); | ||
144 | if (ret) | ||
145 | return ret; | ||
137 | #endif | 146 | #endif |
138 | 147 | ||
139 | #ifdef CONFIG_BFIN_SIR2 | 148 | #ifdef CONFIG_BFIN_SIR2 |
140 | peripheral_request(P_UART2_TX, DRIVER_NAME); | 149 | ret = peripheral_request(P_UART2_TX, DRIVER_NAME); |
141 | peripheral_request(P_UART2_RX, DRIVER_NAME); | 150 | if (ret) |
151 | return ret; | ||
152 | ret = peripheral_request(P_UART2_RX, DRIVER_NAME); | ||
153 | if (ret) | ||
154 | return ret; | ||
142 | #endif | 155 | #endif |
143 | 156 | ||
144 | #ifdef CONFIG_BFIN_SIR3 | 157 | #ifdef CONFIG_BFIN_SIR3 |
145 | peripheral_request(P_UART3_TX, DRIVER_NAME); | 158 | ret = peripheral_request(P_UART3_TX, DRIVER_NAME); |
146 | peripheral_request(P_UART3_RX, DRIVER_NAME); | 159 | if (ret) |
160 | return ret; | ||
161 | ret = peripheral_request(P_UART3_RX, DRIVER_NAME); | ||
162 | if (ret) | ||
163 | return ret; | ||
147 | #endif | 164 | #endif |
148 | SSYNC(); | 165 | return ret; |
149 | } | 166 | } |