Lines Matching +full:port +full:- +full:phys
1 /* SPDX-License-Identifier: GPL-2.0 */
15 #include <asm-generic/iomap.h>
22 * Virtual -> physical identity mapping starts at this offset
34 * register not being up-to-date with respect to the hardware
46 /* Re-read to make sure it was written. */ in __set_hae()
65 return (unsigned long)address - IDENT_ADDR; in virt_to_phys()
75 unsigned long phys = (unsigned long)address; in virt_to_phys() local
77 /* Sign-extend from bit 41. */ in virt_to_phys()
78 phys <<= (64 - 41); in virt_to_phys()
79 phys = (long)phys >> (64 - 41); in virt_to_phys()
82 phys &= (1ul << hwrpb->pa_bits) - 1; in virt_to_phys()
84 return phys; in virt_to_phys()
89 return (void *)(IDENT_ADDR + (address & ((1ul << 41) - 1))); in phys_to_virt()
104 * deprecated in favour of the DMA-mapping API.
111 unsigned long phys = virt_to_phys(address); in virt_to_bus() local
112 unsigned long bus = phys + __direct_map_base; in virt_to_bus()
113 return phys <= __direct_map_size ? bus : 0; in virt_to_bus()
124 address -= __direct_map_base; in bus_to_virt()
239 extern u8 inb(unsigned long port);
240 extern u16 inw(unsigned long port);
241 extern u32 inl(unsigned long port);
242 extern void outb(u8 b, unsigned long port);
243 extern void outw(u16 b, unsigned long port);
244 extern void outl(u32 b, unsigned long port);
265 * Mapping from port numbers to __iomem space is pretty easy.
269 <asm-generic/iomap.h>. It is not legal to mix "extern" and "static" for
271 extern inline void __iomem *ioport_map(unsigned long port, unsigned int size) in ioport_map() argument
273 return IO_CONCAT(__IO_PREFIX,ioportmap) (port); in ioport_map()
280 static inline void __iomem *ioremap(unsigned long port, unsigned long size) in ioremap() argument
282 return IO_CONCAT(__IO_PREFIX,ioremap) (port, size); in ioremap()
340 extern inline u8 inb(unsigned long port) in inb() argument
342 return ioread8(ioport_map(port, 1)); in inb()
345 extern inline u16 inw(unsigned long port) in inw() argument
347 return ioread16(ioport_map(port, 2)); in inw()
350 extern inline void outb(u8 b, unsigned long port) in outb() argument
352 iowrite8(b, ioport_map(port, 1)); in outb()
355 extern inline void outw(u16 b, unsigned long port) in outw() argument
357 iowrite16(b, ioport_map(port, 2)); in outw()
377 extern inline u32 inl(unsigned long port) in inl() argument
379 return ioread32(ioport_map(port, 4)); in inl()
382 extern inline void outl(u32 b, unsigned long port) in outl() argument
384 iowrite32(b, ioport_map(port, 4)); in outl()
563 extern void insb (unsigned long port, void *dst, unsigned long count);
564 extern void insw (unsigned long port, void *dst, unsigned long count);
565 extern void insl (unsigned long port, void *dst, unsigned long count);
566 extern void outsb (unsigned long port, const void *src, unsigned long count);
567 extern void outsw (unsigned long port, const void *src, unsigned long count);
568 extern void outsl (unsigned long port, const void *src, unsigned long count);
592 * to play with; for now just use cpp anti-recursion logics and make sure