From 9cf2f707ab4f4aff0812949222fc41a57ae00dd3 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Wed, 24 Jan 2018 11:59:09 -0700 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/23412 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth Reviewed-by: Paul Menzel Reviewed-by: Justin TerAvest --- src/soc/amd/stoneyridge/spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/soc/amd/stoneyridge/spi.c b/src/soc/amd/stoneyridge/spi.c index cf8157cc42..311cd37483 100644 --- a/src/soc/amd/stoneyridge/spi.c +++ b/src/soc/amd/stoneyridge/spi.c @@ -34,12 +34,12 @@ static uintptr_t spibar CAR_GLOBAL; 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) { - *(uintptr_t *)car_get_var_ptr(&spibar) = base; + car_set_var(spibar, base); } static inline uint8_t spi_read8(uint8_t reg)