blob: e8cc68c6eafad0aa6cd4f212d9b86e9fb96d518d [file] [log] [blame]
Tom Warrenee554f82011-11-05 09:48:11 +00001/*
Allen Martin55d98a12012-08-31 08:30:00 +00002 * NVIDIA Tegra20 SPI-FLASH controller
Tom Warrenee554f82011-11-05 09:48:11 +00003 *
Tom Warrene8aebc22012-05-22 07:33:47 +00004 * Copyright 2010-2012 NVIDIA Corporation
Tom Warrenee554f82011-11-05 09:48:11 +00005 *
6 * This software may be used and distributed according to the
7 * terms of the GNU Public License, Version 2, incorporated
8 * herein by reference.
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * Version 2 as published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22 * MA 02111-1307 USA
23 */
24
Allen Martine8e99ab2013-03-16 18:58:03 +000025#ifndef _TEGRA20_SPI_H_
26#define _TEGRA20_SPI_H_
Tom Warrenee554f82011-11-05 09:48:11 +000027
28#include <asm/types.h>
29
Allen Martinb98691c2013-03-16 18:58:07 +000030int tegra20_spi_cs_is_valid(unsigned int bus, unsigned int cs);
31struct spi_slave *tegra20_spi_setup_slave(unsigned int bus, unsigned int cs,
32 unsigned int max_hz, unsigned int mode);
33void tegra20_spi_free_slave(struct spi_slave *slave);
34int tegra20_spi_init(int *node_list, int count);
35int tegra20_spi_claim_bus(struct spi_slave *slave);
36void tegra20_spi_cs_activate(struct spi_slave *slave);
37void tegra20_spi_cs_deactivate(struct spi_slave *slave);
38int tegra20_spi_xfer(struct spi_slave *slave, unsigned int bitlen,
39 const void *data_out, void *data_in, unsigned long flags);
40
Allen Martine8e99ab2013-03-16 18:58:03 +000041#endif /* _TEGRA20_SPI_H_ */