Skip to content

Commit

Permalink
[HACK] epiphany: rx: Use static remapping instead of RX mmu
Browse files Browse the repository at this point in the history
Use static remapping & disable MMU until this is fixed:
"Consecutive writes to rxmmu table results in system freeze"
aolofsson/oh#50

This prevents weird memory corruption that can otherwise happen with
faulty Epiphany programs.

Signed-off-by: Ola Jeppsson <[email protected]>
  • Loading branch information
olajep committed Mar 25, 2016
1 parent 2b49f39 commit 5d2b302
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/misc/epiphany.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,11 +723,23 @@ static int elink_reset(struct elink_device *elink)
txcfg.enable = 1;
reg_write(txcfg.reg, elink->regs, ELINK_TXCFG);


/* HACK: Use static remapping until this is fixed:
* "Consecutive writes to rxmmu table results in system freeze"
* https://github.com/parallella/oh/issues/50
*/
#if 0
rxcfg.mmu_enable = 1;
rxcfg.remap_mode = 0; /* no remapping, only mmu */
reg_write(rxcfg.reg, elink->regs, ELINK_RXCFG);

elink_update_mmu_mappings(elink);
#else
rxcfg.remap_mode = 1;
rxcfg.remap_sel = 0xfe0;
rxcfg.remap_pattern = 0x3e0;
reg_write(rxcfg.reg, elink->regs, ELINK_RXCFG);
#endif

ret = configure_adjacent_links(elink);

Expand Down

0 comments on commit 5d2b302

Please sign in to comment.