diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2012-11-12 15:28:39 +0100 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2012-11-12 15:28:39 +0100 |
commit | f987e832a9e79d2ce8009a5ea9c7b677624b3b30 (patch) | |
tree | 0dd09a5e6b4c60ee0a9916907dfc2cda83f3e496 /arch/arm/mach-tegra/include | |
parent | f737b7f46a72c099cf8ac88baff02fbf61b1a47c (diff) | |
parent | fc993d9bc48f772133d8cd156c67c296477db070 (diff) |
Merge branch 'l4t/l4t-r16-r2' into colibri
Conflicts:
arch/arm/mach-tegra/tegra3_usb_phy.c
arch/arm/mach-tegra/usb_phy.c
drivers/usb/gadget/tegra_udc.c
drivers/usb/otg/Makefile
drivers/video/tegra/fb.c
sound/soc/tegra/tegra_pcm.c
Diffstat (limited to 'arch/arm/mach-tegra/include')
-rw-r--r-- | arch/arm/mach-tegra/include/mach/dc.h | 16 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/io_dpd.h | 30 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/latency_allowance.h | 40 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/tegra-bb-power.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/tegra_asoc_pdata.h | 15 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/tegra_e1853_pdata.h | 55 |
6 files changed, 115 insertions, 43 deletions
diff --git a/arch/arm/mach-tegra/include/mach/dc.h b/arch/arm/mach-tegra/include/mach/dc.h index 97f02ce6e95d..d7aaed0bdcdc 100644 --- a/arch/arm/mach-tegra/include/mach/dc.h +++ b/arch/arm/mach-tegra/include/mach/dc.h @@ -24,6 +24,7 @@ #include <linux/pm.h> #include <linux/types.h> +#include <linux/fb.h> #include <drm/drm_fixed.h> #define TEGRA_MAX_DC 2 @@ -368,6 +369,8 @@ struct tegra_dc_out { u8 *out_sel_configs; unsigned n_out_sel_configs; + bool user_needs_vblank; + struct completion user_vblank_comp; int (*enable)(void); int (*postpoweron)(void); @@ -525,6 +528,8 @@ bool tegra_dc_get_connected(struct tegra_dc *); bool tegra_dc_hpd(struct tegra_dc *dc); +void tegra_dc_get_fbvblank(struct tegra_dc *dc, struct fb_vblank *vblank); +int tegra_dc_wait_for_vsync(struct tegra_dc *dc); void tegra_dc_blank(struct tegra_dc *dc); void tegra_dc_enable(struct tegra_dc *dc); @@ -539,6 +544,9 @@ void tegra_dc_incr_syncpt_min(struct tegra_dc *dc, int i, u32 val); */ int tegra_dc_update_windows(struct tegra_dc_win *windows[], int n); int tegra_dc_sync_windows(struct tegra_dc_win *windows[], int n); +int tegra_dc_config_frame_end_intr(struct tegra_dc *dc, bool enable); +bool tegra_dc_is_within_n_vsync(struct tegra_dc *dc, s64 ts); +bool tegra_dc_does_vsync_separate(struct tegra_dc *dc, s64 new_ts, s64 old_ts); int tegra_dc_set_mode(struct tegra_dc *dc, const struct tegra_dc_mode *mode); struct fb_videomode; @@ -565,10 +573,6 @@ struct tegra_dc_pwm_params { void tegra_dc_config_pwm(struct tegra_dc *dc, struct tegra_dc_pwm_params *cfg); int tegra_dsi_send_panel_short_cmd(struct tegra_dc *dc, u8 *pdata, u8 data_len); -void tegra_dc_host_suspend(struct tegra_dc *dc); -void tegra_dc_host_resume(struct tegra_dc *dc); -int tegra_dsi_host_suspend(struct tegra_dc *dc); -int tegra_dsi_host_resume(struct tegra_dc *dc); int tegra_dc_update_csc(struct tegra_dc *dc, int win_index); @@ -588,4 +592,8 @@ struct tegra_dc_edid { struct tegra_dc_edid *tegra_dc_get_edid(struct tegra_dc *dc); void tegra_dc_put_edid(struct tegra_dc_edid *edid); +int tegra_dc_set_flip_callback(void (*callback)(void)); +int tegra_dc_unset_flip_callback(void); +int tegra_dc_get_panel_sync_rate(void); + #endif diff --git a/arch/arm/mach-tegra/include/mach/io_dpd.h b/arch/arm/mach-tegra/include/mach/io_dpd.h index 8d153792b798..6eb05c3f1b93 100644 --- a/arch/arm/mach-tegra/include/mach/io_dpd.h +++ b/arch/arm/mach-tegra/include/mach/io_dpd.h @@ -1,7 +1,7 @@ /* * arch/arm/mach-tegra/include/mach/io_dpd.h * - * Copyright (C) 2012 NVIDIA Corporation. + * 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 @@ -16,25 +16,23 @@ #ifndef __MACH_TEGRA_IO_DPD_H #define __MACH_TEGRA_IO_DPD_H +#include <linux/delay.h> + +/* Tegra io dpd entry - for each supported driver */ +struct tegra_io_dpd { + const char *name; /* driver name */ + u8 io_dpd_reg_index; /* io dpd register index */ + u8 io_dpd_bit; /* bit position for driver in dpd register */ + u8 need_delay_dpd; /* work around to delay dpd after lp0*/ + struct delayed_work delay_dpd; + struct mutex delay_lock; +}; + /* Tegra io dpd APIs */ -#ifdef CONFIG_PM_SLEEP struct tegra_io_dpd *tegra_io_dpd_get(struct device *dev); /* get handle */ void tegra_io_dpd_enable(struct tegra_io_dpd *hnd); /* enable dpd */ void tegra_io_dpd_disable(struct tegra_io_dpd *hnd); /* disable dpd */ -#else -static inline struct tegra_io_dpd *tegra_io_dpd_get(struct device *dev) -{ - return NULL; -} -static inline void tegra_io_dpd_enable(struct tegra_io_dpd *hnd) -{ - /* Do nothing */ -} -static inline void tegra_io_dpd_disable(struct tegra_io_dpd *hnd) -{ - /* Do nothing */ -} -#endif +int tegra_io_dpd_init(void); #endif /* end __MACH_TEGRA_IO_DPD_H */ diff --git a/arch/arm/mach-tegra/include/mach/latency_allowance.h b/arch/arm/mach-tegra/include/mach/latency_allowance.h index 8644075a88b3..9861834ad9de 100644 --- a/arch/arm/mach-tegra/include/mach/latency_allowance.h +++ b/arch/arm/mach-tegra/include/mach/latency_allowance.h @@ -1,7 +1,7 @@ /* * arch/arm/mach-tegra/include/mach/latency_allowance.h * - * Copyright (C) 2011-2012 NVIDIA Corporation. + * Copyright (C) 2011-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 @@ -18,19 +18,19 @@ #define _MACH_TEGRA_LATENCY_ALLOWANCE_H_ enum tegra_la_id { - TEGRA_LA_AFIR = 0, - TEGRA_LA_AFIW, + TEGRA_LA_AFIR = 0, /* T30 specific */ + TEGRA_LA_AFIW, /* T30 specific */ TEGRA_LA_AVPC_ARM7R, TEGRA_LA_AVPC_ARM7W, TEGRA_LA_DISPLAY_0A, TEGRA_LA_DISPLAY_0B, TEGRA_LA_DISPLAY_0C, - TEGRA_LA_DISPLAY_1B, + TEGRA_LA_DISPLAY_1B, /* T30 specific */ TEGRA_LA_DISPLAY_HC, TEGRA_LA_DISPLAY_0AB, TEGRA_LA_DISPLAY_0BB, TEGRA_LA_DISPLAY_0CB, - TEGRA_LA_DISPLAY_1BB, + TEGRA_LA_DISPLAY_1BB, /* T30 specific */ TEGRA_LA_DISPLAY_HCB, TEGRA_LA_EPPUP, TEGRA_LA_EPPU, @@ -50,27 +50,27 @@ enum tegra_la_id { TEGRA_LA_MPCOREW, TEGRA_LA_MPCORE_LPR, TEGRA_LA_MPCORE_LPW, - TEGRA_LA_MPE_UNIFBR, - TEGRA_LA_MPE_IPRED, - TEGRA_LA_MPE_AMEMRD, - TEGRA_LA_MPE_CSRD, - TEGRA_LA_MPE_UNIFBW, - TEGRA_LA_MPE_CSWR, + TEGRA_LA_MPE_UNIFBR, /* T30 specific */ + TEGRA_LA_MPE_IPRED, /* T30 specific */ + TEGRA_LA_MPE_AMEMRD, /* T30 specific */ + TEGRA_LA_MPE_CSRD, /* T30 specific */ + TEGRA_LA_MPE_UNIFBW, /* T30 specific */ + TEGRA_LA_MPE_CSWR, /* T30 specific */ TEGRA_LA_FDCDRD, TEGRA_LA_IDXSRD, TEGRA_LA_TEXSRD, TEGRA_LA_FDCDWR, TEGRA_LA_FDCDRD2, - TEGRA_LA_IDXSRD2, - TEGRA_LA_TEXSRD2, + TEGRA_LA_IDXSRD2, /* T30 specific */ + TEGRA_LA_TEXSRD2, /* T30 specific */ TEGRA_LA_FDCDWR2, TEGRA_LA_PPCS_AHBDMAR, TEGRA_LA_PPCS_AHBSLVR, TEGRA_LA_PPCS_AHBDMAW, TEGRA_LA_PPCS_AHBSLVW, TEGRA_LA_PTCR, - TEGRA_LA_SATAR, - TEGRA_LA_SATAW, + TEGRA_LA_SATAR, /* T30 specific */ + TEGRA_LA_SATAW, /* T30 specific */ TEGRA_LA_VDE_BSEVR, TEGRA_LA_VDE_MBER, TEGRA_LA_VDE_MCER, @@ -79,11 +79,12 @@ enum tegra_la_id { TEGRA_LA_VDE_DBGW, TEGRA_LA_VDE_MBEW, TEGRA_LA_VDE_TPMW, - TEGRA_LA_VI_RUV, + TEGRA_LA_VI_RUV, /* T30 specific */ TEGRA_LA_VI_WSB, TEGRA_LA_VI_WU, TEGRA_LA_VI_WV, TEGRA_LA_VI_WY, + TEGRA_LA_MAX_ID }; @@ -106,6 +107,12 @@ static inline void tegra_disable_latency_scaling(enum tegra_la_id id) { return; } + +static inline void tegra_latency_allowance_update_tick_length( + unsigned int new_ns_per_tick) +{ + return; +} #else int tegra_set_latency_allowance(enum tegra_la_id id, unsigned int bandwidth_in_mbps); @@ -116,6 +123,7 @@ int tegra_enable_latency_scaling(enum tegra_la_id id, unsigned int threshold_high); void tegra_disable_latency_scaling(enum tegra_la_id id); +void tegra_latency_allowance_update_tick_length(unsigned int new_ns_per_tick); #endif #endif /* _MACH_TEGRA_LATENCY_ALLOWANCE_H_ */ diff --git a/arch/arm/mach-tegra/include/mach/tegra-bb-power.h b/arch/arm/mach-tegra/include/mach/tegra-bb-power.h index e0b7e3de326f..96e36116f04f 100644 --- a/arch/arm/mach-tegra/include/mach/tegra-bb-power.h +++ b/arch/arm/mach-tegra/include/mach/tegra-bb-power.h @@ -50,7 +50,7 @@ union tegra_bb_gpio_id { }; typedef struct platform_device* (*ehci_register_cb)(void); -typedef void (*ehci_unregister_cb)(struct platform_device *); +typedef void (*ehci_unregister_cb)(struct platform_device **); struct tegra_bb_pdata { union tegra_bb_gpio_id *id; diff --git a/arch/arm/mach-tegra/include/mach/tegra_asoc_pdata.h b/arch/arm/mach-tegra/include/mach/tegra_asoc_pdata.h index fff2fcc68269..7aada6940b39 100644 --- a/arch/arm/mach-tegra/include/mach/tegra_asoc_pdata.h +++ b/arch/arm/mach-tegra/include/mach/tegra_asoc_pdata.h @@ -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 @@ -25,20 +25,23 @@ #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]; }; diff --git a/arch/arm/mach-tegra/include/mach/tegra_e1853_pdata.h b/arch/arm/mach-tegra/include/mach/tegra_e1853_pdata.h new file mode 100644 index 000000000000..633f04855e6e --- /dev/null +++ b/arch/arm/mach-tegra/include/mach/tegra_e1853_pdata.h @@ -0,0 +1,55 @@ +/* + * arch/arm/mach-tegra/include/mach/tegra_e1853_pdata.h + * + * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#ifndef __MACH_TEGRA_E1853_PDATA_H +#define __MACH_TEGRA_E1853_PDATA_H + +#define NUM_AUDIO_CONTROLLERS 4 + +/* data format supported */ +enum i2s_data_format { + format_i2s = 0x1, + format_dsp = 0x2, + format_rjm = 0x4, + format_ljm = 0x8, + format_tdm = 0x10 +}; + +struct codec_info_s { + /* Name of the Codec Dai on the system */ + char *codec_dai_name; + /* Name of the I2S controller dai its connected to */ + char *cpu_dai_name; + char *codec_name; /* Name of the Codec Driver */ + char *name; /* Name of the Codec-Dai-Link */ + char *pcm_driver; /* Name of the PCM driver */ + enum i2s_data_format i2s_format; + int master; /* Codec is Master or Slave */ + /* TDM format setttings */ + int num_slots; /* Number of TDM slots */ + int slot_width; /* Width of each slot */ + int rx_mask; /* Number of Rx Enabled slots */ + int tx_mask; /* Number of Tx Enabled slots */ + +}; + +struct tegra_e1853_platform_data { + struct codec_info_s codec_info[NUM_AUDIO_CONTROLLERS]; +}; +#endif |