Changeset 8e7c9fe in mainline for uspace/drv/audio/hdaudio/regif.c


Ignore:
Timestamp:
2014-09-12T03:45:25Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c53b58e
Parents:
3eb0c85 (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.
Message:

merge mainline changes

most usb changes were reverted. blink and usbmass were fixed
known problems:
ehci won't initialize
usbmast asserts on unmount (happens on mainline too)

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/drv/audio/hdaudio/regif.c

    r3eb0c85 r8e7c9fe  
    11/*
    2  * Copyright (c) 2009 Martin Decky
     2 * Copyright (c) 2014 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup mips64
     29/** @addtogroup hdaudio
    3030 * @{
    3131 */
    32 /** @file
     32/** @file High Definition Audio register interface
    3333 */
    3434
    35 #include <config.h>
    36 #include <smp/smp.h>
    37 #include <arch/arch.h>
     35#include <byteorder.h>
     36#include <ddi.h>
     37#include <stdint.h>
    3838
    39 #ifdef CONFIG_SMP
     39#include "regif.h"
    4040
    41 void smp_init(void)
     41uint8_t hda_reg8_read(uint8_t *r)
    4242{
    43         config.cpu_count = cpu_count;
     43        return pio_read_8(r);
    4444}
    4545
    46 void kmp(void *arg __attribute__((unused)))
     46uint16_t hda_reg16_read(uint16_t *r)
    4747{
     48        return uint16_t_le2host(pio_read_16(r));
    4849}
    4950
    50 #endif /* CONFIG_SMP */
     51uint32_t hda_reg32_read(uint32_t *r)
     52{
     53        return uint32_t_le2host(pio_read_32(r));
     54}
     55
     56void hda_reg8_write(uint8_t *r, uint8_t val)
     57{
     58        pio_write_8(r, val);
     59}
     60
     61void hda_reg16_write(uint16_t *r, uint16_t val)
     62{
     63        pio_write_16(r, host2uint16_t_le(val));
     64}
     65
     66void hda_reg32_write(uint32_t *r, uint32_t val)
     67{
     68        pio_write_32(r, host2uint32_t_le(val));
     69}
    5170
    5271/** @}
Note: See TracChangeset for help on using the changeset viewer.