Thread (6 messages) 6 messages, 2 authors, 2015-10-29

Re: [V5, 2/6] fsl/fman: Add FMan support

From: Scott Wood <hidden>
Date: 2015-10-28 21:31:20
Also in: linuxppc-dev, lkml

On Tue, 2015-10-27 at 11:32 -0500, Liberman Igal-B31950 wrote:
quoted
quoted
+
+struct device *fman_get_device(struct fman *fman) {
+ return fman->dev;
+}
Is this really necessary?
Fman port needs fman->dev, fman structure is opaque, so yes, it's needed.
Why is opacity being maintained from one part of the fman driver to another?  
Isn't this the sort of excessive layering that was complained about?

quoted
quoted
+         /* In B4 rev 2.0 (and above) the MURAM size is 512KB.
+          * Check the SVR and update MURAM size if required.
+          */
+         u32 svr;
+
+         svr = mfspr(SPRN_SVR);
+
+         if ((SVR_SOC_VER(svr) == SVR_B4860) && (SVR_MAJ(svr) >=
2))
quoted
+                 fman->dts_params.muram_size = 0x80000;
+ }
Why wasn't the MURAM size described in the device tree, as it was with
CPM/QE?
MURAM size described by the device-tree.
In B4860 rev 2.0 (and above) MURAM size is bigger. 
This is workaround, in order to have the same device tree for all B4860 
revisions.
We don't support b4860 prior to rev 2.0 (due to e6500 core errata) so this is 
irrelevant.  Fix the device tree.
quoted
quoted
+
+ of_node_put(muram_node);
+ of_node_put(fm_node);
+
+ err = devm_request_irq(&of_dev->dev, irq, fman_irq,
+                        IRQF_NO_SUSPEND, "fman", fman);
+ if (err < 0) {
+         pr_err("Error: allocating irq %d (error = %d)\n", irq, err);
+         goto fman_free;
+ }
Why IRQF_NO_SUSPEND?
It shouldn't be IRQF_NO_SUSPEND for now, removed. 
Why just "for now"?

-Scott
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help