Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
05d900c9
K
Kernel
项目概览
openeuler
/
Kernel
接近 2 年 前同步成功
通知
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看板
提交
05d900c9
编写于
10月 04, 2011
作者:
S
Sascha Hauer
浏览文件
操作
浏览文件
下载
差异文件
Merge branches 'cleanups/mx3-mm-v2' and 'cleanups/mxs' into imx-cleanup
上级
6da5ce17
f548897f
a6d34048
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
313 addition
and
254 deletion
+313
-254
arch/arm/mach-imx/Makefile
arch/arm/mach-imx/Makefile
+2
-3
arch/arm/mach-imx/cache-l2x0.c
arch/arm/mach-imx/cache-l2x0.c
+0
-56
arch/arm/mach-imx/mm-imx3.c
arch/arm/mach-imx/mm-imx3.c
+256
-0
arch/arm/mach-imx/mm-imx31.c
arch/arm/mach-imx/mm-imx31.c
+0
-91
arch/arm/mach-imx/pm-imx27.c
arch/arm/mach-imx/pm-imx27.c
+1
-1
arch/arm/mach-mx5/mm.c
arch/arm/mach-mx5/mm.c
+6
-0
arch/arm/mach-mx5/pm-imx5.c
arch/arm/mach-mx5/pm-imx5.c
+2
-1
arch/arm/mach-mx5/system.c
arch/arm/mach-mx5/system.c
+1
-0
arch/arm/mach-mxs/Makefile
arch/arm/mach-mxs/Makefile
+3
-3
arch/arm/mach-mxs/mm-mx23.c
arch/arm/mach-mxs/mm-mx23.c
+0
-44
arch/arm/mach-mxs/mm.c
arch/arm/mach-mxs/mm.c
+19
-0
arch/arm/plat-mxc/include/mach/common.h
arch/arm/plat-mxc/include/mach/common.h
+11
-0
arch/arm/plat-mxc/include/mach/io.h
arch/arm/plat-mxc/include/mach/io.h
+6
-16
arch/arm/plat-mxc/include/mach/mxc.h
arch/arm/plat-mxc/include/mach/mxc.h
+0
-7
arch/arm/plat-mxc/include/mach/system.h
arch/arm/plat-mxc/include/mach/system.h
+3
-32
arch/arm/plat-mxc/system.c
arch/arm/plat-mxc/system.c
+3
-0
未找到文件。
arch/arm/mach-imx/Makefile
浏览文件 @
05d900c9
...
@@ -8,9 +8,8 @@ obj-$(CONFIG_SOC_IMX25) += clock-imx25.o mm-imx25.o ehci-imx25.o
...
@@ -8,9 +8,8 @@ obj-$(CONFIG_SOC_IMX25) += clock-imx25.o mm-imx25.o ehci-imx25.o
obj-$(CONFIG_SOC_IMX27)
+=
cpu-imx27.o pm-imx27.o
obj-$(CONFIG_SOC_IMX27)
+=
cpu-imx27.o pm-imx27.o
obj-$(CONFIG_SOC_IMX27)
+=
clock-imx27.o mm-imx27.o ehci-imx27.o
obj-$(CONFIG_SOC_IMX27)
+=
clock-imx27.o mm-imx27.o ehci-imx27.o
obj-$(CONFIG_SOC_IMX31)
+=
mm-imx31.o cpu-imx31.o clock-imx31.o iomux-imx31.o ehci-imx31.o
obj-$(CONFIG_SOC_IMX31)
+=
mm-imx3.o cpu-imx31.o clock-imx31.o iomux-imx31.o ehci-imx31.o
obj-$(CONFIG_SOC_IMX35)
+=
mm-imx35.o cpu-imx35.o clock-imx35.o ehci-imx35.o
obj-$(CONFIG_SOC_IMX35)
+=
mm-imx3.o cpu-imx35.o clock-imx35.o ehci-imx35.o
obj-$(CONFIG_CACHE_L2X0)
+=
cache-l2x0.o
# Support for CMOS sensor interface
# Support for CMOS sensor interface
obj-$(CONFIG_MX1_VIDEO)
+=
mx1-camera-fiq.o mx1-camera-fiq-ksym.o
obj-$(CONFIG_MX1_VIDEO)
+=
mx1-camera-fiq.o mx1-camera-fiq-ksym.o
...
...
arch/arm/mach-imx/cache-l2x0.c
已删除
100644 → 0
浏览文件 @
6da5ce17
/*
* Copyright (C) 2009-2010 Pengutronix
* Sascha Hauer <s.hauer@pengutronix.de>
* Juergen Beisert <j.beisert@pengutronix.de>
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by the
* Free Software Foundation.
*/
#include <linux/init.h>
#include <linux/err.h>
#include <linux/kernel.h>
#include <asm/hardware/cache-l2x0.h>
#include <mach/hardware.h>
static
int
mxc_init_l2x0
(
void
)
{
void
__iomem
*
l2x0_base
;
void
__iomem
*
clkctl_base
;
if
(
!
cpu_is_mx31
()
&&
!
cpu_is_mx35
())
return
0
;
/*
* First of all, we must repair broken chip settings. There are some
* i.MX35 CPUs in the wild, comming with bogus L2 cache settings. These
* misconfigured CPUs will run amok immediately when the L2 cache gets enabled.
* Workaraound is to setup the correct register setting prior enabling the
* L2 cache. This should not hurt already working CPUs, as they are using the
* same value.
*/
#define L2_MEM_VAL 0x10
clkctl_base
=
ioremap
(
MX35_CLKCTL_BASE_ADDR
,
4096
);
if
(
clkctl_base
!=
NULL
)
{
writel
(
0x00000515
,
clkctl_base
+
L2_MEM_VAL
);
iounmap
(
clkctl_base
);
}
else
{
pr_err
(
"L2 cache: Cannot fix timing. Trying to continue without
\n
"
);
}
l2x0_base
=
ioremap
(
MX3x_L2CC_BASE_ADDR
,
4096
);
if
(
IS_ERR
(
l2x0_base
))
{
printk
(
KERN_ERR
"remapping L2 cache area failed with %ld
\n
"
,
PTR_ERR
(
l2x0_base
));
return
0
;
}
l2x0_init
(
l2x0_base
,
0x00030024
,
0x00000000
);
return
0
;
}
arch_initcall
(
mxc_init_l2x0
);
arch/arm/mach-imx/mm-imx3
5
.c
→
arch/arm/mach-imx/mm-imx3.c
浏览文件 @
05d900c9
...
@@ -21,8 +21,8 @@
...
@@ -21,8 +21,8 @@
#include <linux/err.h>
#include <linux/err.h>
#include <asm/pgtable.h>
#include <asm/pgtable.h>
#include <asm/mach/map.h>
#include <asm/hardware/cache-l2x0.h>
#include <asm/hardware/cache-l2x0.h>
#include <asm/mach/map.h>
#include <mach/common.h>
#include <mach/common.h>
#include <mach/devices-common.h>
#include <mach/devices-common.h>
...
@@ -30,6 +30,102 @@
...
@@ -30,6 +30,102 @@
#include <mach/iomux-v3.h>
#include <mach/iomux-v3.h>
#include <mach/irqs.h>
#include <mach/irqs.h>
static
void
imx3_idle
(
void
)
{
unsigned
long
reg
=
0
;
__asm__
__volatile__
(
/* disable I and D cache */
"mrc p15, 0, %0, c1, c0, 0
\n
"
"bic %0, %0, #0x00001000
\n
"
"bic %0, %0, #0x00000004
\n
"
"mcr p15, 0, %0, c1, c0, 0
\n
"
/* invalidate I cache */
"mov %0, #0
\n
"
"mcr p15, 0, %0, c7, c5, 0
\n
"
/* clear and invalidate D cache */
"mov %0, #0
\n
"
"mcr p15, 0, %0, c7, c14, 0
\n
"
/* WFI */
"mov %0, #0
\n
"
"mcr p15, 0, %0, c7, c0, 4
\n
"
"nop
\n
"
"nop
\n
"
"nop
\n
"
"nop
\n
"
"nop
\n
"
"nop
\n
"
"nop
\n
"
/* enable I and D cache */
"mrc p15, 0, %0, c1, c0, 0
\n
"
"orr %0, %0, #0x00001000
\n
"
"orr %0, %0, #0x00000004
\n
"
"mcr p15, 0, %0, c1, c0, 0
\n
"
:
"=r"
(
reg
));
}
static
void
__iomem
*
imx3_ioremap
(
unsigned
long
phys_addr
,
size_t
size
,
unsigned
int
mtype
)
{
if
(
mtype
==
MT_DEVICE
)
{
/*
* Access all peripherals below 0x80000000 as nonshared device
* on mx3, but leave l2cc alone. Otherwise cache corruptions
* can occur.
*/
if
(
phys_addr
<
0x80000000
&&
!
addr_in_module
(
phys_addr
,
MX3x_L2CC
))
mtype
=
MT_DEVICE_NONSHARED
;
}
return
__arm_ioremap
(
phys_addr
,
size
,
mtype
);
}
void
imx3_init_l2x0
(
void
)
{
void
__iomem
*
l2x0_base
;
void
__iomem
*
clkctl_base
;
/*
* First of all, we must repair broken chip settings. There are some
* i.MX35 CPUs in the wild, comming with bogus L2 cache settings. These
* misconfigured CPUs will run amok immediately when the L2 cache gets enabled.
* Workaraound is to setup the correct register setting prior enabling the
* L2 cache. This should not hurt already working CPUs, as they are using the
* same value.
*/
#define L2_MEM_VAL 0x10
clkctl_base
=
ioremap
(
MX35_CLKCTL_BASE_ADDR
,
4096
);
if
(
clkctl_base
!=
NULL
)
{
writel
(
0x00000515
,
clkctl_base
+
L2_MEM_VAL
);
iounmap
(
clkctl_base
);
}
else
{
pr_err
(
"L2 cache: Cannot fix timing. Trying to continue without
\n
"
);
}
l2x0_base
=
ioremap
(
MX3x_L2CC_BASE_ADDR
,
4096
);
if
(
IS_ERR
(
l2x0_base
))
{
printk
(
KERN_ERR
"remapping L2 cache area failed with %ld
\n
"
,
PTR_ERR
(
l2x0_base
));
return
;
}
l2x0_init
(
l2x0_base
,
0x00030024
,
0x00000000
);
}
static
struct
map_desc
mx31_io_desc
[]
__initdata
=
{
imx_map_entry
(
MX31
,
X_MEMC
,
MT_DEVICE
),
imx_map_entry
(
MX31
,
AVIC
,
MT_DEVICE_NONSHARED
),
imx_map_entry
(
MX31
,
AIPS1
,
MT_DEVICE_NONSHARED
),
imx_map_entry
(
MX31
,
AIPS2
,
MT_DEVICE_NONSHARED
),
imx_map_entry
(
MX31
,
SPBA0
,
MT_DEVICE_NONSHARED
),
};
/*
* This function initializes the memory map. It is called during the
* system startup to create static physical to virtual memory mappings
* for the IO modules.
*/
void
__init
mx31_map_io
(
void
)
{
iotable_init
(
mx31_io_desc
,
ARRAY_SIZE
(
mx31_io_desc
));
}
static
struct
map_desc
mx35_io_desc
[]
__initdata
=
{
static
struct
map_desc
mx35_io_desc
[]
__initdata
=
{
imx_map_entry
(
MX35
,
X_MEMC
,
MT_DEVICE
),
imx_map_entry
(
MX35
,
X_MEMC
,
MT_DEVICE
),
imx_map_entry
(
MX35
,
AVIC
,
MT_DEVICE_NONSHARED
),
imx_map_entry
(
MX35
,
AVIC
,
MT_DEVICE_NONSHARED
),
...
@@ -43,11 +139,26 @@ void __init mx35_map_io(void)
...
@@ -43,11 +139,26 @@ void __init mx35_map_io(void)
iotable_init
(
mx35_io_desc
,
ARRAY_SIZE
(
mx35_io_desc
));
iotable_init
(
mx35_io_desc
,
ARRAY_SIZE
(
mx35_io_desc
));
}
}
void
__init
imx31_init_early
(
void
)
{
mxc_set_cpu_type
(
MXC_CPU_MX31
);
mxc_arch_reset_init
(
MX31_IO_ADDRESS
(
MX31_WDOG_BASE_ADDR
));
imx_idle
=
imx3_idle
;
imx_ioremap
=
imx3_ioremap
;
}
void
__init
imx35_init_early
(
void
)
void
__init
imx35_init_early
(
void
)
{
{
mxc_set_cpu_type
(
MXC_CPU_MX35
);
mxc_set_cpu_type
(
MXC_CPU_MX35
);
mxc_iomux_v3_init
(
MX35_IO_ADDRESS
(
MX35_IOMUXC_BASE_ADDR
));
mxc_iomux_v3_init
(
MX35_IO_ADDRESS
(
MX35_IOMUXC_BASE_ADDR
));
mxc_arch_reset_init
(
MX35_IO_ADDRESS
(
MX35_WDOG_BASE_ADDR
));
mxc_arch_reset_init
(
MX35_IO_ADDRESS
(
MX35_WDOG_BASE_ADDR
));
imx_idle
=
imx3_idle
;
imx_ioremap
=
imx3_ioremap
;
}
void
__init
mx31_init_irq
(
void
)
{
mxc_init_irq
(
MX31_IO_ADDRESS
(
MX31_AVIC_BASE_ADDR
));
}
}
void
__init
mx35_init_irq
(
void
)
void
__init
mx35_init_irq
(
void
)
...
@@ -55,6 +166,40 @@ void __init mx35_init_irq(void)
...
@@ -55,6 +166,40 @@ void __init mx35_init_irq(void)
mxc_init_irq
(
MX35_IO_ADDRESS
(
MX35_AVIC_BASE_ADDR
));
mxc_init_irq
(
MX35_IO_ADDRESS
(
MX35_AVIC_BASE_ADDR
));
}
}
static
struct
sdma_script_start_addrs
imx31_to1_sdma_script
__initdata
=
{
.
per_2_per_addr
=
1677
,
};
static
struct
sdma_script_start_addrs
imx31_to2_sdma_script
__initdata
=
{
.
ap_2_ap_addr
=
423
,
.
ap_2_bp_addr
=
829
,
.
bp_2_ap_addr
=
1029
,
};
static
struct
sdma_platform_data
imx31_sdma_pdata
__initdata
=
{
.
fw_name
=
"sdma-imx31-to2.bin"
,
.
script_addrs
=
&
imx31_to2_sdma_script
,
};
void
__init
imx31_soc_init
(
void
)
{
int
to_version
=
mx31_revision
()
>>
4
;
imx3_init_l2x0
();
mxc_register_gpio
(
"imx31-gpio"
,
0
,
MX31_GPIO1_BASE_ADDR
,
SZ_16K
,
MX31_INT_GPIO1
,
0
);
mxc_register_gpio
(
"imx31-gpio"
,
1
,
MX31_GPIO2_BASE_ADDR
,
SZ_16K
,
MX31_INT_GPIO2
,
0
);
mxc_register_gpio
(
"imx31-gpio"
,
2
,
MX31_GPIO3_BASE_ADDR
,
SZ_16K
,
MX31_INT_GPIO3
,
0
);
if
(
to_version
==
1
)
{
strncpy
(
imx31_sdma_pdata
.
fw_name
,
"sdma-imx31-to1.bin"
,
strlen
(
imx31_sdma_pdata
.
fw_name
));
imx31_sdma_pdata
.
script_addrs
=
&
imx31_to1_sdma_script
;
}
imx_add_imx_sdma
(
"imx31-sdma"
,
MX31_SDMA_BASE_ADDR
,
MX31_INT_SDMA
,
&
imx31_sdma_pdata
);
}
static
struct
sdma_script_start_addrs
imx35_to1_sdma_script
__initdata
=
{
static
struct
sdma_script_start_addrs
imx35_to1_sdma_script
__initdata
=
{
.
ap_2_ap_addr
=
642
,
.
ap_2_ap_addr
=
642
,
.
uart_2_mcu_addr
=
817
,
.
uart_2_mcu_addr
=
817
,
...
@@ -94,6 +239,8 @@ void __init imx35_soc_init(void)
...
@@ -94,6 +239,8 @@ void __init imx35_soc_init(void)
{
{
int
to_version
=
mx35_revision
()
>>
4
;
int
to_version
=
mx35_revision
()
>>
4
;
imx3_init_l2x0
();
/* i.mx35 has the i.mx31 type gpio */
/* i.mx35 has the i.mx31 type gpio */
mxc_register_gpio
(
"imx31-gpio"
,
0
,
MX35_GPIO1_BASE_ADDR
,
SZ_16K
,
MX35_INT_GPIO1
,
0
);
mxc_register_gpio
(
"imx31-gpio"
,
0
,
MX35_GPIO1_BASE_ADDR
,
SZ_16K
,
MX35_INT_GPIO1
,
0
);
mxc_register_gpio
(
"imx31-gpio"
,
1
,
MX35_GPIO2_BASE_ADDR
,
SZ_16K
,
MX35_INT_GPIO2
,
0
);
mxc_register_gpio
(
"imx31-gpio"
,
1
,
MX35_GPIO2_BASE_ADDR
,
SZ_16K
,
MX35_INT_GPIO2
,
0
);
...
...
arch/arm/mach-imx/mm-imx31.c
已删除
100644 → 0
浏览文件 @
6da5ce17
/*
* Copyright (C) 1999,2000 Arm Limited
* Copyright (C) 2000 Deep Blue Solutions Ltd
* Copyright (C) 2002 Shane Nay (shane@minirl.com)
* Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
* - add MX31 specific definitions
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/err.h>
#include <asm/pgtable.h>
#include <asm/mach/map.h>
#include <mach/common.h>
#include <mach/devices-common.h>
#include <mach/hardware.h>
#include <mach/iomux-v3.h>
#include <mach/irqs.h>
static
struct
map_desc
mx31_io_desc
[]
__initdata
=
{
imx_map_entry
(
MX31
,
X_MEMC
,
MT_DEVICE
),
imx_map_entry
(
MX31
,
AVIC
,
MT_DEVICE_NONSHARED
),
imx_map_entry
(
MX31
,
AIPS1
,
MT_DEVICE_NONSHARED
),
imx_map_entry
(
MX31
,
AIPS2
,
MT_DEVICE_NONSHARED
),
imx_map_entry
(
MX31
,
SPBA0
,
MT_DEVICE_NONSHARED
),
};
/*
* This function initializes the memory map. It is called during the
* system startup to create static physical to virtual memory mappings
* for the IO modules.
*/
void
__init
mx31_map_io
(
void
)
{
iotable_init
(
mx31_io_desc
,
ARRAY_SIZE
(
mx31_io_desc
));
}
void
__init
imx31_init_early
(
void
)
{
mxc_set_cpu_type
(
MXC_CPU_MX31
);
mxc_arch_reset_init
(
MX31_IO_ADDRESS
(
MX31_WDOG_BASE_ADDR
));
}
void
__init
mx31_init_irq
(
void
)
{
mxc_init_irq
(
MX31_IO_ADDRESS
(
MX31_AVIC_BASE_ADDR
));
}
static
struct
sdma_script_start_addrs
imx31_to1_sdma_script
__initdata
=
{
.
per_2_per_addr
=
1677
,
};
static
struct
sdma_script_start_addrs
imx31_to2_sdma_script
__initdata
=
{
.
ap_2_ap_addr
=
423
,
.
ap_2_bp_addr
=
829
,
.
bp_2_ap_addr
=
1029
,
};
static
struct
sdma_platform_data
imx31_sdma_pdata
__initdata
=
{
.
fw_name
=
"sdma-imx31-to2.bin"
,
.
script_addrs
=
&
imx31_to2_sdma_script
,
};
void
__init
imx31_soc_init
(
void
)
{
int
to_version
=
mx31_revision
()
>>
4
;
mxc_register_gpio
(
"imx31-gpio"
,
0
,
MX31_GPIO1_BASE_ADDR
,
SZ_16K
,
MX31_INT_GPIO1
,
0
);
mxc_register_gpio
(
"imx31-gpio"
,
1
,
MX31_GPIO2_BASE_ADDR
,
SZ_16K
,
MX31_INT_GPIO2
,
0
);
mxc_register_gpio
(
"imx31-gpio"
,
2
,
MX31_GPIO3_BASE_ADDR
,
SZ_16K
,
MX31_INT_GPIO3
,
0
);
if
(
to_version
==
1
)
{
strncpy
(
imx31_sdma_pdata
.
fw_name
,
"sdma-imx31-to1.bin"
,
strlen
(
imx31_sdma_pdata
.
fw_name
));
imx31_sdma_pdata
.
script_addrs
=
&
imx31_to1_sdma_script
;
}
imx_add_imx_sdma
(
"imx31-sdma"
,
MX31_SDMA_BASE_ADDR
,
MX31_INT_SDMA
,
&
imx31_sdma_pdata
);
}
arch/arm/mach-imx/pm-imx27.c
浏览文件 @
05d900c9
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#include <linux/suspend.h>
#include <linux/suspend.h>
#include <linux/io.h>
#include <linux/io.h>
#include <mach/system.h>
#include <mach/system.h>
#include <mach/
mx27
.h>
#include <mach/
hardware
.h>
static
int
mx27_suspend_enter
(
suspend_state_t
state
)
static
int
mx27_suspend_enter
(
suspend_state_t
state
)
{
{
...
...
arch/arm/mach-mx5/mm.c
浏览文件 @
05d900c9
...
@@ -21,6 +21,11 @@
...
@@ -21,6 +21,11 @@
#include <mach/devices-common.h>
#include <mach/devices-common.h>
#include <mach/iomux-v3.h>
#include <mach/iomux-v3.h>
static
void
imx5_idle
(
void
)
{
mx5_cpu_lp_set
(
WAIT_UNCLOCKED_POWER_OFF
);
}
/*
/*
* Define the MX50 memory map.
* Define the MX50 memory map.
*/
*/
...
@@ -84,6 +89,7 @@ void __init imx51_init_early(void)
...
@@ -84,6 +89,7 @@ void __init imx51_init_early(void)
mxc_set_cpu_type
(
MXC_CPU_MX51
);
mxc_set_cpu_type
(
MXC_CPU_MX51
);
mxc_iomux_v3_init
(
MX51_IO_ADDRESS
(
MX51_IOMUXC_BASE_ADDR
));
mxc_iomux_v3_init
(
MX51_IO_ADDRESS
(
MX51_IOMUXC_BASE_ADDR
));
mxc_arch_reset_init
(
MX51_IO_ADDRESS
(
MX51_WDOG1_BASE_ADDR
));
mxc_arch_reset_init
(
MX51_IO_ADDRESS
(
MX51_WDOG1_BASE_ADDR
));
imx_idle
=
imx5_idle
;
}
}
void
__init
imx53_init_early
(
void
)
void
__init
imx53_init_early
(
void
)
...
...
arch/arm/mach-mx5/pm-imx5.c
浏览文件 @
05d900c9
...
@@ -14,7 +14,8 @@
...
@@ -14,7 +14,8 @@
#include <linux/err.h>
#include <linux/err.h>
#include <asm/cacheflush.h>
#include <asm/cacheflush.h>
#include <asm/tlbflush.h>
#include <asm/tlbflush.h>
#include <mach/system.h>
#include <mach/common.h>
#include <mach/hardware.h>
#include "crm_regs.h"
#include "crm_regs.h"
static
struct
clk
*
gpc_dvfs_clk
;
static
struct
clk
*
gpc_dvfs_clk
;
...
...
arch/arm/mach-mx5/system.c
浏览文件 @
05d900c9
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include <linux/platform_device.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/io.h>
#include <mach/hardware.h>
#include <mach/hardware.h>
#include <mach/common.h>
#include "crm_regs.h"
#include "crm_regs.h"
/* set cpu low power mode before WFI instruction. This function is called
/* set cpu low power mode before WFI instruction. This function is called
...
...
arch/arm/mach-mxs/Makefile
浏览文件 @
05d900c9
# Common support
# Common support
obj-y
:=
clock.o devices.o icoll.o iomux.o system.o timer.o
obj-y
:=
clock.o devices.o icoll.o iomux.o system.o timer.o
mm.o
obj-$(CONFIG_MXS_OCOTP)
+=
ocotp.o
obj-$(CONFIG_MXS_OCOTP)
+=
ocotp.o
obj-$(CONFIG_PM)
+=
pm.o
obj-$(CONFIG_PM)
+=
pm.o
obj-$(CONFIG_SOC_IMX23)
+=
clock-mx23.o
mm-mx23.o
obj-$(CONFIG_SOC_IMX23)
+=
clock-mx23.o
obj-$(CONFIG_SOC_IMX28)
+=
clock-mx28.o
mm-mx28.o
obj-$(CONFIG_SOC_IMX28)
+=
clock-mx28.o
obj-$(CONFIG_MACH_STMP378X_DEVB)
+=
mach-stmp378x_devb.o
obj-$(CONFIG_MACH_STMP378X_DEVB)
+=
mach-stmp378x_devb.o
obj-$(CONFIG_MACH_MX23EVK)
+=
mach-mx23evk.o
obj-$(CONFIG_MACH_MX23EVK)
+=
mach-mx23evk.o
...
...
arch/arm/mach-mxs/mm-mx23.c
已删除
100644 → 0
浏览文件 @
6da5ce17
/*
* Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved.
*
* The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License
* Version 2 or later at the following locations:
*
* http://www.opensource.org/licenses/gpl-license.html
* http://www.gnu.org/copyleft/gpl.html
*
* Create static mapping between physical to virtual memory.
*/
#include <linux/mm.h>
#include <linux/init.h>
#include <asm/mach/map.h>
#include <mach/mx23.h>
#include <mach/common.h>
#include <mach/iomux.h>
/*
* Define the MX23 memory map.
*/
static
struct
map_desc
mx23_io_desc
[]
__initdata
=
{
mxs_map_entry
(
MX23
,
OCRAM
,
MT_DEVICE
),
mxs_map_entry
(
MX23
,
IO
,
MT_DEVICE
),
};
/*
* This function initializes the memory map. It is called during the
* system startup to create static physical to virtual memory mappings
* for the IO modules.
*/
void
__init
mx23_map_io
(
void
)
{
iotable_init
(
mx23_io_desc
,
ARRAY_SIZE
(
mx23_io_desc
));
}
void
__init
mx23_init_irq
(
void
)
{
icoll_init_irq
();
}
arch/arm/mach-mxs/mm
-mx28
.c
→
arch/arm/mach-mxs/mm.c
浏览文件 @
05d900c9
...
@@ -16,10 +16,19 @@
...
@@ -16,10 +16,19 @@
#include <asm/mach/map.h>
#include <asm/mach/map.h>
#include <mach/mx23.h>
#include <mach/mx28.h>
#include <mach/mx28.h>
#include <mach/common.h>
#include <mach/common.h>
#include <mach/iomux.h>
#include <mach/iomux.h>
/*
* Define the MX23 memory map.
*/
static
struct
map_desc
mx23_io_desc
[]
__initdata
=
{
mxs_map_entry
(
MX23
,
OCRAM
,
MT_DEVICE
),
mxs_map_entry
(
MX23
,
IO
,
MT_DEVICE
),
};
/*
/*
* Define the MX28 memory map.
* Define the MX28 memory map.
*/
*/
...
@@ -33,6 +42,16 @@ static struct map_desc mx28_io_desc[] __initdata = {
...
@@ -33,6 +42,16 @@ static struct map_desc mx28_io_desc[] __initdata = {
* system startup to create static physical to virtual memory mappings
* system startup to create static physical to virtual memory mappings
* for the IO modules.
* for the IO modules.
*/
*/
void
__init
mx23_map_io
(
void
)
{
iotable_init
(
mx23_io_desc
,
ARRAY_SIZE
(
mx23_io_desc
));
}
void
__init
mx23_init_irq
(
void
)
{
icoll_init_irq
();
}
void
__init
mx28_map_io
(
void
)
void
__init
mx28_map_io
(
void
)
{
{
iotable_init
(
mx28_io_desc
,
ARRAY_SIZE
(
mx28_io_desc
));
iotable_init
(
mx28_io_desc
,
ARRAY_SIZE
(
mx28_io_desc
));
...
...
arch/arm/plat-mxc/include/mach/common.h
浏览文件 @
05d900c9
...
@@ -71,4 +71,15 @@ extern void mxc_arch_reset_init(void __iomem *);
...
@@ -71,4 +71,15 @@ extern void mxc_arch_reset_init(void __iomem *);
extern
void
mx51_efikamx_reset
(
void
);
extern
void
mx51_efikamx_reset
(
void
);
extern
int
mx53_revision
(
void
);
extern
int
mx53_revision
(
void
);
extern
int
mx53_display_revision
(
void
);
extern
int
mx53_display_revision
(
void
);
enum
mxc_cpu_pwr_mode
{
WAIT_CLOCKED
,
/* wfi only */
WAIT_UNCLOCKED
,
/* WAIT */
WAIT_UNCLOCKED_POWER_OFF
,
/* WAIT + SRPG */
STOP_POWER_ON
,
/* just STOP */
STOP_POWER_OFF
,
/* STOP + SRPG */
};
extern
void
mx5_cpu_lp_set
(
enum
mxc_cpu_pwr_mode
mode
);
extern
void
(
*
imx_idle
)(
void
);
#endif
#endif
arch/arm/plat-mxc/include/mach/io.h
浏览文件 @
05d900c9
...
@@ -14,32 +14,22 @@
...
@@ -14,32 +14,22 @@
/* Allow IO space to be anywhere in the memory */
/* Allow IO space to be anywhere in the memory */
#define IO_SPACE_LIMIT 0xffffffff
#define IO_SPACE_LIMIT 0xffffffff
#if defined(CONFIG_SOC_IMX31) || defined(CONFIG_SOC_IMX35)
#include <mach/hardware.h>
#define __arch_ioremap __imx_ioremap
#define __arch_ioremap __imx_ioremap
#define __arch_iounmap __iounmap
#define __arch_iounmap __iounmap
#define addr_in_module(addr, mod) \
#define addr_in_module(addr, mod) \
((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE)
((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE)
extern
void
__iomem
*
(
*
imx_ioremap
)(
unsigned
long
,
size_t
,
unsigned
int
);
static
inline
void
__iomem
*
static
inline
void
__iomem
*
__imx_ioremap
(
unsigned
long
phys_addr
,
size_t
size
,
unsigned
int
mtype
)
__imx_ioremap
(
unsigned
long
phys_addr
,
size_t
size
,
unsigned
int
mtype
)
{
{
if
(
mtype
==
MT_DEVICE
&&
(
cpu_is_mx31
()
||
cpu_is_mx35
()))
{
if
(
imx_ioremap
!=
NULL
)
/*
return
imx_ioremap
(
phys_addr
,
size
,
mtype
);
* Access all peripherals below 0x80000000 as nonshared device
else
* on mx3, but leave l2cc alone. Otherwise cache corruptions
return
__arm_ioremap
(
phys_addr
,
size
,
mtype
);
* can occur.
*/
if
(
phys_addr
<
0x80000000
&&
!
addr_in_module
(
phys_addr
,
MX3x_L2CC
))
mtype
=
MT_DEVICE_NONSHARED
;
}
return
__arm_ioremap
(
phys_addr
,
size
,
mtype
);
}
}
#endif
/* io address mapping macro */
/* io address mapping macro */
#define __io(a) __typesafe_io(a)
#define __io(a) __typesafe_io(a)
...
...
arch/arm/plat-mxc/include/mach/mxc.h
浏览文件 @
05d900c9
...
@@ -183,13 +183,6 @@ struct cpu_op {
...
@@ -183,13 +183,6 @@ struct cpu_op {
};
};
int
tzic_enable_wake
(
int
is_idle
);
int
tzic_enable_wake
(
int
is_idle
);
enum
mxc_cpu_pwr_mode
{
WAIT_CLOCKED
,
/* wfi only */
WAIT_UNCLOCKED
,
/* WAIT */
WAIT_UNCLOCKED_POWER_OFF
,
/* WAIT + SRPG */
STOP_POWER_ON
,
/* just STOP */
STOP_POWER_OFF
,
/* STOP + SRPG */
};
extern
struct
cpu_op
*
(
*
get_cpu_op
)(
int
*
op
);
extern
struct
cpu_op
*
(
*
get_cpu_op
)(
int
*
op
);
#endif
#endif
...
...
arch/arm/plat-mxc/include/mach/system.h
浏览文件 @
05d900c9
...
@@ -17,41 +17,12 @@
...
@@ -17,41 +17,12 @@
#ifndef __ASM_ARCH_MXC_SYSTEM_H__
#ifndef __ASM_ARCH_MXC_SYSTEM_H__
#define __ASM_ARCH_MXC_SYSTEM_H__
#define __ASM_ARCH_MXC_SYSTEM_H__
#include <mach/hardware.h>
extern
void
(
*
imx_idle
)(
void
);
#include <mach/common.h>
extern
void
mx5_cpu_lp_set
(
enum
mxc_cpu_pwr_mode
mode
);
static
inline
void
arch_idle
(
void
)
static
inline
void
arch_idle
(
void
)
{
{
/* fix i.MX31 errata TLSbo65953 and i.MX35 errata ENGcm09472 */
if
(
imx_idle
!=
NULL
)
if
(
cpu_is_mx31
()
||
cpu_is_mx35
())
{
(
imx_idle
)();
unsigned
long
reg
=
0
;
__asm__
__volatile__
(
/* disable I and D cache */
"mrc p15, 0, %0, c1, c0, 0
\n
"
"bic %0, %0, #0x00001000
\n
"
"bic %0, %0, #0x00000004
\n
"
"mcr p15, 0, %0, c1, c0, 0
\n
"
/* invalidate I cache */
"mov %0, #0
\n
"
"mcr p15, 0, %0, c7, c5, 0
\n
"
/* clear and invalidate D cache */
"mov %0, #0
\n
"
"mcr p15, 0, %0, c7, c14, 0
\n
"
/* WFI */
"mov %0, #0
\n
"
"mcr p15, 0, %0, c7, c0, 4
\n
"
"nop
\n
"
"nop
\n
"
"nop
\n
"
"nop
\n
"
"nop
\n
"
"nop
\n
"
"nop
\n
"
/* enable I and D cache */
"mrc p15, 0, %0, c1, c0, 0
\n
"
"orr %0, %0, #0x00001000
\n
"
"orr %0, %0, #0x00000004
\n
"
"mcr p15, 0, %0, c1, c0, 0
\n
"
:
"=r"
(
reg
));
}
else
if
(
cpu_is_mx51
())
mx5_cpu_lp_set
(
WAIT_UNCLOCKED_POWER_OFF
);
else
else
cpu_do_idle
();
cpu_do_idle
();
}
}
...
...
arch/arm/plat-mxc/system.c
浏览文件 @
05d900c9
...
@@ -28,6 +28,9 @@
...
@@ -28,6 +28,9 @@
#include <asm/system.h>
#include <asm/system.h>
#include <asm/mach-types.h>
#include <asm/mach-types.h>
void
(
*
imx_idle
)(
void
)
=
NULL
;
void
__iomem
*
(
*
imx_ioremap
)(
unsigned
long
,
size_t
,
unsigned
int
)
=
NULL
;
static
void
__iomem
*
wdog_base
;
static
void
__iomem
*
wdog_base
;
/*
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录