[U-Boot] [PATCH v1 3/4] drivers: mux: mmio-based syscon mux controller
Jean-Jacques Hiblot
jjhiblot at ti.com
Mon Nov 4 18:15:31 UTC 2019
Simon,
On 30/10/2019 02:48, Simon Glass wrote:
> On Wed, 2 Oct 2019 at 06:47, Jean-Jacques Hiblot <jjhiblot at ti.com> wrote:
>> This adds a driver for mmio-based syscon multiplexers controlled by
>> bitfields in a syscon register range.
>> This is heavily based on the linux mmio-mux driver.
>>
>> Signed-off-by: Jean-Jacques Hiblot <jjhiblot at ti.com>
>> ---
>>
>> drivers/mux/Kconfig | 15 +++++
>> drivers/mux/Makefile | 1 +
>> drivers/mux/mmio.c | 155 +++++++++++++++++++++++++++++++++++++++++++
>> 3 files changed, 171 insertions(+)
>> create mode 100644 drivers/mux/mmio.c
> Reviewed-by: Simon Glass <sjg at chromium.org>
>
> So much memory allocation! But I suppose it is unavoidable. No way to
> use DM's auto-alloc?
I didn't try very hard to reduce the number of allocations to keep the
code simple.
Part of the trouble comes from the fact that the number of mux_controls
is read from the DT making it not possible to use the auto-alloc.
With other type of multiplexers (like a I2C or analog-lines multiplexer)
the number of controls will be fixed and using auto-alloc will be possible.
JJ
>
> Regards,
> Simon
>
More information about the U-Boot
mailing list