rockchip: rk3399: spl: remove hard-coded addresses for GRF and SGRF
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tue, 29 Aug 2017 16:24:05 +0000 (18:24 +0200)
committerVagrant Cascadian <vagrant@debian.org>
Mon, 9 Oct 2017 22:14:03 +0000 (23:14 +0100)
commiteab2769d75e80f12f997b6afdc488a38cc7bc552
tree51b25f2e2dd39a18971d54d29bbc798ac0c9975f
parentcd549eeda4100873a76bebcaed7fafcec026e5cb
rockchip: rk3399: spl: remove hard-coded addresses for GRF and SGRF

On the RK3399, we will have either OF_PLATDATA or full OF_CONTROL
enabled: this allows the use of syscon to retrieve the addresses of
GRF and SGRF (except for the early debug UART setup, which runs so
early that the device-model is not initialised).

This removes the hard-coded addresses and goes through syscon to
retrieve the base-addresses of GRF and SGRF. After that, we use
the structure definitions to locate the respective registers.

In addition to this, the inclusion of header files is also cleaned up:
- all headers are included at the beginning (there was a spurious
  inclusion of the grf header from within a function)
- all #include statements for unused headers are removed
- the remaining #include statements are sorted (while keeping common.h
  included in front)

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Gbp-Pq: Topic upstream/rk3399
Gbp-Pq: Name 0003-rockchip-rk3399-spl-remove-hard-coded-addresses-for-.patch
arch/arm/mach-rockchip/rk3399-board-spl.c