northbridge/amd/agesa/family1{4,5,5tn,6kb}: Reduce differences

Lets cut down on whitespace differences, fix some typos and indents.
Also make use of ARRAY_SIZE() macro instead of a local redefinition.

Fix NULL pointer checks ordering and not to use zero.

Change-Id: I93f344d300c04570d795659d848255cb1832e1d8
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/7528
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
northbridge/amd/agesa/family1{2,4}: make get_node_pci() static

Function is local only, as is with other families also.

Change-Id: I1f652be1763a319b2f1c9b0f53e76d6bc44f3450
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/7530
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
northbridge/amd/agesa/family15: Remove redudant prototype

Function is static local only and so no need for a static
prototype in header. Sync's header with other fam's also.

Change-Id: I540aeafb8528e229700b6d596d4d8094c22e7625
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/7531
Reviewed-by: Bruce Griffith <Bruce.Griffith@se-eng.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
northbridge/amd/agesa: Remove useless northbridge.h header

Remove northbridge.h headers which only contain static declaritions
which is silly.

Change-Id: I3e8890a34b4729bb0944bd97a3b9576b841d2354
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/7532
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
intel/fsp_baytrail: add new CPUID for Baytrail I step D0

Change-Id: I9e29ca10689cbbbaba593185868e54b8697aa9c4
Signed-off-by: Herve Elter <rvnvv74@gmail.com>
Reviewed-on: http://review.coreboot.org/7523
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
Tested-by: build bot (Jenkins)
build system: use a single variable name for compiler runtimes

We build with either gcc or clang, no need to keep both around

Change-Id: I9af2cc7636bdc791a68ba8ed6e7c5a81973c5dfd
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/7552
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
build system: unify linker use across gcc and clang

Let's just call ld directly for gcc, too.

Change-Id: I305eb92ed0d21b098134a7eb5a9f9fe3b126aeea
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/7553
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
northbridge/amd/agesa/family12/dimmSpd.c: Use ARRAY_SIZE macro

Change-Id: Icf980088c196b152cc4e5e179f7b7e334b695ccc
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/7574
Tested-by: build bot (Jenkins)
Reviewed-by: Nicolas Reinecke <nr@das-labor.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
google/butterfly: fix off-by-one issues

GPIOs 32 and 64 used the wrong code path.

Change-Id: I1d293cf38844b477cac67bc19ce5e5c92a6e93ca
Found-by: Coverity Scan
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: http://review.coreboot.org/7577
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Tested-by: build bot (Jenkins)
amd/fam10: Fix pstate configuration

Testing for msr.hi | PS_EN_MASK doesn't make sense.

Change-Id: If3305e4255f227be4bb7a5496a625ef2a50a5808
Found-by: Coverity Scan
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: http://review.coreboot.org/7578
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Tested-by: build bot (Jenkins)
northbridge/amd/agesa/family16kb: Add MMCONF res to PCI_DOMAIN

This is a port of the following:
commit d5c998be99709c92f200b3b08aed2ca3fee2d519

  The coreboot resource allocator doesn't respect resources
  claimed in the APIC_CLUSTER. Move the MMCONF resource to the
  PCI_DOMAIN to prevent overlap with PCI devices.

Change-Id: I49167dd3f15d0203a7db8950880ab03171d5c170
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/7533
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
intel: Remove IRQ1 from possible PIRQ assignemnt.

According to spec IRQ1 isn't available for PIRQ assignment.
Has gone unnoticed probably because modern OS use MSI or
at least APIC and even with noapic don't use IRQ1 with PCI
IRQs.

Change-Id: Idc7db249007df629b27e8cae41cc80358d5306f6
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/7478
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins)
lint-stable: Ignore .bin files for whitespace check.

.bin is the most convenient format for storing SPDs and since it's
not text format, whitespace check is useless and gives false positives.

Change-Id: I8a7569eac8a1dfbffabe166a38e4dd3e895fdef1
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/7567
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
getac/p470: Change COM3/COM4 IRQ to move it out of PCI IRQ ones.

The suggested IRQs 10 and 11 would conflict with PCI IRQ assignment
(10 for most interrupts on this board). Suggest IRQ 6 instead.

It's actually a noop since the code is commented out.

Change-Id: I0fdd8e2091d3dc79cfb1809a9ea5e1e841ca598a
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/7476
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
lenovo/t60: Remove PIRQ table.

This was copied from P2B-F without doing any modification. It never worked.

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Change-Id: I2c90688c8ff8c3bd272d24f059e8e1bfb86e2b4a
Reviewed-on: http://review.coreboot.org/7555
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Tested-by: build bot (Jenkins)
agea/family14: Switch to per-device ACPI

Change-Id: Icc663c28713f2d872bfeb1749303ce92db953bf5
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/7031
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Tested-by: build bot (Jenkins)
agesa/family14: Fix includes for ACPI

Change-Id: Ic4425840a984a7713088a2568e25bae982e22fc2
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/7582
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
agesa/family15: Switch to per-device ACPI

Change-Id: I3847eb1524a5a816cd4885a31d703b410804c1f0
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/7032
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
agesa/family15tn: Switch to per-device ACPI

Change-Id: Icc2e7b66b3ff5f70b219a3e67494ce3df055c9d5
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/7033
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
agesa/family16kb: Switch to per-device ACPI

Change-Id: I7d9cbbd1aeadecc1a4c91816df303c6cb4817fe3
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/7034
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>