diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-11-10 21:45:23 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-11-11 02:45:30 -0500 |
commit | bd8d0cbaa00883c84741b98264f8318cdade9c71 (patch) | |
tree | 4b603206fa6329779b3b56afe28ecac252f891d9 | |
parent | 8e6a46757ad11a16354b9037e17d6135d9a4bb87 (diff) |
ARM: mach-shmobile: move helper macro PORT_DATA_xx to sh_pfc.h
This patch move PORT_DATA_xx helper macro to sh_pfc.h.
and pfc-sh7372.c used it
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | arch/arm/mach-shmobile/pfc-sh7367.c | 35 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/pfc-sh7372.c | 214 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/pfc-sh7377.c | 39 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/pfc-sh73a0.c | 39 | ||||
-rw-r--r-- | include/linux/sh_pfc.h | 36 |
5 files changed, 151 insertions, 212 deletions
diff --git a/arch/arm/mach-shmobile/pfc-sh7367.c b/arch/arm/mach-shmobile/pfc-sh7367.c index 128555e76e43..25181166e2d8 100644 --- a/arch/arm/mach-shmobile/pfc-sh7367.c +++ b/arch/arm/mach-shmobile/pfc-sh7367.c | |||
@@ -327,41 +327,6 @@ enum { | |||
327 | PINMUX_MARK_END, | 327 | PINMUX_MARK_END, |
328 | }; | 328 | }; |
329 | 329 | ||
330 | #define PORT_DATA_I(nr) \ | ||
331 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_IN) | ||
332 | |||
333 | #define PORT_DATA_I_PD(nr) \ | ||
334 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
335 | PORT##nr##_IN, PORT##nr##_IN_PD) | ||
336 | |||
337 | #define PORT_DATA_I_PU(nr) \ | ||
338 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
339 | PORT##nr##_IN, PORT##nr##_IN_PU) | ||
340 | |||
341 | #define PORT_DATA_I_PU_PD(nr) \ | ||
342 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
343 | PORT##nr##_IN, PORT##nr##_IN_PD, PORT##nr##_IN_PU) | ||
344 | |||
345 | #define PORT_DATA_O(nr) \ | ||
346 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT) | ||
347 | |||
348 | #define PORT_DATA_IO(nr) \ | ||
349 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
350 | PORT##nr##_IN) | ||
351 | |||
352 | #define PORT_DATA_IO_PD(nr) \ | ||
353 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
354 | PORT##nr##_IN, PORT##nr##_IN_PD) | ||
355 | |||
356 | #define PORT_DATA_IO_PU(nr) \ | ||
357 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
358 | PORT##nr##_IN, PORT##nr##_IN_PU) | ||
359 | |||
360 | #define PORT_DATA_IO_PU_PD(nr) \ | ||
361 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
362 | PORT##nr##_IN, PORT##nr##_IN_PD, PORT##nr##_IN_PU) | ||
363 | |||
364 | |||
365 | static pinmux_enum_t pinmux_data[] = { | 330 | static pinmux_enum_t pinmux_data[] = { |
366 | 331 | ||
367 | /* specify valid pin states for each pin in GPIO mode */ | 332 | /* specify valid pin states for each pin in GPIO mode */ |
diff --git a/arch/arm/mach-shmobile/pfc-sh7372.c b/arch/arm/mach-shmobile/pfc-sh7372.c index 9c265dae138a..34d6d763ec45 100644 --- a/arch/arm/mach-shmobile/pfc-sh7372.c +++ b/arch/arm/mach-shmobile/pfc-sh7372.c | |||
@@ -381,108 +381,124 @@ enum { | |||
381 | PINMUX_MARK_END, | 381 | PINMUX_MARK_END, |
382 | }; | 382 | }; |
383 | 383 | ||
384 | /* PORT_DATA_I_PD(nr) */ | ||
385 | #define _I___D(nr) \ | ||
386 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
387 | PORT##nr##_IN, PORT##nr##_IN_PD) | ||
388 | |||
389 | /* PORT_DATA_I_PU(nr) */ | ||
390 | #define _I__U_(nr) \ | ||
391 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
392 | PORT##nr##_IN, PORT##nr##_IN_PU) | ||
393 | |||
394 | /* PORT_DATA_I_PU_PD(nr) */ | ||
395 | #define _I__UD(nr) \ | ||
396 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
397 | PORT##nr##_IN, PORT##nr##_IN_PD, PORT##nr##_IN_PU) | ||
398 | |||
399 | /* PORT_DATA_O(nr) */ | ||
400 | #define __O___(nr) \ | ||
401 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT) | ||
402 | |||
403 | /* PORT_DATA_IO(nr) */ | ||
404 | #define _IO___(nr) \ | ||
405 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
406 | PORT##nr##_IN) | ||
407 | |||
408 | /* PORT_DATA_IO_PD(nr) */ | ||
409 | #define _IO__D(nr) \ | ||
410 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
411 | PORT##nr##_IN, PORT##nr##_IN_PD) | ||
412 | |||
413 | /* PORT_DATA_IO_PU(nr) */ | ||
414 | #define _IO_U_(nr) \ | ||
415 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
416 | PORT##nr##_IN, PORT##nr##_IN_PU) | ||
417 | |||
418 | /* PORT_DATA_IO_PU_PD(nr) */ | ||
419 | #define _IO_UD(nr) \ | ||
420 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
421 | PORT##nr##_IN, PORT##nr##_IN_PD, PORT##nr##_IN_PU) | ||
422 | |||
423 | |||
424 | static pinmux_enum_t pinmux_data[] = { | 384 | static pinmux_enum_t pinmux_data[] = { |
425 | 385 | ||
426 | /* specify valid pin states for each pin in GPIO mode */ | 386 | /* specify valid pin states for each pin in GPIO mode */ |
427 | 387 | PORT_DATA_IO_PD(0), PORT_DATA_IO_PD(1), | |
428 | _IO__D(0), _IO__D(1), __O___(2), _I___D(3), _I___D(4), | 388 | PORT_DATA_O(2), PORT_DATA_I_PD(3), |
429 | _I___D(5), _IO_UD(6), _I___D(7), _IO__D(8), __O___(9), | 389 | PORT_DATA_I_PD(4), PORT_DATA_I_PD(5), |
430 | 390 | PORT_DATA_IO_PU_PD(6), PORT_DATA_I_PD(7), | |
431 | __O___(10), __O___(11), _IO_UD(12), _IO__D(13), _IO__D(14), | 391 | PORT_DATA_IO_PD(8), PORT_DATA_O(9), |
432 | __O___(15), _IO__D(16), _IO__D(17), _I___D(18), _IO___(19), | 392 | |
433 | 393 | PORT_DATA_O(10), PORT_DATA_O(11), | |
434 | _IO___(20), _IO___(21), _IO___(22), _IO___(23), _IO___(24), | 394 | PORT_DATA_IO_PU_PD(12), PORT_DATA_IO_PD(13), |
435 | _IO___(25), _IO___(26), _IO___(27), _IO___(28), _IO___(29), | 395 | PORT_DATA_IO_PD(14), PORT_DATA_O(15), |
436 | 396 | PORT_DATA_IO_PD(16), PORT_DATA_IO_PD(17), | |
437 | _IO___(30), _IO___(31), _IO___(32), _IO___(33), _IO___(34), | 397 | PORT_DATA_I_PD(18), PORT_DATA_IO(19), |
438 | _IO___(35), _IO___(36), _IO___(37), _IO___(38), _IO___(39), | 398 | |
439 | 399 | PORT_DATA_IO(20), PORT_DATA_IO(21), | |
440 | _IO___(40), _IO___(41), _IO___(42), _IO___(43), _IO___(44), | 400 | PORT_DATA_IO(22), PORT_DATA_IO(23), |
441 | _IO___(45), _IO_U_(46), _IO_U_(47), _IO_U_(48), _IO_U_(49), | 401 | PORT_DATA_IO(24), PORT_DATA_IO(25), |
442 | 402 | PORT_DATA_IO(26), PORT_DATA_IO(27), | |
443 | _IO_U_(50), _IO_U_(51), _IO_U_(52), _IO_U_(53), _IO_U_(54), | 403 | PORT_DATA_IO(28), PORT_DATA_IO(29), |
444 | _IO_U_(55), _IO_U_(56), _IO_U_(57), _IO_U_(58), _IO_U_(59), | 404 | |
445 | 405 | PORT_DATA_IO(30), PORT_DATA_IO(31), | |
446 | _IO_U_(60), _IO_U_(61), _IO___(62), __O___(63), __O___(64), | 406 | PORT_DATA_IO(32), PORT_DATA_IO(33), |
447 | _IO_U_(65), __O___(66), _IO_U_(67), __O___(68), _IO___(69), /*66?*/ | 407 | PORT_DATA_IO(34), PORT_DATA_IO(35), |
448 | 408 | PORT_DATA_IO(36), PORT_DATA_IO(37), | |
449 | _IO___(70), _IO___(71), __O___(72), _I__U_(73), _I__UD(74), | 409 | PORT_DATA_IO(38), PORT_DATA_IO(39), |
450 | _IO_UD(75), _IO_UD(76), _IO_UD(77), _IO_UD(78), _IO_UD(79), | 410 | |
451 | 411 | PORT_DATA_IO(40), PORT_DATA_IO(41), | |
452 | _IO_UD(80), _IO_UD(81), _IO_UD(82), _IO_UD(83), _IO_UD(84), | 412 | PORT_DATA_IO(42), PORT_DATA_IO(43), |
453 | _IO_UD(85), _IO_UD(86), _IO_UD(87), _IO_UD(88), _IO_UD(89), | 413 | PORT_DATA_IO(44), PORT_DATA_IO(45), |
454 | 414 | PORT_DATA_IO_PU(46), PORT_DATA_IO_PU(47), | |
455 | _IO_UD(90), _IO_UD(91), _IO_UD(92), _IO_UD(93), _IO_UD(94), | 415 | PORT_DATA_IO_PU(48), PORT_DATA_IO_PU(49), |
456 | _IO_UD(95), _IO_U_(96), _IO_UD(97), _IO_UD(98), __O___(99), /*99?*/ | 416 | |
457 | 417 | PORT_DATA_IO_PU(50), PORT_DATA_IO_PU(51), | |
458 | _IO__D(100), _IO__D(101), _IO__D(102), _IO__D(103), _IO__D(104), | 418 | PORT_DATA_IO_PU(52), PORT_DATA_IO_PU(53), |
459 | _IO__D(105), _IO_U_(106), _IO_U_(107), _IO_U_(108), _IO_U_(109), | 419 | PORT_DATA_IO_PU(54), PORT_DATA_IO_PU(55), |
460 | 420 | PORT_DATA_IO_PU(56), PORT_DATA_IO_PU(57), | |
461 | _IO_U_(110), _IO_U_(111), _IO__D(112), _IO__D(113), _IO_U_(114), | 421 | PORT_DATA_IO_PU(58), PORT_DATA_IO_PU(59), |
462 | _IO_U_(115), _IO_U_(116), _IO_U_(117), _IO_U_(118), _IO_U_(119), | 422 | |
463 | 423 | PORT_DATA_IO_PU(60), PORT_DATA_IO_PU(61), | |
464 | _IO_U_(120), _IO__D(121), _IO__D(122), _IO__D(123), _IO__D(124), | 424 | PORT_DATA_IO(62), PORT_DATA_O(63), |
465 | _IO__D(125), _IO__D(126), _IO__D(127), _IO__D(128), _IO_UD(129), | 425 | PORT_DATA_O(64), PORT_DATA_IO_PU(65), |
466 | 426 | PORT_DATA_O(66), PORT_DATA_IO_PU(67), /*66?*/ | |
467 | _IO_UD(130), _IO_UD(131), _IO_UD(132), _IO_UD(133), _IO_UD(134), | 427 | PORT_DATA_O(68), PORT_DATA_IO(69), |
468 | _IO_UD(135), _IO__D(136), _IO__D(137), _IO__D(138), _IO__D(139), | 428 | |
469 | 429 | PORT_DATA_IO(70), PORT_DATA_IO(71), | |
470 | _IO__D(140), _IO__D(141), _IO__D(142), _IO_UD(143), _IO__D(144), | 430 | PORT_DATA_O(72), PORT_DATA_I_PU(73), |
471 | _IO__D(145), _IO__D(146), _IO__D(147), _IO__D(148), _IO__D(149), | 431 | PORT_DATA_I_PU_PD(74), PORT_DATA_IO_PU_PD(75), |
472 | 432 | PORT_DATA_IO_PU_PD(76), PORT_DATA_IO_PU_PD(77), | |
473 | _IO__D(150), _IO__D(151), _IO_UD(152), _I___D(153), _IO_UD(154), | 433 | PORT_DATA_IO_PU_PD(78), PORT_DATA_IO_PU_PD(79), |
474 | _I___D(155), _IO__D(156), _IO__D(157), _I___D(158), _IO__D(159), | 434 | |
475 | 435 | PORT_DATA_IO_PU_PD(80), PORT_DATA_IO_PU_PD(81), | |
476 | __O___(160), _IO__D(161), _IO__D(162), _IO__D(163), _I___D(164), | 436 | PORT_DATA_IO_PU_PD(82), PORT_DATA_IO_PU_PD(83), |
477 | _IO__D(165), _I___D(166), _I___D(167), _I___D(168), _I___D(169), | 437 | PORT_DATA_IO_PU_PD(84), PORT_DATA_IO_PU_PD(85), |
478 | 438 | PORT_DATA_IO_PU_PD(86), PORT_DATA_IO_PU_PD(87), | |
479 | _I___D(170), __O___(171), _IO_UD(172), _IO_UD(173), _IO_UD(174), | 439 | PORT_DATA_IO_PU_PD(88), PORT_DATA_IO_PU_PD(89), |
480 | _IO_UD(175), _IO_UD(176), _IO_UD(177), _IO_UD(178), __O___(179), | 440 | |
481 | 441 | PORT_DATA_IO_PU_PD(90), PORT_DATA_IO_PU_PD(91), | |
482 | _IO_UD(180), _IO_UD(181), _IO_UD(182), _IO_UD(183), _IO_UD(184), | 442 | PORT_DATA_IO_PU_PD(92), PORT_DATA_IO_PU_PD(93), |
483 | __O___(185), _IO_UD(186), _IO_UD(187), _IO_UD(188), _IO_UD(189), | 443 | PORT_DATA_IO_PU_PD(94), PORT_DATA_IO_PU_PD(95), |
484 | 444 | PORT_DATA_IO_PU(96), PORT_DATA_IO_PU_PD(97), | |
485 | _IO_UD(190), | 445 | PORT_DATA_IO_PU_PD(98), PORT_DATA_O(99), /*99?*/ |
446 | |||
447 | PORT_DATA_IO_PD(100), PORT_DATA_IO_PD(101), | ||
448 | PORT_DATA_IO_PD(102), PORT_DATA_IO_PD(103), | ||
449 | PORT_DATA_IO_PD(104), PORT_DATA_IO_PD(105), | ||
450 | PORT_DATA_IO_PU(106), PORT_DATA_IO_PU(107), | ||
451 | PORT_DATA_IO_PU(108), PORT_DATA_IO_PU(109), | ||
452 | |||
453 | PORT_DATA_IO_PU(110), PORT_DATA_IO_PU(111), | ||
454 | PORT_DATA_IO_PD(112), PORT_DATA_IO_PD(113), | ||
455 | PORT_DATA_IO_PU(114), PORT_DATA_IO_PU(115), | ||
456 | PORT_DATA_IO_PU(116), PORT_DATA_IO_PU(117), | ||
457 | PORT_DATA_IO_PU(118), PORT_DATA_IO_PU(119), | ||
458 | |||
459 | PORT_DATA_IO_PU(120), PORT_DATA_IO_PD(121), | ||
460 | PORT_DATA_IO_PD(122), PORT_DATA_IO_PD(123), | ||
461 | PORT_DATA_IO_PD(124), PORT_DATA_IO_PD(125), | ||
462 | PORT_DATA_IO_PD(126), PORT_DATA_IO_PD(127), | ||
463 | PORT_DATA_IO_PD(128), PORT_DATA_IO_PU_PD(129), | ||
464 | |||
465 | PORT_DATA_IO_PU_PD(130), PORT_DATA_IO_PU_PD(131), | ||
466 | PORT_DATA_IO_PU_PD(132), PORT_DATA_IO_PU_PD(133), | ||
467 | PORT_DATA_IO_PU_PD(134), PORT_DATA_IO_PU_PD(135), | ||
468 | PORT_DATA_IO_PD(136), PORT_DATA_IO_PD(137), | ||
469 | PORT_DATA_IO_PD(138), PORT_DATA_IO_PD(139), | ||
470 | |||
471 | PORT_DATA_IO_PD(140), PORT_DATA_IO_PD(141), | ||
472 | PORT_DATA_IO_PD(142), PORT_DATA_IO_PU_PD(143), | ||
473 | PORT_DATA_IO_PD(144), PORT_DATA_IO_PD(145), | ||
474 | PORT_DATA_IO_PD(146), PORT_DATA_IO_PD(147), | ||
475 | PORT_DATA_IO_PD(148), PORT_DATA_IO_PD(149), | ||
476 | |||
477 | PORT_DATA_IO_PD(150), PORT_DATA_IO_PD(151), | ||
478 | PORT_DATA_IO_PU_PD(152), PORT_DATA_I_PD(153), | ||
479 | PORT_DATA_IO_PU_PD(154), PORT_DATA_I_PD(155), | ||
480 | PORT_DATA_IO_PD(156), PORT_DATA_IO_PD(157), | ||
481 | PORT_DATA_I_PD(158), PORT_DATA_IO_PD(159), | ||
482 | |||
483 | PORT_DATA_O(160), PORT_DATA_IO_PD(161), | ||
484 | PORT_DATA_IO_PD(162), PORT_DATA_IO_PD(163), | ||
485 | PORT_DATA_I_PD(164), PORT_DATA_IO_PD(165), | ||
486 | PORT_DATA_I_PD(166), PORT_DATA_I_PD(167), | ||
487 | PORT_DATA_I_PD(168), PORT_DATA_I_PD(169), | ||
488 | |||
489 | PORT_DATA_I_PD(170), PORT_DATA_O(171), | ||
490 | PORT_DATA_IO_PU_PD(172), PORT_DATA_IO_PU_PD(173), | ||
491 | PORT_DATA_IO_PU_PD(174), PORT_DATA_IO_PU_PD(175), | ||
492 | PORT_DATA_IO_PU_PD(176), PORT_DATA_IO_PU_PD(177), | ||
493 | PORT_DATA_IO_PU_PD(178), PORT_DATA_O(179), | ||
494 | |||
495 | PORT_DATA_IO_PU_PD(180), PORT_DATA_IO_PU_PD(181), | ||
496 | PORT_DATA_IO_PU_PD(182), PORT_DATA_IO_PU_PD(183), | ||
497 | PORT_DATA_IO_PU_PD(184), PORT_DATA_O(185), | ||
498 | PORT_DATA_IO_PU_PD(186), PORT_DATA_IO_PU_PD(187), | ||
499 | PORT_DATA_IO_PU_PD(188), PORT_DATA_IO_PU_PD(189), | ||
500 | |||
501 | PORT_DATA_IO_PU_PD(190), | ||
486 | 502 | ||
487 | /* IRQ */ | 503 | /* IRQ */ |
488 | PINMUX_DATA(IRQ0_6_MARK, PORT6_FN0, MSEL1CR_0_0), | 504 | PINMUX_DATA(IRQ0_6_MARK, PORT6_FN0, MSEL1CR_0_0), |
diff --git a/arch/arm/mach-shmobile/pfc-sh7377.c b/arch/arm/mach-shmobile/pfc-sh7377.c index 613e6842ad05..e4c70183e54e 100644 --- a/arch/arm/mach-shmobile/pfc-sh7377.c +++ b/arch/arm/mach-shmobile/pfc-sh7377.c | |||
@@ -360,45 +360,6 @@ enum { | |||
360 | PINMUX_MARK_END, | 360 | PINMUX_MARK_END, |
361 | }; | 361 | }; |
362 | 362 | ||
363 | #define PORT_DATA_I(nr) \ | ||
364 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_IN) | ||
365 | |||
366 | #define PORT_DATA_I_PD(nr) \ | ||
367 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
368 | PORT##nr##_IN, PORT##nr##_IN_PD) | ||
369 | |||
370 | #define PORT_DATA_I_PU(nr) \ | ||
371 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
372 | PORT##nr##_IN, PORT##nr##_IN_PU) | ||
373 | |||
374 | #define PORT_DATA_I_PU_PD(nr) \ | ||
375 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
376 | PORT##nr##_IN, PORT##nr##_IN_PD, \ | ||
377 | PORT##nr##_IN_PU) | ||
378 | |||
379 | #define PORT_DATA_O(nr) \ | ||
380 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
381 | PORT##nr##_OUT) | ||
382 | |||
383 | #define PORT_DATA_IO(nr) \ | ||
384 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
385 | PORT##nr##_OUT, PORT##nr##_IN) | ||
386 | |||
387 | #define PORT_DATA_IO_PD(nr) \ | ||
388 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
389 | PORT##nr##_OUT, PORT##nr##_IN, \ | ||
390 | PORT##nr##_IN_PD) | ||
391 | |||
392 | #define PORT_DATA_IO_PU(nr) \ | ||
393 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
394 | PORT##nr##_OUT, PORT##nr##_IN, \ | ||
395 | PORT##nr##_IN_PU) | ||
396 | |||
397 | #define PORT_DATA_IO_PU_PD(nr) \ | ||
398 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
399 | PORT##nr##_OUT, PORT##nr##_IN, \ | ||
400 | PORT##nr##_IN_PD, PORT##nr##_IN_PU) | ||
401 | |||
402 | static pinmux_enum_t pinmux_data[] = { | 363 | static pinmux_enum_t pinmux_data[] = { |
403 | /* specify valid pin states for each pin in GPIO mode */ | 364 | /* specify valid pin states for each pin in GPIO mode */ |
404 | /* 55-1 (GPIO) */ | 365 | /* 55-1 (GPIO) */ |
diff --git a/arch/arm/mach-shmobile/pfc-sh73a0.c b/arch/arm/mach-shmobile/pfc-sh73a0.c index a2d99b3a9fa8..f860caa96671 100644 --- a/arch/arm/mach-shmobile/pfc-sh73a0.c +++ b/arch/arm/mach-shmobile/pfc-sh73a0.c | |||
@@ -525,45 +525,6 @@ enum { | |||
525 | PINMUX_MARK_END, | 525 | PINMUX_MARK_END, |
526 | }; | 526 | }; |
527 | 527 | ||
528 | #define PORT_DATA_I(nr) \ | ||
529 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_IN) | ||
530 | |||
531 | #define PORT_DATA_I_PD(nr) \ | ||
532 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
533 | PORT##nr##_IN, PORT##nr##_IN_PD) | ||
534 | |||
535 | #define PORT_DATA_I_PU(nr) \ | ||
536 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
537 | PORT##nr##_IN, PORT##nr##_IN_PU) | ||
538 | |||
539 | #define PORT_DATA_I_PU_PD(nr) \ | ||
540 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
541 | PORT##nr##_IN, PORT##nr##_IN_PD, \ | ||
542 | PORT##nr##_IN_PU) | ||
543 | |||
544 | #define PORT_DATA_O(nr) \ | ||
545 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
546 | PORT##nr##_OUT) | ||
547 | |||
548 | #define PORT_DATA_IO(nr) \ | ||
549 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
550 | PORT##nr##_OUT, PORT##nr##_IN) | ||
551 | |||
552 | #define PORT_DATA_IO_PD(nr) \ | ||
553 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
554 | PORT##nr##_OUT, PORT##nr##_IN, \ | ||
555 | PORT##nr##_IN_PD) | ||
556 | |||
557 | #define PORT_DATA_IO_PU(nr) \ | ||
558 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
559 | PORT##nr##_OUT, PORT##nr##_IN, \ | ||
560 | PORT##nr##_IN_PU) | ||
561 | |||
562 | #define PORT_DATA_IO_PU_PD(nr) \ | ||
563 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
564 | PORT##nr##_OUT, PORT##nr##_IN, \ | ||
565 | PORT##nr##_IN_PD, PORT##nr##_IN_PU) | ||
566 | |||
567 | static pinmux_enum_t pinmux_data[] = { | 528 | static pinmux_enum_t pinmux_data[] = { |
568 | /* specify valid pin states for each pin in GPIO mode */ | 529 | /* specify valid pin states for each pin in GPIO mode */ |
569 | 530 | ||
diff --git a/include/linux/sh_pfc.h b/include/linux/sh_pfc.h index bc8c9208f7e2..5585f280dc1d 100644 --- a/include/linux/sh_pfc.h +++ b/include/linux/sh_pfc.h | |||
@@ -104,4 +104,40 @@ struct pinmux_info { | |||
104 | int register_pinmux(struct pinmux_info *pip); | 104 | int register_pinmux(struct pinmux_info *pip); |
105 | int unregister_pinmux(struct pinmux_info *pip); | 105 | int unregister_pinmux(struct pinmux_info *pip); |
106 | 106 | ||
107 | /* helper macro for pinmux_enum_t */ | ||
108 | #define PORT_DATA_I(nr) \ | ||
109 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_IN) | ||
110 | |||
111 | #define PORT_DATA_I_PD(nr) \ | ||
112 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
113 | PORT##nr##_IN, PORT##nr##_IN_PD) | ||
114 | |||
115 | #define PORT_DATA_I_PU(nr) \ | ||
116 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
117 | PORT##nr##_IN, PORT##nr##_IN_PU) | ||
118 | |||
119 | #define PORT_DATA_I_PU_PD(nr) \ | ||
120 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | ||
121 | PORT##nr##_IN, PORT##nr##_IN_PD, PORT##nr##_IN_PU) | ||
122 | |||
123 | #define PORT_DATA_O(nr) \ | ||
124 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT) | ||
125 | |||
126 | #define PORT_DATA_IO(nr) \ | ||
127 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
128 | PORT##nr##_IN) | ||
129 | |||
130 | #define PORT_DATA_IO_PD(nr) \ | ||
131 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
132 | PORT##nr##_IN, PORT##nr##_IN_PD) | ||
133 | |||
134 | #define PORT_DATA_IO_PU(nr) \ | ||
135 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
136 | PORT##nr##_IN, PORT##nr##_IN_PU) | ||
137 | |||
138 | #define PORT_DATA_IO_PU_PD(nr) \ | ||
139 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | ||
140 | PORT##nr##_IN, PORT##nr##_IN_PD, PORT##nr##_IN_PU) | ||
141 | |||
142 | |||
107 | #endif /* __SH_PFC_H */ | 143 | #endif /* __SH_PFC_H */ |