#include <linux/init.h>
#include <linux/of_platform.h>
-#include <linux/spi/spi.h>
-#include <linux/spi/eeprom.h>
-#include <linux/platform_device.h>
#include <linux/device.h>
-#include <linux/mtd/physmap.h>
-#include <linux/spi/flash.h>
#include <linux/xilinx_devices.h>
#include <linux/gpio.h>
#define IRQ_SPI1 81
#define USB_RST_GPIO 7
-#ifdef CONFIG_SPI_SPIDEV
-
-static struct xspi_platform_data spi_0_pdata = {
- .speed_hz = 75000000,
- .bus_num = 0,
- .num_chipselect = 1
-};
-
-#endif
-
-#ifdef CONFIG_MTD_M25P80
-
-static struct mtd_partition spi_flash_partitions[] = {
- {
- .name = "spi-flash",
- .size = 0x100000,
- .offset = 0,
- },
-};
-
-static struct flash_platform_data spi_flash_pdata = {
- .name = "serial_flash",
- .parts = spi_flash_partitions,
- .nr_parts = ARRAY_SIZE(spi_flash_partitions),
- .type = "sst25wf080"
-};
-
-#endif
-
-#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_MTD_M25P80)
-
-static struct spi_board_info __initdata xilinx_spipss_0_boardinfo[] = {
- {
-#ifdef CONFIG_SPI_SPIDEV
- .modalias = "spidev",
- .platform_data = &spi_0_pdata,
-#else
- .modalias = "m25p80",
- .platform_data = &spi_flash_pdata,
-#endif
- .irq = IRQ_SPI1,
- .max_speed_hz = 40000000, /* max sample rate at 3V */
- .bus_num = 0,
- .chip_select = 1,
- },
-};
-
-#endif
-
extern struct sys_timer xttcpss_sys_timer;
static void __init board_zc702_init(void)
gpio_set_value(USB_RST_GPIO, 1);
gpio_set_value(USB_RST_GPIO, 0);
gpio_set_value(USB_RST_GPIO, 1);
-
-#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_MTD_M25P80)
- spi_register_board_info(&xilinx_spipss_0_boardinfo[0],
- ARRAY_SIZE(xilinx_spipss_0_boardinfo));
-#endif
}
static const char *xilinx_dt_match[] = {