mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
Added _insw_ns().
This commit is contained in:
parent
26d95c541e
commit
7519bbae3f
1 changed files with 10 additions and 0 deletions
|
@ -179,4 +179,14 @@ extern inline void out_be32(volatile unsigned *addr, int val)
|
|||
{
|
||||
__asm__ __volatile__("stw%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val));
|
||||
}
|
||||
|
||||
extern inline void _insw_ns(volatile u16 *port, void *buf, int ns)
|
||||
{
|
||||
u16 * b = (u16 *)buf;
|
||||
|
||||
while (ns > 0) {
|
||||
*b++ = readw(port);
|
||||
ns--;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue