Skip to content
Snippets Groups Projects
Select Git revision
  • 74c3f5da233637bdf828e1ce67a5c1083630a47b
  • drm-misc-templates default
  • wip/final/kci-gitlab-lava-v1
  • wip/vignesh/kci-lava-gitlab-runner
  • kci-gitlab-igt-v8
  • kci-gitlab-igt-v4
  • drm-misc-fixes-2024-10-02
  • drm-misc-next-2024-09-26
  • drm-misc-fixes-2024-09-26
  • drm-misc-next-2024-09-20
  • drm-misc-fixes-2024-09-12
  • drm-misc-fixes-2024-09-05
  • drm-misc-next-fixes-2024-09-05
  • drm-misc-fixes-2024-08-29
  • drm-misc-next-2024-08-29
  • drm-misc-next-2024-08-22
  • drm-misc-fixes-2024-08-22
  • drm-misc-next-2024-08-16
  • drm-misc-fixes-2024-08-15
  • drm-misc-next-2024-08-09
  • drm-misc-fixes-2024-08-08
  • drm-misc-next-2024-08-01
  • drm-misc-fixes-2024-08-01
  • drm-misc-next-fixes-2024-07-25
  • drm-misc-next-fixes-2024-07-19
  • drm-misc-next-fixes-2024-07-11
26 results

drm_dsc_helper.c

Blame
  • intel_pmc_ipc.c 17.71 KiB
    /*
     * intel_pmc_ipc.c: Driver for the Intel PMC IPC mechanism
     *
     * (C) Copyright 2014-2015 Intel Corporation
     *
     * This driver is based on Intel SCU IPC driver(intel_scu_opc.c) by
     *     Sreedhara DS <sreedhara.ds@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.
     *
     * PMC running in ARC processor communicates with other entity running in IA
     * core through IPC mechanism which in turn messaging between IA core ad PMC.
     */
    
    #include <linux/module.h>
    #include <linux/delay.h>
    #include <linux/errno.h>
    #include <linux/init.h>
    #include <linux/device.h>
    #include <linux/pm.h>
    #include <linux/pci.h>
    #include <linux/platform_device.h>
    #include <linux/interrupt.h>
    #include <linux/pm_qos.h>
    #include <linux/kernel.h>
    #include <linux/bitops.h>
    #include <linux/sched.h>
    #include <linux/atomic.h>
    #include <linux/notifier.h>
    #include <linux/suspend.h>
    #include <linux/acpi.h>
    #include <asm/intel_pmc_ipc.h>
    #include <linux/mfd/lpc_ich.h>
    
    /*
     * IPC registers
     * The IA write to IPC_CMD command register triggers an interrupt to the ARC,
     * The ARC handles the interrupt and services it, writing optional data to
     * the IPC1 registers, updates the IPC_STS response register with the status.
     */
    #define IPC_CMD			0x0
    #define		IPC_CMD_MSI		0x100
    #define		IPC_CMD_SIZE		16
    #define		IPC_CMD_SUBCMD		12
    #define IPC_STATUS		0x04
    #define		IPC_STATUS_IRQ		0x4
    #define		IPC_STATUS_ERR		0x2
    #define		IPC_STATUS_BUSY		0x1
    #define IPC_SPTR		0x08
    #define IPC_DPTR		0x0C
    #define IPC_WRITE_BUFFER	0x80
    #define IPC_READ_BUFFER		0x90
    
    /*
     * 16-byte buffer for sending data associated with IPC command.
     */
    #define IPC_DATA_BUFFER_SIZE	16
    
    #define IPC_LOOP_CNT		3000000
    #define IPC_MAX_SEC		3
    
    #define IPC_TRIGGER_MODE_IRQ		true
    
    /* exported resources from IFWI */
    #define PLAT_RESOURCE_IPC_INDEX		0
    #define PLAT_RESOURCE_IPC_SIZE		0x1000
    #define PLAT_RESOURCE_GCR_SIZE		0x1000