soc/amd/stoneyridge/spi: do not open code existing CAR APIs

The CAR APIs already exist to deal with proper type useage.
Don't open code things that already exist.

BUG=b:65485690

Change-Id: I09593401513f6060a30cf5c02c94d14afbe8f4fd
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/23412
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
This commit is contained in:
Aaron Durbin 2018-01-24 11:59:09 -07:00
parent 8aa0792c0f
commit 9cf2f707ab
1 changed files with 2 additions and 2 deletions

View File

@ -34,12 +34,12 @@ static uintptr_t spibar CAR_GLOBAL;
static uintptr_t get_spibase(void) static uintptr_t get_spibase(void)
{ {
return *(uintptr_t *)car_get_var_ptr(&spibar); return car_get_var(spibar);
} }
static void set_spibar(uintptr_t base) static void set_spibar(uintptr_t base)
{ {
*(uintptr_t *)car_get_var_ptr(&spibar) = base; car_set_var(spibar, base);
} }
static inline uint8_t spi_read8(uint8_t reg) static inline uint8_t spi_read8(uint8_t reg)