2 * linux/sound/arm/aaci.c - ARM PrimeCell AACI PL041 driver
4 * Copyright (C) 2003 Deep Blue Solutions Ltd, All Rights Reserved.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * Documentation: ARM DDI 0173B
12 #include <linux/module.h>
13 #include <linux/delay.h>
14 #include <linux/init.h>
15 #include <linux/ioport.h>
16 #include <linux/device.h>
17 #include <linux/spinlock.h>
18 #include <linux/interrupt.h>
19 #include <linux/err.h>
23 #include <asm/sizes.h>
24 #include <asm/hardware/amba.h>
26 #include <sound/driver.h>
27 #include <sound/core.h>
28 #include <sound/initval.h>
29 #include <sound/ac97_codec.h>
30 #include <sound/pcm.h>
31 #include <sound/pcm_params.h>
36 #define DRIVER_NAME "aaci-pl041"
39 * PM support is not complete. Turn it off.
43 static void aaci_ac97_select_codec(struct aaci *aaci, ac97_t *ac97)
45 u32 v, maincr = aaci->maincr | MAINCR_SCRA(ac97->num);
48 * Ensure that the slot 1/2 RX registers are empty.
50 v = readl(aaci->base + AACI_SLFR);
52 readl(aaci->base + AACI_SL2RX);
54 readl(aaci->base + AACI_SL1RX);
56 writel(maincr, aaci->base + AACI_MAINCR);
61 * The recommended use of programming the external codec through slot 1
62 * and slot 2 data is to use the channels during setup routines and the
63 * slot register at any other time. The data written into slot 1, slot 2
64 * and slot 12 registers is transmitted only when their corresponding
65 * SI1TxEn, SI2TxEn and SI12TxEn bits are set in the AACI_MAINCR
68 static void aaci_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val)
70 struct aaci *aaci = ac97->private_data;
76 down(&aaci->ac97_sem);
78 aaci_ac97_select_codec(aaci, ac97);
81 * P54: You must ensure that AACI_SL2TX is always written
82 * to, if required, before data is written to AACI_SL1TX.
84 writel(val << 4, aaci->base + AACI_SL2TX);
85 writel(reg << 12, aaci->base + AACI_SL1TX);
88 * Wait for the transmission of both slots to complete.
91 v = readl(aaci->base + AACI_SLFR);
92 } while (v & (SLFR_1TXB|SLFR_2TXB));
98 * Read an AC'97 register.
100 static unsigned short aaci_ac97_read(ac97_t *ac97, unsigned short reg)
102 struct aaci *aaci = ac97->private_data;
108 down(&aaci->ac97_sem);
110 aaci_ac97_select_codec(aaci, ac97);
113 * Write the register address to slot 1.
115 writel((reg << 12) | (1 << 19), aaci->base + AACI_SL1TX);
118 * Wait for the transmission to complete.
121 v = readl(aaci->base + AACI_SLFR);
122 } while (v & SLFR_1TXB);
125 * Give the AC'97 codec more than enough time
126 * to respond. (42us = ~2 frames at 48kHz.)
131 * Wait for slot 2 to indicate data.
135 v = readl(aaci->base + AACI_SLFR) & (SLFR_1RXV|SLFR_2RXV);
136 } while (v != (SLFR_1RXV|SLFR_2RXV));
138 v = readl(aaci->base + AACI_SL1RX) >> 12;
140 v = readl(aaci->base + AACI_SL2RX) >> 4;
142 dev_err(&aaci->dev->dev,
143 "wrong ac97 register read back (%x != %x)\n",
152 static inline void aaci_chan_wait_ready(struct aaci_runtime *aacirun)
158 val = readl(aacirun->base + AACI_SR);
159 } while (val & (SR_TXB|SR_RXB) && timeout--);
167 static void aaci_fifo_irq(struct aaci *aaci, u32 mask)
169 if (mask & ISR_URINTR) {
170 writel(ICLR_TXUEC1, aaci->base + AACI_INTCLR);
173 if (mask & ISR_TXINTR) {
174 struct aaci_runtime *aacirun = &aaci->playback;
177 if (!aacirun->substream || !aacirun->start) {
178 dev_warn(&aaci->dev->dev, "TX interrupt???");
179 writel(0, aacirun->base + AACI_IE);
185 unsigned int len = aacirun->fifosz;
188 if (aacirun->bytes <= 0) {
189 aacirun->bytes += aacirun->period;
191 spin_unlock(&aaci->lock);
192 snd_pcm_period_elapsed(aacirun->substream);
193 spin_lock(&aaci->lock);
195 if (!(aacirun->cr & TXCR_TXEN))
198 val = readl(aacirun->base + AACI_SR);
199 if (!(val & SR_TXHE))
201 if (!(val & SR_TXFE))
204 aacirun->bytes -= len;
206 /* writing 16 bytes at a time */
207 for ( ; len > 0; len -= 16) {
209 "ldmia %0!, {r0, r1, r2, r3}\n\t"
210 "stmia %1, {r0, r1, r2, r3}"
212 : "r" (aacirun->fifo)
213 : "r0", "r1", "r2", "r3", "cc");
215 if (ptr >= aacirun->end)
216 ptr = aacirun->start;
224 static irqreturn_t aaci_irq(int irq, void *devid, struct pt_regs *regs)
226 struct aaci *aaci = devid;
230 spin_lock(&aaci->lock);
231 mask = readl(aaci->base + AACI_ALLINTS);
234 for (i = 0; i < 4; i++, m >>= 7) {
236 aaci_fifo_irq(aaci, m);
240 spin_unlock(&aaci->lock);
242 return mask ? IRQ_HANDLED : IRQ_NONE;
252 unsigned char codec_idx;
253 unsigned char rate_idx;
256 static struct aaci_stream aaci_streams[] = {
259 .rate_idx = AC97_RATES_FRONT_DAC,
261 [ACSTREAM_SURROUND] = {
263 .rate_idx = AC97_RATES_SURR_DAC,
267 .rate_idx = AC97_RATES_LFE_DAC,
271 static inline unsigned int aaci_rate_mask(struct aaci *aaci, int streamid)
273 struct aaci_stream *s = aaci_streams + streamid;
274 return aaci->ac97_bus->codec[s->codec_idx]->rates[s->rate_idx];
277 static unsigned int rate_list[] = {
278 5512, 8000, 11025, 16000, 22050, 32000, 44100,
279 48000, 64000, 88200, 96000, 176400, 192000
283 * Double-rate rule: we can support double rate iff channels == 2
287 aaci_rule_rate_by_channels(snd_pcm_hw_params_t *p, snd_pcm_hw_rule_t *rule)
289 struct aaci *aaci = rule->private;
290 unsigned int rate_mask = SNDRV_PCM_RATE_8000_48000|SNDRV_PCM_RATE_5512;
291 snd_interval_t *c = hw_param_interval(p, SNDRV_PCM_HW_PARAM_CHANNELS);
295 rate_mask &= aaci_rate_mask(aaci, ACSTREAM_LFE);
297 rate_mask &= aaci_rate_mask(aaci, ACSTREAM_SURROUND);
299 rate_mask &= aaci_rate_mask(aaci, ACSTREAM_FRONT);
302 return snd_interval_list(hw_param_interval(p, rule->var),
303 ARRAY_SIZE(rate_list), rate_list,
307 static snd_pcm_hardware_t aaci_hw_info = {
308 .info = SNDRV_PCM_INFO_MMAP |
309 SNDRV_PCM_INFO_MMAP_VALID |
310 SNDRV_PCM_INFO_INTERLEAVED |
311 SNDRV_PCM_INFO_BLOCK_TRANSFER |
312 SNDRV_PCM_INFO_RESUME,
315 * ALSA doesn't support 18-bit or 20-bit packed into 32-bit
316 * words. It also doesn't support 12-bit at all.
318 .formats = SNDRV_PCM_FMTBIT_S16_LE,
320 /* should this be continuous or knot? */
321 .rates = SNDRV_PCM_RATE_CONTINUOUS,
326 .buffer_bytes_max = 64 * 1024,
327 .period_bytes_min = 256,
328 .period_bytes_max = PAGE_SIZE,
330 .periods_max = PAGE_SIZE / 16,
333 static int aaci_pcm_open(struct aaci *aaci, snd_pcm_substream_t *substream,
334 struct aaci_runtime *aacirun)
336 snd_pcm_runtime_t *runtime = substream->runtime;
339 aacirun->substream = substream;
340 runtime->private_data = aacirun;
341 runtime->hw = aaci_hw_info;
344 * FIXME: ALSA specifies fifo_size in bytes. If we're in normal
345 * mode, each 32-bit word contains one sample. If we're in
346 * compact mode, each 32-bit word contains two samples, effectively
347 * halving the FIFO size. However, we don't know for sure which
348 * we'll be using at this point. We set this to the lower limit.
350 runtime->hw.fifo_size = aaci->fifosize * 2;
353 * Add rule describing hardware rate dependency
354 * on the number of channels.
356 ret = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
357 aaci_rule_rate_by_channels, aaci,
358 SNDRV_PCM_HW_PARAM_CHANNELS,
359 SNDRV_PCM_HW_PARAM_RATE, -1);
363 ret = request_irq(aaci->dev->irq[0], aaci_irq, SA_SHIRQ|SA_INTERRUPT,
378 static int aaci_pcm_close(snd_pcm_substream_t *substream)
380 struct aaci *aaci = substream->private_data;
381 struct aaci_runtime *aacirun = substream->runtime->private_data;
383 WARN_ON(aacirun->cr & TXCR_TXEN);
385 aacirun->substream = NULL;
386 free_irq(aaci->dev->irq[0], aaci);
391 static int aaci_pcm_hw_free(snd_pcm_substream_t *substream)
393 struct aaci_runtime *aacirun = substream->runtime->private_data;
396 * This must not be called with the device enabled.
398 WARN_ON(aacirun->cr & TXCR_TXEN);
400 if (aacirun->pcm_open)
401 snd_ac97_pcm_close(aacirun->pcm);
402 aacirun->pcm_open = 0;
405 * Clear out the DMA and any allocated buffers.
407 devdma_hw_free(NULL, substream);
412 static int aaci_pcm_hw_params(snd_pcm_substream_t *substream,
413 struct aaci_runtime *aacirun,
414 snd_pcm_hw_params_t *params)
418 aaci_pcm_hw_free(substream);
420 err = devdma_hw_alloc(NULL, substream,
421 params_buffer_bytes(params));
425 err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params),
426 params_channels(params),
427 aacirun->pcm->r[0].slots);
431 aacirun->pcm_open = 1;
437 static int aaci_pcm_prepare(snd_pcm_substream_t *substream)
439 snd_pcm_runtime_t *runtime = substream->runtime;
440 struct aaci_runtime *aacirun = runtime->private_data;
442 aacirun->start = (void *)runtime->dma_area;
443 aacirun->end = aacirun->start + runtime->dma_bytes;
444 aacirun->ptr = aacirun->start;
446 aacirun->bytes = frames_to_bytes(runtime, runtime->period_size);
451 static snd_pcm_uframes_t aaci_pcm_pointer(snd_pcm_substream_t *substream)
453 snd_pcm_runtime_t *runtime = substream->runtime;
454 struct aaci_runtime *aacirun = runtime->private_data;
455 ssize_t bytes = aacirun->ptr - aacirun->start;
457 return bytes_to_frames(runtime, bytes);
460 static int aaci_pcm_mmap(snd_pcm_substream_t *substream, struct vm_area_struct *vma)
462 return devdma_mmap(NULL, substream, vma);
467 * Playback specific ALSA stuff
469 static const u32 channels_to_txmask[] = {
470 [2] = TXCR_TX3 | TXCR_TX4,
471 [4] = TXCR_TX3 | TXCR_TX4 | TXCR_TX7 | TXCR_TX8,
472 [6] = TXCR_TX3 | TXCR_TX4 | TXCR_TX7 | TXCR_TX8 | TXCR_TX6 | TXCR_TX9,
476 * We can support two and four channel audio. Unfortunately
477 * six channel audio requires a non-standard channel ordering:
479 * 4 -> FL(3), FR(4), SL(7), SR(8)
480 * 6 -> FL(3), FR(4), SL(7), SR(8), C(6), LFE(9) (required)
481 * FL(3), FR(4), C(6), SL(7), SR(8), LFE(9) (actual)
482 * This requires an ALSA configuration file to correct.
484 static unsigned int channel_list[] = { 2, 4, 6 };
487 aaci_rule_channels(snd_pcm_hw_params_t *p, snd_pcm_hw_rule_t *rule)
489 struct aaci *aaci = rule->private;
490 unsigned int chan_mask = 1 << 0, slots;
493 * pcms[0] is the our 5.1 PCM instance.
495 slots = aaci->ac97_bus->pcms[0].r[0].slots;
496 if (slots & (1 << AC97_SLOT_PCM_SLEFT)) {
498 if (slots & (1 << AC97_SLOT_LFE))
502 return snd_interval_list(hw_param_interval(p, rule->var),
503 ARRAY_SIZE(channel_list), channel_list,
507 static int aaci_pcm_playback_open(snd_pcm_substream_t *substream)
509 struct aaci *aaci = substream->private_data;
513 * Add rule describing channel dependency.
515 ret = snd_pcm_hw_rule_add(substream->runtime, 0,
516 SNDRV_PCM_HW_PARAM_CHANNELS,
517 aaci_rule_channels, aaci,
518 SNDRV_PCM_HW_PARAM_CHANNELS, -1);
522 return aaci_pcm_open(aaci, substream, &aaci->playback);
525 static int aaci_pcm_playback_hw_params(snd_pcm_substream_t *substream,
526 snd_pcm_hw_params_t *params)
528 struct aaci *aaci = substream->private_data;
529 struct aaci_runtime *aacirun = substream->runtime->private_data;
530 unsigned int channels = params_channels(params);
533 WARN_ON(channels >= ARRAY_SIZE(channels_to_txmask) ||
534 !channels_to_txmask[channels]);
536 ret = aaci_pcm_hw_params(substream, aacirun, params);
539 * Enable FIFO, compact mode, 16 bits per sample.
540 * FIXME: double rate slots?
543 aacirun->cr = TXCR_FEN | TXCR_COMPACT | TXCR_TSZ16;
544 aacirun->cr |= channels_to_txmask[channels];
546 aacirun->fifosz = aaci->fifosize * 4;
547 if (aacirun->cr & TXCR_COMPACT)
548 aacirun->fifosz >>= 1;
553 static void aaci_pcm_playback_stop(struct aaci_runtime *aacirun)
557 ie = readl(aacirun->base + AACI_IE);
558 ie &= ~(IE_URIE|IE_TXIE);
559 writel(ie, aacirun->base + AACI_IE);
560 aacirun->cr &= ~TXCR_TXEN;
561 aaci_chan_wait_ready(aacirun);
562 writel(aacirun->cr, aacirun->base + AACI_TXCR);
565 static void aaci_pcm_playback_start(struct aaci_runtime *aacirun)
569 aaci_chan_wait_ready(aacirun);
570 aacirun->cr |= TXCR_TXEN;
572 ie = readl(aacirun->base + AACI_IE);
573 ie |= IE_URIE | IE_TXIE;
574 writel(ie, aacirun->base + AACI_IE);
575 writel(aacirun->cr, aacirun->base + AACI_TXCR);
578 static int aaci_pcm_playback_trigger(snd_pcm_substream_t *substream, int cmd)
580 struct aaci *aaci = substream->private_data;
581 struct aaci_runtime *aacirun = substream->runtime->private_data;
585 spin_lock_irqsave(&aaci->lock, flags);
587 case SNDRV_PCM_TRIGGER_START:
588 aaci_pcm_playback_start(aacirun);
591 case SNDRV_PCM_TRIGGER_RESUME:
592 aaci_pcm_playback_start(aacirun);
595 case SNDRV_PCM_TRIGGER_STOP:
596 aaci_pcm_playback_stop(aacirun);
599 case SNDRV_PCM_TRIGGER_SUSPEND:
600 aaci_pcm_playback_stop(aacirun);
603 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
606 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
612 spin_unlock_irqrestore(&aaci->lock, flags);
617 static snd_pcm_ops_t aaci_playback_ops = {
618 .open = aaci_pcm_playback_open,
619 .close = aaci_pcm_close,
620 .ioctl = snd_pcm_lib_ioctl,
621 .hw_params = aaci_pcm_playback_hw_params,
622 .hw_free = aaci_pcm_hw_free,
623 .prepare = aaci_pcm_prepare,
624 .trigger = aaci_pcm_playback_trigger,
625 .pointer = aaci_pcm_pointer,
626 .mmap = aaci_pcm_mmap,
635 static int aaci_do_suspend(snd_card_t *card, unsigned int state)
637 struct aaci *aaci = card->private_data;
638 if (aaci->card->power_state != SNDRV_CTL_POWER_D3cold) {
639 snd_pcm_suspend_all(aaci->pcm);
640 snd_power_change_state(aaci->card, SNDRV_CTL_POWER_D3cold);
645 static int aaci_do_resume(snd_card_t *card, unsigned int state)
647 struct aaci *aaci = card->private_data;
648 if (aaci->card->power_state != SNDRV_CTL_POWER_D0) {
649 snd_power_change_state(aaci->card, SNDRV_CTL_POWER_D0);
654 static int aaci_suspend(struct amba_device *dev, pm_message_t state)
656 snd_card_t *card = amba_get_drvdata(dev);
657 return card ? aaci_do_suspend(card) : 0;
660 static int aaci_resume(struct amba_device *dev)
662 snd_card_t *card = amba_get_drvdata(dev);
663 return card ? aaci_do_resume(card) : 0;
666 #define aaci_do_suspend NULL
667 #define aaci_do_resume NULL
668 #define aaci_suspend NULL
669 #define aaci_resume NULL
673 static struct ac97_pcm ac97_defs[] __devinitdata = {
674 [0] = { /* Front PCM */
678 .slots = (1 << AC97_SLOT_PCM_LEFT) |
679 (1 << AC97_SLOT_PCM_RIGHT) |
680 (1 << AC97_SLOT_PCM_CENTER) |
681 (1 << AC97_SLOT_PCM_SLEFT) |
682 (1 << AC97_SLOT_PCM_SRIGHT) |
683 (1 << AC97_SLOT_LFE),
692 .slots = (1 << AC97_SLOT_PCM_LEFT) |
693 (1 << AC97_SLOT_PCM_RIGHT),
702 .slots = (1 << AC97_SLOT_MIC),
708 static ac97_bus_ops_t aaci_bus_ops = {
709 .write = aaci_ac97_write,
710 .read = aaci_ac97_read,
713 static int __devinit aaci_probe_ac97(struct aaci *aaci)
715 ac97_template_t ac97_template;
716 ac97_bus_t *ac97_bus;
721 * Assert AACIRESET for 2us
723 writel(0, aaci->base + AACI_RESET);
725 writel(RESET_NRST, aaci->base + AACI_RESET);
728 * Give the AC'97 codec more than enough time
729 * to wake up. (42us = ~2 frames at 48kHz.)
733 ret = snd_ac97_bus(aaci->card, 0, &aaci_bus_ops, aaci, &ac97_bus);
737 ac97_bus->clock = 48000;
738 aaci->ac97_bus = ac97_bus;
740 memset(&ac97_template, 0, sizeof(ac97_template_t));
741 ac97_template.private_data = aaci;
742 ac97_template.num = 0;
743 ac97_template.scaps = AC97_SCAP_SKIP_MODEM;
745 ret = snd_ac97_mixer(ac97_bus, &ac97_template, &ac97);
750 * Disable AC97 PC Beep input on audio codecs.
752 if (ac97_is_audio(ac97))
753 snd_ac97_write_cache(ac97, AC97_PC_BEEP, 0x801e);
755 ret = snd_ac97_pcm_assign(ac97_bus, ARRAY_SIZE(ac97_defs), ac97_defs);
759 aaci->playback.pcm = &ac97_bus->pcms[0];
765 static void aaci_free_card(snd_card_t *card)
767 struct aaci *aaci = card->private_data;
772 static struct aaci * __devinit aaci_init_card(struct amba_device *dev)
777 card = snd_card_new(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
778 THIS_MODULE, sizeof(struct aaci));
780 return ERR_PTR(-ENOMEM);
782 card->private_free = aaci_free_card;
783 snd_card_set_pm_callback(card, aaci_do_suspend, aaci_do_resume, NULL);
785 strlcpy(card->driver, DRIVER_NAME, sizeof(card->driver));
786 strlcpy(card->shortname, "ARM AC'97 Interface", sizeof(card->shortname));
787 snprintf(card->longname, sizeof(card->longname),
788 "%s at 0x%08lx, irq %d",
789 card->shortname, dev->res.start, dev->irq[0]);
791 aaci = card->private_data;
792 init_MUTEX(&aaci->ac97_sem);
793 spin_lock_init(&aaci->lock);
797 /* Set MAINCR to allow slot 1 and 2 data IO */
798 aaci->maincr = MAINCR_IE | MAINCR_SL1RXEN | MAINCR_SL1TXEN |
799 MAINCR_SL2RXEN | MAINCR_SL2TXEN;
804 static int __devinit aaci_init_pcm(struct aaci *aaci)
809 ret = snd_pcm_new(aaci->card, "AACI AC'97", 0, 1, 0, &pcm);
812 pcm->private_data = aaci;
815 strlcpy(pcm->name, DRIVER_NAME, sizeof(pcm->name));
817 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &aaci_playback_ops);
823 static unsigned int __devinit aaci_size_fifo(struct aaci *aaci)
825 void __iomem *base = aaci->base + AACI_CSCH1;
828 writel(TXCR_FEN | TXCR_TSZ16 | TXCR_TXEN, base + AACI_TXCR);
830 for (i = 0; !(readl(base + AACI_SR) & SR_TXFF) && i < 4096; i++)
831 writel(0, aaci->base + AACI_DR1);
833 writel(0, base + AACI_TXCR);
836 * Re-initialise the AACI after the FIFO depth test, to
837 * ensure that the FIFOs are empty. Unfortunately, merely
838 * disabling the channel doesn't clear the FIFO.
840 writel(aaci->maincr & ~MAINCR_IE, aaci->base + AACI_MAINCR);
841 writel(aaci->maincr, aaci->base + AACI_MAINCR);
844 * If we hit 4096, we failed. Go back to the specified
853 static int __devinit aaci_probe(struct amba_device *dev, void *id)
858 ret = amba_request_regions(dev, NULL);
862 aaci = aaci_init_card(dev);
868 aaci->base = ioremap(dev->res.start, SZ_4K);
875 * Playback uses AACI channel 0
877 aaci->playback.base = aaci->base + AACI_CSCH1;
878 aaci->playback.fifo = aaci->base + AACI_DR1;
880 for (i = 0; i < 4; i++) {
881 void __iomem *base = aaci->base + i * 0x14;
883 writel(0, base + AACI_IE);
884 writel(0, base + AACI_TXCR);
885 writel(0, base + AACI_RXCR);
888 writel(0x1fff, aaci->base + AACI_INTCLR);
889 writel(aaci->maincr, aaci->base + AACI_MAINCR);
894 aaci->fifosize = aaci_size_fifo(aaci);
896 ret = aaci_probe_ac97(aaci);
900 ret = aaci_init_pcm(aaci);
904 snd_card_set_dev(aaci->card, &dev->dev);
906 ret = snd_card_register(aaci->card);
908 dev_info(&dev->dev, "%s, fifo %d\n", aaci->card->longname,
910 amba_set_drvdata(dev, aaci->card);
916 snd_card_free(aaci->card);
917 amba_release_regions(dev);
921 static int __devexit aaci_remove(struct amba_device *dev)
923 snd_card_t *card = amba_get_drvdata(dev);
925 amba_set_drvdata(dev, NULL);
928 struct aaci *aaci = card->private_data;
929 writel(0, aaci->base + AACI_MAINCR);
932 amba_release_regions(dev);
938 static struct amba_id aaci_ids[] = {
946 static struct amba_driver aaci_driver = {
951 .remove = __devexit_p(aaci_remove),
952 .suspend = aaci_suspend,
953 .resume = aaci_resume,
954 .id_table = aaci_ids,
957 static int __init aaci_init(void)
959 return amba_driver_register(&aaci_driver);
962 static void __exit aaci_exit(void)
964 amba_driver_unregister(&aaci_driver);
967 module_init(aaci_init);
968 module_exit(aaci_exit);
970 MODULE_LICENSE("GPL");
971 MODULE_DESCRIPTION("ARM PrimeCell PL041 Advanced Audio CODEC Interface driver");