uboot/board/calao/tny_a9260/spi.c
<<
>>
Prefs
   1/*
   2 * Copyright (C) 2009
   3 * Albin Tonnerre, Free Electrons <albin.tonnerre@free-electrons.com>
   4 *
   5 * SPDX-License-Identifier:     GPL-2.0+
   6 */
   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}
  35