diff options
author | Lee Leahy <leroy.p.leahy@intel.com> | 2016-05-15 13:52:36 -0700 |
---|---|---|
committer | Leroy P Leahy <leroy.p.leahy@intel.com> | 2016-05-17 23:30:09 +0200 |
commit | 274d20a0652f45ed54834524c485f7ab59bcdf70 (patch) | |
tree | b3e35b64d328f752cdff20108202551a1e417f65 /src/mainboard/intel/galileo/gpio.c | |
parent | 0ba307f0fe94550d84499562fb8f238f770aae3f (diff) |
mainboard/intel/galileo: Add GPIO initialization
Add Kconfig to configure coreboot for a specific Galileo board.
Configure the GPIOs for the specific Galileo board.
TEST=Build and run on Galileo Gen2
Change-Id: I992460d506b5543915c27f6a531da4b1a53d6505
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/14826
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/mainboard/intel/galileo/gpio.c')
-rw-r--r-- | src/mainboard/intel/galileo/gpio.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/mainboard/intel/galileo/gpio.c b/src/mainboard/intel/galileo/gpio.c new file mode 100644 index 0000000000..00b42403d1 --- /dev/null +++ b/src/mainboard/intel/galileo/gpio.c @@ -0,0 +1,33 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2016 Intel Corp. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <arch/io.h> +#include <console/console.h> +#include <soc/ramstage.h> +#include <soc/reg_access.h> +#include "gen1.h" +#include "gen2.h" + +void mainboard_gpio_init(void) +{ + const struct reg_script *script; + + /* Initialize the GPIO controllers */ + if (IS_ENABLED(CONFIG_GALILEO_GEN2)) + script = gen2_gpio_init; + else + script = gen1_gpio_init; + reg_script_run(script); +} |