blob: 26ba5f55cfdaa1628ac52531acd42d61f27bc066 [file] [log] [blame]
Albin Tonnerre2dc851e2009-08-20 16:04:49 +02001/*
2 * Copyright (C) 2009
3 * Albin Tonnerre, Free Electrons <albin.tonnerre@free-electrons.com>
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Albin Tonnerre2dc851e2009-08-20 16:04:49 +02006 */
7
8#include <common.h>
9#include <asm/arch/hardware.h>
10#include <asm/arch/at91_spi.h>
11#include <asm/arch/gpio.h>
12#include <spi.h>
13
14#define TNY_A9260_CS_PIN AT91_PIN_PC11
15
16int spi_cs_is_valid(unsigned int bus, unsigned int cs)
17{
18 return bus == 0 && cs == 1;
19}
20
21void spi_cs_activate(struct spi_slave *slave)
22{
23 at91_set_gpio_value(TNY_A9260_CS_PIN, 0);
24}
25
26void spi_cs_deactivate(struct spi_slave *slave)
27{
28 at91_set_gpio_value(TNY_A9260_CS_PIN, 1);
29}
30
31void spi_init_f(void)
32{
33 /* everything done in board_init */
34}