media: allegro: extract mcu and codec address calculation
authorMichael Tretter <m.tretter@pengutronix.de>
Mon, 16 Mar 2020 15:26:28 +0000 (16:26 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 20 Mar 2020 08:16:07 +0000 (09:16 +0100)
commit857a31f1c1c832e0a173d96af4688cc5212da120
treea85fee7c4d61e85f52c2c24596e6aa6ea1d77427
parentdfba38c841855536730bb577b02a42ec2f2bda4d
media: allegro: extract mcu and codec address calculation

The mcu and the codec use 32 bit addresses which are sent via the
firmware messages. Add helper functions for this address calculation to
make it obvious which address is used in the message.

As the mcu and the codec have a limited address space, print warnings if
the addresses are outside the respective address space.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/allegro-dvt/allegro-core.c