mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
Revert "spi: axi-spi-engine: use common AXI macros"
This reverts commit 0308cf64a1 which is
commit 88c2b56c2690061121cad03f0f551db465287575 upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: Ice626e366614a38c5f565fea8f3aa3760fe44a97
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -6,7 +6,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/fpga/adi-axi-common.h>
|
|
||||||
#include <linux/idr.h>
|
#include <linux/idr.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
@@ -15,6 +14,12 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/spi/spi.h>
|
#include <linux/spi/spi.h>
|
||||||
|
|
||||||
|
#define SPI_ENGINE_VERSION_MAJOR(x) ((x >> 16) & 0xff)
|
||||||
|
#define SPI_ENGINE_VERSION_MINOR(x) ((x >> 8) & 0xff)
|
||||||
|
#define SPI_ENGINE_VERSION_PATCH(x) (x & 0xff)
|
||||||
|
|
||||||
|
#define SPI_ENGINE_REG_VERSION 0x00
|
||||||
|
|
||||||
#define SPI_ENGINE_REG_RESET 0x40
|
#define SPI_ENGINE_REG_RESET 0x40
|
||||||
|
|
||||||
#define SPI_ENGINE_REG_INT_ENABLE 0x80
|
#define SPI_ENGINE_REG_INT_ENABLE 0x80
|
||||||
@@ -530,12 +535,12 @@ static int spi_engine_probe(struct platform_device *pdev)
|
|||||||
if (IS_ERR(spi_engine->base))
|
if (IS_ERR(spi_engine->base))
|
||||||
return PTR_ERR(spi_engine->base);
|
return PTR_ERR(spi_engine->base);
|
||||||
|
|
||||||
version = readl(spi_engine->base + ADI_AXI_REG_VERSION);
|
version = readl(spi_engine->base + SPI_ENGINE_REG_VERSION);
|
||||||
if (ADI_AXI_PCORE_VER_MAJOR(version) != 1) {
|
if (SPI_ENGINE_VERSION_MAJOR(version) != 1) {
|
||||||
dev_err(&pdev->dev, "Unsupported peripheral version %u.%u.%c\n",
|
dev_err(&pdev->dev, "Unsupported peripheral version %u.%u.%c\n",
|
||||||
ADI_AXI_PCORE_VER_MAJOR(version),
|
SPI_ENGINE_VERSION_MAJOR(version),
|
||||||
ADI_AXI_PCORE_VER_MINOR(version),
|
SPI_ENGINE_VERSION_MINOR(version),
|
||||||
ADI_AXI_PCORE_VER_PATCH(version));
|
SPI_ENGINE_VERSION_PATCH(version));
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user