Commit graph

10,268 commits

Author SHA1 Message Date
Furquan Shaikh
561e9c4ec2 arm64 libhelpers: Add helper functions for writing sp_elx
BUG=chrome-os-partner:30785
BRANCH=None
TEST=Compiles successfully

Change-Id: Ie950e893b01456c23af14304bd4dd8f61af9f244
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/216905
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-09-11 20:00:07 +00:00
Furquan Shaikh
11d90df1fd arm64 libhelpers: Add helper functions with el argument
Allow read/write to registers at a given el. Also, make read/write registers at
current el call this newly added function.

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

Change-Id: I17de4c4f3bc1ee804422efe5f4703b4dd65b51f2
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/216904
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-09-11 20:00:02 +00:00
Furquan Shaikh
fd43067047 rmodule: Align module_params to 8-byte
Required for arm64 platforms: rmodules used for arm64 require module_params and
rodata to be placed at 8-byte boundary in order to avoid unaligned access.

BUG=chrome-os-partner:30785
BRANCH=None
TEST=Compiles successfully and address verified during boot

Change-Id: I4820efad2b408ebd3930943f7771805a7bbb62e9
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/216374
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-09-11 19:59:58 +00:00
Furquan Shaikh
c11c7287f5 arm64: Add support for read and write registers at current EL in assembly
In order to ease the process of reading and writing any register at current EL,
provide read_current and write_current assembly macros. These are included in
arch/lib_helpers.h under the __ASSEMBLY__ macro condition. This is done to allow
the same header file to be included by .c and .S files.

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

Change-Id: I1258850438624abfe3b1ed7240df0db0e7905be6
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/216373
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Tom Warren <twarren@nvidia.com>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-09-11 19:59:53 +00:00
Kane Chen
82826e3c44 broadwell: pcie update from BWG/RC code
According to BIOS spec 8.14
B0:D28:F0[5:4] should be set to 11

BRANCH=none
BUG=chrome-os-partner:28234
TEST=build ok, boot to Auron and Samus
     make sure register is set and PCIE is working

Change-Id: I7c37245053ceae460dac0f18363f585244db72f8
Signed-off-by: Kane Chen <kane.chen@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/217414
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-09-10 14:02:06 +00:00
Tom Warren
13c30c50a9 t132: Fix broken rush build
Commit 27d5d6a3 (t132: Fix clock apis) broke the Rush build.
Rush needs SBC1 (for EC) and SDMMC3 (for SD-card) added to the
table/enum in clock.h. To make future T132 board ports easier,
all periphs should have an entry in this table/enum - I just
added the 2 needed to fix the Rush build in this change.

BUG=None
BRANCH=None
TEST=Built and booted all Tegra132 boards (Rush and Ryu)

Change-Id: I6659858c24e925aec9495bf64344c0000ad19b4c
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/217342
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-09-10 05:12:09 +00:00
Vadim Bendebury
6788962172 storm: deassert SW_RESET signal at startup
The proto0.2 hardware connects gpio26 (sw reset) to the ethernet
switch reset pit. The output stays low (or high-z) after power up,
which holds the switch in reset. Deassert the signal at startup on
hardware rev 1 and later.

BUG=chrome-os-partner:31780
TEST=with this patch applied, when proto0.2 boots, the ethernet
     switch's LED blink once, as was the case with proto0.

Change-Id: I81b3dccb1d1d43c5c1e6dcb5400af8eed6dee870
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/217087
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-09-10 03:28:06 +00:00
Duncan Laurie
6c4bf71c8c samus: Update SPD with correct geometry and timings
This memory is also x16 and needs slight tweak to tRFCmin
in order to be functional.

BUG=chrome-os-partner:31833
BRANCH=None
TEST=build and boot on EVT unit with this config

Change-Id: I01163ee7e70f08ccad84a3da39f1aac96e4c4771
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/217190
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2014-09-09 20:59:59 +00:00
Aaron Durbin
b7deb04a1d tegra132: update MTS version formatting
Nvidia tracks their MTS versions using decimals. Update
the format so there isn't an extra step in communicating
versions while debugging things.

BUG=chrome-os-partner:31864
BRANCH=None
TEST=Booted and confirmed decimal print out.

Change-Id: Ia7d0bc49318a4b4c969ee37e762e084ec65de543
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/217260
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-09 20:59:55 +00:00
Vadim Bendebury
080c839c1c storm: make sure board ID is calculated only once
Figuring out board_id on storm requires reading tertiary gpios, which
takes time. Let's calculate it once and reuse it when necessary.

BUG=none
TEST=verified board ID reported as 0 and 1 on proto0 and proto0.2
     respectively.

Change-Id: I4e237077d1d9a96daebba462cd00f3f40be14518
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/217086
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-09-09 13:49:48 +00:00
Aaron Durbin
7eab33b763 tegra132: remove bring_up_secondary_cpu chip option
Now that there is cpu devicetree support retire the
bring_up_secondary_cpu option as the devicetree is the
way going forward to do other CPU bring up.

BUG=chrome-os-partner:31761
BRANCH=None
TEST=Built and booted with 2nd core.

Change-Id: Ic213fbf56a1846e73462886f876a0a70e48b3158
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216929
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-08 23:08:53 +00:00
Aaron Durbin
c45b22ce9f ryu: remove bring_up_secondary_cpu from devicetree
Now that arm64 and tegra132 has cpu devicetree support stop
using the bring_up_secondary_cpu option.

BUG=chrome-os-partner:31761
BRANCH=None
TEST=Built and brought up 2nd core.

Change-Id: I210bea73f8249de15f99d0c062600e789184eefd
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216928
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-08 23:08:50 +00:00
David Hendricks
763db1f32d Fix copyright header in util/exynos/*.py
Since coreboot is a third-party project, we use standard copyright
headers instead of the ChromiumOS version which refers to a LICENSE
file we don't have.

BUG=none
BRANCH=none
TEST=none

Change-Id: I6caf0268ab0dd7d1734d4ee98c1321607d2bd66a
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216478
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-09-08 23:08:45 +00:00
Kane Chen
a9c6d6a765 Revert "auron: Fixed CBFS ERROR showed in bios serial log"
revert this change will cause auron show ERROR
CBFS: ERROR: No file header found at 0x7ff480
and need to add skip ERROR while running suspend_stress_test
But we need to support diff CPU sku, so I revert this change
This reverts commit 5e11145fb3.

BUG=none
TEST=build ok, boot to OS

Change-Id: I29da779f9e0d9a3a8bae46c49250c769a18d0c10
Signed-off-by: Kane Chen <kane.chen@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/216810
Reviewed-by: Wenkai Du <wenkai.du@intel.com>
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
2014-09-08 23:08:42 +00:00
Aaron Durbin
1356ec527e arm64: remove soc_secondary_cpu_init()
The original purpose of soc_secondary_cpu_init() was to provide
a way for the SoC to run code on the secondary processors as
they come up. Now that devicetree based bringup is supported
there's no need to have this functionality.

BUG=chrome-os-partner:31761
BRANCH=None
TEST=Booted SMP into linux.

Change-Id: Ie5c38ef33efadb2d6fdb2f892b4d08f33eee5c42
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216927
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-08 23:08:38 +00:00
Aaron Durbin
038daec1b7 tegra132: support arm64 SMP bringup
Use the formal devicetree way for bringing up each of
the cpus. This includes providing a cpu_driver as well
as calling arch_initialize_cpus() with the proper
operations to start the cores.

BUG=chrome-os-partner:31761
BRANCH=None
TEST=Booted SMP on ryu.

Change-Id: I13d8bfd645abf66f270d56d48eff4331c4ea1200
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216926
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-08 23:08:34 +00:00
Aaron Durbin
a733fd566a arm64: add devicetree based CPU startup
This adds SMP bring up support for arm64 cpus. It's
reliant on DEVICE_PATH_CPU devices in the devicetree.
Then for each enabled device it attempts to start then
initialize each CPU.  Additionally, there is a cpu_action
construct which allows for running actions on an individual
cpu.

BUG=chrome-os-partner:31761
BRANCH=None
TEST=Booted both cores on ryu into linux.

Change-Id: I407eabd0b6985fc4e86de57a9e034548ec8f3d81
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216925
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-08 23:08:30 +00:00
Aaron Durbin
5dcd488326 arm64: split cpu.h header
Add a cpu-internal.h for internal prototypes to the
architecture specific code.

BUG=chrome-os-partner:31761
BRANCH=None
TEST=Built and booted.

Change-Id: I8ab520478954a3b43e8e0831d1883f9a791850aa
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216924
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-08 23:08:27 +00:00
Aaron Durbin
14dab94610 arm64: add spinlock implementation
Provide a simple spinlock implentation for arm64. A value
of 0 is unlocked and a value of 1 is locked.

BUG=chrome-os-partner:31761
BRANCH=None
TEST=Built and ran SMP bringup on ryu.

Change-Id: I3bf2d80b91112d04442455ff0fa3f16900b7327f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216923
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-08 23:08:24 +00:00
Aaron Durbin
50079befdc arm64: move spinlock.h to proper place
The spinlock header file was not residing in the correct place.
It needs to live under 'arch/smp'.

BUG=chrome-os-partner:31761
BRANCH=None
TEST=Built with SMP. spinlock.h found.

Change-Id: I0e594cacfafcd6f30802c9563785ca09a2f7a2af
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216922
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-08 23:08:20 +00:00
Aaron Durbin
8fac8d46b0 arm64: add more barrier support
The load-acquire/store-release operations (including exclusive
variants) form a basis for atomic operations. Also remove
the dmb, dsb, and isb functions from lib_helpers as barrier.h
already included these. Lastly, utilize barrier.h.

BUG=chrome-os-partner:31761
BRANCH=None
TEST=Built and ran SMP bringup using barriers.

Change-Id: I77ff160c635297a2c7cab71cb0d3f49f2536f6ff
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216921
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-08 23:08:18 +00:00
Aaron Durbin
31c3f972ac arm64: remove printk() before console_init()
printk() shouldn't be called until the consoles have been
initialized. This just so happened to work by luck. Once
CONFIG_SMP is enabled that breaks because of spinlock
usage in uncached memory.

BUG=chrome-os-partner:31761
BRANCH=None
TEST=Built with CONFIG_SMP and ramstage doesn't hang early.

Change-Id: I6091b1e949e648b3435231946e5924260bf1807f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216920
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-08 23:08:15 +00:00
Aaron Durbin
6ec672e52e tegra132: remove printk() before console_init()
printk() shouldn't be called until the consoles have been
initialized. This just so happened to work by luck. Once
CONFIG_SMP is enabled that breaks because of spinlock
usage in uncached memory.

BUG=chrome-os-partner:31761
BRANCH=None
TEST=Built with CONFIG_SMP and ramstage doesn't hang early.

Change-Id: I247caac410894fb896dfb25a27c3a3213ef7f020
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216429
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-08 23:08:10 +00:00
Aaron Durbin
cdff53ebf4 arm64: update cpu.c license
The code should be GPL. Update accordingly.

BUG=chrome-os-partner:31761
BRANCH=None
TEST=None

Change-Id: I26a40a239afd851d351dbda0d716ef992b88b6c8
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216428
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-08 23:08:05 +00:00
Aaron Durbin
485de634a4 ryu: add cpus to device tree
Add all the CPUs to the device tree.

BUG=chrome-os-partner:31761
BRANCH=None
TEST=Brought up 2nd core on ryu in kernel.

Change-Id: I682f23a9b68f49206aa99d55e800540d8d0f8900
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216426
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-08 23:08:00 +00:00
Aaron Durbin
62669c5754 tegra132: fix compilation error
Two commits were inflight that affected one another. Fix the
build breakage.

BUG=None
BRANCH=None
TEST=Built.

Change-Id: I72a268fe1e1e06a6eaacf955320786180de3b070
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216890
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-09-08 23:07:55 +00:00
Aaron Durbin
c6f5fd1a11 sconfig: add cpu device type
In order to enumerate CPU devices that are non-x86 (read: no lapic)
provide a generic 'cpu' device.

Upstream patch: http://review.coreboot.org/#/c/6824/

BUG=chrome-os-partner:31761
BRANCH=None
TEST=Built a device tree with 'cpu' entries.

Change-Id: Ic3aa09970e5dd3d175048d698f74e2cce790dff0
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216424
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-06 13:10:45 +00:00
Bernie Thompson
d18e0e998a auron: add Atmel i2c touch screen to the ACPI resources
BUG=chrome-os-partner:31812
TEST=check if TS is found by the kernel

Change-Id: I22e6a9b65253bd17b639ce4d0742d1e7d3109e0c
Signed-off-by: Bernie Thompson <bhthompson@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216527
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
2014-09-06 09:28:41 +00:00
Furquan Shaikh
27d5d6a34d t132: Fix clock apis
Instead of directly using the clk_src_id based on enum for clock source, every
device needs to have its own set of clk source ids defined. This prevents from
accidentally selecting a wrong clk source if the ids are changed as for host1x.
Also, clk_src_id is separated from clk_src_freq_id. clk_src_id is the clk src id
represented in CLK_SOURCE_<dev> registers, whereas clk_src_freq_id is used for
handling the common clock sources based on id to get the proper frequency in
software.

BUG=chrome-os-partner:31821
BRANCH=None
TEST=Compiles successfully and boots to kernel prompt

Change-Id: I5c88bed62841ebd81665cf8ffd82b0d88255f927
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/216761
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-09-06 04:17:19 +00:00
Aaron Durbin
ad19ffe629 arm64: add midr_el1 accessor function
Provide access to the MIDR_EL1 register to obtain the
main id for determining CPU implementer and part/revision
information.

BUG=chrome-os-partner:31761
BRANCH=None
TEST=Built and printed the output of this function on ryu.

Change-Id: I8b8506ebff8e6f9d7c4f96d7ff7e21803972961e
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216423
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-05 23:09:15 +00:00
Aaron Durbin
14b51ea737 tegra132: fix host1x clock selection
The host1x clock selection register has a different encoding
than the major of other clock source registers. This results
in PLLM_OUT0 being selected when PLLP_OUT0 was requested.
Use the clock_configure_irregular_source() method to correct
this situation.

BUG=chrome-os-partner:31820
BRANCH=None
TEST=Noted proper clock selection was achieved.

Change-Id: Idc1ea88e2e1f2abc0c13e7aa1e8bdfa981da388e
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216422
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Tom Warren <twarren@nvidia.com>
2014-09-05 23:09:10 +00:00
Aaron Durbin
038bc1d530 ryu: remove call to soc_configure_i2c6pad()
This function is breaking display bring up in the kernel. While
this functionality may be needed it's not until there is a
necessity to beep and/or bring up the display in firmware.

BUG=chrome-os-partner:31820
BRANCH=None
TEST=Sean ran with this patch and the display indeed did come up.

Change-Id: I833d66a0e63e04118b130b6803a7a3b68c802148
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216421
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-05 19:54:42 +00:00
Kane Chen
4c72913ea0 auron: add i2c device in acpi for Cypress touch pad
CQ-DEPEND=CL:216362
BRANCH=none
BUG=chrome-os-partner:31494
TEST=build ok, and see touch pad working

Change-Id: I137c02720b45f0e0cc7248680406597de3ce6c8b
Signed-off-by: Kane Chen <kane.chen@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/216356
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
2014-09-04 22:01:33 +00:00
Kane Chen
5e11145fb3 auron: Fixed CBFS ERROR showed in bios serial log
The VBIOS DID and the id in config file are inconsistent.
Without this commint, you will need to skip error during
suspend stress test

BUG=chrome-os-partner:31286
BRANCH=none
TEST=build ok, check no ERROR exists in log

Change-Id: Ia73cb4cc4f4b0844a0692f6e760bcc089d64d09c
Signed-off-by: Kane Chen <kane.chen@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/216172
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
2014-09-04 22:01:27 +00:00
huang lin
39ffe53336 libpayload:support dwc2 usb driver
BUG=chrome-os-partner:29778
TEST=emerge-veyron libpayload

Change-Id: Idad1ad165fd44df635a0cb13bfec6fada1378bc8
Signed-off-by: huang lin <hl@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/211053
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-09-04 15:47:17 +00:00
Bernie Thompson
20330892f1 auron: add Elan i2c touch pad to the ACPI resources
BUG=chrome-os-partner:31494
TEST=emerge-auron coreboot chromeos-bootimage
Check that TP shows up.

Change-Id: I12f6e409b552d6f4760fd93d333838e5d73eb8a6
Signed-off-by: Bernie Thompson <bhthompson@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216281
2014-09-04 15:47:12 +00:00
Kane Chen
ff46aeaef4 auron: fixed i2c devices can't be detected in OS
set i2c controller to acpi mode

BUG=chrome-os-partner:31286
BRANCH=none
TEST=compile ok, see i2cdevices by i2cdetect

Change-Id: I021700fbaeb634984cfdf405006527f72e0fb404
Signed-off-by: Kane Chen <kane.chen@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/216215
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
2014-09-04 15:46:59 +00:00
huang lin
640da5ad55 coreboot: rk3288: update romstage & mainboard
BUG=chrome-os-partner:29778
TEST=Build coreboot

Change-Id: I805d93e94f73418099f47d235ca920a91b4b2bfb
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: huang lin <hl@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/209469
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: Julius Werner <jwerner@chromium.org>
2014-09-04 15:46:53 +00:00
Kane Chen
25a5a808d3 x86: fixed mainboard_suspend_resume will be called when it's not defined
There is no proto function for mainboard_suspend_resume
In this case mainboard_suspend_resume is not NULL,
and cause if statment true.
Bios will jump to an empty weak function,
if mainboard_suspend_resume is not defined in mainboard.c
Then system becomes panic during s3 resume

BUG=chrome-os-partner:31286
TEST=compile ok and make sure system can resume from s3
BRANCH=None

Change-Id: I76bdea1d96166e683c6284024e1befbfc0d64645
Signed-off-by: Kane Chen <kane.chen@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/215865
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Shawn Nematbakhsh <shawnn@chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
2014-09-04 01:47:36 +00:00
Tom Warren
0982459dbc ryu: Remove BootROM-driven LPDDR3 SDRAM init
Removing BOOTROM_SDRAM_INIT from Ryu's config
allows the code in sdram.c to handle LPDDR3 init
for all 3 SDRAM vendors now.

BUG=chrome-os-partner:29921
BUG=chrome-os-partner:31031
BUILD=None
TEST=Built for rush and rush_ryu, booted Ryu to kernel
login AOK (w/Samsung LPDDR3). Booted Rush to where it
tried to load in the Ryu kernel (need to create Rush
boot media). Micron and Hynix SDRAM boards need test
(none here in AZ).

Change-Id: Ieaa880f955e546e707230ba34e09594410c5fd8a
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/215864
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-09-03 19:32:34 +00:00
Tom Warren
a45e7788dd ryu: Add 4 LPDDR3 SDRAM BCTs
These are used by the LPDDR3 code in sdram.c.

Based on the schematic and email, I've filled in 4 slots
in sdram_configs.c. My A44 returns RAMCODE 0 (using only bits
1:0) for Samsung SDRAM. I haven't tested the other 2 types of
RAM (Hynix and Micron). The 4th slot is a fallback slow Micron
config.

BUG=chrome-os-partner:29921
BUG=chrome-os-partner:31031
BRANCH=None
TEST=Built for rush and rush_ryu.

Change-Id: Ib7e8b814eb6dadb9b366536721876a3eeba0d2c0
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/216000
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-09-03 19:32:29 +00:00
Tom Warren
aab1045817 ryu: Remove old/unused BCT cfg files
These are not needed/were never really used. SDRAM init will now
be done in sdram.c, not the BootROM.

BUG=chrome-os-partner:29921
BUG=chrome-os-partner:31031
BRANCH=None
TEST=Built rush_ryu AOK.

Change-Id: I7d25de3e888bb24e4c6e6dea2726510c97fe1730
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/215863
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-09-03 19:32:23 +00:00
Tom Warren
60e130c47c tegra132: Add LPDDR3 SDRAM init in coreboot.
Expanded sdram.c to add support for LPDDR3 init. This code can
be used with matching BCT .inc files to have LPDDR3 SDRAM
initialized by coreboot instead of the T132 BootROM.

BUG=chrome-os-partner:29921
BUG=chrome-os-partner:31031
BRANCH=None
TEST=Built for rush and rush_ryu.

Change-Id: I6bcffcd22d2e4f8da6d729b6757714657f3f6735
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/214753
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-09-03 19:32:14 +00:00
Vadim Bendebury
2818f52778 urara: add board configs
This allows to build coreboot for the mips based board called urara.

BUG=chrome-os-partner:31438
TEST=emerge-urara coreboot succeeds with the proper coreboot image
     created. No testing yet.

Change-Id: I420476802fb12e5d02f07998d6c01d8c38b7a83e
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214659
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-09-03 19:32:08 +00:00
Vadim Bendebury
1ca9efe59a urara: introduce board skeleton
Not much is happening yet, when the board is enabled (in the next
patch), all three components build successfully, the map files show
them placed where expected and the bopotblock is wrappeed in a BIMG
header.

BUG=chrome-os-partner:31438
TEST=when config is enabled, emerge-urara coreboot succeeds. more
    extensive testing to come later

Change-Id: I573cfb70f5c1e612dfa0a55d3d22d92f00584c66
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214600
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-09-03 04:47:44 +00:00
Vadim Bendebury
2c08977aaa danube: use SOC specific rom stage code
Romstage initialization code does not need to be board specific, keep
it in the SOC directory. Should there be a need for the board specific
code, it can be added later.

BUG=chrome-os-partner:31438
TEST=with upcoming patches, the urara board coreboot builds fine

Change-Id: I27e2d225bd36c42ccd29128d0ea9a970566c02af
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/215992
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-09-03 04:47:39 +00:00
Vadim Bendebury
69c655537c mips: no need in architecture specific implementation of do_printk
With the proper configuration flags enabled, do_printk is available
from src/console, no need to define it elsewhere.

BUG=chrome-os-partner:31438
TEST=with upcoming patches, the urara board coreboot builds fine

Change-Id: Ib1e3e5750cdc1adc509b4580a4f24d3ff3b105ee
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/215862
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-09-02 23:34:47 +00:00
Duncan Laurie
e32d7a7e54 chromeec: Clear post code before reboot to RO
When doing an EC requested reboot to RO mode clear the
saved post code in order to prevent confusing events in
the log where the system is rebooted intentionally.

BUG=chrome-os-partner:28234
BRANCH=none
TEST=build and boot on samus, run FAFT, check for odd
eventlog entries about last post code 0x31 when it is
rebooted during samus romstage entry point.

Change-Id: I8bedc611712424bf1044cdca1972e34ffdd51abd
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/215681
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-09-02 20:25:38 +00:00
Vadim Bendebury
94ec79b0ab danube: prepare SOC directory for urara
These modules are necessary to resolve external names when building
the board image. These are just skeletons for now which will be filled
later.

BUG=chrome-os-partner:31438
TEST=when config is enabled, emerge-urara coreboot succeeds. more
     extensive testing to come later

Change-Id: I69cc178976a910ebf8031ed9ac9ad67b4cc0878a
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/215678
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-09-01 11:06:57 +00:00
Vadim Bendebury
7f2f1d5164 Allow for different BFD elf formats per architecture
The upcoming MIPS toolchain inside chroot generates elf images of
elf32-tradlittlemips format, whereas readily available tools outside
of chroot generate images of elf32-littlemips format. Both of these
formats are perfectly fine, but xcompile accepts only one format per
CPU architecture.

This patch allows to specify multiple formats per architecture, any
matching format will suffice.

BUG=chrome-os-partner:31438
TEST=emerged arm, x86 and mips targets inside chroot

Change-Id: I22405e71ac72b985fad51e2f5d7cc014107b8a9e
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214599
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-09-01 11:06:54 +00:00