Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9184
-gerrit
commit 140f72bbc53284f96e5ca8d9e69da25fde75df85
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Tue Oct 28 19:15:52 2014 -0700
pistachio: add gpio type definition
This is necessary to support generic gpio interface in src/lib. This
file will be later populated with more GPIO definitions.
BRANCH=none
BUG=chrome-os-partner:31438
TEST=none
Change-Id: I3fa93f1b3b1ce99d921bbfb378b3f7ae4eb652c2
Signed-off-by: Stefan Reinauer <reinauer(a)chromium.org>
Original-Commit-Id: 26f564ee10a770d57cb4af0a8ab5a264aaf1a7cd
Original-Change-Id: I68c9c3a28fcc747575436b502cb25b31afed8700
Original-Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/226181
Original-Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/soc/imgtec/pistachio/include/soc/gpio.h | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/src/soc/imgtec/pistachio/include/soc/gpio.h b/src/soc/imgtec/pistachio/include/soc/gpio.h
new file mode 100644
index 0000000..f6f1499
--- /dev/null
+++ b/src/soc/imgtec/pistachio/include/soc/gpio.h
@@ -0,0 +1,25 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __SOC_IMGTECH_PISTACHIO_GPIO_H__
+#define __SOC_IMGTECH_PISTACHIO_GPIO_H__
+
+typedef unsigned gpio_t;
+
+#endif // __SOC_IMGTECH_PISTACHIO_GPIO_H__
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9183
-gerrit
commit c863c96fc2f806a785d193b86e4492a6d1b6adb8
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Fri Oct 3 09:47:13 2014 -0700
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(a)chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221421
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/arch/mips/bootblock.S | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/arch/mips/bootblock.S b/src/arch/mips/bootblock.S
index dbde803..f369e00 100644
--- a/src/arch/mips/bootblock.S
+++ b/src/arch/mips/bootblock.S
@@ -39,6 +39,10 @@ _start:
/* Run main */
b main
- /* Should never return from main. */
-2:
+ /*
+ * Should never return from main. Make sure there is no branch in the
+ * branch delay slot.
+ */
+2: nop
b 2b
+ nop /* Make sure there is no branch after this either. */