diff options
author | Akash Asthana <akashast@codeaurora.org> | 2019-07-29 18:11:15 +0530 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-12-05 17:56:44 +0000 |
commit | 634c783d1fbee4a9dee7a04c8d2e21d8b6d18e3c (patch) | |
tree | 931979b66bc2414335c89235ca67d20119045b44 /src/soc/qualcomm/sc7180/spi.c | |
parent | 7e51f15129b67407b2803f1b229b7d873a598d6b (diff) |
sc7180: Add SPI-NOR support
This implements the SPI-NOR driver for the Qualcomm QSPI core.
Developer/Reviewer, be aware of this patch from Napali:
https://review.coreboot.org/c/coreboot/+/27483/58
Change-Id: I2eb8cf90aa4559541ba293b3fd2870896bed20b7
Signed-off-by: Akash Asthana <akashast@codeaurora.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35501
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/qualcomm/sc7180/spi.c')
-rw-r--r-- | src/soc/qualcomm/sc7180/spi.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/soc/qualcomm/sc7180/spi.c b/src/soc/qualcomm/sc7180/spi.c index 5abb81ac0a..c6d4cb15cb 100644 --- a/src/soc/qualcomm/sc7180/spi.c +++ b/src/soc/qualcomm/sc7180/spi.c @@ -1,7 +1,7 @@ /* * This file is part of the coreboot project. * - * Copyright (C) 2018, The Linux Foundation. All rights reserved. + * Copyright (C) 2019, The Linux Foundation. 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 version 2 and @@ -15,12 +15,19 @@ #include <spi-generic.h> #include <spi_flash.h> +#include <soc/qspi.h> -static const struct spi_ctrlr spi_ctrlr; +static const struct spi_ctrlr qspi_ctrlr = { + .claim_bus = sc7180_claim_bus, + .release_bus = sc7180_release_bus, + .xfer = sc7180_xfer, + .xfer_dual = sc7180_xfer_dual, + .max_xfer_size = QSPI_MAX_PACKET_COUNT, +}; const struct spi_ctrlr_buses spi_ctrlr_bus_map[] = { { - .ctrlr = &spi_ctrlr, + .ctrlr = &qspi_ctrlr, .bus_start = CONFIG_BOOT_DEVICE_SPI_FLASH_BUS, .bus_end = CONFIG_BOOT_DEVICE_SPI_FLASH_BUS, }, |