/* * Driver for Atmel AT32 and AT91 SPI Controllers * * Copyright (C) 2006 Atmel Corporation * * 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. */#include<linux/kernel.h>#include<linux/clk.h>#include<linux/module.h>#include<linux/platform_device.h>#include<linux/delay.h>#include<linux/dma-mapping.h>#include<linux/dmaengine.h>#include<linux/err.h>#include<linux/interrupt.h>#include<linux/spi/spi.h>#include<linux/slab.h>#include<linux/platform_data/atmel.h>#include<linux/platform_data/dma-atmel.h>#include<linux/of.h>#include<linux/io.h>#include<linux/gpio.h>#include<linux/pinctrl/consumer.h>#include<linux/pm_runtime.h>/* SPI register offsets */#define SPI_CR 0x0000#define SPI_MR 0x0004#define SPI_RDR 0x0008#define SPI_TDR 0x000c#define SPI_SR 0x0010#define SPI_IER 0x001