Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
4697bb92
Commit
4697bb92
authored
Aug 25, 2010
by
Uwe Kleine-König
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: imx: dynamically allocate imx-ssi devices
Signed-off-by:
Uwe Kleine-König
<
u.kleine-koenig@pengutronix.de
>
parent
5162de08
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
187 additions
and
144 deletions
+187
-144
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/Kconfig
+3
-2
arch/arm/mach-imx/devices-imx21.h
arch/arm/mach-imx/devices-imx21.h
+4
-0
arch/arm/mach-imx/devices-imx27.h
arch/arm/mach-imx/devices-imx27.h
+4
-0
arch/arm/mach-imx/devices.c
arch/arm/mach-imx/devices.c
+0
-35
arch/arm/mach-imx/devices.h
arch/arm/mach-imx/devices.h
+0
-2
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
+3
-3
arch/arm/mach-imx/mach-pca100.c
arch/arm/mach-imx/mach-pca100.c
+2
-3
arch/arm/mach-mx25/Kconfig
arch/arm/mach-mx25/Kconfig
+2
-2
arch/arm/mach-mx25/devices-imx25.h
arch/arm/mach-mx25/devices-imx25.h
+4
-0
arch/arm/mach-mx25/devices.c
arch/arm/mach-mx25/devices.c
+0
-38
arch/arm/mach-mx25/devices.h
arch/arm/mach-mx25/devices.h
+0
-2
arch/arm/mach-mx25/eukrea_mbimxsd-baseboard.c
arch/arm/mach-mx25/eukrea_mbimxsd-baseboard.c
+3
-3
arch/arm/mach-mx3/Kconfig
arch/arm/mach-mx3/Kconfig
+4
-2
arch/arm/mach-mx3/devices-imx31.h
arch/arm/mach-mx3/devices-imx31.h
+4
-0
arch/arm/mach-mx3/devices-imx35.h
arch/arm/mach-mx3/devices-imx35.h
+4
-0
arch/arm/mach-mx3/devices.c
arch/arm/mach-mx3/devices.c
+0
-42
arch/arm/mach-mx3/devices.h
arch/arm/mach-mx3/devices.h
+0
-3
arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c
arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c
+3
-3
arch/arm/mach-mx3/mach-mx31ads.c
arch/arm/mach-mx3/mach-mx31ads.c
+1
-1
arch/arm/mach-mx3/mach-pcm043.c
arch/arm/mach-mx3/mach-pcm043.c
+2
-3
arch/arm/plat-mxc/devices/Kconfig
arch/arm/plat-mxc/devices/Kconfig
+3
-0
arch/arm/plat-mxc/devices/Makefile
arch/arm/plat-mxc/devices/Makefile
+1
-0
arch/arm/plat-mxc/devices/platform-imx-ssi.c
arch/arm/plat-mxc/devices/platform-imx-ssi.c
+98
-0
arch/arm/plat-mxc/include/mach/devices-common.h
arch/arm/plat-mxc/include/mach/devices-common.h
+15
-0
arch/arm/plat-mxc/include/mach/mx25.h
arch/arm/plat-mxc/include/mach/mx25.h
+9
-0
arch/arm/plat-mxc/include/mach/mx31.h
arch/arm/plat-mxc/include/mach/mx31.h
+9
-0
arch/arm/plat-mxc/include/mach/mx35.h
arch/arm/plat-mxc/include/mach/mx35.h
+9
-0
No files found.
arch/arm/mach-imx/Kconfig
View file @
4697bb92
...
...
@@ -146,8 +146,8 @@ choice
default MACH_EUKREA_MBIMX27_BASEBOARD
config MACH_EUKREA_MBIMX27_BASEBOARD
prompt
"Eukrea MBIMX27 development board"
bool
bool
"Eukrea MBIMX27 development board"
select IMX_HAVE_PLATFORM_IMX_SSI
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_SPI_IMX
help
...
...
@@ -182,6 +182,7 @@ config MACH_IMX27LITE
config MACH_PCA100
bool "Phytec phyCARD-s (pca100)"
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_SSI
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_NAND
select IMX_HAVE_PLATFORM_SPI_IMX
...
...
arch/arm/mach-imx/devices-imx21.h
View file @
4697bb92
...
...
@@ -12,6 +12,10 @@
#define imx21_add_i2c_imx(pdata) \
imx_add_imx_i2c(0, MX2x_I2C_BASE_ADDR, SZ_4K, MX2x_INT_I2C, pdata)
extern
const
struct
imx_imx_ssi_data
imx21_imx_ssi_data
[]
__initconst
;
#define imx21_add_imx_ssi(id, pdata) \
imx_add_imx_ssi(&imx21_imx_ssi_data[id], pdata)
extern
const
struct
imx_imx_uart_1irq_data
imx21_imx_uart_data
[]
__initconst
;
#define imx21_add_imx_uart(id, pdata) \
imx_add_imx_uart_1irq(&imx21_imx_uart_data[id], pdata)
...
...
arch/arm/mach-imx/devices-imx27.h
View file @
4697bb92
...
...
@@ -14,6 +14,10 @@
#define imx27_add_i2c_imx1(pdata) \
imx_add_imx_i2c(1, MX27_I2C2_BASE_ADDR, SZ_4K, MX27_INT_I2C2, pdata)
extern
const
struct
imx_imx_ssi_data
imx27_imx_ssi_data
[]
__initconst
;
#define imx27_add_imx_ssi(id, pdata) \
imx_add_imx_ssi(&imx27_imx_ssi_data[id], pdata)
extern
const
struct
imx_imx_uart_1irq_data
imx27_imx_uart_data
[]
__initconst
;
#define imx27_add_imx_uart(id, pdata) \
imx_add_imx_uart_1irq(&imx27_imx_uart_data[id], pdata)
...
...
arch/arm/mach-imx/devices.c
View file @
4697bb92
...
...
@@ -480,41 +480,6 @@ struct platform_device mxc_usbh2 = {
};
#endif
#define DEFINE_IMX_SSI_DMARES(_name, ssin, suffix) \
{ \
.name = _name, \
.start = MX2x_DMA_REQ_SSI ## ssin ## _ ## suffix, \
.end = MX2x_DMA_REQ_SSI ## ssin ## _ ## suffix, \
.flags = IORESOURCE_DMA, \
}
#define DEFINE_IMX_SSI_DEVICE(n, ssin, baseaddr, irq) \
static struct resource imx_ssi_resources ## n[] = { \
{ \
.start = MX2x_SSI ## ssin ## _BASE_ADDR, \
.end = MX2x_SSI ## ssin ## _BASE_ADDR + 0x6f, \
.flags = IORESOURCE_MEM, \
}, { \
.start = MX2x_INT_SSI1, \
.end = MX2x_INT_SSI1, \
.flags = IORESOURCE_IRQ, \
}, \
DEFINE_IMX_SSI_DMARES("tx0", ssin, TX0), \
DEFINE_IMX_SSI_DMARES("rx0", ssin, RX0), \
DEFINE_IMX_SSI_DMARES("tx1", ssin, TX1), \
DEFINE_IMX_SSI_DMARES("rx1", ssin, RX1), \
}; \
\
struct platform_device imx_ssi_device ## n = { \
.name = "imx-ssi", \
.id = n, \
.num_resources = ARRAY_SIZE(imx_ssi_resources ## n), \
.resource = imx_ssi_resources ## n, \
}
DEFINE_IMX_SSI_DEVICE
(
0
,
1
,
MX2x_SSI1_BASE_ADDR
,
MX2x_INT_SSI1
);
DEFINE_IMX_SSI_DEVICE
(
1
,
2
,
MX2x_SSI1_BASE_ADDR
,
MX2x_INT_SSI1
);
/* GPIO port description */
#define DEFINE_MXC_GPIO_PORT_IRQ(SOC, n, _irq) \
{ \
...
...
arch/arm/mach-imx/devices.h
View file @
4697bb92
...
...
@@ -26,7 +26,5 @@ extern struct platform_device mxc_otg_host;
extern
struct
platform_device
mxc_usbh1
;
extern
struct
platform_device
mxc_usbh2
;
extern
struct
platform_device
mx21_usbhc_device
;
extern
struct
platform_device
imx_ssi_device0
;
extern
struct
platform_device
imx_ssi_device1
;
extern
struct
platform_device
imx_kpp_device
;
#endif
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
View file @
4697bb92
...
...
@@ -36,7 +36,6 @@
#include <mach/hardware.h>
#include <mach/mmc.h>
#include <mach/spi.h>
#include <mach/ssi.h>
#include <mach/audmux.h>
#include "devices-imx27.h"
...
...
@@ -311,7 +310,8 @@ static struct imxmmc_platform_data sdhc_pdata = {
.
dat3_card_detect
=
1
,
};
struct
imx_ssi_platform_data
eukrea_mbimx27_ssi_pdata
=
{
static
const
struct
imx_ssi_platform_data
eukrea_mbimx27_ssi_pdata
__initconst
=
{
.
flags
=
IMX_SSI_DMA
|
IMX_SSI_USE_I2S_SLAVE
,
};
...
...
@@ -357,7 +357,7 @@ void __init eukrea_mbimx27_baseboard_init(void)
i2c_register_board_info
(
0
,
eukrea_mbimx27_i2c_devices
,
ARRAY_SIZE
(
eukrea_mbimx27_i2c_devices
));
mxc_register_device
(
&
imx_ssi_device
0
,
&
eukrea_mbimx27_ssi_pdata
);
imx27_add_imx_ssi
(
0
,
&
eukrea_mbimx27_ssi_pdata
);
#if defined(CONFIG_TOUCHSCREEN_ADS7846) \
|| defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
...
...
arch/arm/mach-imx/mach-pca100.c
View file @
4697bb92
...
...
@@ -38,7 +38,6 @@
#include <mach/iomux-mx27.h>
#include <asm/mach/time.h>
#include <mach/audmux.h>
#include <mach/ssi.h>
#include <mach/mxc_nand.h>
#include <mach/irqs.h>
#include <mach/mmc.h>
...
...
@@ -252,7 +251,7 @@ static void pca100_ac97_cold_reset(struct snd_ac97 *ac97)
msleep
(
2
);
}
static
struct
imx_ssi_platform_data
pca100_ssi_pdata
=
{
static
const
struct
imx_ssi_platform_data
pca100_ssi_pdata
__initconst
=
{
.
ac97_reset
=
pca100_ac97_cold_reset
,
.
ac97_warm_reset
=
pca100_ac97_warm_reset
,
.
flags
=
IMX_SSI_USE_AC97
,
...
...
@@ -389,7 +388,7 @@ static void __init pca100_init(void)
if
(
ret
)
printk
(
KERN_ERR
"pca100: Failed to setup pins (%d)
\n
"
,
ret
);
mxc_register_device
(
&
imx_ssi_device
0
,
&
pca100_ssi_pdata
);
imx27_add_imx_ssi
(
0
,
&
pca100_ssi_pdata
);
imx27_add_imx_uart0
(
&
uart_pdata
);
...
...
arch/arm/mach-mx25/Kconfig
View file @
4697bb92
...
...
@@ -20,8 +20,8 @@ choice
default MACH_EUKREA_MBIMXSD25_BASEBOARD
config MACH_EUKREA_MBIMXSD25_BASEBOARD
prompt
"Eukrea MBIMXSD development board"
bool
bool
"Eukrea MBIMXSD development board"
select IMX_HAVE_PLATFORM_IMX_SSI
help
This adds board specific devices that can be found on Eukrea's
MBIMXSD evaluation board.
...
...
arch/arm/mach-mx25/devices-imx25.h
View file @
4697bb92
...
...
@@ -21,6 +21,10 @@
#define imx25_add_imx_i2c2(pdata) \
imx_add_imx_i2c(2, MX25_I2C3_BASE_ADDR, SZ_16K, MX25_INT_I2C3, pdata)
extern
const
struct
imx_imx_ssi_data
imx25_imx_ssi_data
[]
__initconst
;
#define imx25_add_imx_ssi(id, pdata) \
imx_add_imx_ssi(&imx25_imx_ssi_data[id], pdata)
extern
const
struct
imx_imx_uart_1irq_data
imx25_imx_uart_data
[]
__initconst
;
#define imx25_add_imx_uart(id, pdata) \
imx_add_imx_uart_1irq(&imx25_imx_uart_data[id], pdata)
...
...
arch/arm/mach-mx25/devices.c
View file @
4697bb92
...
...
@@ -305,44 +305,6 @@ struct platform_device mx25_kpp_device = {
.
resource
=
mx25_kpp_resources
,
};
static
struct
resource
imx_ssi_resources0
[]
=
{
{
.
start
=
MX25_SSI1_BASE_ADDR
,
.
end
=
MX25_SSI1_BASE_ADDR
+
0x3fff
,
.
flags
=
IORESOURCE_MEM
,
},
{
.
start
=
MX25_INT_SSI1
,
.
end
=
MX25_INT_SSI1
,
.
flags
=
IORESOURCE_IRQ
,
},
};
static
struct
resource
imx_ssi_resources1
[]
=
{
{
.
start
=
MX25_SSI2_BASE_ADDR
,
.
end
=
MX25_SSI2_BASE_ADDR
+
0x3fff
,
.
flags
=
IORESOURCE_MEM
},
{
.
start
=
MX25_INT_SSI2
,
.
end
=
MX25_INT_SSI2
,
.
flags
=
IORESOURCE_IRQ
,
},
};
struct
platform_device
imx_ssi_device0
=
{
.
name
=
"imx-ssi"
,
.
id
=
0
,
.
num_resources
=
ARRAY_SIZE
(
imx_ssi_resources0
),
.
resource
=
imx_ssi_resources0
,
};
struct
platform_device
imx_ssi_device1
=
{
.
name
=
"imx-ssi"
,
.
id
=
1
,
.
num_resources
=
ARRAY_SIZE
(
imx_ssi_resources1
),
.
resource
=
imx_ssi_resources1
,
};
static
struct
resource
mx25_csi_resources
[]
=
{
{
.
start
=
MX25_CSI_BASE_ADDR
,
...
...
arch/arm/mach-mx25/devices.h
View file @
4697bb92
...
...
@@ -11,6 +11,4 @@ extern struct platform_device mx25_rtc_device;
extern
struct
platform_device
mx25_fb_device
;
extern
struct
platform_device
mxc_wdt
;
extern
struct
platform_device
mx25_kpp_device
;
extern
struct
platform_device
imx_ssi_device0
;
extern
struct
platform_device
imx_ssi_device1
;
extern
struct
platform_device
mx25_csi_device
;
arch/arm/mach-mx25/eukrea_mbimxsd-baseboard.c
View file @
4697bb92
...
...
@@ -34,7 +34,6 @@
#include <mach/mx25.h>
#include <mach/imx-uart.h>
#include <mach/imxfb.h>
#include <mach/ssi.h>
#include <mach/audmux.h>
#include "devices-imx25.h"
...
...
@@ -205,7 +204,8 @@ static struct i2c_board_info eukrea_mbimxsd_i2c_devices[] = {
},
};
struct
imx_ssi_platform_data
eukrea_mbimxsd_ssi_pdata
=
{
static
const
struct
imx_ssi_platform_data
eukrea_mbimxsd_ssi_pdata
__initconst
=
{
.
flags
=
IMX_SSI_SYN
|
IMX_SSI_NET
|
IMX_SSI_USE_I2S_SLAVE
,
};
...
...
@@ -239,7 +239,7 @@ void __init eukrea_mbimxsd25_baseboard_init(void)
imx25_add_imx_uart1
(
&
uart_pdata
);
mxc_register_device
(
&
mx25_fb_device
,
&
eukrea_mximxsd_fb_pdata
);
mxc_register_device
(
&
imx_ssi_device
0
,
&
eukrea_mbimxsd_ssi_pdata
);
imx25_add_imx_ssi
(
0
,
&
eukrea_mbimxsd_ssi_pdata
);
gpio_request
(
GPIO_LED1
,
"LED1"
);
gpio_direction_output
(
GPIO_LED1
,
1
);
...
...
arch/arm/mach-mx3/Kconfig
View file @
4697bb92
...
...
@@ -17,6 +17,7 @@ config MACH_MX31ADS
bool "Support MX31ADS platforms"
select ARCH_MX31
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_SSI
select IMX_HAVE_PLATFORM_IMX_UART
default y
help
...
...
@@ -118,6 +119,7 @@ config MACH_PCM043
bool "Support Phytec pcm043 (i.MX35) platforms"
select ARCH_MX35
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_SSI
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_NAND
select IMX_HAVE_PLATFORM_FLEXCAN
...
...
@@ -172,8 +174,8 @@ choice
default MACH_EUKREA_MBIMXSD35_BASEBOARD
config MACH_EUKREA_MBIMXSD35_BASEBOARD
prompt
"Eukrea MBIMXSD development board"
bool
bool
"Eukrea MBIMXSD development board"
select IMX_HAVE_PLATFORM_IMX_SSI
help
This adds board specific devices that can be found on Eukrea's
MBIMXSD evaluation board.
...
...
arch/arm/mach-mx3/devices-imx31.h
View file @
4697bb92
...
...
@@ -16,6 +16,10 @@
#define imx31_add_imx_i2c2(pdata) \
imx_add_imx_i2c(2, MX31_I2C3_BASE_ADDR, SZ_4K, MX31_INT_I2C3, pdata)
extern
const
struct
imx_imx_ssi_data
imx31_imx_ssi_data
[]
__initconst
;
#define imx31_add_imx_ssi(id, pdata) \
imx_add_imx_ssi(&imx31_imx_ssi_data[id], pdata)
extern
const
struct
imx_imx_uart_1irq_data
imx31_imx_uart_data
[]
__initconst
;
#define imx31_add_imx_uart(id, pdata) \
imx_add_imx_uart_1irq(&imx31_imx_uart_data[id], pdata)
...
...
arch/arm/mach-mx3/devices-imx35.h
View file @
4697bb92
...
...
@@ -21,6 +21,10 @@
#define imx35_add_imx_i2c2(pdata) \
imx_add_imx_i2c(2, MX35_I2C3_BASE_ADDR, SZ_4K, MX35_INT_I2C3, pdata)
extern
const
struct
imx_imx_ssi_data
imx35_imx_ssi_data
[]
__initconst
;
#define imx35_add_imx_ssi(id, pdata) \
imx_add_imx_ssi(&imx35_imx_ssi_data[id], pdata)
extern
const
struct
imx_imx_uart_1irq_data
imx35_imx_uart_data
[]
__initconst
;
#define imx35_add_imx_uart(id, pdata) \
imx_add_imx_uart_1irq(&imx35_imx_uart_data[id], pdata)
...
...
arch/arm/mach-mx3/devices.c
View file @
4697bb92
...
...
@@ -302,44 +302,6 @@ struct platform_device mxc_fec_device = {
};
#endif
static
struct
resource
imx_ssi_resources0
[]
=
{
{
.
start
=
SSI1_BASE_ADDR
,
.
end
=
SSI1_BASE_ADDR
+
0xfff
,
.
flags
=
IORESOURCE_MEM
,
},
{
.
start
=
MX31_INT_SSI1
,
.
end
=
MX31_INT_SSI1
,
.
flags
=
IORESOURCE_IRQ
,
},
};
static
struct
resource
imx_ssi_resources1
[]
=
{
{
.
start
=
SSI2_BASE_ADDR
,
.
end
=
SSI2_BASE_ADDR
+
0xfff
,
.
flags
=
IORESOURCE_MEM
},
{
.
start
=
MX31_INT_SSI2
,
.
end
=
MX31_INT_SSI2
,
.
flags
=
IORESOURCE_IRQ
,
},
};
struct
platform_device
imx_ssi_device0
=
{
.
name
=
"imx-ssi"
,
.
id
=
0
,
.
num_resources
=
ARRAY_SIZE
(
imx_ssi_resources0
),
.
resource
=
imx_ssi_resources0
,
};
struct
platform_device
imx_ssi_device1
=
{
.
name
=
"imx-ssi"
,
.
id
=
1
,
.
num_resources
=
ARRAY_SIZE
(
imx_ssi_resources1
),
.
resource
=
imx_ssi_resources1
,
};
static
struct
resource
imx_wdt_resources
[]
=
{
{
.
flags
=
IORESOURCE_MEM
,
...
...
@@ -410,10 +372,6 @@ static int __init mx3_devices_init(void)
mxc_usbh1_resources
[
0
].
end
=
MX35_OTG_BASE_ADDR
+
0x5ff
;
mxc_usbh1_resources
[
1
].
start
=
MXC_INT_USBHS
;
mxc_usbh1_resources
[
1
].
end
=
MXC_INT_USBHS
;
imx_ssi_resources0
[
1
].
start
=
MX35_INT_SSI1
;
imx_ssi_resources0
[
1
].
end
=
MX35_INT_SSI1
;
imx_ssi_resources1
[
1
].
start
=
MX35_INT_SSI2
;
imx_ssi_resources1
[
1
].
end
=
MX35_INT_SSI2
;
imx_wdt_resources
[
0
].
start
=
MX35_WDOG_BASE_ADDR
;
imx_wdt_resources
[
0
].
end
=
MX35_WDOG_BASE_ADDR
+
0x3fff
;
}
...
...
arch/arm/mach-mx3/devices.h
View file @
4697bb92
...
...
@@ -10,9 +10,6 @@ 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
;
extern
struct
platform_device
imx_ssi_device0
;
extern
struct
platform_device
imx_ssi_device1
;
extern
struct
platform_device
imx_ssi_device1
;
extern
struct
platform_device
imx_wdt_device0
;
extern
struct
platform_device
imx_rtc_device0
;
extern
struct
platform_device
imx_kpp_device
;
arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c
View file @
4697bb92
...
...
@@ -43,7 +43,6 @@
#include <mach/ipu.h>
#include <mach/mx3fb.h>
#include <mach/audmux.h>
#include <mach/ssi.h>
#include "devices-imx35.h"
#include "devices.h"
...
...
@@ -206,7 +205,8 @@ static struct i2c_board_info eukrea_mbimxsd_i2c_devices[] = {
},
};
struct
imx_ssi_platform_data
eukrea_mbimxsd_ssi_pdata
=
{
static
const
struct
imx_ssi_platform_data
eukrea_mbimxsd_ssi_pdata
__initconst
=
{
.
flags
=
IMX_SSI_SYN
|
IMX_SSI_NET
|
IMX_SSI_USE_I2S_SLAVE
,
};
...
...
@@ -242,7 +242,7 @@ void __init eukrea_mbimxsd35_baseboard_init(void)
mxc_register_device
(
&
mx3_ipu
,
&
mx3_ipu_data
);
mxc_register_device
(
&
mx3_fb
,
&
mx3fb_pdata
);
mxc_register_device
(
&
imx_ssi_device
0
,
&
eukrea_mbimxsd_ssi_pdata
);
imx35_add_imx_ssi
(
0
,
&
eukrea_mbimxsd_ssi_pdata
);
gpio_request
(
GPIO_LED1
,
"LED1"
);
gpio_direction_output
(
GPIO_LED1
,
1
);
...
...
arch/arm/mach-mx3/mach-mx31ads.c
View file @
4697bb92
...
...
@@ -517,7 +517,7 @@ static unsigned int ssi_pins[] = {
static
void
mxc_init_audio
(
void
)
{
mxc_register_device
(
&
imx_ssi_device
0
,
NULL
);
imx31_add_imx_ssi
(
0
,
NULL
);
mxc_iomux_setup_multiple_pins
(
ssi_pins
,
ARRAY_SIZE
(
ssi_pins
),
"ssi"
);
}
...
...
arch/arm/mach-mx3/mach-pcm043.c
View file @
4697bb92
...
...
@@ -42,7 +42,6 @@
#include <mach/mxc_ehci.h>
#include <mach/ulpi.h>
#include <mach/audmux.h>
#include <mach/ssi.h>
#include "devices-imx35.h"
#include "devices.h"
...
...
@@ -293,7 +292,7 @@ static void pcm043_ac97_cold_reset(struct snd_ac97 *ac97)
mdelay
(
1
);
}
static
struct
imx_ssi_platform_data
pcm043_ssi_pdata
=
{
static
const
struct
imx_ssi_platform_data
pcm043_ssi_pdata
__initconst
=
{
.
ac97_reset
=
pcm043_ac97_cold_reset
,
.
ac97_warm_reset
=
pcm043_ac97_warm_reset
,
.
flags
=
IMX_SSI_USE_AC97
,
...
...
@@ -361,7 +360,7 @@ static void __init mxc_board_init(void)
imx35_add_imx_uart0
(
&
uart_pdata
);
imx35_add_mxc_nand
(
&
pcm037_nand_board_info
);
mxc_register_device
(
&
imx_ssi_device
0
,
&
pcm043_ssi_pdata
);
imx35_add_imx_ssi
(
0
,
&
pcm043_ssi_pdata
);
imx35_add_imx_uart1
(
&
uart_pdata
);
...
...
arch/arm/plat-mxc/devices/Kconfig
View file @
4697bb92
...
...
@@ -5,6 +5,9 @@ config IMX_HAVE_PLATFORM_FLEXCAN
config IMX_HAVE_PLATFORM_IMX_I2C
bool
config IMX_HAVE_PLATFORM_IMX_SSI
bool
config IMX_HAVE_PLATFORM_IMX_UART
bool
...
...
arch/arm/plat-mxc/devices/Makefile
View file @
4697bb92
obj-$(CONFIG_IMX_HAVE_PLATFORM_FLEXCAN)
+=
platform-flexcan.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C)
+=
platform-imx-i2c.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI)
+=
platform-imx-ssi.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART)
+=
platform-imx-uart.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_NAND)
+=
platform-mxc_nand.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX)
+=
platform-spi_imx.o
arch/arm/plat-mxc/devices/platform-imx-ssi.c
0 → 100644
View file @
4697bb92
/*
* Copyright (C) 2010 Pengutronix
* Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
*
* 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 <mach/hardware.h>
#include <mach/devices-common.h>
#define imx_imx_ssi_data_entry(soc, _id, _hwid, _size) \
[_id] = { \
.id = _id, \
.iobase = soc ## _SSI ## _hwid ## _BASE_ADDR, \
.iosize = _size, \
.irq = soc ## _INT_SSI ## _hwid, \
.dmatx0 = soc ## _DMA_REQ_SSI ## _hwid ## _TX0, \
.dmarx0 = soc ## _DMA_REQ_SSI ## _hwid ## _RX0, \
.dmatx1 = soc ## _DMA_REQ_SSI ## _hwid ## _TX1, \
.dmarx1 = soc ## _DMA_REQ_SSI ## _hwid ## _RX1, \
}
#ifdef CONFIG_SOC_IMX21
const
struct
imx_imx_ssi_data
imx21_imx_ssi_data
[]
__initconst
=
{
#define imx21_imx_ssi_data_entry(_id, _hwid) \
imx_imx_ssi_data_entry(MX21, _id, _hwid, SZ_4K)
imx21_imx_ssi_data_entry
(
0
,
1
),
imx21_imx_ssi_data_entry
(
1
,
2
),
};
#endif
/* ifdef CONFIG_SOC_IMX21 */
#ifdef CONFIG_ARCH_MX25
const
struct
imx_imx_ssi_data
imx25_imx_ssi_data
[]
__initconst
=
{
#define imx25_imx_ssi_data_entry(_id, _hwid) \
imx_imx_ssi_data_entry(MX25, _id, _hwid, SZ_4K)
imx25_imx_ssi_data_entry
(
0
,
1
),
imx25_imx_ssi_data_entry
(
1
,
2
),
};
#endif
/* ifdef CONFIG_ARCH_MX25 */
#ifdef CONFIG_SOC_IMX27
const
struct
imx_imx_ssi_data
imx27_imx_ssi_data
[]
__initconst
=
{
#define imx27_imx_ssi_data_entry(_id, _hwid) \
imx_imx_ssi_data_entry(MX27, _id, _hwid, SZ_4K)
imx27_imx_ssi_data_entry
(
0
,
1
),
imx27_imx_ssi_data_entry
(
1
,
2
),
};
#endif
/* ifdef CONFIG_SOC_IMX27 */
#ifdef CONFIG_ARCH_MX31
const
struct
imx_imx_ssi_data
imx31_imx_ssi_data
[]
__initconst
=
{
#define imx31_imx_ssi_data_entry(_id, _hwid) \
imx_imx_ssi_data_entry(MX31, _id, _hwid, SZ_4K)
imx31_imx_ssi_data_entry
(
0
,
1
),
imx31_imx_ssi_data_entry
(
1
,
2
),
};
#endif
/* ifdef CONFIG_ARCH_MX31 */
#ifdef CONFIG_ARCH_MX35
const
struct
imx_imx_ssi_data
imx35_imx_ssi_data
[]
__initconst
=
{
#define imx35_imx_ssi_data_entry(_id, _hwid) \
imx_imx_ssi_data_entry(MX35, _id, _hwid, SZ_4K)
imx35_imx_ssi_data_entry
(
0
,
1
),
imx35_imx_ssi_data_entry
(
1
,
2
),
};
#endif
/* ifdef CONFIG_ARCH_MX35 */
struct
platform_device
*
__init
imx_add_imx_ssi
(
const
struct
imx_imx_ssi_data
*
data
,
const
struct
imx_ssi_platform_data
*
pdata
)
{
struct
resource
res
[]
=
{
{
.
start
=
data
->
iobase
,
.
end
=
data
->
iobase
+
data
->
iosize
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
{
.
start
=
data
->
irq
,
.
end
=
data
->
irq
,
.
flags
=
IORESOURCE_IRQ
,
},
#define DMARES(_name) { \
.name = #_name, \
.start = data->dma ## _name, \
.end = data->dma ## _name, \
.flags = IORESOURCE_DMA, \
}
DMARES
(
tx0
),
DMARES
(
rx0
),
DMARES
(
tx1
),
DMARES
(
rx1
),
};
return
imx_add_platform_device
(
"imx-ssi"
,
data
->
id
,
res
,
ARRAY_SIZE
(
res
),
pdata
,
sizeof
(
*
pdata
));
}
arch/arm/plat-mxc/include/mach/devices-common.h
View file @
4697bb92
...
...
@@ -25,6 +25,21 @@ struct platform_device *__init imx_add_imx_i2c(int id,
resource_size_t
iobase
,
resource_size_t
iosize
,
int
irq
,
const
struct
imxi2c_platform_data
*
pdata
);
#include <mach/ssi.h>
struct
imx_imx_ssi_data
{
int
id
;
resource_size_t
iobase
;
resource_size_t
iosize
;
resource_size_t
irq
;
resource_size_t
dmatx0
;
resource_size_t
dmarx0
;
resource_size_t
dmatx1
;
resource_size_t
dmarx1
;
};
struct
platform_device
*
__init
imx_add_imx_ssi
(
const
struct
imx_imx_ssi_data
*
data
,
const
struct
imx_ssi_platform_data
*
pdata
);
#include <mach/imx-uart.h>
struct
imx_imx_uart_3irq_data
{
int
id
;
...
...
arch/arm/plat-mxc/include/mach/mx25.h
View file @
4697bb92
...
...
@@ -77,4 +77,13 @@
#define MX25_INT_UART1 45
#define MX25_INT_FEC 57
#define MX25_DMA_REQ_SSI2_RX1 22
#define MX25_DMA_REQ_SSI2_TX1 23
#define MX25_DMA_REQ_SSI2_RX0 24
#define MX25_DMA_REQ_SSI2_TX0 25
#define MX25_DMA_REQ_SSI1_RX1 26
#define MX25_DMA_REQ_SSI1_TX1 27
#define MX25_DMA_REQ_SSI1_RX0 28
#define MX25_DMA_REQ_SSI1_TX0 29
#endif
/* ifndef __MACH_MX25_H__ */
arch/arm/plat-mxc/include/mach/mx31.h
View file @
4697bb92
...
...
@@ -197,6 +197,15 @@ static inline void mx31_setup_weimcs(size_t cs,
#define MX31_INT_EXT_WDOG 62
#define MX31_INT_EXT_TV 63
#define MX31_DMA_REQ_SSI2_RX1 22
#define MX31_DMA_REQ_SSI2_TX1 23
#define MX31_DMA_REQ_SSI2_RX0 24
#define MX31_DMA_REQ_SSI2_TX0 25
#define MX31_DMA_REQ_SSI1_RX1 26
#define MX31_DMA_REQ_SSI1_TX1 27
#define MX31_DMA_REQ_SSI1_RX0 28
#define MX31_DMA_REQ_SSI1_TX0 29
#define MX31_PROD_SIGNATURE 0x1
/* For MX31 */
/* silicon revisions specific to i.MX31 */
...
...
arch/arm/plat-mxc/include/mach/mx35.h
View file @
4697bb92
...
...
@@ -173,6 +173,15 @@
#define MX35_INT_EXT_WDOG 62
#define MX35_INT_EXT_TV 63
#define MX35_DMA_REQ_SSI2_RX1 22
#define MX35_DMA_REQ_SSI2_TX1 23
#define MX35_DMA_REQ_SSI2_RX0 24
#define MX35_DMA_REQ_SSI2_TX0 25
#define MX35_DMA_REQ_SSI1_RX1 26
#define MX35_DMA_REQ_SSI1_TX1 27
#define MX35_DMA_REQ_SSI1_RX0 28
#define MX35_DMA_REQ_SSI1_TX0 29
#define MX35_PROD_SIGNATURE 0x1
/* For MX31 */
/* silicon revisions specific to i.MX31 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment