blob: c04b15d3c8224c1ec44ca716e5dea3de2d06cf58 [file] [log] [blame]
T Michael Turneybd24d032018-03-23 09:58:26 -07001/*
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
19static int spi_ctrlr_claim_bus(const struct spi_slave *slave)
20{
21 return 0;
22}
23
24static void spi_ctrlr_release_bus(const struct spi_slave *slave)
25{
26
27}
28
29static 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
35static 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
42const struct spi_ctrlr_buses spi_ctrlr_bus_map[] = {
43 {
44 .ctrlr = &spi_ctrlr,
45 .bus_start = 0,
46 .bus_end = 0,
47 },
48};
49
50const size_t spi_ctrlr_bus_map_count = ARRAY_SIZE(spi_ctrlr_bus_map);