Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: orion5x: Refactor mpp code to use common orion platform mpp.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>

authored by

Andrew Lunn and committed by
Nicolas Pitre
554cdaef b2f427a1

+614 -680
+22 -22
arch/arm/mach-orion5x/d2net-setup.c
··· 267 267 * General Setup 268 268 ****************************************************************************/ 269 269 270 - static struct orion5x_mpp_mode d2net_mpp_modes[] __initdata = { 271 - { 0, MPP_GPIO }, /* Board ID (bit 0) */ 272 - { 1, MPP_GPIO }, /* Board ID (bit 1) */ 273 - { 2, MPP_GPIO }, /* Board ID (bit 2) */ 274 - { 3, MPP_GPIO }, /* SATA 0 power */ 275 - { 4, MPP_UNUSED }, 276 - { 5, MPP_GPIO }, /* Fan fail detection */ 277 - { 6, MPP_GPIO }, /* Red front LED */ 278 - { 7, MPP_UNUSED }, 279 - { 8, MPP_GPIO }, /* Rear power switch (on|auto) */ 280 - { 9, MPP_GPIO }, /* Rear power switch (auto|off) */ 281 - { 10, MPP_UNUSED }, 282 - { 11, MPP_UNUSED }, 283 - { 12, MPP_GPIO }, /* SATA 1 power */ 284 - { 13, MPP_UNUSED }, 285 - { 14, MPP_SATA_LED }, /* SATA 0 active */ 286 - { 15, MPP_SATA_LED }, /* SATA 1 active */ 287 - { 16, MPP_GPIO }, /* Blue front LED blink control */ 288 - { 17, MPP_UNUSED }, 289 - { 18, MPP_GPIO }, /* Front button (0 = Released, 1 = Pushed ) */ 290 - { 19, MPP_UNUSED }, 291 - { -1 } 270 + static unsigned int d2net_mpp_modes[] __initdata = { 271 + MPP0_GPIO, /* Board ID (bit 0) */ 272 + MPP1_GPIO, /* Board ID (bit 1) */ 273 + MPP2_GPIO, /* Board ID (bit 2) */ 274 + MPP3_GPIO, /* SATA 0 power */ 275 + MPP4_UNUSED, 276 + MPP5_GPIO, /* Fan fail detection */ 277 + MPP6_GPIO, /* Red front LED */ 278 + MPP7_UNUSED, 279 + MPP8_GPIO, /* Rear power switch (on|auto) */ 280 + MPP9_GPIO, /* Rear power switch (auto|off) */ 281 + MPP10_UNUSED, 282 + MPP11_UNUSED, 283 + MPP12_GPIO, /* SATA 1 power */ 284 + MPP13_UNUSED, 285 + MPP14_SATA_LED, /* SATA 0 active */ 286 + MPP15_SATA_LED, /* SATA 1 active */ 287 + MPP16_GPIO, /* Blue front LED blink control */ 288 + MPP17_UNUSED, 289 + MPP18_GPIO, /* Front button (0 = Released, 1 = Pushed ) */ 290 + MPP19_UNUSED, 291 + 0, 292 292 /* 22: USB port 1 fuse (0 = Fail, 1 = Ok) */ 293 293 /* 23: Blue front LED off */ 294 294 /* 24: Inhibit board power off (0 = Disabled, 1 = Enabled) */
+22 -22
arch/arm/mach-orion5x/db88f5281-setup.c
··· 298 298 /***************************************************************************** 299 299 * General Setup 300 300 ****************************************************************************/ 301 - static struct orion5x_mpp_mode db88f5281_mpp_modes[] __initdata = { 302 - { 0, MPP_GPIO }, /* USB Over Current */ 303 - { 1, MPP_GPIO }, /* USB Vbat input */ 304 - { 2, MPP_PCI_ARB }, /* PCI_REQn[2] */ 305 - { 3, MPP_PCI_ARB }, /* PCI_GNTn[2] */ 306 - { 4, MPP_PCI_ARB }, /* PCI_REQn[3] */ 307 - { 5, MPP_PCI_ARB }, /* PCI_GNTn[3] */ 308 - { 6, MPP_GPIO }, /* JP0, CON17.2 */ 309 - { 7, MPP_GPIO }, /* JP1, CON17.1 */ 310 - { 8, MPP_GPIO }, /* JP2, CON11.2 */ 311 - { 9, MPP_GPIO }, /* JP3, CON11.3 */ 312 - { 10, MPP_GPIO }, /* RTC int */ 313 - { 11, MPP_GPIO }, /* Baud Rate Generator */ 314 - { 12, MPP_GPIO }, /* PCI int 1 */ 315 - { 13, MPP_GPIO }, /* PCI int 2 */ 316 - { 14, MPP_NAND }, /* NAND_REn[2] */ 317 - { 15, MPP_NAND }, /* NAND_WEn[2] */ 318 - { 16, MPP_UART }, /* UART1_RX */ 319 - { 17, MPP_UART }, /* UART1_TX */ 320 - { 18, MPP_UART }, /* UART1_CTSn */ 321 - { 19, MPP_UART }, /* UART1_RTSn */ 322 - { -1 }, 301 + static unsigned int db88f5281_mpp_modes[] __initdata = { 302 + MPP0_GPIO, /* USB Over Current */ 303 + MPP1_GPIO, /* USB Vbat input */ 304 + MPP2_PCI_ARB, /* PCI_REQn[2] */ 305 + MPP3_PCI_ARB, /* PCI_GNTn[2] */ 306 + MPP4_PCI_ARB, /* PCI_REQn[3] */ 307 + MPP5_PCI_ARB, /* PCI_GNTn[3] */ 308 + MPP6_GPIO, /* JP0, CON17.2 */ 309 + MPP7_GPIO, /* JP1, CON17.1 */ 310 + MPP8_GPIO, /* JP2, CON11.2 */ 311 + MPP9_GPIO, /* JP3, CON11.3 */ 312 + MPP10_GPIO, /* RTC int */ 313 + MPP11_GPIO, /* Baud Rate Generator */ 314 + MPP12_GPIO, /* PCI int 1 */ 315 + MPP13_GPIO, /* PCI int 2 */ 316 + MPP14_NAND, /* NAND_REn[2] */ 317 + MPP15_NAND, /* NAND_WEn[2] */ 318 + MPP16_UART, /* UART1_RX */ 319 + MPP17_UART, /* UART1_TX */ 320 + MPP18_UART, /* UART1_CTSn */ 321 + MPP19_UART, /* UART1_RTSn */ 322 + 0, 323 323 }; 324 324 325 325 static void __init db88f5281_init(void)
+66 -66
arch/arm/mach-orion5x/dns323-setup.c
··· 385 385 /**************************************************************************** 386 386 * General Setup 387 387 */ 388 - static struct orion5x_mpp_mode dns323a_mpp_modes[] __initdata = { 389 - { 0, MPP_PCIE_RST_OUTn }, 390 - { 1, MPP_GPIO }, /* right amber LED (sata ch0) */ 391 - { 2, MPP_GPIO }, /* left amber LED (sata ch1) */ 392 - { 3, MPP_UNUSED }, 393 - { 4, MPP_GPIO }, /* power button LED */ 394 - { 5, MPP_GPIO }, /* power button LED */ 395 - { 6, MPP_GPIO }, /* GMT G751-2f overtemp */ 396 - { 7, MPP_GPIO }, /* M41T80 nIRQ/OUT/SQW */ 397 - { 8, MPP_GPIO }, /* triggers power off */ 398 - { 9, MPP_GPIO }, /* power button switch */ 399 - { 10, MPP_GPIO }, /* reset button switch */ 400 - { 11, MPP_UNUSED }, 401 - { 12, MPP_UNUSED }, 402 - { 13, MPP_UNUSED }, 403 - { 14, MPP_UNUSED }, 404 - { 15, MPP_UNUSED }, 405 - { 16, MPP_UNUSED }, 406 - { 17, MPP_UNUSED }, 407 - { 18, MPP_UNUSED }, 408 - { 19, MPP_UNUSED }, 409 - { -1 }, 388 + static unsigned int dns323a_mpp_modes[] __initdata = { 389 + MPP0_PCIE_RST_OUTn, 390 + MPP1_GPIO, /* right amber LED (sata ch0) */ 391 + MPP2_GPIO, /* left amber LED (sata ch1) */ 392 + MPP3_UNUSED, 393 + MPP4_GPIO, /* power button LED */ 394 + MPP5_GPIO, /* power button LED */ 395 + MPP6_GPIO, /* GMT G751-2f overtemp */ 396 + MPP7_GPIO, /* M41T80 nIRQ/OUT/SQW */ 397 + MPP8_GPIO, /* triggers power off */ 398 + MPP9_GPIO, /* power button switch */ 399 + MPP10_GPIO, /* reset button switch */ 400 + MPP11_UNUSED, 401 + MPP12_UNUSED, 402 + MPP13_UNUSED, 403 + MPP14_UNUSED, 404 + MPP15_UNUSED, 405 + MPP16_UNUSED, 406 + MPP17_UNUSED, 407 + MPP18_UNUSED, 408 + MPP19_UNUSED, 409 + 0, 410 410 }; 411 411 412 - static struct orion5x_mpp_mode dns323b_mpp_modes[] __initdata = { 413 - { 0, MPP_UNUSED }, 414 - { 1, MPP_GPIO }, /* right amber LED (sata ch0) */ 415 - { 2, MPP_GPIO }, /* left amber LED (sata ch1) */ 416 - { 3, MPP_GPIO }, /* system up flag */ 417 - { 4, MPP_GPIO }, /* power button LED */ 418 - { 5, MPP_GPIO }, /* power button LED */ 419 - { 6, MPP_GPIO }, /* GMT G751-2f overtemp */ 420 - { 7, MPP_GPIO }, /* M41T80 nIRQ/OUT/SQW */ 421 - { 8, MPP_GPIO }, /* triggers power off */ 422 - { 9, MPP_GPIO }, /* power button switch */ 423 - { 10, MPP_GPIO }, /* reset button switch */ 424 - { 11, MPP_UNUSED }, 425 - { 12, MPP_SATA_LED }, 426 - { 13, MPP_SATA_LED }, 427 - { 14, MPP_SATA_LED }, 428 - { 15, MPP_SATA_LED }, 429 - { 16, MPP_UNUSED }, 430 - { 17, MPP_UNUSED }, 431 - { 18, MPP_UNUSED }, 432 - { 19, MPP_UNUSED }, 433 - { -1 }, 412 + static unsigned int dns323b_mpp_modes[] __initdata = { 413 + MPP0_UNUSED, 414 + MPP1_GPIO, /* right amber LED (sata ch0) */ 415 + MPP2_GPIO, /* left amber LED (sata ch1) */ 416 + MPP3_GPIO, /* system up flag */ 417 + MPP4_GPIO, /* power button LED */ 418 + MPP5_GPIO, /* power button LED */ 419 + MPP6_GPIO, /* GMT G751-2f overtemp */ 420 + MPP7_GPIO, /* M41T80 nIRQ/OUT/SQW */ 421 + MPP8_GPIO, /* triggers power off */ 422 + MPP9_GPIO, /* power button switch */ 423 + MPP10_GPIO, /* reset button switch */ 424 + MPP11_UNUSED, 425 + MPP12_SATA_LED, 426 + MPP13_SATA_LED, 427 + MPP14_SATA_LED, 428 + MPP15_SATA_LED, 429 + MPP16_UNUSED, 430 + MPP17_UNUSED, 431 + MPP18_UNUSED, 432 + MPP19_UNUSED, 433 + 0, 434 434 }; 435 435 436 - static struct orion5x_mpp_mode dns323c_mpp_modes[] __initdata = { 437 - { 0, MPP_GPIO }, /* ? input */ 438 - { 1, MPP_GPIO }, /* input power switch (0 = pressed) */ 439 - { 2, MPP_GPIO }, /* output power off */ 440 - { 3, MPP_UNUSED }, /* ? output */ 441 - { 4, MPP_UNUSED }, /* ? output */ 442 - { 5, MPP_UNUSED }, /* ? output */ 443 - { 6, MPP_UNUSED }, /* ? output */ 444 - { 7, MPP_UNUSED }, /* ? output */ 445 - { 8, MPP_GPIO }, /* i/o right amber LED */ 446 - { 9, MPP_GPIO }, /* i/o left amber LED */ 447 - { 10, MPP_GPIO }, /* input */ 448 - { 11, MPP_UNUSED }, 449 - { 12, MPP_SATA_LED }, 450 - { 13, MPP_SATA_LED }, 451 - { 14, MPP_SATA_LED }, 452 - { 15, MPP_SATA_LED }, 453 - { 16, MPP_UNUSED }, 454 - { 17, MPP_GPIO }, /* power button LED */ 455 - { 18, MPP_GPIO }, /* fan speed bit 0 */ 456 - { 19, MPP_GPIO }, /* fan speed bit 1 */ 457 - { -1 }, 436 + static unsigned int dns323c_mpp_modes[] __initdata = { 437 + MPP0_GPIO, /* ? input */ 438 + MPP1_GPIO, /* input power switch (0 = pressed) */ 439 + MPP2_GPIO, /* output power off */ 440 + MPP3_UNUSED, /* ? output */ 441 + MPP4_UNUSED, /* ? output */ 442 + MPP5_UNUSED, /* ? output */ 443 + MPP6_UNUSED, /* ? output */ 444 + MPP7_UNUSED, /* ? output */ 445 + MPP8_GPIO, /* i/o right amber LED */ 446 + MPP9_GPIO, /* i/o left amber LED */ 447 + MPP10_GPIO, /* input */ 448 + MPP11_UNUSED, 449 + MPP12_SATA_LED, 450 + MPP13_SATA_LED, 451 + MPP14_SATA_LED, 452 + MPP15_SATA_LED, 453 + MPP16_UNUSED, 454 + MPP17_GPIO, /* power button LED */ 455 + MPP18_GPIO, /* fan speed bit 0 */ 456 + MPP19_GPIO, /* fan speed bit 1 */ 457 + 0, 458 458 }; 459 459 460 460 /* Rev C1 Fan speed notes:
+22 -22
arch/arm/mach-orion5x/edmini_v2-setup.c
··· 180 180 /***************************************************************************** 181 181 * General Setup 182 182 ****************************************************************************/ 183 - static struct orion5x_mpp_mode edminiv2_mpp_modes[] __initdata = { 184 - { 0, MPP_UNUSED }, 185 - { 1, MPP_UNUSED }, 186 - { 2, MPP_UNUSED }, 187 - { 3, MPP_GPIO }, /* RTC interrupt */ 188 - { 4, MPP_UNUSED }, 189 - { 5, MPP_UNUSED }, 190 - { 6, MPP_UNUSED }, 191 - { 7, MPP_UNUSED }, 192 - { 8, MPP_UNUSED }, 193 - { 9, MPP_UNUSED }, 194 - { 10, MPP_UNUSED }, 195 - { 11, MPP_UNUSED }, 196 - { 12, MPP_SATA_LED }, /* SATA 0 presence */ 197 - { 13, MPP_SATA_LED }, /* SATA 1 presence */ 198 - { 14, MPP_SATA_LED }, /* SATA 0 active */ 199 - { 15, MPP_SATA_LED }, /* SATA 1 active */ 183 + static unsigned int edminiv2_mpp_modes[] __initdata = { 184 + MPP0_UNUSED, 185 + MPP1_UNUSED, 186 + MPP2_UNUSED, 187 + MPP3_GPIO, /* RTC interrupt */ 188 + MPP4_UNUSED, 189 + MPP5_UNUSED, 190 + MPP6_UNUSED, 191 + MPP7_UNUSED, 192 + MPP8_UNUSED, 193 + MPP9_UNUSED, 194 + MPP10_UNUSED, 195 + MPP11_UNUSED, 196 + MPP12_SATA_LED, /* SATA 0 presence */ 197 + MPP13_SATA_LED, /* SATA 1 presence */ 198 + MPP14_SATA_LED, /* SATA 0 active */ 199 + MPP15_SATA_LED, /* SATA 1 active */ 200 200 /* 16: Power LED control (0 = On, 1 = Off) */ 201 - { 16, MPP_GPIO }, 201 + MPP16_GPIO, 202 202 /* 17: Power LED control select (0 = CPLD, 1 = GPIO16) */ 203 - { 17, MPP_GPIO }, 203 + MPP17_GPIO, 204 204 /* 18: Power button status (0 = Released, 1 = Pressed) */ 205 - { 18, MPP_GPIO }, 206 - { 19, MPP_UNUSED }, 207 - { -1 } 205 + MPP18_GPIO, 206 + MPP19_UNUSED, 207 + 0, 208 208 }; 209 209 210 210 static void __init edmini_v2_init(void)
+22 -22
arch/arm/mach-orion5x/kurobox_pro-setup.c
··· 315 315 /***************************************************************************** 316 316 * General Setup 317 317 ****************************************************************************/ 318 - static struct orion5x_mpp_mode kurobox_pro_mpp_modes[] __initdata = { 319 - { 0, MPP_UNUSED }, 320 - { 1, MPP_UNUSED }, 321 - { 2, MPP_GPIO }, /* GPIO Micon */ 322 - { 3, MPP_GPIO }, /* GPIO Rtc */ 323 - { 4, MPP_UNUSED }, 324 - { 5, MPP_UNUSED }, 325 - { 6, MPP_NAND }, /* NAND Flash REn */ 326 - { 7, MPP_NAND }, /* NAND Flash WEn */ 327 - { 8, MPP_UNUSED }, 328 - { 9, MPP_UNUSED }, 329 - { 10, MPP_UNUSED }, 330 - { 11, MPP_UNUSED }, 331 - { 12, MPP_SATA_LED }, /* SATA 0 presence */ 332 - { 13, MPP_SATA_LED }, /* SATA 1 presence */ 333 - { 14, MPP_SATA_LED }, /* SATA 0 active */ 334 - { 15, MPP_SATA_LED }, /* SATA 1 active */ 335 - { 16, MPP_UART }, /* UART1 RXD */ 336 - { 17, MPP_UART }, /* UART1 TXD */ 337 - { 18, MPP_UART }, /* UART1 CTSn */ 338 - { 19, MPP_UART }, /* UART1 RTSn */ 339 - { -1 }, 318 + static unsigned int kurobox_pro_mpp_modes[] __initdata = { 319 + MPP0_UNUSED, 320 + MPP1_UNUSED, 321 + MPP2_GPIO, /* GPIO Micon */ 322 + MPP3_GPIO, /* GPIO Rtc */ 323 + MPP4_UNUSED, 324 + MPP5_UNUSED, 325 + MPP6_NAND, /* NAND Flash REn */ 326 + MPP7_NAND, /* NAND Flash WEn */ 327 + MPP8_UNUSED, 328 + MPP9_UNUSED, 329 + MPP10_UNUSED, 330 + MPP11_UNUSED, 331 + MPP12_SATA_LED, /* SATA 0 presence */ 332 + MPP13_SATA_LED, /* SATA 1 presence */ 333 + MPP14_SATA_LED, /* SATA 0 active */ 334 + MPP15_SATA_LED, /* SATA 1 active */ 335 + MPP16_UART, /* UART1 RXD */ 336 + MPP17_UART, /* UART1 TXD */ 337 + MPP18_UART, /* UART1 CTSn */ 338 + MPP19_UART, /* UART1 RTSn */ 339 + 0, 340 340 }; 341 341 342 342 static void __init kurobox_pro_init(void)
+22 -22
arch/arm/mach-orion5x/ls-chl-setup.c
··· 251 251 * GPIO Data 252 252 ****************************************************************************/ 253 253 254 - static struct orion5x_mpp_mode lschl_mpp_modes[] __initdata = { 255 - { 0, MPP_GPIO }, /* LED POWER */ 256 - { 1, MPP_GPIO }, /* HDD POWER */ 257 - { 2, MPP_GPIO }, /* LED ALARM */ 258 - { 3, MPP_GPIO }, /* LED INFO */ 259 - { 4, MPP_UNUSED }, 260 - { 5, MPP_UNUSED }, 261 - { 6, MPP_GPIO }, /* FAN LOCK */ 262 - { 7, MPP_GPIO }, /* SW INIT */ 263 - { 8, MPP_GPIO }, /* SW POWER */ 264 - { 9, MPP_GPIO }, /* USB POWER */ 265 - { 10, MPP_GPIO }, /* SW AUTO POWER */ 266 - { 11, MPP_UNUSED }, 267 - { 12, MPP_UNUSED }, 268 - { 13, MPP_UNUSED }, 269 - { 14, MPP_GPIO }, /* FAN HIGH */ 270 - { 15, MPP_GPIO }, /* SW FUNC */ 271 - { 16, MPP_GPIO }, /* FAN LOW */ 272 - { 17, MPP_GPIO }, /* LED FUNC */ 273 - { 18, MPP_UNUSED }, 274 - { 19, MPP_UNUSED }, 275 - { -1 }, 254 + static unsigned int lschl_mpp_modes[] __initdata = { 255 + MPP0_GPIO, /* LED POWER */ 256 + MPP1_GPIO, /* HDD POWER */ 257 + MPP2_GPIO, /* LED ALARM */ 258 + MPP3_GPIO, /* LED INFO */ 259 + MPP4_UNUSED, 260 + MPP5_UNUSED, 261 + MPP6_GPIO, /* FAN LOCK */ 262 + MPP7_GPIO, /* SW INIT */ 263 + MPP8_GPIO, /* SW POWER */ 264 + MPP9_GPIO, /* USB POWER */ 265 + MPP10_GPIO, /* SW AUTO POWER */ 266 + MPP11_UNUSED, 267 + MPP12_UNUSED, 268 + MPP13_UNUSED, 269 + MPP14_GPIO, /* FAN HIGH */ 270 + MPP15_GPIO, /* SW FUNC */ 271 + MPP16_GPIO, /* FAN LOW */ 272 + MPP17_GPIO, /* LED FUNC */ 273 + MPP18_UNUSED, 274 + MPP19_UNUSED, 275 + 0, 276 276 }; 277 277 278 278 static void __init lschl_init(void)
+22 -22
arch/arm/mach-orion5x/ls_hgl-setup.c
··· 200 200 201 201 #define LS_HGL_GPIO_HDD_POWER 1 202 202 203 - static struct orion5x_mpp_mode ls_hgl_mpp_modes[] __initdata = { 204 - { 0, MPP_GPIO }, /* LED_PWR */ 205 - { 1, MPP_GPIO }, /* HDD_PWR */ 206 - { 2, MPP_GPIO }, /* LED_ALARM */ 207 - { 3, MPP_GPIO }, /* LED_INFO */ 208 - { 4, MPP_UNUSED }, 209 - { 5, MPP_UNUSED }, 210 - { 6, MPP_GPIO }, /* FAN_LCK */ 211 - { 7, MPP_GPIO }, /* INIT */ 212 - { 8, MPP_GPIO }, /* POWER */ 213 - { 9, MPP_GPIO }, /* USB_PWR */ 214 - { 10, MPP_GPIO }, /* AUTO_POWER */ 215 - { 11, MPP_UNUSED }, /* LED_ETH (dummy) */ 216 - { 12, MPP_UNUSED }, 217 - { 13, MPP_UNUSED }, 218 - { 14, MPP_UNUSED }, 219 - { 15, MPP_GPIO }, /* FUNC */ 220 - { 16, MPP_UNUSED }, 221 - { 17, MPP_GPIO }, /* LED_FUNC */ 222 - { 18, MPP_UNUSED }, 223 - { 19, MPP_UNUSED }, 224 - { -1 }, 203 + static unsigned int ls_hgl_mpp_modes[] __initdata = { 204 + MPP0_GPIO, /* LED_PWR */ 205 + MPP1_GPIO, /* HDD_PWR */ 206 + MPP2_GPIO, /* LED_ALARM */ 207 + MPP3_GPIO, /* LED_INFO */ 208 + MPP4_UNUSED, 209 + MPP5_UNUSED, 210 + MPP6_GPIO, /* FAN_LCK */ 211 + MPP7_GPIO, /* INIT */ 212 + MPP8_GPIO, /* POWER */ 213 + MPP9_GPIO, /* USB_PWR */ 214 + MPP10_GPIO, /* AUTO_POWER */ 215 + MPP11_UNUSED, /* LED_ETH (dummy) */ 216 + MPP12_UNUSED, 217 + MPP13_UNUSED, 218 + MPP14_UNUSED, 219 + MPP15_GPIO, /* FUNC */ 220 + MPP16_UNUSED, 221 + MPP17_GPIO, /* LED_FUNC */ 222 + MPP18_UNUSED, 223 + MPP19_UNUSED, 224 + 0, 225 225 }; 226 226 227 227 static void __init ls_hgl_init(void)
+22 -22
arch/arm/mach-orion5x/lsmini-setup.c
··· 201 201 #define LSMINI_GPIO_HDD_POWER0 1 202 202 #define LSMINI_GPIO_HDD_POWER1 19 203 203 204 - static struct orion5x_mpp_mode lsmini_mpp_modes[] __initdata = { 205 - { 0, MPP_UNUSED }, /* LED_RESERVE1 (unused) */ 206 - { 1, MPP_GPIO }, /* HDD_PWR */ 207 - { 2, MPP_GPIO }, /* LED_ALARM */ 208 - { 3, MPP_GPIO }, /* LED_INFO */ 209 - { 4, MPP_UNUSED }, 210 - { 5, MPP_UNUSED }, 211 - { 6, MPP_UNUSED }, 212 - { 7, MPP_UNUSED }, 213 - { 8, MPP_UNUSED }, 214 - { 9, MPP_GPIO }, /* LED_FUNC */ 215 - { 10, MPP_UNUSED }, 216 - { 11, MPP_UNUSED }, /* LED_ETH (dummy) */ 217 - { 12, MPP_UNUSED }, 218 - { 13, MPP_UNUSED }, 219 - { 14, MPP_GPIO }, /* LED_PWR */ 220 - { 15, MPP_GPIO }, /* FUNC */ 221 - { 16, MPP_GPIO }, /* USB_PWR */ 222 - { 17, MPP_GPIO }, /* AUTO_POWER */ 223 - { 18, MPP_GPIO }, /* POWER */ 224 - { 19, MPP_GPIO }, /* HDD_PWR1 */ 225 - { -1 }, 204 + static unsigned int lsmini_mpp_modes[] __initdata = { 205 + MPP0_UNUSED, /* LED_RESERVE1 (unused) */ 206 + MPP1_GPIO, /* HDD_PWR */ 207 + MPP2_GPIO, /* LED_ALARM */ 208 + MPP3_GPIO, /* LED_INFO */ 209 + MPP4_UNUSED, 210 + MPP5_UNUSED, 211 + MPP6_UNUSED, 212 + MPP7_UNUSED, 213 + MPP8_UNUSED, 214 + MPP9_GPIO, /* LED_FUNC */ 215 + MPP10_UNUSED, 216 + MPP11_UNUSED, /* LED_ETH (dummy) */ 217 + MPP12_UNUSED, 218 + MPP13_UNUSED, 219 + MPP14_GPIO, /* LED_PWR */ 220 + MPP15_GPIO, /* FUNC */ 221 + MPP16_GPIO, /* USB_PWR */ 222 + MPP17_GPIO, /* AUTO_POWER */ 223 + MPP18_GPIO, /* POWER */ 224 + MPP19_GPIO, /* HDD_PWR1 */ 225 + 0, 226 226 }; 227 227 228 228 static void __init lsmini_init(void)
+18 -138
arch/arm/mach-orion5x/mpp.c
··· 12 12 #include <linux/init.h> 13 13 #include <linux/mbus.h> 14 14 #include <linux/io.h> 15 - #include <asm/gpio.h> 16 15 #include <mach/hardware.h> 17 - #include "common.h" 16 + #include <plat/mpp.h> 18 17 #include "mpp.h" 18 + #include "common.h" 19 19 20 - static int is_5181l(void) 20 + static unsigned int __init orion5x_variant(void) 21 21 { 22 22 u32 dev; 23 23 u32 rev; 24 24 25 25 orion5x_pcie_id(&dev, &rev); 26 26 27 - return !!(dev == MV88F5181_DEV_ID && rev >= MV88F5181L_REV_A0); 27 + if (dev == MV88F5181_DEV_ID && rev >= MV88F5181L_REV_A0) 28 + return MPP_F5181_MASK; 29 + 30 + if (dev == MV88F5182_DEV_ID) 31 + return MPP_F5182_MASK; 32 + 33 + if (dev == MV88F5281_DEV_ID) 34 + return MPP_F5281_MASK; 35 + 36 + printk(KERN_ERR "MPP setup: unknown orion5x variant " 37 + "(dev %#x rev %#x)\n", dev, rev); 38 + return 0; 28 39 } 29 40 30 - static int is_5182(void) 41 + void __init orion5x_mpp_conf(unsigned int *mpp_list) 31 42 { 32 - u32 dev; 33 - u32 rev; 34 - 35 - orion5x_pcie_id(&dev, &rev); 36 - 37 - return !!(dev == MV88F5182_DEV_ID); 38 - } 39 - 40 - static int is_5281(void) 41 - { 42 - u32 dev; 43 - u32 rev; 44 - 45 - orion5x_pcie_id(&dev, &rev); 46 - 47 - return !!(dev == MV88F5281_DEV_ID); 48 - } 49 - 50 - static int __init determine_type_encoding(int mpp, enum orion5x_mpp_type type) 51 - { 52 - switch (type) { 53 - case MPP_UNUSED: 54 - case MPP_GPIO: 55 - if (mpp == 0) 56 - return 3; 57 - if (mpp >= 1 && mpp <= 15) 58 - return 0; 59 - if (mpp >= 16 && mpp <= 19) { 60 - if (is_5182()) 61 - return 5; 62 - if (type == MPP_UNUSED) 63 - return 0; 64 - } 65 - return -1; 66 - 67 - case MPP_PCIE_RST_OUTn: 68 - if (mpp == 0) 69 - return 0; 70 - return -1; 71 - 72 - case MPP_PCI_ARB: 73 - if (mpp >= 0 && mpp <= 7) 74 - return 2; 75 - return -1; 76 - 77 - case MPP_PCI_PMEn: 78 - if (mpp == 2) 79 - return 3; 80 - return -1; 81 - 82 - case MPP_GIGE: 83 - if (mpp >= 8 && mpp <= 19) 84 - return 1; 85 - return -1; 86 - 87 - case MPP_NAND: 88 - if (is_5182() || is_5281()) { 89 - if (mpp >= 4 && mpp <= 7) 90 - return 4; 91 - if (mpp >= 12 && mpp <= 17) 92 - return 4; 93 - } 94 - return -1; 95 - 96 - case MPP_PCI_CLK: 97 - if (is_5181l() && mpp >= 6 && mpp <= 7) 98 - return 5; 99 - return -1; 100 - 101 - case MPP_SATA_LED: 102 - if (is_5182()) { 103 - if (mpp >= 4 && mpp <= 7) 104 - return 5; 105 - if (mpp >= 12 && mpp <= 15) 106 - return 5; 107 - } 108 - return -1; 109 - 110 - case MPP_UART: 111 - if (mpp >= 16 && mpp <= 19) 112 - return 0; 113 - return -1; 114 - } 115 - 116 - printk(KERN_INFO "unknown MPP type %d\n", type); 117 - 118 - return -1; 119 - } 120 - 121 - void __init orion5x_mpp_conf(struct orion5x_mpp_mode *mode) 122 - { 123 - u32 mpp_0_7_ctrl = readl(MPP_0_7_CTRL); 124 - u32 mpp_8_15_ctrl = readl(MPP_8_15_CTRL); 125 - u32 mpp_16_19_ctrl = readl(MPP_16_19_CTRL); 126 - 127 - for ( ; mode->mpp >= 0; mode++) { 128 - u32 *reg; 129 - int num_type; 130 - int shift; 131 - 132 - if (mode->mpp >= 0 && mode->mpp <= 7) 133 - reg = &mpp_0_7_ctrl; 134 - else if (mode->mpp >= 8 && mode->mpp <= 15) 135 - reg = &mpp_8_15_ctrl; 136 - else if (mode->mpp >= 16 && mode->mpp <= 19) 137 - reg = &mpp_16_19_ctrl; 138 - else { 139 - printk(KERN_ERR "orion5x_mpp_conf: invalid MPP " 140 - "(%d)\n", mode->mpp); 141 - continue; 142 - } 143 - 144 - num_type = determine_type_encoding(mode->mpp, mode->type); 145 - if (num_type < 0) { 146 - printk(KERN_ERR "orion5x_mpp_conf: invalid MPP " 147 - "combination (%d, %d)\n", mode->mpp, 148 - mode->type); 149 - continue; 150 - } 151 - 152 - shift = (mode->mpp & 7) << 2; 153 - *reg &= ~(0xf << shift); 154 - *reg |= (num_type & 0xf) << shift; 155 - 156 - if (mode->type == MPP_UNUSED && (mode->mpp < 16 || is_5182())) 157 - orion_gpio_set_unused(mode->mpp); 158 - 159 - orion_gpio_set_valid(mode->mpp, !!(mode->type == MPP_GPIO)); 160 - } 161 - 162 - writel(mpp_0_7_ctrl, MPP_0_7_CTRL); 163 - writel(mpp_8_15_ctrl, MPP_8_15_CTRL); 164 - writel(mpp_16_19_ctrl, MPP_16_19_CTRL); 43 + orion_mpp_conf(mpp_list, orion5x_variant(), 44 + MPP_MAX, ORION5X_DEV_BUS_VIRT_BASE); 165 45 }
+112 -57
arch/arm/mach-orion5x/mpp.h
··· 1 1 #ifndef __ARCH_ORION5X_MPP_H 2 2 #define __ARCH_ORION5X_MPP_H 3 3 4 - enum orion5x_mpp_type { 5 - /* 6 - * This MPP is unused. 7 - */ 8 - MPP_UNUSED, 4 + #define MPP(_num, _sel, _in, _out, _F5181l, _F5182, _F5281) ( \ 5 + /* MPP number */ ((_num) & 0xff) | \ 6 + /* MPP select value */ (((_sel) & 0xf) << 8) | \ 7 + /* may be input signal */ ((!!(_in)) << 12) | \ 8 + /* may be output signal */ ((!!(_out)) << 13) | \ 9 + /* available on F5181l */ ((!!(_F5181l)) << 14) | \ 10 + /* available on F5182 */ ((!!(_F5182)) << 15) | \ 11 + /* available on F5281 */ ((!!(_F5281)) << 16)) 9 12 10 - /* 11 - * This MPP pin is used as a generic GPIO pin. Valid for 12 - * MPPs 0-15 and device bus data pins 16-31. On 5182, also 13 - * valid for MPPs 16-19. 14 - */ 15 - MPP_GPIO, 13 + /* num sel i o 5181 5182 5281 */ 16 14 17 - /* 18 - * This MPP is used as PCIe_RST_OUTn pin. Valid for 19 - * MPP 0 only. 20 - */ 21 - MPP_PCIE_RST_OUTn, 15 + #define MPP_F5181_MASK MPP(0, 0x0, 0, 0, 1, 0, 0) 16 + #define MPP_F5182_MASK MPP(0, 0x0, 0, 0, 0, 1, 0) 17 + #define MPP_F5281_MASK MPP(0, 0x0, 0, 0, 0, 0, 1) 22 18 23 - /* 24 - * This MPP is used as PCI arbiter pin (REQn/GNTn). 25 - * Valid for MPPs 0-7 only. 26 - */ 27 - MPP_PCI_ARB, 19 + #define MPP0_UNUSED MPP(0, 0x3, 0, 0, 1, 1, 1) 20 + #define MPP0_GPIO MPP(0, 0x3, 1, 1, 1, 1, 1) 21 + #define MPP0_PCIE_RST_OUTn MPP(0, 0x0, 0, 0, 1, 1, 1) 22 + #define MPP0_PCI_ARB MPP(0, 0x2, 0, 0, 1, 1, 1) 28 23 29 - /* 30 - * This MPP is used as PCI_PMEn pin. Valid for MPP 2 only. 31 - */ 32 - MPP_PCI_PMEn, 24 + #define MPP1_UNUSED MPP(1, 0x0, 0, 0, 1, 1, 1) 25 + #define MPP1_GPIO MPP(1, 0x0, 1, 1, 1, 1, 1) 26 + #define MPP1_PCI_ARB MPP(1, 0x2, 0, 0, 1, 1, 1) 33 27 34 - /* 35 - * This MPP is used as GigE half-duplex (COL, CRS) or GMII 36 - * (RXERR, CRS, TXERR, TXD[7:4], RXD[7:4]) pin. Valid for 37 - * MPPs 8-19 only. 38 - */ 39 - MPP_GIGE, 28 + #define MPP2_UNUSED MPP(2, 0x0, 0, 0, 1, 1, 1) 29 + #define MPP2_GPIO MPP(2, 0x0, 1, 1, 1, 1, 1) 30 + #define MPP2_PCI_ARB MPP(2, 0x2, 0, 0, 1, 1, 1) 31 + #define MPP2_PCI_PMEn MPP(2, 0x3, 0, 0, 1, 1, 1) 40 32 41 - /* 42 - * This MPP is used as NAND REn/WEn pin. Valid for MPPs 43 - * 4-7 and 12-17 only, and only on the 5181l/5182/5281. 44 - */ 45 - MPP_NAND, 33 + #define MPP3_UNUSED MPP(3, 0x0, 0, 0, 1, 1, 1) 34 + #define MPP3_GPIO MPP(3, 0x0, 1, 1, 1, 1, 1) 35 + #define MPP3_PCI_ARB MPP(3, 0x2, 0, 0, 1, 1, 1) 46 36 47 - /* 48 - * This MPP is used as a PCI clock output pin. Valid for 49 - * MPPs 6-7 only, and only on the 5181l. 50 - */ 51 - MPP_PCI_CLK, 37 + #define MPP4_UNUSED MPP(4, 0x0, 0, 0, 1, 1, 1) 38 + #define MPP4_GPIO MPP(4, 0x0, 1, 1, 1, 1, 1) 39 + #define MPP4_PCI_ARB MPP(4, 0x2, 0, 0, 1, 1, 1) 40 + #define MPP4_NAND MPP(4, 0x4, 0, 0, 0, 1, 1) 41 + #define MPP4_SATA_LED MPP(4, 0x5, 0, 0, 0, 1, 0) 52 42 53 - /* 54 - * This MPP is used as a SATA presence/activity LED. 55 - * Valid for MPPs 4-7 and 12-15 only, and only on the 5182. 56 - */ 57 - MPP_SATA_LED, 43 + #define MPP5_UNUSED MPP(5, 0x0, 0, 0, 1, 1, 1) 44 + #define MPP5_GPIO MPP(5, 0x0, 1, 1, 1, 1, 1) 45 + #define MPP5_PCI_ARB MPP(5, 0x2, 0, 0, 1, 1, 1) 46 + #define MPP5_NAND MPP(5, 0x4, 0, 0, 0, 1, 1) 47 + #define MPP5_SATA_LED MPP(5, 0x5, 0, 0, 0, 1, 0) 58 48 59 - /* 60 - * This MPP is used as UART1 RXD/TXD/CTSn/RTSn pin. 61 - * Valid for MPPs 16-19 only. 62 - */ 63 - MPP_UART, 64 - }; 49 + #define MPP6_UNUSED MPP(6, 0x0, 0, 0, 1, 1, 1) 50 + #define MPP6_GPIO MPP(6, 0x0, 1, 1, 1, 1, 1) 51 + #define MPP6_PCI_ARB MPP(6, 0x2, 0, 0, 1, 1, 1) 52 + #define MPP6_NAND MPP(6, 0x4, 0, 0, 0, 1, 1) 53 + #define MPP6_PCI_CLK MPP(6, 0x5, 0, 0, 1, 0, 0) 54 + #define MPP6_SATA_LED MPP(6, 0x5, 0, 0, 0, 1, 0) 65 55 66 - struct orion5x_mpp_mode { 67 - int mpp; 68 - enum orion5x_mpp_type type; 69 - }; 56 + #define MPP7_UNUSED MPP(7, 0x0, 0, 0, 1, 1, 1) 57 + #define MPP7_GPIO MPP(7, 0x0, 1, 1, 1, 1, 1) 58 + #define MPP7_PCI_ARB MPP(7, 0x2, 0, 0, 1, 1, 1) 59 + #define MPP7_NAND MPP(7, 0x4, 0, 0, 0, 1, 1) 60 + #define MPP7_PCI_CLK MPP(7, 0x5, 0, 0, 1, 0, 0) 61 + #define MPP7_SATA_LED MPP(7, 0x5, 0, 0, 0, 1, 0) 70 62 71 - void orion5x_mpp_conf(struct orion5x_mpp_mode *mode); 63 + #define MPP8_UNUSED MPP(8, 0x0, 0, 0, 1, 1, 1) 64 + #define MPP8_GPIO MPP(8, 0x0, 1, 1, 1, 1, 1) 65 + #define MPP8_GIGE MPP(8, 0x1, 0, 0, 1, 1, 1) 72 66 67 + #define MPP9_UNUSED MPP(9, 0x0, 0, 0, 1, 1, 1) 68 + #define MPP9_GPIO MPP(9, 0x0, 0, 0, 1, 1, 1) 69 + #define MPP9_GIGE MPP(9, 0x1, 1, 1, 1, 1, 1) 70 + 71 + #define MPP10_UNUSED MPP(10, 0x0, 0, 0, 1, 1, 1) 72 + #define MPP10_GPIO MPP(10, 0x0, 1, 1, 1, 1, 1) 73 + #define MPP10_GIGE MPP(10, 0x1, 0, 0, 1, 1, 1) 74 + 75 + #define MPP11_UNUSED MPP(11, 0x0, 0, 0, 1, 1, 1) 76 + #define MPP11_GPIO MPP(11, 0x0, 1, 1, 1, 1, 1) 77 + #define MPP11_GIGE MPP(11, 0x1, 0, 0, 1, 1, 1) 78 + 79 + #define MPP12_UNUSED MPP(12, 0x0, 0, 0, 1, 1, 1) 80 + #define MPP12_GPIO MPP(12, 0x0, 1, 1, 1, 1, 1) 81 + #define MPP12_GIGE MPP(12, 0x1, 0, 0, 1, 1, 1) 82 + #define MPP12_NAND MPP(12, 0x4, 0, 0, 0, 1, 1) 83 + #define MPP12_SATA_LED MPP(12, 0x5, 0, 0, 0, 1, 0) 84 + 85 + #define MPP13_UNUSED MPP(13, 0x0, 0, 0, 1, 1, 1) 86 + #define MPP13_GPIO MPP(13, 0x0, 1, 1, 1, 1, 1) 87 + #define MPP13_GIGE MPP(13, 0x1, 0, 0, 1, 1, 1) 88 + #define MPP13_NAND MPP(13, 0x4, 0, 0, 0, 1, 1) 89 + #define MPP13_SATA_LED MPP(13, 0x5, 0, 0, 0, 1, 0) 90 + 91 + #define MPP14_UNUSED MPP(14, 0x0, 0, 0, 1, 1, 1) 92 + #define MPP14_GPIO MPP(14, 0x0, 1, 1, 1, 1, 1) 93 + #define MPP14_GIGE MPP(14, 0x1, 0, 0, 1, 1, 1) 94 + #define MPP14_NAND MPP(14, 0x4, 0, 0, 0, 1, 1) 95 + #define MPP14_SATA_LED MPP(14, 0x5, 0, 0, 0, 1, 0) 96 + 97 + #define MPP15_UNUSED MPP(15, 0x0, 0, 0, 1, 1, 1) 98 + #define MPP15_GPIO MPP(15, 0x0, 1, 1, 1, 1, 1) 99 + #define MPP15_GIGE MPP(15, 0x1, 0, 0, 1, 1, 1) 100 + #define MPP15_NAND MPP(15, 0x4, 0, 0, 0, 1, 1) 101 + #define MPP15_SATA_LED MPP(15, 0x5, 0, 0, 0, 1, 0) 102 + 103 + #define MPP16_UNUSED MPP(16, 0x0, 0, 0, 1, 1, 1) 104 + #define MPP16_GPIO MPP(16, 0x5, 1, 1, 0, 1, 0) 105 + #define MPP16_GIGE MPP(16, 0x1, 0, 0, 1, 1, 1) 106 + #define MPP16_NAND MPP(16, 0x4, 0, 0, 0, 1, 1) 107 + #define MPP16_UART MPP(16, 0x0, 0, 0, 0, 1, 1) 108 + 109 + #define MPP17_UNUSED MPP(17, 0x0, 0, 0, 1, 1, 1) 110 + #define MPP17_GPIO MPP(17, 0x5, 1, 1, 0, 1, 0) 111 + #define MPP17_GIGE MPP(17, 0x1, 0, 0, 1, 1, 1) 112 + #define MPP17_NAND MPP(17, 0x4, 0, 0, 0, 1, 1) 113 + #define MPP17_UART MPP(17, 0x0, 0, 0, 0, 1, 1) 114 + 115 + #define MPP18_UNUSED MPP(18, 0x0, 0, 0, 1, 1, 1) 116 + #define MPP18_GPIO MPP(18, 0x5, 1, 1, 0, 1, 0) 117 + #define MPP18_GIGE MPP(18, 0x1, 0, 0, 1, 1, 1) 118 + #define MPP18_UART MPP(18, 0x0, 0, 0, 0, 1, 1) 119 + 120 + #define MPP19_UNUSED MPP(19, 0x0, 0, 0, 1, 1, 1) 121 + #define MPP19_GPIO MPP(19, 0x5, 1, 1, 0, 1, 0) 122 + #define MPP19_GIGE MPP(19, 0x1, 0, 0, 1, 1, 1) 123 + #define MPP19_UART MPP(19, 0x0, 0, 0, 0, 1, 1) 124 + 125 + #define MPP_MAX 19 126 + 127 + void orion5x_mpp_conf(unsigned int *mpp_list); 73 128 74 129 #endif
+22 -22
arch/arm/mach-orion5x/mss2-setup.c
··· 193 193 /**************************************************************************** 194 194 * General Setup 195 195 ****************************************************************************/ 196 - static struct orion5x_mpp_mode mss2_mpp_modes[] __initdata = { 197 - { 0, MPP_GPIO }, /* Power LED */ 198 - { 1, MPP_GPIO }, /* Error LED */ 199 - { 2, MPP_UNUSED }, 200 - { 3, MPP_GPIO }, /* RTC interrupt */ 201 - { 4, MPP_GPIO }, /* HDD ind. (Single/Dual)*/ 202 - { 5, MPP_GPIO }, /* HD0 5V control */ 203 - { 6, MPP_GPIO }, /* HD0 12V control */ 204 - { 7, MPP_GPIO }, /* HD1 5V control */ 205 - { 8, MPP_GPIO }, /* HD1 12V control */ 206 - { 9, MPP_UNUSED }, 207 - { 10, MPP_GPIO }, /* Fan control */ 208 - { 11, MPP_GPIO }, /* Power button */ 209 - { 12, MPP_GPIO }, /* Reset button */ 210 - { 13, MPP_UNUSED }, 211 - { 14, MPP_SATA_LED }, /* SATA 0 active */ 212 - { 15, MPP_SATA_LED }, /* SATA 1 active */ 213 - { 16, MPP_UNUSED }, 214 - { 17, MPP_UNUSED }, 215 - { 18, MPP_UNUSED }, 216 - { 19, MPP_UNUSED }, 217 - { -1 }, 196 + static unsigned int mss2_mpp_modes[] __initdata = { 197 + MPP0_GPIO, /* Power LED */ 198 + MPP1_GPIO, /* Error LED */ 199 + MPP2_UNUSED, 200 + MPP3_GPIO, /* RTC interrupt */ 201 + MPP4_GPIO, /* HDD ind. (Single/Dual)*/ 202 + MPP5_GPIO, /* HD0 5V control */ 203 + MPP6_GPIO, /* HD0 12V control */ 204 + MPP7_GPIO, /* HD1 5V control */ 205 + MPP8_GPIO, /* HD1 12V control */ 206 + MPP9_UNUSED, 207 + MPP10_GPIO, /* Fan control */ 208 + MPP11_GPIO, /* Power button */ 209 + MPP12_GPIO, /* Reset button */ 210 + MPP13_UNUSED, 211 + MPP14_SATA_LED, /* SATA 0 active */ 212 + MPP15_SATA_LED, /* SATA 1 active */ 213 + MPP16_UNUSED, 214 + MPP17_UNUSED, 215 + MPP18_UNUSED, 216 + MPP19_UNUSED, 217 + 0, 218 218 }; 219 219 220 220 static void __init mss2_init(void)
+22 -22
arch/arm/mach-orion5x/mv2120-setup.c
··· 108 108 /**************************************************************************** 109 109 * General Setup 110 110 ****************************************************************************/ 111 - static struct orion5x_mpp_mode mv2120_mpp_modes[] __initdata = { 112 - { 0, MPP_GPIO }, /* Sys status LED */ 113 - { 1, MPP_GPIO }, /* Sys error LED */ 114 - { 2, MPP_GPIO }, /* OverTemp interrupt */ 115 - { 3, MPP_GPIO }, /* RTC interrupt */ 116 - { 4, MPP_GPIO }, /* V_LED 5V */ 117 - { 5, MPP_GPIO }, /* V_LED 3.3V */ 118 - { 6, MPP_UNUSED }, 119 - { 7, MPP_UNUSED }, 120 - { 8, MPP_GPIO }, /* SATA 0 fail LED */ 121 - { 9, MPP_GPIO }, /* SATA 1 fail LED */ 122 - { 10, MPP_UNUSED }, 123 - { 11, MPP_UNUSED }, 124 - { 12, MPP_SATA_LED }, /* SATA 0 presence */ 125 - { 13, MPP_SATA_LED }, /* SATA 1 presence */ 126 - { 14, MPP_SATA_LED }, /* SATA 0 active */ 127 - { 15, MPP_SATA_LED }, /* SATA 1 active */ 128 - { 16, MPP_UNUSED }, 129 - { 17, MPP_GPIO }, /* Reset button */ 130 - { 18, MPP_GPIO }, /* Power button */ 131 - { 19, MPP_GPIO }, /* Power off */ 132 - { -1 }, 111 + static unsigned int mv2120_mpp_modes[] __initdata = { 112 + MPP0_GPIO, /* Sys status LED */ 113 + MPP1_GPIO, /* Sys error LED */ 114 + MPP2_GPIO, /* OverTemp interrupt */ 115 + MPP3_GPIO, /* RTC interrupt */ 116 + MPP4_GPIO, /* V_LED 5V */ 117 + MPP5_GPIO, /* V_LED 3.3V */ 118 + MPP6_UNUSED, 119 + MPP7_UNUSED, 120 + MPP8_GPIO, /* SATA 0 fail LED */ 121 + MPP9_GPIO, /* SATA 1 fail LED */ 122 + MPP10_UNUSED, 123 + MPP11_UNUSED, 124 + MPP12_SATA_LED, /* SATA 0 presence */ 125 + MPP13_SATA_LED, /* SATA 1 presence */ 126 + MPP14_SATA_LED, /* SATA 0 active */ 127 + MPP15_SATA_LED, /* SATA 1 active */ 128 + MPP16_UNUSED, 129 + MPP17_GPIO, /* Reset button */ 130 + MPP18_GPIO, /* Power button */ 131 + MPP19_GPIO, /* Power off */ 132 + 0, 133 133 }; 134 134 135 135 static struct i2c_board_info __initdata mv2120_i2c_rtc = {
+22 -22
arch/arm/mach-orion5x/net2big-setup.c
··· 339 339 * General Setup 340 340 ****************************************************************************/ 341 341 342 - static struct orion5x_mpp_mode net2big_mpp_modes[] __initdata = { 343 - { 0, MPP_GPIO }, /* Raid mode (bit 0) */ 344 - { 1, MPP_GPIO }, /* USB port 2 fuse (0 = Fail, 1 = Ok) */ 345 - { 2, MPP_GPIO }, /* Raid mode (bit 1) */ 346 - { 3, MPP_GPIO }, /* Board ID (bit 0) */ 347 - { 4, MPP_GPIO }, /* Fan activity (0 = Off, 1 = On) */ 348 - { 5, MPP_GPIO }, /* Fan fail detection */ 349 - { 6, MPP_GPIO }, /* Red front LED (0 = Off, 1 = On) */ 350 - { 7, MPP_GPIO }, /* Disable initial blinking on front LED */ 351 - { 8, MPP_GPIO }, /* Rear power switch (on|auto) */ 352 - { 9, MPP_GPIO }, /* Rear power switch (auto|off) */ 353 - { 10, MPP_GPIO }, /* SATA 1 red LED (0 = Off, 1 = On) */ 354 - { 11, MPP_GPIO }, /* SATA 0 red LED (0 = Off, 1 = On) */ 355 - { 12, MPP_GPIO }, /* Board ID (bit 1) */ 356 - { 13, MPP_GPIO }, /* SATA 1 blue LED blink control */ 357 - { 14, MPP_SATA_LED }, 358 - { 15, MPP_SATA_LED }, 359 - { 16, MPP_GPIO }, /* Blue front LED control */ 360 - { 17, MPP_GPIO }, /* SATA 0 blue LED blink control */ 361 - { 18, MPP_GPIO }, /* Front button (0 = Released, 1 = Pushed ) */ 362 - { 19, MPP_GPIO }, /* SATA{0,1} power On/Off request */ 363 - { -1 } 342 + static unsigned int net2big_mpp_modes[] __initdata = { 343 + MPP0_GPIO, /* Raid mode (bit 0) */ 344 + MPP1_GPIO, /* USB port 2 fuse (0 = Fail, 1 = Ok) */ 345 + MPP2_GPIO, /* Raid mode (bit 1) */ 346 + MPP3_GPIO, /* Board ID (bit 0) */ 347 + MPP4_GPIO, /* Fan activity (0 = Off, 1 = On) */ 348 + MPP5_GPIO, /* Fan fail detection */ 349 + MPP6_GPIO, /* Red front LED (0 = Off, 1 = On) */ 350 + MPP7_GPIO, /* Disable initial blinking on front LED */ 351 + MPP8_GPIO, /* Rear power switch (on|auto) */ 352 + MPP9_GPIO, /* Rear power switch (auto|off) */ 353 + MPP10_GPIO, /* SATA 1 red LED (0 = Off, 1 = On) */ 354 + MPP11_GPIO, /* SATA 0 red LED (0 = Off, 1 = On) */ 355 + MPP12_GPIO, /* Board ID (bit 1) */ 356 + MPP13_GPIO, /* SATA 1 blue LED blink control */ 357 + MPP14_SATA_LED, 358 + MPP15_SATA_LED, 359 + MPP16_GPIO, /* Blue front LED control */ 360 + MPP17_GPIO, /* SATA 0 blue LED blink control */ 361 + MPP18_GPIO, /* Front button (0 = Released, 1 = Pushed ) */ 362 + MPP19_GPIO, /* SATA{0,1} power On/Off request */ 363 + 0, 364 364 /* 22: USB port 1 fuse (0 = Fail, 1 = Ok) */ 365 365 /* 23: SATA 0 power status */ 366 366 /* 24: Board power off */
+22 -22
arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
··· 64 64 /***************************************************************************** 65 65 * General Setup 66 66 ****************************************************************************/ 67 - static struct orion5x_mpp_mode rd88f5181l_fxo_mpp_modes[] __initdata = { 68 - { 0, MPP_GPIO }, /* LED1 CardBus LED (front panel) */ 69 - { 1, MPP_GPIO }, /* PCI_intA */ 70 - { 2, MPP_GPIO }, /* Hard Reset / Factory Init*/ 71 - { 3, MPP_GPIO }, /* FXS or DAA select */ 72 - { 4, MPP_GPIO }, /* LED6 - phone LED (front panel) */ 73 - { 5, MPP_GPIO }, /* LED5 - phone LED (front panel) */ 74 - { 6, MPP_PCI_CLK }, /* CPU PCI refclk */ 75 - { 7, MPP_PCI_CLK }, /* PCI/PCIe refclk */ 76 - { 8, MPP_GPIO }, /* CardBus reset */ 77 - { 9, MPP_GPIO }, /* GE_RXERR */ 78 - { 10, MPP_GPIO }, /* LED2 MiniPCI LED (front panel) */ 79 - { 11, MPP_GPIO }, /* Lifeline control */ 80 - { 12, MPP_GIGE }, /* GE_TXD[4] */ 81 - { 13, MPP_GIGE }, /* GE_TXD[5] */ 82 - { 14, MPP_GIGE }, /* GE_TXD[6] */ 83 - { 15, MPP_GIGE }, /* GE_TXD[7] */ 84 - { 16, MPP_GIGE }, /* GE_RXD[4] */ 85 - { 17, MPP_GIGE }, /* GE_RXD[5] */ 86 - { 18, MPP_GIGE }, /* GE_RXD[6] */ 87 - { 19, MPP_GIGE }, /* GE_RXD[7] */ 88 - { -1 }, 67 + static unsigned int rd88f5181l_fxo_mpp_modes[] __initdata = { 68 + MPP0_GPIO, /* LED1 CardBus LED (front panel) */ 69 + MPP1_GPIO, /* PCI_intA */ 70 + MPP2_GPIO, /* Hard Reset / Factory Init*/ 71 + MPP3_GPIO, /* FXS or DAA select */ 72 + MPP4_GPIO, /* LED6 - phone LED (front panel) */ 73 + MPP5_GPIO, /* LED5 - phone LED (front panel) */ 74 + MPP6_PCI_CLK, /* CPU PCI refclk */ 75 + MPP7_PCI_CLK, /* PCI/PCIe refclk */ 76 + MPP8_GPIO, /* CardBus reset */ 77 + MPP9_GPIO, /* GE_RXERR */ 78 + MPP10_GPIO, /* LED2 MiniPCI LED (front panel) */ 79 + MPP11_GPIO, /* Lifeline control */ 80 + MPP12_GIGE, /* GE_TXD[4] */ 81 + MPP13_GIGE, /* GE_TXD[5] */ 82 + MPP14_GIGE, /* GE_TXD[6] */ 83 + MPP15_GIGE, /* GE_TXD[7] */ 84 + MPP16_GIGE, /* GE_RXD[4] */ 85 + MPP17_GIGE, /* GE_RXD[5] */ 86 + MPP18_GIGE, /* GE_RXD[6] */ 87 + MPP19_GIGE, /* GE_RXD[7] */ 88 + 0, 89 89 }; 90 90 91 91 static struct mv643xx_eth_platform_data rd88f5181l_fxo_eth_data = {
+22 -22
arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
··· 65 65 /***************************************************************************** 66 66 * General Setup 67 67 ****************************************************************************/ 68 - static struct orion5x_mpp_mode rd88f5181l_ge_mpp_modes[] __initdata = { 69 - { 0, MPP_GPIO }, /* LED1 */ 70 - { 1, MPP_GPIO }, /* LED5 */ 71 - { 2, MPP_GPIO }, /* LED4 */ 72 - { 3, MPP_GPIO }, /* LED3 */ 73 - { 4, MPP_GPIO }, /* PCI_intA */ 74 - { 5, MPP_GPIO }, /* RTC interrupt */ 75 - { 6, MPP_PCI_CLK }, /* CPU PCI refclk */ 76 - { 7, MPP_PCI_CLK }, /* PCI/PCIe refclk */ 77 - { 8, MPP_GPIO }, /* 88e6131 interrupt */ 78 - { 9, MPP_GPIO }, /* GE_RXERR */ 79 - { 10, MPP_GPIO }, /* PCI_intB */ 80 - { 11, MPP_GPIO }, /* LED2 */ 81 - { 12, MPP_GIGE }, /* GE_TXD[4] */ 82 - { 13, MPP_GIGE }, /* GE_TXD[5] */ 83 - { 14, MPP_GIGE }, /* GE_TXD[6] */ 84 - { 15, MPP_GIGE }, /* GE_TXD[7] */ 85 - { 16, MPP_GIGE }, /* GE_RXD[4] */ 86 - { 17, MPP_GIGE }, /* GE_RXD[5] */ 87 - { 18, MPP_GIGE }, /* GE_RXD[6] */ 88 - { 19, MPP_GIGE }, /* GE_RXD[7] */ 89 - { -1 }, 68 + static unsigned int rd88f5181l_ge_mpp_modes[] __initdata = { 69 + MPP0_GPIO, /* LED1 */ 70 + MPP1_GPIO, /* LED5 */ 71 + MPP2_GPIO, /* LED4 */ 72 + MPP3_GPIO, /* LED3 */ 73 + MPP4_GPIO, /* PCI_intA */ 74 + MPP5_GPIO, /* RTC interrupt */ 75 + MPP6_PCI_CLK, /* CPU PCI refclk */ 76 + MPP7_PCI_CLK, /* PCI/PCIe refclk */ 77 + MPP8_GPIO, /* 88e6131 interrupt */ 78 + MPP9_GPIO, /* GE_RXERR */ 79 + MPP10_GPIO, /* PCI_intB */ 80 + MPP11_GPIO, /* LED2 */ 81 + MPP12_GIGE, /* GE_TXD[4] */ 82 + MPP13_GIGE, /* GE_TXD[5] */ 83 + MPP14_GIGE, /* GE_TXD[6] */ 84 + MPP15_GIGE, /* GE_TXD[7] */ 85 + MPP16_GIGE, /* GE_RXD[4] */ 86 + MPP17_GIGE, /* GE_RXD[5] */ 87 + MPP18_GIGE, /* GE_RXD[6] */ 88 + MPP19_GIGE, /* GE_RXD[7] */ 89 + 0, 90 90 }; 91 91 92 92 static struct mv643xx_eth_platform_data rd88f5181l_ge_eth_data = {
+22 -22
arch/arm/mach-orion5x/rd88f5182-setup.c
··· 241 241 /***************************************************************************** 242 242 * General Setup 243 243 ****************************************************************************/ 244 - static struct orion5x_mpp_mode rd88f5182_mpp_modes[] __initdata = { 245 - { 0, MPP_GPIO }, /* Debug Led */ 246 - { 1, MPP_GPIO }, /* Reset Switch */ 247 - { 2, MPP_UNUSED }, 248 - { 3, MPP_GPIO }, /* RTC Int */ 249 - { 4, MPP_GPIO }, 250 - { 5, MPP_GPIO }, 251 - { 6, MPP_GPIO }, /* PCI_intA */ 252 - { 7, MPP_GPIO }, /* PCI_intB */ 253 - { 8, MPP_UNUSED }, 254 - { 9, MPP_UNUSED }, 255 - { 10, MPP_UNUSED }, 256 - { 11, MPP_UNUSED }, 257 - { 12, MPP_SATA_LED }, /* SATA 0 presence */ 258 - { 13, MPP_SATA_LED }, /* SATA 1 presence */ 259 - { 14, MPP_SATA_LED }, /* SATA 0 active */ 260 - { 15, MPP_SATA_LED }, /* SATA 1 active */ 261 - { 16, MPP_UNUSED }, 262 - { 17, MPP_UNUSED }, 263 - { 18, MPP_UNUSED }, 264 - { 19, MPP_UNUSED }, 265 - { -1 }, 244 + static unsigned int rd88f5182_mpp_modes[] __initdata = { 245 + MPP0_GPIO, /* Debug Led */ 246 + MPP1_GPIO, /* Reset Switch */ 247 + MPP2_UNUSED, 248 + MPP3_GPIO, /* RTC Int */ 249 + MPP4_GPIO, 250 + MPP5_GPIO, 251 + MPP6_GPIO, /* PCI_intA */ 252 + MPP7_GPIO, /* PCI_intB */ 253 + MPP8_UNUSED, 254 + MPP9_UNUSED, 255 + MPP10_UNUSED, 256 + MPP11_UNUSED, 257 + MPP12_SATA_LED, /* SATA 0 presence */ 258 + MPP13_SATA_LED, /* SATA 1 presence */ 259 + MPP14_SATA_LED, /* SATA 0 active */ 260 + MPP15_SATA_LED, /* SATA 1 active */ 261 + MPP16_UNUSED, 262 + MPP17_UNUSED, 263 + MPP18_UNUSED, 264 + MPP19_UNUSED, 265 + 0, 266 266 }; 267 267 268 268 static void __init rd88f5182_init(void)
-1
arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
··· 27 27 #include <asm/mach/pci.h> 28 28 #include <mach/orion5x.h> 29 29 #include "common.h" 30 - #include "mpp.h" 31 30 32 31 static struct mv643xx_eth_platform_data rd88f6183ap_ge_eth_data = { 33 32 .phy_addr = -1,
+22 -22
arch/arm/mach-orion5x/terastation_pro2-setup.c
··· 295 295 /***************************************************************************** 296 296 * General Setup 297 297 ****************************************************************************/ 298 - static struct orion5x_mpp_mode tsp2_mpp_modes[] __initdata = { 299 - { 0, MPP_PCIE_RST_OUTn }, 300 - { 1, MPP_UNUSED }, 301 - { 2, MPP_UNUSED }, 302 - { 3, MPP_UNUSED }, 303 - { 4, MPP_NAND }, /* BOOT NAND Flash REn */ 304 - { 5, MPP_NAND }, /* BOOT NAND Flash WEn */ 305 - { 6, MPP_NAND }, /* BOOT NAND Flash HREn[0] */ 306 - { 7, MPP_NAND }, /* BOOT NAND Flash WEn[0] */ 307 - { 8, MPP_GPIO }, /* MICON int */ 308 - { 9, MPP_GPIO }, /* RTC int */ 309 - { 10, MPP_UNUSED }, 310 - { 11, MPP_GPIO }, /* PCI Int A */ 311 - { 12, MPP_UNUSED }, 312 - { 13, MPP_GPIO }, /* UPS on UART0 enable */ 313 - { 14, MPP_GPIO }, /* UPS low battery detection */ 314 - { 15, MPP_UNUSED }, 315 - { 16, MPP_UART }, /* UART1 RXD */ 316 - { 17, MPP_UART }, /* UART1 TXD */ 317 - { 18, MPP_UART }, /* UART1 CTSn */ 318 - { 19, MPP_UART }, /* UART1 RTSn */ 319 - { -1 }, 298 + static unsigned int tsp2_mpp_modes[] __initdata = { 299 + MPP0_PCIE_RST_OUTn, 300 + MPP1_UNUSED, 301 + MPP2_UNUSED, 302 + MPP3_UNUSED, 303 + MPP4_NAND, /* BOOT NAND Flash REn */ 304 + MPP5_NAND, /* BOOT NAND Flash WEn */ 305 + MPP6_NAND, /* BOOT NAND Flash HREn[0] */ 306 + MPP7_NAND, /* BOOT NAND Flash WEn[0] */ 307 + MPP8_GPIO, /* MICON int */ 308 + MPP9_GPIO, /* RTC int */ 309 + MPP10_UNUSED, 310 + MPP11_GPIO, /* PCI Int A */ 311 + MPP12_UNUSED, 312 + MPP13_GPIO, /* UPS on UART0 enable */ 313 + MPP14_GPIO, /* UPS low battery detection */ 314 + MPP15_UNUSED, 315 + MPP16_UART, /* UART1 RXD */ 316 + MPP17_UART, /* UART1 TXD */ 317 + MPP18_UART, /* UART1 CTSn */ 318 + MPP19_UART, /* UART1 RTSn */ 319 + 0, 320 320 }; 321 321 322 322 static void __init tsp2_init(void)
+22 -22
arch/arm/mach-orion5x/ts209-setup.c
··· 244 244 245 245 * General Setup 246 246 ****************************************************************************/ 247 - static struct orion5x_mpp_mode ts209_mpp_modes[] __initdata = { 248 - { 0, MPP_UNUSED }, 249 - { 1, MPP_GPIO }, /* USB copy button */ 250 - { 2, MPP_GPIO }, /* Load defaults button */ 251 - { 3, MPP_GPIO }, /* GPIO RTC */ 252 - { 4, MPP_UNUSED }, 253 - { 5, MPP_UNUSED }, 254 - { 6, MPP_GPIO }, /* PCI Int A */ 255 - { 7, MPP_GPIO }, /* PCI Int B */ 256 - { 8, MPP_UNUSED }, 257 - { 9, MPP_UNUSED }, 258 - { 10, MPP_UNUSED }, 259 - { 11, MPP_UNUSED }, 260 - { 12, MPP_SATA_LED }, /* SATA 0 presence */ 261 - { 13, MPP_SATA_LED }, /* SATA 1 presence */ 262 - { 14, MPP_SATA_LED }, /* SATA 0 active */ 263 - { 15, MPP_SATA_LED }, /* SATA 1 active */ 264 - { 16, MPP_UART }, /* UART1 RXD */ 265 - { 17, MPP_UART }, /* UART1 TXD */ 266 - { 18, MPP_GPIO }, /* SW_RST */ 267 - { 19, MPP_UNUSED }, 268 - { -1 }, 247 + static unsigned int ts209_mpp_modes[] __initdata = { 248 + MPP0_UNUSED, 249 + MPP1_GPIO, /* USB copy button */ 250 + MPP2_GPIO, /* Load defaults button */ 251 + MPP3_GPIO, /* GPIO RTC */ 252 + MPP4_UNUSED, 253 + MPP5_UNUSED, 254 + MPP6_GPIO, /* PCI Int A */ 255 + MPP7_GPIO, /* PCI Int B */ 256 + MPP8_UNUSED, 257 + MPP9_UNUSED, 258 + MPP10_UNUSED, 259 + MPP11_UNUSED, 260 + MPP12_SATA_LED, /* SATA 0 presence */ 261 + MPP13_SATA_LED, /* SATA 1 presence */ 262 + MPP14_SATA_LED, /* SATA 0 active */ 263 + MPP15_SATA_LED, /* SATA 1 active */ 264 + MPP16_UART, /* UART1 RXD */ 265 + MPP17_UART, /* UART1 TXD */ 266 + MPP18_GPIO, /* SW_RST */ 267 + MPP19_UNUSED, 268 + 0, 269 269 }; 270 270 271 271 static void __init qnap_ts209_init(void)
+22 -22
arch/arm/mach-orion5x/ts409-setup.c
··· 242 242 /***************************************************************************** 243 243 * General Setup 244 244 ****************************************************************************/ 245 - static struct orion5x_mpp_mode ts409_mpp_modes[] __initdata = { 246 - { 0, MPP_UNUSED }, 247 - { 1, MPP_UNUSED }, 248 - { 2, MPP_UNUSED }, 249 - { 3, MPP_UNUSED }, 250 - { 4, MPP_GPIO }, /* HDD 1 status */ 251 - { 5, MPP_GPIO }, /* HDD 2 status */ 252 - { 6, MPP_GPIO }, /* HDD 3 status */ 253 - { 7, MPP_GPIO }, /* HDD 4 status */ 254 - { 8, MPP_UNUSED }, 255 - { 9, MPP_UNUSED }, 256 - { 10, MPP_GPIO }, /* RTC int */ 257 - { 11, MPP_UNUSED }, 258 - { 12, MPP_UNUSED }, 259 - { 13, MPP_UNUSED }, 260 - { 14, MPP_GPIO }, /* SW_RST */ 261 - { 15, MPP_GPIO }, /* USB copy button */ 262 - { 16, MPP_UART }, /* UART1 RXD */ 263 - { 17, MPP_UART }, /* UART1 TXD */ 264 - { 18, MPP_UNUSED }, 265 - { 19, MPP_UNUSED }, 266 - { -1 }, 245 + static unsigned int ts409_mpp_modes[] __initdata = { 246 + MPP0_UNUSED, 247 + MPP1_UNUSED, 248 + MPP2_UNUSED, 249 + MPP3_UNUSED, 250 + MPP4_GPIO, /* HDD 1 status */ 251 + MPP5_GPIO, /* HDD 2 status */ 252 + MPP6_GPIO, /* HDD 3 status */ 253 + MPP7_GPIO, /* HDD 4 status */ 254 + MPP8_UNUSED, 255 + MPP9_UNUSED, 256 + MPP10_GPIO, /* RTC int */ 257 + MPP11_UNUSED, 258 + MPP12_UNUSED, 259 + MPP13_UNUSED, 260 + MPP14_GPIO, /* SW_RST */ 261 + MPP15_GPIO, /* USB copy button */ 262 + MPP16_UART, /* UART1 RXD */ 263 + MPP17_UART, /* UART1 TXD */ 264 + MPP18_UNUSED, 265 + MPP19_UNUSED, 266 + 0, 267 267 }; 268 268 269 269 static void __init qnap_ts409_init(void)
+22 -22
arch/arm/mach-orion5x/ts78xx-setup.c
··· 557 557 /***************************************************************************** 558 558 * General Setup 559 559 ****************************************************************************/ 560 - static struct orion5x_mpp_mode ts78xx_mpp_modes[] __initdata = { 561 - { 0, MPP_UNUSED }, 562 - { 1, MPP_GPIO }, /* JTAG Clock */ 563 - { 2, MPP_GPIO }, /* JTAG Data In */ 564 - { 3, MPP_GPIO }, /* Lat ECP2 256 FPGA - PB2B */ 565 - { 4, MPP_GPIO }, /* JTAG Data Out */ 566 - { 5, MPP_GPIO }, /* JTAG TMS */ 567 - { 6, MPP_GPIO }, /* Lat ECP2 256 FPGA - PB31A_CLK4+ */ 568 - { 7, MPP_GPIO }, /* Lat ECP2 256 FPGA - PB22B */ 569 - { 8, MPP_UNUSED }, 570 - { 9, MPP_UNUSED }, 571 - { 10, MPP_UNUSED }, 572 - { 11, MPP_UNUSED }, 573 - { 12, MPP_UNUSED }, 574 - { 13, MPP_UNUSED }, 575 - { 14, MPP_UNUSED }, 576 - { 15, MPP_UNUSED }, 577 - { 16, MPP_UART }, 578 - { 17, MPP_UART }, 579 - { 18, MPP_UART }, 580 - { 19, MPP_UART }, 560 + static unsigned int ts78xx_mpp_modes[] __initdata = { 561 + MPP0_UNUSED, 562 + MPP1_GPIO, /* JTAG Clock */ 563 + MPP2_GPIO, /* JTAG Data In */ 564 + MPP3_GPIO, /* Lat ECP2 256 FPGA - PB2B */ 565 + MPP4_GPIO, /* JTAG Data Out */ 566 + MPP5_GPIO, /* JTAG TMS */ 567 + MPP6_GPIO, /* Lat ECP2 256 FPGA - PB31A_CLK4+ */ 568 + MPP7_GPIO, /* Lat ECP2 256 FPGA - PB22B */ 569 + MPP8_UNUSED, 570 + MPP9_UNUSED, 571 + MPP10_UNUSED, 572 + MPP11_UNUSED, 573 + MPP12_UNUSED, 574 + MPP13_UNUSED, 575 + MPP14_UNUSED, 576 + MPP15_UNUSED, 577 + MPP16_UART, 578 + MPP17_UART, 579 + MPP18_UART, 580 + MPP19_UART, 581 581 /* 582 582 * MPP[20] PCI Clock Out 1 583 583 * MPP[21] PCI Clock Out 0 ··· 586 586 * MPP[24] Unused 587 587 * MPP[25] Unused 588 588 */ 589 - { -1 }, 589 + 0, 590 590 }; 591 591 592 592 static void __init ts78xx_init(void)
+22 -22
arch/arm/mach-orion5x/wnr854t-setup.c
··· 24 24 #include "common.h" 25 25 #include "mpp.h" 26 26 27 - static struct orion5x_mpp_mode wnr854t_mpp_modes[] __initdata = { 28 - { 0, MPP_GPIO }, /* Power LED green (0=on) */ 29 - { 1, MPP_GPIO }, /* Reset Button (0=off) */ 30 - { 2, MPP_GPIO }, /* Power LED blink (0=off) */ 31 - { 3, MPP_GPIO }, /* WAN Status LED amber (0=off) */ 32 - { 4, MPP_GPIO }, /* PCI int */ 33 - { 5, MPP_GPIO }, /* ??? */ 34 - { 6, MPP_GPIO }, /* ??? */ 35 - { 7, MPP_GPIO }, /* ??? */ 36 - { 8, MPP_UNUSED }, /* ??? */ 37 - { 9, MPP_GIGE }, /* GE_RXERR */ 38 - { 10, MPP_UNUSED }, /* ??? */ 39 - { 11, MPP_UNUSED }, /* ??? */ 40 - { 12, MPP_GIGE }, /* GE_TXD[4] */ 41 - { 13, MPP_GIGE }, /* GE_TXD[5] */ 42 - { 14, MPP_GIGE }, /* GE_TXD[6] */ 43 - { 15, MPP_GIGE }, /* GE_TXD[7] */ 44 - { 16, MPP_GIGE }, /* GE_RXD[4] */ 45 - { 17, MPP_GIGE }, /* GE_RXD[5] */ 46 - { 18, MPP_GIGE }, /* GE_RXD[6] */ 47 - { 19, MPP_GIGE }, /* GE_RXD[7] */ 48 - { -1 }, 27 + static unsigned int wnr854t_mpp_modes[] __initdata = { 28 + MPP0_GPIO, /* Power LED green (0=on) */ 29 + MPP1_GPIO, /* Reset Button (0=off) */ 30 + MPP2_GPIO, /* Power LED blink (0=off) */ 31 + MPP3_GPIO, /* WAN Status LED amber (0=off) */ 32 + MPP4_GPIO, /* PCI int */ 33 + MPP5_GPIO, /* ??? */ 34 + MPP6_GPIO, /* ??? */ 35 + MPP7_GPIO, /* ??? */ 36 + MPP8_UNUSED, /* ??? */ 37 + MPP9_GIGE, /* GE_RXERR */ 38 + MPP10_UNUSED, /* ??? */ 39 + MPP11_UNUSED, /* ??? */ 40 + MPP12_GIGE, /* GE_TXD[4] */ 41 + MPP13_GIGE, /* GE_TXD[5] */ 42 + MPP14_GIGE, /* GE_TXD[6] */ 43 + MPP15_GIGE, /* GE_TXD[7] */ 44 + MPP16_GIGE, /* GE_RXD[4] */ 45 + MPP17_GIGE, /* GE_RXD[5] */ 46 + MPP18_GIGE, /* GE_RXD[6] */ 47 + MPP19_GIGE, /* GE_RXD[7] */ 48 + 0, 49 49 }; 50 50 51 51 /*
+22 -22
arch/arm/mach-orion5x/wrt350n-v2-setup.c
··· 101 101 /* 102 102 * General setup 103 103 */ 104 - static struct orion5x_mpp_mode wrt350n_v2_mpp_modes[] __initdata = { 105 - { 0, MPP_GPIO }, /* Power LED green (0=on) */ 106 - { 1, MPP_GPIO }, /* Security LED (0=on) */ 107 - { 2, MPP_GPIO }, /* Internal Button (0=on) */ 108 - { 3, MPP_GPIO }, /* Reset Button (0=on) */ 109 - { 4, MPP_GPIO }, /* PCI int */ 110 - { 5, MPP_GPIO }, /* Power LED orange (0=on) */ 111 - { 6, MPP_GPIO }, /* USB LED (0=on) */ 112 - { 7, MPP_GPIO }, /* Wireless LED (0=on) */ 113 - { 8, MPP_UNUSED }, /* ??? */ 114 - { 9, MPP_GIGE }, /* GE_RXERR */ 115 - { 10, MPP_UNUSED }, /* ??? */ 116 - { 11, MPP_UNUSED }, /* ??? */ 117 - { 12, MPP_GIGE }, /* GE_TXD[4] */ 118 - { 13, MPP_GIGE }, /* GE_TXD[5] */ 119 - { 14, MPP_GIGE }, /* GE_TXD[6] */ 120 - { 15, MPP_GIGE }, /* GE_TXD[7] */ 121 - { 16, MPP_GIGE }, /* GE_RXD[4] */ 122 - { 17, MPP_GIGE }, /* GE_RXD[5] */ 123 - { 18, MPP_GIGE }, /* GE_RXD[6] */ 124 - { 19, MPP_GIGE }, /* GE_RXD[7] */ 125 - { -1 }, 104 + static unsigned int wrt350n_v2_mpp_modes[] __initdata = { 105 + MPP0_GPIO, /* Power LED green (0=on) */ 106 + MPP1_GPIO, /* Security LED (0=on) */ 107 + MPP2_GPIO, /* Internal Button (0=on) */ 108 + MPP3_GPIO, /* Reset Button (0=on) */ 109 + MPP4_GPIO, /* PCI int */ 110 + MPP5_GPIO, /* Power LED orange (0=on) */ 111 + MPP6_GPIO, /* USB LED (0=on) */ 112 + MPP7_GPIO, /* Wireless LED (0=on) */ 113 + MPP8_UNUSED, /* ??? */ 114 + MPP9_GIGE, /* GE_RXERR */ 115 + MPP10_UNUSED, /* ??? */ 116 + MPP11_UNUSED, /* ??? */ 117 + MPP12_GIGE, /* GE_TXD[4] */ 118 + MPP13_GIGE, /* GE_TXD[5] */ 119 + MPP14_GIGE, /* GE_TXD[6] */ 120 + MPP15_GIGE, /* GE_TXD[7] */ 121 + MPP16_GIGE, /* GE_RXD[4] */ 122 + MPP17_GIGE, /* GE_RXD[5] */ 123 + MPP18_GIGE, /* GE_RXD[6] */ 124 + MPP19_GIGE, /* GE_RXD[7] */ 125 + 0, 126 126 }; 127 127 128 128 /*