blob: 551e587326dc9e21a00f521cc7717979d0b3e96d [file] [log] [blame]
Sheetal Tigadoli3bb1b4c2020-01-05 21:19:02 +05301/*
2 * Copyright (c) 2017 - 2020, Broadcom
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <spi.h>
8
9#include "iproc_qspi.h"
10
11int spi_init(void)
12{
13 return iproc_qspi_setup(IPROC_QSPI_BUS, IPROC_QSPI_CS,
14 IPROC_QSPI_CLK_SPEED, IPROC_QSPI_MODE0);
15}
16
17int spi_claim_bus(void)
18{
19 return iproc_qspi_claim_bus();
20}
21
22void spi_release_bus(void)
23{
24 iproc_qspi_release_bus();
25}
26
27int spi_xfer(uint32_t bitlen, const void *dout,
28 void *din, uint32_t flags)
29{
30 return iproc_qspi_xfer(bitlen, dout, din, flags);
31}