mmc_select_powerclass() function returns error if eMMC
VDD level supported by host is between 2.7v to 3.2v.
According to eMMC specification, valid voltage for high
voltage cards is 2.7v to 3.6v. This patch ensures that
2.7v to 3.6v VDD range is treated as valid range.
Also, failure to set the power class shouldn't be treated
as fatal error because even if setting the power class
fails, card can still work in default power class.
If mmc_select_powerclass() returns error, just print
the warning message and go ahead with rest of the card
initialization.
Change-Id: I3371458d852a05518b966041775fff59c04d255c
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This function fixes few possible buffer overflow
conditions in find_most_appropriate_phase()
function.
Change-Id: Icc17469a3850aa8531a6ef176bacc83fa2c50159
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Merge Upstream's stable 3.0.21 branch into msm-3.0
This consists 814 commits and some merge conflicts.
The merge conflicts are because of some local changes to
msm-3.0 as well as some conflicts between google's tree and
the upstream tree.
Conflicts:
arch/arm/kernel/head.S
drivers/bluetooth/ath3k.c
drivers/bluetooth/btusb.c
drivers/mmc/core/core.c
drivers/tty/serial/serial_core.c
drivers/usb/host/ehci-hub.c
drivers/usb/serial/qcserial.c
fs/namespace.c
fs/proc/base.c
Change-Id: I62e2edbe213f84915e27f8cd6e4f6ce23db22a21
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
This reverts commit 06e8935feb.
With the optimization, the sdio_irq_thread() sends a spurious
interrupt notification to the registered function handler during
ksdioirq thread start up. The function handler may or may not
handle this interrupt gracefully. The correct way to inform
about interrupt is to check CCCR_INTx register for pending
interrupts before calling function driver's irq handler
which is broken with this optimization, hence the revert.
CRs-Fixed: 345547
Change-Id: Ia1525ef439c8d0d36b796f393066065648356635
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Merge Google's Android tree into msm-3.0
This consists of the following conflicts and 42 commits:
Conflicts:
drivers/mmc/core/bus.c
drivers/rtc/class.c
drivers/usb/gadget/android.c
Most of the conflicts stem from the changes made to the
local msm-3.0 branch.
commit 1f8c5cecfe
Author: Heiko Stuebner <heiko@sntech.de>
Date: Wed Feb 1 10:33:01 2012 -0800
Input: evdev - fix variable initialisation
Commit 509f87c5f564 (evdev - do not block waiting for an event if
fd
is nonblock) created a code path were it was possible to use retval
uninitialized.
This could lead to the xorg evdev input driver getting corrupt data
and refusing to work with log messages like
AUO-Pixcir touchscreen: Read error: Success
sg060_keys: Read error: Success
AUO-Pixcir touchscreen: Read error: Success
sg060_keys: Read error: Success
(for drivers auo-pixcir-ts and gpio-keys).
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
drivers/input/evdev.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 4dc43d7079
Author: Arve Hjønnevåg <arve@android.com>
Date: Fri Oct 17 15:20:55 2008 -0700
Input: evdev - Add ioctl to block suspend while event queue is not empty.
Add an ioctl, EVIOCSSUSPENDBLOCK, to enable a wakelock that will block
suspend while the event queue is not empty. This allows userspace code to
process input events while the device appears to be asleep.
The current code holds the wakelock for up 5 seconds for every input
device and client. This can prevent suspend if sensor with a high data
rate is active, even when that sensor is not capable of waking the
device once it is suspended.
Change-Id: I624d66ef30a0b3abb543685c343382b8419b42b9
Signed-off-by: Arve Hjønnevåg <arve@android.com>
drivers/input/evdev.c | 53 +++++++++++++++++++++++++++++++++++++++++++-----
include/linux/input.h | 3 ++
2 files changed, 50 insertions(+), 6 deletions(-)
commit 7cc846069a
Author: Arve Hjønnevåg <arve@android.com>
Date: Mon Jan 23 17:15:45 2012 -0800
Input: evdev - Don't hold wakelock when no data is available to user-space
If there is no SYN_REPORT event in the buffer the buffer data is invisible
to user-space. The wakelock should not be held in this case.
Change-Id: Idae890ff0da8eb46a2cfce61a95b3a97252551ad
Signed-off-by: Arve Hjønnevåg <arve@android.com>
drivers/input/evdev.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
commit 0e80804a2e
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Tue Jan 31 11:06:23 2012 -0800
net: wireless: bcmdhd: Increase pm_notify callback priority
Make pm_notify callback to be called the first on suspend/resume path to
ensure it will always be called.
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/dhd_linux.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit dfc896e1c8
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Mon Jan 30 15:43:31 2012 -0800
net: wireless: bcmdhd: Fix crash on dhdsdio_probe_attach() failure
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/dhd_linux.c | 17 ++++++++++++++---
drivers/net/wireless/bcmdhd/dhd_sdio.c | 8 +++++++-
2 files changed, 21 insertions(+), 4 deletions(-)
commit 256a6b23be
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Mon Jan 30 13:03:19 2012 -0800
net: wireless: bcmdhd: Daemonize wl_event_handler
Daemonizing makes thread (besides other things) NON-FREEZABLE, and it will not
get fake signal on suspend to quicl down_interruptible()
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/dhd_linux.c | 13 -------------
drivers/net/wireless/bcmdhd/include/linuxver.h | 12 ++++++++++++
drivers/net/wireless/bcmdhd/wl_cfg80211.c | 3 +++
3 files changed, 15 insertions(+), 13 deletions(-)
commit ff93146589
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Tue Jan 24 13:59:40 2012 -0800
net: wireless: bcmdhd: Update to Version 5.90.195.23
- WFD fixes
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/dhd_cfg80211.c | 269 -------------------------
drivers/net/wireless/bcmdhd/dhd_linux.c | 2 +-
drivers/net/wireless/bcmdhd/dhd_sdio.c | 8 +-
drivers/net/wireless/bcmdhd/include/epivers.h | 8 +-
drivers/net/wireless/bcmdhd/siutils.c | 5 +
drivers/net/wireless/bcmdhd/wl_cfg80211.c | 223 +++++++++++++++------
drivers/net/wireless/bcmdhd/wl_cfgp2p.c | 175 ++++++++++++++++-
drivers/net/wireless/bcmdhd/wl_cfgp2p.h | 37 ++--
8 files changed, 368 insertions(+), 359 deletions(-)
commit 96034c2006
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Tue Jan 24 13:55:00 2012 -0800
net: wireless: bcmdhd: Update to Version 5.90.195.22
- Disable Ad-hoc support for cfg80211
- dhd_linux.c: Fix incorrect pid check
- Merge Android changes from Android tree
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/bcmsdh_linux.c | 24 ++------------------
drivers/net/wireless/bcmdhd/bcmsdh_sdmmc_linux.c | 25 +++++++++++++++------
drivers/net/wireless/bcmdhd/dhd_linux.c | 10 ++++----
drivers/net/wireless/bcmdhd/dhd_sdio.c | 11 +++++++--
drivers/net/wireless/bcmdhd/hndpmu.c | 16 ++++++++++++++
drivers/net/wireless/bcmdhd/include/bcmdevs.h | 2 +
drivers/net/wireless/bcmdhd/include/epivers.h | 8 +++---
drivers/net/wireless/bcmdhd/siutils.c | 3 ++
drivers/net/wireless/bcmdhd/wl_cfg80211.c | 11 ++++++++-
9 files changed, 68 insertions(+), 42 deletions(-)
commit 494661a1ac
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Tue Jan 24 13:47:47 2012 -0800
net: wireless: bcmdhd: Update to Version 5.90.195.19
- Add WFD changes
- Add extra locking for internal ioctl operations
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/Makefile | 4 +-
drivers/net/wireless/bcmdhd/bcmsdh_linux.c | 25 +-
drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c | 4 +-
drivers/net/wireless/bcmdhd/dhd.h | 10 +-
drivers/net/wireless/bcmdhd/dhd_cdc.c | 7 +-
drivers/net/wireless/bcmdhd/dhd_cfg80211.c | 862 ++++++++
drivers/net/wireless/bcmdhd/dhd_cfg80211.h | 42 +
drivers/net/wireless/bcmdhd/dhd_common.c | 7 +-
drivers/net/wireless/bcmdhd/dhd_linux.c | 103 +-
drivers/net/wireless/bcmdhd/dhd_linux_mon.c | 409 ----
drivers/net/wireless/bcmdhd/dhd_sdio.c | 4 +-
drivers/net/wireless/bcmdhd/include/dhdioctl.h | 3 +-
drivers/net/wireless/bcmdhd/include/epivers.h | 8 +-
drivers/net/wireless/bcmdhd/include/proto/802.11.h | 12 +-
drivers/net/wireless/bcmdhd/include/wlioctl.h | 19 +-
drivers/net/wireless/bcmdhd/wl_android.c | 22 +-
drivers/net/wireless/bcmdhd/wl_android.h | 2 +-
drivers/net/wireless/bcmdhd/wl_cfg80211.c | 2142 ++++++--------------
drivers/net/wireless/bcmdhd/wl_cfg80211.h | 125 +-
drivers/net/wireless/bcmdhd/wl_cfgp2p.c | 245 ++-
drivers/net/wireless/bcmdhd/wl_cfgp2p.h | 27 +-
drivers/net/wireless/bcmdhd/wl_linux_mon.c | 409 ++++
drivers/net/wireless/bcmdhd/wldev_common.c | 69 +-
drivers/net/wireless/bcmdhd/wldev_common.h | 20 +-
24 files changed, 2485 insertions(+), 2095 deletions(-)
commit 1dddb0cc0d
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Tue Jan 24 13:37:34 2012 -0800
net: wireless: bcmdhd: Update to Version 5.90.195.15
- Add WFD concurrent mode support
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/bcmevent.c | 8 +-
drivers/net/wireless/bcmdhd/bcmsdh_sdmmc_linux.c | 12 +-
drivers/net/wireless/bcmdhd/bcmutils.c | 4 +-
drivers/net/wireless/bcmdhd/dhd.h | 25 +-
drivers/net/wireless/bcmdhd/dhd_cdc.c | 9 +-
drivers/net/wireless/bcmdhd/dhd_common.c | 4 +-
drivers/net/wireless/bcmdhd/dhd_linux.c | 148 +++--
drivers/net/wireless/bcmdhd/dhd_linux_mon.c | 28 +-
drivers/net/wireless/bcmdhd/dhd_sdio.c | 27 +-
drivers/net/wireless/bcmdhd/dhd_wlfc.h | 12 +-
drivers/net/wireless/bcmdhd/hndpmu.c | 44 +-
drivers/net/wireless/bcmdhd/include/Makefile | 2 +-
drivers/net/wireless/bcmdhd/include/aidmp.h | 2 +-
drivers/net/wireless/bcmdhd/include/bcmcdc.h | 2 +-
drivers/net/wireless/bcmdhd/include/bcmdefs.h | 37 +-
drivers/net/wireless/bcmdhd/include/bcmdevs.h | 573 +++++++++++++-
drivers/net/wireless/bcmdhd/include/bcmendian.h | 2 +-
drivers/net/wireless/bcmdhd/include/bcmpcispi.h | 2 +-
drivers/net/wireless/bcmdhd/include/bcmperf.h | 2 +-
drivers/net/wireless/bcmdhd/include/bcmsdbus.h | 10 +-
drivers/net/wireless/bcmdhd/include/bcmsdh.h | 10 +-
drivers/net/wireless/bcmdhd/include/bcmsdh_sdmmc.h | 2 +-
drivers/net/wireless/bcmdhd/include/bcmsdpcm.h | 2 +-
drivers/net/wireless/bcmdhd/include/bcmsdspi.h | 2 +-
drivers/net/wireless/bcmdhd/include/bcmsdstd.h | 34 +-
drivers/net/wireless/bcmdhd/include/bcmspi.h | 2 +-
drivers/net/wireless/bcmdhd/include/bcmutils.h | 14 +-
drivers/net/wireless/bcmdhd/include/bcmwifi.h | 2 +-
drivers/net/wireless/bcmdhd/include/dhdioctl.h | 2 +-
drivers/net/wireless/bcmdhd/include/epivers.h | 14 +-
drivers/net/wireless/bcmdhd/include/hndpmu.h | 2 +-
.../net/wireless/bcmdhd/include/hndrte_armtrap.h | 2 +-
drivers/net/wireless/bcmdhd/include/hndrte_cons.h | 2 +-
drivers/net/wireless/bcmdhd/include/hndsoc.h | 2 +-
drivers/net/wireless/bcmdhd/include/htsf.h | 2 +-
drivers/net/wireless/bcmdhd/include/linux_osl.h | 2 +-
drivers/net/wireless/bcmdhd/include/linuxver.h | 6 +-
drivers/net/wireless/bcmdhd/include/miniopt.h | 2 +-
drivers/net/wireless/bcmdhd/include/msgtrace.h | 2 +-
drivers/net/wireless/bcmdhd/include/osl.h | 2 +-
.../wireless/bcmdhd/include/packed_section_end.h | 2 +-
.../wireless/bcmdhd/include/packed_section_start.h | 2 +-
drivers/net/wireless/bcmdhd/include/pcicfg.h | 28 +-
drivers/net/wireless/bcmdhd/include/proto/802.11.h | 317 +++++++-
.../net/wireless/bcmdhd/include/proto/802.11_bta.h | 2 +-
.../net/wireless/bcmdhd/include/proto/802.11e.h | 2 +-
drivers/net/wireless/bcmdhd/include/proto/802.1d.h | 2 +-
drivers/net/wireless/bcmdhd/include/proto/bcmeth.h | 2 +-
.../net/wireless/bcmdhd/include/proto/bcmevent.h | 9 +-
drivers/net/wireless/bcmdhd/include/proto/bcmip.h | 2 +-
.../net/wireless/bcmdhd/include/proto/bt_amp_hci.h | 2 +-
drivers/net/wireless/bcmdhd/include/proto/eapol.h | 2 +-
.../net/wireless/bcmdhd/include/proto/ethernet.h | 3 +-
drivers/net/wireless/bcmdhd/include/proto/p2p.h | 2 +-
drivers/net/wireless/bcmdhd/include/proto/sdspi.h | 2 +-
drivers/net/wireless/bcmdhd/include/proto/vlan.h | 2 +-
drivers/net/wireless/bcmdhd/include/proto/wpa.h | 12 +-
drivers/net/wireless/bcmdhd/include/sbchipc.h | 168 ++++-
drivers/net/wireless/bcmdhd/include/sbconfig.h | 2 +-
drivers/net/wireless/bcmdhd/include/sbhnddma.h | 6 +-
drivers/net/wireless/bcmdhd/include/sbpcmcia.h | 2 +-
drivers/net/wireless/bcmdhd/include/sbsdio.h | 2 +-
drivers/net/wireless/bcmdhd/include/sbsdpcmdev.h | 2 +-
drivers/net/wireless/bcmdhd/include/sbsocram.h | 2 +-
drivers/net/wireless/bcmdhd/include/sdio.h | 5 +-
drivers/net/wireless/bcmdhd/include/sdioh.h | 32 +-
drivers/net/wireless/bcmdhd/include/sdiovar.h | 2 +-
drivers/net/wireless/bcmdhd/include/siutils.h | 30 +-
drivers/net/wireless/bcmdhd/include/trxhdr.h | 3 +-
drivers/net/wireless/bcmdhd/include/typedefs.h | 5 +-
drivers/net/wireless/bcmdhd/include/wlfc_proto.h | 2 +-
drivers/net/wireless/bcmdhd/include/wlioctl.h | 87 ++-
drivers/net/wireless/bcmdhd/linux_osl.c | 23 +-
drivers/net/wireless/bcmdhd/siutils.c | 195 +++++-
drivers/net/wireless/bcmdhd/wl_android.c | 6 +-
drivers/net/wireless/bcmdhd/wl_cfg80211.c | 875 ++++++++++++--------
drivers/net/wireless/bcmdhd/wl_cfg80211.h | 282 +++++---
drivers/net/wireless/bcmdhd/wl_cfgp2p.c | 165 ++++-
drivers/net/wireless/bcmdhd/wl_cfgp2p.h | 12 +-
drivers/net/wireless/bcmdhd/wl_iw.c | 110 +++-
drivers/net/wireless/bcmdhd/wl_iw.h | 17 +-
81 files changed, 2737 insertions(+), 752 deletions(-)
commit 52bdb6f543
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Mon Jan 23 12:47:21 2012 -0800
net: wireless: bcmdhd: Add WIPHY_FLAG_SUPPORTS_FW_ROAM flag
Adding this flag will allow NL80211_ATTR_ROAM_SUPPORT, and will set
WPA_DRIVER_FLAGS_BSS_SELECTION flag in wpa_supplicant
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/wl_cfg80211.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
commit b1a94205e9
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Fri Jan 20 14:15:05 2012 -0800
net: wireless: bcmdhd: Fake PNO event to wake up the wpa_supplicant
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/dhd_linux.c | 4 +++-
drivers/net/wireless/bcmdhd/wl_cfg80211.c | 20 ++++++++++++++++----
2 files changed, 19 insertions(+), 5 deletions(-)
commit 09701e3edf
Author: Scott Anderson <saa@google.com>
Date: Wed Jan 18 15:56:51 2012 -0800
usb: gadget: android: Honor CONFIG_USB_GADGET_VBUS_DRAW
The maximum current draw was hard coded to 500 mA. composite.c
has code that uses CONFIG_USB_GADGET_VBUS_DRAW to set the
bMaxPower and to set whether or not the device is self-powered if
they haven't been set. This change removes the code in android.c
to allow composite.c to set them.
Change-Id: I9db37922e91ee86e9e5c0e14519e119e5c41ca48
Signed-off-by: Scott Anderson <saa@google.com>
drivers/usb/gadget/android.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
commit a6ccb73389
Author: Benoit Goby <benoit@android.com>
Date: Fri Jan 20 14:42:41 2012 -0800
usb: gadget: Fix usb string id allocation
Don't reset next_string_id every time the gadget is enabled, this makes
the next strings allocated overwrite strings allocated at probe time.
Instead, fix rndis not to allocate new string ids on every config bind.
Change-Id: Ied28ee416bb6f00c434c34176fe5b7f0dcb2b2d4
Signed-off-by: Benoit Goby <benoit@android.com>
drivers/usb/gadget/android.c | 1 -
drivers/usb/gadget/f_rndis.c | 12 +++++-------
drivers/usb/gadget/rndis.c | 11 +++++++++++
3 files changed, 16 insertions(+), 8 deletions(-)
commit 87159de9c3
Author: Jouni Malinen <jouni@qca.qualcomm.com>
Date: Thu Aug 11 11:46:22 2011 +0300
nl80211/cfg80211: Make addition of new sinfo fields safer
Add a comment pointing out the use of enum station_info_flags for
all new struct station_info fields. In addition, memset the sinfo
buffer to zero before use on all paths in the current tree to avoid
leaving uninitialized pointers in the data.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
include/net/cfg80211.h | 5 +++++
net/mac80211/sta_info.c | 1 +
net/wireless/nl80211.c | 1 +
3 files changed, 7 insertions(+), 0 deletions(-)
commit d692df224b
Author: Jouni Malinen <jouni@qca.qualcomm.com>
Date: Mon Aug 8 12:11:52 2011 +0300
cfg80211/nl80211: Send AssocReq IEs to user space in AP mode
When user space SME/MLME (e.g., hostapd) is not used in AP mode, the
IEs from the (Re)Association Request frame that was processed in
firmware need to be made available for user space (e.g., RSN IE for
hostapd). Allow this to be done with cfg80211_new_sta().
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
include/net/cfg80211.h | 8 ++++++++
net/wireless/nl80211.c | 4 ++++
2 files changed, 12 insertions(+), 0 deletions(-)
commit d1e94136fc
Author: Dima Zavin <dima@android.com>
Date: Mon Jan 23 10:39:02 2012 -0800
misc: remove android pmem driver, it's obsolete.
Change-Id: I48d9778007e1e9eed2bb34e33ceee818c23afaa5
Signed-off-by: Dima Zavin <dima@android.com>
drivers/misc/Kconfig | 4 -
drivers/misc/Makefile | 1 -
drivers/misc/pmem.c | 1345 ------------------------------------------
include/linux/android_pmem.h | 93 ---
4 files changed, 0 insertions(+), 1443 deletions(-)
commit dac306d896
Author: Dima Zavin <dima@android.com>
Date: Thu Jan 19 09:51:07 2012 -0800
Revert "proc: enable writing to /proc/pid/mem"
This reverts commit 198214a7ee.
fs/proc/base.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
commit a65e28a014
Author: Dima Zavin <dima@android.com>
Date: Thu Jan 12 15:55:25 2012 -0800
ram_console: set CON_ANYTIME console flag
We want to ensure that we get all the console messages, even ones
that occur while the printing CPU is not yet online.
Change-Id: I1d2694d05ac9415669a92f38efdd8e71c927705b
Signed-off-by: Dima Zavin <dima@android.com>
drivers/staging/android/ram_console.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit f16e6fb3e3
Author: Benoit Goby <benoit@android.com>
Date: Thu Dec 15 18:40:37 2011 -0800
Revert "usb: gadget: rndis: don't use dev_get_stats"
This reverts commit ffdab0c0c4.
Not needed anymore in 2.6.39 and 3.0, dev_get_stats has been fixed
and may be called from atomic context. See:
1ac9ad1 net: remove dev_txq_stats_fold()
drivers/usb/gadget/rndis.c | 23 ++---------------------
1 files changed, 2 insertions(+), 21 deletions(-)
commit e1493f1544
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Mon Dec 19 10:24:09 2011 -0800
net: wireless: bcmdhd: Enable wlan access on resume for all sdio functions
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/bcmsdh_sdmmc_linux.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
commit bbd08c6e95
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Fri Dec 16 12:54:51 2011 -0800
net: wireless: bcmdhd: Fix P2P interface removal
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/dhd_linux.c | 3 ++
drivers/net/wireless/bcmdhd/wl_cfg80211.c | 43 ++++++++++++++++++++++-------
drivers/net/wireless/bcmdhd/wl_cfg80211.h | 9 ++++--
3 files changed, 42 insertions(+), 13 deletions(-)
commit 37ff4411a5
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Thu Dec 15 12:12:20 2011 -0800
net: wireless: bcm4329: Fix pno_enable if disassociated
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcm4329/dhd_common.c | 43 ++++++++++++++++++++++++-----
1 files changed, 36 insertions(+), 7 deletions(-)
commit 599c8566fa
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Tue Dec 13 17:39:48 2011 -0800
net: wireless: bcmdhd: Fix proper scan command even if request is NULL
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/wl_cfg80211.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
commit f227b88c89
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Tue Dec 13 12:27:49 2011 -0800
net: wireless: bcmdhd: Decrease event wake_lock timeout to 1500 ms
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/dhd.h | 4 ++--
drivers/net/wireless/bcmdhd/dhd_linux.c | 8 ++++----
drivers/net/wireless/bcmdhd/wl_iw.c | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
commit ed3f356087
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Mon Dec 12 15:40:33 2011 -0800
net: wireless: bcmdhd: Fix getting arp_hostip table
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/dhd_common.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit c561cedf2b
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Tue Dec 6 16:27:37 2011 -0800
net: wireless: bcmdhd: Allow to push more packets to FW for Tx
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/dhd_sdio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 4f36cb88d6
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Fri Dec 2 13:24:01 2011 -0800
net: wireless: bcmdhd: Fix scan crash in ibss mode
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/wl_cfg80211.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit af16732d4c
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Fri Dec 2 13:10:47 2011 -0800
net: wireless: bcmdhd: Add FW reloading in case of FW hang
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/dhd_linux.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
commit 7caeacd6ed
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Wed Nov 30 12:49:02 2011 -0800
net: wireless: bcmdhd: Update to Version 5.90.125.94.1
- Return zeroed private command buffer
- Fix memory leak in wl_inform_single_bss()
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/dhd_common.c | 5 +++--
drivers/net/wireless/bcmdhd/dhd_linux_mon.c | 10 ++++++----
drivers/net/wireless/bcmdhd/include/epivers.h | 2 +-
drivers/net/wireless/bcmdhd/wl_android.c | 9 ++++++---
drivers/net/wireless/bcmdhd/wl_cfg80211.c | 9 ++++++---
5 files changed, 22 insertions(+), 13 deletions(-)
commit 8d71d882e7
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Fri Nov 11 16:04:12 2011 -0800
net: wireless: bcmdhd: Use CONFIG_DHD_USE_STATIC_BUF for preallocated memory
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/Kconfig | 7 +++
drivers/net/wireless/bcmdhd/bcmsdh_sdmmc.c | 16 ++++----
drivers/net/wireless/bcmdhd/dhd.h | 4 +-
drivers/net/wireless/bcmdhd/dhd_cdc.c | 4 +-
drivers/net/wireless/bcmdhd/dhd_linux.c | 4 +-
drivers/net/wireless/bcmdhd/dhd_sdio.c | 4 +-
drivers/net/wireless/bcmdhd/include/linux_osl.h | 2 +-
drivers/net/wireless/bcmdhd/linux_osl.c | 52 +++++++++++++----------
drivers/net/wireless/bcmdhd/wl_android.c | 7 ++-
9 files changed, 57 insertions(+), 43 deletions(-)
commit 35047200c4
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Mon Dec 19 12:32:21 2011 -0800
wireless: Protect regdomain change by mutex
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net/wireless/reg.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
commit ea693bf7f8
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Fri Dec 16 17:52:18 2011 -0800
mmc: Set suspend/resume bus operations if CONFIG_PM_RUNTIME is used
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/mmc/core/bus.c | 24 +++++++-----------------
1 files changed, 7 insertions(+), 17 deletions(-)
commit dc1b634039
Author: Benoit Goby <benoit@android.com>
Date: Fri Dec 9 18:05:00 2011 -0800
usb: gadget: android: Don't allow changing the functions list if enabled
Change-Id: I3ad39b420ce79a8602a7eca1daac1f56b30bad5c
Signed-off-by: Benoit Goby <benoit@android.com>
drivers/usb/gadget/android.c | 28 ++++++++++++++++++++++++----
1 files changed, 24 insertions(+), 4 deletions(-)
commit e0de0a507d
Author: Benoit Goby <benoit@android.com>
Date: Tue Nov 29 13:49:27 2011 -0800
usb: gadget: android: Cancel pending ctrlrequest before disabling
Make sure there is no pending ctrlrequest before removing the config.
Otherwise the ctrlrequest complete callback could access structures
after they have been freed. Unbind cancels pending transfers but not
ep0 requests.
Bug: 5513065 5440193
Change-Id: I063c22bf5d104a3d2df71cf622409459fac5f27a
Signed-off-by: Benoit Goby <benoit@android.com>
drivers/usb/gadget/android.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
commit b86fd0b622
Author: Colin Cross <ccross@android.com>
Date: Tue Nov 29 16:37:07 2011 -0800
ARM: idle: call idle notifiers before stopping nohz tick
If an idle notifier modifies a timer, calling the notifier after
the sched tick has been stopped may leave the sched tick set too
early. Move teh idle notifier call before the call to
tick_nohz_stop_sched_tick.
Change-Id: I0db3284bec6d0193bc5e2a57650ab06bd8342319
Signed-off-by: Colin Cross <ccross@android.com>
arch/arm/kernel/process.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 6a4a38525d
Author: Benoit Goby <benoit@android.com>
Date: Mon Nov 28 18:01:03 2011 -0800
usb: gadget: android: Reset next_string_id before enable
Reset next_string_id to 0 before enabling the gadget driver. Otherwise,
after a large number of enable/disable cycles, bind will fail
because we cannot allocate new string ids. String ids cannot be larger
than 254 per USB spec.
Change-Id: I44f5fece45008b7a0a18c025d4eb5ce842585c28
Signed-off-by: Benoit Goby <benoit@android.com>
drivers/usb/gadget/android.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
commit dbb18fb2c1
Author: hyungseoung.yoo <hyungseoung.yoo@samsung.com>
Date: Fri Nov 18 13:57:01 2011 +0900
Bluetooth: Keep master role when SCO or eSCO is active
This improves compatbility with a lot of headset / chipset
combinations. Ideally this should not be needed.
Change-Id: I8b676701e12e416aa7d60801b9d353b15d102709
Signed-off-by: hyungseoung.yoo <hyungseoung.yoo@samsung.com>
Signed-off-by: Jaikumar Ganesh <jaikumarg@android.com>
net/bluetooth/hci_event.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
commit 9d187300df
Author: Arve Hjønnevåg <arve@android.com>
Date: Tue Nov 22 14:56:50 2011 -0800
rtc: Fix some bugs that allowed accumulating time drift in suspend/resume
The current code checks if abs(delta_delta.tv_sec) is greater or
equal to two before it discards the old delta value, but this can
trigger at close to -1 seconds since -1.000000001 seconds is stored
as tv_sec -2 and tv_nsec 999999999 in a normalized timespec.
rtc_resume had an early return check if the rtc value had not changed
since rtc_suspend. This effectivly stops time for the duration of the
short sleep. Check if sleep_time is positive after all the adjustments
have been applied instead since this allows the old_system adjustment
in rtc_suspend to have an effect even for short sleep cycles.
Change-Id: I00b45c0349ec91a4bab9b41a126b377515427898
Signed-off-by: Arve Hjønnevåg <arve@android.com>
drivers/rtc/class.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
commit 452d440ab2
Author: Arve Hjønnevåg <arve@android.com>
Date: Tue Nov 22 15:28:27 2011 -0800
Fix "time: Catch invalid timespec sleep values in __timekeeping_inject_sleeptime" to compile on 3.0
Change-Id: I1225f279cda04dedbfb7f853f6b58f1032bd6d2b
kernel/time/timekeeping.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit cf70c6a400
Author: John Stultz <john.stultz@linaro.org>
Date: Wed Jun 1 18:18:09 2011 -0700
time: Catch invalid timespec sleep values in __timekeeping_inject_sleeptime
Arve suggested making sure we catch possible negative sleep time
intervals that could be passed into timekeeping_inject_sleeptime.
CC: Arve Hjønnevåg <arve@android.com>
CC: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
kernel/time/timekeeping.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
commit 340ede3671
Author: John Stultz <john.stultz@linaro.org>
Date: Fri May 27 11:33:18 2011 -0700
rtc: Avoid accumulating time drift in suspend/resume
Because the RTC interface is only a second granular interface,
each time we read from the RTC for suspend/resume, we introduce a
half second (on average) of error.
In order to avoid this error accumulating as the system is suspended
over and over, this patch measures the time delta between the RTC
and the system CLOCK_REALTIME.
If the delta is less then 2 seconds from the last suspend, we compensate
by using the previous time delta (keeping it close). If it is larger
then 2 seconds, we assume the clock was set or has been changed, so we
do no correction and update the delta.
Note: If NTP is running, ths could seem to "fight" with the NTP corrected
time, where as if the system time was off by 1 second, and NTP slewed the
value in, a suspend/resume cycle could undo this correction, by trying to
restore the previous offset from the RTC. However, without this patch,
since each read could cause almost a full second worth of error, its
possible to get almost 2 seconds of error just from the suspend/resume
cycle alone, so this about equal to any offset added by the compensation.
Further on systems that suspend/resume frequently, this should keep time
closer then NTP could compensate for if the errors were allowed to
accumulate.
Credits to Arve Hjønnevåg for suggesting this solution.
This patch also improves some of the variable names and adds more clear
comments.
CC: Arve Hjønnevåg <arve@android.com>
CC: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
drivers/rtc/class.c | 65 +++++++++++++++++++++++++++++++++++++-------------
1 files changed, 48 insertions(+), 17 deletions(-)
Change-Id: I16f522e7ee2b301cbdaea62d52d50d7249f565c2
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
HS200 bus speed mode requires DLL (Delay locked loop) HW block
to be tuned as clock rate (192 MHz) is greater than 100MHz.
While tuning the DLL block by sending CMD21 for different DLL
phases, it is quite possible that few CMD21 may fail with data
CRC errors as clock phase is not correct but these errors are not
really worth to be printed out as kernel messages. This change
doesn't allow these errors to be printed.
Change-Id: I5e18b61015f0b3a2478cc2d92e3e1ae5da9eb576
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Currently performance numbers are captured for each SDCC
transfers unconditionally which may add the overhead and
could reduce the SDCC read/write throughput numbers.
This change adds additional control for enabling/disabling the
capturing of performance numbers at runtime. We already have sysfs
entry named "perf" for msm sdcc devices. Currently setting this
entry to 0 clears the performance statistics. But now we are
changing the definition of this entry as mentioned below:
Disable performance capturing and clear the performance statistics:
"echo 0 > /sys/devices/platform/msm_sdcc.<n>/perf"
Enable performance capturing:
"echo 1 > /sys/devices/platform/msm_sdcc.<n>/perf"
CRs-fixed: 345170
Change-Id: I3ab9288fd87cc8a8ada6c0c3d066cac4f68d79b7
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
With SDCC4, driver can check the register synchronization
by polling REG_WR_ACTIVE bit in MCI_STATUS2 register so in
that case there is no need to ensure register synchronize
using explicit delay (achieved by calling udelay()).
But there are many places in driver which calls the msmsdcc_delay()
to achieve atleast 1us delay. So this patch have identified such
places and changed them to call a function which guarantees
to have atleast 1us of blocking delay.
CRs-fixed: 345170
Change-Id: I3236496ae6edf0108687b897558091cbb32e0a39
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
If SDCC device runtime status was RPM_RESUMED before system suspend
happens, during next system resume SDCC will also be resumed
synchronously. As SDCC resume is happening as part of system resume
path and it may take around 150ms to resume for SDCC slot which have
SD card connected. As this resume latency is too high, it may impact
overall system resume time and can effect the user experience.
This change makes sure that during system suspend, device runtime
status gets set to RPM_SUSPENDED. So when system resume happens,
SDCC resume can be skipped which means SDCC resume is deferred
until next SDCC transfer request comes in.
CRs-fixed: 344459
Change-Id: I579030b3759fee2c566ab06daad10ff4dd4c0085
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Following is the sequence during system resume (dpm_resume()):
1. SDCC driver resume gets called which does nothing as it will
find the device as runtime suspended.
2. As part of dpm_resume() itself, mmc_bus_resume() is called which
results in this call flow:
mmc_bus_resume -> mmc_blk_resume -> mmc_blk_set_blksize ->
mmc_claim_host -> mmc_host_enable -> host_ops->enable ->
SDCC driver runtime resume.
We really don't want to do runtime resume of SDCC as part of
dpm_resume() othewise it will increase the latency of overall
system resume path.
For sector addressed cards (card size > 2GB), default blocksize is
512 bytes which means setting block length by sending
CMD16 (SET_BLOCKLEN) is not required for such cards. But
mmc_blk_set_blksize() first claims host and then check if card requires
CMD16 or not. mmc_claim_host() will cause runtime resume of SDCC device.
So it's better to first check if card requires CMD16 or not for setting
block length to 512 and then claim the host only if it's required.
CRs-fixed: 344459
Change-Id: I428cedeeee08cdc82ef9805f4d72179dfe0b3ce8
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Since there is no access required to boot partitions,
mmcboot0/1 devices should not be created. Advertise
MMC_CAP2_BOOTPART_NOACC host capability to reflect this.
Change-Id: If3adbc6585e3ba652183ee3ede117503d709ce70
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Intel Medfield platform blocks access to eMMC boot partitions which
results in switch errors. Since there is no access, mmcboot0/1
devices should not be created. Add a host capability to reflect that.
Change-Id: I67d7e1301bb13ce6b01fb44e511ea21cfbf7e4bd
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
[subhashj@codeaurora.org: Fixed merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
If card clock rate passed by set_ios() is less than
minimum clock rate supported by the host controller,
set the clock rate to minimum clock rate supported by host.
Change-Id: I22f2a7413dfdb8c9a5188992aed99726c3c3d7a7
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
SD/MMC card erase functionality is available in core
layer. Enable MMC_CAP_ERASE capability from host side
so that users can use erase, trim, secure erase, secure trim
operations based on the card capability.
Change-Id: Icf35cd3038b0a95d653387d42870357c4c3853c0
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
MMC_CLKGATE feature can be enabled for Volans cards as
the host supports asynchronous acitivity notification
when the clocks are off.
Change-Id: Ic6cfa7fb2e713dcf1d2c6b2ae9df9cf0394f8c4a
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
In the current implementation, turning off SDCC clocks when
SDIO card is inserted, is controlled by the SDCC driver in
suspend/resume callbacks. This makes the dynamic clock gating
(MMC_CLKGATE) feature, when enabled, to be broken for SDIO cards,
as configuring of sdio wakeup interrupt is entirely handled
in system suspend/resume callbacks. Handle this by moving all
of the wakeup handling code to generic set_ios function which can be
called either from core layer or driver layer.
Since the SDCC controller supports asynchronous notification of
SDIO card activity when the clocks are off use this for enabling
MMC_CLKGATE feature which helps in TCX0 during idle state.
Also, handle the case where the SDIO function driver is not interested
in waking up the system during suspend but the SDCC driver still
configures DAT1 line as wakeup interrupt.
Change-Id: I260ae2161cfe9160f93e6af4f9b6c34db96397c0
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
mmc_set_ios() is used by host drivers during suspend/resume
routines in indirect way i.e., by calling host->ops->set_ios().
But now with MMC_CLKGATE enabled, mmc_set_ios() also updates
host->clk_gated flag. So export this API so that host controller
drivers can use it.
Change-Id: Ib0c177635bb8d87ba68c98e08b8d940c73f2b80c
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Free hardware resources such as regulators
on shutdown so card will be in expected state
during soft reset such as adb reboot.
Change-Id: I2aab44de2c7cb20e09213decb29a3ac6b6441148
Signed-off-by: Oluwafemi Adeyemi <aadeyemi@codeaurora.org>
mmc_resume_host() is called during resume (runtime or system) which calls
1. mmc_power_up
2. mmc_select_voltage
3. host->bus_ops->resume() (mmc_sd_resume())
mmc_sd_resume() ultimately calls mmc_sd_init_card() to initialize the
SD card. But let's say if mmc_sd_init_card() fails during the
execute_tuning(). At this point, host controller timing is changed
to SDR104/SDR50 mode and host clock will also be > 100 MHz.
If there is an error returned by mmc_sd_init_card() and
if CONFIG_MMC_PARANOID_SD_INIT defined, it retries by calling
mmc_sd_init_card() without making sure that host controller timing
and clock be initialized again. This may cause the further
mmc_sd_init_card() also to fail.
To fix this, mmc_sd_resume() should call mmc_power_up()
and mmc_select_voltage() before retrying.
Change-Id: I8de39ea547fa0d5eca478719a4cf9255b6652503
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
"wait_for_auto_prog_done" flag is set when CMD53, single block write
(CMD24) or pre-defined (prefixed with CMD23) multi block write
(CMD25) need to be sent to card. This flag tells the
msmsdcc_start_data() to set the AUTO_PROG_DONE bit in MCI_DATA_CTL
register. If AUTO_PROG_DONE bit is set, SDCC controller will raise
the PROG_DONE at the end of above mentioned write transfers
(command + data) and "wait_for_auto_prog_done" gets cleared at
the end of transfer.
But if we get the error during the command transfer phase itself,
there is a chance that "wait_for_auto_prog_done" remains set which
means it remains sticky during next SDCC transfer request as well.
And if next data transfer is data read operation, having this
"wait_for_auto_prog_done" flag set will not allow the transfer to
end which may cause SDCC driver to raise request timeout.
Following is one such error condition:
<6>[ 667.001892] mmc1: CMD6: Request timeout
<6>[ 667.004700] mmc1: SDCC PWR is ON
<6>[ 667.007904] mmc1: SDCC clks are ON, MCLK rate=400000
<6>[ 667.012848] mmc1: SDCC irq is enabled
<6>[ 667.067633] mmc1: SPS mode: busy=0
<6>[ 667.071020] mmc1: xfer_size=64, data_xfered=64, xfer_remain=0
<6>[ 667.076758] mmc1: got_dataend=1, prog_enable=0,
wait_for_auto_prog_done=1, got_auto_prog_done=0
This patch ensures that "wait_for_auto_prog_done" gets cleared even when
error is seen during command transfer phase itself.
CRs-fixed: 342901
Change-Id: I27f635775ca488826fb46995784b544772fd8e16
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
The following changes are required in host driver to
enable/configure the controller in HS200 mode -
1. Define new eMMC host capabilities as supported by the
host. These capabilities allows the MMC core driver to
enable HS200 timing in device.
2. After the device is set to HS200 mode, the host driver
must send tuning command CMD21 to find the optimal sampling
point for data lines.
3. Depending on the voltage range and HS200 modes supported
by the host and device, host driver must change the voltage
range of VccQ whenever the MMC core driver requests it.
4. Change the controller timing mode and MCLK frequency to
maximum frequency supported by host.
Change-Id: Iaa30778a509eb800b0193f32f85ce494610e94c3
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
When UHS-I card is detected also print the bus speed mode
in which UHS-I card will be running.
Change-Id: Ifd58b91b605d132cd80b18ad4cfe02f59e8a80eb
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Some reboot methods (eg. adb reboot) may not power
down SDCC slots. This can result in cards being
in unexpected states after reboot. Explicitly reset
slot voltage regulator on reboot.
CRs-Fixed: 341840
Change-Id: I8cdb52bc58e34900378af468794760653f3babad
Signed-off-by: Oluwafemi Adeyemi <aadeyemi@codeaurora.org>
This patch fixes following issues when HS200 is enabled:
1. If executing_tuning() host ops is called without mmc_host_clk_hold(),
card clocks might get turned off (if MMC_CLK_GATING is enabled)
while execute_tuning() is in progress. So this patch makes sure
that execute_tuning() is called with mmc_host_clk_hold().
2. If host timing mode is set to HS200 mode, there should not be
any communication with the card until execute_tuning() is completed.
But there is a chance that CMD6 might be sent to enable set HPI_EN
(of HPI_MGMT field in EXT_CSD) before execute_tuning() is called.
So this patch moves this operation after execute_tuning() is completed.
Change-Id: I2004acea28dda1f1946f67f3407c276892d67cdc
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This patch fixes the failure of low speed mmc card detection.
Change-Id: I528fd9c2cf2d584ed09ef2889fb2b0adac87c487
Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This patch adds the support of the HS200 bus speed for eMMC 4.5 devices.
The eMMC 4.5 devices have support for 200MHz bus speed. The function
prototype of the tuning function is modified to handle the tuning
command number which is different in sd and mmc case.
Change-Id: If52eab150592d96adb58d98ec19110fe43d2fbc0
Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
Signed-off-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
[subhashj@codeaurora.org: Fixed merge conflicts and compilation errors]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
sg_miter_next() does not place byte alignment restrictions on
sgl lengths. However, SDCC FIFO must be accessed in multiples
of 4 bytes, requiring rounding which can cause data corruption.
For example, an sgl of length 481 is decribed below:
struct scatterlist sgl;
sgl.page_link = 0xXXXX_XXXX;
sgl.length = 481;
sgl.offset = 3821;
First call to sg_miter_next():
Sgl length returned = (PAGE_SIZE - 3821) = 275 bytes
Driver rounds this length to multiple of 4 = 276 bytes
Next call to sg_miter_next():
Sgl length returned = (481 - 275) = 206 bytes
Driver rounds this length to 208 bytes
On a write, the extra byte written to the FIFO during the first
276 byte chunk is assumed valid. The next call writes 208 bytes,
but the last 3 bytes (276 + 208 - 481) including 1 valid byte,
are ignored, as the controller uses the MCI_DATA_LENGTH register
to figure out that it only needs to write a total of 481 bytes.
To fix the data corruption in cases as above, a 4 byte bounce
buffer is used realign buffer access to the FIFO, such that 4 byte
multiples are written until the last buffer chunk.
Note that in a simple case where all 481 bytes lie within a page,
the driver rounds the length to 484, but the MCI_DATA_LENGTH
register enusres only 481 bytes are actually written.
Change-Id: I164bae2df4857017b35857e465d753b9dc9edf6a
Signed-off-by: Oluwafemi Adeyemi <aadeyemi@codeaurora.org>
If "total_phases" argument of find_most_appropriate_phase()
function have value greater than 16, it may cause the
out bound access for arrays used within this function.
So this patch validates the value of "total_phases" to
avoid buffer overflow.
Change-Id: I0519066b37595e1ee2121b77965b119cfd995eb4
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
SDCC driver sets the IO_PAD_PWR_SWITCH bit to 1 to indicate
SDCC controller that IO pad voltage level needs to be switched
from 3.3v to 1.8v when initializing UHS-I (SD3.0 compliant) cards.
But if UHS-I card is inserted first and then removed after that
and now if we insert the non UHS-I card then there is a possibility
that IO_PAD_PWR_SWITCH bit may still remain set to 1.
This change resets the IO_PAD_PWR_SWITCH bit to 0 if voltage
switch from 3.3v to 1.8v is not required.
CRs-fixed: 337145
Change-Id: Iaafd96a40a132a4c3a614ae72b22f24d3e11be3f
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
We are cleaning up the implicit presence of module.h; these guys are
some of the people who just assume it will be there. Call it out
explitly for those that really need it.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
[kdorfman@codeaurora.org: files are not exists: sdhci-pxav2.c, sdhci-pxav3.c
file is not updated: sdhci-pltfm.c]
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Fix wrong bus_ops->sleep check. (This isn't expected to have real-world
consequences, because the mmc core always defines both 'awake' and
'sleep' ops.)
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
The eMMC 4.5 devices respond to only RESET and AWAKE command in the
sleep state. Hence the mmc switch command to notify power off state
should be sent before the device enters sleep state.
This patch fixes the same.
Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
This patch skips the setting of the power notify state variable
for non eMMC 4.5 devices. Also fixes the problem of omap_hsmmc
noisy/broken for suspend resume reported by Kevin Hilman.
Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@stericsson.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Code cleanup, putting all eMMC 4.5 detection cases together.
This patch removes one if-statement and assembles all. And it also
removes variable initialization below else-statement -- all members
of card structure are already set to zero at card-init.
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Due to hardware bugs, some MMC host controllers don't support
multiple-block reads[1]. To resolve, add a new MMC capability flag,
MMC_CAP2_NO_MULTI_READ, which can be set by affected host controller
drivers. When this capability is set, all reads will be issued one
sector at a time.
1. See for example Advisory 2.1.1.128 "MMC: Multiple Block Read
Operation Issue" in _OMAP3530/3525/3515/3503 Silicon Errata_
Revision F (October 2010) (SPRZ278F), available from
http://focus.ti.com/lit/er/sprz278f/sprz278f.pdf
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Dave Hylands <dhylands@gmail.com>
Tested-by: Steve Sakoman <sakoman@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
HPI command is defined in eMMC4.41.
This feature is important for eMMC4.5 devices.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
This patch will apply the generic CMD6 timeout to switch command
for power class.
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
This patch adds cache feature of eMMC4.5 Spec.
If device supports cache capability, host can utilize some specific
operations.
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
MMC v4.5 supports the DISCARD feature (CMD38). It's different from
trim and there's no check bit. Currently it's only supported at v4.5.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
This patch adds support for the power off notify feature, available in
eMMC 4.5 devices. If the host has support for this feature, then the
mmc core will notify the device by setting the POWER_OFF_NOTIFICATION
byte in the extended csd register with a value of 1 (POWER_ON).
For suspend mode short timeout is used, whereas for the normal poweroff
long timeout is used.
Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
[kdorfman@codeaurora.org: caps2 field added to struct mmc_host]
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
EXT_CSD[248] includes the default maximum timeout for CMD6.
This field is added at eMMC4.5 Spec. And it can be used for default
timeout except for some operations which don't define the timeout
(i.e. background operation, sanitize, flush cache) in eMMC4.5 Spec.
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
mmc_request_done() is sometimes called from interrupt or other atomic
context. Mostly all mmc_request_done() does is complete(), however it
contains code to retry on error, which uses ->request(). As the error
path is certainly not performance critical, this may be moved to the
waiting function mmc_wait_for_req_done().
This allows ->request() to use runtime PM get_sync() and guarantee it
is never in an atomic context.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Ulf Hansson <ulf.hansson@stericsson.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
f39b2dd9d ("mmc: core: Bus width testing needs to handle suspend/resume")
added code to only compare read-only ext_csd fields in bus width testing
code, yet it's comparing some fields that are never set.
The affected fields are ext_csd.raw_erased_mem_count and
ext_csd.raw_partition_support.
Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Acked-by: Philip Rakity <prakity@marvell.com>
Cc: <stable@kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
In the case of a switch error, do not update partition config as though
the switch succeeded, and ensure blk_end_request is called on the
failed request.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>