Marc Jones (marc(a)marcjonesconsulting.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17227
-gerrit
commit 1bb2506094e91497978aca164ef47b9656c715c8
Author: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Date: Tue Oct 11 14:19:07 2016 -0400
amd/gardenia: Enable LPC decodes
Turn on LPC decoding in romstage.
Original-Signed-off-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Original-Reviewed-by: Marc Jones <marcj303(a)gmail.com>
(cherry picked from commit 5d9dae5a1fdab1bf6c418dc7e6de28069bd342dc)
Change-Id: I937eb5c5b6c6a9f7a13ebd0bec7fcc8d789427ce
Signed-off-by: Marc Jones <marcj303(a)gmail.com>
---
src/mainboard/amd/gardenia/romstage.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mainboard/amd/gardenia/romstage.c b/src/mainboard/amd/gardenia/romstage.c
index c3e2aa4..eca9d3b 100644
--- a/src/mainboard/amd/gardenia/romstage.c
+++ b/src/mainboard/amd/gardenia/romstage.c
@@ -1,7 +1,7 @@
/*
* This file is part of the coreboot project.
*
- * Copyright (C) 2015 Advanced Micro Devices, Inc.
+ * Copyright (C) 2015-2016 Advanced Micro Devices, Inc.
*
* 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
@@ -33,8 +33,8 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
#endif
amd_initmmio();
-
hudson_lpc_port80();
+ hudson_lpc_decode();
if (!cpu_init_detectedx && boot_cpu()) {
post_code(0x30);
Marc Jones (marc(a)marcjonesconsulting.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17223
-gerrit
commit 4659b26492b4b529a5f5d8b91247a9a58867466e
Author: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Date: Thu Oct 13 11:41:50 2016 -0400
amd/gardenia: Update xHCI configuration
Remove a duplicated check and setting for xHCI during the
AMD_INIT_RESET callout. This is handled by the wrapper. Also
remove nearby commented code. EcChannel0 is not a member of
FCH_RESET_DATA_BLOCK.
Leave the check in AMD_INIT_ENV. Although AGESA honors what
was previously requested, additional settings depend on the
state of Usb.Xhci0Enable.
Original-Signed-off-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Original-Reviewed-by: Marc Jones <marcj303(a)gmail.com>
(cherry picked from commit ca862fbacbe80b1345ad6f23262a9769f05c50fd)
Change-Id: I45a5123e158cd7399d6d286999371d4a0e0fa963
Signed-off-by: Marc Jones <marcj303(a)gmail.com>
---
src/mainboard/amd/gardenia/BiosCallOuts.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/mainboard/amd/gardenia/BiosCallOuts.c b/src/mainboard/amd/gardenia/BiosCallOuts.c
index df9139f..32b1fec 100644
--- a/src/mainboard/amd/gardenia/BiosCallOuts.c
+++ b/src/mainboard/amd/gardenia/BiosCallOuts.c
@@ -76,9 +76,6 @@ AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr)
if (StdHeader->Func == AMD_INIT_RESET) {
FCH_RESET_DATA_BLOCK *FchParams_reset = (FCH_RESET_DATA_BLOCK *)FchData;
printk(BIOS_DEBUG, "Fch OEM config in INIT RESET ");
- //FchParams_reset->EcChannel0 = TRUE; /* logical devicd 3 */
- FchParams_reset->FchReset.Xhci0Enable = IS_ENABLED(CONFIG_HUDSON_XHCI_ENABLE);
- FchParams_reset->FchReset.Xhci1Enable = FALSE;
FchParams_reset->EarlyOemGpioTable = oem_gardenia_gpio;
} else if (StdHeader->Func == AMD_INIT_ENV) {
FCH_DATA_BLOCK *FchParams_env = (FCH_DATA_BLOCK *)FchData;
Marc Jones (marc(a)marcjonesconsulting.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17221
-gerrit
commit cb24146f1dcdbd4ebdc7f4777603aaaae08cc53d
Author: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Date: Sat Oct 8 10:14:14 2016 -0600
amd/gardenia: Remove board ID capability
Remove the last bit of Bettong board_id checking from Gardenia.
Original-Signed-off-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Original-Reviewed-by: Marc Jones <marcj303(a)gmail.com>
(cherry picked from commit b617823d1d2860a3f6d766a40ae95e5486739a5c)
Change-Id: Ibc56dbbfa1b15b21ebadb9f6c9c54936566a2986
Signed-off-by: Marc Jones <marcj303(a)gmail.com>
---
src/mainboard/amd/gardenia/Makefile.inc | 2 --
src/mainboard/amd/gardenia/boardid.c | 48 ---------------------------------
2 files changed, 50 deletions(-)
diff --git a/src/mainboard/amd/gardenia/Makefile.inc b/src/mainboard/amd/gardenia/Makefile.inc
index 99159e8..0994a70 100644
--- a/src/mainboard/amd/gardenia/Makefile.inc
+++ b/src/mainboard/amd/gardenia/Makefile.inc
@@ -15,11 +15,9 @@
romstage-y += BiosCallOuts.c
romstage-y += OemCustomize.c
-romstage-y += boardid.c
ramstage-y += BiosCallOuts.c
ramstage-y += OemCustomize.c
ifeq ($(CONFIG_HUDSON_IMC_FWM), y)
ramstage-y += fchec.c
endif
-ramstage-y += boardid.c
diff --git a/src/mainboard/amd/gardenia/boardid.c b/src/mainboard/amd/gardenia/boardid.c
deleted file mode 100644
index e2e8162..0000000
--- a/src/mainboard/amd/gardenia/boardid.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2015 Advanced Micro Devices, Inc.
- *
- * 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 <stdint.h>
-#include <arch/io.h>
-#include <boardid.h>
-
-/**
- *Gardenia uses 3 GPIO(5-7) pins to identify board.
- *The GPIO ports are mapped to MMIO space.
- *The GPIO value and board version are mapped as follow:
- *GPIO5 GPIO6 GPIO7 Version
- * 0 0 0 A
- * 0 0 1 B
- * ......
- * 1 1 1 H
- */
-uint8_t board_id(void)
-{
- void *gpiommioaddr;
- u8 value = 0;
- u8 boardrev = 0;
- char boardid;
-
- gpiommioaddr = (void *)0xfed80000ul + 0x1500;
- value = read8(gpiommioaddr + (7 << 2) + 2); /* agpio7: board_id2 */
- boardrev = value & 1;
- value = read8(gpiommioaddr + (6 << 2) + 2); /* agpio6: board_id1 */
- boardrev |= (value & 1) << 1;
- value = read8(gpiommioaddr + (5 << 2) + 2); /* agpio5: board_id0 */
- boardrev |= (value & 1) << 2;
-
- boardid = 'A' + boardrev;
-
- return boardid;
-}
Marc Jones (marc(a)marcjonesconsulting.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17219
-gerrit
commit 1a869d183f7ba11e3ce5a9391d3f8b01da7c550b
Author: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Date: Sat Oct 8 09:53:58 2016 -0600
amd/gardenia: Correct SPD AGESA callout
Gardenia makes no special considerations for a board_id regarding
SPD access and addressing. Remove this from the source and use
the standard AGESA call.
Make SPD address changes to devicetree.cb. Note that Gardenia is
designed to be a two channel, single DIMM/channel system (some SKUs
with two DIMMs on the second channel). However, this port is for
the Stoney processor which is a single channel. As a result, the
second DIMM slot is not usable. A future improvement could involve
a port using a different processor, with unique devicetree files
for each.
Original-Signed-off-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Original-Reviewed-by: Marc Jones <marcj303(a)gmail.com>
(cherry picked from commit 77511f98f819dfe08c3ed16ebc11e1b328bdca15)
Change-Id: Id00c2be83340ceeec043ec86e96779e6bf46ae7b
Signed-off-by: Marc Jones <marcj303(a)gmail.com>
---
src/mainboard/amd/gardenia/BiosCallOuts.c | 46 ++-----------------------------
src/mainboard/amd/gardenia/devicetree.cb | 7 ++---
2 files changed, 5 insertions(+), 48 deletions(-)
diff --git a/src/mainboard/amd/gardenia/BiosCallOuts.c b/src/mainboard/amd/gardenia/BiosCallOuts.c
index 380c3f4..44644ce 100644
--- a/src/mainboard/amd/gardenia/BiosCallOuts.c
+++ b/src/mainboard/amd/gardenia/BiosCallOuts.c
@@ -1,7 +1,7 @@
/*
* This file is part of the coreboot project.
*
- * Copyright (C) 2015 Advanced Micro Devices, Inc.
+ * Copyright (C) 2015-2016 Advanced Micro Devices, Inc.
*
* 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
@@ -35,14 +35,13 @@
#include <boardid.h>
static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr);
-static AGESA_STATUS board_ReadSpd(UINT32 Func, UINTN Data, VOID *ConfigPtr);
const BIOS_CALLOUT_STRUCT BiosCallouts[] =
{
{AGESA_ALLOCATE_BUFFER, agesa_AllocateBuffer },
{AGESA_DEALLOCATE_BUFFER, agesa_DeallocateBuffer },
{AGESA_LOCATE_BUFFER, agesa_LocateBuffer },
- {AGESA_READ_SPD, board_ReadSpd },
+ {AGESA_READ_SPD, agesa_ReadSpd },
{AGESA_DO_RESET, agesa_Reset },
{AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported },
{AGESA_RUNFUNC_ONAP, agesa_RunFuncOnAp },
@@ -104,43 +103,6 @@ AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr)
return AGESA_SUCCESS;
}
-static AGESA_STATUS board_ReadSpd(UINT32 Func, UINTN Data, VOID *ConfigPtr)
-{
-#ifdef __PRE_RAM__
- int spdAddress;
- AGESA_READ_SPD_PARAMS *info = ConfigPtr;
-
- ROMSTAGE_CONST struct device *dev = dev_find_slot(0, PCI_DEVFN(0x18, 2));
- ROMSTAGE_CONST struct northbridge_amd_pi_00670F00_config *config = dev->chip_info;
- UINT8 spdAddrLookup_rev_F [2][2][4]= {
- { {0xA0, 0xA2}, {0xA4, 0xAC}, }, /* socket 0 - Channel 0 & 1 - 8-bit SPD addresses */
- { {0x00, 0x00}, {0x00, 0x00}, }, /* socket 1 - Channel 0 & 1 - 8-bit SPD addresses */
- };
-
- if ((dev == 0) || (config == 0))
- return AGESA_ERROR;
- if (info->SocketId >= ARRAY_SIZE(config->spdAddrLookup))
- return AGESA_ERROR;
- if (info->MemChannelId >= ARRAY_SIZE(config->spdAddrLookup[0]))
- return AGESA_ERROR;
- if (info->DimmId >= ARRAY_SIZE(config->spdAddrLookup[0][0]))
- return AGESA_ERROR;
- if (board_id() == 'F')
- spdAddress = spdAddrLookup_rev_F
- [info->SocketId] [info->MemChannelId] [info->DimmId];
- else
- spdAddress = config->spdAddrLookup
- [info->SocketId] [info->MemChannelId] [info->DimmId];
-
- if (spdAddress == 0)
- return AGESA_ERROR;
- int err = hudson_readSpd(spdAddress, (void *) info->Buffer, 128);
- if (err)
- return AGESA_ERROR;
-#endif
- return AGESA_SUCCESS;
-}
-
#ifdef __PRE_RAM__
const PSO_ENTRY DDR4PlatformMemoryConfiguration[] = {
@@ -157,8 +119,6 @@ const PSO_ENTRY DDR4PlatformMemoryConfiguration[] = {
void OemPostParams(AMD_POST_PARAMS *PostParams)
{
- if (board_id() == 'F') {
- PostParams->MemConfig.PlatformMemoryConfiguration = (PSO_ENTRY *)DDR4PlatformMemoryConfiguration;
- }
+ PostParams->MemConfig.PlatformMemoryConfiguration = (PSO_ENTRY *)DDR4PlatformMemoryConfiguration;
}
#endif
diff --git a/src/mainboard/amd/gardenia/devicetree.cb b/src/mainboard/amd/gardenia/devicetree.cb
index 946aae9..a7573b1 100644
--- a/src/mainboard/amd/gardenia/devicetree.cb
+++ b/src/mainboard/amd/gardenia/devicetree.cb
@@ -1,7 +1,7 @@
#
# This file is part of the coreboot project.
#
-# Copyright (C) 2015 Advanced Micro Devices, Inc.
+# Copyright (C) 2015-2016 Advanced Micro Devices, Inc.
#
# 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
@@ -42,10 +42,7 @@ chip northbridge/amd/pi/00670F00/root_complex
device pci 11.0 on end # SATA
device pci 12.0 on end # EHCI
device pci 14.0 on # SM
- chip drivers/generic/generic #dimm 0-0-0
- device i2c 50 on end
- end
- chip drivers/generic/generic #dimm 0-0-1
+ chip drivers/generic/generic # dimm 0-0-0
device i2c 51 on end
end
end # SM