diff options
author | Nathaniel Graff <nathaniel.graff@sifive.com> | 2019-03-07 21:32:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-07 21:32:31 +0000 |
commit | 84781219c87c0b9148e318f3e358ef7de03e251c (patch) | |
tree | 5adffe477189c81f1759446ad9efc7ea46f68702 /bsp/coreip-e20-arty | |
parent | 90ab2c8561eb532b382206c8bf3ec1af74f18257 (diff) | |
parent | 92d0f3e15ddfeb3d3a640d9bdd3471553e14ed7e (diff) |
Merge pull request #196 from sifive/update-metal
Update Metal with GPIO and Cache APIs
Diffstat (limited to 'bsp/coreip-e20-arty')
-rw-r--r-- | bsp/coreip-e20-arty/design.dts | 2 | ||||
-rw-r--r-- | bsp/coreip-e20-arty/metal.h | 7 | ||||
-rw-r--r-- | bsp/coreip-e20-arty/metal.lds | 2 |
3 files changed, 9 insertions, 2 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 |