From 325f431a9176cd9726474a08d9942819f4643ed9 Mon Sep 17 00:00:00 2001 From: Ben Chuang Date: Tue, 14 Sep 2021 11:31:42 +0800 Subject: [PATCH] drivers/genesyslogic/gl9755: Disable ASPM L0s support When the entry delay of L0s is less than the entry delay of L1, GL9755 will enter L0s state first. When it exits from L0s state, the time of L1 entry will be reset. Therefore, the conditions for entering L1 state cannot be met. In order to enter L1 state, L0s needs to be disabled. BUG=b:195611000 TEST=Verify GL9755 enters L1 by observing CLKREQ# de-asserts. Signed-off-by: Ben Chuang Change-Id: If121b5cb534eb32bac8992683c3f0eee8946acec Reviewed-on: https://review.coreboot.org/c/coreboot/+/57632 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Angel Pons Reviewed-by: Tim Wawrzynczak --- src/drivers/genesyslogic/gl9755/gl9755.c | 3 +++ src/drivers/genesyslogic/gl9755/gl9755.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/drivers/genesyslogic/gl9755/gl9755.c b/src/drivers/genesyslogic/gl9755/gl9755.c index a5778e3924..44342c6632 100644 --- a/src/drivers/genesyslogic/gl9755/gl9755.c +++ b/src/drivers/genesyslogic/gl9755/gl9755.c @@ -28,6 +28,9 @@ static void gl9755_enable(struct device *dev) reg |= CFG2_LAT_L1_64US; pci_write_config32(dev, CFG2, reg); + /* Disable ASPM L0s support */ + pci_and_config32(dev, CFG2, ~CFG2_L0S_SUPPORT); + /* Turn off debug mode to enable SCP/OCP */ pci_and_config32(dev, CFG3, ~SCP_DEBUG); diff --git a/src/drivers/genesyslogic/gl9755/gl9755.h b/src/drivers/genesyslogic/gl9755/gl9755.h index bc347fb16b..4d3d7e1b4a 100644 --- a/src/drivers/genesyslogic/gl9755/gl9755.h +++ b/src/drivers/genesyslogic/gl9755/gl9755.h @@ -10,6 +10,7 @@ #define CFG2 0x48 #define CFG2_LAT_L1_MASK ((0x7 << 12) | (0x7 << 3)) #define CFG2_LAT_L1_64US ((0x6 << 12) | (0x6 << 3)) +#define CFG2_L0S_SUPPORT (0x1 << 6) #define LTR 0x5C #define SNOOP_VALUE 0x25 #define SNOOP_SCALE (0x3 << 10)