summaryrefslogtreecommitdiff
path: root/code/fe310/eos/trap_entry.S
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2018-07-29 10:03:46 +0200
committerUros Majstorovic <majstor@majstor.org>2018-07-29 10:03:46 +0200
commita67f35abdb7ef55c062c26251b7354d9968d385b (patch)
tree35e82eeef30de66c2a87be6a138a19ec43c31e1a /code/fe310/eos/trap_entry.S
parent031e99994f495d584e3579cb3920dcc821d28ef1 (diff)
pin numbers fixed
Diffstat (limited to 'code/fe310/eos/trap_entry.S')
-rw-r--r--code/fe310/eos/trap_entry.S12
1 files changed, 8 insertions, 4 deletions
diff --git a/code/fe310/eos/trap_entry.S b/code/fe310/eos/trap_entry.S
index cda534e..82a553a 100644
--- a/code/fe310/eos/trap_entry.S
+++ b/code/fe310/eos/trap_entry.S
@@ -32,13 +32,17 @@
#define I2S_PWM_CTRL_ADDR_CK PWM0_CTRL_ADDR
#define I2S_PWM_CTRL_ADDR_WS PWM2_CTRL_ADDR
-#include "net_def.h"
-#include "spi_def.h"
+#define IOF_SPI1_SS0 2
+#define IOF_SPI1_SS1 8
+#define IOF_SPI1_SS2 9
+#define IOF_SPI1_SS3 10
#define INT_SPI1_BASE 6
#define INT_GPIO_BASE 8
-#define IOF_SPI1_SS2 9
+#include "net_def.h"
+#include "spi_def.h"
+
.section .data.entry
.align 2
@@ -642,7 +646,7 @@ spi_handler_cts:
2:
lw x8, GPIO_IOF_EN(x19)
li x9, 1
- slli x9, x9, IOF_SPI1_SS2
+ slli x9, x9, SPI_PIN_CS
not x9, x9
and x8, x8, x9
sw x8, GPIO_IOF_EN(x19)