Thread (3 messages) flat view 3 messages, 2 authors, 2008-02-01

Re: [PATCH] [POWERPC] Xilinx: hwicap driver

From: Grant Likely <hidden>
Date: 2008-02-01 20:11:56

Possibly related (same subject, not in this thread)

On 2/1/08, Stephen Neuendorffer [off-list ref] wrote:
This includes code for new fifo-based xps_hwicap in addition to the
older opb_hwicap, which has a significantly different interface.  The
common code between the two drivers is largely shared.

Significant differences exists between this driver and what is
supported in the EDK drivers.  In particular, most of the
architecture-specific code for reconfiguring individual FPGA resources
has been removed.  This functionality is likely better provided in a
user-space support library.  In addition, read and write access is
supported.  In addition, although the xps_hwicap cores support
interrupt-driver mode, this driver only supports polled operation, in
order to make the code simpler, and since the interrupt processing
overhead is likely to slow down the throughput under Linux.

Signed-off-by: Stephen Neuendorffer <redacted>

Fixed to add mutexes, and a few style issues.
Inconsistent indentation (tabs vs. spaces) in some places.  Otherwise:

Acked-by: Grant Likely <redacted>

g.
+static int __devexit hwicap_remove(struct device *dev)
+{
+       struct hwicap_drvdata *drvdata;
+
+       drvdata = (struct hwicap_drvdata *)dev_get_drvdata(dev);
+
+       if (!drvdata)
+            return 0;
+
+        class_device_destroy(icap_class, drvdata->devt);
+        cdev_del(&drvdata->cdev);
+        iounmap(drvdata->base_address);
+        release_mem_region(drvdata->mem_start, drvdata->mem_size);
+        kfree(drvdata);
+        dev_set_drvdata(dev, NULL);
+        probed_devices[MINOR(dev->devt)-xhwicap_minor] = 0;
+
+       return 0;               /* success */
+}
Here in particular


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help