Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Linux-御风守护者
linux
提交
0d9f2e6f
L
linux
项目概览
Linux-御风守护者
/
linux
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0d9f2e6f
编写于
1月 28, 2008
作者:
J
Jesper Nilsson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
CRIS: Rename LED macros to CRIS_LED to avoid name clash in io.h
This is done to avoid collision with linux/leds.h
上级
a1a7dc1d
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
77 addition
and
72 deletion
+77
-72
include/asm-cris/arch-v10/io.h
include/asm-cris/arch-v10/io.h
+53
-47
include/asm-cris/arch-v32/io.h
include/asm-cris/arch-v32/io.h
+24
-25
未找到文件。
include/asm-cris/arch-v10/io.h
浏览文件 @
0d9f2e6f
...
...
@@ -38,83 +38,89 @@ extern volatile unsigned long *port_csp4_addr;
#undef CONFIG_ETRAX_PA_LEDS
#undef CONFIG_ETRAX_PB_LEDS
#undef CONFIG_ETRAX_CSP0_LEDS
#define LED_NETWORK_SET_G(x)
#define LED_NETWORK_SET_R(x)
#define LED_ACTIVE_SET_G(x)
#define LED_ACTIVE_SET_R(x)
#define LED_DISK_WRITE(x)
#define LED_DISK_READ(x)
#define
CRIS_
LED_NETWORK_SET_G(x)
#define
CRIS_
LED_NETWORK_SET_R(x)
#define
CRIS_
LED_ACTIVE_SET_G(x)
#define
CRIS_
LED_ACTIVE_SET_R(x)
#define
CRIS_
LED_DISK_WRITE(x)
#define
CRIS_
LED_DISK_READ(x)
#endif
#if !defined(CONFIG_ETRAX_CSP0_LEDS)
#define LED_BIT_SET(x)
#define LED_BIT_CLR(x)
#define
CRIS_
LED_BIT_SET(x)
#define
CRIS_
LED_BIT_CLR(x)
#endif
#define LED_OFF 0x00
#define LED_GREEN 0x01
#define LED_RED 0x02
#define
LED_ORANGE (LED_GREEN |
LED_RED)
#define
CRIS_
LED_OFF 0x00
#define
CRIS_
LED_GREEN 0x01
#define
CRIS_
LED_RED 0x02
#define
CRIS_LED_ORANGE (CRIS_LED_GREEN | CRIS_
LED_RED)
#if defined(CONFIG_ETRAX_NO_LEDS)
#define CRIS_LED_NETWORK_SET(x)
#else
#if CONFIG_ETRAX_LED1G == CONFIG_ETRAX_LED1R
#define LED_NETWORK_SET(x) \
#define
CRIS_
LED_NETWORK_SET(x) \
do { \
LED_NETWORK_SET_G((x) &
LED_GREEN); \
CRIS_LED_NETWORK_SET_G((x) & CRIS_
LED_GREEN); \
} while (0)
#else
#define LED_NETWORK_SET(x) \
#define
CRIS_
LED_NETWORK_SET(x) \
do { \
LED_NETWORK_SET_G((x) &
LED_GREEN); \
LED_NETWORK_SET_R((x) &
LED_RED); \
CRIS_LED_NETWORK_SET_G((x) & CRIS_
LED_GREEN); \
CRIS_LED_NETWORK_SET_R((x) & CRIS_
LED_RED); \
} while (0)
#endif
#if CONFIG_ETRAX_LED2G == CONFIG_ETRAX_LED2R
#define LED_ACTIVE_SET(x) \
#define
CRIS_
LED_ACTIVE_SET(x) \
do { \
LED_ACTIVE_SET_G((x) &
LED_GREEN); \
CRIS_LED_ACTIVE_SET_G((x) & CRIS_
LED_GREEN); \
} while (0)
#else
#define LED_ACTIVE_SET(x) \
#define
CRIS_
LED_ACTIVE_SET(x) \
do { \
LED_ACTIVE_SET_G((x) &
LED_GREEN); \
LED_ACTIVE_SET_R((x) &
LED_RED); \
CRIS_LED_ACTIVE_SET_G((x) & CRIS_
LED_GREEN); \
CRIS_LED_ACTIVE_SET_R((x) & CRIS_
LED_RED); \
} while (0)
#endif
#endif
#ifdef CONFIG_ETRAX_PA_LEDS
#define LED_NETWORK_SET_G(x) \
#define
CRIS_
LED_NETWORK_SET_G(x) \
REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED1G, !(x))
#define LED_NETWORK_SET_R(x) \
#define
CRIS_
LED_NETWORK_SET_R(x) \
REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED1R, !(x))
#define LED_ACTIVE_SET_G(x) \
#define
CRIS_
LED_ACTIVE_SET_G(x) \
REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED2G, !(x))
#define LED_ACTIVE_SET_R(x) \
#define
CRIS_
LED_ACTIVE_SET_R(x) \
REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED2R, !(x))
#define LED_DISK_WRITE(x) \
#define
CRIS_
LED_DISK_WRITE(x) \
do{\
REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED3G, !(x));\
REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED3R, !(x));\
}while(0)
#define LED_DISK_READ(x) \
REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED3G, !(x))
#define CRIS_LED_DISK_READ(x) \
REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, \
CONFIG_ETRAX_LED3G, !(x))
#endif
#ifdef CONFIG_ETRAX_PB_LEDS
#define LED_NETWORK_SET_G(x) \
#define
CRIS_
LED_NETWORK_SET_G(x) \
REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED1G, !(x))
#define LED_NETWORK_SET_R(x) \
#define
CRIS_
LED_NETWORK_SET_R(x) \
REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED1R, !(x))
#define LED_ACTIVE_SET_G(x) \
#define
CRIS_
LED_ACTIVE_SET_G(x) \
REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED2G, !(x))
#define LED_ACTIVE_SET_R(x) \
#define
CRIS_
LED_ACTIVE_SET_R(x) \
REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED2R, !(x))
#define LED_DISK_WRITE(x) \
#define
CRIS_
LED_DISK_WRITE(x) \
do{\
REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED3G, !(x));\
REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED3R, !(x));\
}while(0)
#define LED_DISK_READ(x) \
REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED3G, !(x))
#define CRIS_LED_DISK_READ(x) \
REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, \
CONFIG_ETRAX_LED3G, !(x))
#endif
#ifdef CONFIG_ETRAX_CSP0_LEDS
...
...
@@ -130,27 +136,27 @@ extern volatile unsigned long *port_csp4_addr;
(1 << CONFIG_ETRAX_LED10Y ) |(1 << CONFIG_ETRAX_LED11Y )|\
(1 << CONFIG_ETRAX_LED12R ))
#define LED_NETWORK_SET_G(x) \
#define
CRIS_
LED_NETWORK_SET_G(x) \
REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED1G, !(x))
#define LED_NETWORK_SET_R(x) \
#define
CRIS_
LED_NETWORK_SET_R(x) \
REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED1R, !(x))
#define LED_ACTIVE_SET_G(x) \
#define
CRIS_
LED_ACTIVE_SET_G(x) \
REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED2G, !(x))
#define LED_ACTIVE_SET_R(x) \
#define
CRIS_
LED_ACTIVE_SET_R(x) \
REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED2R, !(x))
#define LED_DISK_WRITE(x) \
#define
CRIS_
LED_DISK_WRITE(x) \
do{\
REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED3G, !(x));\
REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED3R, !(x));\
}while(0)
#define LED_DISK_READ(x) \
#define
CRIS_
LED_DISK_READ(x) \
REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED3G, !(x))
#define LED_BIT_SET(x)\
#define
CRIS_
LED_BIT_SET(x)\
do{\
if((( 1 << x) & CONFIGURABLE_LEDS) != 0)\
REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, x, 1);\
}while(0)
#define LED_BIT_CLR(x)\
#define
CRIS_
LED_BIT_CLR(x)\
do{\
if((( 1 << x) & CONFIGURABLE_LEDS) != 0)\
REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, x, 0);\
...
...
include/asm-cris/arch-v32/io.h
浏览文件 @
0d9f2e6f
...
...
@@ -41,8 +41,7 @@ extern struct crisv32_iopin crisv32_led_net0_red;
extern
struct
crisv32_iopin
crisv32_led_net1_green
;
extern
struct
crisv32_iopin
crisv32_led_net1_red
;
static
inline
void
crisv32_io_set
(
struct
crisv32_iopin
*
iopin
,
int
val
)
static
inline
void
crisv32_io_set
(
struct
crisv32_iopin
*
iopin
,
int
val
)
{
long
flags
;
spin_lock_irqsave
(
&
iopin
->
port
->
lock
,
flags
);
...
...
@@ -79,59 +78,59 @@ int crisv32_io_get(struct crisv32_iopin* iopin,
int
crisv32_io_get_name
(
struct
crisv32_iopin
*
iopin
,
const
char
*
name
);
#define LED_OFF 0x00
#define LED_GREEN 0x01
#define LED_RED 0x02
#define
LED_ORANGE (LED_GREEN |
LED_RED)
#define
CRIS_
LED_OFF 0x00
#define
CRIS_
LED_GREEN 0x01
#define
CRIS_
LED_RED 0x02
#define
CRIS_LED_ORANGE (CRIS_LED_GREEN | CRIS_
LED_RED)
#if (defined(CONFIG_ETRAX_NBR_LED_GRP_ONE) || defined(CONFIG_ETRAX_NBR_LED_GRP_TWO))
#define LED_NETWORK_GRP0_SET(x) \
#define
CRIS_
LED_NETWORK_GRP0_SET(x) \
do { \
LED_NETWORK_GRP0_SET_G((x) &
LED_GREEN); \
LED_NETWORK_GRP0_SET_R((x) &
LED_RED); \
CRIS_LED_NETWORK_GRP0_SET_G((x) & CRIS_
LED_GREEN); \
CRIS_LED_NETWORK_GRP0_SET_R((x) & CRIS_
LED_RED); \
} while (0)
#else
#define LED_NETWORK_GRP0_SET(x) while (0) {}
#define
CRIS_
LED_NETWORK_GRP0_SET(x) while (0) {}
#endif
#define LED_NETWORK_GRP0_SET_G(x) \
#define
CRIS_
LED_NETWORK_GRP0_SET_G(x) \
crisv32_io_set(&crisv32_led_net0_green, !(x));
#define LED_NETWORK_GRP0_SET_R(x) \
#define
CRIS_
LED_NETWORK_GRP0_SET_R(x) \
crisv32_io_set(&crisv32_led_net0_red, !(x));
#if defined(CONFIG_ETRAX_NBR_LED_GRP_TWO)
#define LED_NETWORK_GRP1_SET(x) \
#define
CRIS_
LED_NETWORK_GRP1_SET(x) \
do { \
LED_NETWORK_GRP1_SET_G((x) &
LED_GREEN); \
LED_NETWORK_GRP1_SET_R((x) &
LED_RED); \
CRIS_LED_NETWORK_GRP1_SET_G((x) & CRIS_
LED_GREEN); \
CRIS_LED_NETWORK_GRP1_SET_R((x) & CRIS_
LED_RED); \
} while (0)
#else
#define LED_NETWORK_GRP1_SET(x) while (0) {}
#define
CRIS_
LED_NETWORK_GRP1_SET(x) while (0) {}
#endif
#define LED_NETWORK_GRP1_SET_G(x) \
#define
CRIS_
LED_NETWORK_GRP1_SET_G(x) \
crisv32_io_set(&crisv32_led_net1_green, !(x));
#define LED_NETWORK_GRP1_SET_R(x) \
#define
CRIS_
LED_NETWORK_GRP1_SET_R(x) \
crisv32_io_set(&crisv32_led_net1_red, !(x));
#define LED_ACTIVE_SET(x) \
#define
CRIS_
LED_ACTIVE_SET(x) \
do { \
LED_ACTIVE_SET_G((x) &
LED_GREEN); \
LED_ACTIVE_SET_R((x) &
LED_RED); \
CRIS_LED_ACTIVE_SET_G((x) & CRIS_
LED_GREEN); \
CRIS_LED_ACTIVE_SET_R((x) & CRIS_
LED_RED); \
} while (0)
#define LED_ACTIVE_SET_G(x) \
#define
CRIS_
LED_ACTIVE_SET_G(x) \
crisv32_io_set(&crisv32_led2_green, !(x));
#define LED_ACTIVE_SET_R(x) \
#define
CRIS_
LED_ACTIVE_SET_R(x) \
crisv32_io_set(&crisv32_led2_red, !(x));
#define LED_DISK_WRITE(x) \
#define
CRIS_
LED_DISK_WRITE(x) \
do{\
crisv32_io_set(&crisv32_led3_green, !(x)); \
crisv32_io_set(&crisv32_led3_red, !(x)); \
}while(0)
#define LED_DISK_READ(x) \
#define
CRIS_
LED_DISK_READ(x) \
crisv32_io_set(&crisv32_led3_green, !(x));
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录