]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - arch/x86/platform/intel-mid/device_libs/platform_mrfld_pinctrl.c
Merge branch 'for-4.8/core' of git://git.kernel.dk/linux-block
[karo-tx-linux.git] / arch / x86 / platform / intel-mid / device_libs / platform_mrfld_pinctrl.c
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);