diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2016-06-29 15:01:34 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-07-01 04:12:39 -0400 |
commit | 0519e8b4cb2bda598f941088948129f9fe9e6acd (patch) | |
tree | eef6612b0457c30d53fb4293b69f8a4710ac42e9 | |
parent | 00688272157d83e48d1369d7d11c479571324e40 (diff) |
x86/platform/intel-mid: Add pinctrl for Intel Merrifield
Intel Merrifield uses a special address space reserved for Family-Level
Interface Shim (FLIS) that allows consumers to mux and configure pins.
Create a platform device for it.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1467226894-107109-1-git-send-email-andriy.shevchenko@linux.intel.com
[ Fixed typo. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/platform/intel-mid/device_libs/Makefile | 2 | ||||
-rw-r--r-- | arch/x86/platform/intel-mid/device_libs/platform_mrfld_pinctrl.c | 43 |
2 files changed, 45 insertions, 0 deletions
diff --git a/arch/x86/platform/intel-mid/device_libs/Makefile b/arch/x86/platform/intel-mid/device_libs/Makefile index abe8ba87c970..79e97ed5be5b 100644 --- a/arch/x86/platform/intel-mid/device_libs/Makefile +++ b/arch/x86/platform/intel-mid/device_libs/Makefile | |||
@@ -1,3 +1,5 @@ | |||
1 | # Family-Level Interface Shim (FLIS) | ||
2 | obj-$(subst m,y,$(CONFIG_PINCTRL_MERRIFIELD)) += platform_mrfld_pinctrl.o | ||
1 | # IPC Devices | 3 | # IPC Devices |
2 | obj-y += platform_ipc.o | 4 | obj-y += platform_ipc.o |
3 | obj-$(subst m,y,$(CONFIG_MFD_INTEL_MSIC)) += platform_msic.o | 5 | obj-$(subst m,y,$(CONFIG_MFD_INTEL_MSIC)) += platform_msic.o |
diff --git a/arch/x86/platform/intel-mid/device_libs/platform_mrfld_pinctrl.c b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_pinctrl.c new file mode 100644 index 000000000000..4de8a664e6a1 --- /dev/null +++ b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_pinctrl.c | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * Intel Merrifield FLIS platform device initialization file | ||
3 | * | ||
4 | * Copyright (C) 2016, Intel Corporation | ||
5 | * | ||
6 | * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; version 2 | ||
11 | * of the License. | ||
12 | */ | ||
13 | |||
14 | #include <linux/init.h> | ||
15 | #include <linux/ioport.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | |||
18 | #include <asm/intel-mid.h> | ||
19 | |||
20 | #define FLIS_BASE_ADDR 0xff0c0000 | ||
21 | #define FLIS_LENGTH 0x8000 | ||
22 | |||
23 | static struct resource mrfld_pinctrl_mmio_resource = { | ||
24 | .start = FLIS_BASE_ADDR, | ||
25 | .end = FLIS_BASE_ADDR + FLIS_LENGTH - 1, | ||
26 | .flags = IORESOURCE_MEM, | ||
27 | }; | ||
28 | |||
29 | static struct platform_device mrfld_pinctrl_device = { | ||
30 | .name = "pinctrl-merrifield", | ||
31 | .id = PLATFORM_DEVID_NONE, | ||
32 | .resource = &mrfld_pinctrl_mmio_resource, | ||
33 | .num_resources = 1, | ||
34 | }; | ||
35 | |||
36 | static int __init mrfld_pinctrl_init(void) | ||
37 | { | ||
38 | if (intel_mid_identify_cpu() == INTEL_MID_CPU_CHIP_TANGIER) | ||
39 | return platform_device_register(&mrfld_pinctrl_device); | ||
40 | |||
41 | return -ENODEV; | ||
42 | } | ||
43 | arch_initcall(mrfld_pinctrl_init); | ||