Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
00e4acb1
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
00e4acb1
编写于
1月 27, 2010
作者:
R
Russell King
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-rmk' of
git://git.marvell.com/orion
上级
b04da8bf
cf11052a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
118 addition
and
6 deletion
+118
-6
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
+6
-0
arch/arm/mach-orion5x/dns323-setup.c
arch/arm/mach-orion5x/dns323-setup.c
+27
-6
arch/arm/mach-orion5x/wrt350n-v2-setup.c
arch/arm/mach-orion5x/wrt350n-v2-setup.c
+79
-0
arch/arm/plat-orion/pcie.c
arch/arm/plat-orion/pcie.c
+6
-0
未找到文件。
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
浏览文件 @
00e4acb1
...
...
@@ -13,6 +13,7 @@
#include <linux/platform_device.h>
#include <linux/ata_platform.h>
#include <linux/mv643xx_eth.h>
#include <linux/gpio.h>
#include <linux/spi/flash.h>
#include <linux/spi/spi.h>
#include <linux/spi/orion_spi.h>
...
...
@@ -53,6 +54,11 @@ static void __init rd88f6192_init(void)
*/
kirkwood_init
();
orion_gpio_set_valid
(
RD88F6192_GPIO_USB_VBUS
,
1
);
if
(
gpio_request
(
RD88F6192_GPIO_USB_VBUS
,
"USB VBUS"
)
!=
0
||
gpio_direction_output
(
RD88F6192_GPIO_USB_VBUS
,
1
)
!=
0
)
pr_err
(
"RD-88F6192-NAS: failed to setup USB VBUS GPIO
\n
"
);
kirkwood_ehci_init
();
kirkwood_ge00_init
(
&
rd88f6192_ge00_data
);
kirkwood_sata_init
(
&
rd88f6192_sata_data
);
...
...
arch/arm/mach-orion5x/dns323-setup.c
浏览文件 @
00e4acb1
...
...
@@ -12,6 +12,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/pci.h>
#include <linux/irq.h>
...
...
@@ -32,6 +33,7 @@
#define DNS323_GPIO_LED_RIGHT_AMBER 1
#define DNS323_GPIO_LED_LEFT_AMBER 2
#define DNS323_GPIO_SYSTEM_UP 3
#define DNS323_GPIO_LED_POWER 5
#define DNS323_GPIO_OVERTEMP 6
#define DNS323_GPIO_RTC 7
...
...
@@ -239,7 +241,7 @@ static struct gpio_led dns323_leds[] = {
{
.
name
=
"power:blue"
,
.
gpio
=
DNS323_GPIO_LED_POWER
,
.
active_low
=
1
,
.
default_state
=
LEDS_GPIO_DEFSTATE_ON
,
},
{
.
name
=
"right:amber"
,
.
gpio
=
DNS323_GPIO_LED_RIGHT_AMBER
,
...
...
@@ -334,7 +336,7 @@ static struct orion5x_mpp_mode dns323_mv88f5182_mpp_modes[] __initdata = {
{
0
,
MPP_UNUSED
},
{
1
,
MPP_GPIO
},
/* right amber LED (sata ch0) */
{
2
,
MPP_GPIO
},
/* left amber LED (sata ch1) */
{
3
,
MPP_
UNUSED
},
{
3
,
MPP_
GPIO
},
/* system up flag */
{
4
,
MPP_GPIO
},
/* power button LED */
{
5
,
MPP_GPIO
},
/* power button LED */
{
6
,
MPP_GPIO
},
/* GMT G751-2f overtemp */
...
...
@@ -372,13 +374,23 @@ static struct i2c_board_info __initdata dns323_i2c_devices[] = {
},
};
/* DNS-323 specific power off method */
static
void
dns323_power_off
(
void
)
/* DNS-323
rev. A
specific power off method */
static
void
dns323
a
_power_off
(
void
)
{
pr_info
(
"%s: triggering power-off...
\n
"
,
__func__
);
gpio_set_value
(
DNS323_GPIO_POWER_OFF
,
1
);
}
/* DNS-323 rev B specific power off method */
static
void
dns323b_power_off
(
void
)
{
pr_info
(
"%s: triggering power-off...
\n
"
,
__func__
);
/* Pin has to be changed to 1 and back to 0 to do actual power off. */
gpio_set_value
(
DNS323_GPIO_POWER_OFF
,
1
);
mdelay
(
100
);
gpio_set_value
(
DNS323_GPIO_POWER_OFF
,
0
);
}
static
void
__init
dns323_init
(
void
)
{
/* Setup basic Orion functions. Need to be called early. */
...
...
@@ -424,11 +436,20 @@ static void __init dns323_init(void)
if
(
dns323_dev_id
()
==
MV88F5182_DEV_ID
)
orion5x_sata_init
(
&
dns323_sata_data
);
/* register dns323 specific power-off method */
/* The 5182 has flag to indicate the system is up. Without this flag
* set, power LED will flash and cannot be controlled via leds-gpio.
*/
if
(
dns323_dev_id
()
==
MV88F5182_DEV_ID
)
gpio_set_value
(
DNS323_GPIO_SYSTEM_UP
,
1
);
/* Register dns323 specific power-off method */
if
(
gpio_request
(
DNS323_GPIO_POWER_OFF
,
"POWEROFF"
)
!=
0
||
gpio_direction_output
(
DNS323_GPIO_POWER_OFF
,
0
)
!=
0
)
pr_err
(
"DNS323: failed to setup power-off GPIO
\n
"
);
pm_power_off
=
dns323_power_off
;
if
(
dns323_dev_id
()
==
MV88F5182_DEV_ID
)
pm_power_off
=
dns323b_power_off
;
else
pm_power_off
=
dns323a_power_off
;
}
/* Warning: D-Link uses a wrong mach-type (=526) in their bootloader */
...
...
arch/arm/mach-orion5x/wrt350n-v2-setup.c
浏览文件 @
00e4acb1
...
...
@@ -15,6 +15,9 @@
#include <linux/mtd/physmap.h>
#include <linux/mv643xx_eth.h>
#include <linux/ethtool.h>
#include <linux/leds.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
#include <net/dsa.h>
#include <asm/mach-types.h>
#include <asm/gpio.h>
...
...
@@ -24,6 +27,80 @@
#include "common.h"
#include "mpp.h"
/*
* LEDs attached to GPIO
*/
static
struct
gpio_led
wrt350n_v2_led_pins
[]
=
{
{
.
name
=
"wrt350nv2:green:power"
,
.
gpio
=
0
,
.
active_low
=
1
,
},
{
.
name
=
"wrt350nv2:green:security"
,
.
gpio
=
1
,
.
active_low
=
1
,
},
{
.
name
=
"wrt350nv2:orange:power"
,
.
gpio
=
5
,
.
active_low
=
1
,
},
{
.
name
=
"wrt350nv2:green:usb"
,
.
gpio
=
6
,
.
active_low
=
1
,
},
{
.
name
=
"wrt350nv2:green:wireless"
,
.
gpio
=
7
,
.
active_low
=
1
,
},
};
static
struct
gpio_led_platform_data
wrt350n_v2_led_data
=
{
.
leds
=
wrt350n_v2_led_pins
,
.
num_leds
=
ARRAY_SIZE
(
wrt350n_v2_led_pins
),
};
static
struct
platform_device
wrt350n_v2_leds
=
{
.
name
=
"leds-gpio"
,
.
id
=
-
1
,
.
dev
=
{
.
platform_data
=
&
wrt350n_v2_led_data
,
},
};
/*
* Buttons attached to GPIO
*/
static
struct
gpio_keys_button
wrt350n_v2_buttons
[]
=
{
{
.
code
=
KEY_RESTART
,
.
gpio
=
3
,
.
desc
=
"Reset Button"
,
.
active_low
=
1
,
},
{
.
code
=
KEY_WLAN
,
.
gpio
=
2
,
.
desc
=
"WPS Button"
,
.
active_low
=
1
,
},
};
static
struct
gpio_keys_platform_data
wrt350n_v2_button_data
=
{
.
buttons
=
wrt350n_v2_buttons
,
.
nbuttons
=
ARRAY_SIZE
(
wrt350n_v2_buttons
),
};
static
struct
platform_device
wrt350n_v2_button_device
=
{
.
name
=
"gpio-keys"
,
.
id
=
-
1
,
.
num_resources
=
0
,
.
dev
=
{
.
platform_data
=
&
wrt350n_v2_button_data
,
},
};
/*
* General setup
*/
static
struct
orion5x_mpp_mode
wrt350n_v2_mpp_modes
[]
__initdata
=
{
{
0
,
MPP_GPIO
},
/* Power LED green (0=on) */
{
1
,
MPP_GPIO
},
/* Security LED (0=on) */
...
...
@@ -140,6 +217,8 @@ static void __init wrt350n_v2_init(void)
orion5x_setup_dev_boot_win
(
WRT350N_V2_NOR_BOOT_BASE
,
WRT350N_V2_NOR_BOOT_SIZE
);
platform_device_register
(
&
wrt350n_v2_nor_flash
);
platform_device_register
(
&
wrt350n_v2_leds
);
platform_device_register
(
&
wrt350n_v2_button_device
);
}
static
int
__init
wrt350n_v2_pci_map_irq
(
struct
pci_dev
*
dev
,
u8
slot
,
u8
pin
)
...
...
arch/arm/plat-orion/pcie.c
浏览文件 @
00e4acb1
...
...
@@ -132,6 +132,12 @@ static void __init orion_pcie_setup_wins(void __iomem *base,
size
+=
cs
->
size
;
}
/*
* Round up 'size' to the nearest power of two.
*/
if
((
size
&
(
size
-
1
))
!=
0
)
size
=
1
<<
fls
(
size
);
/*
* Setup BAR[1] to all DRAM banks.
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录