Em terça-feira, 21 de janeiro de 2014 08h44min19s UTC-3, Tomas Novotny
escreveu:
> Hi All,
>
>
>
> I'm trying to use some SPI devices on A10s OLinuXino. It was flawless for
>
> simple MCU driven by spidev (everything needed is defined in FEX). Now I'm
>
> trying to connect external CAN over SPI (MCP2515).
>
> The mcp251x driver needs to pass oscillator frequency through the
>
> mcp251x_platform_data structure. Is there any clean way how to do it on 3.4
>
> linux-sunxi? It seems that platform data for SPI board aren't passed by sunxi
>
> SPI driver.
>
> I'm using Debian image with custom built 3.4.61 linux-sunxi.
>
> Thanks to all,
>
>
>
> Tomas
You can change by yourself spi_sunxi.c, something like that:
diff --git a/drivers/spi/spi_sunxi.c b/drivers/spi/spi_sunxi.c
index a3792fd..2f0ab7c 100644
--- a/drivers/spi/spi_sunxi.c
+++ b/drivers/spi/spi_sunxi.c
@@ -28,6 +28,7 @@
#include <linux/spi/spi.h>
#include <linux/spi/spi_bitbang.h>
+#include <linux/can/platform/mcp251x.h>
#include <asm/io.h>
#include <plat/dma.h>
@@ -134,6 +135,10 @@ struct sunxi_spi {
int cs_bitmap;/* cs0- 0x1; cs1-0x2, cs0&cs1-0x3. */
};
+static struct mcp251x_platform_data mcp251x_info = {
+ .oscillator_frequency = 8000000,
+};
+
--
You received this message because you are subscribed to the Google Groups
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.