• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
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 
spi_init(void)11 int 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 
spi_claim_bus(void)17 int spi_claim_bus(void)
18 {
19 	return iproc_qspi_claim_bus();
20 }
21 
spi_release_bus(void)22 void spi_release_bus(void)
23 {
24 	iproc_qspi_release_bus();
25 }
26 
spi_xfer(uint32_t bitlen,const void * dout,void * din,uint32_t flags)27 int 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 }
32