summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathaniel Graff <nathaniel.graff@sifive.com>2019-03-07 21:32:31 +0000
committerGitHub <noreply@github.com>2019-03-07 21:32:31 +0000
commit84781219c87c0b9148e318f3e358ef7de03e251c (patch)
tree5adffe477189c81f1759446ad9efc7ea46f68702
parent90ab2c8561eb532b382206c8bf3ec1af74f18257 (diff)
parent92d0f3e15ddfeb3d3a640d9bdd3471553e14ed7e (diff)
Merge pull request #196 from sifive/update-metal
Update Metal with GPIO and Cache APIs
-rw-r--r--bsp/coreip-e20-arty/design.dts2
-rw-r--r--bsp/coreip-e20-arty/metal.h7
-rw-r--r--bsp/coreip-e20-arty/metal.lds2
-rw-r--r--bsp/coreip-e20/metal.h5
-rw-r--r--bsp/coreip-e21-arty/design.dts2
-rw-r--r--bsp/coreip-e21-arty/metal.h7
-rw-r--r--bsp/coreip-e21-arty/metal.lds2
-rw-r--r--bsp/coreip-e21/metal.h5
-rw-r--r--bsp/coreip-e24-arty/design.dts2
-rw-r--r--bsp/coreip-e24-arty/metal.h7
-rw-r--r--bsp/coreip-e24-arty/metal.lds2
-rw-r--r--bsp/coreip-e24/metal.h5
-rw-r--r--bsp/coreip-e31-arty/metal.h7
-rw-r--r--bsp/coreip-e31-arty/metal.lds2
-rw-r--r--bsp/coreip-e31/metal.h5
-rw-r--r--bsp/coreip-e34-arty/metal.h7
-rw-r--r--bsp/coreip-e34-arty/metal.lds2
-rw-r--r--bsp/coreip-e34/metal.h5
-rw-r--r--bsp/coreip-e76-arty/metal.h9
-rw-r--r--bsp/coreip-e76-arty/metal.lds2
-rw-r--r--bsp/coreip-e76/metal.h5
-rw-r--r--bsp/coreip-s51-arty/metal.h7
-rw-r--r--bsp/coreip-s51-arty/metal.lds2
-rw-r--r--bsp/coreip-s51/metal.h5
-rw-r--r--bsp/coreip-s54-arty/metal.h7
-rw-r--r--bsp/coreip-s54-arty/metal.lds2
-rw-r--r--bsp/coreip-s54/metal.h5
-rw-r--r--bsp/coreip-s76-arty/metal.h9
-rw-r--r--bsp/coreip-s76-arty/metal.lds2
-rw-r--r--bsp/coreip-s76/metal.h5
-rw-r--r--bsp/freedom-e310-arty/metal.h7
-rw-r--r--bsp/freedom-e310-arty/metal.lds2
-rw-r--r--bsp/sifive-hifive1-revb/metal.h7
-rw-r--r--bsp/sifive-hifive1/metal.h7
-rw-r--r--bsp/sifive-hifive1/metal.lds2
m---------freedom-metal0
36 files changed, 147 insertions, 14 deletions
diff --git a/bsp/coreip-e20-arty/design.dts b/bsp/coreip-e20-arty/design.dts
index 93e984e..b71170c 100644
--- a/bsp/coreip-e20-arty/design.dts
+++ b/bsp/coreip-e20-arty/design.dts
@@ -7,7 +7,7 @@
model = "SiFive,FE200G";
chosen {
stdout-path = "/soc/serial@20000000:115200";
- mee,entry = <&L6 0x400000>;
+ metal,entry = <&L6 0x400000>;
};
L15: aliases {
serial0 = &L5;
diff --git a/bsp/coreip-e20-arty/metal.h b/bsp/coreip-e20-arty/metal.h
index a301667..27baf68 100644
--- a/bsp/coreip-e20-arty/metal.h
+++ b/bsp/coreip-e20-arty/metal.h
@@ -239,6 +239,7 @@ struct __metal_driver_sifive_global_external_interrupts0 __metal_dt_global_exter
/* From gpio@20002000 */
struct __metal_driver_sifive_gpio0 __metal_dt_gpio_20002000 = {
.vtable = &__metal_driver_vtable_sifive_gpio0,
+ .gpio.vtable = &__metal_driver_vtable_sifive_gpio0.gpio,
.base = 536879104UL,
.size = 4096UL,
/* From interrupt_controller@2000000 */
@@ -464,6 +465,12 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_GLOBAL_EXTERNAL_INTERRUPTS_HANDLE (&__metal_dt_global_external_interrupts.irc)
+#define __MEE_DT_MAX_GPIOS 1
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ &__metal_dt_gpio_20002000};
+
#define __METAL_DT_MAX_BUTTONS 4
asm (".weak __metal_button_table");
diff --git a/bsp/coreip-e20-arty/metal.lds b/bsp/coreip-e20-arty/metal.lds
index ea41b72..4c81b1b 100644
--- a/bsp/coreip-e20-arty/metal.lds
+++ b/bsp/coreip-e20-arty/metal.lds
@@ -5,7 +5,7 @@ ENTRY(_enter)
MEMORY
{
ram (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 0x10000
- flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x20000000
+ flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x1fc00000
}
PHDRS
diff --git a/bsp/coreip-e20/metal.h b/bsp/coreip-e20/metal.h
index 5693e03..f2441c6 100644
--- a/bsp/coreip-e20/metal.h
+++ b/bsp/coreip-e20/metal.h
@@ -173,6 +173,11 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_LOCAL_EXTERNAL_INTERRUPTS_0_HANDLE (&__metal_dt_local_external_interrupts_0.irc)
+#define __MEE_DT_MAX_GPIOS 0
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ NULL };
#define __METAL_DT_MAX_BUTTONS 0
asm (".weak __metal_button_table");
diff --git a/bsp/coreip-e21-arty/design.dts b/bsp/coreip-e21-arty/design.dts
index be0c023..32ef5e8 100644
--- a/bsp/coreip-e21-arty/design.dts
+++ b/bsp/coreip-e21-arty/design.dts
@@ -7,7 +7,7 @@
model = "SiFive,FE210G";
chosen {
stdout-path = "/soc/serial@20000000:115200";
- mee,entry = <&L7 0x400000>;
+ metal,entry = <&L7 0x400000>;
};
L17: aliases {
serial0 = &L6;
diff --git a/bsp/coreip-e21-arty/metal.h b/bsp/coreip-e21-arty/metal.h
index 49b4c73..5a9459b 100644
--- a/bsp/coreip-e21-arty/metal.h
+++ b/bsp/coreip-e21-arty/metal.h
@@ -334,6 +334,7 @@ struct __metal_driver_sifive_global_external_interrupts0 __metal_dt_global_exter
/* From gpio@20002000 */
struct __metal_driver_sifive_gpio0 __metal_dt_gpio_20002000 = {
.vtable = &__metal_driver_vtable_sifive_gpio0,
+ .gpio.vtable = &__metal_driver_vtable_sifive_gpio0.gpio,
.base = 536879104UL,
.size = 4096UL,
/* From interrupt_controller@2000000 */
@@ -559,6 +560,12 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_GLOBAL_EXTERNAL_INTERRUPTS_HANDLE (&__metal_dt_global_external_interrupts.irc)
+#define __MEE_DT_MAX_GPIOS 1
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ &__metal_dt_gpio_20002000};
+
#define __METAL_DT_MAX_BUTTONS 4
asm (".weak __metal_button_table");
diff --git a/bsp/coreip-e21-arty/metal.lds b/bsp/coreip-e21-arty/metal.lds
index ea41b72..4c81b1b 100644
--- a/bsp/coreip-e21-arty/metal.lds
+++ b/bsp/coreip-e21-arty/metal.lds
@@ -5,7 +5,7 @@ ENTRY(_enter)
MEMORY
{
ram (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 0x10000
- flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x20000000
+ flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x1fc00000
}
PHDRS
diff --git a/bsp/coreip-e21/metal.h b/bsp/coreip-e21/metal.h
index 20efb49..b901bfb 100644
--- a/bsp/coreip-e21/metal.h
+++ b/bsp/coreip-e21/metal.h
@@ -279,6 +279,11 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_LOCAL_EXTERNAL_INTERRUPTS_0_HANDLE (&__metal_dt_local_external_interrupts_0.irc)
+#define __MEE_DT_MAX_GPIOS 0
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ NULL };
#define __METAL_DT_MAX_BUTTONS 0
asm (".weak __metal_button_table");
diff --git a/bsp/coreip-e24-arty/design.dts b/bsp/coreip-e24-arty/design.dts
index dd35d75..b636a82 100644
--- a/bsp/coreip-e24-arty/design.dts
+++ b/bsp/coreip-e24-arty/design.dts
@@ -7,7 +7,7 @@
model = "SiFive,FE240G";
chosen {
stdout-path = "/soc/serial@20000000:115200";
- mee,entry = <&L7 0x400000>;
+ metal,entry = <&L7 0x400000>;
};
L17: aliases {
serial0 = &L6;
diff --git a/bsp/coreip-e24-arty/metal.h b/bsp/coreip-e24-arty/metal.h
index f160783..129eeee 100644
--- a/bsp/coreip-e24-arty/metal.h
+++ b/bsp/coreip-e24-arty/metal.h
@@ -334,6 +334,7 @@ struct __metal_driver_sifive_global_external_interrupts0 __metal_dt_global_exter
/* From gpio@20002000 */
struct __metal_driver_sifive_gpio0 __metal_dt_gpio_20002000 = {
.vtable = &__metal_driver_vtable_sifive_gpio0,
+ .gpio.vtable = &__metal_driver_vtable_sifive_gpio0.gpio,
.base = 536879104UL,
.size = 4096UL,
/* From interrupt_controller@2000000 */
@@ -559,6 +560,12 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_GLOBAL_EXTERNAL_INTERRUPTS_HANDLE (&__metal_dt_global_external_interrupts.irc)
+#define __MEE_DT_MAX_GPIOS 1
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ &__metal_dt_gpio_20002000};
+
#define __METAL_DT_MAX_BUTTONS 4
asm (".weak __metal_button_table");
diff --git a/bsp/coreip-e24-arty/metal.lds b/bsp/coreip-e24-arty/metal.lds
index ea41b72..4c81b1b 100644
--- a/bsp/coreip-e24-arty/metal.lds
+++ b/bsp/coreip-e24-arty/metal.lds
@@ -5,7 +5,7 @@ ENTRY(_enter)
MEMORY
{
ram (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 0x10000
- flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x20000000
+ flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x1fc00000
}
PHDRS
diff --git a/bsp/coreip-e24/metal.h b/bsp/coreip-e24/metal.h
index 1d23799..23ed8d2 100644
--- a/bsp/coreip-e24/metal.h
+++ b/bsp/coreip-e24/metal.h
@@ -279,6 +279,11 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_LOCAL_EXTERNAL_INTERRUPTS_0_HANDLE (&__metal_dt_local_external_interrupts_0.irc)
+#define __MEE_DT_MAX_GPIOS 0
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ NULL };
#define __METAL_DT_MAX_BUTTONS 0
asm (".weak __metal_button_table");
diff --git a/bsp/coreip-e31-arty/metal.h b/bsp/coreip-e31-arty/metal.h
index 62dac06..9b087b9 100644
--- a/bsp/coreip-e31-arty/metal.h
+++ b/bsp/coreip-e31-arty/metal.h
@@ -244,6 +244,7 @@ struct __metal_driver_sifive_global_external_interrupts0 __metal_dt_global_exter
/* From gpio@20002000 */
struct __metal_driver_sifive_gpio0 __metal_dt_gpio_20002000 = {
.vtable = &__metal_driver_vtable_sifive_gpio0,
+ .gpio.vtable = &__metal_driver_vtable_sifive_gpio0.gpio,
.base = 536879104UL,
.size = 4096UL,
/* From interrupt_controller@c000000 */
@@ -477,6 +478,12 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_GLOBAL_EXTERNAL_INTERRUPTS_HANDLE (&__metal_dt_global_external_interrupts.irc)
+#define __MEE_DT_MAX_GPIOS 1
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ &__metal_dt_gpio_20002000};
+
#define __METAL_DT_MAX_BUTTONS 4
asm (".weak __metal_button_table");
diff --git a/bsp/coreip-e31-arty/metal.lds b/bsp/coreip-e31-arty/metal.lds
index 28a7849..ae57468 100644
--- a/bsp/coreip-e31-arty/metal.lds
+++ b/bsp/coreip-e31-arty/metal.lds
@@ -6,7 +6,7 @@ MEMORY
{
ram (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 0x10000
itim (wx!rai) : ORIGIN = 0x8000000, LENGTH = 0x4000
- flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x20000000
+ flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x1fc00000
}
PHDRS
diff --git a/bsp/coreip-e31/metal.h b/bsp/coreip-e31/metal.h
index d2c696b..d6b0a52 100644
--- a/bsp/coreip-e31/metal.h
+++ b/bsp/coreip-e31/metal.h
@@ -335,6 +335,11 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_GLOBAL_EXTERNAL_INTERRUPTS_HANDLE (&__metal_dt_global_external_interrupts.irc)
+#define __MEE_DT_MAX_GPIOS 0
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ NULL };
#define __METAL_DT_MAX_BUTTONS 0
asm (".weak __metal_button_table");
diff --git a/bsp/coreip-e34-arty/metal.h b/bsp/coreip-e34-arty/metal.h
index 768fd66..6de1b7c 100644
--- a/bsp/coreip-e34-arty/metal.h
+++ b/bsp/coreip-e34-arty/metal.h
@@ -244,6 +244,7 @@ struct __metal_driver_sifive_global_external_interrupts0 __metal_dt_global_exter
/* From gpio@20002000 */
struct __metal_driver_sifive_gpio0 __metal_dt_gpio_20002000 = {
.vtable = &__metal_driver_vtable_sifive_gpio0,
+ .gpio.vtable = &__metal_driver_vtable_sifive_gpio0.gpio,
.base = 536879104UL,
.size = 4096UL,
/* From interrupt_controller@c000000 */
@@ -477,6 +478,12 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_GLOBAL_EXTERNAL_INTERRUPTS_HANDLE (&__metal_dt_global_external_interrupts.irc)
+#define __MEE_DT_MAX_GPIOS 1
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ &__metal_dt_gpio_20002000};
+
#define __METAL_DT_MAX_BUTTONS 4
asm (".weak __metal_button_table");
diff --git a/bsp/coreip-e34-arty/metal.lds b/bsp/coreip-e34-arty/metal.lds
index 28a7849..ae57468 100644
--- a/bsp/coreip-e34-arty/metal.lds
+++ b/bsp/coreip-e34-arty/metal.lds
@@ -6,7 +6,7 @@ MEMORY
{
ram (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 0x10000
itim (wx!rai) : ORIGIN = 0x8000000, LENGTH = 0x4000
- flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x20000000
+ flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x1fc00000
}
PHDRS
diff --git a/bsp/coreip-e34/metal.h b/bsp/coreip-e34/metal.h
index dfccf6e..197e59d 100644
--- a/bsp/coreip-e34/metal.h
+++ b/bsp/coreip-e34/metal.h
@@ -335,6 +335,11 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_GLOBAL_EXTERNAL_INTERRUPTS_HANDLE (&__metal_dt_global_external_interrupts.irc)
+#define __MEE_DT_MAX_GPIOS 0
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ NULL };
#define __METAL_DT_MAX_BUTTONS 0
asm (".weak __metal_button_table");
diff --git a/bsp/coreip-e76-arty/metal.h b/bsp/coreip-e76-arty/metal.h
index 469dea8..b35bce6 100644
--- a/bsp/coreip-e76-arty/metal.h
+++ b/bsp/coreip-e76-arty/metal.h
@@ -209,6 +209,7 @@ struct __metal_driver_sifive_global_external_interrupts0 __metal_dt_global_exter
/* From gpio@10060000 */
struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10060000 = {
.vtable = &__metal_driver_vtable_sifive_gpio0,
+ .gpio.vtable = &__metal_driver_vtable_sifive_gpio0.gpio,
.base = 268828672UL,
.size = 4096UL,
/* From interrupt_controller@c000000 */
@@ -223,6 +224,7 @@ struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10060000 = {
/* From gpio@20002000 */
struct __metal_driver_sifive_gpio0 __metal_dt_gpio_20002000 = {
.vtable = &__metal_driver_vtable_sifive_gpio0,
+ .gpio.vtable = &__metal_driver_vtable_sifive_gpio0.gpio,
.base = 536879104UL,
.size = 4096UL,
/* From interrupt_controller@c000000 */
@@ -449,6 +451,13 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_GLOBAL_EXTERNAL_INTERRUPTS_HANDLE (&__metal_dt_global_external_interrupts.irc)
+#define __MEE_DT_MAX_GPIOS 2
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ &__metal_dt_gpio_10060000,
+ &__metal_dt_gpio_20002000};
+
#define __METAL_DT_MAX_BUTTONS 4
asm (".weak __metal_button_table");
diff --git a/bsp/coreip-e76-arty/metal.lds b/bsp/coreip-e76-arty/metal.lds
index 8a30906..3875c94 100644
--- a/bsp/coreip-e76-arty/metal.lds
+++ b/bsp/coreip-e76-arty/metal.lds
@@ -5,7 +5,7 @@ ENTRY(_enter)
MEMORY
{
ram (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 0x10000000
- flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x20000000
+ flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x1fc00000
}
PHDRS
diff --git a/bsp/coreip-e76/metal.h b/bsp/coreip-e76/metal.h
index 22f8073..99ffef7 100644
--- a/bsp/coreip-e76/metal.h
+++ b/bsp/coreip-e76/metal.h
@@ -286,6 +286,11 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_GLOBAL_EXTERNAL_INTERRUPTS_HANDLE (&__metal_dt_global_external_interrupts.irc)
+#define __MEE_DT_MAX_GPIOS 0
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ NULL };
#define __METAL_DT_MAX_BUTTONS 0
asm (".weak __metal_button_table");
diff --git a/bsp/coreip-s51-arty/metal.h b/bsp/coreip-s51-arty/metal.h
index 89f5d76..304f5b0 100644
--- a/bsp/coreip-s51-arty/metal.h
+++ b/bsp/coreip-s51-arty/metal.h
@@ -244,6 +244,7 @@ struct __metal_driver_sifive_global_external_interrupts0 __metal_dt_global_exter
/* From gpio@20002000 */
struct __metal_driver_sifive_gpio0 __metal_dt_gpio_20002000 = {
.vtable = &__metal_driver_vtable_sifive_gpio0,
+ .gpio.vtable = &__metal_driver_vtable_sifive_gpio0.gpio,
.base = 536879104UL,
.size = 4096UL,
/* From interrupt_controller@c000000 */
@@ -477,6 +478,12 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_GLOBAL_EXTERNAL_INTERRUPTS_HANDLE (&__metal_dt_global_external_interrupts.irc)
+#define __MEE_DT_MAX_GPIOS 1
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ &__metal_dt_gpio_20002000};
+
#define __METAL_DT_MAX_BUTTONS 4
asm (".weak __metal_button_table");
diff --git a/bsp/coreip-s51-arty/metal.lds b/bsp/coreip-s51-arty/metal.lds
index 28a7849..ae57468 100644
--- a/bsp/coreip-s51-arty/metal.lds
+++ b/bsp/coreip-s51-arty/metal.lds
@@ -6,7 +6,7 @@ MEMORY
{
ram (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 0x10000
itim (wx!rai) : ORIGIN = 0x8000000, LENGTH = 0x4000
- flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x20000000
+ flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x1fc00000
}
PHDRS
diff --git a/bsp/coreip-s51/metal.h b/bsp/coreip-s51/metal.h
index 62512f2..fb8ae89 100644
--- a/bsp/coreip-s51/metal.h
+++ b/bsp/coreip-s51/metal.h
@@ -335,6 +335,11 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_GLOBAL_EXTERNAL_INTERRUPTS_HANDLE (&__metal_dt_global_external_interrupts.irc)
+#define __MEE_DT_MAX_GPIOS 0
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ NULL };
#define __METAL_DT_MAX_BUTTONS 0
asm (".weak __metal_button_table");
diff --git a/bsp/coreip-s54-arty/metal.h b/bsp/coreip-s54-arty/metal.h
index 7381117..98b535b 100644
--- a/bsp/coreip-s54-arty/metal.h
+++ b/bsp/coreip-s54-arty/metal.h
@@ -244,6 +244,7 @@ struct __metal_driver_sifive_global_external_interrupts0 __metal_dt_global_exter
/* From gpio@20002000 */
struct __metal_driver_sifive_gpio0 __metal_dt_gpio_20002000 = {
.vtable = &__metal_driver_vtable_sifive_gpio0,
+ .gpio.vtable = &__metal_driver_vtable_sifive_gpio0.gpio,
.base = 536879104UL,
.size = 4096UL,
/* From interrupt_controller@c000000 */
@@ -477,6 +478,12 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_GLOBAL_EXTERNAL_INTERRUPTS_HANDLE (&__metal_dt_global_external_interrupts.irc)
+#define __MEE_DT_MAX_GPIOS 1
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ &__metal_dt_gpio_20002000};
+
#define __METAL_DT_MAX_BUTTONS 4
asm (".weak __metal_button_table");
diff --git a/bsp/coreip-s54-arty/metal.lds b/bsp/coreip-s54-arty/metal.lds
index 28a7849..ae57468 100644
--- a/bsp/coreip-s54-arty/metal.lds
+++ b/bsp/coreip-s54-arty/metal.lds
@@ -6,7 +6,7 @@ MEMORY
{
ram (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 0x10000
itim (wx!rai) : ORIGIN = 0x8000000, LENGTH = 0x4000
- flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x20000000
+ flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x1fc00000
}
PHDRS
diff --git a/bsp/coreip-s54/metal.h b/bsp/coreip-s54/metal.h
index 86db562..ece862b 100644
--- a/bsp/coreip-s54/metal.h
+++ b/bsp/coreip-s54/metal.h
@@ -335,6 +335,11 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_GLOBAL_EXTERNAL_INTERRUPTS_HANDLE (&__metal_dt_global_external_interrupts.irc)
+#define __MEE_DT_MAX_GPIOS 0
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ NULL };
#define __METAL_DT_MAX_BUTTONS 0
asm (".weak __metal_button_table");
diff --git a/bsp/coreip-s76-arty/metal.h b/bsp/coreip-s76-arty/metal.h
index aa261fc..eacfb1e 100644
--- a/bsp/coreip-s76-arty/metal.h
+++ b/bsp/coreip-s76-arty/metal.h
@@ -209,6 +209,7 @@ struct __metal_driver_sifive_global_external_interrupts0 __metal_dt_global_exter
/* From gpio@10060000 */
struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10060000 = {
.vtable = &__metal_driver_vtable_sifive_gpio0,
+ .gpio.vtable = &__metal_driver_vtable_sifive_gpio0.gpio,
.base = 268828672UL,
.size = 4096UL,
/* From interrupt_controller@c000000 */
@@ -223,6 +224,7 @@ struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10060000 = {
/* From gpio@20002000 */
struct __metal_driver_sifive_gpio0 __metal_dt_gpio_20002000 = {
.vtable = &__metal_driver_vtable_sifive_gpio0,
+ .gpio.vtable = &__metal_driver_vtable_sifive_gpio0.gpio,
.base = 536879104UL,
.size = 4096UL,
/* From interrupt_controller@c000000 */
@@ -449,6 +451,13 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_GLOBAL_EXTERNAL_INTERRUPTS_HANDLE (&__metal_dt_global_external_interrupts.irc)
+#define __MEE_DT_MAX_GPIOS 2
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ &__metal_dt_gpio_10060000,
+ &__metal_dt_gpio_20002000};
+
#define __METAL_DT_MAX_BUTTONS 4
asm (".weak __metal_button_table");
diff --git a/bsp/coreip-s76-arty/metal.lds b/bsp/coreip-s76-arty/metal.lds
index 8a30906..3875c94 100644
--- a/bsp/coreip-s76-arty/metal.lds
+++ b/bsp/coreip-s76-arty/metal.lds
@@ -5,7 +5,7 @@ ENTRY(_enter)
MEMORY
{
ram (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 0x10000000
- flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x20000000
+ flash (rxai!w) : ORIGIN = 0x40400000, LENGTH = 0x1fc00000
}
PHDRS
diff --git a/bsp/coreip-s76/metal.h b/bsp/coreip-s76/metal.h
index c4a874b..9a0623e 100644
--- a/bsp/coreip-s76/metal.h
+++ b/bsp/coreip-s76/metal.h
@@ -286,6 +286,11 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_GLOBAL_EXTERNAL_INTERRUPTS_HANDLE (&__metal_dt_global_external_interrupts.irc)
+#define __MEE_DT_MAX_GPIOS 0
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ NULL };
#define __METAL_DT_MAX_BUTTONS 0
asm (".weak __metal_button_table");
diff --git a/bsp/freedom-e310-arty/metal.h b/bsp/freedom-e310-arty/metal.h
index d0a59b0..f2086b5 100644
--- a/bsp/freedom-e310-arty/metal.h
+++ b/bsp/freedom-e310-arty/metal.h
@@ -163,6 +163,7 @@ struct __metal_driver_sifive_local_external_interrupts0 __metal_dt_local_externa
/* From gpio@10012000 */
struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10012000 = {
.vtable = &__metal_driver_vtable_sifive_gpio0,
+ .gpio.vtable = &__metal_driver_vtable_sifive_gpio0.gpio,
.base = 268509184UL,
.size = 4096UL,
/* From interrupt_controller@c000000 */
@@ -253,6 +254,12 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_LOCAL_EXTERNAL_INTERRUPTS_0_HANDLE (&__metal_dt_local_external_interrupts_0.irc)
+#define __MEE_DT_MAX_GPIOS 1
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ &__metal_dt_gpio_10012000};
+
#define __METAL_DT_MAX_BUTTONS 0
asm (".weak __metal_button_table");
diff --git a/bsp/freedom-e310-arty/metal.lds b/bsp/freedom-e310-arty/metal.lds
index c0556ee..1a1801b 100644
--- a/bsp/freedom-e310-arty/metal.lds
+++ b/bsp/freedom-e310-arty/metal.lds
@@ -6,7 +6,7 @@ MEMORY
{
ram (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 0x4000
itim (wx!rai) : ORIGIN = 0x8000000, LENGTH = 0x4000
- flash (rxai!w) : ORIGIN = 0x20400000, LENGTH = 0x20000000
+ flash (rxai!w) : ORIGIN = 0x20400000, LENGTH = 0x1fc00000
}
PHDRS
diff --git a/bsp/sifive-hifive1-revb/metal.h b/bsp/sifive-hifive1-revb/metal.h
index 4d74b17..8f8c976 100644
--- a/bsp/sifive-hifive1-revb/metal.h
+++ b/bsp/sifive-hifive1-revb/metal.h
@@ -213,6 +213,7 @@ struct __metal_driver_sifive_local_external_interrupts0 __metal_dt_local_externa
/* From gpio@10012000 */
struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10012000 = {
.vtable = &__metal_driver_vtable_sifive_gpio0,
+ .gpio.vtable = &__metal_driver_vtable_sifive_gpio0.gpio,
.base = 268509184UL,
.size = 4096UL,
/* From interrupt_controller@c000000 */
@@ -356,6 +357,12 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_LOCAL_EXTERNAL_INTERRUPTS_0_HANDLE (&__metal_dt_local_external_interrupts_0.irc)
+#define __MEE_DT_MAX_GPIOS 1
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ &__metal_dt_gpio_10012000};
+
#define __METAL_DT_MAX_BUTTONS 0
asm (".weak __metal_button_table");
diff --git a/bsp/sifive-hifive1/metal.h b/bsp/sifive-hifive1/metal.h
index 6fdbb23..0f30503 100644
--- a/bsp/sifive-hifive1/metal.h
+++ b/bsp/sifive-hifive1/metal.h
@@ -205,6 +205,7 @@ struct __metal_driver_sifive_local_external_interrupts0 __metal_dt_local_externa
/* From gpio@10012000 */
struct __metal_driver_sifive_gpio0 __metal_dt_gpio_10012000 = {
.vtable = &__metal_driver_vtable_sifive_gpio0,
+ .gpio.vtable = &__metal_driver_vtable_sifive_gpio0.gpio,
.base = 268509184UL,
.size = 4096UL,
/* From interrupt_controller@c000000 */
@@ -345,6 +346,12 @@ struct __metal_driver_cpu *__metal_cpu_table[] = {
#define __METAL_DT_LOCAL_EXTERNAL_INTERRUPTS_0_HANDLE (&__metal_dt_local_external_interrupts_0.irc)
+#define __MEE_DT_MAX_GPIOS 1
+
+asm (".weak __metal_gpio_table");
+struct __metal_driver_sifive_gpio0 *__metal_gpio_table[] = {
+ &__metal_dt_gpio_10012000};
+
#define __METAL_DT_MAX_BUTTONS 0
asm (".weak __metal_button_table");
diff --git a/bsp/sifive-hifive1/metal.lds b/bsp/sifive-hifive1/metal.lds
index fdd23c7..32455d8 100644
--- a/bsp/sifive-hifive1/metal.lds
+++ b/bsp/sifive-hifive1/metal.lds
@@ -5,7 +5,7 @@ ENTRY(_enter)
MEMORY
{
ram (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 0x4000
- flash (rxai!w) : ORIGIN = 0x20400000, LENGTH = 0x20000000
+ flash (rxai!w) : ORIGIN = 0x20400000, LENGTH = 0x1fc00000
}
PHDRS
diff --git a/freedom-metal b/freedom-metal
-Subproject a90ca0e2aef3a309db4e72cbfe0a9c3f146873c
+Subproject 0df9ba7a0ea30e989541cec8aa919372da0d8a2