Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
f5a61e07
Commit
f5a61e07
authored
Mar 28, 2003
by
Benjamin Herrenschmidt
Committed by
Paul Mackerras
Mar 28, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PPC32: Add function for choosing which PLL to use on 750FX cpus.
parent
8a1da912
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
99 additions
and
16 deletions
+99
-16
arch/ppc/kernel/misc.S
arch/ppc/kernel/misc.S
+99
-16
No files found.
arch/ppc/kernel/misc.S
View file @
f5a61e07
...
...
@@ -201,6 +201,60 @@ _GLOBAL(call_setup_cpu)
mr
r4
,
r24
bctr
#ifdef CONFIG_CPU_FREQ_PMAC
/*
This
gets
called
by
via
-
pmu
.
c
to
switch
the
PLL
selection
*
on
750
fx
CPU
.
This
function
should
really
be
moved
to
some
*
other
place
(
as
most
of
the
cpufreq
code
in
via
-
pmu
*/
_GLOBAL
(
low_choose_750fx_pll
)
/
*
Clear
MSR
:
EE
*/
mfmsr
r7
rlwinm
r0
,
r7
,
0
,
17
,
15
mtmsr
r0
/
*
If
switching
to
PLL1
,
disable
HID0
:
BTIC
*/
cmpli
cr0
,
r3
,
0
beq
1
f
mfspr
r5
,
HID0
rlwinm
r5
,
r5
,
0
,
27
,
25
sync
mtspr
HID0
,
r5
isync
sync
1
:
/
*
Calc
new
HID1
value
*/
mfspr
r4
,
SPRN_HID1
/*
Build
a
HID1
:
PS
bit
from
parameter
*/
rlwinm
r5
,
r3
,
16
,
15
,
15
/*
Clear
out
HID1
:
PS
from
value
read
*/
rlwinm
r4
,
r4
,
0
,
16
,
14
/*
Could
have
I
used
rlwimi
here
?
*/
or
r4
,
r4
,
r5
mtspr
SPRN_HID1
,
r4
/
*
Store
new
HID1
image
*/
rlwinm
r6
,
r1
,
0
,
0
,
18
lwz
r6
,
TI_CPU
(
r6
)
slwi
r6
,
r6
,
2
addis
r6
,
r6
,
nap_save_hid1
@
ha
stw
r4
,
nap_save_hid1
@
l
(
r6
)
/
*
If
switching
to
PLL0
,
enable
HID0
:
BTIC
*/
cmpli
cr0
,
r3
,
0
bne
1
f
mfspr
r5
,
HID0
ori
r5
,
r5
,
HID0_BTIC
sync
mtspr
HID0
,
r5
isync
sync
1
:
/
*
Return
*/
mtmsr
r7
blr
#endif /* CONFIG_CPU_FREQ_PMAC */
/*
void
local_save_flags_ptr
(
unsigned
long
*
flags
)
*/
_GLOBAL
(
local_save_flags_ptr
)
mfmsr
r4
...
...
@@ -351,7 +405,16 @@ _GLOBAL(_tlbia)
sync
/*
Flush
to
memory
before
changing
mapping
*/
tlbia
isync
/*
Flush
shadow
TLB
*/
#else /* ! defined(CONFIG_40x) */
#elif defined(CONFIG_440)
lis
r3
,
0
sync
1
:
tlbwe
r3
,
r3
,
PPC440_TLB_PAGEID
addi
r3
,
r3
,
1
cmpwi
0
,
r3
,
61
ble
1
b
isync
#else /* !(CONFIG_40x || CONFIG_440) */
#if defined(CONFIG_SMP)
rlwinm
r8
,
r1
,
0
,
0
,
18
lwz
r8
,
TI_CPU
(
r8
)
...
...
@@ -392,7 +455,7 @@ _GLOBAL(_tlbia)
*
Flush
MMU
TLB
for
a
particular
address
*/
_GLOBAL
(
_tlbie
)
#if
def CONFIG_40x
#if
defined(CONFIG_40x)
tlbsx
.
r3
,
0
,
r3
bne
10
f
sync
...
...
@@ -402,7 +465,31 @@ _GLOBAL(_tlbie)
tlbwe
r3
,
r3
,
TLB_TAG
isync
10
:
#else /* ! CONFIG_40x */
#elif defined(CONFIG_440)
mfspr
r4
,
SPRN_MMUCR
/*
Get
MMUCR
*/
lis
r5
,
PPC440_MMUCR_STS
@
h
ori
r5
,
r5
,
PPC440_MMUCR_TID
@
l
/*
Create
mask
*/
andc
r4
,
r4
,
r5
/*
Clear
out
TID
/
STS
bits
*/
mfspr
r5
,
SPRN_PID
/*
Get
PID
*/
or
r4
,
r4
,
r5
/*
Set
TID
bits
*/
mfmsr
r6
/*
Get
MSR
*/
andi
.
r6
,
r6
,
MSR_IS
@
l
/*
TS
=
1
?
*/
beq
11
f
/*
If
not
,
leave
STS
=
0
*/
oris
r4
,
r4
,
PPC440_MMUCR_STS
@
h
/*
Set
STS
=
1
*/
11
:
mtspr
SPRN_MMUCR
,
r4
/*
Put
MMUCR
*/
tlbsx
.
r3
,
0
,
r3
bne
10
f
sync
/
*
There
are
only
64
TLB
entries
,
so
r3
<
64
,
*
which
means
bit
22
,
is
clear
.
Since
22
is
*
the
V
bit
in
the
TLB_PAGEID
,
loading
this
*
value
will
invalidate
the
TLB
entry
.
*/
tlbwe
r3
,
r3
,
PPC440_TLB_PAGEID
isync
10
:
#else /* !(CONFIG_40x || CONFIG_440) */
#if defined(CONFIG_SMP)
rlwinm
r8
,
r1
,
0
,
0
,
18
lwz
r8
,
TI_CPU
(
r8
)
...
...
@@ -569,22 +656,18 @@ _GLOBAL(invalidate_dcache_range)
blr
#ifdef CONFIG_NOT_COHERENT_CACHE
/*
This
is
a
bad
one
....
It
is
used
by
'consistent_sync'
functions
when
*
there
isn
't any handle on the virtual address needed by the usual
*
cache
flush
instructions
.
On
the
MPC8xx
,
we
can
use
the
cache
line
*
flush
command
,
on
others
all
we
can
do
is
read
enough
data
to
completely
*
reload
the
cache
,
flushing
old
data
out
.
*/
/*
Cache
organization
.
The
4
xx
has
a
8
K
(
128
line
)
cache
,
and
the
8
xx
*
has
1
,
2
,
4
,
8
K
variants
.
For
now
,
cover
worst
case
.
When
we
can
*
deteremine
actual
size
,
we
will
use
that
later
.
/*
*
40
x
cores
have
8
K
or
16
K
dcache
and
32
byte
line
size
.
*
440
has
a
32
K
dcache
and
32
byte
line
size
.
*
8
xx
has
1
,
2
,
4
,
8
K
variants
.
*
For
now
,
cover
the
worst
case
of
the
440
.
*
Must
be
called
with
external
interrupts
disabled
.
*/
#define CACHE_NWAYS
2
#define CACHE_NLINES 1
28
#define CACHE_NWAYS
64
#define CACHE_NLINES 1
6
_GLOBAL
(
flush_dcache_all
)
li
r4
,
(
CACHE_NWAYS
*
CACHE_NLINES
)
li
r4
,
(
2
*
CACHE_NWAYS
*
CACHE_NLINES
)
mtctr
r4
lis
r5
,
KERNELBASE
@
h
1
:
lwz
r3
,
0
(
r5
)
/*
Load
one
word
from
every
line
*/
...
...
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