Commit graph

7,880 commits

Author SHA1 Message Date
Ryan Lin
c3fc03bc2e coreboot: force 4-byte alignment for init structure with GCC 4.9
Force 4-byte alignment for .bs_init section to ensure that no padding
data is added to init structures.

BUG=chromium:416651
BRANCH=none
TEST=build firmware with GCC 4.9 and test on Auron and Rambi.

Change-Id: I3f94cd419b5951fdc6e5749576c4df2cc44f8a24
Signed-off-by: Ryan Lin <ryan.lin@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/223116
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Kenji Chen <kenji.chen@intel.com>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-10-14 23:59:10 +00:00
Duncan Laurie
55ed3bc880 broadwell: Change CPUID 306D4 to report "E0 or F0"
The F0 stepping has the same CPUID as E0 stepping so report
it as either stepping to avoid confusion.

BUG=chrome-os-partner:32359
BRANCH=samus,auron
TEST=build and boot on samus

Change-Id: Ia4955f346ceb9be92e06ecea5b7a8fe2db84cabc
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/223097
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-14 23:59:10 +00:00
Duncan Laurie
08413589ba samus: Add smbios_mainboard_version to define board version
Instead of having this in mosys just have coreboot report the
board version in SMBIOS tables.

BUG=chrome-os-partner:32359
BRANCH=samus
TEST=build and boot on samus, check /sys/class/dmi/id/product_version

Change-Id: Ib851d2e79ed721dcbc1c2f2eda6da50cac064cf3
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/223096
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-14 23:59:09 +00:00
Julius Werner
0ed3c0c2b6 cbfs: Enforce media->map() result checking, improve error messages
If you try to boot a VBOOT2_VERIFY_FIRMWARE with less than 4K CBFS cache
right now, your system will try and fail to validate the FMAP signature
at (u8 *)0xFFFFFFFF and go into recovery mode. This patch avoids the
memcmp() to potentially invalid memory, and also adds an error message
to cbfs_simple_buffer_map() to make it explicit that we ran out of CBFS
cache space.

BUG=None
TEST=Booted on Veyron_Pinky with reduced CBFS cache, saw the message.

Change-Id: Ic5773b4e0b36dc621513f58fc9bd29c17afbf1b7
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/222899
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-14 23:59:08 +00:00
Vadim Bendebury
b104d5c1c3 storm: fix CBFS definitions
It's been a while since SBL blob size was reduced. As CBFS area by
definition includes the bootblock, storm configuration needs to be
updated to address the changes in layout.

Incidentally, it looks like CBFS_SIZE configuration setting is not
used on ARM platforms, this will have to be addressed separately.

BRANCH=storm
BUG=chromium:422501
TEST=storm firmware does not report the failure to find payload anymore

Change-Id: I37abf76a9d8884b3431633f57f64896c3a5fb135
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/222898
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-14 23:59:08 +00:00
Vadim Bendebury
427261fbcf cbfs: fix debug mode compilation error
When cbfs debug is enabled, compilation fails because one of the debug
messages is using an non-existing variable.

BRANCH=nonr
BUG=None
TEST=compiling with CONFIG_DEBUG_CBFS enabled does not fail anymore.

Change-Id: Ic83f5e96cdcb5275ec0b7fadbc901e254a1002ca
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/222897
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-14 23:59:07 +00:00
Tom Warren
3f6a21afdb tegra132: Store ODMDATA from BCT into PMC scratch for use by kernel
In able to do earlyprintk spew on LP0 resume, the kernel needs to
know the board UART. ODMDATA (in bct/odmdata.cfg) contains this info,
and the kernel looks for it in PMC_SCRATCH20. Fetch the ODMDATA word
from the BCT copy stored in IRAM by the BootROM.

BUG=chrome-os-partner:32015
BRANCH=none
TEST=Built for Rush and Ryu OK. Dumped PMC_SCRATCH20 in TegraShell
on Rush and confirmed value is what's in odmdata.cfg.

Change-Id: I63f33558ee8b00bd6c1e313efcd531e1d5fc67eb
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/222402
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-14 23:59:06 +00:00
Julius Werner
7466ffc035 rk3288: Fix some PLL divisors and improve clock code
This patch does some general cleanup in the Rockchip clock code, and
adds some more assertions regarding the PLL VCO and output frequency
ranges. It changes all PLL divisors to use the lowest values that can
still hit the target frequency, since higher NR values lead to higher
jitter and higher NO values increase power draw.

Also change DDR3 frequency code to hardcode the optimal divisors for
certail frequencies. As a little hack we will interpret 666000000 to
actually mean 666666666.6P (and analogous for 533MHz), since that's what
you usually want for memory.

BUG=chrome-os-partner:32139
TEST=Boot on veyron_pinky rev2, check that dpll_is shown as 666666666 in
/sys/kernel/debug/clk/clk_summary.

Change-Id: I4f3c39641955a95c6dfbe9334035eb670b138bf0
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221801
2014-10-14 23:59:06 +00:00
David Hendricks
6a14f5ff8e rk3288: Re-write spi_xfer() to support full duplex
This change re-writes the spi_xfer() function to support full-duplex
transfers.

Even though the code looks much different, the same basic algorithm
for setting up the transfer is used. The main difference is that
reads from rxdr and writes to txdr occur simultaneously and accounting
is more complicated, so I separated the higher-level accounting
portion from the low-level FIFO handling portion to simplify things.

BUG=chrome-os-partner:31850
BRANCH=none
TEST=Loaded content from SPI ROM fine, needs testing w/ EC

Signed-off-by: David Hendricks <dhendrix@chromium.org>
Change-Id: I33d2f5179360baf94627c86b57d12f032897caf5
Reviewed-on: https://chromium-review.googlesource.com/218881
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-10-14 23:59:05 +00:00
Duncan Laurie
de6149508c broadwell: me: Fix typo and add missing phase state
Fix the typo of sate to state and add uKernel phase to just
output the current state byte.

BUG=chrome-os-partner:28234
BRANCH=samus,auron
TEST=build and boot on samus

Change-Id: I520a4cc75faffa5feeb6113ffd7b07a48c4e6f28
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/222677
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-10 11:39:33 +00:00
Duncan Laurie
f29c1b0b7c broadwell: Work around VBIOS framebuffer issue
The first 64 bytes of the framebuffer contain garbage after running
the option rom and after calling the VBE mode set with the flag to
clear the framebuffer.

Work around this issue by clearing the first 64 bytes in the framebuffer
in the broadwell graphics setup code after it executes the VBIOS.

BUG=chrome-os-partner:32771
BRANCH=samus,auron
TEST=build and boot on samus in dev mode, check for graphical corruption

Change-Id: I072bc913f7daea16e4861a7549e1b4ec85cde4cd
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/222676
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-10 11:39:25 +00:00
Kenji Chen
1717505a3f Broadwell: Synchronization with FRC for Root Port Power Management
BUG=chrome-os-partner:31424
TEST=Build a image and run on Samus proto boards to confirm if the
settings are applied correctly.
Signed-off-by: Kenji Chen <kenji.chen@intel.com>
Change-Id: I8138507506771148420a585fd12897a3bfe91916
Reviewed-on: https://chromium-review.googlesource.com/221387
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-10-10 11:39:03 +00:00
David Hendricks
56b3e8c02a pinky: Enable EC_SOFTWARE_SYNC
CQ-DEPEND=CL:218766
BUG=none
BRANCH=none
TEST=built and booted on Pinky

Signed-off-by: David Hendricks <dhendrix@chromium.org>
Change-Id: Icbee95350949bd9bfa4490a8a4b6bbf09beb4170
Reviewed-on: https://chromium-review.googlesource.com/221019
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-10-10 06:54:00 +00:00
Kenji Chen
b94c8c715f Broadwell: Select PCIE_L1_SUB_STATE and apply Broadwell settings.
BUG=chrome-os-partner:31424
TEST=Build an image and confirm the settings are correctly applied
to registers for PCIe L1 Sub-State feature enabling.
Signed-off-by: Kenji Chen <kenji.chen@intel.com>
Change-Id: I07ce6eea648b1b37d606f5529edad184e3de70ac
Reviewed-on: https://chromium-review.googlesource.com/222599
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-10-10 04:36:56 +00:00
Kenji Chen
6ac04ad7e2 PCIe: Add L1 Sub-State support.
Enable L1 Sub-State when both root port and endpoint support it.

BUG=chrome-os-partner:31424
TEST=Build a image and run on Samus proto boards to check if the
settings are applied correctly. I just only have proto boars and
need someone having EVT boards to confirm the settings.
Signed-off-by: Kenji Chen <kenji.chen@intel.com>
Change-Id: Id1b5a52ff0b896f4531c4a6e68e70a2cea8c736a
Reviewed-on: https://chromium-review.googlesource.com/221436
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-10-10 04:36:50 +00:00
Daisuke Nojiri
fd9dbcf102 cosmos: add template for soc and board files
This adds board and soc files as a template for cosmos.

BUG=chrome-os-partner:32772
BRANCH=none
TEST=Built coreboot for cosmos and veyron_pinky.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>

Change-Id: I676bdf460f5dd996dcce1fc422a69882798bc112
Reviewed-on: https://chromium-review.googlesource.com/222050
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
2014-10-09 20:44:46 +00:00
Kane Chen
f7dc2a0772 pearlvalley: enable M.2 socket power for wlan
according to schematic, GPIO29 needs to output high to enable M.2
socket power

BUG=none
BRANCH=none
TEST=build ok and see wifi device on M.2 socket working in OS

Change-Id: I7f122541a7bf3a5d7872f37a866ea3f1e52e8b47
Signed-off-by: Kane Chen <kane.chen@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/221927
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-10-09 16:42:30 +00:00
Daisuke Nojiri
1916da6712 vboot: add vbnv_flash as template
this adds a flash vbnv driver for vboot to store non-volatile data in a flash
storage.

BUG=chrome-os-partner:32774
BRANCH=none
TEST=Built samus, veyron pinky, and cosmos
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>

Change-Id: If5fc1b779722528134ad283fa030f150b3bab55f
Reviewed-on: https://chromium-review.googlesource.com/222258
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
2014-10-09 16:42:25 +00:00
Aaron Durbin
1ff8da9fed tegra132: remove framebuffer reservation
There's no need to reserve the framebuffer within corebot. If the
payloads need a framebuffer they can allocate one themselves.

BUG=chrome-os-partner:31355
BRANCH=None
TEST=Built and booted on ryu.

Change-Id: I8d8b159e7fdd877e392193c5474a7518e9b3ad21
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221726
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-09 16:42:21 +00:00
Furquan Shaikh
907ea2d1f8 arm64: Add verstage support
This stage is not tested on any hardware.

BUG=None
BRANCH=None
TEST=Compiles successfully for rush_ryu and veyron_pinky

Change-Id: I6dd266471c815895bb3dd53d34aacc8fe825eeb6
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/221911
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-08 09:30:54 +00:00
Furquan Shaikh
a843bb6773 verstage: Add proper guard conditions
BUG=None
BRANCH=None
TEST=Compiles successfully

Change-Id: I8494402144ad22a4e1c0652e3c94e59cd706bb16
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/221808
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-08 09:30:48 +00:00
Duncan Laurie
c3fbeac10f broadwell: Skip DDI-A enable in S3 resume
DDI-A should not need re-enabled in the resume path, just
the resume path when we did not execute VBIOS.

BUG=chrome-os-partner:28234
BRANCH=samus,auron
TEST=build and boot on samus, test suspend+resume

Change-Id: Iaf7d083c5c92c42b7a117e2d2c9546ada6bf5f76
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221988
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-08 07:14:59 +00:00
Duncan Laurie
481aba8341 broadwell: Update 306D4 to microcode 0x11
This is the latest available microcode.

BUG=chrome-os-partner:28234
BRANCH=samus,auron
TEST=build and boot on samus

Change-Id: I3fdc93d834a43c97cf6f404f0f465902781ad9e4
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221987
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-08 05:07:27 +00:00
Julius Werner
41bb802681 stddef: Add KHz, MHz and GHz constants
This patch adds some simple constants to more easily write and do math
with frequencies, analogous to the existing KiB, MiB and GiB constants
for sizes. They are exemplary added to the Veyron_Pinky/Rk3288 code for
now and will hopefully be adopted by other parts of the codebase in the
future.

BUG=None
TEST=Compiled Veyron_Pinky.

Change-Id: I4a1927fd423eb96d3f76f7e44b451192038b02e0
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221800
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-10-07 20:59:39 +00:00
Michael Spang
1182c46e39 Revert "arm64: Add verstage support"
This reverts commit 36960019dc.

Change-Id: Ie347622774bd9343face4890da2f65e8b29f4fb7
Reviewed-on: https://chromium-review.googlesource.com/221944
Reviewed-by: Michael Spang <spang@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
Tested-by: Michael Spang <spang@chromium.org>
2014-10-07 14:35:34 +00:00
Furquan Shaikh
14e3487213 rush: Add vboot2 support
CQ-DEPEND=CL:221601, CL:*178568
BUG=chrome-os-partner:32684
BRANCH=None
TEST=Compiles successfully

Change-Id: I50d0475dbe1390b640a726c259364f36abcbebe0
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/221579
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-07 03:37:59 +00:00
Furquan Shaikh
9f5a6ae8cb ryu: Add vboot2 support
CQ-DEPEND=CL:221598, CL:*178568
BUG=chrome-os-partner:32684
BRANCH=None
TEST=Compiles and boots to kernel prompt

Change-Id: If7c725333b45a92f951ab674c3e4bd6a51c180c2
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/221577
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-07 03:37:43 +00:00
Furquan Shaikh
8335915940 t132: Add vboot2 support
BUG=chrome-os-partner:32684
BRANCH=None
TEST=Compiles successfully and boots to kernel prompt using vboot2

Change-Id: Ibf7666d273e4d1af719c60d3f02bddcb4461f4bd
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/221576
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-07 03:37:25 +00:00
Furquan Shaikh
3d5b47e836 cbfs: Add macro CBFS_LOAD_ERROR for returning failure in case of cbfs_load_*
For all cbfs_load_* functions, use CBFS_LOAD_ERROR macro instead of (void *)-1

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

Change-Id: I85aa890866b91e38614bd0eb324e072104573006
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/221674
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-07 03:37:20 +00:00
Furquan Shaikh
49487e5af4 t132: Provide weak implementation of usb_setup_utmip in funitcfg.c
Provide a weak implemenation of usb_setup_utmip function for those stages that
do not include usb.c.

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

Change-Id: Ib235cf039a17204ef7e06d545a3c86b75aff5b4c
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/221575
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-07 03:37:16 +00:00
Furquan Shaikh
36960019dc arm64: Add verstage support
This stage is not tested on any hardware.

BUG=None
BRANCH=None
TEST=Compiles successfully

Change-Id: Ib0b0d18090d83559276f978b57bdf600c7267606
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/221323
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-07 03:37:09 +00:00
Duncan Laurie
716d26c82a broadwell: Fix building with USE=quiet-cb
This function needs to be available in different LOGLEVELs.

BUG=chrome-os-partner:28234
BRANCH=samus
TEST=USE=quiet-cb emerge-samus coreboot

Change-Id: Ia8f0d05af24c9070c8c9241a3a7e137f845d1cab
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221540
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-07 01:29:49 +00:00
Duncan Laurie
813c45bc3f samus: Add codec platform info in ACPI
This is the specific codec setup platform data for samus.

BUG=chrome-os-partner:29649
BRANCH=samus
TEST=emerge-samus coreboot

Change-Id: I5e2a8fad58bb8a3d02ccece0b1f6fe52f56c94ea
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221539
Reviewed-by: Ben Zhang <benzh@chromium.org>
2014-10-07 01:29:45 +00:00
Furquan Shaikh
ef2184e970 arm64: Select RELOCATABLE_MODULES by default for secmon
If secure monitor is used, rmodules support should be compiled in as well.

BUG=None
BRANCH=None
TEST=Compiles and boots to kernel prompt

Change-Id: Id1e33fd500d52cfa03a946bf7dd85e6a90f3360e
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/221574
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-07 01:29:41 +00:00
Furquan Shaikh
5e43dfe1aa armv4: Add verstage to armv4
BUG=None
BRANCH=None
TEST=Compiles successfully

Change-Id: I7735a2148da5330f220bd9a87b09e9fe3e37ffd1
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/221322
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-07 01:29:37 +00:00
Furquan Shaikh
4889cb73b0 armv7: Add config option guard for verstage class
Add files to verstage class depending upon value of
CONFIG_ARCH_VERSTAGE_ARM_V7.

BUG=None
BRANCH=None
TEST=Compiles successfully

Change-Id: I60fb8390abd9d378e38511d4f4ac323b43450232
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/221321
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-07 01:29:32 +00:00
Neil Chen
13d6accfdb nyan*: known-good drive for fast-train only
A higher drive setting is used for fast link training, once the
link training succeeds, a known-good drive setting will be used
for the main stream transactions.
For full link training sequence, the sink devices may ask for a
preferred drive setting, thus this drive setting should be used
for the main stream transactions too.

BUG=chrome-os-partner:32129
TEST=all panels on blaze/big devices work fine.

Change-Id: Icc540650dc1329af07fd9ee4661eb7fad435fde4
Signed-off-by: Neil Chen <neilc@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/219544
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-10-04 21:08:45 +00:00
Neil Chen
24966517d4 nyan*: add support of full link training
The original dp driver supports only fast link training and a
special drive setting is used for the link training sequence.
This might not be accepted by all panels. The better way is to
go through full link training sequence to negotiate for a best
drive setting.

With the change, dp driver will try fast link training first,
this is same as before. If it fails in fast link training, will
try full link training.

BUG=chrome-os-partner:32129
TEST=all panels on blaze/big devices work fine.

Change-Id: I6f3402c4c5993a156c965c7f52b011d336a2946f
Signed-off-by: Neil Chen <neilc@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/219543
Reviewed-by: Jimmy Zhang <jimmzhang@nvidia.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-10-04 21:08:38 +00:00
David Hendricks
f76cce3b38 rk3288: Replace SPI fifo_size with constant
rockchip_spi_slave has a fifo_size member which doesn't change.
This just replaces the struct member with a #define.

BUG=none
BRANCH=none
TEST=built and booted on Pinky

Signed-off-by: David Hendricks <dhendrix@chromium.org>
Change-Id: I9ea5cdad49ee10c5f32304d0909c4a7e74a261f9
Reviewed-on: https://chromium-review.googlesource.com/220471
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-10-04 05:12:50 +00:00
David Hendricks
de33d2ed63 rk3288: Pass SPI bus speed in as parameter to init function
This re-factors rockchip_spi to remove speed_hz which will instead be
passed in via rockchip_spi_init(), thus making it easier to support
other boards which may have different slave devices attached.

BUG=none
BRANCH=none
TEST=built and booted on Pinky

Signed-off-by: David Hendricks <dhendrix@chromium.org>
Change-Id: I7baf0fa0a2660e3c975847fdec3eb92bcd0d6c10
Reviewed-on: https://chromium-review.googlesource.com/220411
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-10-04 05:12:47 +00:00
David Hendricks
0a7dec2fe7 pinky: Move some init to mainboard bootblock
This patch moves init for I2C, SPI, ChromeOS GPIOs to the
board-specific bootblock init function on Pinky, the idea being
to isolate SoC code so that it's more readily adaptable for
different boards.

BUG=none
BRANCH=none
TEST=built and booted on Pinky

Signed-off-by: David Hendricks <dhendrix@chromium.org>
Change-Id: I75516bbd332915c1f61249844e18415b4e23c520
Reviewed-on: https://chromium-review.googlesource.com/220410
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-10-04 05:12:43 +00:00
David Hendricks
53bff629f2 rk3288/pinky: Move uart address to mainboard Kconfig
Since the UART which is used for the serial console may change from
board-to-board, this moves CONSOLE_SERIAL_UART_ADDRESS from rk3288's
Kconfig into Pinky's Kconfig.

BUG=none
BRANCH=none
TEST=built and booted on pinky

Signed-off-by: David Hendricks <dhendrix@chromium.org>
Change-Id: I29837a72d8cf205a144494a6c8ce350465118b34
Reviewed-on: https://chromium-review.googlesource.com/221438
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-10-04 05:12:37 +00:00
Julius Werner
6fc334d6b6 Makefile: Change $(generic-deps) to order-only prerequisite
Turns out making the compilation of every single source file depend on
the auto-generated build.h in CL:219170 wasn't really such a great idea
for incremental builds. Who would've thought.

However, it's still undesirable that individual Makefiles for sources
that actually include build.h need to add that dependency manually.
Therefore, this patch fixes the issue by using $(generic-deps) as an
order-only prerequisites in rules. This kind of prerequisite is still
made before the target if it doesn't exist, but it is not automatically
updated based on the timestamp. Also removed some additional manual
build.h dependencies that I must somehow overlooked in the old patch.

The files that actually include build.h still get it as a normal
prerequisite through the automatic dependency rule in <filename>.d that
is created by GCC's -MMD option. $(generic-deps) only solves the
chicken-and-egg problem of where build.h comes from in fresh/cleaned
build directories that don't have any .d dependency files yet.

BUG=chrome-os-partner:32622
TEST=Manually did an incremental build with a single changed file.
Confirmed that actual build.h dependencies (id.bootblock.o, console.*.o)
were still remade, but not all other coreboot sources.

Change-Id: I5a830aae6b17dd7d4061a577fd2410b678d6f1f0
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221470
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-04 03:10:51 +00:00
Vadim Bendebury
ab41713c70 mips: do not place branch instructions in branch delay slot
A branch instruction in a branch delay slot confuses the execution
pipeline and causes an exception.

bootblock.S was written 'by hand', has a branch instruction in branch
delay slot and includes '.set noreorder' directive, which causes it to
crash when trying to branch to main().

Adding a nop instruction fixes the problem. Also adding a nop after
the last branch in the file just in case main() returns and the object
linked next starts with a branch.

BUG=chrome-os-partner:31438
TEST=Running on the simulator can reach main() now

Change-Id: I0882b2eb5ce426f5a311018ffbb6f37a2ca64d98
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221421
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-03 22:26:55 +00:00
Julius Werner
f1e2028e7e New mechanism to define SRAM/memory map with automatic bounds checking
This patch creates a new mechanism to define the static memory layout
(primarily in SRAM) for a given board, superseding the brittle mass of
Kconfigs that we were using before. The core part is a memlayout.ld file
in the mainboard directory (although boards are expected to just include
the SoC default in most cases), which is the primary linker script for
all stages (though not rmodules for now). It uses preprocessor macros
from <memlayout.h> to form a different valid linker script for all
stages while looking like a declarative, boilerplate-free map of memory
addresses to the programmer. Linker asserts will automatically guarantee
that the defined regions cannot overlap. Stages are defined with a
maximum size that will be enforced by the linker. The file serves to
both define and document the memory layout, so that the documentation
cannot go missing or out of date.

The mechanism is implemented for all boards in the ARM, ARM64 and MIPS
architectures, and should be extended onto all systems using SRAM in the
future. The CAR/XIP environment on x86 has very different requirements
and the layout is generally not as static, so it will stay like it is
and be unaffected by this patch (save for aligning some symbol names for
consistency and sharing the new common ramstage linker script include).

BUG=None
TEST=Booted normally and in recovery mode, checked suspend/resume and
the CBMEM console on Falco, Blaze (both normal and vboot2), Pinky and
Pit. Compiled Ryu, Storm and Urara, manually compared the disassemblies
with ToT and looked for red flags.

Change-Id: I005506add4e8fcdb74db6d5e6cb2d4cb1bd3cda5
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/213370
2014-10-03 09:09:36 +00:00
Julius Werner
5b517fc46b arm: Prevent compilation of old, experimental SMP support
The ARM SMP feature was added a long time ago and has never really been
used by anyone since. We are still always compiling cpu_info() even
though we don't use it, and it makes some dangerous assumptions about
stack alignment that are not guaranteed anywhere.

I'm planning to change the way the stack boundaries are defined. Rather
than trying to work that into this unsafe, unused and hard to test
feature, I think we should just seal it off with police tape and make
sure that if anyone ever tries to use it again (which currently seems
unlikely), they get forced to do their due diligence on making sure it
works as intended.

BUG=None
TEST=Compiled Veyron_Pinky.

Change-Id: I8a60bd30e8b27a22bb3da68ca84daea99424dee9
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/219680
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-10-03 09:09:30 +00:00
Ben Zhang
e2c0ede19c samus: Assign GPIO2 to HP_AMP_SHDN_L
BUG=chrome-os-partner:29649
BRANCH=samus
TEST=Audio playback to headphone works

Change-Id: Ib51aace52026688dc8972047e5d934c80138ff80
Signed-off-by: Ben Zhang <benzh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221294
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-10-03 04:30:02 +00:00
Ben Zhang
348608fe61 samus: Make codec interrupt active high
The codec interrupt needs to be active high because multiple
interrupt sources share this line:

1) Headphone plug detect
2) Mic present
3) Hotword detect

These interrupt sources are OR-ed together.

BUG=chrome-os-partner:29649
BRANCH=samus
TEST=Jack detection works on samus

Change-Id: Ief0a291d9455f2d03789198153781ff8133aa1ce
Signed-off-by: Ben Zhang <benzh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/220588
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-10-03 04:29:58 +00:00
Kenji Chen
31d7276fbd Broadwell: Fix PCIe L1 Sub-State capability ID not filled.
BUG=chrome-os-partner:31424,chromeos-os-partner:32380
TEST=Build a BIOS image and check the value is applied correctly.
Signed-off-by: Kenji Chen <kenji.chen@intel.com>
Change-Id: I0adda3643776b259a635a021babd983090f1df43
Reviewed-on: https://chromium-review.googlesource.com/220475
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-10-02 23:18:31 +00:00
Ryan Lin
172c5fc259 Broadwell: Reg_Script: add END tag to array "smbus_init_script"
Need END tag, "REG_SCRIPT_END", to indicate the end of smbus_init_script.

BUG=chromium:416651
TEST=test on Auron.

Change-Id: I1f5624f4c6ce7f0e8ceb8971aaa595d99e9ff82e
Signed-off-by: Ryan Lin <ryan.lin@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/220934
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Kenji Chen <kenji.chen@intel.com>
2014-10-02 23:18:25 +00:00