Branden Waldner has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35530 )
Change subject: mb/asus/p2-99: add Asus P2-99 as a variant of Asus P2B
......................................................................
mb/asus/p2-99: add Asus P2-99 as a variant of Asus P2B
Squash add Asus P2-99 as clone of Asus P2B and convert clone to variant
Change-Id: I78bd3e215c9c35d272919850f52feac135d06ed8
---
M src/mainboard/asus/p2b/Kconfig
M src/mainboard/asus/p2b/Kconfig.name
2 files changed, 11 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/30/35530/1
diff --git a/src/mainboard/asus/p2b/Kconfig b/src/mainboard/asus/p2b/Kconfig
index f34b4dd..0c77779 100644
--- a/src/mainboard/asus/p2b/Kconfig
+++ b/src/mainboard/asus/p2b/Kconfig
@@ -12,7 +12,7 @@
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
-if BOARD_ASUS_P2B
+if BOARD_ASUS_P2B || BOARD_ASUS_P2_99
config BOARD_SPECIFIC_OPTIONS
def_bool y
@@ -28,12 +28,18 @@
string
default asus/p2b
+config VARIANT_DIR
+ string
+ default "p2-99" if BOARD_ASUS_P2_99
+ default "p2b" if BOARD_ASUS_P2B
+
config MAINBOARD_PART_NUMBER
string
+ default "P2-99" if BOARD_ASUS_P2_99
default "P2B"
config IRQ_SLOT_COUNT
int
default 6
-endif # BOARD_ASUS_P2B
+endif # BOARD_ASUS_P2B || BOARD_ASUS_P2_99
diff --git a/src/mainboard/asus/p2b/Kconfig.name b/src/mainboard/asus/p2b/Kconfig.name
index 60d6028..a299a35 100644
--- a/src/mainboard/asus/p2b/Kconfig.name
+++ b/src/mainboard/asus/p2b/Kconfig.name
@@ -1,2 +1,5 @@
config BOARD_ASUS_P2B
bool "P2B"
+
+config BOARD_ASUS_P2_99
+ bool "P2-99"
--
To view, visit https://review.coreboot.org/c/coreboot/+/35530
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I78bd3e215c9c35d272919850f52feac135d06ed8
Gerrit-Change-Number: 35530
Gerrit-PatchSet: 1
Gerrit-Owner: Branden Waldner <scruffy99(a)gmail.com>
Gerrit-MessageType: newchange
Hello Furquan Shaikh, Arthur Heymans, Kyösti Mälkki, Aaron Durbin,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/41553
to review the following change.
Change subject: device/pci: Don't enabled unassigned resources
......................................................................
device/pci: Don't enabled unassigned resources
We only have a single bit in the PCI_COMMAND register to enable
or disable resources of one type. If any resource of a type is
unassigned, we have to disable all of them.
Change-Id: I7a7e9c5c382358446b60a7bd5b29954f80cce07e
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M src/device/pci_device.c
1 file changed, 12 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/53/41553/1
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index 5afbfa9..8df44df 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -506,7 +506,8 @@
}
}
-static void pci_set_resource(struct device *dev, struct resource *resource)
+static void pci_set_resource(struct device *const dev, struct resource *const resource,
+ uint16_t *const command_mask)
{
/* Make certain the resource has actually been assigned a value. */
if (!(resource->flags & IORESOURCE_ASSIGNED)) {
@@ -518,6 +519,11 @@
printk(BIOS_ERR, "ERROR: %s %02lx %s size: 0x%010llx not "
"assigned\n", dev_path(dev), resource->index,
resource_type(resource), resource->size);
+ /* We'll have to disable all resources of this type. */
+ if (resource->flags & IORESOURCE_MEM)
+ *command_mask &= ~PCI_COMMAND_MEMORY;
+ if (resource->flags & IORESOURCE_IO)
+ *command_mask &= ~PCI_COMMAND_IO;
return;
}
}
@@ -561,12 +567,16 @@
void pci_dev_set_resources(struct device *dev)
{
+ uint16_t command_mask = 0xffff;
struct resource *res;
struct bus *bus;
u8 line;
for (res = dev->resource_list; res; res = res->next)
- pci_set_resource(dev, res);
+ pci_set_resource(dev, res, &command_mask);
+ /* If there are unassigned resources, we might
+ have to disable others of the same type. */
+ dev->command &= command_mask;
for (bus = dev->link_list; bus; bus = bus->next) {
if (bus->children)
--
To view, visit https://review.coreboot.org/c/coreboot/+/41553
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I7a7e9c5c382358446b60a7bd5b29954f80cce07e
Gerrit-Change-Number: 41553
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-MessageType: newchange