~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/x86/platform/intel-mid/device_libs/platform_ipc.c

Version: ~ [ linux-5.4-rc7 ] ~ [ linux-5.3.10 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.83 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.153 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.200 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.200 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.76 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * platform_ipc.c: IPC platform library file
  3  *
  4  * (C) Copyright 2013 Intel Corporation
  5  * Author: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com>
  6  *
  7  * This program is free software; you can redistribute it and/or
  8  * modify it under the terms of the GNU General Public License
  9  * as published by the Free Software Foundation; version 2
 10  * of the License.
 11  */
 12 
 13 #include <linux/init.h>
 14 #include <linux/kernel.h>
 15 #include <linux/interrupt.h>
 16 #include <linux/sfi.h>
 17 #include <linux/gpio.h>
 18 #include <asm/intel-mid.h>
 19 #include "platform_ipc.h"
 20 
 21 void __init ipc_device_handler(struct sfi_device_table_entry *pentry,
 22                                 struct devs_id *dev)
 23 {
 24         struct platform_device *pdev;
 25         void *pdata = NULL;
 26         static struct resource res __initdata = {
 27                 .name = "IRQ",
 28                 .flags = IORESOURCE_IRQ,
 29         };
 30 
 31         pr_debug("IPC bus, name = %16.16s, irq = 0x%2x\n",
 32                 pentry->name, pentry->irq);
 33 
 34         /*
 35          * We need to call platform init of IPC devices to fill misc_pdata
 36          * structure. It will be used in msic_init for initialization.
 37          */
 38         if (dev != NULL)
 39                 pdata = dev->get_platform_data(pentry);
 40 
 41         /*
 42          * On Medfield the platform device creation is handled by the MSIC
 43          * MFD driver so we don't need to do it here.
 44          */
 45         if (intel_mid_has_msic())
 46                 return;
 47 
 48         pdev = platform_device_alloc(pentry->name, 0);
 49         if (pdev == NULL) {
 50                 pr_err("out of memory for SFI platform device '%s'.\n",
 51                         pentry->name);
 52                 return;
 53         }
 54         res.start = pentry->irq;
 55         platform_device_add_resources(pdev, &res, 1);
 56 
 57         pdev->dev.platform_data = pdata;
 58         intel_scu_device_register(pdev);
 59 }
 60 
 61 static const struct devs_id pmic_audio_dev_id __initconst = {
 62         .name = "pmic_audio",
 63         .type = SFI_DEV_TYPE_IPC,
 64         .delay = 1,
 65         .device_handler = &ipc_device_handler,
 66 };
 67 
 68 sfi_device(pmic_audio_dev_id);
 69 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp