Commit Graph

17 Commits (300d3739e873d50d4c6e3656f89007a217fb1d29)

Author SHA1 Message Date
Mark A. Allyn 9196dc1129 staging: sep: reworked crypto layer
This gets the SEP crypto layer up and running with things like dmcrypt.
It's a fairly big set of changes because it has to rework the whole context
handling system.

[This is picked out of the differences between the upstream driver and
 the staging driver. I'm resolving the differences as a series of updates -AC]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:09:58 -08:00
Mark Allyn ff3d9c3c90 staging: sep: SEP update
This is basically a rewrite so there isn't a nice easy to present way of
providing this as a patch series. This patch is a pull of Mark's new driver into
the upstream staging area. On top of that are a series of patches by
Andy Shevchenko to make it build on the current tree, fix a few things and
even get it passed sparse.

The new driver supports the kernel crypto layer, passes the coding style checks,
passes human taste checks and has proper kernel-doc formatted comments.

I've then folded back in some later fixes it was missing that got applied to
to the kernel tree.

This should be ready for more serious review with a view to migration from
the staging tree shortly.

Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
[Forward port and some bug fixing]
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[Fold and tweaks for 3.2]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-30 14:00:03 -08:00
Mark Allyn 1254a459a3 staging: sep: remove unused ioctls
Also remove associated functions, structures, and defines

Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-07 13:42:34 -08:00
Peter Huewe eb6b420da1 staging/sep: Fix sparse warning 'do-while statement is not a compound statement'
This patch fixes the warning generated by sparse: 'do-while statement is
not a compound statement' by adding the necessary brackets around the do
block

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-02 12:34:59 -08:00
Mark Allyn 4856ab33eb Staging: sep: Introduce sep driver
This driver is for the Security Processor, a dedicated encryption
and decryption driver that is used on the Intel mobile platform.

This has been checked with checkpatch and there are four
warnings for lines over 80 charactors.

There is one compile warning. This is for a function that is
only used if the rar register driver is needed. There is an
ifdef in a header file that stubs out the rar register driver
if the rar register is not configured.

This driver does add a configuration, which is CONFIG_DX_SEP.

Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-19 17:20:40 -08:00
Greg Kroah-Hartman d49824c067 Staging: sep: remove driver
It's currently stalled and the original submitter recommended that it
just be dropped at this point in time due.

Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-23 18:15:38 -07:00
Alan Cox 70ae04e6cc Staging: sep: kick out various fields we can prove are not needed
#1: sep->cache_addr is assigned to sep->rar_addr and never changed
    sep->rar_addr is never assigned after this point

#2: sep->cache_bus ditto for sep->rar_bus

#3  sep->rar_region_addr is assigned but necer used

#4  sep->io_addr is in fact private to the probe function and
    the same as the reg_addr

#5  The remainig sep->io fields are in fact function locals

#6  sep->message_shared_area is assigned once from sep->shared_area
    sep->shared_area does not then change

#7  sep->shared_addr and sep->shared_area_addr are the same thing, ditto
    for the bus addresses.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:15 -07:00
Alan Cox 4c29e97998 Staging: sep: Implement some proper open/close methods
Use the mutex as a protection for open close rather than leaving it hanging
invalidly across userspace.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:15 -07:00
Alan Cox 6f13ea3df5 Staging: sep: tidy firmware load
Start by removing unused fields and then work this back to eliminate unused
chunks of the firmware loading ioctl (ie almost all of it)

Also fix the wrong handling of shared allocations and allocate the rar
region properly with dma_alloc_coherent not kmalloc, as it is device shared.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:15 -07:00
Alan Cox 790cf1b912 Staging: sep: Try and get kernel address and user address types right
We will need to tackle this in order to begin doing something about the
bus handled and shared memory object mess.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:14 -07:00
Alan Cox 6343cefdc8 Staging: sep: Fix PCI irq usage
Don't read the IRQ from the device, the device has no idea what is going on
in the full bus topology and remapping above PCI. Use the pdev->irq field.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:14 -07:00
Alan Cox 904290c0b7 Staging: sep: rename some fields
Make them more Linuxlike - also favour _bus over _phys

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:13 -07:00
Alan Cox 577092ac15 Staging: sep: use O_NDELAY instead of magic APIs
Open is still completely bogus in this driver but we'll tackle that later -
for now fix the bogus API

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:13 -07:00
Alan Cox b10b483efe Staging: sep: make everything static
Now we have it in one file we can make it all static and see what falls out

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:13 -07:00
Alan Cox d19cf32fdd Staging: sep: indent pass
Ok time to indent and get the code in vague shape. No other changes in this
patch.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:12 -07:00
Alan Cox 79de99e864 Staging: sep: rework write_register/read_register
Replace the macros with an inline to get type safety and pass sep_dev
instead of the reg pointer

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:12 -07:00
Alan Cox f5e3980f9b Staging: sep: Create a structure to hold all the current crap spewed about as globals
For now keep the field names matching the variable names

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:12 -07:00