sb/amd/rs780: Fix invalid function declarations

Provide empty stub implementations for set_pcie_reset() and
set_pcie_dereset(), many boards do not provide a proper one.

Change-Id: Ia6811442905ef1776fa5a8e3f5d4433e86e42f88
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/26776
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Kyösti Mälkki 2018-06-03 06:12:03 +03:00 committed by Patrick Georgi
parent 1bad4ce421
commit 564c2191ab
16 changed files with 28 additions and 101 deletions

View File

@ -23,9 +23,6 @@
#include <device/pci_def.h> #include <device/pci_def.h>
#include "southbridge/amd/rs780/rs780.h" #include "southbridge/amd/rs780/rs780.h"
void set_pcie_dereset(void);
void set_pcie_reset(void);
/* GPIO6. */ /* GPIO6. */
static void enable_int_gfx(void) static void enable_int_gfx(void)
{ {
@ -45,14 +42,6 @@ static void enable_int_gfx(void)
*(gpio_reg + 170) = 0x0; *(gpio_reg + 170) = 0x0;
} }
void set_pcie_dereset()
{
}
void set_pcie_reset(void)
{
}
int is_dev3_present(void) int is_dev3_present(void)
{ {
return 0; return 0;

View File

@ -24,9 +24,6 @@
#include <southbridge/amd/sb800/sb800.h> #include <southbridge/amd/sb800/sb800.h>
#include "southbridge/amd/rs780/rs780.h" #include "southbridge/amd/rs780/rs780.h"
void set_pcie_dereset(void);
void set_pcie_reset(void);
/* GPIO6. */ /* GPIO6. */
static void enable_int_gfx(void) static void enable_int_gfx(void)
{ {
@ -58,16 +55,9 @@ static void enable_int_gfx(void)
/* /*
* Bimini uses GPIO 6 as PCIe slot reset, GPIO4 as GFX slot reset. We need to * Bimini uses GPIO 6 as PCIe slot reset, GPIO4 as GFX slot reset. We need to
* pull it up before training the slot. * pull it up before training the slot.
*
* Old comment says: GPIO 50h to reset PCIe slot.
***/ ***/
void set_pcie_dereset(void)
{
/* GPIO 50h reset PCIe slot */
}
void set_pcie_reset(void)
{
/* GPIO 50h reset PCIe slot */
}
int is_dev3_present(void) int is_dev3_present(void)
{ {

View File

@ -24,13 +24,11 @@
#include "southbridge/amd/sb700/smbus.h" #include "southbridge/amd/sb700/smbus.h"
#include "southbridge/amd/rs780/rs780.h" #include "southbridge/amd/rs780/rs780.h"
void set_pcie_dereset(void);
void set_pcie_reset(void);
/* /*
* Mahogany uses GPIO 6 as PCIe slot reset, GPIO4 as GFX slot reset. We need to * Mahogany uses GPIO 6 as PCIe slot reset, GPIO4 as GFX slot reset. We need to
* pull it up before training the slot. * pull it up before training the slot.
***/ ***/
void set_pcie_dereset() void set_pcie_dereset(void)
{ {
u16 word; u16 word;
struct device *sm_dev; struct device *sm_dev;
@ -43,7 +41,7 @@ void set_pcie_dereset()
pci_write_config16(sm_dev, 0xA8, word); pci_write_config16(sm_dev, 0xA8, word);
} }
void set_pcie_reset() void set_pcie_reset(void)
{ {
u16 word; u16 word;
struct device *sm_dev; struct device *sm_dev;

View File

@ -34,10 +34,7 @@
#define ADT7461_write_byte(address, val) \ #define ADT7461_write_byte(address, val) \
do_smbus_write_byte(SMBUS_IO_BASE, ADT7461_ADDRESS, address, val) do_smbus_write_byte(SMBUS_IO_BASE, ADT7461_ADDRESS, address, val)
void set_pcie_dereset(void); void set_pcie_dereset(void)
void set_pcie_reset(void);
void set_pcie_dereset()
{ {
u8 byte; u8 byte;
u16 word; u16 word;
@ -62,7 +59,7 @@ void set_pcie_dereset()
pci_write_config16(sm_dev, 0x7e, word); pci_write_config16(sm_dev, 0x7e, word);
} }
void set_pcie_reset() void set_pcie_reset(void)
{ {
u8 byte; u8 byte;
u16 word; u16 word;

View File

@ -24,11 +24,7 @@
#include "southbridge/amd/sb700/smbus.h" #include "southbridge/amd/sb700/smbus.h"
#include "southbridge/amd/rs780/rs780.h" #include "southbridge/amd/rs780/rs780.h"
void set_pcie_dereset(void)
void set_pcie_dereset(void);
void set_pcie_reset(void);
void set_pcie_dereset()
{ {
u8 byte; u8 byte;
u16 word; u16 word;
@ -53,7 +49,7 @@ void set_pcie_dereset()
pci_write_config16(sm_dev, 0x7e, word); pci_write_config16(sm_dev, 0x7e, word);
} }
void set_pcie_reset() void set_pcie_reset(void)
{ {
u8 byte; u8 byte;
u16 word; u16 word;

View File

@ -34,10 +34,7 @@
#define ADT7461_write_byte(address, val) \ #define ADT7461_write_byte(address, val) \
do_smbus_write_byte(SMBUS_IO_BASE, ADT7461_ADDRESS, address, val) do_smbus_write_byte(SMBUS_IO_BASE, ADT7461_ADDRESS, address, val)
void set_pcie_dereset(void); void set_pcie_dereset(void)
void set_pcie_reset(void);
void set_pcie_dereset()
{ {
u8 byte; u8 byte;
u16 word; u16 word;
@ -62,7 +59,7 @@ void set_pcie_dereset()
pci_write_config16(sm_dev, 0x7e, word); pci_write_config16(sm_dev, 0x7e, word);
} }
void set_pcie_reset() void set_pcie_reset(void)
{ {
u8 byte; u8 byte;
u16 word; u16 word;

View File

@ -23,9 +23,6 @@
#include <device/pci_def.h> #include <device/pci_def.h>
#include "southbridge/amd/rs780/rs780.h" #include "southbridge/amd/rs780/rs780.h"
void set_pcie_dereset(void);
void set_pcie_reset(void);
/* GPIO6. */ /* GPIO6. */
static void enable_int_gfx(void) static void enable_int_gfx(void)
{ {
@ -45,14 +42,6 @@ static void enable_int_gfx(void)
*(gpio_reg + 170) = 0x0; *(gpio_reg + 170) = 0x0;
} }
void set_pcie_dereset()
{
}
void set_pcie_reset(void)
{
}
int is_dev3_present(void) int is_dev3_present(void)
{ {
return 0; return 0;

View File

@ -23,9 +23,6 @@
#include <device/pci_def.h> #include <device/pci_def.h>
#include "southbridge/amd/rs780/rs780.h" #include "southbridge/amd/rs780/rs780.h"
void set_pcie_dereset(void);
void set_pcie_reset(void);
/* GPIO6. */ /* GPIO6. */
static void enable_int_gfx(void) static void enable_int_gfx(void)
{ {
@ -45,14 +42,6 @@ static void enable_int_gfx(void)
*(gpio_reg + 170) = 0x0; *(gpio_reg + 170) = 0x0;
} }
void set_pcie_dereset()
{
}
void set_pcie_reset(void)
{
}
int is_dev3_present(void) int is_dev3_present(void)
{ {
return 1; return 1;

View File

@ -24,10 +24,7 @@
#include "southbridge/amd/sb700/smbus.h" #include "southbridge/amd/sb700/smbus.h"
#include "southbridge/amd/rs780/rs780.h" #include "southbridge/amd/rs780/rs780.h"
void set_pcie_dereset(void); void set_pcie_dereset(void)
void set_pcie_reset(void);
void set_pcie_dereset()
{ {
u8 byte; u8 byte;
u16 word; u16 word;
@ -52,7 +49,7 @@ void set_pcie_dereset()
pci_write_config16(sm_dev, 0x7e, word); pci_write_config16(sm_dev, 0x7e, word);
} }
void set_pcie_reset() void set_pcie_reset(void)
{ {
u8 byte; u8 byte;
u16 word; u16 word;

View File

@ -34,10 +34,7 @@
#define ADT7461_write_byte(address, val) \ #define ADT7461_write_byte(address, val) \
do_smbus_write_byte(SMBUS_IO_BASE, ADT7461_ADDRESS, address, val) do_smbus_write_byte(SMBUS_IO_BASE, ADT7461_ADDRESS, address, val)
void set_pcie_dereset(void); void set_pcie_dereset(void)
void set_pcie_reset(void);
void set_pcie_dereset()
{ {
u8 byte; u8 byte;
u16 word; u16 word;
@ -62,7 +59,7 @@ void set_pcie_dereset()
pci_write_config16(sm_dev, 0x7e, word); pci_write_config16(sm_dev, 0x7e, word);
} }
void set_pcie_reset() void set_pcie_reset(void)
{ {
u8 byte; u8 byte;
u16 word; u16 word;

View File

@ -25,13 +25,11 @@
#include "southbridge/amd/sb700/smbus.h" #include "southbridge/amd/sb700/smbus.h"
#include "southbridge/amd/rs780/rs780.h" #include "southbridge/amd/rs780/rs780.h"
void set_pcie_dereset(void);
void set_pcie_reset(void);
/* /*
* ma78gm-us2h uses GPIO 6 as PCIe slot reset, GPIO4 as GFX slot reset. We need to * ma78gm-us2h uses GPIO 6 as PCIe slot reset, GPIO4 as GFX slot reset. We need to
* pull it up before training the slot. * pull it up before training the slot.
***/ ***/
void set_pcie_dereset() void set_pcie_dereset(void)
{ {
u16 word; u16 word;
struct device *sm_dev; struct device *sm_dev;
@ -44,7 +42,7 @@ void set_pcie_dereset()
pci_write_config16(sm_dev, 0xA8, word); pci_write_config16(sm_dev, 0xA8, word);
} }
void set_pcie_reset() void set_pcie_reset(void)
{ {
u16 word; u16 word;
struct device *sm_dev; struct device *sm_dev;

View File

@ -24,21 +24,10 @@
#include "southbridge/amd/sb700/smbus.h" #include "southbridge/amd/sb700/smbus.h"
#include "southbridge/amd/rs780/rs780.h" #include "southbridge/amd/rs780/rs780.h"
void set_pcie_dereset(void);
void set_pcie_reset(void);
/* TODO - Need to find GPIO for PCIE slot. /* TODO - Need to find GPIO for PCIE slot.
* Kino uses GPIO ? as PCIe slot reset, GPIO? as GFX slot reset. We need to * Kino uses GPIO ? as PCIe slot reset, GPIO? as GFX slot reset. We need to
* pull it up before training the slot. * pull it up before training the slot.
***/ ***/
void set_pcie_dereset()
{
/* PCIE slot not yet supported.*/
}
void set_pcie_reset()
{
/* PCIE slot not yet supported.*/
}
int is_dev3_present(void) int is_dev3_present(void)
{ {

View File

@ -25,14 +25,11 @@
#include "southbridge/amd/sb700/smbus.h" #include "southbridge/amd/sb700/smbus.h"
#include "southbridge/amd/rs780/rs780.h" #include "southbridge/amd/rs780/rs780.h"
void set_pcie_dereset(void);
void set_pcie_reset(void);
/* /*
* the board uses GPIO 6 as PCIe slot reset, GPIO4 as GFX slot reset. We need to * the board uses GPIO 6 as PCIe slot reset, GPIO4 as GFX slot reset. We need to
* pull it up before training the slot. * pull it up before training the slot.
***/ ***/
void set_pcie_dereset() void set_pcie_dereset(void)
{ {
u16 word; u16 word;
struct device *sm_dev; struct device *sm_dev;
@ -45,7 +42,7 @@ void set_pcie_dereset()
pci_write_config16(sm_dev, 0xA8, word); pci_write_config16(sm_dev, 0xA8, word);
} }
void set_pcie_reset() void set_pcie_reset(void)
{ {
u16 word; u16 word;
struct device *sm_dev; struct device *sm_dev;

View File

@ -256,9 +256,6 @@ u8 PcieTrainPort(struct device *nb_dev, struct device *dev, u32 port)
u32 lc_state, reg, current_link_width, lane_mask; u32 lc_state, reg, current_link_width, lane_mask;
int8_t current, res = 0; int8_t current, res = 0;
u32 gfx_gpp_sb_sel; u32 gfx_gpp_sb_sel;
void set_pcie_dereset(void);
void set_pcie_reset(void);
switch (port) { switch (port) {
case 2 ... 3: case 2 ... 3:
gfx_gpp_sb_sel = PCIE_CORE_INDEX_GFX; gfx_gpp_sb_sel = PCIE_CORE_INDEX_GFX;
@ -397,3 +394,11 @@ int is_family10h(void)
{ {
return cpuidFamily() == 0x10; return cpuidFamily() == 0x10;
} }
__weak void set_pcie_reset(void)
{
}
__weak void set_pcie_dereset(void)
{
}

View File

@ -36,9 +36,6 @@
#include <cpu/x86/msr.h> #include <cpu/x86/msr.h>
#include "rs780.h" #include "rs780.h"
void set_pcie_reset(void);
void set_pcie_dereset(void);
/* Trust the original resource allocation. Don't do it again. */ /* Trust the original resource allocation. Don't do it again. */
#undef DONT_TRUST_RESOURCE_ALLOCATION #undef DONT_TRUST_RESOURCE_ALLOCATION
//#define DONT_TRUST_RESOURCE_ALLOCATION //#define DONT_TRUST_RESOURCE_ALLOCATION

View File

@ -223,5 +223,7 @@ void enable_rs780_dev8(void);
void rs780_early_setup(void); void rs780_early_setup(void);
void rs780_htinit(void); void rs780_htinit(void);
int is_dev3_present(void); int is_dev3_present(void);
void set_pcie_reset(void);
void set_pcie_dereset(void);
#endif /* __RS780_H__ */ #endif /* __RS780_H__ */