/* mbed Microcontroller Library
 * Copyright (c) 2006-2013 ARM Limited
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#include "rda5981x_i2s.h"
#include "arch/rda5981/irq.h"

#define RDA_EXIF_INTST      (RDA_EXIF->MISCSTCFG)

static uint8_t is_exif_irq_set = 0;

static void rda_exif_isr(int irq, void *context, void *arg)
{
    uint32_t int_status = RDA_EXIF_INTST & 0xFFFF0000;
    if(int_status & 0x00FC0000) {
        rda_i2s_irq_handler(int_status);
    }
}

void rda_exif_irq_set(void)
{
    if(0 == is_exif_irq_set) {
        is_exif_irq_set = 1;
        irq_attach(RDA_IRQ_EXIF, (uint32_t)rda_exif_isr,(void*)0);
        up_enable_irq(RDA_IRQ_EXIF);
    }
}


Add RDA5981 exif logic for I2S module
Add RDA5981 exif logic for I2S module

Signed-off-by: Tianfu Huang <51883963465061bbce1ec7188dc31b693276da5b@samsung.com>
