Revert "Fix compilation errors due to merge"
Varun Wadekar [Thu, 9 Aug 2012 06:24:01 +0000 (11:24 +0530)]
Part of the kernel cleanup process.

This reverts commit 92f18b11534e02bbd3297c89d2ac7baaa85b79c5.

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

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 bba27e9..0161982 100644 (file)
@@ -23,7 +23,6 @@
 #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 b6cac9b..3888f3c 100644 (file)
@@ -730,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 = {
@@ -757,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 = {
@@ -795,18 +769,15 @@ 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,
-        },
-        .i2s_param[BT_SCO]      = {
-                .sample_size    = 16,
-                .audio_port_id  = 3,
-                .is_i2s_master  = 1,
-                .i2s_mode       = TEGRA_DAIFMT_DSP_A,
-        },
+       .audio_port_id          = {
+               [HIFI_CODEC] = 0,
+               [BASEBAND] = -1,
+               [BT_SCO] = 3,
+       },
+       .baseband_param         = {
+               .rate = -1,
+               .channels = -1,
+       },
 };
 
 static struct platform_device cardhu_audio_aic326x_device = {
@@ -1485,4 +1456,4 @@ MACHINE_START(CARDHU, "cardhu")
        .init_machine   = tegra_cardhu_init,
        .restart        = tegra_assert_system_reset,
        .dt_compat      = cardhu_dt_board_compat,
-MACHINE_END
+MACHaNE_END
index 5dab97a..104fcb6 100644 (file)
@@ -558,25 +558,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,
+       .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]      = {
-               .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,
        },
 };
 
index ac179e6..6a7c6bd 100644 (file)
@@ -123,19 +123,15 @@ 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);
 
-#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
+#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);
-#endif
-
-#ifdef CONFIG_ARCH_TEGRA_3x_SOC
 void tegra_dvfs_age_cpu(int cur_linear_age);
 #else
+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; }
 static inline void tegra_dvfs_age_cpu(int cur_linear_age)
 { return; }
 #endif
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;
 };
index fffccc5..a165e50 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;
@@ -1961,6 +1955,7 @@ 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);
 
@@ -1989,13 +1984,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(HSIC_IDLE_WAIT_DELAY);
-       val |= UHSIC_ELASTIC_UNDERRUN_LIMIT(HSIC_ELASTIC_UNDERRUN_LIMIT);
-       val |= UHSIC_ELASTIC_OVERRUN_LIMIT(HSIC_ELASTIC_OVERRUN_LIMIT);
+       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);
        writel(val, base + UHSIC_HSRX_CFG0);
 
        val = readl(base + UHSIC_HSRX_CFG1);
-       val |= UHSIC_HS_SYNC_START_DLY(HSIC_SYNC_START_DELAY);
+       val |= UHSIC_HS_SYNC_START_DLY(config->sync_start_delay);
        writel(val, base + UHSIC_HSRX_CFG1);
 
        /* WAR HSIC TX */
index 5301644..ecb669b 100644 (file)
@@ -49,17 +49,18 @@ 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 7dc9fa1..611e91c 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 = 0;
+       unsigned long flags;
 
        if (!i2c_dev->chipdata->has_xfer_complete_interrupt) {
                spin_lock_irqsave(&i2c_dev->fifo_lock, flags);
index ef5c701..c85cf42 100644 (file)
@@ -22,8 +22,6 @@
 #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 ec36176..b2375d2 100644 (file)
@@ -26,7 +26,6 @@
 #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 756675f..76499e0 100644 (file)
@@ -2494,17 +2494,16 @@ 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 1a6e970..b778e3d 100644 (file)
@@ -1101,6 +1101,36 @@ 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);
@@ -1160,7 +1190,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, NULL);
+                               tps_pdata->reg_init_data, ri);
                if (IS_ERR_OR_NULL(rdev)) {
                        dev_err(&pdev->dev,
                                "register regulator failed %s\n",
index f118394..9a6a8e7 100644 (file)
@@ -37,7 +37,6 @@
 #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"
@@ -497,6 +496,7 @@ 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 dd458b3..05de12d 100644 (file)
@@ -241,6 +241,13 @@ 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 5ad3b95..0e14fa8 100644 (file)
@@ -1184,23 +1184,11 @@ 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->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;
-       }
+       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;
 
        tegra_aic326x_dai[DAI_LINK_HIFI].cpu_dai_name =
        tegra_i2s_dai_name[machine->codec_info[HIFI_CODEC].i2s_id];
index f52b56f..df3e853 100644 (file)
@@ -1151,22 +1151,16 @@ 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->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;
+       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;
        }
 
        tegra_max98088_dai[DAI_LINK_HIFI].cpu_dai_name =