aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/intel/haswell/minihd.c
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-01-15 00:49:03 +0100
committerPatrick Georgi <pgeorgi@google.com>2020-03-15 12:54:00 +0000
commit1db5bc7dac2bb592708f26dede339ffdf3246567 (patch)
treed8636a114ebd6ef6830a016de15c92b21f0b740d /src/northbridge/intel/haswell/minihd.c
parent3663d55a23fb64ea88dd1fd18ae4b0ce29e71a61 (diff)
nb/intel/haswell: Tidy up code and comments
- Reformat some lines of code - Put names to all used MCHBAR registers - Move MCHBAR registers into a separate file, for future expansion - Rewrite several comments - Use C-style comments for consistency - Rewrite some hex constants - Use HOST_BRIDGE instead of PCI_DEV(0, 0, 0) Tested, it does not change the binary of Asrock B85M Pro4. Change-Id: I926289304acb834f9b13cd7902801798f8ee478a Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/38434 Reviewed-by: David Hendricks <david.hendricks@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/northbridge/intel/haswell/minihd.c')
-rw-r--r--src/northbridge/intel/haswell/minihd.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/northbridge/intel/haswell/minihd.c b/src/northbridge/intel/haswell/minihd.c
index 52b158e0c1..c59d02ed95 100644
--- a/src/northbridge/intel/haswell/minihd.c
+++ b/src/northbridge/intel/haswell/minihd.c
@@ -25,30 +25,30 @@
static const u32 minihd_verb_table[] = {
/* coreboot specific header */
- 0x80862807, // Codec Vendor / Device ID: Intel Haswell Mini-HD
- 0x80860101, // Subsystem ID
- 0x00000004, // Number of jacks
+ 0x80862807, /* Codec Vendor / Device ID: Intel Haswell Mini-HD */
+ 0x80860101, /* Subsystem ID */
+ 4, /* Number of jacks */
/* Enable 3rd Pin and Converter Widget */
0x00878101,
/* Pin Widget 5 - PORT B */
- 0x00571C10,
- 0x00571D00,
- 0x00571E56,
- 0x00571F18,
+ 0x00571c10,
+ 0x00571d00,
+ 0x00571e56,
+ 0x00571f18,
/* Pin Widget 6 - PORT C */
- 0x00671C20,
- 0x00671D00,
- 0x00671E56,
- 0x00671F18,
+ 0x00671c20,
+ 0x00671d00,
+ 0x00671e56,
+ 0x00671f18,
/* Pin Widget 7 - PORT D */
- 0x00771C30,
- 0x00771D00,
- 0x00771E56,
- 0x00771F18,
+ 0x00771c30,
+ 0x00771d00,
+ 0x00771e56,
+ 0x00771f18,
/* Disable 3rd Pin and Converter Widget */
0x00878100,
@@ -94,15 +94,14 @@ static void minihd_init(struct device *dev)
if (codec_mask) {
for (i = 3; i >= 0; i--) {
if (codec_mask & (1 << i))
- hda_codec_init(base, i,
- sizeof(minihd_verb_table),
+ hda_codec_init(base, i, sizeof(minihd_verb_table),
minihd_verb_table);
}
}
}
static struct pci_operations minihd_pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
+ .set_subsystem = pci_dev_set_subsystem,
};
static struct device_operations minihd_ops = {
@@ -110,7 +109,7 @@ static struct device_operations minihd_ops = {
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = minihd_init,
- .scan_bus = 0,
+ .scan_bus = NULL,
.ops_pci = &minihd_pci_ops,
};