Commit graph

20600 commits

Author SHA1 Message Date
Nico Huber
ba8436b687 UPSTREAM: buildgcc: Relax GNAT version checks
Compiling the GNAT frontend of GCC seems to have stabilized since GCC
4.9.0. So build it by default if GNAT >= 4.9 is installed.

TEST=Bootstrapped all GCC versions from 4.9.0 to 6.2 and built the
     i386 cross toolchain with each.

Change-Id: Ib35953853caf2ffe5f36fb9463ddbc87ecc61d1e
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: d5829e9bdb
Original-Change-Id: I9d1127595dc6b9bcece9c5e5cc7e45f467744ab9
Original-Signed-off-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-on: https://review.coreboot.org/18777
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/459657
2017-03-25 03:51:11 -07:00
Nico Huber
effbcdccaf UPSTREAM: buildgcc: Fix check for a .success file
We were looking for the wrong file for some time. With bootstrapping
enabled, this resulted in a spurious message about the host GCC being
already built.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ia395aaf83e07a9c4ed4808f6940ecd9b300469a9
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: cdf79e6a8d
Original-Change-Id: Ieb52c5925ea5615c83311319f22693b72f4987f9
Original-Signed-off-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-on: https://review.coreboot.org/18776
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/459656
2017-03-24 19:38:07 -07:00
Arthur Heymans
c5c68b9ebd UPSTREAM: southbridge/intel/i82801gx: Fix problems found by checkpatch.pl
BUG=none
BRANCH=none
TEST=none

Change-Id: I1562aa1f5ffc289980bdfa1063c1f8edbcf634ea
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 3f111b0b11
Original-Change-Id: Iddc67e7c126ce19429afc24b021e385353564cb8
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18705
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/458638
2017-03-23 08:22:33 -07:00
Arthur Heymans
d8e532cbfe UPSTREAM: nb/intel/i945: Fix errors found by checkpatch.pl
BUG=none
BRANCH=none
TEST=none

Change-Id: Id20a4c5f8c0f52dc19a52d0220f9b3092b7d491f
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 70a8e34853
Original-Change-Id: Ic2dd40e73d4a4c091c5ce1f49bbf9ab4d013d7af
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18704
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/458637
2017-03-23 08:22:33 -07:00
Rizwan Qureshi
b5e41fb645 UPSTREAM: soc/intel/skylake: Add option to disable host reads to PMC XRAM
FSP disables host access to shadowed PMC XRAM registers by default,
it also provides a UPD to enable/disable host reads to these regiters.
Expose the same in devicetree as a config option.

BUG=none
BRANCH=none
TEST=none

Change-Id: I1ffd08c2aa4abb52787ae7b8c91cbc734290f6ec
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: ffe58107df
Original-Change-Id: Iaa33aa3233bda4f050da37d1d8af0556311c9496
Original-Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18319
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/458355
2017-03-23 08:22:32 -07:00
Aamir Bohra
3cef1a9f63 UPSTREAM: soc/intel/skylake: Add configs for enabling DCI and TraceHub
Add configs for enabling Intel TraceHub and DCI for aid in debugging.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ia9422733d4b85614774614ccf6af8b525d0ca401
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 6375512896
Original-Change-Id: Ic40f9499c0125070049856e242e89024ca5a1c4e
Original-Signed-off-by: Aamir Bohra <aamir.bohra@intel.com>
Original-Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18791
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/458354
2017-03-23 08:22:32 -07:00
Subrata Banik
f23e8faa2d UPSTREAM: soc/intel/apollolake: Add CQOS config for CAR common code
BUG=none
BRANCH=none
TEST=none

Change-Id: Ie67d02e279b2c31f1418d10cfbada8a411d50d96
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 8e1c12f12e
Original-Change-Id: I5947170a96e888cea2f3faac92355e72b63c1fef
Original-Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18735
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/458350
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
2017-03-22 10:08:25 -07:00
YH Lin
04e93d6b18 UPSTREAM: mainboard/google/reef: add nasher variant
Create the initial Nasher variant which refers to the Reef.
Nasher is APL board that derives from reference board Reef.

BRANCH=master
BUG=b:36389286
TEST=Build (as initial setup)
Signed-off-by: YH Lin <yueherngl@chromium.org>

Change-Id: Idfe34e497beef225ac9e589186bfac2989a11e53
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f0637e71c7
Original-Change-Id: I7962aa8246890149988c7f02dcd90d820df7b901
Original-Reviewed-on: https://review.coreboot.org/18928
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/458349
2017-03-22 10:08:25 -07:00
Arthur Heymans
80441f223f UPSTREAM: nb/x4x: Move checkreset before SPD reading
It makes no sense to read SPDs if the system will reset anyway.

BUG=none
BRANCH=none
TEST=none

Change-Id: Icc0587de64d04063c9203535a773ec1967604b23
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: bb5e77c478
Original-Change-Id: Id2ad9b04860b3e4939a149eef6b619a496179ff8
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/17661
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/458348
2017-03-22 10:08:24 -07:00
Arthur Heymans
e9c234b89f UPSTREAM: nb/intel/x4x: Fix issues found by checkpatch.pl
BUG=none
BRANCH=none
TEST=none

Change-Id: Id8a55a04b884ac28c88aec0a6f0510f1c69f77b4
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 70a1dda927
Original-Change-Id: Ie22b8bd5420f8c33df1866410af42ef41ad38362
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18694
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/458347
2017-03-22 10:08:24 -07:00
Paul Menzel
b536b7e032 UPSTREAM: mainboards: Dont select CONSOLE_POST
Currently, its impossible for the user to select `NO_POST`, for boards
selecting `CONSOLE_POST` in their config.

```
warning: (BOARD_SPECIFIC_OPTIONS) selects CONSOLE_POST which has unmet
direct dependencies (VENDOR_SIEMENS && BOARD_SIEMENS_MC_BDX1 || !NO_POST)
```

This is currently done for Intel Camelback Mountain and Siemens MC-BDX1.

Selecting the option `CONSOLE_POST` in board specific configuration is
not a good idea, as this should be user configurable over Kconfig, and
also the tree-wide defaults should be the same for these options.

Kconfig is different, as commit 97535558f1 (mainboard/{google,intel}:
Change config option selection) only touch the Intel board.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ie93d38b3c82261458534993b856737f9ea5d019c
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 98adaf5989
Original-Change-Id: I91c1e0cb92ed218b6bbc7c33759b91f748cf6f51
Original-Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Original-Reviewed-on: https://review.coreboot.org/18878
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://chromium-review.googlesource.com/458346
2017-03-22 10:08:23 -07:00
Paul Menzel
1454e999a0 UPSTREAM: mainboards: Dont select POST_IO
Currently, its impossible for the user to select `NO_POST`, for boards
selecting it in their config.

```
warning: (BOARD_SPECIFIC_OPTIONS && BOARD_SPECIFIC_OPTIONS &&
BOARD_SPECIFIC_OPTIONS) selects POST_IO which has unmet direct
dependencies (VENDOR_ASUS && (BOARD_ASUS_F2A85_M ||
BOARD_ASUS_F2A85_M_PRO || BOARD_ASUS_F2A85_M_LE) && (BOARD_ASUS_F2A85_M
|| BOARD_ASUS_F2A85_M_PRO) || VENDOR_MSI && BOARD_MSI_MS7721 ||
PC80_SYSTEM && !NO_POST)
```

This is currently done for Intel Mohon Peak, and its descendants.

Selecting the option `POST_IO` in board specific configuration is not a
good idea, as this should be user configurable over Kconfig, and also
the tree-wide defaults should be the same for these options.

BUG=none
BRANCH=none
TEST=none

Change-Id: I7e000a03e572cc537ee2d75b4a9a50862bff0c0b
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 237ca0d20c
Original-Change-Id: Ia4ab0d942b7d66f18466a770ef739109ab0db629
Original-Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Original-Reviewed-on: https://review.coreboot.org/18877
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/458345
2017-03-22 10:08:23 -07:00
Arthur Heymans
ee612588c2 UPSTREAM: southbridge/nvidia/mcp55: Get rid of #include early_smbus.c
Using linker instead of '#include *.c'.

BUG=none
BRANCH=none
TEST=none

Change-Id: I716a1fff7948f6ee37e98ac9b040aee5809b6de4
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 11cf68c710
Original-Change-Id: I74dfa99c8bb3f4ca7ef3d774be2197897022f52c
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18484
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/458344
2017-03-22 10:08:22 -07:00
Barnali Sarkar
9bc61f7530 UPSTREAM: soc/intel/apollolake: Use common function to fill DIMM information
Extract SMBIOS memory information from FSP SMBIOS_MEM_INFO_HOB
and use common function dimm_info_fill() to save it in CBMEM.

BUG=chrome-os-partner:61729
BRANCH=none
TEST=Build and boot Reef to verify the type 17 DIMM info coming in
SMBIOS table from Kernel command "dmidecode".

Change-Id: Iab860b9eefd2e26776a4aff50e69edec3999d963
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: ad017c63d2
Original-Change-Id: I33c3a0bebf33c53beadd745bc3d991e1e51050b7
Original-Signed-off-by: Barnali Sarkar <barnali.sarkar@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18451
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Original-Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/458343
2017-03-22 10:08:22 -07:00
Tobias Diedrich
d88081d867 UPSTREAM: ec/lenovo/h8: Support an optional battery page flip delay
The Lenovo H8 battery interface uses a paged EC memory area.

Some Thinkpads (in particular the S230U) use a different EC controller
(ENE KB9012) with mostly compatible firmware, which requires an explicit
delay between writing the page register and reading the page data.

BUG=none
BRANCH=none
TEST=none

Change-Id: I96cb81547b5fa58528d586121ce0e1c2eaf09c11
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 1583dbd7b7
Original-Change-Id: Iaeb8c4829efa29139396b519de803f10dd93f03f
Original-Signed-off-by: Tobias Diedrich <ranma+coreboot@tdiedrich.de>
Original-Reviewed-on: https://review.coreboot.org/18348
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/458342
2017-03-22 10:08:22 -07:00
Paul Menzel
5106b72d62 UPSTREAM: emulation/qemu-i440fx: Use SMBIOS macros
BUG=none
BRANCH=none
TEST=none

Change-Id: I011187430dffbf233b7afd7b2b50f5f86567efee
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: b4d0757855
Original-Change-Id: Idda4d74f9b934ccefe6ea5b553bde587059cde64
Original-Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Original-Reviewed-on: https://review.coreboot.org/18790
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/458341
2017-03-22 10:08:21 -07:00
Katherine Hsieh
dd261ce0a0 UPSTREAM: google/sand: Add Raydium touchscreen device
We just support Raydium touchscreen instead of Elan.
Thus we have to remove Elan touchscreen device
and add Raydium touchsrcreen device.

BUG=b:35775065
BRANCH=reef
TEST=emerge-sand coreboot

Change-Id: Id11fd45074ad51a282c66e1565d88f82545e02e5
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: b980d1ae80
Original-Change-Id: I7b33a29287dcb90e379b52cc93825f2988a0d3c9
Original-Signed-off-by: Katherine Hsieh <Katherine.Hsieh@quantatw.com>
Original-Reviewed-on: https://review.coreboot.org/18789
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/458340
2017-03-22 10:08:21 -07:00
Patrick Georgi
450e4bc446 UPSTREAM: util/cbfstool: avoid memleaks and off-by-ones
BUG=none
BRANCH=none
TEST=none

Change-Id: Ib3219e1ecbff9c3ddf74e690daddeb996f72a314
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: dce629b2f8
Original-Change-Id: Iac136a5dfe76f21aa7c0d5ee4e974e50b955403b
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Found-by: scan-build 3.8
Original-Reviewed-on: https://review.coreboot.org/18134
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/458339
2017-03-22 10:08:20 -07:00
Arthur Heymans
cfae730528 UPSTREAM: mb/apple/macbook11,macbook21,imac52: Remove per board directories
This is achieved by setting up Kconfig and Kconfig.name very similar
to how variants are used.

BUG=none
BRANCH=none
TEST=none

Change-Id: I8a1bb508157beb7220f16d87144a71b3decfbc59
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 1dfc0a64d4
Original-Change-Id: I22089ff29e3879d7956527a092a0ac6425b05cb3
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/17894
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/458338
2017-03-22 10:08:20 -07:00
Lee Leahy
5ce055347a UPSTREAM: arch/x86: Fix most of remaining issues detected by checkpatch
Fix the following errors and warnings detected by checkpatch.pl:

ERROR: do not use assignment in if condition
ERROR: trailing statements should be on next line
ERROR: Macros with complex values should be enclosed in parentheses
ERROR: switch and case should be at the same indent
WARNING: char * array declaration might be better as static const
WARNING: else is not generally useful after a break or return
WARNING: storage class should be at the beginning of the declaration
WARNING: void function return statements are not generally useful
WARNING: break is not useful after a goto or return
WARNING: Single statement macros should not use a do {} while (0) loop
WARNING: sizeof *t should be sizeof(*t)
WARNING: Comparisons should place the constant on the right side of the test

TEST=Build and run on Galileo Gen2

Change-Id: I962c3ac9554b2205b15734747542d59894edae65
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 0b5678f21f
Original-Change-Id: I39d49790c5eaeedec5051e1fab0b1279275f6e7f
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18865
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/458337
2017-03-22 10:08:19 -07:00
Kevin Chiu
5e26d7a369 UPSTREAM: google/pyro: Update DPTF settings
1. correct DPTF TCHG target device to TSR2

2. Refers Change-Id I267b6e07fa9def2c91ff9f6035f2d9437faf1965
   (mb/google/reef: Remove CPU throttling effect of the charger sensor)
   to remove CPU throttling effect of the charger sensor
   since it's not relevant to throttle CPU based on the charger sensor.

BUG=b:35586881
BRANCH=reef
TEST=emerge-pyro coreboot
Change-Id: I4801e0e612e0ddf90764ffe080c679818d33212a
Signed-off-by: Kevin Chiu <Kevin.Chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/18920
Tested-by: build bot (Jenkins)
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/457911
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2017-03-21 23:15:08 -07:00
Furquan Shaikh
0444a991b1 UPSTREAM: mainboard/google/poppy: Use sideband IRQ for SD Card Detect
Since SD card controller is expected to enter D3hot by runtime power
management if there is no card inserted, we need to use a sideband IRQ
pin which is not under the control of the controller. Thus, configure
GPP_A7 as the sideband IRQ pin and pass it to OS as the card detect
pin.

BUG=b:35586693
BRANCH=None
TEST=Verified on a reworked poppy board that card detect works fine.

Change-Id: I4512f5d7829583e27c9750463396eaffbc5702b4
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/18926
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/457910
2017-03-21 23:15:07 -07:00
Julius Werner
642e357a62 UPSTREAM: google/veyron: Clean out unused board variants
We have code for certain Veyron variant names that were either never
made into an actual board (Gus, Nicky, Thea) or used for Google-internal
test boards that no longer exist (Pinky, Shark). Let's clean them out to
avoid confusing people.

BUG=none
BRANCH=none
TEST=none

Change-Id: I60a7f1da4d468efdd2efced5d4e3e87599cc87fb
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 7504268318
Original-Change-Id: Icdce5f0f3613e089d0994318b02dba54170f0c42
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18860
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/457060
Commit-Ready: Julius Werner <jwerner@chromium.org>
Tested-by: Julius Werner <jwerner@chromium.org>
2017-03-21 10:29:34 -07:00
Wisley Chen
666cec33b3 UPSTREAM: mainboard/google/snappy: Update _hid name for weida touchscreen
Change hid name to "WDHT0002" for Weida WDT8752 which is supported by
standard hid i2c Linux driver.

BUG=b:35586513
BRANCH=reef
TEST=build, boot on snappy, and verified acpi node "WDHT0002" created.

Change-Id: Icdaacbdf9589b201133a2e04f3e842fdc4df0ae7
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 41dded3548
Original-Change-Id: Ie0cc980aa427b6db1eb14eb7868718619bb1310f
Original-Signed-off-by: Wisley Chen <wisley.chen@quantatw.com>
Original-Reviewed-on: https://review.coreboot.org/18874
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/457368
2017-03-21 03:04:33 -07:00
Sumeet Pawnikar
1cc1506bf2 UPSTREAM: mb/google/reef: Remove CPU throttling effect of the charger sensor
It's not relevant to throttle CPU based on the charger sensor.
So, remove this CPU throttling effect.

BUG=b:35908799
BRANCH=master
TEST=Built and booted on Electro DUT

Change-Id: I456f90a47d4c6c183517c0dd8e1673f672283848
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f8c891a15a
Original-Change-Id: I267b6e07fa9def2c91ff9f6035f2d9437faf1965
Original-Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18852
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/457367
Tested-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2017-03-21 03:04:33 -07:00
Bora Guvendik
0e4f5c9718 UPSTREAM: cpu/x86: add a barrier with timeout
In case something goes wrong on one of the
cpus, add the ability to use a barrier with
timeout so that other cpus don't wait forever.
Remove static from barrier wait and release.

BUG=chrome-os-partner:59875
BRANCH=reef
TEST=None

Change-Id: I51079396aa35bcebb5282e30ecf2235d9694b512
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 9b76f0b27b
Original-Change-Id: Iab6bd30ddf7632c7a5785b338798960c26016b24
Original-Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18107
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/457366
2017-03-20 17:33:15 -07:00
Kyösti Mälkki
3754c09cc7 UPSTREAM: ramstage: Align stack to 16 bytes
Some SSE instructions could take 128bit memory operands from
stack.

AGESA vendorcode was always built with SSE enabled, but until
now stack alignment was not known to cause major issues. Seems
like GCC-6.3 more likely emits instructions that depend on the
16 byte alignment of stack.

BUG=none
BRANCH=none
TEST=none

Change-Id: I58ae02a2204f426b89f892a0421f916711bd91f0
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 4796c32ad6
Original-Change-Id: Iea3de54f20ff242105bce5a5edbbd76b04c0116c
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18823
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/457365
2017-03-20 17:33:14 -07:00
Nicola Corna
68c9fc0b9d UPSTREAM: tint: Add USB support
Enable the USB during the initialization of tint. Without it USB
keyboards don't work, which makes this payload pointless on
systems where a PS/2 keyboard port isn't available.

Based on I98f0ccdb19d6b195572941cf87ce3221f57db7c5 (tint and
nvramcui: enable USB, update tint to 0.04+nmu1 with changes) [1]

[1] https://review.coreboot.org/17507/

BUG=none
BRANCH=none
TEST=none

Change-Id: Ie04af809b6f6c6f97554eced7d8477d052ec6f60
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 85e81dfa6d
Original-Change-Id: Iaa8dfac0301ef19a2d76a0975d025b00e7f3807b
Original-Signed-off-by: Nicola Corna <nicola@corna.info>
Original-Reviewed-on: https://review.coreboot.org/18766
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/457364
2017-03-20 17:33:14 -07:00
Arthur Heymans
9905ad23e1 UPSTREAM: nb/i945/gma.c: Refactor panel setup
This reuses some of gm45 code to set up the panel.

Panel start and stop delays and pwm frequency can now be set in
devicetree.

Linux does not make the difference between 945gm and gm45
for panel delays, so it is safe to assume the semantics of those
registers are the same.

The core display clock is computed according to "Mobile Intel 945
Express Chipset Family" Datasheet.

This selects Legacy backlight mode since most targets have some smm
code that rely on this.

This sets the same backlight frequency as vendor bios on Thinkpad X60
and T60.

A default of 180Hz is selected for the PWM frequency if it is not
defined in the devicetree, this might be annoying for displays that
are LED backlit, but is a safe value for CCFL backlit displays.

BUG=none
BRANCH=none
TEST=none

Change-Id: I86445ab53cb83bc5183fb998ca03e00b4746a33f
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 8e079000dc
Original-Change-Id: I1c47b68eecc19624ee534598c22da183bc89425d
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/18141
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/457362
2017-03-20 10:33:11 -07:00
Lee Leahy
a3e3d5479e UPSTREAM: drivers/intel/fsp1_1: Fix issues detected by checkpatch
Fix the following error and warnings detected by checkpatch.pl:

ERROR: "foo * bar" should be "foo *bar"
WARNING: line over 80 characters
WARNING: else is not generally useful after a break or return
WARNING: braces {} are not necessary for single statement blocks
WARNING: suspect code indent for conditional statements (16, 32)
WARNING: Comparisons should place the constant on the right side of the test

TEST=Build and run on Galileo Gen2

Change-Id: I9468d58e4f996d77825f6cd9b99081bc240d109e
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 216712ae01
Original-Change-Id: I9f56c0b0e3baf84989411e4a4b98f935725c013f
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18886
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/457361
2017-03-20 10:33:11 -07:00
Lee Leahy
c396b77806 UPSTREAM: soc/intel/broadwell: Fix other issues detected by checkpatch
Fix the following error and warnings detected by checkpatch.pl:

ERROR: switch and case should be at the same indent
WARNING: line over 80 characters
WARNING: storage class should be at the beginning of the declaration
WARNING: adding a line without newline at end of file
WARNING: __func__ should be used instead of gcc specific __FUNCTION__
WARNING: Comparisons should place the constant on the right side of the test

TEST=None

Change-Id: I2c6d82f94ec6bce84913452a9eb227b3cbec5f31
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 6ef5192627
Original-Change-Id: I85c400e4a087996fc81ab8b0e5422ba31df3c982
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18885
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/457360
2017-03-20 10:33:10 -07:00
Lee Leahy
6638dddfbc UPSTREAM: soc/intel/broadwell: Fix {}, () and conditional issues
Fix the following errors and warnings detected by checkpatch:

ERROR: open brace '{' following struct go on the same line
ERROR: return is not a function, parentheses are not required
ERROR: do not use assignment in if condition
ERROR: trailing statements should be on next line
WARNING: else is not generally useful after a break or return
WARNING: braces {} are not necessary for single statement blocks
WARNING: braces {} are not necessary for any arm of this statement

TEST=None

Change-Id: Ieba9181e756b7c3600cf88e56d04f69abfc33569
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 8a9c7dc087
Original-Change-Id: I9414341b0c778c252db33f0ef4847b9530681d96
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18884
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/457359
2017-03-20 10:33:10 -07:00
Lee Leahy
09024bfc09 UPSTREAM: soc/intel/broadwell: Add int to unsigned
Fix the following issue detected by checkpatch:

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

TEST=None

Change-Id: I4936fc41e8b7b9a11398445b95dd2591acad5f37
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 23602dfd68
Original-Change-Id: Iae22e724b6adae16248db7dc8f822f65bfadae5f
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18873
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/457358
2017-03-20 10:33:09 -07:00
Lee Leahy
3b1005fa5a UPSTREAM: soc/intel/broadwell: Fix spacing issues detected by checkpatch
Fix the following errors and warnings detected by checkpatch.pl:

ERROR: code indent should use tabs where possible
ERROR: space required after that ',' (ctx:VxV)
ERROR: space prohibited before that ',' (ctx:WxW)
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that '<=' (ctx:WxV)
ERROR: spaces required around that '<=' (ctx:VxV)
ERROR: spaces required around that '>' (ctx:VxV)
ERROR: spaces required around that '>=' (ctx:VxV)
ERROR: spaces required around that '+=' (ctx:VxV)
ERROR: spaces required around that '<' (ctx:VxV)
ERROR: "foo * bar" should be "foo *bar"
ERROR: "foo* bar" should be "foo *bar"
ERROR: "(foo*)" should be "(foo *)"
ERROR: space required before the open parenthesis '('
WARNING: space prohibited between function name and open parenthesis '('
WARNING: please, no space before tabs
WARNING: please, no spaces at the start of a line

False positives are generated for the following test:
WARNING: space prohibited between function name and open parenthesis '('
in both pei_data.h and pei_wrapper.h

TEST=None

Change-Id: I751eb76f0e665a99e56ed2b051215d367238e12b
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 26b7cd0fa8
Original-Change-Id: Icab08e5fcb6d5089902ae5ec2aa5bbee5ac432ed
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18872
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/457357
2017-03-20 10:33:09 -07:00
Julius Werner
0cce40f6fb UPSTREAM: google/veyron: Work around RAM code strapping error
With a recent patch (google/veyron_*: Add new Micron and Hynix modules)
we switched RAM codes for Veyron boards to tri-state since we were
running out of binary numbers. Unfortunately we only tested that change
on Minnie and Speedy, and it turns out that it broke Jaq, Jerry and
Mighty. The "high" RAM code pins on those boards were incorrectly
strapped with 100Kohm resistors (as opposed to 1Kohm on Minnie and
Speedy), which is too high to overpower the SoC-internal pull-down we
use to differentiate "high" from "tri-state". Since we already used
tri-state codes on some Minnie and Speedy SKUs we have to hack up the
code to work differently on these two groups of boards to keep
everything working.

BRANCH=veyron
BUG=b:36279493
TEST=Compiled, confirmed ram_code called the right function depending on
board.

Change-Id: I5ff76b5774952ed9821d47f82ed477fa4e570612
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 2d99f3b158
Original-Change-Id: I253b213ef7ca621ce47a7a55a5119a167d944078
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18859
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/457059
2017-03-18 12:01:03 -07:00
Furquan Shaikh
b5485edde1 UPSTREAM: mainboard/google/poppy: Enable EC SW sync
Now that EC on poppy is stable, it is time to switch on EC SW sync.

BUG=b:36178824
BRANCH=None
TEST=Verified that EC SW sync is done properly and device boots to OS.

Change-Id: I80b48146bbc6aaf967047f8dd80a3e1991eca66c
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 336a34c81b
Original-Change-Id: I1395ad8af73128a8dd220351f5b5da157659b19e
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18838
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/457058
2017-03-18 12:01:02 -07:00
Zhuo-hao Lee
951046d605 UPSTREAM: soc/intel/apollolake: Reduce D3 cold delay for eMMC controller
eMMC Controller is taking over 100ms to resume during runtime which
results in I/O latency issues on the Apollo Lake system such as Snappy.
The cause is the Linux Kernel setting the firmware reset time to
100 ms by default.

This patch adds _DSM method for eMMC comtroller for specifying the
device readiness durations. Function index 9 returns package of five
integers to set D3 cold delay to zero and ACPI constant Ones for the
elements where overriding the default values is not desired.

BUG=b:35774937
BRANCH=none
TEST=update snappy coreboot and test i/o latency is under 100ms

Change-Id: I3fd354bb3ad4fbe6c5a0033c6a5406c61a984300
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 07f60aa56f
Original-Signed-off-by: Zhuo-hao Lee <zhuo-hao.lee@intel.com>
Original-Signed-off-by: Sowmya V <v.sowmya@intel.com>
Original-Change-Id: Idcfe4252b20bead15c2e5b9cb000ff797295f06a
Original-Reviewed-on: https://review.coreboot.org/18806
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/457057
2017-03-18 12:01:02 -07:00
Lee Leahy
69eac1e42b UPSTREAM: arch/x86: Wrap lines at 80 columns
Fix the following warning detected by checkpatch.pl:

WARNING: line over 80 characters

TEST=Build and run on Galileo Gen2

Change-Id: Ied84c3bca185de9d10102e4aeb3e905fc58ed43b
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 6f80ccc357
Original-Change-Id: I3495cd30d1737d9ee728c8a9e72bd426d7a69c37
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18864
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/457056
2017-03-18 12:01:01 -07:00
Lee Leahy
95cc57bf61 UPSTREAM: arch/x86: Fix prefer errors detected by checkpatch
Fix the following warnings detected by checkpatch.pl:

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
WARNING: plain inline is preferred over __inline__

TEST=Build and run on Galileo Gen2

Change-Id: I7404123285a4b009b215b9efa101cebfd8d8a6ed
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: e5f29e8bf8
Original-Change-Id: I8ba98dfe04481a7ccf4f3b910660178b7e22a4a7
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18863
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/456315
2017-03-18 12:01:01 -07:00
Lee Leahy
c73d6affb5 UPSTREAM: arch/x86: Fix space issues detected by checkpatch
Fix the following errors and warnings detected by checkpatch.pl:

ERROR: space required before the open parenthesis '('
ERROR: space prohibited after that open parenthesis '('
ERROR: space prohibited before that close parenthesis ')'
ERROR: space prohibited after that open square bracket '['
ERROR: space required after that ',' (ctx:VxV)
ERROR: space prohibited before that ',' (ctx:WxW)
ERROR: space required after that ';' (ctx:VxV)
ERROR: spaces required around that ':' (ctx:ExV)
ERROR: spaces required around that ':' (ctx:VxW)
ERROR: spaces required around that ':' (ctx:WxV)
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that '+=' (ctx:VxV)
ERROR: spaces required around that '<=' (ctx:WxV)
ERROR: spaces required around that '||' (ctx:VxW)
ERROR: space prohibited before that '++' (ctx:WxO)
ERROR: need consistent spacing around '+' (ctx:WxV)
ERROR: spaces required around that '<' (ctx:WxV)
ERROR: spaces required around that '<' (ctx:VxV)
ERROR: need consistent spacing around '>>' (ctx:WxV)
ERROR: "(foo*)" should be "(foo *)"
ERROR: "foo* bar" should be "foo *bar"
ERROR: "foo * bar" should be "foo *bar"
ERROR: code indent should use tabs where possible
WARNING: space prohibited between function name and open parenthesis '('
WARNING: unnecessary whitespace before a quoted newline
WARNING: please, no spaces at the start of a line
WARNING: please, no space before tabs
WARNING: Unnecessary space before function pointer arguments

TEST=Build and run on Galileo Gen2

Change-Id: I79bd758d05c64541b0b4e3c50148d28e98642d09
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 024b13d07c
Original-Change-Id: I2d7e1a329c6b2e8ca9633a97b595566544d7fd33
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18862
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/456314
2017-03-18 12:01:00 -07:00
Lee Leahy
428711743e UPSTREAM: arch/x86: Fix issues with braces detected by checkpatch
Fix the following errors and warnings detected by checkpatch.pl:

ERROR: open brace '{' following function declarations go on the next line
ERROR: that open brace { should be on the previous line
ERROR: else should follow close brace '}'
WARNING: braces {} are not necessary for any arm of this statement
WARNING: braces {} are not necessary for single statement blocks

TEST=Build and run on Galileo Gen2

Change-Id: I22a46be57513a7f8ca5c504c35c1c335a5ae2c03
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 9c7c6f7213
Original-Change-Id: I13d1967757e106c8300a15baed25d920c52a1a95
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18861
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/456313
2017-03-18 12:01:00 -07:00
Lee Leahy
3a41bf99d3 UPSTREAM: soc/intel/braswell: Fix most of the issues detected by checkpatch
Fix the following errors and warnings detected by checkpatch.pl:

ERROR: that open brace { should be on the previous line
ERROR: return is not a function, parentheses are not required
WARNING: braces {} are not necessary for any arm of this statement
WARNING: line over 80 characters
WARNING: braces {} are not necessary for single statement blocks
WARNING: Avoid unnecessary line continuations
WARNING: break is not useful after a goto or return
WARNING: else is not generally useful after a break or return

False positives are generated by checkpatch for the following test:
ERROR: Macros with complex values should be enclosed in parentheses

TEST=Build for cyan

Change-Id: Iee0e4fbac83ded441f6123ceb7ae7f1011bc483a
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: d94cff6ab2
Original-Change-Id: I19048895145b138a63100b29f829ff446ff71b58
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18871
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/456312
2017-03-18 12:00:59 -07:00
Lee Leahy
4af90eef23 UPSTREAM: soc/intel/braswell: Add int to unsigned
Fix the following warning detected by checkpatch.pl:

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

TEST=Build for cyan

Change-Id: I3b46d8e0f3ebeae55c71c54d01475b294652505a
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 1072e7dcc3
Original-Change-Id: Ib5c6a1bf5308a8add42d7371854b80ea53d7ae84
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18870
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/456311
2017-03-18 12:00:59 -07:00
Lee Leahy
99245d40e5 UPSTREAM: soc/intel/braswell: Fix spacing issues detected by checkpatch
Fix the following errors and warnings detected by checkpatch.pl:

ERROR: space required after that ',' (ctx:VxV)
ERROR: space prohibited before that ',' (ctx:WxE)
ERROR: spaces required around that '=' (ctx:WxV)
ERROR: code indent should use tabs where possible
WARNING: space prohibited between function name and open parenthesis '('
WARNING: please, no spaces at the start of a line

TEST=Build for cyan

Change-Id: I4a238c8e47032cd7c7339a26fad4b3760aa150bb
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 6598b91fe3
Original-Change-Id: I84d4204585b498b695608c5008fdfb7961e2416f
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18869
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/456310
2017-03-18 12:00:59 -07:00
Lee Leahy
60ac2edc6e UPSTREAM: soc/intel/skylake: Fix remaining issues detected by checkpatch
Fix the following errors and warnings detected by checkpatch.pl:

ERROR: code indent should use tabs where possible
ERROR: Macros with complex values should be enclosed in parentheses
ERROR: "foo * bar" should be "foo *bar"
ERROR: space required before the open parenthesis '('
ERROR: spaces required around that '=' (ctx:VxW)
WARNING: space prohibited between function name and open parenthesis '('
WARNING: storage class should be at the beginning of the declaration
WARNING: char * array declaration might be better as static const
WARNING: please, no space before tabs
WARNING: braces {} are not necessary for single statement blocks
WARNING: else is not generally useful after a break or return
WARNING: static const char * array should probably be static const char * const

TEST=Build for glados

Change-Id: I6662edd74e923a212392dab88dbda1d2e0b76e09
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f4c4ab9826
Original-Change-Id: Ic14ca3abd193cfe257504a55ab6b74782b26bf6d
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18868
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/456309
2017-03-18 12:00:58 -07:00
Lee Leahy
63b5b384ae UPSTREAM: soc/intel/skylake: Wrap lines at 80 columns
Fix the following warning detected by checkpatch:

WARNING: line over 80 characters

TEST=Build for glados

Change-Id: Ic775c43d42f363936859606b524d00c830e82984
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: b439a92939
Original-Change-Id: I79341f46ca06ac052f987975ccaf975470d27806
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18867
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/456308
2017-03-18 12:00:58 -07:00
Lee Leahy
b3f78673e3 UPSTREAM: soc/intel/skylake: Add int to unsigned
Fix the following warning detected by checkpatch.pl:

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

TEST=Build for glados

Change-Id: Ie9d2b2f4b28d9fcbc52ae68b3cffaf0401766c67
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 573564cca8
Original-Change-Id: Idc2ad265e8ed8cd7fd6d228cfbe4cbbcb9d3ebfc
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18866
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/456307
2017-03-18 12:00:57 -07:00
Rizwan Qureshi
0d05fafff5 UPSTREAM: google/poppy: Use rt5663 interrupt as GpioInt instead of PIRQ
The kernel driver for rt5663 expects to get an interrupt on both
a rising and falling edge, and using a legacy interrupt doesn't
provide that flexibility.

Instead configure this pin as a GPIO and use the interrupt through
the GPIO controller.  This allows using GpioInt() with ActiveBoth
setting and results in correct operation of the headset jack.

This is a clone of Duncan's patch for eve
at I6f181ec560fe9d34efc023ef6e78e33cb0b4c529

BUG=none
BRANCH=none
TEST=test on poppy that headset jack detect is read properly at
boot, and that plugging in and removing both generate a single
interrupt event in the driver.

Change-Id: I7df3aea83282ea453f24e9d3e61c2a68d5f40152
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 6a1503e9db
Original-Change-Id: I4aaa4164cb277a98ab5d5f033632f5e16bfb779e
Original-Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18853
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/456306
2017-03-17 11:06:53 -07:00
Duncan Laurie
a75c946295 UPSTREAM: google/eve: Use rt5663 interrupt as GpioInt instead of PIRQ
The kernel driver for rt5663 expects to get an interrupt on both
a rising and falling edge, and using a legacy interrupt doesn't
provide that flexibility.

Instead configure this pin as a GPIO and use the interrupt through
the GPIO controller.  This allows using GpioInt() with ActiveBoth
setting and results in correct operation of the headset jack.

BUG=b:35585307
BRANCH=none
TEST=test on Eve that headset jack detect is read properly at
boot, and that plugging in and removing both generate a single
interrupt event in the driver.

Change-Id: Idba470851244dcdabb6919b12c513b2597c81c16
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 887e7936f8
Original-Change-Id: I6f181ec560fe9d34efc023ef6e78e33cb0b4c529
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18836
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/456305
2017-03-17 11:06:52 -07:00
Duncan Laurie
329ca9695e UPSTREAM: i2c/generic: Add support for GPIO IRQ
Add support for using GPIO IRQ instead of PIRQ with an I2C device.

This allows a device to use an edge triggered interrupt that will
trigger on both high and low transitions.

The _DSD method for describing these GPIOs has a field for 'active
low' which is supposed to be 1 if the pin is active low, otherwise
is zero.  The value in here doesn't mean too much for GpioInt() as
those will end up using the value from GpioInt() when it actually
requests the interrupt.

BUG=b:35581264
BRANCH=none
TEST=test on Eve board that codec IRQ can be delcared as GPIO IRQ

Change-Id: Ic8366500fb869f2d0390aa08d94bdb58ed0133d5
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: b94e93531f
Original-Change-Id: I02c64c7fc28dc2d608ad40db889c7242892f16db
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18835
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/456304
2017-03-17 11:06:52 -07:00