soc/amd: Move stoneyridge features out of agesawrapper

The AGESA wrapper should not use and CONFIG_STONEY* values, nor should
it make any assumptions about the capabilities of a particular device.
Move these into stoneyridge northbridge and southbridge files.

BUG=b:70670425
TEST=Build and run Kahlee

Change-Id: I706edbb6a048b64389ba3077d5df0fe6155070b3
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22886
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Marshall Dawson
2017-12-14 10:00:27 -07:00
committed by Martin Roth
parent ff4da93f4e
commit 2942db6d6d
4 changed files with 54 additions and 20 deletions

View File

@@ -31,6 +31,34 @@
#include <fchec.h>
#include <delay.h>
#include <soc/pci_devs.h>
#include <agesa_headers.h>
static int is_sata_config(void)
{
return !((CONFIG_STONEYRIDGE_SATA_MODE == SataNativeIde)
|| (CONFIG_STONEYRIDGE_SATA_MODE == SataLegacyIde));
}
void SetFchResetParams(FCH_RESET_INTERFACE *params)
{
params->Xhci0Enable = IS_ENABLED(CONFIG_STONEYRIDGE_XHCI_ENABLE);
params->SataEnable = is_sata_config();
params->IdeEnable = !params->SataEnable;
}
void SetFchEnvParams(FCH_INTERFACE *params)
{
params->AzaliaController = AzEnable;
params->SataClass = CONFIG_STONEYRIDGE_SATA_MODE;
params->SataEnable = is_sata_config();
params->IdeEnable = !params->SataEnable;
params->SataIdeMode = (CONFIG_STONEYRIDGE_SATA_MODE == SataLegacyIde);
}
void SetFchMidParams(FCH_INTERFACE *params)
{
SetFchEnvParams(params);
}
/*
* Table of APIC register index and associated IRQ name. Using IDX_XXX_NAME