Changeset 15d0046 in mainline for uspace/drv/audio/hdaudio/regif.c
- Timestamp:
- 2014-09-12T13:22:33Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9b20126
- Parents:
- 8db09e4 (diff), 105d8d6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/hdaudio/regif.c
r8db09e4 r15d0046 1 1 /* 2 * Copyright (c) 20 07 Martin Decky2 * Copyright (c) 2014 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup mips6429 /** @addtogroup hdaudio 30 30 * @{ 31 31 */ 32 /** @file 32 /** @file High Definition Audio register interface 33 33 */ 34 34 35 #include < typedefs.h>36 #include < smp/ipi.h>37 #include < arch/smp/dorder.h>35 #include <byteorder.h> 36 #include <ddi.h> 37 #include <stdint.h> 38 38 39 # define MSIM_DORDER_ADDRESS 0xffffffffb000010039 #include "regif.h" 40 40 41 #ifdef CONFIG_SMP 42 43 void ipi_broadcast_arch(int ipi) 41 uint8_t hda_reg8_read(uint8_t *r) 44 42 { 45 *((volatile uint32_t *) MSIM_DORDER_ADDRESS) = 0x7fffffff;43 return pio_read_8(r); 46 44 } 47 45 48 #endif 49 50 uint32_t dorder_cpuid(void) 46 uint16_t hda_reg16_read(uint16_t *r) 51 47 { 52 return *((volatile uint32_t *) MSIM_DORDER_ADDRESS);48 return uint16_t_le2host(pio_read_16(r)); 53 49 } 54 50 55 void dorder_ipi_ack(uint32_t mask)51 uint32_t hda_reg32_read(uint32_t *r) 56 52 { 57 *((volatile uint32_t *) (MSIM_DORDER_ADDRESS + 4)) = mask; 53 return uint32_t_le2host(pio_read_32(r)); 54 } 55 56 void hda_reg8_write(uint8_t *r, uint8_t val) 57 { 58 pio_write_8(r, val); 59 } 60 61 void hda_reg16_write(uint16_t *r, uint16_t val) 62 { 63 pio_write_16(r, host2uint16_t_le(val)); 64 } 65 66 void hda_reg32_write(uint32_t *r, uint32_t val) 67 { 68 pio_write_32(r, host2uint32_t_le(val)); 58 69 } 59 70
Note:
See TracChangeset
for help on using the changeset viewer.