Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31379
Change subject: libpayload: Draw time_t and suseconds_t into sys/types.h
......................................................................
libpayload: Draw time_t and suseconds_t into sys/types.h
These are not architecture specific and were the only reason to
include `arch/types.h` in `sys/types.h`.
Beware this may break payloads that assume non-standard definitions
in `sys/types.h`.
Change-Id: I00d513a4775b013221df98d3d96c096320663cdd
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M payloads/libpayload/include/arm/arch/types.h
M payloads/libpayload/include/arm64/arch/types.h
M payloads/libpayload/include/mips/arch/types.h
M payloads/libpayload/include/sys/types.h
M payloads/libpayload/include/x86/arch/types.h
5 files changed, 2 insertions(+), 13 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/79/31379/1
diff --git a/payloads/libpayload/include/arm/arch/types.h b/payloads/libpayload/include/arm/arch/types.h
index 1bd815b..641fb0a 100644
--- a/payloads/libpayload/include/arm/arch/types.h
+++ b/payloads/libpayload/include/arm/arch/types.h
@@ -50,9 +50,6 @@
typedef signed long long int64_t;
typedef signed long long s64;
-typedef long time_t;
-typedef long suseconds_t;
-
#ifndef NULL
#define NULL ((void *)0)
#endif
diff --git a/payloads/libpayload/include/arm64/arch/types.h b/payloads/libpayload/include/arm64/arch/types.h
index 1bd815b..641fb0a 100644
--- a/payloads/libpayload/include/arm64/arch/types.h
+++ b/payloads/libpayload/include/arm64/arch/types.h
@@ -50,9 +50,6 @@
typedef signed long long int64_t;
typedef signed long long s64;
-typedef long time_t;
-typedef long suseconds_t;
-
#ifndef NULL
#define NULL ((void *)0)
#endif
diff --git a/payloads/libpayload/include/mips/arch/types.h b/payloads/libpayload/include/mips/arch/types.h
index afa3a37..32537b8 100644
--- a/payloads/libpayload/include/mips/arch/types.h
+++ b/payloads/libpayload/include/mips/arch/types.h
@@ -62,9 +62,6 @@
typedef unsigned long phys_addr_t;
typedef unsigned long phys_size_t;
-typedef long time_t;
-typedef long suseconds_t;
-
#ifndef NULL
#define NULL ((void *)0)
#endif
diff --git a/payloads/libpayload/include/sys/types.h b/payloads/libpayload/include/sys/types.h
index 0ed4975..f7e0598 100644
--- a/payloads/libpayload/include/sys/types.h
+++ b/payloads/libpayload/include/sys/types.h
@@ -30,7 +30,8 @@
#ifndef _SYS_TYPES_H
#define _SYS_TYPES_H
-#include <arch/types.h>
+typedef long time_t;
+typedef long suseconds_t;
typedef signed long int off_t;
diff --git a/payloads/libpayload/include/x86/arch/types.h b/payloads/libpayload/include/x86/arch/types.h
index 1bd815b..641fb0a 100644
--- a/payloads/libpayload/include/x86/arch/types.h
+++ b/payloads/libpayload/include/x86/arch/types.h
@@ -50,9 +50,6 @@
typedef signed long long int64_t;
typedef signed long long s64;
-typedef long time_t;
-typedef long suseconds_t;
-
#ifndef NULL
#define NULL ((void *)0)
#endif
--
To view, visit https://review.coreboot.org/c/coreboot/+/31379
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I00d513a4775b013221df98d3d96c096320663cdd
Gerrit-Change-Number: 31379
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: newchange
nsekar(a)codeaurora.org has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32063
Change subject: Mistral: Enable USB in romstage
......................................................................
Mistral: Enable USB in romstage
Enable USB support for mistral in romstage.
TEST=build & run
Change-Id: I5c2bbe16aa3601e014a2b77d192565402ed23794
Signed-off-by: Nitheesh Sekar <nsekar(a)codeaurora.org>
---
M src/mainboard/google/mistral/Makefile.inc
M src/mainboard/google/mistral/mainboard.c
A src/mainboard/google/mistral/romstage.c
3 files changed, 48 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/32063/1
diff --git a/src/mainboard/google/mistral/Makefile.inc b/src/mainboard/google/mistral/Makefile.inc
index dfb0bbc..2cb9631 100644
--- a/src/mainboard/google/mistral/Makefile.inc
+++ b/src/mainboard/google/mistral/Makefile.inc
@@ -11,6 +11,7 @@
romstage-y += memlayout.ld
romstage-y += chromeos.c
romstage-y += reset.c
+romstage-y += romstage.c
ramstage-y += memlayout.ld
ramstage-y += chromeos.c
diff --git a/src/mainboard/google/mistral/mainboard.c b/src/mainboard/google/mistral/mainboard.c
index b45657f..1d62adb 100644
--- a/src/mainboard/google/mistral/mainboard.c
+++ b/src/mainboard/google/mistral/mainboard.c
@@ -17,6 +17,20 @@
#include <bootblock_common.h>
#include <timestamp.h>
#include <vendorcode/google/chromeos/chromeos.h>
+#include <soc/usb.h>
+
+static struct usb_board_data usb1_board_data = {
+ .parameter_override_x0 = 0x63,
+ .parameter_override_x1 = 0x03,
+ .parameter_override_x0 = 0x1d,
+ .parameter_override_x1 = 0x03,
+};
+
+static void setup_usb(void)
+{
+ /* Setting Secondary usb controller */
+ setup_usb_host(HSUSB_HS_PORT_1, &usb1_board_data);
+}
static void mainboard_init(struct device *dev)
{
@@ -24,6 +38,8 @@
/* Copy WIFI calibration data into CBMEM. */
cbmem_add_vpd_calibration_data();
}
+
+ setup_usb();
}
static void mainboard_enable(struct device *dev)
diff --git a/src/mainboard/google/mistral/romstage.c b/src/mainboard/google/mistral/romstage.c
new file mode 100644
index 0000000..41ee4ed
--- /dev/null
+++ b/src/mainboard/google/mistral/romstage.c
@@ -0,0 +1,31 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <arch/stages.h>
+#include <soc/usb.h>
+
+static void prepare_usb(void)
+{
+ /*
+ * Do DWC3 core and phy reset. Kick these resets off early
+ * so they get atleast 1msec to settle.
+ */
+ reset_usb(HSUSB_HS_PORT_1);
+}
+
+void platform_romstage_main(void)
+{
+ prepare_usb();
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/32063
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5c2bbe16aa3601e014a2b77d192565402ed23794
Gerrit-Change-Number: 32063
Gerrit-PatchSet: 1
Gerrit-Owner: nsekar(a)codeaurora.org
Gerrit-MessageType: newchange