From 972c3fb69cd1cd8d549b8a06ce42611eab405c20 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 10 Nov 2011 18:45:33 -0800 Subject: ARM: mach-shmobile: move helper macro PORT_xx to sh_pfc.h This patch moves PORT_xx helper macro to sh_pfc.h, and it expects CPU_ALL_PORT() macro for each CPU Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt --- arch/arm/mach-shmobile/pfc-sh7372.c | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) (limited to 'arch/arm/mach-shmobile/pfc-sh7372.c') diff --git a/arch/arm/mach-shmobile/pfc-sh7372.c b/arch/arm/mach-shmobile/pfc-sh7372.c index 34d6d763ec45..4b43626598ca 100644 --- a/arch/arm/mach-shmobile/pfc-sh7372.c +++ b/arch/arm/mach-shmobile/pfc-sh7372.c @@ -25,27 +25,13 @@ #include #include -#define _1(fn, pfx, sfx) fn(pfx, sfx) - -#define _10(fn, pfx, sfx) \ - _1(fn, pfx##0, sfx), _1(fn, pfx##1, sfx), \ - _1(fn, pfx##2, sfx), _1(fn, pfx##3, sfx), \ - _1(fn, pfx##4, sfx), _1(fn, pfx##5, sfx), \ - _1(fn, pfx##6, sfx), _1(fn, pfx##7, sfx), \ - _1(fn, pfx##8, sfx), _1(fn, pfx##9, sfx) - -#define _80(fn, pfx, sfx) \ - _10(fn, pfx##1, sfx), _10(fn, pfx##2, sfx), \ - _10(fn, pfx##3, sfx), _10(fn, pfx##4, sfx), \ - _10(fn, pfx##5, sfx), _10(fn, pfx##6, sfx), \ - _10(fn, pfx##7, sfx), _10(fn, pfx##8, sfx) - -#define _190(fn, pfx, sfx) \ - _10(fn, pfx, sfx), _80(fn, pfx, sfx), _10(fn, pfx##9, sfx), \ - _10(fn, pfx##10, sfx), _80(fn, pfx##1, sfx), _1(fn, pfx##190, sfx) - -#define _PORT(pfx, sfx) pfx##_##sfx -#define PORT_ALL(str) _190(_PORT, PORT, str) +#define CPU_ALL_PORT(fn, pfx, sfx) \ + PORT_10(fn, pfx, sfx), PORT_90(fn, pfx, sfx), \ + PORT_10(fn, pfx##10, sfx), PORT_10(fn, pfx##11, sfx), \ + PORT_10(fn, pfx##12, sfx), PORT_10(fn, pfx##13, sfx), \ + PORT_10(fn, pfx##14, sfx), PORT_10(fn, pfx##15, sfx), \ + PORT_10(fn, pfx##16, sfx), PORT_10(fn, pfx##17, sfx), \ + PORT_10(fn, pfx##18, sfx), PORT_1(fn, pfx##190, sfx) enum { PINMUX_RESERVED = 0, @@ -942,10 +928,6 @@ static pinmux_enum_t pinmux_data[] = { PINMUX_DATA(MFIv4_MARK, MSEL4CR_6_1), }; -#define _GPIO_PORT(pfx, sfx) PINMUX_GPIO(GPIO_PORT##pfx, PORT##pfx##_DATA) -#define GPIO_PORT_ALL() _190(_GPIO_PORT, , unused) -#define GPIO_FN(str) PINMUX_GPIO(GPIO_FN_##str, str##_MARK) - static struct pinmux_gpio pinmux_gpios[] = { /* PORT */ -- cgit v1.2.3-55-g7522