Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6679ee18 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

Merge branch 'topic/asoc' into for-linus

parents a91a4aa1 a0b62329
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -13,3 +13,7 @@ obj-$(CONFIG_USB_EHCI_MXC) += ehci.o
obj-$(CONFIG_MXC_ULPI) += ulpi.o
obj-$(CONFIG_MXC_ULPI) += ulpi.o
obj-$(CONFIG_ARCH_MXC_AUDMUX_V1) += audmux-v1.o
obj-$(CONFIG_ARCH_MXC_AUDMUX_V1) += audmux-v1.o
obj-$(CONFIG_ARCH_MXC_AUDMUX_V2) += audmux-v2.o
obj-$(CONFIG_ARCH_MXC_AUDMUX_V2) += audmux-v2.o
ifdef CONFIG_SND_IMX_SOC
obj-y += ssi-fiq.o
obj-y += ssi-fiq-ksym.o
endif
+20 −0
Original line number Original line Diff line number Diff line
/*
 * Exported ksyms for the SSI FIQ handler
 *
 * Copyright (C) 2009, Sascha Hauer <s.hauer@pengutronix.de>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#include <linux/module.h>

#include <mach/ssi.h>

EXPORT_SYMBOL(imx_ssi_fiq_tx_buffer);
EXPORT_SYMBOL(imx_ssi_fiq_rx_buffer);
EXPORT_SYMBOL(imx_ssi_fiq_start);
EXPORT_SYMBOL(imx_ssi_fiq_end);
EXPORT_SYMBOL(imx_ssi_fiq_base);
+134 −0
Original line number Original line Diff line number Diff line
/*
 *  Copyright (C) 2009 Sascha Hauer <s.hauer@pengutronix.de>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#include <linux/linkage.h>
#include <asm/assembler.h>

/*
 * r8  = bit 0-15: tx offset, bit 16-31: tx buffer size
 * r9  = bit 0-15: rx offset, bit 16-31: rx buffer size
 */

#define SSI_STX0	0x00
#define SSI_SRX0	0x08
#define SSI_SISR	0x14
#define SSI_SIER	0x18
#define SSI_SACNT	0x38

#define SSI_SACNT_AC97EN	(1 << 0)

#define SSI_SIER_TFE0_EN	(1 << 0)
#define SSI_SISR_TFE0		(1 << 0)
#define SSI_SISR_RFF0		(1 << 2)
#define SSI_SIER_RFF0_EN	(1 << 2)

		.text
		.global	imx_ssi_fiq_start
		.global	imx_ssi_fiq_end
		.global imx_ssi_fiq_base
		.global imx_ssi_fiq_rx_buffer
		.global imx_ssi_fiq_tx_buffer

imx_ssi_fiq_start:
		ldr r12, imx_ssi_fiq_base

		/* TX */
		ldr r11, imx_ssi_fiq_tx_buffer

		/* shall we send? */
		ldr r13, [r12, #SSI_SIER]
		tst r13, #SSI_SIER_TFE0_EN
		beq 1f

		/* TX FIFO empty? */
		ldr r13, [r12, #SSI_SISR]
		tst r13, #SSI_SISR_TFE0
		beq 1f

		mov r10, #0x10000
		sub r10, #1
		and r10, r10, r8	/* r10: current buffer offset */

		add r11, r11, r10

		ldrh r13, [r11]
		strh r13, [r12, #SSI_STX0]

		ldrh r13, [r11, #2]
		strh r13, [r12, #SSI_STX0]

		ldrh r13, [r11, #4]
		strh r13, [r12, #SSI_STX0]

		ldrh r13, [r11, #6]
		strh r13, [r12, #SSI_STX0]

		add r10, #8
		lsr r13, r8, #16	/* r13: buffer size */
		cmp r10, r13
		lslgt r8, r13, #16
		addle r8, #8
1:
		/* RX */

		/* shall we receive? */
		ldr r13, [r12, #SSI_SIER]
		tst r13, #SSI_SIER_RFF0_EN
		beq 1f

		/* RX FIFO full? */
		ldr r13, [r12, #SSI_SISR]
		tst r13, #SSI_SISR_RFF0
		beq 1f

		ldr r11, imx_ssi_fiq_rx_buffer

		mov r10, #0x10000
		sub r10, #1
		and r10, r10, r9	/* r10: current buffer offset */

		add r11, r11, r10

		ldr r13, [r12, #SSI_SACNT]
		tst r13, #SSI_SACNT_AC97EN

		ldr r13, [r12, #SSI_SRX0]
		strh r13, [r11]

		ldr r13, [r12, #SSI_SRX0]
		strh r13, [r11, #2]

		/* dummy read to skip slot 12 */
		ldrne r13, [r12, #SSI_SRX0]

		ldr r13, [r12, #SSI_SRX0]
		strh r13, [r11, #4]

		ldr r13, [r12, #SSI_SRX0]
		strh r13, [r11, #6]

		/* dummy read to skip slot 12 */
		ldrne r13, [r12, #SSI_SRX0]

		add r10, #8
		lsr r13, r9, #16	/* r13: buffer size */
		cmp r10, r13
		lslgt r9, r13, #16
		addle r9, #8

1:
		@ return from FIQ
		subs	pc, lr, #4
imx_ssi_fiq_base:
		.word 0x0
imx_ssi_fiq_rx_buffer:
		.word 0x0
imx_ssi_fiq_tx_buffer:
		.word 0x0
imx_ssi_fiq_end:
+26 −0
Original line number Original line Diff line number Diff line
/*
 * platform header for the SIU ASoC driver
 *
 * Copyright (C) 2009-2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#ifndef ASM_SIU_H
#define ASM_SIU_H

#include <asm/dma-sh.h>

struct device;

struct siu_platform {
	struct device *dma_dev;
	enum sh_dmae_slave_chan_id dma_slave_tx_a;
	enum sh_dmae_slave_chan_id dma_slave_rx_a;
	enum sh_dmae_slave_chan_id dma_slave_tx_b;
	enum sh_dmae_slave_chan_id dma_slave_rx_b;
};

#endif /* ASM_SIU_H */
+15 −3
Original line number Original line Diff line number Diff line
@@ -115,7 +115,8 @@
#define twl_has_watchdog()        false
#define twl_has_watchdog()        false
#endif
#endif


#if defined(CONFIG_TWL4030_CODEC) || defined(CONFIG_TWL4030_CODEC_MODULE)
#if defined(CONFIG_TWL4030_CODEC) || defined(CONFIG_TWL4030_CODEC_MODULE) ||\
	defined(CONFIG_SND_SOC_TWL6030) || defined(CONFIG_SND_SOC_TWL6030_MODULE)
#define twl_has_codec()	true
#define twl_has_codec()	true
#else
#else
#define twl_has_codec()	false
#define twl_has_codec()	false
@@ -711,8 +712,19 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
			return PTR_ERR(child);
			return PTR_ERR(child);
	}
	}


	if (twl_has_codec() && pdata->codec) {
	if (twl_has_codec() && pdata->codec && twl_class_is_4030()) {
		child = add_child(1, "twl4030_codec",
		sub_chip_id = twl_map[TWL_MODULE_AUDIO_VOICE].sid;
		child = add_child(sub_chip_id, "twl4030_codec",
				pdata->codec, sizeof(*pdata->codec),
				false, 0, 0);
		if (IS_ERR(child))
			return PTR_ERR(child);
	}

	/* Phoenix*/
	if (twl_has_codec() && pdata->codec && twl_class_is_6030()) {
		sub_chip_id = twl_map[TWL_MODULE_AUDIO_VOICE].sid;
		child = add_child(sub_chip_id, "twl6030_codec",
				pdata->codec, sizeof(*pdata->codec),
				pdata->codec, sizeof(*pdata->codec),
				false, 0, 0);
				false, 0, 0);
		if (IS_ERR(child))
		if (IS_ERR(child))
Loading