Commit 0519e8b4 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Ingo Molnar

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: default avatarAndy 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: default avatarIngo Molnar <mingo@kernel.org>
parent 00688272
# Family-Level Interface Shim (FLIS)
obj-$(subst m,y,$(CONFIG_PINCTRL_MERRIFIELD)) += platform_mrfld_pinctrl.o
# IPC Devices # IPC Devices
obj-y += platform_ipc.o obj-y += platform_ipc.o
obj-$(subst m,y,$(CONFIG_MFD_INTEL_MSIC)) += platform_msic.o obj-$(subst m,y,$(CONFIG_MFD_INTEL_MSIC)) += platform_msic.o
......
/*
* Intel Merrifield FLIS platform device initialization file
*
* Copyright (C) 2016, Intel Corporation
*
* Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
*
* 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.
*/
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/platform_device.h>
#include <asm/intel-mid.h>
#define FLIS_BASE_ADDR 0xff0c0000
#define FLIS_LENGTH 0x8000
static struct resource mrfld_pinctrl_mmio_resource = {
.start = FLIS_BASE_ADDR,
.end = FLIS_BASE_ADDR + FLIS_LENGTH - 1,
.flags = IORESOURCE_MEM,
};
static struct platform_device mrfld_pinctrl_device = {
.name = "pinctrl-merrifield",
.id = PLATFORM_DEVID_NONE,
.resource = &mrfld_pinctrl_mmio_resource,
.num_resources = 1,
};
static int __init mrfld_pinctrl_init(void)
{
if (intel_mid_identify_cpu() == INTEL_MID_CPU_CHIP_TANGIER)
return platform_device_register(&mrfld_pinctrl_device);
return -ENODEV;
}
arch_initcall(mrfld_pinctrl_init);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment