diff options
author | Julius Werner <jwerner@chromium.org> | 2013-08-29 14:17:36 -0700 |
---|---|---|
committer | Isaac Christensen <isaac.christensen@se-eng.com> | 2014-08-14 01:43:11 +0200 |
commit | fa938c7508627c0dfcf03960957ef8631fc53f02 (patch) | |
tree | 369a6f41d6a4a152ec933b08e869d6bb527adac4 /src/cpu/samsung/exynos5420/spi.c | |
parent | 755615a12310469b34fc4804bcf2622eb587949c (diff) | |
download | coreboot-fa938c7508627c0dfcf03960957ef8631fc53f02.tar.xz |
exynos5: Refactor crazy old U-Boot base address macros away
All this samsung_get_base_address_of_device_with_a_really_long_name()
boilerplate makes my eyes bleed... I think there are so much cleaner
ways to do this. Unfortunately changing this ends up touching nearly
every Exynos5 file, but I hope you agree that it's worth it (and the
sooner we get it over with, the better... I can't bring myself to make
another device fit into that ugly scheme).
This also removes the redundant EXYNOS5 base address definitions from
the 5420 directory when there are EXYNOS5420 ones, to avoid complete
confusion. The new scheme tries to use EXYNOS5 for base addresses and
exynos5 for types that are common between the two processors, and
EXYNOS5420/exynos5420 for things that have changes (although I probably
didn't catch all differences).
Change-Id: I87e58434490ed55a9bbe743af1f9bf2520dec13f
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/167579
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: ron minnich <rminnich@chromium.org>
(cherry picked from commit 66c87693352c248eec029c1ce83fb295059e6b5b)
Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com>
Reviewed-on: http://review.coreboot.org/6632
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/cpu/samsung/exynos5420/spi.c')
-rw-r--r-- | src/cpu/samsung/exynos5420/spi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cpu/samsung/exynos5420/spi.c b/src/cpu/samsung/exynos5420/spi.c index 0d2d6d7fd9..c6c08e925c 100644 --- a/src/cpu/samsung/exynos5420/spi.c +++ b/src/cpu/samsung/exynos5420/spi.c @@ -49,12 +49,12 @@ static struct exynos_spi_slave exynos_spi_slaves[3] = { // SPI 0 { .slave = { .bus = 0, }, - .regs = samsung_get_base_spi0(), + .regs = (void *)EXYNOS5_SPI0_BASE, }, // SPI 1 { .slave = { .bus = 1, .rw = SPI_READ_FLAG, }, - .regs = samsung_get_base_spi1(), + .regs = (void *)EXYNOS5_SPI1_BASE, .fifo_size = 64, .half_duplex = 0, }, @@ -62,7 +62,7 @@ static struct exynos_spi_slave exynos_spi_slaves[3] = { { .slave = { .bus = 2, .rw = SPI_READ_FLAG | SPI_WRITE_FLAG, }, - .regs = samsung_get_base_spi2(), + .regs = (void *)EXYNOS5_SPI2_BASE, .fifo_size = 64, .half_duplex = 1, .frame_header = 0xec, |