{"action":"created","issue":{"url":"https://api.github.com/repos/raspberrypi/linux/issues/1153","labels_url":"https://api.github.com/repos/raspberrypi/linux/issues/1153/labels{/name}","comments_url":"https://api.github.com/repos/raspberrypi/linux/issues/1153/comments","events_url":"https://api.github.com/repos/raspberrypi/linux/issues/1153/events","html_url":"https://github.com/raspberrypi/linux/pull/1153","id":109694335,"number":1153,"title":"Use bcm2835-dma","user":{"login":"notro","id":530887,"avatar_url":"https://avatars.githubusercontent.com/u/530887?v=3","gravatar_id":"","url":"https://api.github.com/users/notro","html_url":"https://github.com/notro","followers_url":"https://api.github.com/users/notro/followers","following_url":"https://api.github.com/users/notro/following{/other_user}","gists_url":"https://api.github.com/users/notro/gists{/gist_id}","starred_url":"https://api.github.com/users/notro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notro/subscriptions","organizations_url":"https://api.github.com/users/notro/orgs","repos_url":"https://api.github.com/users/notro/repos","events_url":"https://api.github.com/users/notro/events{/privacy}","received_events_url":"https://api.github.com/users/notro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-04T18:07:10Z","updated_at":"2015-10-05T20:50:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/raspberrypi/linux/pulls/1153","html_url":"https://github.com/raspberrypi/linux/pull/1153","diff_url":"https://github.com/raspberrypi/linux/pull/1153.diff","patch_url":"https://github.com/raspberrypi/linux/pull/1153.patch"},"body":"This PR patches up bcm2835-dma to match bcm2708-dmaengine and uses it when booting with Device Tree. Non-DT booting continues to use bcm2708-dmaengine.\r\nbcm2835-dma exposes the legacy DMA API by using bcm2708-dmaengine.\r\n\r\nTested on Pi1 and Pi2 with and without Device Tree + ARCH_BCM2835.\r\n\r\n7 DMA channels:\r\n```\r\n$ ls /sys/class/dma\r\ndma0chan0  dma0chan1  dma0chan2  dma0chan3  dma0chan4  dma0chan5  dma0chan6\r\n```\r\n\r\nRelevant boot log entries with Device Tree:\r\n```\r\n[    0.746285] bcm2835-dma 3f007000.dma: DMA legacy API manager at f3007000, dmachans=0x1\r\n[    0.755260] bcm2835-dma 3f007000.dma: dma_debug:0\r\n...\r\n[    1.052264] BCM2708FB: allocated DMA memory fac00000\r\n[    1.057290] BCM2708FB: allocated DMA channel 0 @ f3007000\r\n...\r\n[    1.872134] mmc-bcm2835 3f300000.mmc: mmc_debug:0 mmc_debug2:0\r\n[    1.882626] mmc-bcm2835 3f300000.mmc: DMA channels allocated\r\n```\r\n\r\nWithout DT (the channel 13 error also occurs without this PR):\r\n```\r\n[    0.726604] bcm2708-dmaengine bcm2708-dmaengine: DMA legacy API manager at f3007000, dmachans=0x7f35\r\n[    0.735883] bcm2708-dmaengine bcm2708-dmaengine: failed to get irq for DMA channel 13\r\n[    0.743759] bcm2708-dmaengine bcm2708-dmaengine: Initialized 8 DMA channels (+ 1 legacy)\r\n[    0.752656] bcm2708-dmaengine bcm2708-dmaengine: Load BCM2835 DMA engine driver\r\n[    0.760010] bcm2708-dmaengine bcm2708-dmaengine: dma_debug:0\r\n...\r\n[    1.054439] BCM2708FB: allocated DMA memory fac00000\r\n[    1.059465] BCM2708FB: allocated DMA channel 0 @ f3007000\r\n...\r\n[    1.872010] mmc-bcm2835 mmc-bcm2835.0: mmc_debug:0 mmc_debug2:0\r\n[    1.882528] mmc-bcm2835 mmc-bcm2835.0: DMA channels allocated\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/raspberrypi/linux/issues/comments/145664558","html_url":"https://github.com/raspberrypi/linux/pull/1153#issuecomment-145664558","issue_url":"https://api.github.com/repos/raspberrypi/linux/issues/1153","id":145664558,"user":{"login":"popcornmix","id":1053730,"avatar_url":"https://avatars.githubusercontent.com/u/1053730?v=3","gravatar_id":"","url":"https://api.github.com/users/popcornmix","html_url":"https://github.com/popcornmix","followers_url":"https://api.github.com/users/popcornmix/followers","following_url":"https://api.github.com/users/popcornmix/following{/other_user}","gists_url":"https://api.github.com/users/popcornmix/gists{/gist_id}","starred_url":"https://api.github.com/users/popcornmix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/popcornmix/subscriptions","organizations_url":"https://api.github.com/users/popcornmix/orgs","repos_url":"https://api.github.com/users/popcornmix/repos","events_url":"https://api.github.com/users/popcornmix/events{/privacy}","received_events_url":"https://api.github.com/users/popcornmix/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T20:50:51Z","updated_at":"2015-10-05T20:50:51Z","body":"Looks reasonable to me. We could probably drop the debug wait states commit as so far it hasn't fixed any problematic sdcards (although it's self contained and could be dropped later).\r\n\r\nAlso I think non-DT support is just waiting for an excuse to drop it. I don't think you'd have any objections if you stopped supporting it (on 4.2 or later trees)."}}