Commit graph

20110 commits

Author SHA1 Message Date
Duncan Laurie
6b86f6c78d UPSTREAM: google/eve: Add audio devices
Add the audio devices to Eve mainboard:

- Describe Maxim 98927 speaker amps and RT5663 headphone codec
in ACPI so they can be enumerated by the OS.

- Supply NHLT binaries for MAX98927, RT5663, and DMIC_4CH.

BUG=chrome-os-partner:61009
TEST=manual testing on Eve P1 with updated kernel to ensure that
both speakers and headset are functional.  DMIC support is
is still being worked on and is not yet functional.

Change-Id: Ib2965da2bb25c6d3b48d1da9aad2641b8eaf9189
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 5492bfb55c
Original-Change-Id: I5243e35d159a0ed15c6004e94ba5a50b28cff0a9
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18398
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/445639
2017-02-23 16:02:01 -08:00
Rizwan Qureshi
5941a7f23a UPSTREAM: soc/intel/skylake: Add Maxim 98927 and Realtek 5663 NHLT blob support
Add APIs and required parameters for creating Maxim 98927
and Realtek 5336 SSP endpoints in NHLT table.

BUG=chrome-os-partner:62051
BRANCH=None
TEST=check that NHLT table created is created properly
CQ-DEPEND=CL:*318887,CL:*315896,CL:*330554

Change-Id: Idce838eaacbc953d6390b6a352802ca877a98d3c
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 17335fab17
Original-Change-Id: Ica302aab05c5364faf4923dc5327be8e8eaae8b4
Original-Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Original-Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Original-Signed-off-by: M Naveen <naveen.m@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18213
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/445128
2017-02-23 16:02:00 -08:00
Yidi Lin
f4252cbe94 google/oak: Add initial support for Rowan
Update GPIO controls and mainboard configurations for Rowan.

BUG=chrome-os-partner:62672
BRANCH=none
TEST=emerge-rowan coreboot

Change-Id: I18ebc3ccf4c7d051839d7c50e9b0682ef8f09830
Signed-off-by: Yidi Lin <yidi.lin@mediatek.com>
Reviewed-on: https://chromium-review.googlesource.com/430557
Reviewed-by: Julius Werner <jwerner@chromium.org>
2017-02-22 03:29:28 -08:00
Furquan Shaikh
2fb15c4181 UPSTREAM: soc/intel/skylake: Fix broken suspend-resume
With recent change (a4b11e5c90: soc/intel/skylake: Perform CPU MP Init
before FSP-S Init) to perform CPU MP init before FSP-S init, suspend
resume is currently broken for all skylake/kabylake boards. All the
skylake/kabylake boards store external stage cache in TSEG, which is
relocated post MP-init. Thus, if FSP loading and initialization is
done after MP-init, then ramstage is not able to:
1. Save FSP component in external stage cache during normal boot, and
2. Load FSP component from external stage cache during resume

In order to fix this, ensure that FSP loading happens separately from
FSP initialization. Add fsp_load callback for pre_mp_init which ensures
that the required FSP component is loaded/saved from/to external stage
cache.

BUG=chrome-os-partner:63114
BRANCH=None
TEST=Verified that 100 cycles of suspend/resume worked fine on poppy.

Change-Id: I1b5cef5e3d70669c7e1454f69443c5f4964361b7
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: c248044b20
Original-Change-Id: I5b4deaf936a05b9bccf2f30b949674e2ba993488
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18414
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/445863
2017-02-22 00:35:24 -08:00
Furquan Shaikh
cdf025ffc6 UPSTREAM: drivers/intel/{fsp1_1,fsp2_0}: Provide separate function for fsp load
Add a function to allow FSP component loading separately from silicon
initialization. This enables SoCs that might not have stage cache
available during silicon initialization to load/save components from/to
stage cache before it is relocated or destroyed.

BUG=chrome-os-partner:63114
BRANCH=None
TEST=Compiles successfully.

Change-Id: I593b27934b3f2093e3d1d0a36106471d2b5f10e4
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: f4b20af9d7
Original-Change-Id: Iae77e20568418c29df9f69bd54aa571e153740c9
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18413
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/445862
2017-02-22 00:35:23 -08:00
Aamir Bohra
8dad06b5db UPSTREAM: vendorcode/intel/skykabylake: Update FSP UPD header files
Update FSP UPD header files as per version 1.6.0.
Below UPDs are added to FspsUpd.h:

* DelayUsbPdoProgramming
* MeUnconfigIsValid
* CpuS3ResumeDataSize
* CpuS3ResumeData

CQ-DEPEND=CL:*322871,CL:*323186,CL:*322870
BUG=None
BRANCH=None
TEST=Build and boot on RVP3 and poppy

Change-Id: I48222f69fff9ecec35691698e8ad7279b6767a4d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 24de3a37fb
Original-Change-Id: Id51a474764a28eec463285757d0eb8ec7ca13fd1
Original-Signed-off-by: Aamir Bohra <aamir.bohra@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18289
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/440167
Commit-Ready: Duncan Laurie <dlaurie@google.com>
Tested-by: Duncan Laurie <dlaurie@google.com>
Reviewed-by: Duncan Laurie <dlaurie@google.com>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2017-02-21 18:43:17 -08:00
Furquan Shaikh
35083f7301 UPSTREAM: drivers/i2c: Use I2C HID driver for wacom devices
Wacom I2C driver does the same thing as I2C HID driver, other than
defining macros for Wacom HID. Instead of maintaining two separate
drivers providing the same functionality, update all wacom devices to
use generic I2C HID driver.

BUG=None
BRANCH=None
TEST=Verified that ACPI nodes for wacom devices are unchanged.

Change-Id: I40316a2bc0a1210661becf0bf392d259310adbc5
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 5360c7ef94
Original-Change-Id: Ibb3226d1f3934f5c3c5d98b939756775d11b792c
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18401
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/445638
2017-02-21 06:44:35 -08:00
Duncan Laurie
02efe1879c UPSTREAM: google/eve: Set touchscreen I2C bus speed to 1MHz
Enable Fast-Plus speed for the touchscreen device so it can
be used at 1MHz instead of 400KHz.

BUG=chrome-os-partner:61277
TEST=manual testing on Eve P1, needs backported kernel patches
to actually make use of any I2C speed other than 400KHz

Change-Id: I0bc6834ed731a60108a77bedef7816bd7bffcc20
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 658a6dc78d
Original-Change-Id: I3f44ff4a02a02a7b05e69ad54d4c6d60e5878393
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18397
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/445637
2017-02-21 06:44:34 -08:00
Furquan Shaikh
60283a1a12 UPSTREAM: mainboard/{google,intel}: Change config option selection
Change config option selection from "config xyz default y" to "select
xyz" if the config option has no dependencies.

BUG=None
BRANCH=None
TEST=Verified that config option selection remains unchanged.

Change-Id: I5ebf7ae3f1b27cc6b0a91b4cc8d7e60f7035137d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 97535558f1
Original-Change-Id: I259ae40623b7f4d5589e2caa0988419ba4fefda4
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18400
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/445140
2017-02-21 06:44:34 -08:00
Furquan Shaikh
00eded7d5f UPSTREAM: mainboard/google/reef: Remove config DRIVERS_GENERIC_GPIO_REGULATOR
Since we are not using gpio regulators on reef anymore, remove the
selection from Kconfig as well.

BUG=None
BRANCH=None
TEST=Compiles successfully.

Change-Id: Iaa6ef0c06a23d42c0d92a57a7b3bbf634c4d14d5
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: abd5d1d35c
Original-Change-Id: Iae7d88dec3ac476d65b292f97a6ba3add71ce07a
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18399
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/445139
2017-02-21 06:44:34 -08:00
Robbie Zhang
b1952cbb9d UPSTREAM: arch/x86: add functions to generate random numbers
Using x86 RDRAND instruction, two functions are supplied to
generate a 32bit or 64bit number.

One potential usage is the sealing key generation for SGX.

BUG=chrome-os-partner:62438
BRANCH=NONE
TEST=Tested on Eve to generate a 64bit random number.

Change-Id: I5e2768ba499f1e008c9b68feae68b368cedaaa39
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 18792314d7
Original-Change-Id: I50cbeda4de17ccf2fc5efc1fe04f6b1a31ec268c
Original-Signed-off-by: Robbie Zhang <robbie.zhang@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18362
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/445138
2017-02-21 06:44:33 -08:00
Teo Boon Tiong
db72c52f6d UPSTREAM: soc/intel/skylake: Expand USB OC pins definition to support PCH-H
Currently the USB OC pins definition only being defined up to OC3.
For PCH-H, OC4 and OC5 are needed, so add both into OC pin enum.

Changes is being verified and booted to Yocto with Saddle Brook.

BUG=none
BRANCH=none
TEST=none

Change-Id: I48ed19f800726d1220c0110cd3a7fdcb53b760dd
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f296ce91b9
Original-Change-Id: Idaed6fa7dcddb9c688966e8bc59f656aec2b26eb
Original-Signed-off-by: Teo Boon Tiong <boon.tiong.teo@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18364
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/445137
2017-02-21 06:44:33 -08:00
Matt DeVillier
71e2a24edb UPSTREAM: google/slippy: consolidate variants' common mainboard.asl code
Move code common code from each variant's mainboard.asl into
common ACPI code for all variants (like google/auron).  This also
adds the _PRW method for the LID0 device for falco and peppy, which
omitted the function  when they were originally upstreamed.

See Chromium commit c8b41f7, falco: Add _PRW for LID0 ACPI Device

BUG=none
BRANCH=none
TEST=none

Change-Id: I9199128d0270e1ed6f2600282216950a592001df
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 4b8252ed76
Original-Change-Id: I7f5129340249a986f5996af37c01ccbde8d374e8
Original-Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18368
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/445136
2017-02-21 06:44:32 -08:00
Duncan Laurie
9bb59cdaee UPSTREAM: google/eve: Set rise/fall timing values for I2C bus 1
Apply the measured rise and fall times for I2C bus 1 on Eve
so it can be tuned properly for 400KHz operation.

BUG=chrome-os-partner:63020
TEST=verify I2C1 bus speed with a scope

Change-Id: I4bd676d69f77cc8c90cf3c2eb6d29776039aee15
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: c86fa6d975
Original-Change-Id: I32b5aa460ea35aadca7f3d52324a64880764919f
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18396
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/445135
2017-02-21 06:44:32 -08:00
Duncan Laurie
f6a0f2ebb3 UPSTREAM: google/eve: Fix FPC support
Currently UART0 GPIOs are being put into native mode during FSP-S
stage, so have ramstage re-configure them back to regular GPIO mode.

GPP_C8 does not seem to be functioning properly when routed to the
APIC, possibly due to the UART0 being enabled even though it is unused,
which is required because UART0 is PCI 1e.0 and so must be present for
other 1e.x functions to be enumerated.  Instead, use this pin as a GPIO
interrupt so it will be routed through the GPIO controller at IRQ 14.

GPP_C9 was inverted and was only working because the pin was being
re-configured in FSP-S.

Also export the reset gpio as a device property so it can be used by
the kernel driver, which will stop it from complaining at boot.

BUG=chrome-os-partner:61233
TEST=verify that the interrupt and device is functional in the OS

Change-Id: Idca8e787f9d99f2bba03f103ae6fcf0d49ad6a3f
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 6c8238521e
Original-Change-Id: Iaf9efbf50a13a981c6a9bbd507475777837e9c12
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18395
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/445134
2017-02-21 06:44:32 -08:00
Duncan Laurie
c7c2ad9bf8 UPSTREAM: soc/intel/skylake: Disable s0ix if not enabled in devicetree
There is an enable_s0ix config option in the devicetree that should
be used to disable it when not set:

- do not export C8/C9/C10 C-states in _CST
- do not enable SLP_S0 in FSP

BUG=chrome-os-partner:58666
TEST=test on eve board to ensure that OS only sees 3 ACPI C-states
instead of 6 and that it no longer attempts to enter C10

Change-Id: Iabec05c85df22899c04ad5eeb77923fc3e1caf26
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 25c7d9342b
Original-Change-Id: I90e4dc776d1d17d0b700cda63c8476786cd2e4ff
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18394
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/445133
2017-02-21 06:44:31 -08:00
Duncan Laurie
4c16e88957 UPSTREAM: drivers/spi/acpi: Add additional generic ACPI support
Add support for more ACPI features in the generic SPI ACPI
driver so it can be flexible enough to support more devices,
or devices in different configurations.

- add a wake pin
- add support for using IRQ GPIO instead of PIRQ
- add power resource support with enable and reset gpios

BUG=chrome-os-partner:61233
TEST=ensure existing SSDT generation is unchanged,
and test that new features generate expected code

Change-Id: Ib4dcba5b0d57539030eb380a9ec38db9f7aea9a7
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: c9db384ea4
Original-Change-Id: Ibe37cc87e488004baa2c08a369f73c86e6cd6dce
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18393
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/445132
2017-02-21 06:44:31 -08:00
Duncan Laurie
df12cb2ed4 UPSTREAM: acpi_device: Add macros for GPIO interrupts
Add individual macros for the various interrupt types so
they can be used in devicetree.

BUG=chrome-os-partner:58666
TEST=nothing uses this yet, will be used in an upcoming commit

Change-Id: I191f422ec4216ecc70896a3b33ebbb62955053b4
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 4f31d5c2ce
Original-Change-Id: I2a569f60fcc0815835615656b09670987036b848
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18392
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/445131
2017-02-21 06:44:30 -08:00
Duncan Laurie
0fac519d53 UPSTREAM: acpi_device: Move power resource function to generic code
Move the function that adds a power resource block from
i2c/generic to the acpi device code at src/arch/x86/acpi_device.c
so it can be used by more drivers.

BUG=chrome-os-partner:61233
TEST=verify SSDT table generation is unchanged

Change-Id: I20371b7a7f4e270cd1c61a3e8b9b58b10cafc8ed
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: bd73dbbc38
Original-Change-Id: I0ffb61a4f46028cbe912e85c0124d9f5200b9c76
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18391
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/445130
2017-02-21 06:44:30 -08:00
Robbie Zhang
ab587a2a96 UPSTREAM: soc/intel/skylake: add PrmrrSize to chip config
Prmrr configuration is supported by Kabylake FSP-M with UPD provided.
It is required as one of the SGX initialization steps in BIOS.

BUG=chrome-os-partner:62438
BRANCH=NONE
TEST=Tested on Eve, verified uncore PRMRR MSRs get programmed to set
size and boot.

Change-Id: I4bf81697e1fa2a2329b67d1b228a329c3a42fc3e
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: e65affa2ed
Original-Change-Id: I2b3dc7c92487505165ee429bd1a37bd60ceac8f3
Original-Signed-off-by: Robbie Zhang <robbie.zhang@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18361
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/445129
2017-02-21 06:44:30 -08:00
Tobias Diedrich
6417febd1d UPSTREAM: lenovo/s230u: Add Thinkpad Twist (S230U)
Created using autoport plus some manual work and copying from G505S to
account for the non-H8 EC.

This model uses the same ENE KB9012 EC as the G505S.

Tested:
- Mainboard variant with 8GB Elpida DDR3
- SeaBIOS payload
- Booting into Linux 4.9.6 with Debian/unstable installed on the
  internal HDD/SDD slot
- Native raminit
- Both native VGA init and option rom VGA init
- Basic TPM functionality (auto-detection and RNG)
- Battery status readout
- Basic ACPI functions (power button event; power-off; reboot)
- thinkpad-acpi hotkey functions
- thinkpad-acpi LED control (red thinkpad LED)
- Suspend to RAM and resume works
- Mini displayport output works

Known issues:
- Patches needed for EC battery support
  https://review.coreboot.org/#/c/18348/
  https://review.coreboot.org/#/c/18349/
- No thermal zone since temperature sensing is not H8-compatible
  and needs to be reverse engineered.

Not tested:
- msata/wwan (probably works)

BUG=none
BRANCH=none
TEST=none

Change-Id: Ifd82918d0eb93002027b9ed841e138419691c854
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: cee930a39b
Original-Signed-off-by: Tobias Diedrich <ranma+coreboot@tdiedrich.de>
Original-Change-Id: I52bc4515277e5c18afbb14a80a9ac788049f485c
Original-Reviewed-on: https://review.coreboot.org/18351
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://chromium-review.googlesource.com/445636
2017-02-21 06:44:29 -08:00
Mario Scheithauer
84de957d42 UPSTREAM: siemens/mc_apl1: Set MAC address for all available i210 MACs
This mainboard uses two i210 Ethernet controller. Therfore we enable the
usage of the i210 driver and have to provide a function to search for a
valid MAC address for all i210 devices by using Siemens hwilib.

BUG=none
BRANCH=none
TEST=none

Change-Id: I70c71081b5a190304a2f36c4f185c9564822f0d6
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 480eab0da9
Original-Change-Id: I36246cdef987fcece15a297ebb2f41561fca1f69
Original-Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Original-Reviewed-on: https://review.coreboot.org/18380
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://chromium-review.googlesource.com/445155
2017-02-21 06:44:29 -08:00
Paul Menzel
169e9c120c UPSTREAM: ec/lenovo: Add guards to fix build errors without SMBIOS
Not selecting the Kconfig option `GENERATE_SMBIOS_TABLES` the build
fails with the error below.

```
    CC         ramstage/ec/lenovo/h8/h8.o
src/ec/lenovo/h8/h8.c:201:2: error: unknown field 'get_smbios_strings' specified in initializer
  .get_smbios_strings = h8_smbios_strings,
  ^
src/ec/lenovo/h8/h8.c:201:2: error: initialization from incompatible pointer type [-Werror]
src/ec/lenovo/h8/h8.c:201:2: error: (near initialization for 'h8_dev_ops.read_resources') [-Werror]
cc1: all warnings being treated as errors
```

So add the appropriate preprocessor guards to fix the build error.

BUG=none
BRANCH=none
TEST=none

Change-Id: I8d29e84c4664871193e0ca6e40ea22554caea1ad
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 2a4a452abc
Original-Change-Id: I3baed452d422539a805c628a8c4a6a8c2a809317
Original-Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-on: https://review.coreboot.org/17770
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://chromium-review.googlesource.com/445154
2017-02-21 06:44:28 -08:00
Matt DeVillier
ff4d234494 UPSTREAM: lynxpoint/broadwell: fix PCH power optimizer
Setting both bits 27 and 7 of PCH register PMSYNC_CFG (PMSYNC
Configuration; offset 0x33c8) causes pre-OS display init to fail
on HSW-U/Lynxpoint and BDW-U ChromeOS devices when the VBIOS/GOP
driver is run after the register is set. A re-examination of
Intel's reference code reveals that bit 7 should be set for the
LP PCH, and bit 27 for non-LP, but not both simultaneously.

The previous workaround was to disable the entire power optimizer
section via a Kconfig option, which isn't ideal.

Test: unset bit 27 of PMSYNC_CFG and boot google/lulu,
observe functional pre-OS video output

BUG=none
BRANCH=none
TEST=none

Change-Id: Ie0cc1b294a4f8722bdd3a79faef1516f503d2e03
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: c97e042a9b
Original-Change-Id: I446e169d23dd446710a1648f0a9b9599568b80aa
Original-Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18385
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/445153
2017-02-21 06:44:28 -08:00
Matt DeVillier
08460d7a14 UPSTREAM: Revert "intel/lynxpoint,broadwell: Fix eDP display in Windows, SeaBios & Tiano"
We've been able to narrow down the problem to a single register/
single bit, so revert this commit and address the problem in a
follow-on commit.

This reverts commit 0f2025da0f.

BUG=none
BRANCH=none
TEST=none

Change-Id: I0e986e2be69c6e74eb57c70b13cf625b0317c44d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: ee6a612eb2
Original-Change-Id: I780f9ea2976dd223aaa3e060aef6e1af8012c346
Original-Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18384
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/445152
2017-02-21 06:44:28 -08:00
Denis 'GNUtoo' Carikli
84431edea7 UPSTREAM: board-status: Add README
It explains the prerequisites to run the script, some
background on how to setup the computer running the script,
and the board it gathers the information from.

That information is too long to fit inside the script's
help.

BUG=none
BRANCH=none
TEST=none

Change-Id: I140c19404433fbeb457a349f39ce26efbb312d13
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: efd9dee646
Original-Change-Id: Iecba7310ff1583149c02728e955716775bcbbdc4
Original-Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Original-Reviewed-on: https://review.coreboot.org/6660
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/445151
2017-02-21 06:44:27 -08:00
Elyes HAOUAS
c1ad3c90e2 UPSTREAM: nb/i945/raminit: sdram_set_channel_mode Test if DIMM slot 3 is populated
Add a test in case we have a DIMM2 not populated but DIMM3 is.

BUG=none
BRANCH=none
TEST=none

Change-Id: I80508fd652795593aef7e202891b494d60d4d6a9
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 75da1fb2ba
Original-Change-Id: I14f82afe03884740570838e7b2771233356c518d
Original-Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Original-Reviewed-on: https://review.coreboot.org/18386
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/445150
2017-02-21 06:44:27 -08:00
Martin Roth
243af848bc UPSTREAM: riscv: Suppress invalid coverity errors
Coverity is detecting 'sp' as a variable which has not been initialized.
This is obviously not correct, so this patch *TRIES* to mark it as false

I'm not positive that this will work because the annotation needs to go
on the line above the error, but this error is inside of a # define.

Does the whole #define count as one line?  Can it go on the line
above the #define in the .h file?  Does it have to precede every line
where the #define is used?  The documentation doesn't make this clear.

Should suppress coverity issues: 1368525 & 1368527
uninit_use: Using uninitialized value sp.

BUG=none
BRANCH=none
TEST=none

Change-Id: I8fa056af3e829218d8139f3899b7291e62ea6796
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f797a1ac6a
Original-Change-Id: Ibae5e206c4ff47991ea8a11b6b59972b24b71796
Original-Signed-off-by: Martin Roth <martinroth@google.com>
Original-Reviewed-on: https://review.coreboot.org/18247
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Jonathan Neuschfer <j.neuschaefer@gmx.net>
Reviewed-on: https://chromium-review.googlesource.com/445149
2017-02-21 06:44:26 -08:00
Martin Roth
ed5d162c37 UPSTREAM: src/drivers/pc80: Update vga_font_8x16.c to be non-binary
Previously, the file -i command identified vga_font_8x16.c as
application/octet-stream; charset=binary

Now it identifies as:
text/x-c; charset=us-ascii

- Remove non-ascii characters

BUG=none
BRANCH=none
TEST=none

Change-Id: I9ef13a37ce18c42bdf4cf0daf6f796861028eb50
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 98641b92e7
Original-Change-Id: I6b513e6457a31828a6e94c954a7e2e7ee18fd4d6
Original-Signed-off-by: Martin Roth <martinroth@google.com>
Original-Reviewed-on: https://review.coreboot.org/18372
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Jonathan Neuschfer <j.neuschaefer@gmx.net>
Reviewed-on: https://chromium-review.googlesource.com/445148
2017-02-21 06:44:26 -08:00
Arthur Heymans
c061d99a73 UPSTREAM: mb/lenovo/t400: Implement hybrid graphic in romstage
The hybrid driver select by DRIVERS_LENOVO_HYBRID_GRAPHICS doesn't work
for t400/t500.
Replace it with a custom romstage implementation.

Tested on Lenovo T500 with dual graphics:
* Intel Native GFX init
* AMD VBios
* GNU Linux 4.8.13
* SeaBios as payload
* Discrete is working (44 W)
* Integrated is working (24 W)
* Switchable is working (34 W)
** Both GPUs are enabled, with Intel being connected to the panel
** DRI_PRIME allows to use AMD GPU
** ACPI doesn't seem to work (no vgaswitcheroo)

Depends on Change-Id: I4dc00005270240c048272b2e4f52ae46ba1c9422
Depends on Change-Id: If389016f3bb0c4c2fd0b826914997a87a9137201

BUG=none
BRANCH=none
TEST=none

Change-Id: I8319fb3c52c32b548820f49dea0aee53b8e509d3
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f9d5308690
Original-Change-Id: I7496876e9b434d4a2388e1ede27ac604670339b7
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Original-Reviewed-on: https://review.coreboot.org/18010
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: https://chromium-review.googlesource.com/445147
2017-02-21 06:44:26 -08:00
Paul Menzel
f255895263 UPSTREAM: apple/macbook21: Remove unused include smbios.h
BUG=none
BRANCH=none
TEST=none

Change-Id: I3c6c7daab1e3081391c64880c35b6a83f638e220
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 3fee215a3e
Original-Change-Id: I4ed7a164323a71d95a37ea754ec923ca0c5e6219
Original-Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-on: https://review.coreboot.org/18388
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Original-Reviewed-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Reviewed-on: https://chromium-review.googlesource.com/445146
2017-02-21 06:44:25 -08:00
Denis 'GNUtoo' Carikli
7bfea0cbfd UPSTREAM: boardstatus: wiki: Update XiVO's coreboot fork source address
This company doesn't do custom hardware anymore and doesn't
host the sources anymore. We therefore point to the archived
sources instead.

BUG=none
BRANCH=none
TEST=none

Change-Id: I666ce3aafcaa82e64b7945f1489097b04e0a6b98
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 418e808fa6
Original-Change-Id: I5ce4f6a468b852fc1d0947fe2b28a5297f14c437
Original-Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Original-Reviewed-on: https://review.coreboot.org/11889
Original-Reviewed-by: Jonathan Neuschfer <j.neuschaefer@gmx.net>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/445145
2017-02-21 06:44:25 -08:00
Arthur Heymans
a54bfc066d UPSTREAM: nb/intel/x4x: Implement resume from S3 suspend
It rewrites the results of receive enable stored in the upper nvram
region, to avoid running receive enable again.

Some debug info is also printed about the self-refresh registers.
(Not enforcing a reset here, since 0 does not necessarily mean it's
not in self-refresh).

BUG=none
BRANCH=none
TEST=none

Change-Id: Ie8a85069cc613706c1405e150bece11bc6ba43c1
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: ef7e98a2ac
Original-Change-Id: Ib54bc5c7b0fed6d975ffc31f037b5179d9e5600b
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/17998
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/445144
2017-02-21 06:44:24 -08:00
Arthur Heymans
7fc65a855a UPSTREAM: nb/intel/x4x: Fix raminit on reset path
Previously the raminit failed on hot reset and to work around this
issue it unconditionally did a cold reset.

This has the following issues:
* it's slow;
* when the OS issues a hot reset some disk drives expect their 5V
  power supply to remain on, which gets cut off by a cold reset,
  causing data corruption.

To fix this some steps in raminit must be ommited on the reset path.
This includes receive enable calibration.
To achieve this it stores receive enable results in RTC nvram for them
to be rewritten on the resume path.
Note: The same thing needs to be done on the S3 resume path.

Calling a hot reset after raminit "outb(0x6, 0cf9)" works.

BUG=none
BRANCH=none
TEST=none

Change-Id: I7abad55524ecea8bbd828aba6dd3ce7708f1a7bd
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 97e13d84c3
Original-Change-Id: I6601dd90aebd071a0de7cec070487b0f9845bc30
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18009
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/445143
2017-02-21 06:44:24 -08:00
Paul Menzel
c5a415acb6 UPSTREAM: grub: Build module boottime
Configure GRUB to build with boot time statistics. That allows users
to add that module to GRUB by adding `boottime` to the list of extra
modules.

BUG=none
BRANCH=none
TEST=none

Change-Id: Iab5d114c243119bd539ef2aec1efacd2eacd2f58
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 7c7b176169
Original-Change-Id: I76a07e49aecb37652fe8c7d6a9421fd464424287
Original-Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Original-Reviewed-on: https://review.coreboot.org/18367
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://chromium-review.googlesource.com/445142
2017-02-21 06:44:23 -08:00
Mathias Krause
d7c1cc2efe UPSTREAM: libpayload: multiboot - support meminfo flag
Some simple implementation of the MultiBoot protocol may not pass a
memory map (MULTIBOOT_FLAGS_MMAP missing in the flags) but just the two
values for low and high memory, indicated by the MULTIBOOT_FLAGS_MEMINFO
flag.

Support those kind of boot loaders too, instead of falling back to the
hard-coded values in lib_get_sysinfo().

Tested with a multiboot enhanced version of FILO.

BUG=none
BRANCH=none
TEST=none

Change-Id: I4c1d95a8f4aa8735538dad85d5f856ce36a5f72e
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 898de6111a
Original-Change-Id: I22cf9e3ec0075aff040390bd177c5cd22d439b81
Original-Signed-off-by: Mathias Krause <minipli@googlemail.com>
Original-Reviewed-on: https://review.coreboot.org/18350
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/445141
2017-02-21 06:44:23 -08:00
Rizwan Qureshi
d9aa8dd735 UPSTREAM: driver/i2c/max98927: add i2c driver for Maxim 98927 codec
Maxim 98927 kernel driver requires entries in the ACPI SSDT table,
add a SSDT generator as part of this driver.

BUG=chrome-os-partner:62051
BRANCH=None
TEST=After boot, dump and verify that the generated SSDT ACPI table has the
required entries.

Change-Id: I9043f9f0b66b45d04e8b8cbe8c99b77686fd5666
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 4979d7610e
Original-Change-Id: Ic2d4d8449288bc00d085852220b2e1e7a208e9ef
Original-Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Original-Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Original-Signed-off-by: M Naveen <naveen.m@intel.com>
Original-Signed-off-by: Dylan Reid <dgreid@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18211
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/445127
2017-02-20 14:28:02 -08:00
Rizwan Qureshi
c46a682f84 UPSTREAM: mainboard/eve: select SOC_INTEL_KABYLAKE
eve is based on Kabylake SoC hence select the appropriate
config.

BUG=none
BRANCH=none
TEST=none

Change-Id: I590ffa81451da4e7920ec53e5019efe8f136a6c8
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: ceccb6ba53
Original-Change-Id: I756dda5a1924e83a02ac1cebb1907884f436a13f
Original-Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18314
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/445126
2017-02-20 14:28:01 -08:00
Rizwan Qureshi
0b6968219b UPSTREAM: mainboard/poppy: select SOC_INTEL_KABYLAKE
poppy is based on Kabylake SoC hence select the appropriate
config.

BUG=none
BRANCH=none
TEST=none

Change-Id: I39b16d1fe76745ac7fbe0e3e153d1de46e5d52bf
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: b2b98f7ae1
Original-Change-Id: Ie339a3991eeccb8a7dba983a2b5ab5d1c996ce9d
Original-Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18313
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/445125
2017-02-20 14:28:01 -08:00
Rizwan Qureshi
81baa0e803 UPSTREAM: soc/intel/skylake: Add config option for Kabylake
Currently there is no distinction between mainboards using
Skylake or Kabylake SoC, Add a config option for Kabylake
SoC to allow mainboards to explicitly select if they are
using it.

BUG=none
BRANCH=none
TEST=none

Change-Id: I1c0e5acebce9db7e06e2e320dbdf67d6c63061b7
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 0700dca969
Original-Change-Id: Ie7960bd81f88a223894afe3115ddc0bc637e4be4
Original-Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18312
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/445124
2017-02-20 14:28:00 -08:00
Robbie Zhang
ad05f78d59 UPSTREAM: intel/skylake: add function is_secondary_thread()
There are MSRs that are programmable per-core not per-thread, so add
a function to check whether current executing CPU is a primary core
or a "hyperthreaded"/secondary core. For instance when trying to
program Core PRMRR MSRs(per-core) with mp_init, cpu exception is thrown
from the secondary thread. This function was used to avoid that.

Potentially this function can be put to common code or arch/x86 or cpu/x86.

BUG=chrome-os-partner:62438
BRANCH=NONE
TEST=Tested on Eve, verified core PRMRR MSRs get programmed only on primary
thread avoiding exeception.

Change-Id: I6d837f50db404f35606f1f975b05456946605c10
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: 2b194d9741
Original-Change-Id: Ic9648351fadf912164a39206788859baf3e5c173
Original-Signed-off-by: Robbie Zhang <robbie.zhang@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18366
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/444818
2017-02-18 03:10:59 -08:00
Mathias Krause
c958bb42a0 UPSTREAM: libpayload: x86/head - implement argc/argv handling
Implement the argc/argv passing as described in coreboots payload API:
http://www.coreboot.org/Payload_API

While at it, give the code some love by not needlessly trashing register
values.

BUG=none
BRANCH=none
TEST=none

Change-Id: If49874b1ac1c7359816f4ec02c5380c32101fa1a
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: d2f16cac74
Original-Change-Id: Ib830f2c67b631b7216843203cefd55d9bb780d83
Original-Signed-off-by: Mathias Krause <minipli@googlemail.com>
Original-Reviewed-on: https://review.coreboot.org/18336
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/444817
2017-02-18 03:10:59 -08:00
Mathias Krause
98efca1d93 UPSTREAM: libpayload: x86/exec - simplify and robustify the code
Simplify the code by directly using the arguments on the stack as base
pointer relative memory references, instead of loading them into
intermediate registers first.

Make it more robust by preserving all callee saved registers mandated by
the C calling convention (and only those), namely EBP, EBX, ESI and EDI.

Don't assume anything about the register state when the called function
returns -- beside the segment registers and the stack pointer to be
still the same as before the call.

BUG=none
BRANCH=none
TEST=none

Change-Id: I231828bb9a65a6b1077b17024c0c59fed8546284
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: 57dc93c967
Original-Change-Id: I383d6ccefc5b3d5cca37a1c9b638c231bbc48aa8
Original-Signed-off-by: Mathias Krause <minipli@googlemail.com>
Original-Reviewed-on: https://review.coreboot.org/18335
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/444816
2017-02-18 03:10:58 -08:00
Mathias Krause
f8e37efbcf UPSTREAM: libpayload: x86/main - propagate return value of main()
According to coreboots payload API [1], the called payload should be
able to return a value via %eax. Support this by changing the prototype
of start_main() and pass on the return value of main() to the caller
instead of discarding it.

[1] https://www.coreboot.org/Payload_API

BUG=none
BRANCH=none
TEST=none

Change-Id: I1782c45b615d431de8be5a533d5890ed53ddb9d8
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: 7b681c5926
Original-Change-Id: I8442faea19cc8e04487092f8e61aa4e5cba3ba76
Original-Signed-off-by: Mathias Krause <minipli@googlemail.com>
Original-Reviewed-on: https://review.coreboot.org/18334
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/444815
2017-02-18 03:10:58 -08:00
Mathias Krause
d808757641 UPSTREAM: libpayload: x86/exec - fix argc/argv value passing
According to coreboots payload API [1] the argc value should be passed
at stack offset 0x10, so we need to push a dummy value to comply to the
API.

[1] https://www.coreboot.org/Payload_API

BUG=none
BRANCH=none
TEST=none

Change-Id: I2acc66d20fcc4e313d1ddbc4a7bc1772548981c5
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: 9fa78c136d
Original-Change-Id: Id20424185a5bf7e4d94de1886a2cece3f3968371
Original-Signed-off-by: Mathias Krause <minipli@googlemail.com>
Original-Reviewed-on: https://review.coreboot.org/18333
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/444814
2017-02-18 03:10:58 -08:00
Furquan Shaikh
3206879edd UPSTREAM: mainboard/google/poppy: Generate digitizer node in SSDT
Add support for generating digitizer node in SSDT using wacom i2c
driver.

BUG=None
BRANCH=None
TEST=Verified that the node shows up in SSDT.

Change-Id: Ib4bdb4f2cceb4dd581515a3cf721f61d644075f4
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: c57c48bd36
Original-Change-Id: If7e1e2463778c2ff7263eff995def149457edcde
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18373
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/444813
2017-02-18 03:10:57 -08:00
Furquan Shaikh
17d376d920 UPSTREAM: mainboard/google/eve: Generate FPC device using SPI SSDT generator
Use the newly added SPI SSDT generator for adding FPC device.

BUG=chrome-os-partner:59832
BRANCH=None
TEST=Compiles successfully. Verified that the SSDT entry matches the
entry in mainboard.asl

Change-Id: Ieec31e6f489ac40c4f6c3e31ae949c967bbadf83
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: 231c198e2c
Original-Change-Id: I1b3c33f2b4337735a9725dd4eb6193b2455962d7
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18343
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/444812
2017-02-18 03:10:57 -08:00
Furquan Shaikh
c777b9c1cf UPSTREAM: drivers/spi: Add support for generating SPI device in SSDT
Similar to I2C driver, add support for generating SPI device and
required properties in SSDT for ACPI.

BUG=chrome-os-partner:59832
BRANCH=None
TEST=Compiles succesfully. Verified SPI device generated in SSDT on
poppy.

Change-Id: I963cfeb38cfb5da095f89cb67f1c4f6724768b81
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: 20a91c9830
Original-Change-Id: Ic4da79c823131d54d9eb3652b86f6e40fe643ab5
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18342
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/444811
2017-02-18 03:10:56 -08:00
Furquan Shaikh
216a0e4699 UPSTREAM: soc/intel/skylake: Add support for SPI device
Add a new PCI driver for SPI devices with supported PCI ids. Also,
provide a translation table to convert struct device structure into SPI
bus number.

BUG=chrome-os-partner:59832
BRANCH=None
TEST=Compiles successfully

Change-Id: I7c1fb564b27c2e457b607c53ab2cd2d127f9a4a0
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: 0de80da24c
Original-Change-Id: If860eb819f2ce5ae5443f808b356af57f86c52be
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18341
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/444810
2017-02-18 03:10:56 -08:00
Furquan Shaikh
f5ee28d3a6 UPSTREAM: device: Add scan_generic_bus support
scan_smbus routine does not perform any smbus specific operation. Thus,
rename the routine to scan_generic_bus so that it can be used by other
buses like SPI. Add a wrapper scan_smbus to allow other users of smbus
scan to continue working as before.

BUG=chrome-os-partner:59832
BRANCH=None
TEST=Compiles successfully

Change-Id: Id2b6342d96915e47c265c7984f651680632a3903
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: 4e08479688
Original-Change-Id: I8ca1a2b7f2906d186ec39e9223ce18b8a1f27196
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18363
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/444809
2017-02-18 03:10:56 -08:00