diff options
author | Angel Pons <th3fanbus@gmail.com> | 2020-07-03 13:45:33 +0200 |
---|---|---|
committer | Angel Pons <th3fanbus@gmail.com> | 2020-07-09 16:25:18 +0000 |
commit | f0b5e91b1b76c6034750cfdd45f149cba12aab5e (patch) | |
tree | d1d6b09750565c3c9a9082aef9d43c6c65621183 /src/mainboard/google/slippy | |
parent | 91aae2e0bc074a3dba475f6fab8612d1a8842e57 (diff) |
mb/google/slippy: Put GPIOs in a C file
This will allow dropping the pointer inside romstage_params.
Change-Id: Iec6dac1a271b22d6c09b4064a9e8a310e57026a6
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43102
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tristan Corrick <tristan@corrick.kiwi>
Diffstat (limited to 'src/mainboard/google/slippy')
-rw-r--r-- | src/mainboard/google/slippy/Makefile.inc | 1 | ||||
-rw-r--r-- | src/mainboard/google/slippy/romstage.c | 4 | ||||
-rw-r--r-- | src/mainboard/google/slippy/variants/falco/gpio.c (renamed from src/mainboard/google/slippy/variants/falco/include/variant/gpio.h) | 7 | ||||
-rw-r--r-- | src/mainboard/google/slippy/variants/falco/romstage.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/slippy/variants/leon/gpio.c (renamed from src/mainboard/google/slippy/variants/leon/include/variant/gpio.h) | 7 | ||||
-rw-r--r-- | src/mainboard/google/slippy/variants/leon/romstage.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/slippy/variants/peppy/gpio.c (renamed from src/mainboard/google/slippy/variants/peppy/include/variant/gpio.h) | 7 | ||||
-rw-r--r-- | src/mainboard/google/slippy/variants/peppy/romstage.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/slippy/variants/wolf/gpio.c (renamed from src/mainboard/google/slippy/variants/wolf/include/variant/gpio.h) | 7 | ||||
-rw-r--r-- | src/mainboard/google/slippy/variants/wolf/romstage.c | 2 |
10 files changed, 9 insertions, 32 deletions
diff --git a/src/mainboard/google/slippy/Makefile.inc b/src/mainboard/google/slippy/Makefile.inc index e652dac2d9..8f75d72b15 100644 --- a/src/mainboard/google/slippy/Makefile.inc +++ b/src/mainboard/google/slippy/Makefile.inc @@ -7,6 +7,7 @@ ramstage-$(CONFIG_CHROMEOS) += chromeos.c smm-y += smihandler.c +romstage-y += variants/$(VARIANT_DIR)/gpio.c romstage-y += variants/$(VARIANT_DIR)/romstage.c subdirs-y += variants/$(VARIANT_DIR) diff --git a/src/mainboard/google/slippy/romstage.c b/src/mainboard/google/slippy/romstage.c index 0b43adff38..bc14ee029c 100644 --- a/src/mainboard/google/slippy/romstage.c +++ b/src/mainboard/google/slippy/romstage.c @@ -5,8 +5,11 @@ #include <northbridge/intel/haswell/haswell.h> #include <northbridge/intel/haswell/raminit.h> #include <southbridge/intel/lynxpoint/pch.h> +#include <southbridge/intel/lynxpoint/lp_gpio.h> #include "variant.h" +extern const struct pch_lp_gpio_map mainboard_gpio_map[]; + void mainboard_config_rcba(void) { /* @@ -74,6 +77,7 @@ void mainboard_romstage_entry(void) struct romstage_params romstage_params = { .pei_data = &pei_data, + .gpio_map = &mainboard_gpio_map, }; variant_romstage_entry(&romstage_params); diff --git a/src/mainboard/google/slippy/variants/falco/include/variant/gpio.h b/src/mainboard/google/slippy/variants/falco/gpio.c index c6fc5caf62..86efbb8a45 100644 --- a/src/mainboard/google/slippy/variants/falco/include/variant/gpio.h +++ b/src/mainboard/google/slippy/variants/falco/gpio.c @@ -1,9 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef FALCO_GPIO_H -#define FALCO_GPIO_H - -struct pch_lp_gpio_map; +#include <southbridge/intel/lynxpoint/lp_gpio.h> const struct pch_lp_gpio_map mainboard_gpio_map[] = { LP_GPIO_UNUSED, /* 0: UNUSED */ @@ -103,5 +100,3 @@ const struct pch_lp_gpio_map mainboard_gpio_map[] = { LP_GPIO_UNUSED, /* 94: UNUSED */ LP_GPIO_END }; - -#endif diff --git a/src/mainboard/google/slippy/variants/falco/romstage.c b/src/mainboard/google/slippy/variants/falco/romstage.c index 134c797a75..96fbbab8b6 100644 --- a/src/mainboard/google/slippy/variants/falco/romstage.c +++ b/src/mainboard/google/slippy/variants/falco/romstage.c @@ -10,7 +10,6 @@ #include <northbridge/intel/haswell/raminit.h> #include <southbridge/intel/lynxpoint/pch.h> #include <southbridge/intel/lynxpoint/lp_gpio.h> -#include <variant/gpio.h> #include "../../variant.h" /* Copy SPD data for on-board memory */ @@ -86,6 +85,5 @@ void variant_romstage_entry(struct romstage_params *rp) memcpy(rp->pei_data->usb2_ports, usb2_ports, sizeof(usb2_ports)); memcpy(rp->pei_data->usb3_ports, usb3_ports, sizeof(usb3_ports)); - rp->gpio_map = &mainboard_gpio_map; rp->copy_spd = copy_spd; } diff --git a/src/mainboard/google/slippy/variants/leon/include/variant/gpio.h b/src/mainboard/google/slippy/variants/leon/gpio.c index f40341a196..63babd6399 100644 --- a/src/mainboard/google/slippy/variants/leon/include/variant/gpio.h +++ b/src/mainboard/google/slippy/variants/leon/gpio.c @@ -1,9 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef LEON_GPIO_H -#define LEON_GPIO_H - -struct pch_lp_gpio_map; +#include <southbridge/intel/lynxpoint/lp_gpio.h> const struct pch_lp_gpio_map mainboard_gpio_map[] = { LP_GPIO_UNUSED, /* 0: UNUSED */ @@ -103,5 +100,3 @@ const struct pch_lp_gpio_map mainboard_gpio_map[] = { LP_GPIO_UNUSED, /* 94: UNUSED */ LP_GPIO_END }; - -#endif diff --git a/src/mainboard/google/slippy/variants/leon/romstage.c b/src/mainboard/google/slippy/variants/leon/romstage.c index 1e20e09346..35c5ef50c7 100644 --- a/src/mainboard/google/slippy/variants/leon/romstage.c +++ b/src/mainboard/google/slippy/variants/leon/romstage.c @@ -9,7 +9,6 @@ #include <northbridge/intel/haswell/raminit.h> #include <southbridge/intel/lynxpoint/pch.h> #include <southbridge/intel/lynxpoint/lp_gpio.h> -#include <variant/gpio.h> #include "../../variant.h" /* Copy SPD data for on-board memory */ @@ -80,6 +79,5 @@ void variant_romstage_entry(struct romstage_params *rp) memcpy(rp->pei_data->usb2_ports, usb2_ports, sizeof(usb2_ports)); memcpy(rp->pei_data->usb3_ports, usb3_ports, sizeof(usb3_ports)); - rp->gpio_map = &mainboard_gpio_map; rp->copy_spd = copy_spd; } diff --git a/src/mainboard/google/slippy/variants/peppy/include/variant/gpio.h b/src/mainboard/google/slippy/variants/peppy/gpio.c index 825e712ee1..fb9ab95130 100644 --- a/src/mainboard/google/slippy/variants/peppy/include/variant/gpio.h +++ b/src/mainboard/google/slippy/variants/peppy/gpio.c @@ -1,9 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef PEPPY_GPIO_H -#define PEPPY_GPIO_H - -struct pch_lp_gpio_map; +#include <southbridge/intel/lynxpoint/lp_gpio.h> const struct pch_lp_gpio_map mainboard_gpio_map[] = { LP_GPIO_UNUSED, /* 0: UNUSED */ @@ -103,5 +100,3 @@ const struct pch_lp_gpio_map mainboard_gpio_map[] = { LP_GPIO_UNUSED, /* 94: UNUSED */ LP_GPIO_END }; - -#endif diff --git a/src/mainboard/google/slippy/variants/peppy/romstage.c b/src/mainboard/google/slippy/variants/peppy/romstage.c index e37787cb20..b7daf89527 100644 --- a/src/mainboard/google/slippy/variants/peppy/romstage.c +++ b/src/mainboard/google/slippy/variants/peppy/romstage.c @@ -10,7 +10,6 @@ #include <northbridge/intel/haswell/raminit.h> #include <southbridge/intel/lynxpoint/pch.h> #include <southbridge/intel/lynxpoint/lp_gpio.h> -#include <variant/gpio.h> #include "../../onboard.h" #include "../../variant.h" @@ -97,6 +96,5 @@ void variant_romstage_entry(struct romstage_params *rp) memcpy(rp->pei_data->usb2_ports, usb2_ports, sizeof(usb2_ports)); memcpy(rp->pei_data->usb3_ports, usb3_ports, sizeof(usb3_ports)); - rp->gpio_map = &mainboard_gpio_map; rp->copy_spd = copy_spd; } diff --git a/src/mainboard/google/slippy/variants/wolf/include/variant/gpio.h b/src/mainboard/google/slippy/variants/wolf/gpio.c index 7b1276ad55..9be9077777 100644 --- a/src/mainboard/google/slippy/variants/wolf/include/variant/gpio.h +++ b/src/mainboard/google/slippy/variants/wolf/gpio.c @@ -1,9 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef WOLF_GPIO_H -#define WOLF_GPIO_H - -struct pch_lp_gpio_map; +#include <southbridge/intel/lynxpoint/lp_gpio.h> const struct pch_lp_gpio_map mainboard_gpio_map[] = { LP_GPIO_UNUSED, /* 0: UNUSED */ @@ -103,5 +100,3 @@ const struct pch_lp_gpio_map mainboard_gpio_map[] = { LP_GPIO_UNUSED, /* 94: UNUSED */ LP_GPIO_END }; - -#endif diff --git a/src/mainboard/google/slippy/variants/wolf/romstage.c b/src/mainboard/google/slippy/variants/wolf/romstage.c index fd8e63275c..b35160f628 100644 --- a/src/mainboard/google/slippy/variants/wolf/romstage.c +++ b/src/mainboard/google/slippy/variants/wolf/romstage.c @@ -10,7 +10,6 @@ #include <northbridge/intel/haswell/raminit.h> #include <southbridge/intel/lynxpoint/pch.h> #include <southbridge/intel/lynxpoint/lp_gpio.h> -#include <variant/gpio.h> #include "../../variant.h" /* Copy SPD data for on-board memory */ @@ -84,6 +83,5 @@ void variant_romstage_entry(struct romstage_params *rp) memcpy(rp->pei_data->usb2_ports, usb2_ports, sizeof(usb2_ports)); memcpy(rp->pei_data->usb3_ports, usb3_ports, sizeof(usb3_ports)); - rp->gpio_map = &mainboard_gpio_map; rp->copy_spd = copy_spd; } |