Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/18526 )
Change subject: binaryPI: Drop CAR teardown without POSTCAR_STAGE
......................................................................
Patch Set 12:
> Patch Set 12:
>
> > Patch Set 12:
> >
> > > Patch Set 12:
> > >
> > > This seems to cause "CPU #x would not start" and "CPU #x not initialized" failures on apu2.
> >
> > Noticed it a few moments ago when working on the patches... Maybe this wbinvd/invd revert is the cause?
>
> Yes, invd seems stable here. Which brings us back to the question of CAR teardown changes for AP that were done for stoneyriddge.
wbinvd seems stable, invd unstable
--
To view, visit https://review.coreboot.org/c/coreboot/+/18526
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I693c104c3aab3be537c00695cbd764a48bd603b0
Gerrit-Change-Number: 18526
Gerrit-PatchSet: 12
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Marc Jones <marc(a)marcjonesconsulting.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 02 Dec 2019 14:33:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/18526 )
Change subject: binaryPI: Drop CAR teardown without POSTCAR_STAGE
......................................................................
Patch Set 12:
> Patch Set 12:
>
> > Patch Set 12:
> >
> > This seems to cause "CPU #x would not start" and "CPU #x not initialized" failures on apu2.
>
> Noticed it a few moments ago when working on the patches... Maybe this wbinvd/invd revert is the cause?
Yes, invd seems stable here. Which brings us back to the question of CAR teardown changes for AP that were done for stoneyriddge.
--
To view, visit https://review.coreboot.org/c/coreboot/+/18526
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I693c104c3aab3be537c00695cbd764a48bd603b0
Gerrit-Change-Number: 18526
Gerrit-PatchSet: 12
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Marc Jones <marc(a)marcjonesconsulting.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 02 Dec 2019 14:31:17 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Michał Żygowski has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/18526 )
Change subject: binaryPI: Drop CAR teardown without POSTCAR_STAGE
......................................................................
Patch Set 12:
> Patch Set 12:
>
> This seems to cause "CPU #x would not start" and "CPU #x not initialized" failures on apu2.
Noticed it a few moments ago when working on the patches... Maybe this wbinvd/invd revert is the cause?
--
To view, visit https://review.coreboot.org/c/coreboot/+/18526
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I693c104c3aab3be537c00695cbd764a48bd603b0
Gerrit-Change-Number: 18526
Gerrit-PatchSet: 12
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Marc Jones <marc(a)marcjonesconsulting.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 02 Dec 2019 14:19:05 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/18526 )
Change subject: binaryPI: Drop CAR teardown without POSTCAR_STAGE
......................................................................
Patch Set 12:
This seems to cause "CPU #x would not start" and "CPU #x not initialized" failures on apu2.
--
To view, visit https://review.coreboot.org/c/coreboot/+/18526
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I693c104c3aab3be537c00695cbd764a48bd603b0
Gerrit-Change-Number: 18526
Gerrit-PatchSet: 12
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Marc Jones <marc(a)marcjonesconsulting.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 02 Dec 2019 13:49:45 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Michał Żygowski has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37328 )
Change subject: sb/amd/cimx: replace cimx_util with common ACPIMMIO AMD block
......................................................................
sb/amd/cimx: replace cimx_util with common ACPIMMIO AMD block
Drop the redundant cimx_util, remove the includes when appropriate and
replace the implementation with amdblocks/acpimmio where needed.
TEST=boot PC Engines apu1 and launch Debian with Linux kernel 4.14.50
Signed-off-by: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Change-Id: I66b1f82926372b6ebb570893b6eb73c7f2935b9d
---
M src/mainboard/amd/inagua/mainboard.c
M src/mainboard/amd/persimmon/mainboard.c
M src/mainboard/amd/south_station/mainboard.c
M src/mainboard/amd/union_station/mainboard.c
M src/mainboard/asrock/e350m1/mainboard.c
M src/mainboard/elmex/pcm205400/mainboard.c
M src/mainboard/gizmosphere/gizmo/mainboard.c
M src/mainboard/jetway/nf81-t56n-lf/mainboard.c
M src/mainboard/lippert/frontrunner-af/mainboard.c
M src/mainboard/lippert/toucan-af/mainboard.c
M src/mainboard/pcengines/apu1/gpio_ftns.c
M src/mainboard/pcengines/apu1/mainboard.c
M src/mainboard/pcengines/apu1/romstage.c
M src/mainboard/pcengines/apu2/gpio_ftns.c
M src/southbridge/amd/cimx/Makefile.inc
D src/southbridge/amd/cimx/cimx_util.c
D src/southbridge/amd/cimx/cimx_util.h
M src/southbridge/amd/cimx/sb800/Kconfig
M src/southbridge/amd/cimx/sb800/fan.c
19 files changed, 45 insertions(+), 145 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/28/37328/1
diff --git a/src/mainboard/amd/inagua/mainboard.c b/src/mainboard/amd/inagua/mainboard.c
index cf40e26..83fe394 100644
--- a/src/mainboard/amd/inagua/mainboard.c
+++ b/src/mainboard/amd/inagua/mainboard.c
@@ -13,9 +13,9 @@
* GNU General Public License for more details.
*/
+#include <amdblocks/acpimmio.h>
#include <console/console.h>
#include <device/device.h>
-#include <southbridge/amd/cimx/cimx_util.h>
#include <southbridge/amd/cimx/sb800/SBPLATFORM.h> /* Platform Specific Definitions */
static void init_gpios(void)
@@ -63,8 +63,8 @@
* SPD read code has been made generic and moved out of the board
* directory, so the ASF init is being done here.
*/
- pm_iowrite(0x29, 0x80);
- pm_iowrite(0x28, 0x61);
+ pm_write8(0x29, 0x80);
+ pm_write8(0x28, 0x61);
}
struct chip_operations mainboard_ops = {
diff --git a/src/mainboard/amd/persimmon/mainboard.c b/src/mainboard/amd/persimmon/mainboard.c
index 43be863..0e89ffd 100644
--- a/src/mainboard/amd/persimmon/mainboard.c
+++ b/src/mainboard/amd/persimmon/mainboard.c
@@ -14,11 +14,11 @@
* GNU General Public License for more details.
*/
+#include <amdblocks/acpimmio.h>
#include <console/console.h>
#include <device/device.h>
#include <device/mmio.h>
#include <southbridge/amd/common/amd_pci_util.h>
-#include <southbridge/amd/cimx/cimx_util.h>
#include <southbridge/amd/cimx/sb800/SBPLATFORM.h>
#include <southbridge/amd/cimx/sb800/pci_devs.h>
#include <northbridge/amd/agesa/family14/pci_devs.h>
@@ -139,8 +139,8 @@
* SPD read code has been made generic and moved out of the board
* directory, so the ASF init is being done here.
*/
- pm_iowrite(0x29, 0x80);
- pm_iowrite(0x28, 0x61);
+ pm_write8(0x29, 0x80);
+ pm_write8(0x28, 0x61);
/* Initialize the PIRQ data structures for consumption */
pirq_setup();
diff --git a/src/mainboard/amd/south_station/mainboard.c b/src/mainboard/amd/south_station/mainboard.c
index c6f2196..9b041e0 100644
--- a/src/mainboard/amd/south_station/mainboard.c
+++ b/src/mainboard/amd/south_station/mainboard.c
@@ -13,10 +13,10 @@
* GNU General Public License for more details.
*/
+#include <amdblocks/acpimmio.h>
#include <console/console.h>
#include <delay.h>
#include <device/device.h>
-#include <southbridge/amd/cimx/cimx_util.h>
#include <southbridge/amd/cimx/sb800/SBPLATFORM.h> /* Platform Specific Definitions */
/**
@@ -59,8 +59,8 @@
* SPD read code has been made generic and moved out of the board
* directory, so the ASF init is being done here.
*/
- pm_iowrite(0x29, 0x80);
- pm_iowrite(0x28, 0x61);
+ pm_write8(0x29, 0x80);
+ pm_write8(0x28, 0x61);
}
struct chip_operations mainboard_ops = {
diff --git a/src/mainboard/amd/union_station/mainboard.c b/src/mainboard/amd/union_station/mainboard.c
index e2c0ac7..d680520 100644
--- a/src/mainboard/amd/union_station/mainboard.c
+++ b/src/mainboard/amd/union_station/mainboard.c
@@ -13,9 +13,9 @@
* GNU General Public License for more details.
*/
+#include <amdblocks/acpimmio.h>
#include <console/console.h>
#include <device/device.h>
-#include <southbridge/amd/cimx/cimx_util.h>
#include <southbridge/amd/cimx/sb800/SBPLATFORM.h> /* Platform Specific Definitions */
/**********************************************
@@ -31,8 +31,8 @@
* SPD read code has been made generic and moved out of the board
* directory, so the ASF init is being done here.
*/
- pm_iowrite(0x29, 0x80);
- pm_iowrite(0x28, 0x61);
+ pm_write8(0x29, 0x80);
+ pm_write8(0x28, 0x61);
}
struct chip_operations mainboard_ops = {
diff --git a/src/mainboard/asrock/e350m1/mainboard.c b/src/mainboard/asrock/e350m1/mainboard.c
index b83a57f..e2f4f2b 100644
--- a/src/mainboard/asrock/e350m1/mainboard.c
+++ b/src/mainboard/asrock/e350m1/mainboard.c
@@ -13,10 +13,10 @@
* GNU General Public License for more details.
*/
+#include <amdblocks/acpimmio.h>
#include <console/console.h>
#include <device/device.h>
#include <device/mmio.h>
-#include <southbridge/amd/cimx/cimx_util.h>
#include <southbridge/amd/cimx/sb800/SBPLATFORM.h>
/**********************************************
@@ -46,8 +46,8 @@
* SPD read code has been made generic and moved out of the board
* directory, so the ASF init is being done here.
*/
- pm_iowrite(0x29, 0x80);
- pm_iowrite(0x28, 0x61);
+ pm_write8(0x29, 0x80);
+ pm_write8(0x28, 0x61);
}
struct chip_operations mainboard_ops = {
diff --git a/src/mainboard/elmex/pcm205400/mainboard.c b/src/mainboard/elmex/pcm205400/mainboard.c
index 43be863..0e89ffd 100644
--- a/src/mainboard/elmex/pcm205400/mainboard.c
+++ b/src/mainboard/elmex/pcm205400/mainboard.c
@@ -14,11 +14,11 @@
* GNU General Public License for more details.
*/
+#include <amdblocks/acpimmio.h>
#include <console/console.h>
#include <device/device.h>
#include <device/mmio.h>
#include <southbridge/amd/common/amd_pci_util.h>
-#include <southbridge/amd/cimx/cimx_util.h>
#include <southbridge/amd/cimx/sb800/SBPLATFORM.h>
#include <southbridge/amd/cimx/sb800/pci_devs.h>
#include <northbridge/amd/agesa/family14/pci_devs.h>
@@ -139,8 +139,8 @@
* SPD read code has been made generic and moved out of the board
* directory, so the ASF init is being done here.
*/
- pm_iowrite(0x29, 0x80);
- pm_iowrite(0x28, 0x61);
+ pm_write8(0x29, 0x80);
+ pm_write8(0x28, 0x61);
/* Initialize the PIRQ data structures for consumption */
pirq_setup();
diff --git a/src/mainboard/gizmosphere/gizmo/mainboard.c b/src/mainboard/gizmosphere/gizmo/mainboard.c
index 36fa5f9..8196922 100644
--- a/src/mainboard/gizmosphere/gizmo/mainboard.c
+++ b/src/mainboard/gizmosphere/gizmo/mainboard.c
@@ -20,7 +20,6 @@
#include <device/device.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
-#include <southbridge/amd/cimx/cimx_util.h>
#include <southbridge/amd/cimx/sb800/SBPLATFORM.h>
/**********************************************
diff --git a/src/mainboard/jetway/nf81-t56n-lf/mainboard.c b/src/mainboard/jetway/nf81-t56n-lf/mainboard.c
index 3439d2f..0a12c3f 100644
--- a/src/mainboard/jetway/nf81-t56n-lf/mainboard.c
+++ b/src/mainboard/jetway/nf81-t56n-lf/mainboard.c
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*/
-
+#include <amdblocks/acpimmio.h>
#include <device/mmio.h>
#include <console/console.h>
#include <device/device.h>
@@ -23,7 +23,6 @@
#include <southbridge/amd/common/amd_pci_util.h>
#include <southbridge/amd/cimx/sb800/SBPLATFORM.h>
#include <southbridge/amd/cimx/sb800/pci_devs.h>
-#include <southbridge/amd/cimx/cimx_util.h>
#include <northbridge/amd/agesa/family14/pci_devs.h>
/***********************************************************
@@ -142,8 +141,8 @@
* SPD read code has been made generic and moved out of the board
* directory, so the ASF init is being done here.
*/
- pm_iowrite(0x29, 0x80);
- pm_iowrite(0x28, 0x61);
+ pm_write8(0x29, 0x80);
+ pm_write8(0x28, 0x61);
/* Initialize the PIRQ data structures for consumption */
pirq_setup();
diff --git a/src/mainboard/lippert/frontrunner-af/mainboard.c b/src/mainboard/lippert/frontrunner-af/mainboard.c
index 44d0104..ea473c0 100644
--- a/src/mainboard/lippert/frontrunner-af/mainboard.c
+++ b/src/mainboard/lippert/frontrunner-af/mainboard.c
@@ -14,6 +14,7 @@
*/
#include <stdlib.h>
+#include <amdblocks/acpimmio.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
@@ -21,7 +22,6 @@
#include <device/mmio.h>
#include <device/pci_ops.h>
#include <device/pci_def.h>
-#include <southbridge/amd/cimx/cimx_util.h>
#include <southbridge/amd/cimx/sb800/SBPLATFORM.h>
#include <vendorcode/amd/cimx/sb800/OEM.h> /* SMBUS0_BASE_ADDRESS */
#include <southbridge/amd/cimx/sb800/gpio_oem.h>
@@ -136,8 +136,8 @@
* SPD read code has been made generic and moved out of the board
* directory, so the ASF init is being done here.
*/
- pm_iowrite(0x29, 0x80);
- pm_iowrite(0x28, 0x61);
+ pm_write8(0x29, 0x80);
+ pm_write8(0x28, 0x61);
}
struct chip_operations mainboard_ops = {
diff --git a/src/mainboard/lippert/toucan-af/mainboard.c b/src/mainboard/lippert/toucan-af/mainboard.c
index 746b195..b000688 100644
--- a/src/mainboard/lippert/toucan-af/mainboard.c
+++ b/src/mainboard/lippert/toucan-af/mainboard.c
@@ -14,13 +14,13 @@
*/
#include <stdlib.h>
+#include <amdblocks/acpimmio.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/mmio.h>
#include <device/pci_ops.h>
#include <device/pci_def.h>
-#include <southbridge/amd/cimx/cimx_util.h>
#include <southbridge/amd/cimx/sb800/SBPLATFORM.h>
#include <vendorcode/amd/cimx/sb800/OEM.h> /* SMBUS0_BASE_ADDRESS */
#include <southbridge/amd/cimx/sb800/gpio_oem.h>
@@ -101,8 +101,8 @@
* SPD read code has been made generic and moved out of the board
* directory, so the ASF init is being done here.
*/
- pm_iowrite(0x29, 0x80);
- pm_iowrite(0x28, 0x61);
+ pm_write8(0x29, 0x80);
+ pm_write8(0x28, 0x61);
}
struct chip_operations mainboard_ops = {
diff --git a/src/mainboard/pcengines/apu1/gpio_ftns.c b/src/mainboard/pcengines/apu1/gpio_ftns.c
index 7a988e7..f0b64ac 100644
--- a/src/mainboard/pcengines/apu1/gpio_ftns.c
+++ b/src/mainboard/pcengines/apu1/gpio_ftns.c
@@ -14,23 +14,16 @@
*/
#include <stdint.h>
+#include <amdblocks/acpimmio.h>
#include <arch/io.h>
#include <southbridge/amd/cimx/sb800/SBPLATFORM.h>
-#include <southbridge/amd/cimx/cimx_util.h>
#include "gpio_ftns.h"
uintptr_t find_gpio_base(void)
{
- u8 pm_index, pm_data;
- uintptr_t base_addr = 0;
-
- /* Find the ACPImmioAddr base address */
- for (pm_index = 0x27; pm_index > 0x23; pm_index--) {
- outb(pm_index, PM_INDEX);
- pm_data = inb(PM_DATA);
- base_addr <<= 8;
- base_addr |= (u32)pm_data;
- }
+ uintptr_t base_addr;
+ /* Get the ACPIMMIO base address */
+ base_addr = pm_read32(0x24);
base_addr &= 0xFFFFF000;
return (base_addr);
}
diff --git a/src/mainboard/pcengines/apu1/mainboard.c b/src/mainboard/pcengines/apu1/mainboard.c
index 088c839..1c30291 100644
--- a/src/mainboard/pcengines/apu1/mainboard.c
+++ b/src/mainboard/pcengines/apu1/mainboard.c
@@ -21,7 +21,6 @@
#include <device/pci_ops.h>
#include <device/pci_def.h>
#include <southbridge/amd/common/amd_pci_util.h>
-#include <southbridge/amd/cimx/cimx_util.h>
#include <smbios.h>
#include <string.h>
#include <southbridge/amd/cimx/sb800/SBPLATFORM.h>
diff --git a/src/mainboard/pcengines/apu1/romstage.c b/src/mainboard/pcengines/apu1/romstage.c
index ab48943..89bf304 100644
--- a/src/mainboard/pcengines/apu1/romstage.c
+++ b/src/mainboard/pcengines/apu1/romstage.c
@@ -15,8 +15,8 @@
* GNU General Public License for more details.
*/
+#include <amdblocks/acpimmio.h>
#include <northbridge/amd/agesa/state_machine.h>
-#include <southbridge/amd/cimx/cimx_util.h>
#include <superio/nuvoton/common/nuvoton.h>
#include <superio/nuvoton/nct5104d/nct5104d.h>
#include "gpio_ftns.h"
@@ -33,16 +33,16 @@
* controlled in PM_REG 5Bh register. "Always Power On" works by writing a
* value of 05h.
*/
- u8 bdata = pm_ioread(SB_PMIOA_REG5B);
+ u8 bdata = pm_read8(SB_PMIOA_REG5B);
bdata &= 0xf8; //clear bits 0-2
bdata |= 0x05; //set bits 0,2
- pm_iowrite(SB_PMIOA_REG5B, bdata);
+ pm_write8(SB_PMIOA_REG5B, bdata);
/* Multi-function pins switch to GPIO0-35, these pins are shared with PCI pins */
- bdata = pm_ioread(SB_PMIOA_REGEA);
+ bdata = pm_read8(SB_PMIOA_REGEA);
bdata &= 0xfe; //clear bit 0
bdata |= 0x01; //set bit 0
- pm_iowrite(SB_PMIOA_REGEA, bdata);
+ pm_write8(SB_PMIOA_REGEA, bdata);
//configure required GPIOs
mmio_base = find_gpio_base();
diff --git a/src/mainboard/pcengines/apu2/gpio_ftns.c b/src/mainboard/pcengines/apu2/gpio_ftns.c
index a1e2e51..249ecc3 100644
--- a/src/mainboard/pcengines/apu2/gpio_ftns.c
+++ b/src/mainboard/pcengines/apu2/gpio_ftns.c
@@ -15,7 +15,6 @@
#include <stdint.h>
#include <device/mmio.h>
-#include <southbridge/amd/cimx/cimx_util.h>
#include <FchPlatform.h>
#include "gpio_ftns.h"
diff --git a/src/southbridge/amd/cimx/Makefile.inc b/src/southbridge/amd/cimx/Makefile.inc
index 5d1d3f6..6161c14 100644
--- a/src/southbridge/amd/cimx/Makefile.inc
+++ b/src/southbridge/amd/cimx/Makefile.inc
@@ -14,7 +14,3 @@
#
subdirs-$(CONFIG_SOUTHBRIDGE_AMD_CIMX_SB800) += sb800
-
-romstage-$(CONFIG_SOUTHBRIDGE_AMD_CIMX_SB800) += cimx_util.c
-
-ramstage-$(CONFIG_SOUTHBRIDGE_AMD_CIMX_SB800) += cimx_util.c
diff --git a/src/southbridge/amd/cimx/cimx_util.c b/src/southbridge/amd/cimx/cimx_util.c
deleted file mode 100644
index 1db04d8..0000000
--- a/src/southbridge/amd/cimx/cimx_util.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2010 Advanced Micro Devices, Inc.
- * Copyright (C) 2014 Sage Electronic Engineering, LLC.
- *
- * 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 <device/pci.h>
-#include <arch/io.h>
-#include "cimx_util.h"
-
-static void pmio_write_index(u16 port_base, u8 reg, u8 value)
-{
- outb(reg, port_base);
- outb(value, port_base + 1);
-}
-
-static u8 pmio_read_index(u16 port_base, u8 reg)
-{
- outb(reg, port_base);
- return inb(port_base + 1);
-}
-
-void pm_iowrite(u8 reg, u8 value)
-{
- pmio_write_index(PM_INDEX, reg, value);
-}
-
-u8 pm_ioread(u8 reg)
-{
- return pmio_read_index(PM_INDEX, reg);
-}
-
-void pm2_iowrite(u8 reg, u8 value)
-{
- pmio_write_index(PM2_INDEX, reg, value);
-}
-
-u8 pm2_ioread(u8 reg)
-{
- return pmio_read_index(PM2_INDEX, reg);
-}
diff --git a/src/southbridge/amd/cimx/cimx_util.h b/src/southbridge/amd/cimx/cimx_util.h
deleted file mode 100644
index bf41e8a..0000000
--- a/src/southbridge/amd/cimx/cimx_util.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2010 Advanced Micro Devices, Inc.
- * Copyright (C) 2014 Sage Electronic Engineering, LLC.
- *
- * 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.
- */
-
-#ifndef CIMX_UTIL_H
-#define CIMX_UTIL_H
-
-#include <stdint.h>
-
-/* FCH index/data registers */
-#define BIOSRAM_INDEX 0xcd4
-#define BIOSRAM_DATA 0xcd5
-#define PM_INDEX 0xcd6
-#define PM_DATA 0xcd7
-#define PM2_INDEX 0xcd0
-#define PM2_DATA 0xcd1
-#define PCI_INTR_INDEX 0xc00
-#define PCI_INTR_DATA 0xc01
-
-void pm_iowrite(u8 reg, u8 value);
-u8 pm_ioread(u8 reg);
-void pm2_iowrite(u8 reg, u8 value);
-u8 pm2_ioread(u8 reg);
-
-#endif /* CIMX_UTIL_H */
diff --git a/src/southbridge/amd/cimx/sb800/Kconfig b/src/southbridge/amd/cimx/sb800/Kconfig
index aa5160b..0b790b0 100644
--- a/src/southbridge/amd/cimx/sb800/Kconfig
+++ b/src/southbridge/amd/cimx/sb800/Kconfig
@@ -21,6 +21,9 @@
select AMD_SB_CIMX
select HAVE_CF9_RESET
select HAVE_CF9_RESET_PREPARE
+ select SOC_AMD_COMMON
+ select SOC_AMD_COMMON_BLOCK
+ select SOC_AMD_COMMON_BLOCK_ACPIMMIO
if SOUTHBRIDGE_AMD_CIMX_SB800
config BOOTBLOCK_SOUTHBRIDGE_INIT
diff --git a/src/southbridge/amd/cimx/sb800/fan.c b/src/southbridge/amd/cimx/sb800/fan.c
index a8dfa31..42c13d7 100644
--- a/src/southbridge/amd/cimx/sb800/fan.c
+++ b/src/southbridge/amd/cimx/sb800/fan.c
@@ -13,7 +13,7 @@
* GNU General Public License for more details.
*/
-#include <southbridge/amd/cimx/cimx_util.h>
+#include <amdblocks/acpimmio.h>
#include <device/device.h>
#include <device/pci.h> /* device_operations */
#include <device/pci_ops.h>
@@ -31,27 +31,27 @@
/* Init Fan 0 */
if (sb_chip->fan0_enabled)
for (i = 0; i < FAN_REGISTER_COUNT; i++)
- pm2_iowrite(FAN_0_OFFSET + i, sb_chip->fan0_config_vals[i]);
+ pm2_write8(FAN_0_OFFSET + i, sb_chip->fan0_config_vals[i]);
/* Init Fan 1 */
if (sb_chip->fan1_enabled)
for (i = 0; i < FAN_REGISTER_COUNT; i++)
- pm2_iowrite(FAN_1_OFFSET + i, sb_chip->fan1_config_vals[i]);
+ pm2_write8(FAN_1_OFFSET + i, sb_chip->fan1_config_vals[i]);
/* Init Fan 2 */
if (sb_chip->fan2_enabled)
for (i = 0; i < FAN_REGISTER_COUNT; i++)
- pm2_iowrite(FAN_2_OFFSET + i, sb_chip->fan2_config_vals[i]);
+ pm2_write8(FAN_2_OFFSET + i, sb_chip->fan2_config_vals[i]);
/* Init Fan 3 */
if (sb_chip->fan3_enabled)
for (i = 0; i < FAN_REGISTER_COUNT; i++)
- pm2_iowrite(FAN_3_OFFSET + i, sb_chip->fan3_config_vals[i]);
+ pm2_write8(FAN_3_OFFSET + i, sb_chip->fan3_config_vals[i]);
/* Init Fan 4 */
if (sb_chip->fan4_enabled)
for (i = 0; i < FAN_REGISTER_COUNT; i++)
- pm2_iowrite(FAN_4_OFFSET + i, sb_chip->fan4_config_vals[i]);
+ pm2_write8(FAN_4_OFFSET + i, sb_chip->fan4_config_vals[i]);
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/37328
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I66b1f82926372b6ebb570893b6eb73c7f2935b9d
Gerrit-Change-Number: 37328
Gerrit-PatchSet: 1
Gerrit-Owner: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-MessageType: newchange
Sakari Ailus has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36746 )
Change subject: mb/google/poppy: Remove useless ifs around voltage and GPIO direction configuration
......................................................................
mb/google/poppy: Remove useless ifs around voltage and GPIO direction configuration
The methods generally tested OP region settings and only changed them if
they were not in their desired values. Instead, assign them directly
without checking them.
Signed-off-by: Sakari Ailus <sakari.ailus(a)linux.intel.com>
Tested-by: Jacopo Mondi <jacopo(a)jmondi.org>
Change-Id: I3ceca4bd51c4410c7020431f4fd682c4ca925110
---
M src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/camera_pmic.asl
1 file changed, 11 insertions(+), 30 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/36746/1
diff --git a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/camera_pmic.asl b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/camera_pmic.asl
index d70726f..d15f5c6 100644
--- a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/camera_pmic.asl
+++ b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/camera_pmic.asl
@@ -438,10 +438,6 @@
}
}
- /* C0GP is used to indicate if CAM0
- * GPIOs are configured as input.
- */
- Name (C0GP, 0)
/* Power resource methods for CAM0 */
PowerResource (OVTH, 0, 0) {
Name (STA, 0)
@@ -453,22 +449,15 @@
daisy chain */
DOVD(1)
- If (LEqual (C0GP, 0)) {
- \_SB.PCI0.I2C2.PMIC.CGP1()
- \_SB.PCI0.I2C2.PMIC.CGP2()
- C0GP = 1
- }
+ \_SB.PCI0.I2C2.PMIC.CGP1()
+ \_SB.PCI0.I2C2.PMIC.CGP2()
- if (LNotEqual (ACVA, 109)) {
- /* Set ANA at 2.8152V */
- ACVA = 109
- }
+ /* Set ANA at 2.8152V */
+ ACVA = 109
VACT = 1
- if (LNotEqual (DCVA, 12)) {
- /* Set CORE at 1.2V */
- DCVA = 12
- }
+ /* Set CORE at 1.2V */
+ DCVA = 12
VDCT = 1
\_SB.PCI0.I2C2.PMIC.CLKE()
@@ -527,11 +516,8 @@
daisy chain */
DOVD(1)
- if (LNotEqual (AX2V, 52)) {
- /* Set VAUX2 as
- 1.8006 V */
- AX2V = 52
- }
+ /* Set VAUX2 as 1.8006 V */
+ AX2V = 52
VAX2 = 1 /* Enable VAUX2 */
\_SB.PCI0.I2C2.PMIC.CGP4(1)
@@ -542,10 +528,8 @@
*/
Sleep(1)
- if (LNotEqual (AX1V, 19)) {
/* Set VAUX1 as 1.2132V */
- AX1V = 19
- }
+ AX1V = 19
VAX1 = 1 /* Enable VAUX1 */
/* Wait for VDD to settle. */
@@ -603,11 +587,8 @@
/* Enable VCM regulator */
VCMC = 1
- if (LNotEqual (VCMV, 109)) {
- /* Set VCM value at
- 2.8152 V */
- VCMV = 109
- }
+ /* Set VCM value at 2.8152 V */
+ VCMV = 109
Sleep(3)
STA = 1
--
To view, visit https://review.coreboot.org/c/coreboot/+/36746
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3ceca4bd51c4410c7020431f4fd682c4ca925110
Gerrit-Change-Number: 36746
Gerrit-PatchSet: 1
Gerrit-Owner: Sakari Ailus <sakari.ailus+coreboot.org(a)linux.intel.com>
Gerrit-MessageType: newchange