[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/6] sparc32-ledma: don't reference nd_table directly within
From: |
Mark Cave-Ayland |
Subject: |
Re: [PATCH 4/6] sparc32-ledma: don't reference nd_table directly within the device |
Date: |
Sat, 26 Sep 2020 11:23:51 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 |
On 21/09/2020 18:14, Mark Cave-Ayland wrote:
> On 21/09/2020 18:03, Mark Cave-Ayland wrote:
>
>> The lance and esp devices are embedded within ledma and espdma devices
>> respectively,
>> but are actually sysbus devices because they can be used by other machines.
>> I'm not
>> sure if lance is used anywhere else, but esp certainly is. Hence they are
>> mapped
>> after the dma device is realised as it feels odd to attach devices to sysbus
>> outside
>> of a machine init function.
>
> Actually I have a better idea for this: use sysbus_mmio_get_region() within
> the
> sparc32-dma device to attach the lance and esp memory regions to its own
> container
> memory region: then the single sysbus_mmio_map() for the sparc32-dma device
> will just
> work on its own.
(goes and looks)
Ah now I remember - the DMA control registers and the lance/ESP devices are
mapped to
2 different memory locations. So I think the current solution is the best one
here.
ATB,
Mark.
[PATCH 5/6] macio: don't reference serial_hd() directly within the device, Mark Cave-Ayland, 2020/09/20
[PATCH 6/6] sabre: don't call sysbus_mmio_map() in sabre_realize(), Mark Cave-Ayland, 2020/09/20