treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441
[linux-block.git] / arch / x86 / platform / intel-mid / device_libs / platform_msic_ocd.c
CommitLineData
b886d83c 1// SPDX-License-Identifier: GPL-2.0-only
40a96d54 2/*
6a6256f9 3 * platform_msic_ocd.c: MSIC OCD platform data initialization file
40a96d54
DC
4 *
5 * (C) Copyright 2013 Intel Corporation
6 * Author: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com>
40a96d54
DC
7 */
8
9#include <linux/kernel.h>
10#include <linux/interrupt.h>
11#include <linux/scatterlist.h>
12#include <linux/sfi.h>
13#include <linux/init.h>
14#include <linux/gpio.h>
15#include <linux/mfd/intel_msic.h>
16#include <asm/intel-mid.h>
17
18#include "platform_msic.h"
40a96d54
DC
19
20static void __init *msic_ocd_platform_data(void *info)
21{
22 static struct intel_msic_ocd_pdata msic_ocd_pdata;
23 int gpio;
24
25 gpio = get_gpio_by_name("ocd_gpio");
26
27 if (gpio < 0)
28 return NULL;
29
30 msic_ocd_pdata.gpio = gpio;
31 msic_pdata.ocd = &msic_ocd_pdata;
32
33 return msic_generic_platform_data(info, INTEL_MSIC_BLOCK_OCD);
34}
35
36static const struct devs_id msic_ocd_dev_id __initconst = {
37 .name = "msic_ocd",
38 .type = SFI_DEV_TYPE_IPC,
39 .delay = 1,
a01b3391 40 .msic = 1,
40a96d54 41 .get_platform_data = &msic_ocd_platform_data,
40a96d54
DC
42};
43
44sfi_device(msic_ocd_dev_id);