summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/bcm2835.c
AgeCommit message (Collapse)AuthorFilesLines
2017-06-20mmc: bcm2835: fix potential null pointer dereferencesGustavo A. R. Silva1-3/+9
Null check at line 1165: if (mrq->cmd), implies that mrq->cmd might be NULL. Add null checks before dereferencing pointer mrq->cmd in order to avoid any potential NULL pointer dereference. Addresses-Coverity-ID: 1408740 Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2017-04-24mmc: bcm2835: Fix possible NULL ptr dereference in bcm2835_requestStefan Wahren1-1/+2
This fixes a NULL pointer dereference in case of a MMC request with a set block count command and no data. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Tested-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2017-04-24mmc: bcm2835: Add new driver for the sdhost controller.Eric Anholt1-0/+1465
The 2835 has two SD controllers: The Arasan sdhci controller (supported by the iproc driver) and a custom sdhost controller. This patch adds a driver for the latter. The sdhci controller supports both sdcard and sdio. The sdhost controller supports the sdcard only, but has better performance. Also note that the rpi3 has sdio wifi, so driving the sdcard with the sdhost controller allows to use the sdhci controller for wifi support. The configuration is done by devicetree via pin muxing. Both SD controller are available on the same pins (2 pin groups = pin 22 to 27 + pin 48 to 53). So it's possible to use both SD controllers at the same time with different pin groups. The code was originally written by Phil Elwell in the downstream Rasbperry Pi tree. In preparation for the upstream merge it was cleaned up and the code base was moderized by Eric Anholt, Stefan Wahren and Gerd Hoffmann. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>