Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
65f69e5c
Commit
65f69e5c
authored
Nov 10, 2009
by
Russell King
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-rmk' of
git://linux-arm.org/linux-2.6
parents
cc20d429
c97c5aa8
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
146 additions
and
9 deletions
+146
-9
arch/arm/kernel/smp_scu.c
arch/arm/kernel/smp_scu.c
+4
-0
arch/arm/mach-realview/Kconfig
arch/arm/mach-realview/Kconfig
+4
-1
arch/arm/mach-realview/core.c
arch/arm/mach-realview/core.c
+41
-1
arch/arm/mach-realview/core.h
arch/arm/mach-realview/core.h
+6
-0
arch/arm/mach-realview/include/mach/memory.h
arch/arm/mach-realview/include/mach/memory.h
+49
-0
arch/arm/mach-realview/platsmp.c
arch/arm/mach-realview/platsmp.c
+1
-4
arch/arm/mach-realview/realview_eb.c
arch/arm/mach-realview/realview_eb.c
+1
-0
arch/arm/mach-realview/realview_pb1176.c
arch/arm/mach-realview/realview_pb1176.c
+13
-0
arch/arm/mach-realview/realview_pb11mp.c
arch/arm/mach-realview/realview_pb11mp.c
+1
-0
arch/arm/mach-realview/realview_pba8.c
arch/arm/mach-realview/realview_pba8.c
+1
-0
arch/arm/mach-realview/realview_pbx.c
arch/arm/mach-realview/realview_pbx.c
+21
-0
arch/arm/mm/proc-v7.S
arch/arm/mm/proc-v7.S
+4
-3
No files found.
arch/arm/kernel/smp_scu.c
View file @
65f69e5c
...
...
@@ -37,6 +37,10 @@ void __init scu_enable(void __iomem *scu_base)
u32
scu_ctrl
;
scu_ctrl
=
__raw_readl
(
scu_base
+
SCU_CTRL
);
/* already enabled? */
if
(
scu_ctrl
&
1
)
return
;
scu_ctrl
|=
1
;
__raw_writel
(
scu_ctrl
,
scu_base
+
SCU_CTRL
);
...
...
arch/arm/mach-realview/Kconfig
View file @
65f69e5c
...
...
@@ -70,6 +70,8 @@ config MACH_REALVIEW_PBX
bool "Support RealView/PBX platform"
select ARM_GIC
select HAVE_PATA_PLATFORM
select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !HIGH_PHYS_OFFSET
select ZONE_DMA if SPARSEMEM
help
Include support for the ARM(R) RealView PBX platform.
...
...
@@ -82,6 +84,7 @@ config REALVIEW_HIGH_PHYS_OFFSET
0x70000000, 256MB of which being mirrored at 0x00000000. If
the board supports 512MB of RAM, this option allows the
memory to be accessed contiguously at the high physical
offset.
offset. On the PBX board, disabling this option allows 1GB of
RAM to be used with SPARSEMEM.
endmenu
arch/arm/mach-realview/core.c
View file @
65f69e5c
...
...
@@ -59,6 +59,25 @@
/* used by entry-macro.S and platsmp.c */
void
__iomem
*
gic_cpu_base_addr
;
#ifdef CONFIG_ZONE_DMA
/*
* Adjust the zones if there are restrictions for DMA access.
*/
void
__init
realview_adjust_zones
(
int
node
,
unsigned
long
*
size
,
unsigned
long
*
hole
)
{
unsigned
long
dma_size
=
SZ_256M
>>
PAGE_SHIFT
;
if
(
!
machine_is_realview_pbx
()
||
node
||
(
size
[
0
]
<=
dma_size
))
return
;
size
[
ZONE_NORMAL
]
=
size
[
0
]
-
dma_size
;
size
[
ZONE_DMA
]
=
dma_size
;
hole
[
ZONE_NORMAL
]
=
hole
[
0
];
hole
[
ZONE_DMA
]
=
0
;
}
#endif
/*
* This is the RealView sched_clock implementation. This has
* a resolution of 41.7ns, and a maximum value of about 179s.
...
...
@@ -543,7 +562,7 @@ static int realview_clcd_setup(struct clcd_fb *fb)
fb
->
panel
=
realview_clcd_panel
();
fb
->
fb
.
screen_base
=
dma_alloc_writecombine
(
&
fb
->
dev
->
dev
,
framesize
,
&
dma
,
GFP_KERNEL
);
&
dma
,
GFP_KERNEL
|
GFP_DMA
);
if
(
!
fb
->
fb
.
screen_base
)
{
printk
(
KERN_ERR
"CLCD: unable to map framebuffer
\n
"
);
return
-
ENOMEM
;
...
...
@@ -788,3 +807,24 @@ void __init realview_timer_init(unsigned int timer_irq)
realview_clocksource_init
();
realview_clockevents_init
(
timer_irq
);
}
/*
* Setup the memory banks.
*/
void
realview_fixup
(
struct
machine_desc
*
mdesc
,
struct
tag
*
tags
,
char
**
from
,
struct
meminfo
*
meminfo
)
{
/*
* Most RealView platforms have 512MB contiguous RAM at 0x70000000.
* Half of this is mirrored at 0.
*/
#ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET
meminfo
->
bank
[
0
].
start
=
0x70000000
;
meminfo
->
bank
[
0
].
size
=
SZ_512M
;
meminfo
->
nr_banks
=
1
;
#else
meminfo
->
bank
[
0
].
start
=
0
;
meminfo
->
bank
[
0
].
size
=
SZ_256M
;
meminfo
->
nr_banks
=
1
;
#endif
}
arch/arm/mach-realview/core.h
View file @
65f69e5c
...
...
@@ -25,6 +25,7 @@
#include <linux/amba/bus.h>
#include <linux/io.h>
#include <asm/setup.h>
#include <asm/leds.h>
#define AMBA_DEVICE(name,busid,base,plat) \
...
...
@@ -44,6 +45,8 @@ static struct amba_device name##_device = { \
/* .dma = base##_DMA,*/
\
}
struct
machine_desc
;
extern
struct
platform_device
realview_flash_device
;
extern
struct
platform_device
realview_cf_device
;
extern
struct
platform_device
realview_i2c_device
;
...
...
@@ -61,5 +64,8 @@ extern void realview_timer_init(unsigned int timer_irq);
extern
int
realview_flash_register
(
struct
resource
*
res
,
u32
num
);
extern
int
realview_eth_register
(
const
char
*
name
,
struct
resource
*
res
);
extern
int
realview_usb_register
(
struct
resource
*
res
);
extern
void
realview_fixup
(
struct
machine_desc
*
mdesc
,
struct
tag
*
tags
,
char
**
from
,
struct
meminfo
*
meminfo
);
extern
void
(
*
realview_reset
)(
char
);
#endif
arch/arm/mach-realview/include/mach/memory.h
View file @
65f69e5c
...
...
@@ -29,4 +29,53 @@
#define PHYS_OFFSET UL(0x00000000)
#endif
#if !defined(__ASSEMBLY__) && defined(CONFIG_ZONE_DMA)
extern
void
realview_adjust_zones
(
int
node
,
unsigned
long
*
size
,
unsigned
long
*
hole
);
#define arch_adjust_zones(node, size, hole) \
realview_adjust_zones(node, size, hole)
#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_256M - 1)
#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_256M)
#endif
#ifdef CONFIG_SPARSEMEM
/*
* Sparsemem definitions for RealView PBX.
*
* The RealView PBX board has another block of 512MB of RAM at 0x20000000,
* however only the block at 0x70000000 (or the 256MB mirror at 0x00000000)
* may be used for DMA.
*
* The macros below define a section size of 256MB and a non-linear virtual to
* physical mapping:
*
* 256MB @ 0x00000000 -> PAGE_OFFSET
* 512MB @ 0x20000000 -> PAGE_OFFSET + 0x10000000
* 256MB @ 0x80000000 -> PAGE_OFFSET + 0x30000000
*/
#ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET
#error "SPARSEMEM not available with REALVIEW_HIGH_PHYS_OFFSET"
#endif
#define MAX_PHYSMEM_BITS 32
#define SECTION_SIZE_BITS 28
/* bank page offsets */
#define PAGE_OFFSET1 (PAGE_OFFSET + 0x10000000)
#define PAGE_OFFSET2 (PAGE_OFFSET + 0x30000000)
#define __phys_to_virt(phys) \
((phys) >= 0x80000000 ? (phys) - 0x80000000 + PAGE_OFFSET2 : \
(phys) >= 0x20000000 ? (phys) - 0x20000000 + PAGE_OFFSET1 : \
(phys) + PAGE_OFFSET)
#define __virt_to_phys(virt) \
((virt) >= PAGE_OFFSET2 ? (virt) - PAGE_OFFSET2 + 0x80000000 : \
(virt) >= PAGE_OFFSET1 ? (virt) - PAGE_OFFSET1 + 0x20000000 : \
(virt) - PAGE_OFFSET)
#endif
/* CONFIG_SPARSEMEM */
#endif
arch/arm/mach-realview/platsmp.c
View file @
65f69e5c
...
...
@@ -146,11 +146,8 @@ static void __init poke_milo(void)
* register. The BootMonitor waits for this register to become
* non-zero.
*/
#define REALVIEW_SYS_FLAGSS_OFFSET 0x30
#define REALVIEW_SYS_FLAGSC_OFFSET 0x34
__raw_writel
(
BSYM
(
virt_to_phys
(
realview_secondary_startup
)),
__io_address
(
REALVIEW_SYS_BASE
)
+
REALVIEW_SYS_FLAGSS_OFFSET
);
__io_address
(
REALVIEW_SYS_FLAGSSET
));
mb
();
}
...
...
arch/arm/mach-realview/realview_eb.c
View file @
65f69e5c
...
...
@@ -415,6 +415,7 @@ MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
.
phys_io
=
REALVIEW_EB_UART0_BASE
,
.
io_pg_offst
=
(
IO_ADDRESS
(
REALVIEW_EB_UART0_BASE
)
>>
18
)
&
0xfffc
,
.
boot_params
=
PHYS_OFFSET
+
0x00000100
,
.
fixup
=
realview_fixup
,
.
map_io
=
realview_eb_map_io
,
.
init_irq
=
gic_init_irq
,
.
timer
=
&
realview_eb_timer
,
...
...
arch/arm/mach-realview/realview_pb1176.c
View file @
65f69e5c
...
...
@@ -300,6 +300,18 @@ static void realview_pb1176_reset(char mode)
__raw_writel
(
REALVIEW_PB1176_SYS_LOCKVAL_RSTCTL
,
hdr_ctrl
);
}
static
void
realview_pb1176_fixup
(
struct
machine_desc
*
mdesc
,
struct
tag
*
tags
,
char
**
from
,
struct
meminfo
*
meminfo
)
{
/*
* RealView PB1176 only has 128MB of RAM mapped at 0.
*/
meminfo
->
bank
[
0
].
start
=
0
;
meminfo
->
bank
[
0
].
size
=
SZ_128M
;
meminfo
->
nr_banks
=
1
;
}
static
void
__init
realview_pb1176_init
(
void
)
{
int
i
;
...
...
@@ -331,6 +343,7 @@ MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
.
phys_io
=
REALVIEW_PB1176_UART0_BASE
,
.
io_pg_offst
=
(
IO_ADDRESS
(
REALVIEW_PB1176_UART0_BASE
)
>>
18
)
&
0xfffc
,
.
boot_params
=
PHYS_OFFSET
+
0x00000100
,
.
fixup
=
realview_pb1176_fixup
,
.
map_io
=
realview_pb1176_map_io
,
.
init_irq
=
gic_init_irq
,
.
timer
=
&
realview_pb1176_timer
,
...
...
arch/arm/mach-realview/realview_pb11mp.c
View file @
65f69e5c
...
...
@@ -347,6 +347,7 @@ MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
.
phys_io
=
REALVIEW_PB11MP_UART0_BASE
,
.
io_pg_offst
=
(
IO_ADDRESS
(
REALVIEW_PB11MP_UART0_BASE
)
>>
18
)
&
0xfffc
,
.
boot_params
=
PHYS_OFFSET
+
0x00000100
,
.
fixup
=
realview_fixup
,
.
map_io
=
realview_pb11mp_map_io
,
.
init_irq
=
gic_init_irq
,
.
timer
=
&
realview_pb11mp_timer
,
...
...
arch/arm/mach-realview/realview_pba8.c
View file @
65f69e5c
...
...
@@ -298,6 +298,7 @@ MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8")
.
phys_io
=
REALVIEW_PBA8_UART0_BASE
,
.
io_pg_offst
=
(
IO_ADDRESS
(
REALVIEW_PBA8_UART0_BASE
)
>>
18
)
&
0xfffc
,
.
boot_params
=
PHYS_OFFSET
+
0x00000100
,
.
fixup
=
realview_fixup
,
.
map_io
=
realview_pba8_map_io
,
.
init_irq
=
gic_init_irq
,
.
timer
=
&
realview_pba8_timer
,
...
...
arch/arm/mach-realview/realview_pbx.c
View file @
65f69e5c
...
...
@@ -304,6 +304,26 @@ static struct sys_timer realview_pbx_timer = {
.
init
=
realview_pbx_timer_init
,
};
static
void
realview_pbx_fixup
(
struct
machine_desc
*
mdesc
,
struct
tag
*
tags
,
char
**
from
,
struct
meminfo
*
meminfo
)
{
#ifdef CONFIG_SPARSEMEM
/*
* Memory configuration with SPARSEMEM enabled on RealView PBX (see
* asm/mach/memory.h for more information).
*/
meminfo
->
bank
[
0
].
start
=
0
;
meminfo
->
bank
[
0
].
size
=
SZ_256M
;
meminfo
->
bank
[
1
].
start
=
0x20000000
;
meminfo
->
bank
[
1
].
size
=
SZ_512M
;
meminfo
->
bank
[
2
].
start
=
0x80000000
;
meminfo
->
bank
[
2
].
size
=
SZ_256M
;
meminfo
->
nr_banks
=
3
;
#else
realview_fixup
(
mdesc
,
tags
,
from
,
meminfo
);
#endif
}
static
void
__init
realview_pbx_init
(
void
)
{
int
i
;
...
...
@@ -345,6 +365,7 @@ MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")
.
phys_io
=
REALVIEW_PBX_UART0_BASE
,
.
io_pg_offst
=
(
IO_ADDRESS
(
REALVIEW_PBX_UART0_BASE
)
>>
18
)
&
0xfffc
,
.
boot_params
=
PHYS_OFFSET
+
0x00000100
,
.
fixup
=
realview_pbx_fixup
,
.
map_io
=
realview_pbx_map_io
,
.
init_irq
=
gic_init_irq
,
.
timer
=
&
realview_pbx_timer
,
...
...
arch/arm/mm/proc-v7.S
View file @
65f69e5c
...
...
@@ -186,9 +186,10 @@ cpu_v7_name:
*/
__v7_setup
:
#ifdef CONFIG_SMP
mrc
p15
,
0
,
r0
,
c1
,
c0
,
1
@
Enable
SMP
/
nAMP
mode
and
orr
r0
,
r0
,
#(
1
<<
6
)
|
(
1
<<
0
)
@
TLB
ops
broadcasting
mcr
p15
,
0
,
r0
,
c1
,
c0
,
1
mrc
p15
,
0
,
r0
,
c1
,
c0
,
1
tst
r0
,
#(
1
<<
6
)
@
SMP
/
nAMP
mode
enabled
?
orreq
r0
,
r0
,
#(
1
<<
6
)
|
(
1
<<
0
)
@
Enable
SMP
/
nAMP
mode
and
mcreq
p15
,
0
,
r0
,
c1
,
c0
,
1
@
TLB
ops
broadcasting
#endif
adr
r12
,
__v7_setup_stack
@
the
local
stack
stmia
r12
,
{
r0
-
r5
,
r7
,
r9
,
r11
,
lr
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment