* Add a function needed by the ralink 2860 driver.
* Fix a compiler warning about missing braces. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39089 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
7965271acd
commit
fcde9e72e1
|
@ -145,6 +145,28 @@ void bus_space_write_4(bus_space_tag_t tag, bus_space_handle_t handle,
|
|||
bus_size_t offset, uint32_t value);
|
||||
|
||||
|
||||
static inline void
|
||||
bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
|
||||
bus_size_t offset, u_int8_t *addr, size_t count)
|
||||
{
|
||||
if (tag == I386_BUS_SPACE_IO) {
|
||||
int _port_ = bsh + offset;
|
||||
__asm __volatile(" \n\
|
||||
cld \n\
|
||||
1: inb %w2,%%al \n\
|
||||
stosb \n\
|
||||
incl %2 \n\
|
||||
loop 1b" :
|
||||
"=D" (addr), "=c" (count), "=d" (_port_):
|
||||
"0" (addr), "1" (count), "2" (_port_) :
|
||||
"%eax", "memory", "cc");
|
||||
} else {
|
||||
void* _port_ = (void*) (bsh + offset);
|
||||
memcpy(addr, _port_, count);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh,
|
||||
bus_size_t offset, u_int32_t *addr, size_t count)
|
||||
|
|
|
@ -197,7 +197,7 @@ extern const char* __haiku_firmware_name_map[][2];
|
|||
|
||||
#define NO_HAIKU_FIRMWARE_NAME_MAP() \
|
||||
const uint __haiku_firmware_parts_count = 0; \
|
||||
const char* __haiku_firmware_name_map[0][2] = {NULL}
|
||||
const char* __haiku_firmware_name_map[0][2] ={{NULL}}
|
||||
|
||||
|
||||
/* #pragma mark - synchronization */
|
||||
|
|
Loading…
Reference in New Issue