Skip to content

Commit

Permalink
boards: up_squared_adsp: Update mailbox terminal
Browse files Browse the repository at this point in the history
Update permissions for mmap.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
  • Loading branch information
finikorg committed Aug 5, 2020
1 parent c2ba411 commit 0944b46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions boards/xtensa/up_squared_adsp/tools/mbterm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# SPDX-License-Identifier: Apache-2.0

from time import sleep
from mmap import mmap
from mmap import mmap, ACCESS_COPY
from ctypes import c_uint8

from lib.device import Device
Expand All @@ -14,8 +14,8 @@
MBOX = 0x91281000
LENGTH = 0x1000

with open("/dev/mem", "r+b") as f:
mem_map = mmap(f.fileno(), LENGTH, offset=MBOX)
with open("/dev/mem", "rb") as f:
mem_map = mmap(f.fileno(), LENGTH, access=ACCESS_COPY, offset=MBOX)
mem = (c_uint8 * LENGTH).from_buffer(mem_map)

def mailbox_poll_mem(dev):
Expand Down

0 comments on commit 0944b46

Please sign in to comment.