Skip to content

Commit

Permalink
ARM: shmobile: Add r8a7790_register_pfc() function
Browse files Browse the repository at this point in the history
Break out the r8a7790 PFC platform device creation code
to increase readability and follow same style as r8a7791.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
  • Loading branch information
Magnus Damm authored and Simon Horman committed Nov 24, 2013
1 parent 20c6125 commit 8d0b3bf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arch/arm/mach-shmobile/setup-r8a7790.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ static const struct resource pfc_resources[] __initconst = {
DEFINE_RES_MEM(0xe6060000, 0x250),
};

#define r8a7790_register_pfc() \
platform_device_register_simple("pfc-r8a7790", -1, pfc_resources, \
ARRAY_SIZE(pfc_resources))

#define R8A7790_GPIO(idx) \
static const struct resource r8a7790_gpio##idx##_resources[] __initconst = { \
DEFINE_RES_MEM(0xe6050000 + 0x1000 * (idx), 0x50), \
Expand Down Expand Up @@ -65,8 +69,7 @@ R8A7790_GPIO(5);

void __init r8a7790_pinmux_init(void)
{
platform_device_register_simple("pfc-r8a7790", -1, pfc_resources,
ARRAY_SIZE(pfc_resources));
r8a7790_register_pfc();
r8a7790_register_gpio(0);
r8a7790_register_gpio(1);
r8a7790_register_gpio(2);
Expand Down

0 comments on commit 8d0b3bf

Please sign in to comment.