Skip to content
Commit c5a62dcc authored by Andrew Boie's avatar Andrew Boie Committed by Benjamin Walsh
Browse files

nios2: implement asm_inline_gcc functions for sys_io.h



Nios II has no special instructions for testing bits, ffs, etc.
However, when poking memory-mapped peripherals, special *io variants
of ld and st instructions must be used to avoid issues with the
caches.

find_msb_set / find_lsb_set are implemented using universal GCC
compiler built-ins. It's not clear why this approach was not taken
on other arches.

The sys_in/sys_out/sys_io functions are completely removed as there
is no concept of these on Nios II.

sys_read/sys_write functions implemented using special GCC builtins
for the Nios II so that we don't have to use inline assembly.

Rest of the operations implemented in C, there is no requirement that
they be atomic.

Change-Id: Ic251fc7d7f342543dace4ccb3e429937b303215e
Signed-off-by: default avatarAndrew Boie <andrew.p.boie@intel.com>
parent a43a4ba2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment