Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
64abf64d
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
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,发现更多精彩内容 >>
提交
64abf64d
编写于
9月 14, 2005
作者:
P
Pete Popov
提交者:
Ralf Baechle
10月 29, 2005
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Misc au1200 updates.
Signed-off-by:
N
Ralf Baechle
<
ralf@linux-mips.org
>
上级
4f94afa2
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
160 addition
and
32 deletion
+160
-32
arch/mips/au1000/common/platform.c
arch/mips/au1000/common/platform.c
+118
-0
arch/mips/au1000/pb1200/board_setup.c
arch/mips/au1000/pb1200/board_setup.c
+42
-32
未找到文件。
arch/mips/au1000/common/platform.c
浏览文件 @
64abf64d
...
...
@@ -14,6 +14,7 @@
#include <asm/mach-au1x00/au1000.h>
/* OHCI (USB full speed host controller) */
static
struct
resource
au1xxx_usb_ohci_resources
[]
=
{
[
0
]
=
{
.
start
=
USB_OHCI_BASE
,
...
...
@@ -71,12 +72,129 @@ static struct platform_device au1100_lcd_device = {
};
#endif
#ifdef CONFIG_SOC_AU1200
/* EHCI (USB high speed host controller) */
static
struct
resource
au1xxx_usb_ehci_resources
[]
=
{
[
0
]
=
{
.
start
=
USB_EHCI_BASE
,
.
end
=
USB_EHCI_BASE
+
USB_EHCI_LEN
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
[
1
]
=
{
.
start
=
AU1000_USB_HOST_INT
,
.
end
=
AU1000_USB_HOST_INT
,
.
flags
=
IORESOURCE_IRQ
,
},
};
static
u64
ehci_dmamask
=
~
(
u32
)
0
;
static
struct
platform_device
au1xxx_usb_ehci_device
=
{
.
name
=
"au1xxx-ehci"
,
.
id
=
0
,
.
dev
=
{
.
dma_mask
=
&
ehci_dmamask
,
.
coherent_dma_mask
=
0xffffffff
,
},
.
num_resources
=
ARRAY_SIZE
(
au1xxx_usb_ehci_resources
),
.
resource
=
au1xxx_usb_ehci_resources
,
};
/* Au1200 UDC (USB gadget controller) */
static
struct
resource
au1xxx_usb_gdt_resources
[]
=
{
[
0
]
=
{
.
start
=
USB_UDC_BASE
,
.
end
=
USB_UDC_BASE
+
USB_UDC_LEN
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
[
1
]
=
{
.
start
=
AU1200_USB_INT
,
.
end
=
AU1200_USB_INT
,
.
flags
=
IORESOURCE_IRQ
,
},
};
static
u64
udc_dmamask
=
~
(
u32
)
0
;
static
struct
platform_device
au1xxx_usb_gdt_device
=
{
.
name
=
"au1xxx-udc"
,
.
id
=
0
,
.
dev
=
{
.
dma_mask
=
&
udc_dmamask
,
.
coherent_dma_mask
=
0xffffffff
,
},
.
num_resources
=
ARRAY_SIZE
(
au1xxx_usb_gdt_resources
),
.
resource
=
au1xxx_usb_gdt_resources
,
};
/* Au1200 UOC (USB OTG controller) */
static
struct
resource
au1xxx_usb_otg_resources
[]
=
{
[
0
]
=
{
.
start
=
USB_UOC_BASE
,
.
end
=
USB_UOC_BASE
+
USB_UOC_LEN
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
[
1
]
=
{
.
start
=
AU1200_USB_INT
,
.
end
=
AU1200_USB_INT
,
.
flags
=
IORESOURCE_IRQ
,
},
};
static
u64
uoc_dmamask
=
~
(
u32
)
0
;
static
struct
platform_device
au1xxx_usb_otg_device
=
{
.
name
=
"au1xxx-uoc"
,
.
id
=
0
,
.
dev
=
{
.
dma_mask
=
&
uoc_dmamask
,
.
coherent_dma_mask
=
0xffffffff
,
},
.
num_resources
=
ARRAY_SIZE
(
au1xxx_usb_otg_resources
),
.
resource
=
au1xxx_usb_otg_resources
,
};
/*** AU1200 LCD controller ***/
static
struct
resource
au1200_lcd_resources
[]
=
{
[
0
]
=
{
.
start
=
LCD_PHYS_ADDR
,
.
end
=
LCD_PHYS_ADDR
+
0x800
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
[
1
]
=
{
.
start
=
AU1200_LCD_INT
,
.
end
=
AU1200_LCD_INT
,
.
flags
=
IORESOURCE_IRQ
,
}
};
static
u64
au1200_lcd_dmamask
=
~
(
u32
)
0
;
static
struct
platform_device
au1200_lcd_device
=
{
.
name
=
"au1200-lcd"
,
.
id
=
0
,
.
dev
=
{
.
dma_mask
=
&
au1200_lcd_dmamask
,
.
coherent_dma_mask
=
0xffffffff
,
},
.
num_resources
=
ARRAY_SIZE
(
au1200_lcd_resources
),
.
resource
=
au1200_lcd_resources
,
};
#endif
static
struct
platform_device
*
au1xxx_platform_devices
[]
__initdata
=
{
&
au1xxx_usb_ohci_device
,
#ifdef CONFIG_FB_AU1100
&
au1100_lcd_device
,
#endif
#ifdef CONFIG_SOC_AU1200
#if 0 /* fixme */
&au1xxx_usb_ehci_device,
#endif
&
au1xxx_usb_gdt_device
,
&
au1xxx_usb_otg_device
,
&
au1200_lcd_device
,
#endif
};
int
au1xxx_platform_init
(
void
)
...
...
arch/mips/au1000/pb1200/board_setup.c
浏览文件 @
64abf64d
...
...
@@ -58,22 +58,10 @@
extern
void
_board_init_irq
(
void
);
extern
void
(
*
board_init_irq
)(
void
);
#ifdef CONFIG_BLK_DEV_IDE_AU1XXX
extern
u32
au1xxx_ide_virtbase
;
extern
u64
au1xxx_ide_physbase
;
extern
int
au1xxx_ide_irq
;
u32
led_base_addr
;
/* Ddma */
chan_tab_t
*
ide_read_ch
,
*
ide_write_ch
;
u32
au1xxx_ide_ddma_enable
=
0
,
switch4ddma
=
1
;
// PIO+ddma
dbdev_tab_t
new_dbdev_tab_element
=
{
DSCR_CMD0_THROTTLE
,
DEV_FLAGS_ANYUSE
,
0
,
0
,
0x00000000
,
0
,
0
};
#endif
/* end CONFIG_BLK_DEV_IDE_AU1XXX */
void
board_reset
(
void
)
{
bcsr
->
resets
=
0
;
bcsr
->
system
=
0
;
}
void
__init
board_setup
(
void
)
...
...
@@ -94,7 +82,7 @@ void __init board_setup(void)
au_sync();
#endif
#if defined(
CONFIG_I2C_ALGO_AU1550
)
#if defined(
CONFIG_I2C_AU1550
)
{
u32
freq0
,
clksrc
;
...
...
@@ -134,35 +122,24 @@ void __init board_setup(void)
#ifdef CONFIG_FB_AU1200
argptr
=
prom_getcmdline
();
#ifdef CONFIG_MIPS_PB1200
strcat
(
argptr
,
" video=au1200fb:panel:
s11
"
);
strcat
(
argptr
,
" video=au1200fb:panel:
bs
"
);
#endif
#ifdef CONFIG_MIPS_DB1200
strcat
(
argptr
,
" video=au1200fb:panel:
s7
"
);
strcat
(
argptr
,
" video=au1200fb:panel:
bs
"
);
#endif
#endif
#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
/*
* Iniz IDE parameters
*/
au1xxx_ide_irq
=
PB1200_IDE_INT
;
au1xxx_ide_physbase
=
AU1XXX_ATA_PHYS_ADDR
;
au1xxx_ide_virtbase
=
KSEG1ADDR
(
AU1XXX_ATA_PHYS_ADDR
);
/*
* change PIO or PIO+Ddma
* check the GPIO-5 pin condition. pb1200:s18_dot */
switch4ddma
=
(
au_readl
(
SYS_PINSTATERD
)
&
(
1
<<
5
))
?
1
:
0
;
#endif
/* The Pb1200 development board uses external MUX for PSC0 to
support SMB/SPI. bcsr->resets bit 12: 0=SMB 1=SPI
*/
#if defined(CONFIG_AU1
550_PSC_SPI) && defined(CONFIG_I2C_ALGO
_AU1550)
#if defined(CONFIG_AU1
XXX_PSC_SPI) && defined(CONFIG_I2C
_AU1550)
#error I2C and SPI are mutually exclusive. Both are physically connected to PSC0.\
Refer to Pb1200/Db1200 documentation.
#elif defined( CONFIG_AU1
550
_PSC_SPI )
#elif defined( CONFIG_AU1
XXX
_PSC_SPI )
bcsr
->
resets
|=
BCSR_RESETS_PCS0MUX
;
#elif defined( CONFIG_I2C_ALGO_AU1550 )
/*Hard Coding Value to enable Temp Sensors [bit 14] Value for SOC Au1200. Pls refer documentation*/
bcsr
->
resets
=
0x900f
;
#elif defined( CONFIG_I2C_AU1550 )
bcsr
->
resets
&=
(
~
BCSR_RESETS_PCS0MUX
);
#endif
au_sync
();
...
...
@@ -181,3 +158,36 @@ void __init board_setup(void)
board_init_irq
=
_board_init_irq
;
}
}
int
board_au1200fb_panel
(
void
)
{
BCSR
*
bcsr
=
(
BCSR
*
)
BCSR_KSEG1_ADDR
;
int
p
;
p
=
bcsr
->
switches
;
p
>>=
8
;
p
&=
0x0F
;
return
p
;
}
int
board_au1200fb_panel_init
(
void
)
{
/* Apply power */
BCSR
*
bcsr
=
(
BCSR
*
)
BCSR_KSEG1_ADDR
;
bcsr
->
board
|=
(
BCSR_BOARD_LCDVEE
|
BCSR_BOARD_LCDVDD
|
BCSR_BOARD_LCDBL
);
/*printk("board_au1200fb_panel_init()\n"); */
return
0
;
}
int
board_au1200fb_panel_shutdown
(
void
)
{
/* Remove power */
BCSR
*
bcsr
=
(
BCSR
*
)
BCSR_KSEG1_ADDR
;
bcsr
->
board
&=
~
(
BCSR_BOARD_LCDVEE
|
BCSR_BOARD_LCDVDD
|
BCSR_BOARD_LCDBL
);
/*printk("board_au1200fb_panel_shutdown()\n"); */
return
0
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录