2011-11-05 09:48:11 +00:00
|
|
|
/*
|
2012-08-31 08:30:00 +00:00
|
|
|
* NVIDIA Tegra20 SPI-FLASH controller
|
2011-11-05 09:48:11 +00:00
|
|
|
*
|
2012-05-22 07:33:47 +00:00
|
|
|
* Copyright 2010-2012 NVIDIA Corporation
|
2011-11-05 09:48:11 +00:00
|
|
|
*
|
|
|
|
* This software may be used and distributed according to the
|
|
|
|
* terms of the GNU Public License, Version 2, incorporated
|
|
|
|
* herein by reference.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* Version 2 as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
2013-03-16 18:58:03 +00:00
|
|
|
#ifndef _TEGRA20_SPI_H_
|
|
|
|
#define _TEGRA20_SPI_H_
|
2011-11-05 09:48:11 +00:00
|
|
|
|
|
|
|
#include <asm/types.h>
|
|
|
|
|
2013-03-16 18:58:07 +00:00
|
|
|
int tegra20_spi_cs_is_valid(unsigned int bus, unsigned int cs);
|
|
|
|
struct spi_slave *tegra20_spi_setup_slave(unsigned int bus, unsigned int cs,
|
|
|
|
unsigned int max_hz, unsigned int mode);
|
|
|
|
void tegra20_spi_free_slave(struct spi_slave *slave);
|
|
|
|
int tegra20_spi_init(int *node_list, int count);
|
|
|
|
int tegra20_spi_claim_bus(struct spi_slave *slave);
|
|
|
|
void tegra20_spi_cs_activate(struct spi_slave *slave);
|
|
|
|
void tegra20_spi_cs_deactivate(struct spi_slave *slave);
|
|
|
|
int tegra20_spi_xfer(struct spi_slave *slave, unsigned int bitlen,
|
|
|
|
const void *data_out, void *data_in, unsigned long flags);
|
|
|
|
|
2013-03-16 18:58:03 +00:00
|
|
|
#endif /* _TEGRA20_SPI_H_ */
|