Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/52626 )
Change subject: mb/google/dedede: Create pirika variant
......................................................................
mb/google/dedede: Create pirika variant
Create the pirika variant of the waddledee reference board by
copying the template files to a new directory named for the variant.
(Auto-Generated by create_coreboot_variant.sh version 4.5.0).
BUG=b:184157747
BRANCH=None
TEST=util/abuild/abuild -p none -t google/dedede -x -a
make sure the build includes GOOGLE_PIRIKA
Signed-off-by: kirk_wang <kirk_wang(a)pegatron.corp-partner.google.com>
Change-Id: I57bf33deeadacc88800f9ce1d3d54385ba56c798
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52626
Reviewed-by: Paul Fagerburg <pfagerburg(a)chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub(a)google.com>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M src/mainboard/google/dedede/Kconfig
M src/mainboard/google/dedede/Kconfig.name
A src/mainboard/google/dedede/variants/pirika/include/variant/ec.h
A src/mainboard/google/dedede/variants/pirika/include/variant/gpio.h
A src/mainboard/google/dedede/variants/pirika/memory/Makefile.inc
A src/mainboard/google/dedede/variants/pirika/memory/dram_id.generated.txt
A src/mainboard/google/dedede/variants/pirika/memory/mem_parts_used.txt
A src/mainboard/google/dedede/variants/pirika/overridetree.cb
8 files changed, 82 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Karthik Ramasubramanian: Looks good to me, approved
Paul Fagerburg: Looks good to me, but someone else must approve
Kirk Wang: Looks good to me, but someone else must approve
diff --git a/src/mainboard/google/dedede/Kconfig b/src/mainboard/google/dedede/Kconfig
index 3ec377e..e237b80 100644
--- a/src/mainboard/google/dedede/Kconfig
+++ b/src/mainboard/google/dedede/Kconfig
@@ -109,6 +109,7 @@
default "Kracko" if BOARD_GOOGLE_KRACKO
default "Blipper" if BOARD_GOOGLE_BLIPPER
default "Cret" if BOARD_GOOGLE_CRET
+ default "Pirika" if BOARD_GOOGLE_PIRIKA
config MAX_CPUS
int
@@ -144,6 +145,7 @@
default "kracko" if BOARD_GOOGLE_KRACKO
default "blipper" if BOARD_GOOGLE_BLIPPER
default "cret" if BOARD_GOOGLE_CRET
+ default "pirika" if BOARD_GOOGLE_PIRIKA
endif #BOARD_GOOGLE_BASEBOARD_DEDEDE
diff --git a/src/mainboard/google/dedede/Kconfig.name b/src/mainboard/google/dedede/Kconfig.name
index 9a960e8..e0ead8c 100644
--- a/src/mainboard/google/dedede/Kconfig.name
+++ b/src/mainboard/google/dedede/Kconfig.name
@@ -133,3 +133,8 @@
select BASEBOARD_DEDEDE_LAPTOP
select DRIVERS_GENERIC_MAX98357A
select DRIVERS_I2C_DA7219
+
+config BOARD_GOOGLE_PIRIKA
+ bool "-> Pirika"
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
+ select BASEBOARD_DEDEDE_LAPTOP
diff --git a/src/mainboard/google/dedede/variants/pirika/include/variant/ec.h b/src/mainboard/google/dedede/variants/pirika/include/variant/ec.h
new file mode 100644
index 0000000..08870e0
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/pirika/include/variant/ec.h
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#ifndef MAINBOARD_EC_H
+#define MAINBOARD_EC_H
+
+#include <baseboard/ec.h>
+
+#endif
diff --git a/src/mainboard/google/dedede/variants/pirika/include/variant/gpio.h b/src/mainboard/google/dedede/variants/pirika/include/variant/gpio.h
new file mode 100644
index 0000000..9078664
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/pirika/include/variant/gpio.h
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#ifndef MAINBOARD_GPIO_H
+#define MAINBOARD_GPIO_H
+
+#include <baseboard/gpio.h>
+
+#endif /* MAINBOARD_GPIO_H */
diff --git a/src/mainboard/google/dedede/variants/pirika/memory/Makefile.inc b/src/mainboard/google/dedede/variants/pirika/memory/Makefile.inc
new file mode 100644
index 0000000..b0ca222
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/pirika/memory/Makefile.inc
@@ -0,0 +1,5 @@
+## SPDX-License-Identifier: GPL-2.0-or-later
+## This is an auto-generated file. Do not edit!!
+## Add memory parts in mem_parts_used.txt and run spd_tools to regenerate.
+
+SPD_SOURCES = placeholder.spd.hex
diff --git a/src/mainboard/google/dedede/variants/pirika/memory/dram_id.generated.txt b/src/mainboard/google/dedede/variants/pirika/memory/dram_id.generated.txt
new file mode 100644
index 0000000..fa24790
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/pirika/memory/dram_id.generated.txt
@@ -0,0 +1 @@
+DRAM Part Name ID to assign
diff --git a/src/mainboard/google/dedede/variants/pirika/memory/mem_parts_used.txt b/src/mainboard/google/dedede/variants/pirika/memory/mem_parts_used.txt
new file mode 100644
index 0000000..e4258b5
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/pirika/memory/mem_parts_used.txt
@@ -0,0 +1,11 @@
+# This is a CSV file containing a list of memory parts used by this variant.
+# One part per line with an optional fixed ID in column 2.
+# Only include a fixed ID if it is required for legacy reasons!
+# Generated IDs are dependent on the order of parts in this file,
+# so new parts must always be added at the end of the file!
+#
+# Generate an updated Makefile.inc and dram_id.generated.txt by running the
+# gen_part_id tool from util/spd_tools/{ddr4,lp4x}.
+# See util/spd_tools/{ddr4,lp4x}/README.md for more details and instructions.
+
+# Part Name
diff --git a/src/mainboard/google/dedede/variants/pirika/overridetree.cb b/src/mainboard/google/dedede/variants/pirika/overridetree.cb
new file mode 100644
index 0000000..404024b
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/pirika/overridetree.cb
@@ -0,0 +1,42 @@
+chip soc/intel/jasperlake
+
+ # Intel Common SoC Config
+ #+-------------------+---------------------------+
+ #| Field | Value |
+ #+-------------------+---------------------------+
+ #| GSPI0 | cr50 TPM. Early init is |
+ #| | required to set up a BAR |
+ #| | for TPM communication |
+ #| | before memory is up |
+ #| I2C0 | Trackpad |
+ #| I2C1 | Digitizer |
+ #| I2C2 | Touchscreen |
+ #| I2C3 | Camera |
+ #| I2C4 | Audio |
+ #+-------------------+---------------------------+
+ register "common_soc_config" = "{
+ .gspi[0] = {
+ .speed_mhz = 1,
+ .early_init = 1,
+ },
+ .i2c[0] = {
+ .speed = I2C_SPEED_FAST,
+ },
+ .i2c[1] = {
+ .speed = I2C_SPEED_FAST,
+ },
+ .i2c[2] = {
+ .speed = I2C_SPEED_FAST,
+ },
+ .i2c[3] = {
+ .speed = I2C_SPEED_FAST,
+ },
+ .i2c[4] = {
+ .speed = I2C_SPEED_FAST,
+ },
+ }"
+
+ device domain 0 on
+ device pci 15.0 on end
+ end
+end
--
To view, visit https://review.coreboot.org/c/coreboot/+/52626
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I57bf33deeadacc88800f9ce1d3d54385ba56c798
Gerrit-Change-Number: 52626
Gerrit-PatchSet: 3
Gerrit-Owner: Kirk Wang
Gerrit-Reviewer: Alex1 Kao <alex1_kao(a)pegatron.corp-partner.google.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Henry Sun <henrysun(a)google.com>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Kirk Wang <kirk_wang(a)pegatron.corp-partner.google.com>
Gerrit-Reviewer: Paul Fagerburg <pfagerburg(a)chromium.org>
Gerrit-Reviewer: Paul2 Huang <paul2_huang(a)pegatron.corp-partner.google.com>
Gerrit-Reviewer: Shou-Chieh Hsu <shouchieh(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Ariel Chang <ariel_chang(a)pegatron.corp-partner.google.com>
Gerrit-CC: Hao Chou <hao_chou(a)pegatron.corp-partner.google.com>
Gerrit-CC: Wayne3 Wang <wayne3_wang(a)pegatron.corp-partner.google.com>
Gerrit-MessageType: merged
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/52782 )
Change subject: soc/intel/common/block: Add definition for NAF_VWE bit for PAD_CFG0 reg
......................................................................
soc/intel/common/block: Add definition for NAF_VWE bit for PAD_CFG0 reg
Earlier we did not have definition for BIT27 for PAD_CFG0 register, we
will use this BIT to enable "virtual wire messaging for native function"
If this bit is enabled, whenever change is detected on the pad, virtual
wire message is generated and sent to destination set by native function.
This bit must be set while enabling CPU PCIe root port programming for
ADL and thus defining a new macro to set native pad function along with
NAF_VWE bit to make GPIO programming easier from coreboot.
BUG=None
BRANCH=None
TEST=Code compilation works fine and if we use this macro to program
GPIO, proper bit is getting set in PAD_CFG register
Change-Id: I732e68b413eb01b8ae1a4927836762c8875b73d2
Signed-off-by: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52782
Reviewed-by: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Reviewed-by: Subrata Banik <subrata.banik(a)intel.com>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M src/soc/intel/common/block/include/intelblocks/gpio_defs.h
1 file changed, 8 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Subrata Banik: Looks good to me, but someone else must approve
Tim Wawrzynczak: Looks good to me, approved
diff --git a/src/soc/intel/common/block/include/intelblocks/gpio_defs.h b/src/soc/intel/common/block/include/intelblocks/gpio_defs.h
index 2d6f62a..e5a536d 100644
--- a/src/soc/intel/common/block/include/intelblocks/gpio_defs.h
+++ b/src/soc/intel/common/block/include/intelblocks/gpio_defs.h
@@ -35,6 +35,7 @@
#define PAD_CFG0_TRIG_EDGE_SINGLE (1 << 25) /* controlled by RX_INVERT*/
#define PAD_CFG0_TRIG_OFF (2 << 25)
#define PAD_CFG0_TRIG_EDGE_BOTH (3 << 25)
+#define PAD_CFG0_NAFVWE_ENABLE (1 << 27)
#define PAD_CFG0_RXRAW1_MASK (1 << 28)
#define PAD_CFG0_RXPADSTSEL_MASK (1 << 29)
#define PAD_CFG0_RESET_MASK (3 << 30)
@@ -215,6 +216,13 @@
PAD_RESET(rst) | PAD_FUNC(func), PAD_PULL(pull) | \
PAD_IOSSTATE(iosstate) | PAD_IOSTERM(iosterm))
+/* Native function configuration with "native function virtual wire
+ messaging enable (NAFVWE_ENABLE)" */
+#define PAD_CFG_NF_VWEN(pad, pull, rst, func) \
+ _PAD_CFG_STRUCT(pad, \
+ PAD_RESET(rst) | PAD_FUNC(func) | PAD_CFG0_NAFVWE_ENABLE,\
+ PAD_PULL(pull) | PAD_IOSSTATE(TxLASTRxE))
+
/* General purpose output, no pullup/down. */
#define PAD_CFG_GPO(pad, val, rst) \
_PAD_CFG_STRUCT(pad, \
--
To view, visit https://review.coreboot.org/c/coreboot/+/52782
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I732e68b413eb01b8ae1a4927836762c8875b73d2
Gerrit-Change-Number: 52782
Gerrit-PatchSet: 5
Gerrit-Owner: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
Gerrit-Reviewer: Bernardo Perez Priego <bernardo.perez.priego(a)intel.com>
Gerrit-Reviewer: Bora Guvendik <bora.guvendik(a)intel.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Meera Ravindranath <meera.ravindranath(a)intel.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Ronak Kanabar <ronak.kanabar(a)intel.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: merged
Attention is currently required from: Nico Huber, Furquan Shaikh.
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49408 )
Change subject: soc/intel/common: Add new IRQ module
......................................................................
Patch Set 27:
(3 comments)
File src/soc/intel/common/block/irq/irq.c:
https://review.coreboot.org/c/coreboot/+/49408/comment/8d9ead35_e627054f
PS26, Line 91: used
> Nice use of a better data structure to make this cleaner! My original choice was obviously the fn_pi […]
Ack
https://review.coreboot.org/c/coreboot/+/49408/comment/1427dca4_d3a77b88
PS26, Line 175: fn_pin_map
> Let me see if I can get rid of the EMPTY_FN ... […]
Ack
https://review.coreboot.org/c/coreboot/+/49408/comment/2e7f7d31_66cd7a64
PS26, Line 342: soc_irq_constraints
> Since `assign_pci_irqs()` is called by SoC code, can we accept this list as an input parameter rathe […]
Ack
--
To view, visit https://review.coreboot.org/c/coreboot/+/49408
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0c22a08ce589fa80d0bb1e637422304a3af2045c
Gerrit-Change-Number: 49408
Gerrit-PatchSet: 27
Gerrit-Owner: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Duncan Laurie
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Srinidhi N Kaushik <srinidhi.n.kaushik(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Furquan Shaikh <furquan(a)google.com>
Gerrit-Comment-Date: Wed, 05 May 2021 22:37:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Furquan Shaikh <furquan(a)google.com>
Comment-In-Reply-To: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Furquan Shaikh, Patrick Rudolph.
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/51159 )
Change subject: soc/intel/common/block/irq: Add support for intel_write_pci0_PRT
......................................................................
Patch Set 11:
(1 comment)
File src/soc/intel/common/block/irq/irq.c:
https://review.coreboot.org/c/coreboot/+/51159/comment/187aafcd_461ac9a0
PS7, Line 378: /* Map INTA->PIRQ_A, INTB->PIRQ_B, INTC->PIRQ_C, INTD->PIRQ_D */
> for posterity: Sorry I misunderstood what you were getting at, we talked on IRC, I realized the erro […]
Ack
--
To view, visit https://review.coreboot.org/c/coreboot/+/51159
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I21a4835890ca03bff83ed0e8791441b3af54cb62
Gerrit-Change-Number: 51159
Gerrit-PatchSet: 11
Gerrit-Owner: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Furquan Shaikh <furquan(a)google.com>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Comment-Date: Wed, 05 May 2021 22:35:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Furquan Shaikh.
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49408 )
Change subject: soc/intel/common: Add new IRQ module
......................................................................
Patch Set 27:
(19 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/49408/comment/3d693774_48d6ec70
PS26, Line 25: meet the FSPs rules
> nit: I think most(all but 1?) rules are what the BWG requires.
Done.
File src/soc/intel/common/block/include/intelblocks/irq.h:
https://review.coreboot.org/c/coreboot/+/49408/comment/9f5dadad_e36d8b9a
PS26, Line 14: irq_constraint_type
> Can a single device have multiple constraints? e.g. […]
Right now no, I have not come across a need for that (glanced at a few generations)
https://review.coreboot.org/c/coreboot/+/49408/comment/36b83d03_c4b4a3c3
PS26, Line 26: IDENTITY
> Haven't read rest of the CL yet, but it is not very clear from the comment above how `IDENTITY` is d […]
Sure, I'll use my words instead of the BGW 😊
https://review.coreboot.org/c/coreboot/+/49408/comment/38cd9c9b_d2910afe
PS26, Line 30: pci_devfn_t
> Shouldn't this be `unsigned int`?
Done
https://review.coreboot.org/c/coreboot/+/49408/comment/ba99fe9b_ec485255
PS26, Line 32: pci_pin
> Is this set only in case of `FIXED_INT_PIN`?
Yes, I will rename it to make that more clear.
https://review.coreboot.org/c/coreboot/+/49408/comment/d5daab60_ec47e163
PS26, Line 40: pci_devfn_t
> `unsigned int`?
Done
File src/soc/intel/common/block/irq/irq.c:
https://review.coreboot.org/c/coreboot/+/49408/comment/8e3ed9a2_53d115ec
PS26, Line 13: MIN_IRQ
> Should this be `MIN_SHARED_IRQ` so that it is consistent with other _SHARED_IRQ macros below?
Done
https://review.coreboot.org/c/coreboot/+/49408/comment/3014711b_864588b3
PS26, Line 17: #define TOTAL_IRQ (MAX_IRQ - MIN_IRQ + 1)
: #define MAX_IRQ_ENTRIES 120
> These macros are unused. […]
From an older patchset, removed.
https://review.coreboot.org/c/coreboot/+/49408/comment/a77e37e3_77340e50
PS26, Line 21: MAX_PINS
> Is this the same as PCI_INT_MAX?
Yes, with PCI_INT_MAX now defined, will use that 😊
https://review.coreboot.org/c/coreboot/+/49408/comment/06f30125_b37a8f4b
PS26, Line 82: >
> Shouldn't this be ==?
MAX_IRQ is 119 here... next patchset redefines it to 120 and then I think the logic here is a little more clear
https://review.coreboot.org/c/coreboot/+/49408/comment/b4a97460_5dfe54cf
PS26, Line 91: used
> Instead of determining the pin state here and in `find_shareable_pin`, do you think if it would make […]
Nice use of a better data structure to make this cleaner! My original choice was obviously the fn_pin_map and the pin_irq_map (linked by the pins) but I have a good feeling about this change 👍
https://review.coreboot.org/c/coreboot/+/49408/comment/02e42020_4ccc2754
PS26, Line 136: unsigned int share_count[TOTAL_SHARED_IRQ] = {0};
> IIUC, one of the reasons why you are recalculating the share_count every time is because we haven't yet added entries for the current slot.
That's correct.
> But, if we don't rely on `entries[]` to determine this and instead add a step in `assign_irqs()` to `increment_shared_count()` then share_count will always have the up-to-date information.
SGTM
https://review.coreboot.org/c/coreboot/+/49408/comment/15f75b26_3f49bdec
PS26, Line 175: fn_pin_map
> I am trying to understand what state `fn_pin_map[]` would be in. […]
Let me see if I can get rid of the EMPTY_FN ...I think it's a relic from a previous patchset (a sentinel value that would stick out) that I didn't see effectively get removed 😊
also yes there was an assumption about the order there... will fix.
https://review.coreboot.org/c/coreboot/+/49408/comment/57916951_007669aa
PS26, Line 198: constraints[i].type == FIXED_INT_PIN || constraints[i].type == IDENTITY
> I wonder if the constraints type should be a bit-field so that multiple can be set e.g. `FIXED_INT_PIN` and `IDENTITY`. `FIXED_INT_PIN` indicates that a fixed pin is allocated for the slot-function. `IDENTITY` indicates that the pin is mapped 1:1 to PIRQ #. Then, we don't need to make the assumption that IDENTITY implies fixed pin allocation.
Interesting thought; IDENTITY is currently only applicable for PCIe RPs
> Also, do we need to handle cases like a `FIXED_INT_PIN` also requires a `UNIQUE_IRQ`?
I haven't come across one yet, but who knows what may come in the future... let me see how that looks.
> This needs some more thought because I understand that having multiple bits set at the same time also requires more paths to handle in `assign_pins()`. Probably, will require bits in the same order as we will process them and use something like `fls()` to properly handle it.
Indeed, there is a "precedence" that must be handled correctly between different constraint types to make sure the logic works out, so it would complicate things a little bit.
https://review.coreboot.org/c/coreboot/+/49408/comment/f0c70c5a_85734eea
PS26, Line 200: return false;
> printk(BIOS_ERR, ""); to indicate that the SoC constraint is incorrect.
Done
https://review.coreboot.org/c/coreboot/+/49408/comment/feec364d_843cbdb0
PS26, Line 202: i
> Same comment as above. This will have to be PCI_FUNC(... […]
Done
https://review.coreboot.org/c/coreboot/+/49408/comment/e4856b1c_d10a3f96
PS26, Line 208: (pin - PCI_INT_A)
> PIN2IDX?
Done
https://review.coreboot.org/c/coreboot/+/49408/comment/ff925b4a_366d20e4
PS26, Line 214: fn_pin_map[0] = PCI_INT_A;
> Should there be a check to ensure that fn_pin_map[0] is not already assigned to something other than […]
I guess then there would be a conflict between a FIXED_INT_PIN (or IDENTITY) and a single-function device requirement... I'll add the check for now.
https://review.coreboot.org/c/coreboot/+/49408/comment/cb2b936a_51f9a781
PS26, Line 226: if (constraints[i].type == UNIQUE_IRQ) {
> If you invert this check, additional tab on rest of the lines can be avoided. […]
Done
--
To view, visit https://review.coreboot.org/c/coreboot/+/49408
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0c22a08ce589fa80d0bb1e637422304a3af2045c
Gerrit-Change-Number: 49408
Gerrit-PatchSet: 27
Gerrit-Owner: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Duncan Laurie
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Srinidhi N Kaushik <srinidhi.n.kaushik(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Furquan Shaikh <furquan(a)google.com>
Gerrit-Comment-Date: Wed, 05 May 2021 22:35:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Furquan Shaikh <furquan(a)google.com>
Gerrit-MessageType: comment