Fix compilation errors due to merge
Pradeep Kumar [Mon, 6 Aug 2012 17:33:12 +0000 (22:33 +0530)]
Change-Id: I1067e7b9ab829bc6629eb79c1edd36dc1327e281
Reviewed-on: http://git-master/r/121393
Reviewed-by: Bo Yan <byan@nvidia.com>
Tested-by: Bo Yan <byan@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User

16 files changed:
arch/arm/kernel/devtree.c
arch/arm/mach-tegra/board-cardhu.c
arch/arm/mach-tegra/board-enterprise.c
arch/arm/mach-tegra/dvfs.h
arch/arm/mach-tegra/include/mach/tegra_asoc_pdata.h
arch/arm/mach-tegra/tegra11x_usb_phy.c
arch/arm/mach-tegra/timer.h
drivers/i2c/busses/i2c-tegra.c
drivers/input/touchscreen/atmel_mxt_ts.c
drivers/misc/tegra-throughput.c
drivers/mmc/host/sdhci.c
drivers/regulator/tps80031-regulator.c
drivers/video/tegra/host/gr3d/scale3d.c
include/linux/mmc/host.h
sound/soc/tegra/tegra_aic326x.c
sound/soc/tegra/tegra_max98088.c

index 0161982..bba27e9 100644 (file)
@@ -23,6 +23,7 @@
 #include <asm/page.h>
 #include <asm/mach/arch.h>
 #include <asm/mach-types.h>
+#include <asm/system_info.h>
 
 void __init early_init_dt_add_memory_arch(u64 base, u64 size)
 {
index 3888f3c..b6cac9b 100644 (file)
@@ -730,12 +730,25 @@ static struct platform_device tegra_rtc_device = {
        .num_resources = ARRAY_SIZE(tegra_rtc_resources),
 };
 
-static struct tegra_wm8903_platform_data cardhu_audio_wm8903_pdata = {
+static struct tegra_asoc_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 = {
@@ -744,6 +757,19 @@ 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 = {
@@ -769,15 +795,18 @@ 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*/
-       .audio_port_id          = {
-               [HIFI_CODEC] = 0,
-               [BASEBAND] = -1,
-               [BT_SCO] = 3,
-       },
-       .baseband_param         = {
-               .rate = -1,
-               .channels = -1,
-       },
+        .i2s_param[HIFI_CODEC]  = {
+                .audio_port_id  = 0,
+                .is_i2s_master  = 1,
+                .i2s_mode       = TEGRA_DAIFMT_I2S,
+                .sample_size    = 16,
+        },
+        .i2s_param[BT_SCO]      = {
+                .sample_size    = 16,
+                .audio_port_id  = 3,
+                .is_i2s_master  = 1,
+                .i2s_mode       = TEGRA_DAIFMT_DSP_A,
+        },
 };
 
 static struct platform_device cardhu_audio_aic326x_device = {
@@ -1456,4 +1485,4 @@ MACHINE_START(CARDHU, "cardhu")
        .init_machine   = tegra_cardhu_init,
        .restart        = tegra_assert_system_reset,
        .dt_compat      = cardhu_dt_board_compat,
-MACHaNE_END
+MACHINE_END
index 104fcb6..5dab97a 100644 (file)
@@ -558,15 +558,25 @@ 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*/
-       .audio_port_id          = {
-               [HIFI_CODEC] = 0,
-               [BASEBAND] = 2,
-               [BT_SCO] = 3,
+       .i2s_param[HIFI_CODEC]  = {
+               .audio_port_id  = 0,
+               .is_i2s_master  = 1,
+               .i2s_mode       = TEGRA_DAIFMT_I2S,
+               .sample_size    = 16,
        },
-       .baseband_param         = {
-               .rate = 8000,
-               .channels = 1,
-               .bit_format = TEGRA_DAIFMT_DSP_A,
+       .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,
        },
 };
 
index 6a7c6bd..ac179e6 100644 (file)
@@ -123,15 +123,19 @@ int tegra_dvfs_alt_freqs_set(struct dvfs *d, unsigned long *alt_freqs);
 int tegra_cpu_dvfs_alter(int edp_thermal_index, const cpumask_t *cpus,
                         bool before_clk_update, int cpu_event);
 
-#ifndef CONFIG_ARCH_TEGRA_2x_SOC
-int tegra_dvfs_rail_disable_prepare(struct dvfs_rail *rail);
-int tegra_dvfs_rail_post_enable(struct dvfs_rail *rail);
-void tegra_dvfs_age_cpu(int cur_linear_age);
-#else
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
 static inline int tegra_dvfs_rail_disable_prepare(struct dvfs_rail *rail)
 { return 0; }
 static inline int tegra_dvfs_rail_post_enable(struct dvfs_rail *rail)
 { return 0; }
+#else
+int tegra_dvfs_rail_disable_prepare(struct dvfs_rail *rail);
+int tegra_dvfs_rail_post_enable(struct dvfs_rail *rail);
+#endif
+
+#ifdef CONFIG_ARCH_TEGRA_3x_SOC
+void tegra_dvfs_age_cpu(int cur_linear_age);
+#else
 static inline void tegra_dvfs_age_cpu(int cur_linear_age)
 { return; }
 #endif
index fff2fcc..7aada69 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * arch/arm/mach-tegra/include/mach/tegra_asoc_pdata.h
  *
- * Copyright 2012 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
 #define        TEGRA_DAIFMT_RIGHT_J            3
 #define        TEGRA_DAIFMT_LEFT_J             4
 
-struct baseband_config {
+struct i2s_config {
+       int audio_port_id;
+       int is_i2s_master;
+       int i2s_mode;
+       int sample_size;
        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;
-       int audio_port_id[NUM_I2S_DEVICES];
-       struct baseband_config baseband_param;
+       struct i2s_config i2s_param[NUM_I2S_DEVICES];
 };
index a165e50..fffccc5 100644 (file)
 #define DBG(stuff...)  do {} while (0)
 #endif
 
+/* define HSIC phy params */
+#define HSIC_SYNC_START_DELAY          9
+#define HSIC_IDLE_WAIT_DELAY           17
+#define HSIC_ELASTIC_UNDERRUN_LIMIT    16
+#define HSIC_ELASTIC_OVERRUN_LIMIT     16
+
 static u32 utmip_rctrl_val, utmip_tctrl_val;
 static DEFINE_SPINLOCK(utmip_pad_lock);
 static int utmip_pad_count;
@@ -1955,7 +1961,6 @@ static int uhsic_phy_power_on(struct tegra_usb_phy *phy)
 {
        unsigned long val;
        void __iomem *base = phy->regs;
-       struct tegra_hsic_config *config = &phy->pdata->u_cfg.hsic;
 
        DBG("%s(%d) inst:[%d]\n", __func__, __LINE__, phy->inst);
 
@@ -1984,13 +1989,13 @@ static int uhsic_phy_power_on(struct tegra_usb_phy *phy)
        writel(val, base + USB_SUSP_CTRL);
 
        val = readl(base + UHSIC_HSRX_CFG0);
-       val |= UHSIC_IDLE_WAIT(config->idle_wait_delay);
-       val |= UHSIC_ELASTIC_UNDERRUN_LIMIT(config->elastic_underrun_limit);
-       val |= UHSIC_ELASTIC_OVERRUN_LIMIT(config->elastic_overrun_limit);
+       val |= UHSIC_IDLE_WAIT(HSIC_IDLE_WAIT_DELAY);
+       val |= UHSIC_ELASTIC_UNDERRUN_LIMIT(HSIC_ELASTIC_UNDERRUN_LIMIT);
+       val |= UHSIC_ELASTIC_OVERRUN_LIMIT(HSIC_ELASTIC_OVERRUN_LIMIT);
        writel(val, base + UHSIC_HSRX_CFG0);
 
        val = readl(base + UHSIC_HSRX_CFG1);
-       val |= UHSIC_HS_SYNC_START_DLY(config->sync_start_delay);
+       val |= UHSIC_HS_SYNC_START_DLY(HSIC_SYNC_START_DELAY);
        writel(val, base + UHSIC_HSRX_CFG1);
 
        /* WAR HSIC TX */
index ecb669b..5301644 100644 (file)
@@ -49,18 +49,17 @@ struct tegra_twd_context {
 
 void __init tegra_cpu_timer_init(void);
 
+int tegra_get_linear_age(void);
+
 #ifdef CONFIG_HAVE_ARM_TWD
 int tegra_twd_get_state(struct tegra_twd_context *context);
 void tegra_twd_suspend(struct tegra_twd_context *context);
 void tegra_twd_resume(struct tegra_twd_context *context);
-int tegra_get_linear_age(void);
 #else
 static inline int tegra_twd_get_state(struct tegra_twd_context *context)
 { return -ENODEV; }
 static inline void tegra_twd_suspend(struct tegra_twd_context *context) {}
 static inline void tegra_twd_resume(struct tegra_twd_context *context) {}
-static inline int tegra_get_linear_age()
-{ return -1; }
 #endif
 
 #ifdef CONFIG_ARM_ARCH_TIMER
index 611e91c..7dc9fa1 100644 (file)
@@ -353,7 +353,7 @@ static int tegra_i2c_fill_tx_fifo(struct tegra_i2c_dev *i2c_dev)
        u8 *buf;
        size_t buf_remaining;
        int words_to_transfer;
-       unsigned long flags;
+       unsigned long flags = 0;
 
        if (!i2c_dev->chipdata->has_xfer_complete_interrupt) {
                spin_lock_irqsave(&i2c_dev->fifo_lock, flags);
index c85cf42..ef5c701 100644 (file)
@@ -22,6 +22,8 @@
 #include <linux/input.h>
 #include <linux/interrupt.h>
 #include <linux/slab.h>
+#define CREATE_TRACE_POINTS
+#include <trace/events/nvevent.h>
 
 /* Family ID */
 #define MXT224_ID              0x80
index b2375d2..ec36176 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/spinlock.h>
 #include <linux/throughput_ioctl.h>
 #include <linux/nvhost.h>
+#include <linux/module.h>
 #include <mach/dc.h>
 
 #define DEFAULT_SYNC_RATE 60000 /* 60 Hz */
index 76499e0..756675f 100644 (file)
@@ -2494,16 +2494,17 @@ int sdhci_suspend_host(struct sdhci_host *host)
                        mmc->pm_flags = MMC_PM_KEEP_POWER;
 
                ret = mmc_suspend_host(host->mmc);
-       if (ret) {
-               if (has_tuning_timer) {
-                       host->flags |= SDHCI_NEEDS_RETUNING;
-                       mod_timer(&host->tuning_timer, jiffies +
-                                       host->tuning_count * HZ);
-               }
+               if (ret) {
+                       if (has_tuning_timer) {
+                               host->flags |= SDHCI_NEEDS_RETUNING;
+                               mod_timer(&host->tuning_timer, jiffies +
+                                               host->tuning_count * HZ);
+                       }
 
-               sdhci_enable_card_detection(host);
+                       sdhci_enable_card_detection(host);
 
-               return ret;
+                       return ret;
+               }
        }
 
        if (mmc->pm_flags & MMC_PM_KEEP_POWER)
index b778e3d..1a6e970 100644 (file)
@@ -1101,36 +1101,6 @@ static int __devinit tps80031_regulator_probe(struct platform_device *pdev)
                dev_err(&pdev->dev, "Number of regulator is 0\n");
                return -EINVAL;
        }
-       tps_pdata = pdev->dev.platform_data;
-       ri->dev = &pdev->dev;
-       if (tps_pdata->delay_us > 0)
-               ri->delay = tps_pdata->delay_us;
-       ri->tolerance_uv = tps_pdata->tolerance_uv;
-
-       check_smps_mode_mult(pdev->dev.parent, ri);
-       ri->platform_flags = tps_pdata->flags;
-       ri->ext_ctrl_flag = tps_pdata->ext_ctrl_flag;
-
-       err = tps80031_cache_regulator_register(pdev->dev.parent, ri);
-       if (err) {
-               dev_err(&pdev->dev, "Register access for caching is failed\n");
-               return err;
-       }
-       err = tps80031_regulator_preinit(pdev->dev.parent, ri, tps_pdata);
-       if (err)
-               return err;
-
-       err = tps80031_power_req_config(pdev->dev.parent, ri, tps_pdata);
-       if (err)
-               return err;
-
-       rdev = regulator_register(&ri->desc, &pdev->dev,
-                               &tps_pdata->regulator, ri, NULL);
-       if (IS_ERR_OR_NULL(rdev)) {
-               dev_err(&pdev->dev, "failed to register regulator %s\n",
-                               ri->desc.name);
-               return PTR_ERR(rdev);
-       }
 
        pmic = devm_kzalloc(&pdev->dev,
                        pdata->num_regulator_pdata * sizeof(*pmic), GFP_KERNEL);
@@ -1190,7 +1160,7 @@ static int __devinit tps80031_regulator_probe(struct platform_device *pdev)
                }
 
                rdev = regulator_register(&ri->rinfo->desc, &pdev->dev,
-                               tps_pdata->reg_init_data, ri);
+                               tps_pdata->reg_init_data, ri, NULL);
                if (IS_ERR_OR_NULL(rdev)) {
                        dev_err(&pdev->dev,
                                "register regulator failed %s\n",
index 9a6a8e7..f118394 100644 (file)
@@ -37,6 +37,7 @@
 #include <linux/debugfs.h>
 #include <linux/types.h>
 #include <linux/clk.h>
+#include <linux/export.h>
 #include <mach/clk.h>
 #include <mach/hardware.h>
 #include "scale3d.h"
@@ -496,7 +497,6 @@ static void do_scale(int diff)
 
 #define scale_up() do_scale(scale3d.p_scale_step)
 #define scale_down() do_scale(-scale3d.p_scale_step)
-
 void nvhost_scale3d_set_throughput_hint(int hint)
 {
        if (!scale3d.enable)
index 05de12d..dd458b3 100644 (file)
@@ -241,13 +241,6 @@ struct mmc_host {
 #define MMC_CAP2_HC_ERASE_SZ   (1 << 9)        /* High-capacity erase size */
 #define MMC_CAP2_BKOPS         (1 << 10)       /* Host supports BKOPS */
 
-       unsigned int            caps2;                  /* More host capabilities */
-#define MMC_CAP2_BOOTPART_NOACC        (1 << 0)        /* Boot partition no access */
-#define MMC_CAP2_CACHE_CTRL            (1 << 1)        /* Allow cache control */
-#define MMC_CAP2_POWEROFF_NOTIFY       (1 << 2)        /* Notify poweroff supported */
-#define MMC_CAP2_NO_MULTI_READ (1 << 3)        /* Multiblock reads don't work */
-#define MMC_CAP2_NO_SLEEP_CMD          (1 << 4)        /* Don't allow sleep command */
-
        mmc_pm_flag_t           pm_caps;        /* supported pm features */
        unsigned int        power_notify_type;
 #define MMC_HOST_PW_NOTIFY_NONE                0
index 0e14fa8..5ad3b95 100644 (file)
@@ -1184,11 +1184,23 @@ static __devinit int tegra_aic326x_driver_probe(struct platform_device *pdev)
 #endif
 
 #ifndef CONFIG_ARCH_TEGRA_2x_SOC
-       for (i = 0; i < NUM_I2S_DEVICES ; i++)
-               machine->codec_info[i].i2s_id = pdata->audio_port_id[i];
-
-       machine->codec_info[BASEBAND].rate = pdata->baseband_param.rate;
-       machine->codec_info[BASEBAND].channels = pdata->baseband_param.channels;
+       for (i = 0; i < NUM_I2S_DEVICES ; i++) {
+               machine->codec_info[i].i2s_id =
+                       pdata->i2s_param[i].audio_port_id;
+               machine->codec_info[i].bitsize =
+                       pdata->i2s_param[i].sample_size;
+               machine->codec_info[i].is_i2smaster =
+                       pdata->i2s_param[i].is_i2s_master;
+               machine->codec_info[i].rate =
+                       pdata->i2s_param[i].rate;
+               machine->codec_info[i].channels =
+                       pdata->i2s_param[i].channels;
+               if ((pdata->i2s_param[i].i2s_mode == TEGRA_DAIFMT_DSP_A) ||
+                       (pdata->i2s_param[i].i2s_mode == TEGRA_DAIFMT_DSP_B))
+                       machine->codec_info[i].is_format_dsp = 1;
+               else
+                       machine->codec_info[i].is_format_dsp = 0;
+       }
 
        tegra_aic326x_dai[DAI_LINK_HIFI].cpu_dai_name =
        tegra_i2s_dai_name[machine->codec_info[HIFI_CODEC].i2s_id];
index df3e853..f52b56f 100644 (file)
@@ -1151,16 +1151,22 @@ static __devinit int tegra_max98088_driver_probe(struct platform_device *pdev)
 #endif
 
 #ifndef CONFIG_ARCH_TEGRA_2x_SOC
-       for (i = 0; i < NUM_I2S_DEVICES ; i++)
-               machine->codec_info[i].i2s_id = pdata->audio_port_id[i];
-
-       machine->codec_info[BASEBAND].rate = pdata->baseband_param.rate;
-       machine->codec_info[BASEBAND].channels = pdata->baseband_param.channels;
-       machine->codec_info[BASEBAND].is_format_dsp = 0;
-
-       if ((pdata->baseband_param.bit_format == TEGRA_DAIFMT_DSP_A) ||
-       (pdata->baseband_param.bit_format == TEGRA_DAIFMT_DSP_B)) {
-                       machine->codec_info[BASEBAND].is_format_dsp = 1;
+       for (i = 0; i < NUM_I2S_DEVICES ; i++) {
+               machine->codec_info[i].i2s_id =
+                       pdata->i2s_param[i].audio_port_id;
+               machine->codec_info[i].bitsize =
+                       pdata->i2s_param[i].sample_size;
+               machine->codec_info[i].is_i2smaster =
+                       pdata->i2s_param[i].is_i2s_master;
+               machine->codec_info[i].rate =
+                       pdata->i2s_param[i].rate;
+               machine->codec_info[i].channels =
+                       pdata->i2s_param[i].channels;
+               if ((pdata->i2s_param[i].i2s_mode == TEGRA_DAIFMT_DSP_A) ||
+                       (pdata->i2s_param[i].i2s_mode == TEGRA_DAIFMT_DSP_B))
+                       machine->codec_info[i].is_format_dsp = 1;
+               else
+                       machine->codec_info[i].is_format_dsp = 0;
        }
 
        tegra_max98088_dai[DAI_LINK_HIFI].cpu_dai_name =