aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/mistral/romstage.c
diff options
context:
space:
mode:
authorNitheesh Sekar <nsekar@codeaurora.org>2019-03-27 13:14:02 +0530
committerPatrick Georgi <pgeorgi@google.com>2019-03-28 10:36:29 +0000
commit69cc491c3f49602efd302fe778ea65a7e87b1622 (patch)
tree43ccd218e70b25c04dff4973f0bffb783d5e6351 /src/mainboard/google/mistral/romstage.c
parentdd3cffdb0cfd687375c331af5ff680cddcd86b7a (diff)
Mistral: Enable USB in romstage
Enable USB support for mistral in romstage. TEST=build & run Change-Id: I5c2bbe16aa3601e014a2b77d192565402ed23794 Signed-off-by: Nitheesh Sekar <nsekar@codeaurora.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/32063 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/mainboard/google/mistral/romstage.c')
-rw-r--r--src/mainboard/google/mistral/romstage.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/mainboard/google/mistral/romstage.c b/src/mainboard/google/mistral/romstage.c
new file mode 100644
index 0000000000..41ee4edcbb
--- /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();
+}