提交 7e5fc779 编写于 作者: O Olof Johansson

Merge branch 'pfc' of...

Merge branch 'pfc' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/sh-pinmux

From Simon Horman. Based on agreement between me, Paul Mundt, Linus
Walleij and Simon, we're mergning this large branch of pinctrl conversion
through arm-soc, even though it contains the corresponding conversions
for arch/sh. Main reason for this is tight dependencies (that will now
mostly be broken) between the arch/sh and mach-shmobile implementations.

There will be more of this in 3.10 to do device-tree bindings, but this is
the initial conversion.

* 'pfc' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (80 commits)
  sh-pfc: Move sh_pfc.h from include/linux/ to driver directory
  sh-pfc: Remove pinmux_info definition
  sh: Remove unused sh_pfc_register_info() function
  sh: shx3: pinmux: Use driver-provided pinmux info
  sh: sh7786: pinmux: Use driver-provided pinmux info
  sh: sh7785: pinmux: Use driver-provided pinmux info
  sh: sh7757: pinmux: Use driver-provided pinmux info
  sh: sh7734: pinmux: Use driver-provided pinmux info
  sh: sh7724: pinmux: Use driver-provided pinmux info
  sh: sh7723: pinmux: Use driver-provided pinmux info
  sh: sh7722: pinmux: Use driver-provided pinmux info
  sh: sh7720: pinmux: Use driver-provided pinmux info
  sh: sh7269: pinmux: Use driver-provided pinmux info
  sh: sh7264: pinmux: Use driver-provided pinmux info
  sh: sh7203: pinmux: Use driver-provided pinmux info
  ARM: shmobile: sh73a0: Use driver-provided pinmux info
  ARM: shmobile: sh7372: Use driver-provided pinmux info
  ARM: shmobile: r8a7779: Use driver-provided pinmux info
  ARM: shmobile: r8a7740: Use driver-provided pinmux info
  sh-pfc: Add shx3 pinmux support
  ...
Signed-off-by: NOlof Johansson <olof@lixom.net>
...@@ -698,6 +698,7 @@ config ARCH_SHMOBILE ...@@ -698,6 +698,7 @@ config ARCH_SHMOBILE
select MULTI_IRQ_HANDLER select MULTI_IRQ_HANDLER
select NEED_MACH_MEMORY_H select NEED_MACH_MEMORY_H
select NO_IOPORT select NO_IOPORT
select PINCTRL
select PM_GENERIC_DOMAINS if PM select PM_GENERIC_DOMAINS if PM
select SPARSE_IRQ select SPARSE_IRQ
help help
......
...@@ -19,13 +19,6 @@ smp-$(CONFIG_ARCH_SH73A0) += smp-sh73a0.o ...@@ -19,13 +19,6 @@ smp-$(CONFIG_ARCH_SH73A0) += smp-sh73a0.o
smp-$(CONFIG_ARCH_R8A7779) += smp-r8a7779.o smp-$(CONFIG_ARCH_R8A7779) += smp-r8a7779.o
smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o
# Pinmux setup
pfc-y :=
pfc-$(CONFIG_ARCH_SH7372) += pfc-sh7372.o
pfc-$(CONFIG_ARCH_SH73A0) += pfc-sh73a0.o
pfc-$(CONFIG_ARCH_R8A7740) += pfc-r8a7740.o
pfc-$(CONFIG_ARCH_R8A7779) += pfc-r8a7779.o
# IRQ objects # IRQ objects
obj-$(CONFIG_ARCH_SH7372) += entry-intc.o obj-$(CONFIG_ARCH_SH7372) += entry-intc.o
obj-$(CONFIG_ARCH_R8A7740) += entry-intc.o obj-$(CONFIG_ARCH_R8A7740) += entry-intc.o
...@@ -51,4 +44,3 @@ obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o ...@@ -51,4 +44,3 @@ obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o
# Framework support # Framework support
obj-$(CONFIG_SMP) += $(smp-y) obj-$(CONFIG_SMP) += $(smp-y)
obj-$(CONFIG_GENERIC_GPIO) += $(pfc-y)
...@@ -68,6 +68,32 @@ void __init r8a7740_map_io(void) ...@@ -68,6 +68,32 @@ void __init r8a7740_map_io(void)
iotable_init(r8a7740_io_desc, ARRAY_SIZE(r8a7740_io_desc)); iotable_init(r8a7740_io_desc, ARRAY_SIZE(r8a7740_io_desc));
} }
/* PFC */
static struct resource r8a7740_pfc_resources[] = {
[0] = {
.start = 0xe6050000,
.end = 0xe6057fff,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 0xe605800c,
.end = 0xe605802b,
.flags = IORESOURCE_MEM,
}
};
static struct platform_device r8a7740_pfc_device = {
.name = "pfc-r8a7740",
.id = -1,
.resource = r8a7740_pfc_resources,
.num_resources = ARRAY_SIZE(r8a7740_pfc_resources),
};
void __init r8a7740_pinmux_init(void)
{
platform_device_register(&r8a7740_pfc_device);
}
/* SCIFA0 */ /* SCIFA0 */
static struct plat_sci_port scif0_platform_data = { static struct plat_sci_port scif0_platform_data = {
.mapbase = 0xe6c40000, .mapbase = 0xe6c40000,
......
...@@ -60,6 +60,31 @@ void __init r8a7779_map_io(void) ...@@ -60,6 +60,31 @@ void __init r8a7779_map_io(void)
iotable_init(r8a7779_io_desc, ARRAY_SIZE(r8a7779_io_desc)); iotable_init(r8a7779_io_desc, ARRAY_SIZE(r8a7779_io_desc));
} }
static struct resource r8a7779_pfc_resources[] = {
[0] = {
.start = 0xfffc0000,
.end = 0xfffc023b,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 0xffc40000,
.end = 0xffc46fff,
.flags = IORESOURCE_MEM,
}
};
static struct platform_device r8a7779_pfc_device = {
.name = "pfc-r8a7779",
.id = -1,
.resource = r8a7779_pfc_resources,
.num_resources = ARRAY_SIZE(r8a7779_pfc_resources),
};
void __init r8a7779_pinmux_init(void)
{
platform_device_register(&r8a7779_pfc_device);
}
static struct plat_sci_port scif0_platform_data = { static struct plat_sci_port scif0_platform_data = {
.mapbase = 0xffe40000, .mapbase = 0xffe40000,
.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
......
...@@ -60,6 +60,32 @@ void __init sh7372_map_io(void) ...@@ -60,6 +60,32 @@ void __init sh7372_map_io(void)
iotable_init(sh7372_io_desc, ARRAY_SIZE(sh7372_io_desc)); iotable_init(sh7372_io_desc, ARRAY_SIZE(sh7372_io_desc));
} }
/* PFC */
static struct resource sh7372_pfc_resources[] = {
[0] = {
.start = 0xe6050000,
.end = 0xe6057fff,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 0xe605800c,
.end = 0xe6058027,
.flags = IORESOURCE_MEM,
}
};
static struct platform_device sh7372_pfc_device = {
.name = "pfc-sh7372",
.id = -1,
.resource = sh7372_pfc_resources,
.num_resources = ARRAY_SIZE(sh7372_pfc_resources),
};
void __init sh7372_pinmux_init(void)
{
platform_device_register(&sh7372_pfc_device);
}
/* SCIFA0 */ /* SCIFA0 */
static struct plat_sci_port scif0_platform_data = { static struct plat_sci_port scif0_platform_data = {
.mapbase = 0xe6c40000, .mapbase = 0xe6c40000,
......
...@@ -57,6 +57,31 @@ void __init sh73a0_map_io(void) ...@@ -57,6 +57,31 @@ void __init sh73a0_map_io(void)
iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc)); iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc));
} }
static struct resource sh73a0_pfc_resources[] = {
[0] = {
.start = 0xe6050000,
.end = 0xe6057fff,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 0xe605801c,
.end = 0xe6058027,
.flags = IORESOURCE_MEM,
}
};
static struct platform_device sh73a0_pfc_device = {
.name = "pfc-sh73a0",
.id = -1,
.resource = sh73a0_pfc_resources,
.num_resources = ARRAY_SIZE(sh73a0_pfc_resources),
};
void __init sh73a0_pinmux_init(void)
{
platform_device_register(&sh73a0_pfc_device);
}
static struct plat_sci_port scif0_platform_data = { static struct plat_sci_port scif0_platform_data = {
.mapbase = 0xe6c40000, .mapbase = 0xe6c40000,
.flags = UPF_BOOT_AUTOCONF, .flags = UPF_BOOT_AUTOCONF,
......
...@@ -276,6 +276,7 @@ config CPU_SUBTYPE_SH7203 ...@@ -276,6 +276,7 @@ config CPU_SUBTYPE_SH7203
select SYS_SUPPORTS_CMT select SYS_SUPPORTS_CMT
select SYS_SUPPORTS_MTU2 select SYS_SUPPORTS_MTU2
select ARCH_WANT_OPTIONAL_GPIOLIB select ARCH_WANT_OPTIONAL_GPIOLIB
select PINCTRL
config CPU_SUBTYPE_SH7206 config CPU_SUBTYPE_SH7206
bool "Support SH7206 processor" bool "Support SH7206 processor"
...@@ -296,6 +297,7 @@ config CPU_SUBTYPE_SH7264 ...@@ -296,6 +297,7 @@ config CPU_SUBTYPE_SH7264
select CPU_HAS_FPU select CPU_HAS_FPU
select SYS_SUPPORTS_CMT select SYS_SUPPORTS_CMT
select SYS_SUPPORTS_MTU2 select SYS_SUPPORTS_MTU2
select PINCTRL
config CPU_SUBTYPE_SH7269 config CPU_SUBTYPE_SH7269
bool "Support SH7269 processor" bool "Support SH7269 processor"
...@@ -303,6 +305,7 @@ config CPU_SUBTYPE_SH7269 ...@@ -303,6 +305,7 @@ config CPU_SUBTYPE_SH7269
select CPU_HAS_FPU select CPU_HAS_FPU
select SYS_SUPPORTS_CMT select SYS_SUPPORTS_CMT
select SYS_SUPPORTS_MTU2 select SYS_SUPPORTS_MTU2
select PINCTRL
config CPU_SUBTYPE_MXG config CPU_SUBTYPE_MXG
bool "Support MX-G processor" bool "Support MX-G processor"
...@@ -364,6 +367,7 @@ config CPU_SUBTYPE_SH7720 ...@@ -364,6 +367,7 @@ config CPU_SUBTYPE_SH7720
select ARCH_WANT_OPTIONAL_GPIOLIB select ARCH_WANT_OPTIONAL_GPIOLIB
select USB_ARCH_HAS_OHCI select USB_ARCH_HAS_OHCI
select USB_OHCI_SH if USB_OHCI_HCD select USB_OHCI_SH if USB_OHCI_HCD
select PINCTRL
help help
Select SH7720 if you have a SH3-DSP SH7720 CPU. Select SH7720 if you have a SH3-DSP SH7720 CPU.
...@@ -429,6 +433,7 @@ config CPU_SUBTYPE_SH7723 ...@@ -429,6 +433,7 @@ config CPU_SUBTYPE_SH7723
select ARCH_SPARSEMEM_ENABLE select ARCH_SPARSEMEM_ENABLE
select SYS_SUPPORTS_CMT select SYS_SUPPORTS_CMT
select ARCH_WANT_OPTIONAL_GPIOLIB select ARCH_WANT_OPTIONAL_GPIOLIB
select PINCTRL
help help
Select SH7723 if you have an SH-MobileR2 CPU. Select SH7723 if you have an SH-MobileR2 CPU.
...@@ -440,6 +445,7 @@ config CPU_SUBTYPE_SH7724 ...@@ -440,6 +445,7 @@ config CPU_SUBTYPE_SH7724
select ARCH_SPARSEMEM_ENABLE select ARCH_SPARSEMEM_ENABLE
select SYS_SUPPORTS_CMT select SYS_SUPPORTS_CMT
select ARCH_WANT_OPTIONAL_GPIOLIB select ARCH_WANT_OPTIONAL_GPIOLIB
select PINCTRL
help help
Select SH7724 if you have an SH-MobileR2R CPU. Select SH7724 if you have an SH-MobileR2R CPU.
...@@ -450,6 +456,7 @@ config CPU_SUBTYPE_SH7734 ...@@ -450,6 +456,7 @@ config CPU_SUBTYPE_SH7734
select ARCH_WANT_OPTIONAL_GPIOLIB select ARCH_WANT_OPTIONAL_GPIOLIB
select USB_ARCH_HAS_OHCI select USB_ARCH_HAS_OHCI
select USB_ARCH_HAS_EHCI select USB_ARCH_HAS_EHCI
select PINCTRL
help help
Select SH7734 if you have a SH4A SH7734 CPU. Select SH7734 if you have a SH4A SH7734 CPU.
...@@ -460,6 +467,7 @@ config CPU_SUBTYPE_SH7757 ...@@ -460,6 +467,7 @@ config CPU_SUBTYPE_SH7757
select ARCH_WANT_OPTIONAL_GPIOLIB select ARCH_WANT_OPTIONAL_GPIOLIB
select USB_ARCH_HAS_OHCI select USB_ARCH_HAS_OHCI
select USB_ARCH_HAS_EHCI select USB_ARCH_HAS_EHCI
select PINCTRL
help help
Select SH7757 if you have a SH4A SH7757 CPU. Select SH7757 if you have a SH4A SH7757 CPU.
...@@ -486,6 +494,7 @@ config CPU_SUBTYPE_SH7785 ...@@ -486,6 +494,7 @@ config CPU_SUBTYPE_SH7785
select ARCH_SPARSEMEM_ENABLE select ARCH_SPARSEMEM_ENABLE
select SYS_SUPPORTS_NUMA select SYS_SUPPORTS_NUMA
select ARCH_WANT_OPTIONAL_GPIOLIB select ARCH_WANT_OPTIONAL_GPIOLIB
select PINCTRL
config CPU_SUBTYPE_SH7786 config CPU_SUBTYPE_SH7786
bool "Support SH7786 processor" bool "Support SH7786 processor"
...@@ -498,6 +507,7 @@ config CPU_SUBTYPE_SH7786 ...@@ -498,6 +507,7 @@ config CPU_SUBTYPE_SH7786
select USB_OHCI_SH if USB_OHCI_HCD select USB_OHCI_SH if USB_OHCI_HCD
select USB_ARCH_HAS_EHCI select USB_ARCH_HAS_EHCI
select USB_EHCI_SH if USB_EHCI_HCD select USB_EHCI_SH if USB_EHCI_HCD
select PINCTRL
config CPU_SUBTYPE_SHX3 config CPU_SUBTYPE_SHX3
bool "Support SH-X3 processor" bool "Support SH-X3 processor"
...@@ -505,6 +515,7 @@ config CPU_SUBTYPE_SHX3 ...@@ -505,6 +515,7 @@ config CPU_SUBTYPE_SHX3
select CPU_SHX3 select CPU_SHX3
select GENERIC_CLOCKEVENTS_BROADCAST if SMP select GENERIC_CLOCKEVENTS_BROADCAST if SMP
select ARCH_REQUIRE_GPIOLIB select ARCH_REQUIRE_GPIOLIB
select PINCTRL
# SH4AL-DSP Processor Support # SH4AL-DSP Processor Support
...@@ -523,6 +534,7 @@ config CPU_SUBTYPE_SH7722 ...@@ -523,6 +534,7 @@ config CPU_SUBTYPE_SH7722
select SYS_SUPPORTS_NUMA select SYS_SUPPORTS_NUMA
select SYS_SUPPORTS_CMT select SYS_SUPPORTS_CMT
select ARCH_WANT_OPTIONAL_GPIOLIB select ARCH_WANT_OPTIONAL_GPIOLIB
select PINCTRL
config CPU_SUBTYPE_SH7366 config CPU_SUBTYPE_SH7366
bool "Support SH7366 processor" bool "Support SH7366 processor"
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#endif #endif
#define ARCH_NR_GPIOS 512 #define ARCH_NR_GPIOS 512
#include <linux/sh_pfc.h> #include <asm-generic/gpio.h>
#ifdef CONFIG_GPIOLIB #ifdef CONFIG_GPIOLIB
......
/*
* SH Pin Function Control Initialization
*
* Copyright (C) 2012 Renesas Solutions Corp.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __ARCH_SH_CPU_PFC_H__
#define __ARCH_SH_CPU_PFC_H__
#include <linux/types.h>
struct resource;
int sh_pfc_register(const char *name,
struct resource *resource, u32 num_resources);
#endif /* __ARCH_SH_CPU_PFC_H__ */
...@@ -184,7 +184,7 @@ enum { ...@@ -184,7 +184,7 @@ enum {
/* SIUA */ /* SIUA */
GPIO_FN_SIUAFCK, GPIO_FN_SIUAILR, GPIO_FN_SIUAIBT, GPIO_FN_SIUAISLD, GPIO_FN_SIUAFCK, GPIO_FN_SIUAILR, GPIO_FN_SIUAIBT, GPIO_FN_SIUAISLD,
GPIO_FN_SIUAOLR, GPIO_FN_SIUAOBT, GPIO_FN_SIUAOSLD, GPIO_FN_SIUAMCK, GPIO_FN_SIUAOLR, GPIO_FN_SIUAOBT, GPIO_FN_SIUAOSLD, GPIO_FN_SIUAMCK,
GPIO_FN_SIUAISPD, GPIO_FN_SIUOSPD, GPIO_FN_SIUAISPD, GPIO_FN_SIUAOSPD,
/* SIUB */ /* SIUB */
GPIO_FN_SIUBFCK, GPIO_FN_SIUBILR, GPIO_FN_SIUBIBT, GPIO_FN_SIUBISLD, GPIO_FN_SIUBFCK, GPIO_FN_SIUBILR, GPIO_FN_SIUBIBT, GPIO_FN_SIUBISLD,
......
...@@ -32,16 +32,14 @@ enum { ...@@ -32,16 +32,14 @@ enum {
GPIO_PD3, GPIO_PD2, GPIO_PD1, GPIO_PD0, GPIO_PD3, GPIO_PD2, GPIO_PD1, GPIO_PD0,
/* PE */ /* PE */
GPIO_PE5, GPIO_PE4, GPIO_PE3, GPIO_PE2, GPIO_PE7, GPIO_PE6,
GPIO_PE1, GPIO_PE0,
/* PF */ /* PF */
GPIO_PF7, GPIO_PF6, GPIO_PF5, GPIO_PF4, GPIO_PF7, GPIO_PF6, GPIO_PF5, GPIO_PF4,
GPIO_PF3, GPIO_PF2, GPIO_PF1, GPIO_PF0, GPIO_PF3, GPIO_PF2, GPIO_PF1, GPIO_PF0,
/* PG */ /* PG */
GPIO_PG7, GPIO_PG6, GPIO_PG5, GPIO_PG4, GPIO_PG7, GPIO_PG6, GPIO_PG5,
GPIO_PG3, GPIO_PG2, GPIO_PG1, GPIO_PG0,
/* PH */ /* PH */
GPIO_PH7, GPIO_PH6, GPIO_PH5, GPIO_PH4, GPIO_PH7, GPIO_PH6, GPIO_PH5, GPIO_PH4,
...@@ -49,7 +47,7 @@ enum { ...@@ -49,7 +47,7 @@ enum {
/* PJ */ /* PJ */
GPIO_PJ7, GPIO_PJ6, GPIO_PJ5, GPIO_PJ4, GPIO_PJ7, GPIO_PJ6, GPIO_PJ5, GPIO_PJ4,
GPIO_PJ3, GPIO_PJ2, GPIO_PJ1, GPIO_PJ0, GPIO_PJ3, GPIO_PJ2, GPIO_PJ1,
/* DU */ /* DU */
GPIO_FN_DCLKIN, GPIO_FN_DCLKOUT, GPIO_FN_ODDF, GPIO_FN_DCLKIN, GPIO_FN_DCLKOUT, GPIO_FN_ODDF,
......
...@@ -18,4 +18,4 @@ obj-$(CONFIG_ARCH_SHMOBILE) += shmobile/ ...@@ -18,4 +18,4 @@ obj-$(CONFIG_ARCH_SHMOBILE) += shmobile/
obj-$(CONFIG_SH_ADC) += adc.o obj-$(CONFIG_SH_ADC) += adc.o
obj-$(CONFIG_SH_CLK_CPG_LEGACY) += clock-cpg.o obj-$(CONFIG_SH_CLK_CPG_LEGACY) += clock-cpg.o
obj-y += irq/ init.o clock.o fpu.o proc.o obj-y += irq/ init.o clock.o fpu.o pfc.o proc.o
/*
* SH Pin Function Control Initialization
*
* Copyright (C) 2012 Renesas Solutions Corp.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/init.h>
#include <linux/platform_device.h>
#include <cpu/pfc.h>
static struct platform_device sh_pfc_device = {
.id = -1,
};
int __init sh_pfc_register(const char *name,
struct resource *resource, u32 num_resources)
{
sh_pfc_device.name = name;
sh_pfc_device.num_resources = num_resources;
sh_pfc_device.resource = resource;
return platform_device_register(&sh_pfc_device);
}
...@@ -196,7 +196,7 @@ config PINCTRL_EXYNOS5440 ...@@ -196,7 +196,7 @@ config PINCTRL_EXYNOS5440
select PINCONF select PINCONF
source "drivers/pinctrl/mvebu/Kconfig" source "drivers/pinctrl/mvebu/Kconfig"
source "drivers/pinctrl/sh-pfc/Kconfig"
source "drivers/pinctrl/spear/Kconfig" source "drivers/pinctrl/spear/Kconfig"
config PINCTRL_XWAY config PINCTRL_XWAY
......
...@@ -42,4 +42,6 @@ obj-$(CONFIG_PINCTRL_XWAY) += pinctrl-xway.o ...@@ -42,4 +42,6 @@ obj-$(CONFIG_PINCTRL_XWAY) += pinctrl-xway.o
obj-$(CONFIG_PINCTRL_LANTIQ) += pinctrl-lantiq.o obj-$(CONFIG_PINCTRL_LANTIQ) += pinctrl-lantiq.o
obj-$(CONFIG_PLAT_ORION) += mvebu/ obj-$(CONFIG_PLAT_ORION) += mvebu/
obj-$(CONFIG_ARCH_SHMOBILE) += sh-pfc/
obj-$(CONFIG_SUPERH) += sh-pfc/
obj-$(CONFIG_PLAT_SPEAR) += spear/ obj-$(CONFIG_PLAT_SPEAR) += spear/
此差异已折叠。
sh-pfc-objs = core.o pinctrl.o
ifeq ($(CONFIG_GPIO_SH_PFC),y)
sh-pfc-objs += gpio.o
endif
obj-$(CONFIG_PINCTRL_SH_PFC) += sh-pfc.o
obj-$(CONFIG_PINCTRL_PFC_R8A7740) += pfc-r8a7740.o
obj-$(CONFIG_PINCTRL_PFC_R8A7779) += pfc-r8a7779.o
obj-$(CONFIG_PINCTRL_PFC_SH7203) += pfc-sh7203.o
obj-$(CONFIG_PINCTRL_PFC_SH7264) += pfc-sh7264.o
obj-$(CONFIG_PINCTRL_PFC_SH7269) += pfc-sh7269.o
obj-$(CONFIG_PINCTRL_PFC_SH7372) += pfc-sh7372.o
obj-$(CONFIG_PINCTRL_PFC_SH73A0) += pfc-sh73a0.o
obj-$(CONFIG_PINCTRL_PFC_SH7720) += pfc-sh7720.o
obj-$(CONFIG_PINCTRL_PFC_SH7722) += pfc-sh7722.o
obj-$(CONFIG_PINCTRL_PFC_SH7723) += pfc-sh7723.o
obj-$(CONFIG_PINCTRL_PFC_SH7724) += pfc-sh7724.o
obj-$(CONFIG_PINCTRL_PFC_SH7734) += pfc-sh7734.o
obj-$(CONFIG_PINCTRL_PFC_SH7757) += pfc-sh7757.o
obj-$(CONFIG_PINCTRL_PFC_SH7785) += pfc-sh7785.o
obj-$(CONFIG_PINCTRL_PFC_SH7786) += pfc-sh7786.o
obj-$(CONFIG_PINCTRL_PFC_SHX3) += pfc-shx3.o
/*
* SuperH Pin Function Controller support.
*
* Copyright (C) 2012 Renesas Solutions Corp.
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#ifndef __SH_PFC_CORE_H__
#define __SH_PFC_CORE_H__
#include <linux/compiler.h>
#include <linux/types.h>
#include "sh_pfc.h"
struct sh_pfc_window {
phys_addr_t phys;
void __iomem *virt;
unsigned long size;
};
struct sh_pfc_chip;
struct sh_pfc_pinctrl;
struct sh_pfc {
struct device *dev;
struct sh_pfc_soc_info *info;
spinlock_t lock;
unsigned int num_windows;
struct sh_pfc_window *window;
struct sh_pfc_chip *gpio;
struct sh_pfc_pinctrl *pinctrl;
};
int sh_pfc_register_gpiochip(struct sh_pfc *pfc);
int sh_pfc_unregister_gpiochip(struct sh_pfc *pfc);
int sh_pfc_register_pinctrl(struct sh_pfc *pfc);
int sh_pfc_unregister_pinctrl(struct sh_pfc *pfc);
int sh_pfc_read_bit(struct pinmux_data_reg *dr, unsigned long in_pos);
void sh_pfc_write_bit(struct pinmux_data_reg *dr, unsigned long in_pos,
unsigned long value);
int sh_pfc_get_data_reg(struct sh_pfc *pfc, unsigned gpio,
struct pinmux_data_reg **drp, int *bitp);
int sh_pfc_gpio_to_enum(struct sh_pfc *pfc, unsigned gpio, int pos,
pinmux_enum_t *enum_idp);
int sh_pfc_config_gpio(struct sh_pfc *pfc, unsigned gpio, int pinmux_type,
int cfg_mode);
extern struct sh_pfc_soc_info r8a7740_pinmux_info;
extern struct sh_pfc_soc_info r8a7779_pinmux_info;
extern struct sh_pfc_soc_info sh7203_pinmux_info;
extern struct sh_pfc_soc_info sh7264_pinmux_info;
extern struct sh_pfc_soc_info sh7269_pinmux_info;
extern struct sh_pfc_soc_info sh7372_pinmux_info;
extern struct sh_pfc_soc_info sh73a0_pinmux_info;
extern struct sh_pfc_soc_info sh7720_pinmux_info;
extern struct sh_pfc_soc_info sh7722_pinmux_info;
extern struct sh_pfc_soc_info sh7723_pinmux_info;
extern struct sh_pfc_soc_info sh7724_pinmux_info;
extern struct sh_pfc_soc_info sh7734_pinmux_info;
extern struct sh_pfc_soc_info sh7757_pinmux_info;
extern struct sh_pfc_soc_info sh7785_pinmux_info;
extern struct sh_pfc_soc_info sh7786_pinmux_info;
extern struct sh_pfc_soc_info shx3_pinmux_info;
#endif /* __SH_PFC_CORE_H__ */
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
obj-y += core.o
obj-$(CONFIG_PINCTRL_SH_PFC) += pinctrl.o
obj-$(CONFIG_GPIO_SH_PFC) += gpio.o
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册