Commit Graph

11 Commits (597b9d1e44e9ba69f2454a5318bbe7a6d5e6930a)

Author SHA1 Message Date
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