2 <:copyright-BRCM:2019:DUAL/GPL:standard
4 Copyright (c) 2019 Broadcom
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License, version 2, as published by
9 the Free Software Foundation (the "GPL").
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
17 A copy of the GPL is available at http://www.broadcom.com/licenses/GPLv2.php, or by
18 writing to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.
25 * Created by <nschichan@freebox.fr> on Thu Apr 18 19:26:20 2019
42 static inline u64
readq(void *mem
)
44 return mmio_read_64((uintptr_t)mem
);
47 static inline u32
readl(void *mem
)
49 return mmio_read_32((uintptr_t)mem
);
52 static inline u16
readw(void *mem
)
54 return mmio_read_16((uintptr_t)mem
);
57 static inline u8
readb(void *mem
)
59 return mmio_read_8((uintptr_t)mem
);
62 static inline void writeq(u64 v
, void *mem
)
64 return mmio_write_64((uintptr_t)mem
, v
);
67 static inline void writel(u32 v
, void *mem
)
69 return mmio_write_32((uintptr_t)mem
, v
);
72 static inline void writew(u16 v
, void *mem
)
74 return mmio_write_16((uintptr_t)mem
, v
);
77 static inline void writeb(u8 v
, void *mem
)
79 return mmio_write_8((uintptr_t)mem
, v
);