Commit Graph

211370 Commits

Author SHA1 Message Date
Gary King
54d4145704 [ARM] mm: add page allocator for modifying cache attributes
ARM CPUs with speculative prefetching have undefined behaviors when the
same physical page is mapped to two different virtual addresses with
conflicting cache attributes.

since many recent systems include IOMMU functionality (i.e., remapping
of discontiguous physical pages into a virtually-contiguous address
range for I/O devices), it is desirable to support allocating any
available OS memory for use by the I/O devices. however, since many
systems do not support cache coherency between the CPU and DMA devices,
these devices are left with using DMA-coherent allocations from the OS
(which severely limits the benefit of an IOMMU) or performing cache
maintenance (which can be a severe performance loss, particularly on
systems with outer caches, compared to using DMA-coherent memory).

this change adds an API for allocating pages from the OS with specific
cache maintenance properties and ensures that the kernel's mapping
of the page reflects the desired cache attributes, in line with the
ARMv7 architectural requirements

Change-Id: If0bd3cfe339b9a9b10fd6d45a748cd5e65931cf0
Signed-off-by: Gary King <gking@nvidia.com>
2010-10-08 15:58:59 -07:00
Gary King
ac21b32104 [ARM] mmu: add option to map lowmem with page mappings
add a kernel configuration to map the kernel's lowmem pages using PTE
mappings, rather than the default behavior of 1MiB section mappings.
on ARMv7 processors, to support allocating pages with DMA-coherent
cache attributes, the cache attributes specified in the kernel's
mapping must match cache attributes specified for other mappings;
to ensure that this is the case, the kernel's attributes must be
specified on a per-page basis.

to avoid problems caused by the init_mm page table allocations exceeding
the available initial memory, when this config is enabled lowmem is
initially mapped using sections (matches current behavior), then remapped
using pages after bootmem is initialized

Change-Id: I8a6feba1d6806d007e17d9d4616525b0446c0fb1
Signed-off-by: Gary King <gking@nvidia.com>
2010-10-08 15:58:59 -07:00
Chris Fries
bd3ee16444 [ARM] tegra: i2s: Add I2S ioctl for setting bit format
Added an ioctl to set the bit format for I2S between "DSP"/"PCM" mode and
normal mode (set by board file)

Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-10-08 15:41:54 -07:00
Colin Cross
aee8fd4a24 [ARM] tegra: irq: Implement retrigger
Change-Id: I5be02f60f1b0f35835a8d05abdb2934cdafb1122
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-07 16:14:49 -07:00
Colin Cross
08c6385bf9 [ARM] tegra: Combine tegra_fiq_select with enable/disable
Change-Id: Iba3dc43e1a95993a6278eea008c7a8610ed0cd4c
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-07 16:14:49 -07:00
Dmitry Shmidt
0142744b9a mmc: sdhci: Fix 4-bit wide support capability
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2010-10-07 10:55:04 -07:00
Iliyan Malchev
20366f5aa7 Revert "[ARM] tegra: driver for spdif audio"
This reverts commit 3543d53703.

Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-10-06 19:09:59 -07:00
Colin Cross
d335791e5b [ARM] tegra: i2s: Update pm_qos for 2.6.36
Change-Id: I205457db1432c672b026887defa8d498bc613412
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-06 19:05:06 -07:00
Chris Fries
0606142ca5 [ARM] tegra: correct device definition of second i2s controller
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-10-06 18:44:47 -07:00
Iliyan Malchev
5c4a97667f [ARM] tegra: hdmi: fix an incorrect register write
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-10-06 16:29:15 -07:00
Iliyan Malchev
9604223246 [ARM] tegra: tegra_hsuart: fix a typo
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-10-06 16:29:14 -07:00
Iliyan Malchev
fd7a27ca4b [ARM] tegra: dma: fix a typo
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-10-06 16:29:13 -07:00
Ravindra Lokhande
3543d53703 [ARM] tegra: driver for spdif audio
-- creates /dev/spdif_out and /dev/spdif_out_ctl for playback and control
   settings.
-- playback only

Change-Id: I19af1d41e13dedef650784835339ef9718300d0c
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-10-06 16:29:12 -07:00
Iliyan Malchev
dc6eebfb6f [ARM] tegra: add spdif device and resources
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-10-06 16:29:11 -07:00
Iliyan Malchev
49c9a88333 [ARM] tegra_i2s_audio: add more elaborate error counts
This patch replaces the error counter with two separate error counters, one for
late dma callbacks, and another for overruns (during recording) or underruns
(during playback).  The ioctls TEGRA_AUDIO_IN_GET_ERROR_COUNT and
TEGRA_AUDIO_OUT_GET_ERROR_COUNT now take a pointer to a struct containing both
error counters.

Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-10-06 16:29:10 -07:00
Iliyan Malchev
d25a67d8d2 [ARM] tegra_i2s_audio: use pm_qos to prevent DMA-callback delays
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-10-06 16:29:09 -07:00
Dima Zavin
d7675db725 ARM: tegra: parent sclk on pll_m_out1 so it can run @ 240Mhz
Since sclk no longer needs pll_p_out4, don't explicitly enable it.

Change-Id: I47debdd3402e02967f77ebd4c3b8c4594ece4083
Signed-off-by: Dima Zavin <dima@android.com>
2010-10-06 16:29:08 -07:00
Dima Zavin
8f84cdf950 ARM: tegra: provide the correct max rates for pclk and sclk
Change-Id: Ieb1ae5356df26e0c9be631b9f58c641a350dc4eb
Signed-off-by: Dima Zavin <dima@android.com>
2010-10-06 16:29:08 -07:00
Dima Zavin
bc631923b5 ARM: tegra: add a virtual cop clock for AVP reset assertion
Change-Id: Ib27e5191d78f7994d444167b7d3a981a43f59b3c
Signed-off-by: Dima Zavin <dima@android.com>
2010-10-06 16:29:07 -07:00
Dima Zavin
b63adaa65d ARM: tegra: enable clk reset for non-peripheral clocks
Add a new 'reset' clk op. This can be provided for any clock,
not just peripherals.

Change-Id: I0742cfad1587ddc006066c7fa9bc22f180c04e6f
Signed-off-by: Dima Zavin <dima@android.com>
2010-10-06 16:29:06 -07:00
Gary King
33264d0f2c tegrafb: fix section mismatch in host driver skeleton
Change-Id: I2cf4646c8e362f591e8f1e5d6c0573fd7aee4365
Signed-off-by: Gary King <gking@nvidia.com>
2010-10-06 16:29:05 -07:00
Gary King
0fff39e0a4 tegrafb: add forward-decls for structs used in function prototypes
Change-Id: Ief5f09f9340362197b01adeef28fbd42cd0a7a06
Signed-off-by: Gary King <gking@nvidia.com>
2010-10-06 16:29:04 -07:00
Gary King
93d52f24df tegra: iovmm-gart: move init call to subsys_initcall
nvmap and nvhost will behave improperly if iovmm is not present when
their respective devices are probed; however, the probe ordering depends
on the order the initcalls are made to register the drivers. move
iovmm-gart into subsys_initcall to ensure that it is registered earlier
than other drivers

Change-Id: If3e07ce239e593a0833a3381cd1132f5d6ef6786
Signed-off-by: Gary King <gking@nvidia.com>
2010-10-06 16:29:03 -07:00
Gary King
e91ad7bcf4 touchscreen: panjit: use multi-touch reporting interface
Change-Id: I2bcad8cd07725e36598545168f33b87b9f217c11
Signed-off-by: Gary King <gking@nvidia.com>
2010-10-06 16:29:02 -07:00
Gary King
0d04558239 [ARM] tegra: ventana: fix pinmux for bluetooth and gas gauge
Fixes by Anantha Idapalapati <aidapalapati@nvidia.com> and
Mayuresh Kulkarni <mkulkarni@nvidia.com>

Change-Id: Ib7599d3593a8cc19b5b6dce451f3b203d4c5b70f
Signed-off-by: Gary King <gking@nvidia.com>
2010-10-06 16:29:02 -07:00
Gary King
13ac791d28 [ARM] tegra: ventana: add OTG device
Change-Id: Ie35453a385221b6d1f8b7eb05ed19e550a4c1d16
Signed-off-by: Gary King <gking@nvidia.com>
2010-10-06 16:29:01 -07:00
Gary King
7d169a589c [ARM] tegra: add tegra-otg and tegra_uart to devices.c
Change-Id: Icdc0de036566220f337a21d5b1bae0e81057f115
Signed-off-by: Gary King <gking@nvidia.com>
2010-10-06 16:29:00 -07:00
Gary King
e9ba19bc3f usb: add OTG driver for tegra USB PHY
Change-Id: I23be62e819b658c0e25f70eebfbb8dc0dc76c173
Signed-off-by: Gary King <gking@nvidia.com>
2010-10-06 16:28:59 -07:00
Benoit Goby
4929bfebc7 usb: gadget: fsl_udc: Removed unnecessary checks
The OTG driver disables the gadget device when the cable is
removed, so there is no need to check if the cable is plugged
before touching registers.

Change-Id: I0b1a3a8b07560d3eca2e2e25574b5219e3373808
Signed-off-by: Benoit Goby <benoit@android.com>
2010-10-06 16:28:58 -07:00
Benoit Goby
2973ae6586 usb: gadget: fsl_udc: Unlock the spinlock before calling clk_enable
On suspend, dr_controller_stop disable interrupts and on resume, interrupts
are disabled until dr_controller_run is called, so it is safe to call
fsl_udc_clk_suspend/resume with interrupts and the spinlock unlocked.

Change-Id: I33618295ea096a4bfd796d1a07dfc9722e7786b0
Signed-off-by: Benoit Goby <benoit@android.com>
2010-10-06 16:28:57 -07:00
Benoit Goby
e6483a8c8e usb: gadget: fsl_udc: fix warning
Change-Id: I2123ac05aafe3f89db3c17dbcb16b44ca6222ce2
Signed-off-by: Benoit Goby <benoit@android.com>
2010-10-06 16:28:56 -07:00
Benoit Goby
3e2e63c72b [ARM] tegra: usb_phy: fix warning
Change-Id: I10d3f7b001a13d4689adb64a7b4bf06626b6c786
Signed-off-by: Benoit Goby <benoit@android.com>
2010-10-06 16:28:55 -07:00
Erik Gilling
cd264512d1 video: tegra: remove out of date TODO
Change-Id: I47d065e3cd89276c951a77dc76db02eecf1257a3
Signed-off-by: Erik Gilling <konkers@android.com>
2010-10-06 16:28:55 -07:00
Erik Gilling
400abc9044 video: tegra: force 24bit output on HDMI
Signed-off-by: Erik Gilling <konkers@android.com>
Change-Id: I180bc0219485c96f3e24f0fa415fdaa488c56c8c
2010-10-06 16:28:54 -07:00
Erik Gilling
0cc38a4d73 video: tegra: enable both display controller clock when enabling hdmi
The upstream DC needs to be clocked for accesses to HDMI to not hard lock the
system.  Because we don't know if HDMI is conencted to disp1 or disp2 we need
to enable both until we set the DC mux.

Change-Id: Iab7df9911aa9034ea559896850787e4eff3237d7
Signed-off-by: Erik Gilling <konkers@android.com>
2010-10-06 16:28:53 -07:00
Erik Gilling
5dd86d80fd video: tegra: add a no_vsync module param to disable vsync
Change-Id: Icc950e1a94a7441dd820b774f8656b3db1be0e20
Signed-off-by: Erik Gilling <konkers@android.com>
2010-10-06 16:28:52 -07:00
Benoit Goby
3cea820b3c usb: gadget: fsl_udc: Use dma_alloc_coherent to allocate the status buffer
Change-Id: I7c17b7f8a8b89c6a687f6e2604542dabecc4cfa7
Signed-off-by: Benoit Goby <benoit@android.com>
2010-10-06 16:28:51 -07:00
Gary King
04ace134c9 [ARM] tegra: ventana: register tps6586x interrupts
configure the PMC interrupt polarity low, and register IRQ
numbers with the TPS6586X core and RTC

Change-Id: Iba08704bd1355ed00af3d9132118ce095c5118fe
Signed-off-by: Gary King <gking@nvidia.com>
2010-10-06 16:28:50 -07:00
Gary King
15e4e8998b rtc: tps6586x: add alarm support to tps6586x driver
Signed-off-by: Gary King <gking@nvidia.com>
2010-10-06 16:28:49 -07:00
Gary King
7ec6215759 mfd: tps6586x: add basic interrupt support
add support for enabling and disabling tps6586x subdevice interrupts

Signed-off-by: Gary King <gking@nvidia.com>
2010-10-06 16:28:49 -07:00
Erik Gilling
cd065982a8 video: tegra: set output color depth on init/resume
Signed-off-by: Erik Gilling <konkers@android.com>
Change-Id: If7e0af98910c68cc53227990ab2970a934e3867c
2010-10-06 16:28:48 -07:00
Todd Poynor
6bdd0cc0ef [ARM] Tegra: SPI: Suspend/resume.
Save/restore SLINK_COMMAND_0 register.

Wait for in-progress transactions to complete before suspend.

Reject and WARN_ON transactions when suspended.

Change-Id: I0527781f0bf95781afa3a35a68282cde2f0189ae
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2010-10-06 16:28:47 -07:00
Colin Cross
0d2beae104 [ARM] twd: Always calibrate local timer
Change-Id: I075f883739d0eeea3b6b10da003119431cf3c2d2
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-06 16:28:46 -07:00
Erik Gilling
97460a796b video: tegra: set border color to black on init
Change-Id: Ib8fe2722ab98b3d8a34edc2a26b6b5d4dd338973
Signed-off-by: Erik Gilling <konkers@android.com>
2010-10-06 16:28:45 -07:00
Erik Gilling
0c3d043251 video: tegra: force blend update on enable/disable not suspend/resume
Change-Id: I2d47d820311554b29db302ab9370574f2112cb51
Signed-off-by: Erik Gilling <konkers@android.com>
2010-10-06 16:28:44 -07:00
Colin Cross
0ac814f312 [ARM] twd: Fix updating control register in set_mode
Change-Id: I5096cc3fedf51024c332adbb846689e01e1f7ce0
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-06 16:28:43 -07:00
Colin Cross
b0cb9f5dd0 mmc: host: sdhci-tegra: Add no hispd quirk
Change-Id: I3a4f1b8960a5cc71af31aeef8c5285c0cfefe145
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-06 16:28:42 -07:00
Colin Cross
6f18d64316 mmc: host: sdhci: Prevent IRQ capability from being set if quirk is set
Change-Id: I18a622844a69ed00fee798786c28c75d10ba7c81
Signed-off-by: Colin Cross <ccross@android.com>
2010-10-06 16:28:41 -07:00
Iliyan Malchev
649033883b enable tegra_i2s_audio
Change-Id: I0b6bfba1f2084d5d05929c2066a49a6c7413c54a
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-10-06 16:28:41 -07:00
Dima Zavin
c5565e5628 ARM: tegra: powergate the mpe and 3d cores at boot
Change-Id: I6ca09db039cd80eab18d062a7a4b5d2a93bd385e
Signed-off-by: Dima Zavin <dima@android.com>
2010-10-06 16:28:40 -07:00