bcm2835: Getting DMA-busaddress for HW-register
Martin Sperl
kernel at martin.sperl.org
Sun May 10 10:41:58 PDT 2015
> On 10.05.2015, at 18:36, Noralf Trønnes <noralf at tronnes.org> wrote:
> Apparently dma_regs is the same as the reg DT property:
>
> --- workdir/linux/drivers/spi/spi-bcm2835.c.dma 2015-05-10 18:18:28.955545580 +0200
> +++ workdir/linux/drivers/spi/spi-bcm2835.c 2015-05-10 18:20:26.315255619 +0200
> + {
> + const __be32 *addrp;
> +
> + pr_info("%s: bs->dma_regs=%pad\n", __func__, &bs->dma_regs);
> + addrp = of_get_address(pdev->dev.of_node, 0, NULL, NULL);
> + if (addrp)
> + pr_info("%s: reg=0x%x\n", __func__, be32_to_cpup(addrp));
> + }
> +
> bs->clk = devm_clk_get(&pdev->dev, NULL);
> if (IS_ERR(bs->clk)) {
> err = PTR_ERR(bs->clk);
Thanks - I was missing the be32_to_cpup in my tests, so I did not succeed!
More information about the linux-rpi-kernel
mailing list