5 * SPDX-License-Identifier: GPL-2.0+
9 #include <asm/arch/hardware.h>
10 #include <asm/arch/at91_spi.h>
11 #include <asm/arch/gpio.h>
14 #define SBC_A9260_CS0_PIN AT91_PIN_PA3
15 #define SBC_A9260_CS1_PIN AT91_PIN_PC11
17 int spi_cs_is_valid(unsigned int bus, unsigned int cs)
19 return bus == 0 && (cs == 1 || cs == 0);
22 void spi_cs_activate(struct spi_slave *slave)
25 at91_set_gpio_value(SBC_A9260_CS0_PIN, 0);
26 else if(slave->cs == 1)
27 at91_set_gpio_value(SBC_A9260_CS1_PIN, 0);
30 void spi_cs_deactivate(struct spi_slave *slave)
33 at91_set_gpio_value(SBC_A9260_CS0_PIN, 1);
34 else if(slave->cs == 1)
35 at91_set_gpio_value(SBC_A9260_CS1_PIN, 1);
40 /* everything done in board_init */