Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
8235ee00
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
8235ee00
编写于
2月 14, 2009
作者:
N
Nicolas Pitre
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[ARM] Kirkwood: SDIO driver registration for DB6281 and RD6281
Signed-off-by:
N
Nicolas Pitre
<
nico@marvell.com
>
上级
75bb6b9a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
98 addition
and
0 deletion
+98
-0
arch/arm/mach-kirkwood/common.c
arch/arm/mach-kirkwood/common.c
+45
-0
arch/arm/mach-kirkwood/common.h
arch/arm/mach-kirkwood/common.h
+2
-0
arch/arm/mach-kirkwood/db88f6281-bp-setup.c
arch/arm/mach-kirkwood/db88f6281-bp-setup.c
+15
-0
arch/arm/mach-kirkwood/include/mach/kirkwood.h
arch/arm/mach-kirkwood/include/mach/kirkwood.h
+2
-0
arch/arm/mach-kirkwood/rd88f6281-setup.c
arch/arm/mach-kirkwood/rd88f6281-setup.c
+13
-0
arch/arm/plat-orion/include/plat/mvsdio.h
arch/arm/plat-orion/include/plat/mvsdio.h
+21
-0
未找到文件。
arch/arm/mach-kirkwood/common.c
浏览文件 @
8235ee00
...
...
@@ -24,6 +24,7 @@
#include <mach/kirkwood.h>
#include <plat/cache-feroceon-l2.h>
#include <plat/ehci-orion.h>
#include <plat/mvsdio.h>
#include <plat/mv_xor.h>
#include <plat/orion_nand.h>
#include <plat/time.h>
...
...
@@ -295,6 +296,50 @@ void __init kirkwood_sata_init(struct mv_sata_platform_data *sata_data)
}
/*****************************************************************************
* SD/SDIO/MMC
****************************************************************************/
static
struct
resource
mvsdio_resources
[]
=
{
[
0
]
=
{
.
start
=
SDIO_PHYS_BASE
,
.
end
=
SDIO_PHYS_BASE
+
SZ_1K
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
[
1
]
=
{
.
start
=
IRQ_KIRKWOOD_SDIO
,
.
end
=
IRQ_KIRKWOOD_SDIO
,
.
flags
=
IORESOURCE_IRQ
,
},
};
static
u64
mvsdio_dmamask
=
0xffffffffUL
;
static
struct
platform_device
kirkwood_sdio
=
{
.
name
=
"mvsdio"
,
.
id
=
-
1
,
.
dev
=
{
.
dma_mask
=
&
mvsdio_dmamask
,
.
coherent_dma_mask
=
0xffffffff
,
},
.
num_resources
=
ARRAY_SIZE
(
mvsdio_resources
),
.
resource
=
mvsdio_resources
,
};
void
__init
kirkwood_sdio_init
(
struct
mvsdio_platform_data
*
mvsdio_data
)
{
u32
dev
,
rev
;
kirkwood_pcie_id
(
&
dev
,
&
rev
);
if
(
rev
==
0
)
/* catch all Kirkwood Z0's */
mvsdio_data
->
clock
=
100000000
;
else
mvsdio_data
->
clock
=
200000000
;
mvsdio_data
->
dram
=
&
kirkwood_mbus_dram_info
;
kirkwood_sdio
.
dev
.
platform_data
=
mvsdio_data
;
platform_device_register
(
&
kirkwood_sdio
);
}
/*****************************************************************************
* SPI
****************************************************************************/
...
...
arch/arm/mach-kirkwood/common.h
浏览文件 @
8235ee00
...
...
@@ -14,6 +14,7 @@
struct
dsa_platform_data
;
struct
mv643xx_eth_platform_data
;
struct
mv_sata_platform_data
;
struct
mvsdio_platform_data
;
/*
* Basic Kirkwood init functions used early by machine-setup.
...
...
@@ -35,6 +36,7 @@ void kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq);
void
kirkwood_pcie_init
(
void
);
void
kirkwood_rtc_init
(
void
);
void
kirkwood_sata_init
(
struct
mv_sata_platform_data
*
sata_data
);
void
kirkwood_sdio_init
(
struct
mvsdio_platform_data
*
mvsdio_data
);
void
kirkwood_spi_init
(
void
);
void
kirkwood_uart0_init
(
void
);
void
kirkwood_uart1_init
(
void
);
...
...
arch/arm/mach-kirkwood/db88f6281-bp-setup.c
浏览文件 @
8235ee00
...
...
@@ -22,7 +22,9 @@
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
#include <mach/kirkwood.h>
#include <plat/mvsdio.h>
#include "common.h"
#include "mpp.h"
static
struct
mv643xx_eth_platform_data
db88f6281_ge00_data
=
{
.
phy_addr
=
MV643XX_ETH_PHY_ADDR
(
8
),
...
...
@@ -32,18 +34,31 @@ static struct mv_sata_platform_data db88f6281_sata_data = {
.
n_ports
=
2
,
};
static
struct
mvsdio_platform_data
db88f6281_mvsdio_data
=
{
.
gpio_write_protect
=
37
,
.
gpio_card_detect
=
38
,
};
static
unsigned
int
db88f6281_mpp_config
[]
__initdata
=
{
MPP37_GPIO
,
MPP38_GPIO
,
0
};
static
void
__init
db88f6281_init
(
void
)
{
/*
* Basic setup. Needs to be called early.
*/
kirkwood_init
();
kirkwood_mpp_conf
(
db88f6281_mpp_config
);
kirkwood_ehci_init
();
kirkwood_ge00_init
(
&
db88f6281_ge00_data
);
kirkwood_rtc_init
();
kirkwood_sata_init
(
&
db88f6281_sata_data
);
kirkwood_uart0_init
();
kirkwood_sdio_init
(
&
db88f6281_mvsdio_data
);
}
static
int
__init
db88f6281_pci_init
(
void
)
...
...
arch/arm/mach-kirkwood/include/mach/kirkwood.h
浏览文件 @
8235ee00
...
...
@@ -116,5 +116,7 @@
#define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000)
#define SDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x90000)
#endif
arch/arm/mach-kirkwood/rd88f6281-setup.c
浏览文件 @
8235ee00
...
...
@@ -24,8 +24,10 @@
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
#include <mach/kirkwood.h>
#include <plat/mvsdio.h>
#include <plat/orion_nand.h>
#include "common.h"
#include "mpp.h"
static
struct
mtd_partition
rd88f6281_nand_parts
[]
=
{
{
...
...
@@ -91,6 +93,15 @@ static struct mv_sata_platform_data rd88f6281_sata_data = {
.
n_ports
=
2
,
};
static
struct
mvsdio_platform_data
rd88f6281_mvsdio_data
=
{
.
gpio_card_detect
=
28
,
};
static
unsigned
int
rd88f6281_mpp_config
[]
__initdata
=
{
MPP28_GPIO
,
0
};
static
void
__init
rd88f6281_init
(
void
)
{
u32
dev
,
rev
;
...
...
@@ -99,6 +110,7 @@ static void __init rd88f6281_init(void)
* Basic setup. Needs to be called early.
*/
kirkwood_init
();
kirkwood_mpp_conf
(
rd88f6281_mpp_config
);
kirkwood_ehci_init
();
...
...
@@ -114,6 +126,7 @@ static void __init rd88f6281_init(void)
kirkwood_rtc_init
();
kirkwood_sata_init
(
&
rd88f6281_sata_data
);
kirkwood_sdio_init
(
&
rd88f6281_mvsdio_data
);
kirkwood_uart0_init
();
kirkwood_xor0_init
();
kirkwood_xor1_init
();
...
...
arch/arm/plat-orion/include/plat/mvsdio.h
0 → 100644
浏览文件 @
8235ee00
/*
* arch/arm/plat-orion/include/plat/mvsdio.h
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#ifndef __MACH_MVSDIO_H
#define __MACH_MVSDIO_H
#include <linux/mbus.h>
struct
mvsdio_platform_data
{
struct
mbus_dram_target_info
*
dram
;
unsigned
int
clock
;
int
gpio_card_detect
;
int
gpio_write_protect
;
};
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录