OMAPDSS: DSI: split DSI memory map to smaller blocks
commit68104467ec19a56db2799049e53e910089c66c75
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 17 Dec 2013 11:53:28 +0000 (17 13:53 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 13 Jan 2014 10:19:54 +0000 (13 12:19 +0200)
tree03ce6324fe2da296a9d3e3b13e9312e1bfe24883
parent6873efe167d76f255e66425d2f11d0dbb79dc60b
OMAPDSS: DSI: split DSI memory map to smaller blocks

DSI contains three separate blocks: protocol engine, PHY and PLL. At the
moment, all these are memory mapped in one big chunk. We need to split
that memory map into smaller pieces so that we can add proper 'reg'
properties into the DT data for each block.

This patch changes the driver to map the blocks separately. It first
tries to get the memory resource using name, used when booting with DT,
and if that fails, it gets the memory resource by ID, in which case the
driver gets the big chunk from platform data. That big chunk is then
split into the smaller blocks manually.

After DSS DT code has been merged and the old platform code removed, we
can clean up the memory resource management.

Instead of changing the driver in all the places where a register is
read or written, this patch takes a shortcut: it adds an additional
number to the struct which represents the register index. This number is
used to decide which base address to use. In the future we should
consider other approaches.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/dsi.c