aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/Kconfig22
-rw-r--r--drivers/platform/x86/Makefile1
-rw-r--r--drivers/platform/x86/intel_rar_register.c (renamed from drivers/staging/rar_register/rar_register.c)8
-rw-r--r--drivers/staging/Kconfig2
-rw-r--r--drivers/staging/Makefile1
-rw-r--r--drivers/staging/memrar/memrar_handler.c3
-rw-r--r--drivers/staging/rar_register/Kconfig30
-rw-r--r--drivers/staging/rar_register/Makefile2
-rw-r--r--drivers/staging/rar_register/rar_register.h44
9 files changed, 26 insertions, 87 deletions
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 724b2ed1a3cb..2f173bc0ff05 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -539,6 +539,28 @@ config INTEL_SCU_IPC
539 some embedded Intel x86 platforms. This is not needed for PC-type 539 some embedded Intel x86 platforms. This is not needed for PC-type
540 machines. 540 machines.
541 541
542config RAR_REGISTER
543 bool "Restricted Access Region Register Driver"
544 depends on PCI && X86_MRST
545 default n
546 ---help---
547 This driver allows other kernel drivers access to the
548 contents of the restricted access region control registers.
549
550 The restricted access region control registers
551 (rar_registers) are used to pass address and
552 locking information on restricted access regions
553 to other drivers that use restricted access regions.
554
555 The restricted access regions are regions of memory
556 on the Intel MID Platform that are not accessible to
557 the x86 processor, but are accessible to dedicated
558 processors on board peripheral devices.
559
560 The purpose of the restricted access regions is to
561 protect sensitive data from compromise by unauthorized
562 programs running on the x86 processor.
563
542config INTEL_IPS 564config INTEL_IPS
543 tristate "Intel Intelligent Power Sharing" 565 tristate "Intel Intelligent Power Sharing"
544 depends on ACPI 566 depends on ACPI
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 7318fc2c1629..ed50eca1b556 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -26,4 +26,5 @@ obj-$(CONFIG_TOPSTAR_LAPTOP) += topstar-laptop.o
26obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o 26obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o
27obj-$(CONFIG_TOSHIBA_BT_RFKILL) += toshiba_bluetooth.o 27obj-$(CONFIG_TOSHIBA_BT_RFKILL) += toshiba_bluetooth.o
28obj-$(CONFIG_INTEL_SCU_IPC) += intel_scu_ipc.o 28obj-$(CONFIG_INTEL_SCU_IPC) += intel_scu_ipc.o
29obj-$(CONFIG_RAR_REGISTER) += intel_rar_register.o
29obj-$(CONFIG_INTEL_IPS) += intel_ips.o 30obj-$(CONFIG_INTEL_IPS) += intel_ips.o
diff --git a/drivers/staging/rar_register/rar_register.c b/drivers/platform/x86/intel_rar_register.c
index 618503f422ef..73f8e6d72669 100644
--- a/drivers/staging/rar_register/rar_register.c
+++ b/drivers/platform/x86/intel_rar_register.c
@@ -40,15 +40,12 @@
40 * Initial publish 40 * Initial publish
41 */ 41 */
42 42
43#define DEBUG 1
44
45#include "rar_register.h"
46
47#include <linux/module.h> 43#include <linux/module.h>
48#include <linux/pci.h> 44#include <linux/pci.h>
49#include <linux/spinlock.h> 45#include <linux/spinlock.h>
50#include <linux/device.h> 46#include <linux/device.h>
51#include <linux/kernel.h> 47#include <linux/kernel.h>
48#include <linux/rar_register.h>
52 49
53/* === Lincroft Message Bus Interface === */ 50/* === Lincroft Message Bus Interface === */
54#define LNC_MCR_OFFSET 0xD0 /* Message Control Register */ 51#define LNC_MCR_OFFSET 0xD0 /* Message Control Register */
@@ -155,7 +152,6 @@ static struct rar_device *_rar_to_device(int rar, int *off)
155 return NULL; 152 return NULL;
156} 153}
157 154
158
159/** 155/**
160 * rar_to_device - return the device handling this RAR 156 * rar_to_device - return the device handling this RAR
161 * @rar: RAR number 157 * @rar: RAR number
@@ -496,7 +492,7 @@ EXPORT_SYMBOL(rar_lock);
496 * a driver that do require a valid RAR address. One of those 492 * a driver that do require a valid RAR address. One of those
497 * steps would be to call rar_get_address() 493 * steps would be to call rar_get_address()
498 * 494 *
499 * This function return 0 on success an error code on failure. 495 * This function return 0 on success or an error code on failure.
500 */ 496 */
501int register_rar(int num, int (*callback)(unsigned long data), 497int register_rar(int num, int (*callback)(unsigned long data),
502 unsigned long data) 498 unsigned long data)
diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index 984a75440710..9dfef8a59974 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -109,8 +109,6 @@ source "drivers/staging/hv/Kconfig"
109 109
110source "drivers/staging/vme/Kconfig" 110source "drivers/staging/vme/Kconfig"
111 111
112source "drivers/staging/rar_register/Kconfig"
113
114source "drivers/staging/memrar/Kconfig" 112source "drivers/staging/memrar/Kconfig"
115 113
116source "drivers/staging/sep/Kconfig" 114source "drivers/staging/sep/Kconfig"
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 9fa25133874a..3dbf681ca64e 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -35,7 +35,6 @@ obj-$(CONFIG_VT6656) += vt6656/
35obj-$(CONFIG_FB_UDL) += udlfb/ 35obj-$(CONFIG_FB_UDL) += udlfb/
36obj-$(CONFIG_HYPERV) += hv/ 36obj-$(CONFIG_HYPERV) += hv/
37obj-$(CONFIG_VME_BUS) += vme/ 37obj-$(CONFIG_VME_BUS) += vme/
38obj-$(CONFIG_RAR_REGISTER) += rar_register/
39obj-$(CONFIG_MRST_RAR_HANDLER) += memrar/ 38obj-$(CONFIG_MRST_RAR_HANDLER) += memrar/
40obj-$(CONFIG_DX_SEP) += sep/ 39obj-$(CONFIG_DX_SEP) += sep/
41obj-$(CONFIG_IIO) += iio/ 40obj-$(CONFIG_IIO) += iio/
diff --git a/drivers/staging/memrar/memrar_handler.c b/drivers/staging/memrar/memrar_handler.c
index efa7fd62d390..41876f2b0e54 100644
--- a/drivers/staging/memrar/memrar_handler.c
+++ b/drivers/staging/memrar/memrar_handler.c
@@ -47,8 +47,7 @@
47#include <linux/mm.h> 47#include <linux/mm.h>
48#include <linux/ioport.h> 48#include <linux/ioport.h>
49#include <linux/io.h> 49#include <linux/io.h>
50 50#include <linux/rar_register.h>
51#include "../rar_register/rar_register.h"
52 51
53#include "memrar.h" 52#include "memrar.h"
54#include "memrar_allocator.h" 53#include "memrar_allocator.h"
diff --git a/drivers/staging/rar_register/Kconfig b/drivers/staging/rar_register/Kconfig
deleted file mode 100644
index e9c27738199b..000000000000
--- a/drivers/staging/rar_register/Kconfig
+++ /dev/null
@@ -1,30 +0,0 @@
1#
2# RAR device configuration
3#
4
5menu "RAR Register Driver"
6#
7# Restricted Access Register Manager
8#
9config RAR_REGISTER
10 tristate "Restricted Access Region Register Driver"
11 depends on PCI
12 default n
13 ---help---
14 This driver allows other kernel drivers access to the
15 contents of the restricted access region control registers.
16
17 The restricted access region control registers
18 (rar_registers) are used to pass address and
19 locking information on restricted access regions
20 to other drivers that use restricted access regions.
21
22 The restricted access regions are regions of memory
23 on the Intel MID Platform that are not accessible to
24 the x86 processor, but are accessible to dedicated
25 processors on board peripheral devices.
26
27 The purpose of the restricted access regions is to
28 protect sensitive data from compromise by unauthorized
29 programs running on the x86 processor.
30endmenu
diff --git a/drivers/staging/rar_register/Makefile b/drivers/staging/rar_register/Makefile
deleted file mode 100644
index d5954ccc16c9..000000000000
--- a/drivers/staging/rar_register/Makefile
+++ /dev/null
@@ -1,2 +0,0 @@
1EXTRA_CFLAGS += -DLITTLE__ENDIAN
2obj-$(CONFIG_RAR_REGISTER) += rar_register.o
diff --git a/drivers/staging/rar_register/rar_register.h b/drivers/staging/rar_register/rar_register.h
deleted file mode 100644
index ffa805780f85..000000000000
--- a/drivers/staging/rar_register/rar_register.h
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * Copyright (C) 2010 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of version 2 of the GNU General
6 * Public License as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be
9 * useful, but WITHOUT ANY WARRANTY; without even the implied
10 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public
13 * License along with this program; if not, write to the Free
14 * Software Foundation, Inc., 59 Temple Place - Suite 330,
15 * Boston, MA 02111-1307, USA.
16 * The full GNU General Public License is included in this
17 * distribution in the file called COPYING.
18 */
19
20
21#ifndef _RAR_REGISTER_H
22#define _RAR_REGISTER_H
23
24#include <linux/types.h>
25
26/* following are used both in drivers as well as user space apps */
27
28#define RAR_TYPE_VIDEO 0
29#define RAR_TYPE_AUDIO 1
30#define RAR_TYPE_IMAGE 2
31#define RAR_TYPE_DATA 3
32
33#ifdef __KERNEL__
34
35struct rar_device;
36
37int register_rar(int num,
38 int (*callback)(unsigned long data), unsigned long data);
39void unregister_rar(int num);
40int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end);
41int rar_lock(int rar_index);
42
43#endif /* __KERNEL__ */
44#endif /* _RAR_REGISTER_H */