Rev 4338 | Rev 4343 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4338 | Rev 4342 | ||
---|---|---|---|
Line 39... | Line 39... | ||
39 | #include <arch/types.h> |
39 | #include <arch/types.h> |
40 | #include <arch/register.h> |
40 | #include <arch/register.h> |
41 | 41 | ||
42 | #define IA64_IOSPACE_ADDRESS 0xE001000000000000ULL |
42 | #define IA64_IOSPACE_ADDRESS 0xE001000000000000ULL |
43 | 43 | ||
44 | static inline void outb(ioport_t port, uint8_t v) |
44 | static inline void outb(ioport_t port, uint8_t v) |
45 | { |
45 | { |
46 | *((uint8_t *)(IA64_IOSPACE_ADDRESS + |
46 | *((uint8_t *)(IA64_IOSPACE_ADDRESS + |
47 | ((port & 0xfff) | ((port >> 2) << 12)))) = v; |
47 | ((port & 0xfff) | ((port >> 2) << 12)))) = v; |
48 | 48 | ||
49 | asm volatile ("mf\n" ::: "memory"); |
49 | asm volatile ("mf\n" ::: "memory"); |
50 | } |
50 | } |
51 | 51 | ||
52 | static inline void outw(ioport_t port, uint16_t v) |
52 | static inline void outw(ioport_t port, uint16_t v) |
53 | { |
53 | { |
54 | *((uint16_t *)(IA64_IOSPACE_ADDRESS + |
54 | *((uint16_t *)(IA64_IOSPACE_ADDRESS + |
55 | ((port & 0xfff) | ((port >> 2) << 12)))) = v; |
55 | ((port & 0xfff) | ((port >> 2) << 12)))) = v; |
56 | 56 | ||
57 | asm volatile ("mf\n" ::: "memory"); |
57 | asm volatile ("mf\n" ::: "memory"); |
58 | } |
58 | } |
59 | 59 | ||
60 | static inline void outl(ioport_t port, uint32_t v) |
60 | static inline void outl(ioport_t port, uint32_t v) |
61 | { |
61 | { |
62 | *((uint32_t *)(IA64_IOSPACE_ADDRESS + |
62 | *((uint32_t *)(IA64_IOSPACE_ADDRESS + |
63 | ((port & 0xfff) | ((port >> 2) << 12)))) = v; |
63 | ((port & 0xfff) | ((port >> 2) << 12)))) = v; |
64 | 64 | ||
65 | asm volatile ("mf\n" ::: "memory"); |
65 | asm volatile ("mf\n" ::: "memory"); |