Age | Commit message (Collapse) | Author |
|
As part of suspend/resume for sd/emmc cards, added
power rail enable/disable feature to save power drawn
from the rail.Verified SD card, emmc and wifi functionality
after device wakes up from LP0.
Bug 671029: SDHCI Suspend/Resume optimization
Tested on: Android whistler+harmony.
Change-Id: I2d25feb8c7c0930912aa4091f8def9d37ad9eb81
Reviewed-on: http://git-master/r/1214
Reviewed-by: Gary King <gking@nvidia.com>
Tested-by: Gary King <gking@nvidia.com>
|
|
Fixed undeclared variable causing build break.
Change-Id: I5c4b9483e25694123bedc05327c309d607bd04ff
Reviewed-on: http://git-master/r/1265
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Tested-by: Yu-Huan Hsu <yhsu@nvidia.com>
|
|
Enable the sdio controller clk before the sd stack
begins to enumerate the card during system resume.
Failing to do so results in timeout errors and
the sd card fails to mount
Change-Id: I2f5399003e21d71c6a3c4776fcefda430bca20ef
Reviewed-on: http://git-master/r/1262
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Tested-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Narendra Damahe <ndamahe@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
|
|
The sd controller clock will be switch on/off on a per transaction
basis, this will ensure that the clock is off during OSIdle which
should inturn help better DVFS results.
fix for Bug:673699
Change-Id: If479fe4aea6ae2c00818c84b43fc38a66437c643
Reviewed-on: http://git-master/r/1242
Reviewed-by: Janne Hellsten <jhellsten@nvidia.com>
Tested-by: Janne Hellsten <jhellsten@nvidia.com>
|
|
Change-Id: I30872e9905b7bdf1cca56e53089e5cfde7586798
Reviewed-on: http://git-master/r/1026
Reviewed-by: Gary King <gking@nvidia.com>
Tested-by: Gary King <gking@nvidia.com>
|
|
Use CONFIG_ARCH_TEGRA_XX_SOC defines for differentiating
between various tegra SOCs instead of getting the SOC caps
from the RM. With this change enabling quirks for various
chips would be much simpler.
Tested on Android, whistler.
Bug 661035 SD 3.0 support in the linux native driver.
Change-Id: I0a85f3464d00080673a351d1614f311f1855bdae
Reviewed-on: http://git-master/r/969
Reviewed-by: Gary King <gking@nvidia.com>
Tested-by: Gary King <gking@nvidia.com>
|
|
Implement suspend/resume functionality for the tegra-sdhci driver.
Call the sdhci_suspend/resume functions which handles the power off
and re-enumeration of sd memory cards. We ignore suspend/resume
requests for all sdio devices asssuming that the individual drivers
will manage their own power.
For tegra devices, the wifi driver implements its own early suspend
model and hence is ignored by the sdhci driver.
Change-Id: I5041d314123bac958da7775ee24bd2dc1be55ab5
Change-Id: I5041d314123bac958da7775ee24bd2dc1be55ab5
Reviewed-on: http://git-master/r/852
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Gary King <gking@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Rahul Bansal <rbansal@nvidia.com>
Tested-by: Rahul Bansal <rbansal@nvidia.com>
Reviewed-by: Venkata (Muni) Anda <vanda@nvidia.com>
|
|
csd_struct version on some of the cards is 4.4 cards is 3. This change
skips the check for that verison.
Change-Id: Ib44344237c99e1a52e1b3eb864e96194b090929b
Reviewed-on: http://git-master/r/739
Reviewed-by: Gary King <gking@nvidia.com>
Tested-by: Gary King <gking@nvidia.com>
|
|
eMMC v4.4 cards report ext_csd version of 5. Mmc
card enumeration fails for these cards. Included
the latest version numbers.
Change-Id: I5c6914ef8906eed80cba15249b0760d71e3d0255
Reviewed-on: http://git-master/r/734
Reviewed-by: Jitendra Aditya Lanka <jlanka@nvidia.com>
Reviewed-by: Gary King <gking@nvidia.com>
Tested-by: Gary King <gking@nvidia.com>
|
|
the card detect callback needs card_detect to be set correctly in order
to properly handle error cleanup when the card is removed during
transfer.
Change-Id: I6540f47875c56582edb4f62d4615687d59d67d93
|
|
The issue was due to incorrect card present check in sdhci-tegra.c
because of which the ro status of card was always returned as -1. This
implied that host does not support reading ro switch and the card was
assumed to be write enabled.
Fixed by correcting the card present check.
Bug 657078 ([AP20/Android/Whistler/Storage]: Able to copy data even
though sdcard is write-protected)
|
|
commit 829e8e97 introduced a per-host card_detect mechanism, but
didn't initialize the card_detect value when controllers registered
themselves.
as a result, fixed cards (e.g., emmc) or cards inserted at boot time
were not detected.
Change-Id: I2f701873d7e078648166af8d826d25cc7efc099f
|
|
In mmc_cleanup_queue, queuedata is being set to null before stopping
the mmc_queue thread. This triggers cleaning up of request queue while
it is still being accessed from the thread which results in null pointer
dereferencing in its execution path thus causing the crash.
Fixed it by:
1. Stopping the thread first and then making queuedata null.
2. If card is not present then clean up the queue to prevent further
processing of requests.
Part of fix for Bug 619171
Change-Id: I4360667e843f41d8e889db3df7755476a1c36714
|
|
Enabled new present state quirk(SDHCI_QUIRK_PRESENT_STATE_REGISTER_INVALID)
for tegra and modified the driver to report the card present status
based on GPIO.
Part of fix for Bug 619171
Change-Id: I2003fa4210818cb477910df56ccd0f1f4f62fd56
|
|
Tegra does not use the present state register for determining card
present status and thus returns incorrect status.
Aadded a quirk(SDHCI_QUIRK_PRESENT_STATE_REGISTER_INVALID) to enable
the host controller to query for card present status in a platform
specific way.
Part of fix for Bug 619171
Change-Id: I396f9dbbfb8f21651625403503cec9a5aac3e711
|
|
Using delayed suspend prevents the system from going into suspend.
The delayed suspend work queue acquires a wakelock and the power
manager kicks in before the delayed suspend gets scheduled.
|
|
Implement the enable and disable handlers introduced in the mmc_ops structure.
Use the enable and disable handlers for dynamic clocking of SD memory devices.
SD clock is enabled when the sdhci host is claimed and clk is disabled when
host is released.
Use delayed suspend for better performance.
Change-Id: Ied5e0f00c41abd4f6d0918405356a9983ae06552
|
|
android-tegra-2.6.29
|
|
MMC hosts that support power saving can use the 'enable' and 'disable'
methods to exit and enter power saving states. An explanation of their
use is provided in the comments added to include/linux/mmc/host.h.
Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Acked-by: Matt Fleming <matt@console-pimps.org>
Cc: Ian Molton <ian@mnementh.co.uk>
Cc: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Cc: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Cc: Denis Karpov <ext-denis.2.karpov@nokia.com>
Cc: Pierre Ossman <pierre@ossman.eu>
Cc: Philip Langdale <philipl@overt.org>
Cc: "Madhusudhan" <madhu.cr@ti.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Conflicts:
drivers/mmc/core/core.c
include/linux/mmc/host.h
tegra: cherry picked patch 8ea926b22e2d13238e4d65d8f61c48fe424e6f4f
Change-Id: Iaaaaecd00452760a9bcea43f41af97bcbccef058
|
|
This reverts commit 179fa807239b85a471b046a5ba75dce7c0f68dec.
Need to add dynamic clocking the right way, i.e. as part enable/disable
mmc_ops handler. Commit to follow soon.
Change-Id: I74245b0c7ba9da5c839b08fbe7dce293080a06a4
|
|
AP20 SDMMC controller has the following deviations from the specification.
1. Provides the specification version as 0 instead of 1.
2. Maximum allowed ADMA descriptor length is 32KB instead of 64KB.
Enabled ADMA2 option in the MMC driver by adding the sw WARs for the
above two issues.
Tested on: Android
Bug: 620234
|
|
On certain embedded devices, leaving the card clock enabled on
SD memory devices with no active transactions can increase
power consumption. Enable this option to automatically disable
the card clock after a transfer completes.
Change-Id: I6da3388c1528bf1334c3534b7251a526812199f1
|
|
for sector-addressed cards, the CSD capacity will generally be a small
number, and this will often be less than the byte offset of the
EMBEDDED_MMC_START_OFFSET. bugging in this case is wrong.
|
|
removes some unnecessary status prints in tegra_udc.c and sdhci-tegra.c
fixes the type in the tegra driver name in fsl_udc_core.c
|
|
update sdhci driver to reflect correct typename
Change-Id: I350196cdde9c52a8cac7e74d041a15a683f8bc1c
|
|
Adds an MMC driver for Tegra AP15 and AP16 SoCs using the NVIDIA Tegra SDIO
DDK
|
|
Tegra's internal MMC controller is SDHCI compliant; this adds an SDHCI
driver using NvOdm and NvRm APIs for managing board clocks
Change-Id: I019feb4850dc262d8262723f39a34c08ef75fa19
|
|
on some (mostly SoC) controllers, the maximum clock speed reported by the
controller may not be achievable on the platform. use a callback function
to allow for greater flexibility for these systems
|
|
enables platforms which do not support the standard card detection interrupt
to trigger the card detection using a platform-specific handler
|
|
on platforms which support dynamic clock configuration, better performance and
power may be obtained by calling a controller's set_clock routine rather than
assuming that the input clock to the controller is always max_clk
|
|
don't change CTRL_HISPD bit after switching to high-speed mode on controllers
which have this quirk
|
|
|
|
some controllers need to have INTERRUPT_AT_BLOCK_GAP enabled to detect
card interrupts in SDIO mode
|
|
call a host-specified callback function to detect card read-only status on
hosts which do not detect the write protect flag correctly
|
|
properly unpacks the boot sector extension in MMC 4.4 CID responses
|
|
enables platforms to specify a non-zero offset for the MBR and kernel-visible
file systems, for embedded systems which store proprietary data at the start
of the eMMC device.
|
|
mmc: add MMC_CAP_NONREMOVABLE host capability
eMMC's are not removable, so unsafe resume is OK always.
To permit this a new host capability MMC_CAP_NONREMOVABLE has been added
and suspend / resume updated accordingly.
Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Acked-by: Matt Fleming <matt@console-pimps.org>
Cc: Ian Molton <ian@mnementh.co.uk>
Cc: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Cc: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Cc: Denis Karpov <ext-denis.2.karpov@nokia.com>
Cc: Pierre Ossman <pierre@ossman.eu>
Cc: Philip Langdale <philipl@overt.org>
Cc: "Madhusudhan" <madhu.cr@ti.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Conflicts:
include/linux/mmc/host.h
|
|
Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
|
|
Conflicts:
MAINTAINERS
arch/arm/Kconfig
arch/arm/Makefile
arch/arm/boot/compressed/head.S
arch/arm/common/Makefile
arch/arm/configs/realview-smp_defconfig
arch/arm/configs/realview_defconfig
arch/arm/configs/versatile_defconfig
arch/arm/include/asm/elf.h
arch/arm/include/asm/uaccess.h
arch/arm/kernel/module.c
arch/arm/kernel/signal.c
arch/arm/mach-realview/Kconfig
arch/arm/mach-realview/Makefile
arch/arm/mach-realview/core.c
arch/arm/mach-realview/core.h
arch/arm/mach-realview/include/mach/board-pba8.h
arch/arm/mach-realview/include/mach/debug-macro.S
arch/arm/mach-realview/include/mach/hardware.h
arch/arm/mach-realview/include/mach/irqs.h
arch/arm/mach-realview/include/mach/memory.h
arch/arm/mach-realview/include/mach/uncompress.h
arch/arm/mach-realview/localtimer.c
arch/arm/mach-realview/platsmp.c
arch/arm/mach-realview/realview_eb.c
arch/arm/mach-realview/realview_pb1176.c
arch/arm/mach-realview/realview_pb11mp.c
arch/arm/mach-realview/realview_pba8.c
arch/arm/mm/Kconfig
arch/arm/mm/copypage-v6.c
arch/arm/mm/dma-mapping.c
arch/arm/mm/proc-v7.S
arch/arm/oprofile/op_model_mpcore.c
arch/arm/tools/mach-types
arch/arm/vfp/vfpmodule.c
drivers/mtd/maps/integrator-flash.c
drivers/net/smsc911x.c
drivers/net/smsc911x.h
|
|
Signed-off-by: Bentao Zou <bzou1@motorola.com>
Signed-off-by: David Ding <david.j.ding@motorola.com>
Signed-off-by: San Mehat <san@google.com>
|
|
In the write recovery routine, the data to get from the card
is allocated from the stack. The DMA mapping documentation says
explicitly stack memory is not mappable by any of the DMA calls.
Change to using kmalloc() to allocate the memory for the result
from the card and then free it once we've finished with the
transaction.
[ Changed to GFP_KERNEL allocation - Pierre Ossman ]
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
Signed-off-by: San Mehat <san@google.com>
|
|
With this patch, mmc_rescan can detect the removal of an mmc card and
the insertion of (possibly another) card in the same run. This means
that a card change can be detected without having to call
mmc_detect_change multiple times.
This change generalises the core such that it can be easily used by
hosts which provide a mechanism to detect only the presence of a card
reader cover, which has to be taken off in order to insert a card. Other
hosts ("card detect" or "MMC_CAP_NEEDS_POLL") each receive an event when
a card is removed and when a card is inserted, so it is sufficient for
them if mmc_rescan handles only one event at a time. "Cover detect"
hosts, however, only receive events about the cover status. This means
that between 2 subsequent events, both a card removal and a card
insertion can occur. In this case, the pre-patch version of mmc_rescan
would only detect the removal of the previous card but not the insertion
of the new card.
Signed-off-by: Jorg Schummer <ext-jorg.2.schummer@nokia.com>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
Signed-off-by: San Mehat <san@android.com>
Conflicts:
drivers/mmc/core/core.c
Signed-off-by: San Mehat <san@google.com>
|
|
The TI controller on Toshiba Tecra M5 needs more time to power up or
the cards will init incorrectly or not at all.
Signed-off-by: José M. Fernández <josemariafg@gmail.com>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
Signed-off-by: San Mehat <san@google.com>
|
|
The block layer does not support very low sector count restrictions
so we need to be prepared to handle bigger requests than we can send
directly to the controller.
Problem found by Manuel Lauss.
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
Signed-off-by: San Mehat <san@google.com>
|
|
During mmc unsafe resume, choose the right voltage for the card after
powerup.
Although this has not seen to cause trouble, it's the wrong behaviour.
Signed-off-by: Balaji Rao <balajirrao@openmoko.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: San Mehat <san@google.com>
|
|
Extended CSD is a MMC card register. As increasingly interesting
fields are being added to Extended CSD, it is helpful to see its
value. Note that SD cards do not have an Extended CSD
register, so it is MMC only.
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: San Mehat <san@google.com>
|
|
Currently we are using an explicit udev rule to trigger loading of the
mmc-block module when an MMC or SD card is detected:
SUBSYSTEM=="mmc", RUN+="/sbin/modprobe -Qba mmc-block"
It makes much more sense for the mmc bus driver and the mmc-block module to
share MODALIAS information so that they are linked automatically.
There is no real information of use in the MMC system at the current time.
All devices inserted require us to load the mmc-block device. Until such
time as useful parameters exist simply reflect the module linkage via
the module alias below:
mmc:block
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: San Mehat <san@google.com>
|
|
The delayed work item mmc_host.detect is now cancelled before flushing
the work queue. This takes care of cases when delayed_work was scheduled
for mmc_host.detect, but not yet placed in the work queue.
Signed-off-by: Jorg Schummer <ext-jorg.2.schummer@nokia.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: San Mehat <san@google.com>
|
|
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
|
|
This reverts commit 5ca694dfd981a371e9b18cdd4a89c002ffaccbc5.
Conflicts:
drivers/mmc/card/Kconfig
drivers/mmc/card/block.c
Signed-off-by: San Mehat <san@google.com>
|