summaryrefslogtreecommitdiff
path: root/src/cpu/samsung/exynos5250
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2013-08-12 18:04:06 -0700
committerIsaac Christensen <isaac.christensen@se-eng.com>2014-08-08 17:41:46 +0200
commit45d2ff317c0c077e6f83602a81bc915aa195d3f7 (patch)
treedb47cedcf89a2802c69c11079cba1c844dab9722 /src/cpu/samsung/exynos5250
parent782ac36cfac8be208f0d1221f6586375e1b8c574 (diff)
exynos5420: Implement support to boot with USB A-A firmware upload
This patch ports the USB A-A firmware upload functionality from exynos5250 over to exynos5420. Essentially just like a conflictless cherry-pick of 9e69421f5f0eebf88c09913dee90082feab2856c. It also fixes the exact same bug with SPI initialization for Pit and Kirby. Old-Change-Id: Ief0ed54c0beb2701e51201041f9bc426b2167747 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/65751 Reviewed-by: David Hendricks <dhendrix@chromium.org> (cherry picked from commit 5dff43f929478f83939221df13b961a69f89b132) exynos5: Fix trivial style nits A few curly braces on the wrong line. Old-Change-Id: I4ddac4476c6509dc1716e8c1915fbdb67d346786 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/66153 Reviewed-by: Ronald G. Minnich <rminnich@chromium.org> (cherry picked from commit 41e3fd9eaafe36433723f4e96a6d94c04e5fbafb) Squashed two related commits. Change-Id: I22d579693b5e7270aacb45bbe3557e40893dd1f8 Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com> Reviewed-on: http://review.coreboot.org/6500 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'src/cpu/samsung/exynos5250')
-rw-r--r--src/cpu/samsung/exynos5250/alternate_cbfs.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/cpu/samsung/exynos5250/alternate_cbfs.c b/src/cpu/samsung/exynos5250/alternate_cbfs.c
index 15494863f2..49c9d4c194 100644
--- a/src/cpu/samsung/exynos5250/alternate_cbfs.c
+++ b/src/cpu/samsung/exynos5250/alternate_cbfs.c
@@ -43,7 +43,8 @@
* rest of the firmware's lifetime and all subsequent stages (which will not
* have __PRE_RAM__ defined) can just directly reference it there.
*/
-static int usb_cbfs_open(struct cbfs_media *media) {
+static int usb_cbfs_open(struct cbfs_media *media)
+{
#ifdef __PRE_RAM__
static int first_run = 1;
int (*irom_load_usb)(void) = *irom_load_image_from_usb_ptr;
@@ -72,14 +73,16 @@ static int usb_cbfs_open(struct cbfs_media *media) {
static int alternate_cbfs_close(struct cbfs_media *media) { return 0; }
static size_t alternate_cbfs_read(struct cbfs_media *media, void *dest,
- size_t offset, size_t count) {
+ size_t offset, size_t count)
+{
ASSERT(offset + count < alternate_cbfs_size);
memcpy(dest, alternate_cbfs_buffer + offset, count);
return count;
}
static void *alternate_cbfs_map(struct cbfs_media *media, size_t offset,
- size_t count) {
+ size_t count)
+{
ASSERT(offset + count < alternate_cbfs_size);
return alternate_cbfs_buffer + offset;
}
@@ -87,7 +90,8 @@ static void *alternate_cbfs_map(struct cbfs_media *media, size_t offset,
static void *alternate_cbfs_unmap(struct cbfs_media *media,
const void *buffer) { return 0; }
-static int initialize_exynos_usb_cbfs_media(struct cbfs_media *media) {
+static int initialize_exynos_usb_cbfs_media(struct cbfs_media *media)
+{
printk(BIOS_DEBUG, "Using Exynos alternate boot mode USB A-A\n");
media->open = usb_cbfs_open;
@@ -99,7 +103,8 @@ static int initialize_exynos_usb_cbfs_media(struct cbfs_media *media) {
return 0;
}
-int init_default_cbfs_media(struct cbfs_media *media) {
+int init_default_cbfs_media(struct cbfs_media *media)
+{
if (*iram_secondary_base == SECONDARY_BASE_BOOT_USB)
return initialize_exynos_usb_cbfs_media(media);