Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
mellanox
Bluefield Linux
提交
7536cf99
B
Bluefield Linux
项目概览
mellanox
/
Bluefield Linux
大约 1 年 前同步成功
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
B
Bluefield Linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7536cf99
编写于
6月 22, 2010
作者:
U
Uwe Kleine-König
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARM: imx: dynamically register spi_imx devices (imx27)
Signed-off-by:
N
Uwe Kleine-König
<
u.kleine-koenig@pengutronix.de
>
上级
63ddc5b0
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
17 addition
and
48 deletion
+17
-48
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/Kconfig
+3
-0
arch/arm/mach-imx/devices-imx27.h
arch/arm/mach-imx/devices-imx27.h
+7
-0
arch/arm/mach-imx/devices.c
arch/arm/mach-imx/devices.c
+0
-33
arch/arm/mach-imx/devices.h
arch/arm/mach-imx/devices.h
+0
-5
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
+3
-2
arch/arm/mach-imx/mach-pca100.c
arch/arm/mach-imx/mach-pca100.c
+2
-5
arch/arm/mach-imx/mach-pcm038.c
arch/arm/mach-imx/mach-pcm038.c
+2
-3
未找到文件。
arch/arm/mach-imx/Kconfig
浏览文件 @
7536cf99
...
...
@@ -92,6 +92,7 @@ config MACH_PCM038
bool "Phytec phyCORE-i.MX27 CPU module (pcm038)"
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_MXC_NAND
select IMX_HAVE_PLATFORM_SPI_IMX
select MXC_ULPI if USB_ULPI
help
Include support for phyCORE-i.MX27 (aka pcm038) platform. This
...
...
@@ -134,6 +135,7 @@ choice
config MACH_EUKREA_MBIMX27_BASEBOARD
prompt "Eukrea MBIMX27 development board"
bool
select IMX_HAVE_PLATFORM_SPI_IMX
help
This adds board specific devices that can be found on Eukrea's
MBIMX27 evaluation board.
...
...
@@ -156,6 +158,7 @@ config MACH_PCA100
bool "Phytec phyCARD-s (pca100)"
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_MXC_NAND
select IMX_HAVE_PLATFORM_SPI_IMX
select MXC_ULPI if USB_ULPI
help
Include support for phyCARD-s (aka pca100) platform. This
...
...
arch/arm/mach-imx/devices-imx27.h
浏览文件 @
7536cf99
...
...
@@ -16,3 +16,10 @@
#define imx27_add_mxc_nand(pdata) \
imx_add_mxc_nand_v1(MX27_NFC_BASE_ADDR, MX27_INT_NANDFC, pdata)
#define imx27_add_spi_imx0(pdata) \
imx_add_spi_imx(0, MX27_CSPI1_BASE_ADDR, SZ_4K, MX27_INT_CSPI1, pdata)
#define imx27_add_spi_imx1(pdata) \
imx_add_spi_imx(1, MX27_CSPI2_BASE_ADDR, SZ_4K, MX27_INT_CSPI2, pdata)
#define imx27_add_spi_imx2(pdata) \
imx_add_spi_imx(2, MX27_CSPI3_BASE_ADDR, SZ_4K, MX27_INT_CSPI3, pdata)
arch/arm/mach-imx/devices.c
浏览文件 @
7536cf99
...
...
@@ -218,39 +218,6 @@ int __init imx1_register_gpios(void)
#endif
#if defined(CONFIG_MACH_MX21) || defined(CONFIG_MACH_MX27)
/*
* SPI master controller
*
* - i.MX1: 2 channel (slighly different register setting)
* - i.MX21: 2 channel
* - i.MX27: 3 channel
*/
#ifdef CONFIG_MACH_MX27
#define DEFINE_IMX_SPI_DEVICE(n, baseaddr, irq) \
static struct resource mxc_spi_resources ## n[] = { \
{ \
.start = baseaddr, \
.end = baseaddr + SZ_4K - 1, \
.flags = IORESOURCE_MEM, \
}, { \
.start = irq, \
.end = irq, \
.flags = IORESOURCE_IRQ, \
}, \
}; \
\
struct platform_device mxc_spi_device ## n = { \
.name = "spi_imx", \
.id = n, \
.num_resources = ARRAY_SIZE(mxc_spi_resources ## n), \
.resource = mxc_spi_resources ## n, \
}
DEFINE_IMX_SPI_DEVICE
(
0
,
MX2x_CSPI1_BASE_ADDR
,
MX2x_INT_CSPI1
);
DEFINE_IMX_SPI_DEVICE
(
1
,
MX2x_CSPI2_BASE_ADDR
,
MX2x_INT_CSPI2
);
DEFINE_IMX_SPI_DEVICE
(
2
,
MX27_CSPI3_BASE_ADDR
,
MX27_INT_CSPI3
);
#endif
/*
* General Purpose Timer
* - i.MX21: 3 timers
...
...
arch/arm/mach-imx/devices.h
浏览文件 @
7536cf99
...
...
@@ -34,11 +34,6 @@ extern struct platform_device mxc_otg_udc_device;
extern
struct
platform_device
mxc_otg_host
;
extern
struct
platform_device
mxc_usbh1
;
extern
struct
platform_device
mxc_usbh2
;
#ifdef CONFIG_MACH_MX27
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
mx21_usbhc_device
;
extern
struct
platform_device
imx_ssi_device0
;
extern
struct
platform_device
imx_ssi_device1
;
...
...
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
浏览文件 @
7536cf99
...
...
@@ -34,6 +34,7 @@
#include <mach/mmc.h>
#include <mach/imx-uart.h>
#include "devices-imx27.h"
#include "devices.h"
static
int
eukrea_mbimx27_pins
[]
=
{
...
...
@@ -201,7 +202,7 @@ static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = {
static
int
eukrea_mbimx27_spi_cs
[]
=
{
GPIO_PORTD
|
28
};
static
struct
spi_imx_master
eukrea_mbimx27_spi_0_data
=
{
static
const
struct
spi_imx_master
eukrea_mbimx27_spi0_data
__initconst
=
{
.
chipselect
=
eukrea_mbimx27_spi_cs
,
.
num_chipselect
=
ARRAY_SIZE
(
eukrea_mbimx27_spi_cs
),
};
...
...
@@ -233,7 +234,7 @@ void __init eukrea_mbimx27_baseboard_init(void)
/* SPI and ADS7846 Touchscreen controler init */
mxc_gpio_mode
(
GPIO_PORTD
|
28
|
GPIO_GPIO
|
GPIO_OUT
);
mxc_gpio_mode
(
GPIO_PORTD
|
25
|
GPIO_GPIO
|
GPIO_IN
);
mxc_register_device
(
&
mxc_spi_device0
,
&
eukrea_mbimx27_spi_
0_data
);
imx27_add_spi_imx0
(
&
eukrea_mbimx27_spi
0_data
);
spi_register_board_info
(
eukrea_mbimx27_spi_board_info
,
ARRAY_SIZE
(
eukrea_mbimx27_spi_board_info
));
ads7846_dev_init
();
...
...
arch/arm/mach-imx/mach-pca100.c
浏览文件 @
7536cf99
...
...
@@ -37,9 +37,6 @@
#include <mach/hardware.h>
#include <mach/iomux-mx27.h>
#include <asm/mach/time.h>
#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
#include <mach/spi.h>
#endif
#include <mach/imx-uart.h>
#include <mach/audmux.h>
#include <mach/ssi.h>
...
...
@@ -192,7 +189,7 @@ static struct spi_board_info pca100_spi_board_info[] __initdata = {
static
int
pca100_spi_cs
[]
=
{
GPIO_PORTD
+
28
,
GPIO_PORTD
+
27
};
static
struct
spi_imx_master
pca100_spi_0_data
=
{
static
const
struct
spi_imx_master
pca100_spi0_data
__initconst
=
{
.
chipselect
=
pca100_spi_cs
,
.
num_chipselect
=
ARRAY_SIZE
(
pca100_spi_cs
),
};
...
...
@@ -347,7 +344,7 @@ static void __init pca100_init(void)
#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
spi_register_board_info
(
pca100_spi_board_info
,
ARRAY_SIZE
(
pca100_spi_board_info
));
mxc_register_device
(
&
mxc_spi_device0
,
&
pca100_spi_0_data
);
imx27_add_spi_imx0
(
&
pca100_spi_0_data
);
#endif
gpio_request
(
OTG_PHY_CS_GPIO
,
"usb-otg-cs"
);
...
...
arch/arm/mach-imx/mach-pcm038.c
浏览文件 @
7536cf99
...
...
@@ -38,7 +38,6 @@
#include <mach/iomux-mx27.h>
#include <mach/imx-uart.h>
#include <mach/mxc_nand.h>
#include <mach/spi.h>
#include <mach/mxc_ehci.h>
#include <mach/ulpi.h>
...
...
@@ -216,7 +215,7 @@ static struct i2c_board_info pcm038_i2c_devices[] = {
static
int
pcm038_spi_cs
[]
=
{
GPIO_PORTD
+
28
};
static
struct
spi_imx_master
pcm038_spi_0_data
=
{
static
const
struct
spi_imx_master
pcm038_spi0_data
__initconst
=
{
.
chipselect
=
pcm038_spi_cs
,
.
num_chipselect
=
ARRAY_SIZE
(
pcm038_spi_cs
),
};
...
...
@@ -327,7 +326,7 @@ static void __init pcm038_init(void)
/* MC13783 IRQ */
mxc_gpio_mode
(
GPIO_PORTB
|
23
|
GPIO_GPIO
|
GPIO_IN
);
mxc_register_device
(
&
mxc_spi_device0
,
&
pcm038_spi_
0_data
);
imx27_add_spi_imx0
(
&
pcm038_spi
0_data
);
spi_register_board_info
(
pcm038_spi_board_info
,
ARRAY_SIZE
(
pcm038_spi_board_info
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录