Revert "ARM: tegra: integration of slave mode support."
Varun Wadekar [Mon, 30 Jul 2012 11:38:14 +0000 (16:38 +0530)]
This reverts commit a50e73c5be9f5a3546bf575588385b59deee7092 as it
breaks bootup on Cardhu.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

arch/arm/mach-tegra/board-cardhu.c
arch/arm/mach-tegra/board-enterprise.c
arch/arm/mach-tegra/board-harmony.c
arch/arm/mach-tegra/board-kai.c
arch/arm/mach-tegra/board-ventana.c
arch/arm/mach-tegra/board-whistler.c
arch/arm/mach-tegra/include/mach/tegra_asoc_pdata.h

index 0b8c71b..37debb7 100644 (file)
@@ -2,7 +2,6 @@
  * arch/arm/mach-tegra/board-cardhu.c
  *
  * Copyright (c) 2011-2012, NVIDIA Corporation.  All rights reserved.
- * Copyright (c) 2011-2012, NVIDIA Corporation.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -731,25 +730,12 @@ static struct platform_device tegra_rtc_device = {
        .num_resources = ARRAY_SIZE(tegra_rtc_resources),
 };
 
-static struct tegra_asoc_platform_data cardhu_audio_wm8903_pdata = {
+static struct tegra_wm8903_platform_data cardhu_audio_wm8903_pdata = {
        .gpio_spkr_en           = TEGRA_GPIO_SPKR_EN,
        .gpio_hp_det            = TEGRA_GPIO_HP_DET,
        .gpio_hp_mute           = -1,
        .gpio_int_mic_en        = -1,
        .gpio_ext_mic_en        = -1,
-       .i2s_param[HIFI_CODEC]  = {
-               .audio_port_id  = 0,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_I2S,
-       },
-       .i2s_param[BASEBAND]    = {
-               .audio_port_id  = -1,
-       },
-       .i2s_param[BT_SCO]      = {
-               .audio_port_id  = 3,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_DSP_A,
-       },
 };
 
 static struct tegra_asoc_platform_data cardhu_audio_max98095_pdata = {
@@ -758,19 +744,6 @@ static struct tegra_asoc_platform_data cardhu_audio_max98095_pdata = {
        .gpio_hp_mute           = -1,
        .gpio_int_mic_en        = -1,
        .gpio_ext_mic_en        = -1,
-       .i2s_param[HIFI_CODEC]  = {
-               .audio_port_id  = 0,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_I2S,
-       },
-       .i2s_param[BASEBAND]    = {
-               .audio_port_id  = -1,
-       },
-       .i2s_param[BT_SCO]      = {
-               .audio_port_id  = 3,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_DSP_A,
-       },
 };
 
 static struct platform_device cardhu_audio_wm8903_device = {
@@ -796,17 +769,14 @@ static struct tegra_asoc_platform_data cardhu_audio_aic326x_pdata = {
        .gpio_int_mic_en        = -1,
        .gpio_ext_mic_en        = -1,
        /*defaults for Verbier-Cardhu board with TI AIC326X codec*/
-       .i2s_param[HIFI_CODEC]  = {
-               .audio_port_id  = 0,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_I2S,
-               .sample_size    = 16,
+       .audio_port_id          = {
+               [HIFI_CODEC] = 0,
+               [BASEBAND] = -1,
+               [BT_SCO] = 3,
        },
-       .i2s_param[BT_SCO]      = {
-               .sample_size    = 16,
-               .audio_port_id  = 3,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_DSP_A,
+       .baseband_param         = {
+               .rate = -1,
+               .channels = -1,
        },
 };
 
index fcb00a1..3b7f90b 100644 (file)
@@ -475,6 +475,8 @@ static void __init enterprise_uart_init(void)
                                ARRAY_SIZE(enterprise_uart_devices));
 }
 
+
+
 static struct resource tegra_rtc_resources[] = {
        [0] = {
                .start = TEGRA_RTC_BASE,
@@ -506,27 +508,16 @@ static struct tegra_asoc_platform_data enterprise_audio_pdata = {
        .gpio_hp_mute           = -1,
        .gpio_int_mic_en        = -1,
        .gpio_ext_mic_en        = -1,
-       .debounce_time_hp       = -1,
+       .debounce_time_hp = -1,
        /*defaults for Enterprise board*/
-       .i2s_param[HIFI_CODEC]  = {
-               .audio_port_id  = 0,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_I2S,
-               .sample_size    = 16,
+       .audio_port_id          = {
+               [HIFI_CODEC] = 0,
+               [BASEBAND] = 2,
+               [BT_SCO] = 3,
        },
-       .i2s_param[BASEBAND]    = {
-               .audio_port_id  = 2,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_DSP_A,
-               .sample_size    = 16,
-               .rate           = 8000,
-               .channels       = 1,
-       },
-       .i2s_param[BT_SCO]      = {
-               .audio_port_id  = 3,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_DSP_A,
-               .sample_size    = 16,
+       .baseband_param         = {
+               .rate = 8000,
+               .channels = 1,
        },
 };
 
@@ -545,25 +536,15 @@ static struct tegra_asoc_platform_data enterprise_audio_aic326x_pdata = {
        .gpio_int_mic_en        = -1,
        .gpio_ext_mic_en        = -1,
        /*defaults for Verbier-Enterprise (E1197) board with TI AIC326X codec*/
-       .i2s_param[HIFI_CODEC]  = {
-               .audio_port_id  = 0,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_I2S,
-               .sample_size    = 16,
-       },
-       .i2s_param[BASEBAND]    = {
-               .audio_port_id  = 2,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_DSP_A,
-               .sample_size    = 16,
-               .rate           = 8000,
-               .channels       = 1,
+       .audio_port_id          = {
+               [HIFI_CODEC] = 0,
+               [BASEBAND] = 2,
+               [BT_SCO] = 3,
        },
-       .i2s_param[BT_SCO]      = {
-               .sample_size    = 16,
-               .audio_port_id  = 3,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_DSP_A,
+       .baseband_param         = {
+               .rate = 8000,
+               .channels = 1,
+               .bit_format = TEGRA_DAIFMT_DSP_A,
        },
 };
 
@@ -876,7 +857,7 @@ static void enterprise_audio_init(void)
        tegra_get_board_info(&board_info);
 
        if (board_info.board_id == BOARD_E1197)
-               enterprise_audio_pdata.i2s_param[HIFI_CODEC].audio_port_id = 1;
+               enterprise_audio_pdata.audio_port_id[HIFI_CODEC] = 1;
 
        platform_add_devices(enterprise_audio_devices,
                        ARRAY_SIZE(enterprise_audio_devices));
index 53ec47f..eaac241 100644 (file)
@@ -3,7 +3,6 @@
  *
  * Copyright (C) 2010 Google, Inc.
  * Copyright (C) 2011 NVIDIA, Inc.
- * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
  *
  * This software is licensed under the terms of the GNU General Public
  * License version 2, as published by the Free Software Foundation, and
@@ -45,7 +44,7 @@
 #include <asm/hardware/gic.h>
 #include <asm/setup.h>
 
-#include <mach/tegra_asoc_pdata.h>
+#include <mach/tegra_wm8903_pdata.h>
 #include <mach/iomap.h>
 #include <mach/irqs.h>
 #include <mach/sdhci.h>
@@ -234,25 +233,12 @@ static void harmony_keys_init(void)
                tegra_gpio_enable(harmony_gpio_keys_buttons[i].gpio);
 }
 
-static struct tegra_asoc_platform_data harmony_audio_pdata = {
+static struct tegra_wm8903_platform_data harmony_audio_pdata = {
        .gpio_spkr_en           = TEGRA_GPIO_SPKR_EN,
        .gpio_hp_det            = TEGRA_GPIO_HP_DET,
        .gpio_hp_mute           = -1,
        .gpio_int_mic_en        = TEGRA_GPIO_INT_MIC_EN,
        .gpio_ext_mic_en        = TEGRA_GPIO_EXT_MIC_EN,
-       .i2s_param[HIFI_CODEC]  = {
-               .audio_port_id  = 0,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_I2S,
-       },
-       .i2s_param[BASEBAND]    = {
-               .audio_port_id  = -1,
-       },
-       .i2s_param[BT_SCO]      = {
-               .audio_port_id  = 3,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_DSP_A,
-       },
 };
 
 static struct platform_device harmony_audio_device = {
index 8eba8c1..bc44bba 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * arch/arm/mach-tegra/board-kai.c
  *
- * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
  *
  * 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
@@ -55,7 +55,7 @@
 #include <mach/io.h>
 #include <mach/io_dpd.h>
 #include <mach/i2s.h>
-#include <mach/tegra_asoc_pdata.h>
+#include <mach/tegra_rt5640_pdata.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <mach/usb_phy.h>
@@ -578,25 +578,12 @@ static struct platform_device tegra_rtc_device = {
        .num_resources = ARRAY_SIZE(tegra_rtc_resources),
 };
 
-static struct tegra_asoc_platform_data kai_audio_pdata = {
+static struct tegra_rt5640_platform_data kai_audio_pdata = {
        .gpio_spkr_en           = TEGRA_GPIO_SPKR_EN,
        .gpio_hp_det            = TEGRA_GPIO_HP_DET,
        .gpio_hp_mute           = -1,
        .gpio_int_mic_en        = TEGRA_GPIO_INT_MIC_EN,
        .gpio_ext_mic_en        = TEGRA_GPIO_EXT_MIC_EN,
-               .i2s_param[HIFI_CODEC]  = {
-               .audio_port_id  = 0,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_I2S,
-       },
-       .i2s_param[BASEBAND]    = {
-               .audio_port_id  = -1,
-       },
-       .i2s_param[BT_SCO]      = {
-               .audio_port_id  = 3,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_DSP_A,
-       },
 };
 
 static struct platform_device kai_audio_device = {
index 708c123..3dd44ad 100644 (file)
@@ -2,7 +2,6 @@
  * arch/arm/mach-tegra/board-ventana.c
  *
  * Copyright (c) 2010-2011 NVIDIA Corporation.
- * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -52,7 +51,7 @@
 #include <mach/iomap.h>
 #include <mach/io.h>
 #include <mach/i2s.h>
-#include <mach/tegra_asoc_pdata.h>
+#include <mach/tegra_wm8903_pdata.h>
 
 #include <asm/hardware/gic.h>
 #include <asm/mach-types.h>
@@ -357,25 +356,12 @@ static struct platform_device tegra_camera = {
        .id = -1,
 };
 
-static struct tegra_asoc_platform_data ventana_audio_pdata = {
+static struct tegra_wm8903_platform_data ventana_audio_pdata = {
        .gpio_spkr_en           = TEGRA_GPIO_SPKR_EN,
        .gpio_hp_det            = TEGRA_GPIO_HP_DET,
        .gpio_hp_mute           = -1,
        .gpio_int_mic_en        = TEGRA_GPIO_INT_MIC_EN,
        .gpio_ext_mic_en        = TEGRA_GPIO_EXT_MIC_EN,
-       .i2s_param[HIFI_CODEC]  = {
-               .audio_port_id  = 0,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_I2S,
-       },
-       .i2s_param[BASEBAND]    = {
-               .audio_port_id  = -1,
-       },
-       .i2s_param[BT_SCO]      = {
-               .audio_port_id  = 3,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_DSP_A,
-       },
 };
 
 static struct platform_device ventana_audio_device = {
index 57bb8d6..33fe754 100644 (file)
@@ -360,32 +360,12 @@ static struct platform_device tegra_camera = {
 };
 
 static struct tegra_asoc_platform_data whistler_audio_pdata = {
-       .gpio_spkr_en           = -1,
-       .gpio_hp_det            = TEGRA_GPIO_HP_DET,
-       .gpio_hp_mute           = -1,
-       .gpio_int_mic_en        = -1,
-       .gpio_ext_mic_en        = -1,
-       .debounce_time_hp       = 200,
-       .i2s_param[HIFI_CODEC]  = {
-               .audio_port_id  = 0,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_I2S,
-               .sample_size    = 16,
-       },
-       .i2s_param[BASEBAND]    = {
-               .audio_port_id  = 2,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_DSP_A,
-               .sample_size    = 16,
-               .rate           = 8000,
-               .channels       = 1,
-       },
-       .i2s_param[BT_SCO]      = {
-               .sample_size    = 16,
-               .audio_port_id  = 3,
-               .is_i2s_master  = 1,
-               .i2s_mode       = TEGRA_DAIFMT_DSP_A,
-       },
+       .gpio_spkr_en = -1,
+       .gpio_hp_det = TEGRA_GPIO_HP_DET,
+       .gpio_hp_mute = -1,
+       .gpio_int_mic_en = -1,
+       .gpio_ext_mic_en = -1,
+       .debounce_time_hp = 200,
 };
 
 static struct platform_device whistler_audio_aic326x_device = {
index 7aada69..fff2fcc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * arch/arm/mach-tegra/include/mach/tegra_asoc_pdata.h
  *
- * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
+ * Copyright 2012 NVIDIA, Inc.
  *
  * This software is licensed under the terms of the GNU General Public
  * License version 2, as published by the Free Software Foundation, and
 #define        TEGRA_DAIFMT_RIGHT_J            3
 #define        TEGRA_DAIFMT_LEFT_J             4
 
-struct i2s_config {
-       int audio_port_id;
-       int is_i2s_master;
-       int i2s_mode;
-       int sample_size;
+struct baseband_config {
        int rate;
        int channels;
+       int bit_format;
+       int is_master;
 };
 
 struct tegra_asoc_platform_data {
-       const char *codec_name;
-       const char *codec_dai_name;
        int gpio_spkr_en;
        int gpio_hp_det;
        int gpio_hp_mute;
        int gpio_int_mic_en;
        int gpio_ext_mic_en;
        unsigned int debounce_time_hp;
-       struct i2s_config i2s_param[NUM_I2S_DEVICES];
+       int audio_port_id[NUM_I2S_DEVICES];
+       struct baseband_config baseband_param;
 };