Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
06606ff1
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
157
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
06606ff1
编写于
6月 22, 2010
作者:
U
Uwe Kleine-König
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARM: imx: dynamically register spi_imx devices (imx31)
Signed-off-by:
N
Uwe Kleine-König
<
u.kleine-koenig@pengutronix.de
>
上级
7536cf99
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
30 addition
and
19 deletion
+30
-19
arch/arm/mach-mx3/Kconfig
arch/arm/mach-mx3/Kconfig
+4
-0
arch/arm/mach-mx3/devices-imx31.h
arch/arm/mach-mx3/devices-imx31.h
+7
-0
arch/arm/mach-mx3/devices.c
arch/arm/mach-mx3/devices.c
+1
-1
arch/arm/mach-mx3/devices.h
arch/arm/mach-mx3/devices.h
+2
-0
arch/arm/mach-mx3/mach-mx31_3ds.c
arch/arm/mach-mx3/mach-mx31_3ds.c
+2
-3
arch/arm/mach-mx3/mach-mx31lilly.c
arch/arm/mach-mx3/mach-mx31lilly.c
+5
-5
arch/arm/mach-mx3/mach-mx31lite.c
arch/arm/mach-mx3/mach-mx31lite.c
+2
-3
arch/arm/mach-mx3/mach-mx31moboard.c
arch/arm/mach-mx3/mach-mx31moboard.c
+4
-4
arch/arm/mach-mx3/mx31lite-db.c
arch/arm/mach-mx3/mx31lite-db.c
+3
-3
未找到文件。
arch/arm/mach-mx3/Kconfig
浏览文件 @
06606ff1
...
...
@@ -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
...
...
arch/arm/mach-mx3/devices-imx31.h
浏览文件 @
06606ff1
...
...
@@ -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)
arch/arm/mach-mx3/devices.c
浏览文件 @
06606ff1
...
...
@@ -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
,
...
...
arch/arm/mach-mx3/devices.h
浏览文件 @
06606ff1
...
...
@@ -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
;
...
...
arch/arm/mach-mx3/mach-mx31_3ds.c
浏览文件 @
06606ff1
...
...
@@ -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
));
...
...
arch/arm/mach-mx3/mach-mx31lilly.c
浏览文件 @
06606ff1
...
...
@@ -42,10 +42,10 @@
#include <mach/common.h>
#include <mach/iomux-mx3.h>
#include <mach/board-mx31lilly.h>
#include <mach/spi.h>
#include <mach/mxc_ehci.h>
#include <mach/ulpi.h>
#include "devices-imx31.h"
#include "devices.h"
/*
...
...
@@ -253,12 +253,12 @@ static int spi_internal_chipselect[] = {
MXC_SPI_CS
(
2
),
};
static
struct
spi_imx_master
spi0_pdata
=
{
static
const
struct
spi_imx_master
spi0_pdata
__initconst
=
{
.
chipselect
=
spi_internal_chipselect
,
.
num_chipselect
=
ARRAY_SIZE
(
spi_internal_chipselect
),
};
static
struct
spi_imx_master
spi1_pdata
=
{
static
const
struct
spi_imx_master
spi1_pdata
__initconst
=
{
.
chipselect
=
spi_internal_chipselect
,
.
num_chipselect
=
ARRAY_SIZE
(
spi_internal_chipselect
),
};
...
...
@@ -310,8 +310,8 @@ static void __init mx31lilly_board_init(void)
mxc_iomux_alloc_pin
(
MX31_PIN_CSPI2_SS1__SS1
,
"SPI2_SS1"
);
mxc_iomux_alloc_pin
(
MX31_PIN_CSPI2_SS2__SS2
,
"SPI2_SS2"
);
mxc_register_device
(
&
mxc_spi_device0
,
&
spi0_pdata
);
mxc_register_device
(
&
mxc_spi_device1
,
&
spi1_pdata
);
imx31_add_spi_imx0
(
&
spi0_pdata
);
imx31_add_spi_imx1
(
&
spi1_pdata
);
spi_register_board_info
(
&
mc13783_dev
,
1
);
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
));
...
...
arch/arm/mach-mx3/mach-mx31lite.c
浏览文件 @
06606ff1
...
...
@@ -41,7 +41,6 @@
#include <mach/imx-uart.h>
#include <mach/iomux-mx3.h>
#include <mach/irqs.h>
#include <mach/spi.h>
#include <mach/mxc_ehci.h>
#include <mach/ulpi.h>
...
...
@@ -109,7 +108,7 @@ static int spi_internal_chipselect[] = {
MXC_SPI_CS
(
0
),
};
static
struct
spi_imx_master
spi1_pdata
=
{
static
const
struct
spi_imx_master
spi1_pdata
__initconst
=
{
.
chipselect
=
spi_internal_chipselect
,
.
num_chipselect
=
ARRAY_SIZE
(
spi_internal_chipselect
),
};
...
...
@@ -252,7 +251,7 @@ static void __init mxc_board_init(void)
platform_device_register
(
&
physmap_flash_device
);
imx31_add_mxc_nand
(
&
mx31lite_nand_board_info
);
mxc_register_device
(
&
mxc_spi_device1
,
&
spi1_pdata
);
imx31_add_spi_imx1
(
&
spi1_pdata
);
spi_register_board_info
(
&
mc13783_spi_dev
,
1
);
#if defined(CONFIG_USB_ULPI)
...
...
arch/arm/mach-mx3/mach-mx31moboard.c
浏览文件 @
06606ff1
...
...
@@ -152,7 +152,7 @@ static int moboard_spi1_cs[] = {
MXC_SPI_CS
(
2
),
};
static
struct
spi_imx_master
moboard_spi1_master
=
{
static
const
struct
spi_imx_master
moboard_spi1_pdata
__initconst
=
{
.
chipselect
=
moboard_spi1_cs
,
.
num_chipselect
=
ARRAY_SIZE
(
moboard_spi1_cs
),
};
...
...
@@ -282,7 +282,7 @@ static int moboard_spi2_cs[] = {
MXC_SPI_CS
(
1
),
};
static
struct
spi_imx_master
moboard_spi2_master
=
{
static
const
struct
spi_imx_master
moboard_spi2_pdata
__initconst
=
{
.
chipselect
=
moboard_spi2_cs
,
.
num_chipselect
=
ARRAY_SIZE
(
moboard_spi2_cs
),
};
...
...
@@ -502,8 +502,8 @@ static void __init mxc_board_init(void)
imx31_add_imx_i2c0
(
&
moboard_i2c0_data
);
imx31_add_imx_i2c1
(
&
moboard_i2c1_data
);
mxc_register_device
(
&
mxc_spi_device1
,
&
moboard_spi1_master
);
mxc_register_device
(
&
mxc_spi_device2
,
&
moboard_spi2_master
);
imx31_add_spi_imx1
(
&
moboard_spi1_pdata
);
imx31_add_spi_imx2
(
&
moboard_spi2_pdata
);
gpio_request
(
IOMUX_TO_GPIO
(
MX31_PIN_GPIO1_3
),
"pmic-irq"
);
gpio_direction_input
(
IOMUX_TO_GPIO
(
MX31_PIN_GPIO1_3
));
...
...
arch/arm/mach-mx3/mx31lite-db.c
浏览文件 @
06606ff1
...
...
@@ -37,8 +37,8 @@
#include <mach/iomux-mx3.h>
#include <mach/board-mx31lite.h>
#include <mach/mmc.h>
#include <mach/spi.h>
#include "devices-imx31.h"
#include "devices.h"
/*
...
...
@@ -157,7 +157,7 @@ static int spi_internal_chipselect[] = {
MXC_SPI_CS
(
2
),
};
static
struct
spi_imx_master
spi0_pdata
=
{
static
const
struct
spi_imx_master
spi0_pdata
__initconst
=
{
.
chipselect
=
spi_internal_chipselect
,
.
num_chipselect
=
ARRAY_SIZE
(
spi_internal_chipselect
),
};
...
...
@@ -199,7 +199,7 @@ void __init mx31lite_db_init(void)
"development board pins"
);
mxc_register_device
(
&
mxc_uart_device0
,
&
uart_pdata
);
mxc_register_device
(
&
mxcsdhc_device0
,
&
mmc_pdata
);
mxc_register_device
(
&
mxc_spi_device0
,
&
spi0_pdata
);
imx31_add_spi_imx0
(
&
spi0_pdata
);
platform_device_register
(
&
litekit_led_device
);
mxc_register_device
(
&
imx_wdt_device0
,
NULL
);
mxc_register_device
(
&
imx_rtc_device0
,
NULL
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录