From 61a7d245ef0bd5d299de2219361799a824ecc18d Mon Sep 17 00:00:00 2001 From: Jeetesh Burman Date: Mon, 16 Dec 2013 17:47:43 +0530 Subject: mmc: sdhci: add quirk for lack of 1.8v support The OLPC XO-1.75 laptop includes a SDHCI controller which is 1.8v capable, and it truthfully reports so in its capabilities. This alternate voltage is used for driving new "UHS-I" SD cards at their full speed. However, what the controller doesn't know is that the motherboard physically doesn't have a 1.8v supply available. Add a quirk so that systems such as this one can override disable 1.8v support, adding support for UHS-I cards (by running them at 3.3v). This avoids a problem where the system would first try to run the card at 1.8v, fail, and then not be able to fully reset the card to retry at the normal 3.3v voltage. This is more appropriate than using the MISSING_CAPS quirk, which is intended for cases where the SDHCI controller is actually lying about its capabilities, and would force us to somehow override both caps words from another source. Bug 1402031 Change-Id: I7ca070a13241e6403eb2e243ebbc441a311110bc Signed-off-by: Daniel Drake Reviewed-by: Philip Rakity Signed-off-by: Chris Ball Signed-off-by: Jeetesh Burman Reviewed-on: http://git-master/r/346323 Reviewed-by: Matthew Pedro Tested-by: Matthew Pedro --- include/linux/mmc/sdhci.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index 5ee48390decc..db86304e1c28 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -93,6 +93,8 @@ struct sdhci_host { #define SDHCI_QUIRK_NON_STANDARD_TUNING (1ULL<<33) /* Controller doesn't calculate max_discard_to */ #define SDHCI_QUIRK_NO_CALC_MAX_DISCARD_TO (1ULL<<34) +/* The system physically doesn't support 1.8v, even if the host does */ +#define SDHCI_QUIRK2_NO_1_8_V (1ULL<<35) int irq; /* Device IRQ */ void __iomem *ioaddr; /* Mapped address */ -- cgit v1.2.3 From 30f8d578556191ac90ca5d1ec4cba5f05cd690ce Mon Sep 17 00:00:00 2001 From: Bibek Basu Date: Tue, 8 Jul 2014 14:24:49 +0530 Subject: video: tegra: nvhost: validate nvmap_handle_ref nvhost_job_unpin should always get the nvmap_handle_ref from rb_entry after validating handle and presence in the tree. Bug 1478467 Change-Id: Ibf5f64a1a82fea8adbf7500bdb36b76357776448 Signed-off-by: Bibek Basu Reviewed-on: http://git-master/r/436076 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty Reviewed-by: Matthew Pedro --- include/linux/nvmap.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/nvmap.h b/include/linux/nvmap.h index 9cc978ec5a7f..c805f4c1dc07 100644 --- a/include/linux/nvmap.h +++ b/include/linux/nvmap.h @@ -3,7 +3,7 @@ * * structure declarations for nvmem and nvmap user-space ioctls * - * Copyright (c) 2009-2012, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2009-2014, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -126,6 +126,9 @@ struct nvmap_handle_ref *nvmap_duplicate_handle_id(struct nvmap_client *client, int nvmap_mark_global(struct nvmap_client *client, struct nvmap_handle_ref *r); +unsigned long nvmap_validate_ref(struct nvmap_client *client, + struct nvmap_handle_ref *r); + struct nvmap_platform_carveout { const char *name; unsigned int usage_mask; -- cgit v1.2.3