Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform-boundary-uboot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reform
reform-boundary-uboot
Commits
8d4addc3
Commit
8d4addc3
authored
14 years ago
by
Wolfgang Denk
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
git://git.denx.de/u-boot-mpc83xx
parents
367c6651
26e5f794
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
arch/powerpc/cpu/mpc83xx/pcie.c
+18
-1
18 additions, 1 deletion
arch/powerpc/cpu/mpc83xx/pcie.c
arch/powerpc/cpu/mpc83xx/speed.c
+8
-7
8 additions, 7 deletions
arch/powerpc/cpu/mpc83xx/speed.c
include/mpc83xx.h
+7
-0
7 additions, 0 deletions
include/mpc83xx.h
include/pci.h
+2
-0
2 additions, 0 deletions
include/pci.h
with
35 additions
and
8 deletions
arch/powerpc/cpu/mpc83xx/pcie.c
+
18
−
1
View file @
8d4addc3
...
...
@@ -48,11 +48,26 @@ static struct {
#ifdef CONFIG_83XX_GENERIC_PCIE_REGISTER_HOSES
/* private structure for mpc83xx pcie hose */
static
struct
mpc83xx_pcie_priv
{
u8
index
;
}
pcie_priv
[
PCIE_MAX_BUSES
]
=
{
{
/* pcie controller 1 */
.
index
=
0
,
},
{
/* pcie controller 2 */
.
index
=
1
,
},
};
static
int
mpc83xx_pcie_remap_cfg
(
struct
pci_controller
*
hose
,
pci_dev_t
dev
)
{
int
bus
=
PCI_BUS
(
dev
)
-
hose
->
first_busno
;
immap_t
*
immr
=
(
immap_t
*
)
CONFIG_SYS_IMMR
;
pex83xx_t
*
pex
=
&
immr
->
pciexp
[
bus
];
struct
mpc83xx_pcie_priv
*
pcie_priv
=
hose
->
priv_data
;
pex83xx_t
*
pex
=
&
immr
->
pciexp
[
pcie_priv
->
index
];
struct
pex_outbound_window
*
out_win
=
&
pex
->
bridge
.
pex_outbound_win
[
0
];
u8
devfn
=
PCI_DEV
(
dev
)
<<
3
|
PCI_FUNC
(
dev
);
u32
dev_base
=
bus
<<
24
|
devfn
<<
16
;
...
...
@@ -142,6 +157,8 @@ static void mpc83xx_pcie_register_hose(int bus, struct pci_region *reg,
hose
->
cfg_addr
=
(
unsigned
int
*
)
mpc83xx_pcie_cfg_space
[
bus
].
base
;
hose
->
priv_data
=
&
pcie_priv
[
bus
];
pci_set_ops
(
hose
,
pcie_read_config_byte
,
pcie_read_config_word
,
...
...
This diff is collapsed.
Click to expand it.
arch/powerpc/cpu/mpc83xx/speed.c
+
8
−
7
View file @
8d4addc3
...
...
@@ -161,7 +161,7 @@ int get_clocks(void)
#endif
}
spmf
=
(
(
im
->
reset
.
rcwl
&
HRCWL
_SPMF
)
>>
HRCWL
_SPMF_SHIFT
)
;
spmf
=
(
im
->
clk
.
spmr
&
SPMR
_SPMF
)
>>
SPMR
_SPMF_SHIFT
;
csb_clk
=
pci_sync_in
*
(
1
+
clkin_div
)
*
spmf
;
sccr
=
im
->
clk
.
sccr
;
...
...
@@ -392,7 +392,7 @@ int get_clocks(void)
#endif
lbiu_clk
=
csb_clk
*
(
1
+
((
im
->
reset
.
rcwl
&
HRCWL
_LBIUCM
)
>>
HRCWL
_LBIUCM_SHIFT
));
(
1
+
((
im
->
clk
.
spmr
&
SPMR
_LBIUCM
)
>>
SPMR
_LBIUCM_SHIFT
));
lcrr
=
(
im
->
im_lbc
.
lcrr
&
LCRR_CLKDIV
)
>>
LCRR_CLKDIV_SHIFT
;
switch
(
lcrr
)
{
case
2
:
...
...
@@ -406,11 +406,12 @@ int get_clocks(void)
}
mem_clk
=
csb_clk
*
(
1
+
((
im
->
reset
.
rcwl
&
HRCWL_DDRCM
)
>>
HRCWL_DDRCM_SHIFT
));
corepll
=
(
im
->
reset
.
rcwl
&
HRCWL_COREPLL
)
>>
HRCWL_COREPLL_SHIFT
;
(
1
+
((
im
->
clk
.
spmr
&
SPMR_DDRCM
)
>>
SPMR_DDRCM_SHIFT
));
corepll
=
(
im
->
clk
.
spmr
&
SPMR_COREPLL
)
>>
SPMR_COREPLL_SHIFT
;
#if defined(CONFIG_MPC8360)
mem_sec_clk
=
csb_clk
*
(
1
+
((
im
->
reset
.
rcwl
&
HRCWL
_LBIUCM
)
>>
HRCWL
_LBIUCM_SHIFT
));
((
im
->
clk
.
spmr
&
SPMR
_LBIUCM
)
>>
SPMR
_LBIUCM_SHIFT
));
#endif
corecnf_tab_index
=
((
corepll
&
0x1F
)
<<
2
)
|
((
corepll
&
0x60
)
>>
5
);
...
...
@@ -442,8 +443,8 @@ int get_clocks(void)
}
#if defined(CONFIG_MPC8360) || defined(CONFIG_MPC832x)
qepmf
=
(
im
->
reset
.
rcwl
&
HRCWL
_CEPMF
)
>>
HRCWL
_CEPMF_SHIFT
;
qepdf
=
(
im
->
reset
.
rcwl
&
HRCWL
_CEPDF
)
>>
HRCWL
_CEPDF_SHIFT
;
qepmf
=
(
im
->
clk
.
spmr
&
SPMR
_CEPMF
)
>>
SPMR
_CEPMF_SHIFT
;
qepdf
=
(
im
->
clk
.
spmr
&
SPMR
_CEPDF
)
>>
SPMR
_CEPDF_SHIFT
;
qe_clk
=
(
pci_sync_in
*
qepmf
)
/
(
1
+
qepdf
);
brg_clk
=
qe_clk
/
2
;
#endif
...
...
This diff is collapsed.
Click to expand it.
include/mpc83xx.h
+
7
−
0
View file @
8d4addc3
...
...
@@ -694,14 +694,21 @@
/* SPMR - System PLL Mode Register
*/
#define SPMR_LBIUCM 0x80000000
#define SPMR_LBIUCM_SHIFT 31
#define SPMR_DDRCM 0x40000000
#define SPMR_DDRCM_SHIFT 30
#define SPMR_SPMF 0x0F000000
#define SPMR_SPMF_SHIFT 24
#define SPMR_CKID 0x00800000
#define SPMR_CKID_SHIFT 23
#define SPMR_COREPLL 0x007F0000
#define SPMR_COREPLL_SHIFT 16
#define SPMR_CEVCOD 0x000000C0
#define SPMR_CEVCOD_SHIFT 6
#define SPMR_CEPDF 0x00000020
#define SPMR_CEPDF_SHIFT 5
#define SPMR_CEPMF 0x0000001F
#define SPMR_CEPMF_SHIFT 0
/* OCCR - Output Clock Control Register
*/
...
...
This diff is collapsed.
Click to expand it.
include/pci.h
+
2
−
0
View file @
8d4addc3
...
...
@@ -420,6 +420,8 @@ struct pci_controller {
/* Used by ppc405 autoconfig*/
struct
pci_region
*
pci_fb
;
int
current_busno
;
void
*
priv_data
;
};
extern
__inline__
void
pci_set_ops
(
struct
pci_controller
*
hose
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment