Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06606ff1 authored by Uwe Kleine-König's avatar Uwe Kleine-König
Browse files

ARM: imx: dynamically register spi_imx devices (imx31)

parent 7536cf99
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ config MACH_MX31LITE
	select ARCH_MX31
	select MXC_ULPI if USB_ULPI
	select IMX_HAVE_PLATFORM_MXC_NAND
	select IMX_HAVE_PLATFORM_SPI_IMX
	help
	  Include support for MX31 LITEKIT platform. This includes specific
	  configurations for the board and its peripherals.
@@ -63,6 +64,7 @@ config MACH_MX31_3DS
	bool "Support MX31PDK (3DS)"
	select ARCH_MX31
	select IMX_HAVE_PLATFORM_MXC_NAND
	select IMX_HAVE_PLATFORM_SPI_IMX
	help
	  Include support for MX31PDK (3DS) platform. This includes specific
	  configurations for the board and its peripherals.
@@ -80,6 +82,7 @@ config MACH_MX31MOBOARD
	bool "Support mx31moboard platforms (EPFL Mobots group)"
	select ARCH_MX31
	select IMX_HAVE_PLATFORM_IMX_I2C
	select IMX_HAVE_PLATFORM_SPI_IMX
	select MXC_ULPI if USB_ULPI
	help
	  Include support for mx31moboard platform. This includes specific
@@ -88,6 +91,7 @@ config MACH_MX31MOBOARD
config MACH_MX31LILLY
	bool "Support MX31 LILLY-1131 platforms (INCO startec)"
	select ARCH_MX31
	select IMX_HAVE_PLATFORM_SPI_IMX
	select MXC_ULPI if USB_ULPI
	help
	  Include support for mx31 based LILLY1131 modules. This includes
+7 −0
Original line number Diff line number Diff line
@@ -18,3 +18,10 @@

#define imx31_add_mxc_nand(pdata)	\
	imx_add_mxc_nand_v1(MX31_NFC_BASE_ADDR, MX31_INT_NANDFC, pdata)

#define imx31_add_spi_imx0(pdata)	\
	imx_add_spi_imx(0, MX31_CSPI1_BASE_ADDR, SZ_4K, MX31_INT_CSPI1, pdata)
#define imx31_add_spi_imx1(pdata)	\
	imx_add_spi_imx(1, MX31_CSPI2_BASE_ADDR, SZ_4K, MX31_INT_CSPI2, pdata)
#define imx31_add_spi_imx2(pdata)	\
	imx_add_spi_imx(2, MX31_CSPI3_BASE_ADDR, SZ_4K, MX31_INT_CSPI3, pdata)
+1 −1
Original line number Diff line number Diff line
@@ -379,6 +379,7 @@ struct platform_device mxc_usbh2 = {
	.num_resources = ARRAY_SIZE(mxc_usbh2_resources),
};

#if defined(CONFIG_ARCH_MX35)
/*
 * SPI master controller
 * 3 channels
@@ -440,7 +441,6 @@ struct platform_device mxc_spi_device2 = {
	.resource = mxc_spi_2_resources,
};

#ifdef CONFIG_ARCH_MX35
static struct resource mxc_fec_resources[] = {
	{
		.start	= MXC_FEC_BASE_ADDR,
+2 −0
Original line number Diff line number Diff line
@@ -16,9 +16,11 @@ extern struct platform_device mxc_otg_host;
extern struct platform_device mxc_usbh1;
extern struct platform_device mxc_usbh2;
extern struct platform_device mxc_rnga_device;
#if defined(CONFIG_ARCH_MX35)
extern struct platform_device mxc_spi_device0;
extern struct platform_device mxc_spi_device1;
extern struct platform_device mxc_spi_device2;
#endif
extern struct platform_device imx_ssi_device0;
extern struct platform_device imx_ssi_device1;
extern struct platform_device imx_ssi_device1;
+2 −3
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@
#include <mach/common.h>
#include <mach/imx-uart.h>
#include <mach/iomux-mx3.h>
#include <mach/spi.h>

#include "devices-imx31.h"
#include "devices.h"
@@ -170,7 +169,7 @@ static int spi1_internal_chipselect[] = {
	MXC_SPI_CS(2),
};

static struct spi_imx_master spi1_pdata = {
static const struct spi_imx_master spi1_pdata __initconst = {
	.chipselect	= spi1_internal_chipselect,
	.num_chipselect	= ARRAY_SIZE(spi1_internal_chipselect),
};
@@ -419,7 +418,7 @@ static void __init mxc_board_init(void)
	mxc_register_device(&mxc_uart_device0, &uart_pdata);
	imx31_add_mxc_nand(&mx31_3ds_nand_board_info);

	mxc_register_device(&mxc_spi_device1, &spi1_pdata);
	imx31_add_spi_imx0(&spi1_pdata);
	spi_register_board_info(mx31_3ds_spi_devs,
						ARRAY_SIZE(mx31_3ds_spi_devs));

Loading