T Michael Turney | bd24d03 | 2018-03-23 09:58:26 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2018, The Linux Foundation. All rights reserved. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 and |
| 8 | * only version 2 as published by the Free Software Foundation. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | */ |
| 15 | |
| 16 | #include <spi-generic.h> |
| 17 | #include <spi_flash.h> |
| 18 | |
| 19 | static int spi_ctrlr_claim_bus(const struct spi_slave *slave) |
| 20 | { |
| 21 | return 0; |
| 22 | } |
| 23 | |
| 24 | static void spi_ctrlr_release_bus(const struct spi_slave *slave) |
| 25 | { |
| 26 | |
| 27 | } |
| 28 | |
| 29 | static int spi_ctrlr_xfer(const struct spi_slave *slave, const void *dout, |
| 30 | size_t bytes_out, void *din, size_t bytes_in) |
| 31 | { |
| 32 | return 0; |
| 33 | } |
| 34 | |
| 35 | static const struct spi_ctrlr spi_ctrlr = { |
| 36 | .claim_bus = spi_ctrlr_claim_bus, |
| 37 | .release_bus = spi_ctrlr_release_bus, |
| 38 | .xfer = spi_ctrlr_xfer, |
| 39 | .max_xfer_size = 65535, |
| 40 | }; |
| 41 | |
| 42 | const struct spi_ctrlr_buses spi_ctrlr_bus_map[] = { |
| 43 | { |
| 44 | .ctrlr = &spi_ctrlr, |
| 45 | .bus_start = 0, |
| 46 | .bus_end = 0, |
| 47 | }, |
| 48 | }; |
| 49 | |
| 50 | const size_t spi_ctrlr_bus_map_count = ARRAY_SIZE(spi_ctrlr_bus_map); |