Thread (17 messages) 17 messages, 4 authors, 2012-07-26
STALE5064d
Revisions (7)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 current
  4. v1 [diff vs current]
  5. v1 [diff vs current]
  6. v2 [diff vs current]
  7. v3 [diff vs current]

[PATCH 3/7] MTD: pxa3xx-nand: add devicetree bindings

From: arnd@arndb.de (Arnd Bergmann)
Date: 2012-07-26 06:30:36

On Thursday 26 July 2012, Marek Vasut wrote:
quoted
-     r = platform_get_resource(pdev, IORESOURCE_DMA, 0);
-     if (r == NULL) {
-             dev_err(&pdev->dev, "no resource defined for data DMA\n");
-             ret = -ENXIO;
-             goto fail_put_clk;
-     }
-     info->drcmr_dat = r->start;
+     /*
+      * This is a dirty hack to make this driver work from devicetree
+      * bindings. It can be removed once we have a prober DMA controller
+      * framework for DT.
+      */
+     if (pdev->dev.of_node && cpu_is_pxa3xx()) {
+             info->drcmr_dat = 97;
+             info->drcmr_cmd = 99;
cpu_is_() stuff should begone ... besides, what are these numbers here?
They are the numbers from the DMA resource. It's ugly but I think reasonable
to do this here. We will clean it up soon, once the bindings are in place.

I did notice though the the two "info->drcmr_dat = r->start" assignments in
the non-DT case are removed here. I think that's a bug.

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