aboutsummaryrefslogtreecommitdiff
path: root/plat/rpi
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2020-03-11 16:10:40 +0000
committerAndre Przywara <andre.przywara@arm.com>2020-03-17 12:44:09 +0000
commit0d92745e101b95a19c34dd6e2d1eccc2d9fcb629 (patch)
tree7d3b5b34dd7b9ccf09b6faa86c0bf48aaed2859c /plat/rpi
parentf9ea3a6291b45bddda0564e8ff654a615933b173 (diff)
downloadtrusted-firmware-a-0d92745e101b95a19c34dd6e2d1eccc2d9fcb629.tar.gz
rpi3: gpio: Simplify GPIO setup
There is really no reason to use and pass around a struct when its only member is the (fixed) base address. Remove the struct and just use the base address on its own inside the GPIO driver. Then set the base address automatically. This simplifies GPIO setup for users, which now don't need to deal with zeroing a struct and setting the base address anymore. Change-Id: I3060f7859e3f8ef9a24cc8fb38307b5da943f127 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'plat/rpi')
-rw-r--r--plat/rpi/rpi3/rpi3_bl2_setup.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/plat/rpi/rpi3/rpi3_bl2_setup.c b/plat/rpi/rpi3/rpi3_bl2_setup.c
index 44827c63a3..d64235ad28 100644
--- a/plat/rpi/rpi3/rpi3_bl2_setup.c
+++ b/plat/rpi/rpi3/rpi3_bl2_setup.c
@@ -24,17 +24,6 @@
/* Data structure which holds the extents of the trusted SRAM for BL2 */
static meminfo_t bl2_tzram_layout __aligned(CACHE_WRITEBACK_GRANULE);
-/* rpi3 GPIO setup function. */
-static void rpi3_gpio_setup(void)
-{
- struct rpi3_gpio_params params;
-
- memset(&params, 0, sizeof(struct rpi3_gpio_params));
- params.reg_base = RPI3_GPIO_BASE;
-
- rpi3_gpio_init(&params);
-}
-
/* Data structure which holds the MMC info */
static struct mmc_device_info mmc_info;
@@ -68,7 +57,7 @@ void bl2_early_platform_setup2(u_register_t arg0, u_register_t arg1,
generic_delay_timer_init();
/* Setup GPIO driver */
- rpi3_gpio_setup();
+ rpi3_gpio_init();
/* Setup the BL2 memory layout */
bl2_tzram_layout = *mem_layout;