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
Jack Humbert
reform-boundary-uboot
Commits
80e955c7
Commit
80e955c7
authored
18 years ago
by
Jon Loeliger
Browse files
Options
Downloads
Patches
Plain Diff
General indent and whitespace cleanups.
parent
ffff3ae5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
board/mpc8641hpcn/mpc8641hpcn.c
+35
-34
35 additions, 34 deletions
board/mpc8641hpcn/mpc8641hpcn.c
board/mpc8641hpcn/pixis.c
+9
-12
9 additions, 12 deletions
board/mpc8641hpcn/pixis.c
board/mpc8641hpcn/sys_eeprom.c
+126
-114
126 additions, 114 deletions
board/mpc8641hpcn/sys_eeprom.c
with
170 additions
and
160 deletions
board/mpc8641hpcn/mpc8641hpcn.c
+
35
−
34
View file @
80e955c7
...
...
@@ -122,7 +122,8 @@ initdram(int board_type)
#if defined(CFG_DRAM_TEST)
int
testdram
(
void
)
int
testdram
(
void
)
{
uint
*
pstart
=
(
uint
*
)
CFG_MEMTEST_START
;
uint
*
pend
=
(
uint
*
)
CFG_MEMTEST_END
;
...
...
@@ -160,7 +161,8 @@ int testdram(void)
/*
* Fixed sdram init -- doesn't use serial presence detect.
*/
long
int
fixed_sdram
(
void
)
long
int
fixed_sdram
(
void
)
{
#if !defined(CFG_RAMBOOT)
volatile
immap_t
*
immap
=
(
immap_t
*
)
CFG_IMMR
;
...
...
@@ -215,8 +217,7 @@ static struct pci_config_table pci_fsl86xxads_config_table[] = {
PCI_IDSEL_NUMBER
,
PCI_ANY_ID
,
pci_cfgfunc_config_device
,
{
PCI_ENET0_IOADDR
,
PCI_ENET0_MEMADDR
,
PCI_COMMAND_MEMORY
|
PCI_COMMAND_MASTER
}
},
PCI_COMMAND_MEMORY
|
PCI_COMMAND_MASTER
}},
{}
};
#endif
...
...
@@ -230,9 +231,7 @@ static struct pci_controller hose = {
#endif
/* CONFIG_PCI */
void
pci_init_board
(
void
)
void
pci_init_board
(
void
)
{
#ifdef CONFIG_PCI
extern
void
pci_mpc86xx_init
(
struct
pci_controller
*
hose
);
...
...
@@ -305,7 +304,8 @@ mpc8641_reset_board(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
corepll
=
strfractoint
(
argv
[
4
]);
val
=
val
+
set_px_corepll
(
corepll
);
val
=
val
+
set_px_mpxpll
(
simple_strtoul
(
argv
[
5
],
NULL
,
10
));
val
=
val
+
set_px_mpxpll
(
simple_strtoul
(
argv
[
5
],
NULL
,
10
));
if
(
val
==
3
)
{
puts
(
"Setting registers VCFGEN0, VCFGEN1, VBOOT, and VCTL
\n
"
);
set_altbank
();
...
...
@@ -360,12 +360,14 @@ my_usage:
puts
(
"See MPC8641HPCN Design Workbook for valid values of command line parameters.
\n
"
);
}
/*
* get_board_sys_clk
* Reads the FPGA on board for CONFIG_SYS_CLK_FREQ
*/
unsigned
long
get_board_sys_clk
(
ulong
dummy
)
unsigned
long
get_board_sys_clk
(
ulong
dummy
)
{
u8
i
,
go_bit
,
rd_clks
;
ulong
val
=
0
;
...
...
@@ -422,4 +424,3 @@ unsigned long get_board_sys_clk(ulong dummy)
return
val
;
}
This diff is collapsed.
Click to expand it.
board/mpc8641hpcn/pixis.c
+
9
−
12
View file @
80e955c7
...
...
@@ -251,13 +251,10 @@ int disable_watchdog(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return
0
;
}
U_BOOT_CMD
(
diswd
,
1
,
0
,
disable_watchdog
,
"diswd - Disable watchdog timer
\n
"
,
NULL
);
NULL
);
/*
* This function takes the non-integral cpu:mpx pll ratio
...
...
This diff is collapsed.
Click to expand it.
board/mpc8641hpcn/sys_eeprom.c
+
126
−
114
View file @
80e955c7
...
...
@@ -48,29 +48,33 @@ int mac_show(void)
int
i
;
unsigned
char
ethaddr
[
8
][
18
];
printf
(
"ID %c%c%c%c
\n
"
,
mac_data
.
id
[
0
],
\
mac_data
.
id
[
1
],
\
mac_data
.
id
[
2
],
\
printf
(
"ID %c%c%c%c
\n
"
,
mac_data
.
id
[
0
],
mac_data
.
id
[
1
],
mac_data
.
id
[
2
],
mac_data
.
id
[
3
]);
printf
(
"Errata %c%c%c%c%c
\n
"
,
mac_data
.
errata
[
0
],
\
mac_data
.
errata
[
1
],
\
mac_data
.
errata
[
2
],
\
mac_data
.
errata
[
3
],
\
printf
(
"Errata %c%c%c%c%c
\n
"
,
mac_data
.
errata
[
0
],
mac_data
.
errata
[
1
],
mac_data
.
errata
[
2
],
mac_data
.
errata
[
3
],
mac_data
.
errata
[
4
]);
printf
(
"Date %c%c%c%c%c%c%c
\n
"
,
mac_data
.
date
[
0
],
\
mac_data
.
date
[
1
],
\
mac_data
.
date
[
2
],
\
mac_data
.
date
[
3
],
\
mac_data
.
date
[
4
],
\
mac_data
.
date
[
5
],
\
printf
(
"Date %c%c%c%c%c%c%c
\n
"
,
mac_data
.
date
[
0
],
mac_data
.
date
[
1
],
mac_data
.
date
[
2
],
mac_data
.
date
[
3
],
mac_data
.
date
[
4
],
mac_data
.
date
[
5
],
mac_data
.
date
[
6
]);
for
(
i
=
0
;
i
<
8
;
i
++
)
{
sprintf
(
ethaddr
[
i
],
"%02x:%02x:%02x:%02x:%02x:%02x"
,
\
mac_data
.
mac
[
i
][
0
],
\
mac_data
.
mac
[
i
][
1
],
\
mac_data
.
mac
[
i
][
2
],
\
mac_data
.
mac
[
i
][
3
],
\
mac_data
.
mac
[
i
][
4
],
\
sprintf
(
ethaddr
[
i
],
"%02x:%02x:%02x:%02x:%02x:%02x"
,
mac_data
.
mac
[
i
][
0
],
mac_data
.
mac
[
i
][
1
],
mac_data
.
mac
[
i
][
2
],
mac_data
.
mac
[
i
][
3
],
mac_data
.
mac
[
i
][
4
],
mac_data
.
mac
[
i
][
5
]);
printf
(
"MAC %d %s
\n
"
,
i
,
ethaddr
[
i
]);
}
...
...
@@ -100,10 +104,10 @@ int mac_read(void)
printf
(
"Check CRC on reading ..."
);
crc
=
crc32
(
crc
,
data
,
length
-
4
);
if
(
crc
!=
mac_data
.
crc
)
{
printf
(
"CRC checksum is invalid, in EEPROM CRC is %x, calculated CRC is %x
\n
"
,
mac_data
.
crc
,
crc
);
printf
(
"CRC checksum is invalid, in EEPROM CRC is %x, calculated CRC is %x
\n
"
,
mac_data
.
crc
,
crc
);
return
-
1
;
}
else
{
}
else
{
printf
(
"CRC OK
\n
"
);
mac_show
();
}
...
...
@@ -125,7 +129,9 @@ int mac_prog(void)
crc
=
crc32
(
crc
,
eeprom_data
,
length
-
4
);
mac_data
.
crc
=
crc
;
for
(
i
=
0
,
ptr
=
eeprom_data
;
i
<
length
;
i
+=
8
,
ptr
+=
8
)
{
ret
=
i2c_write
(
dev
,
i
,
1
,
ptr
,
(
length
-
i
)
<
8
?
(
length
-
i
)
:
8
);
ret
=
i2c_write
(
dev
,
i
,
1
,
ptr
,
(
length
-
i
)
<
8
?
(
length
-
i
)
:
8
);
udelay
(
5000
);
/* 5ms write cycle timing */
if
(
ret
)
break
;
...
...
@@ -133,8 +139,7 @@ int mac_prog(void)
if
(
ret
)
{
printf
(
"Programming failed.
\n
"
);
return
-
1
;
}
else
{
}
else
{
printf
(
"Programming %d bytes. Reading back ...
\n
"
,
length
);
mac_read
();
}
...
...
@@ -180,7 +185,8 @@ int do_mac (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
break
;
case
'p'
:
/* number of ports */
mac_data
.
tab_size
=
(
unsigned
char
)
simple_strtoul
(
argv
[
2
],
NULL
,
16
);
mac_data
.
tab_size
=
(
unsigned
char
)
simple_strtoul
(
argv
[
2
],
NULL
,
16
);
break
;
case
'0'
:
/* mac 0 */
case
'1'
:
/* mac 1 */
...
...
@@ -192,7 +198,9 @@ int do_mac (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
case
'7'
:
/* mac 7 */
mac_val
=
simple_strtoull
(
argv
[
2
],
NULL
,
16
);
for
(
i
=
0
;
i
<
6
;
i
++
)
{
mac_data
.
mac
[
cmd
-
'0'
][
i
]
=
*
((
unsigned
char
*
)(((
unsigned
int
)(
&
mac_val
))
+
i
+
2
));
mac_data
.
mac
[
cmd
-
'0'
][
i
]
=
*
((
unsigned
char
*
)
(((
unsigned
int
)(
&
mac_val
))
+
i
+
2
));
}
break
;
case
'h'
:
/* help */
...
...
@@ -200,8 +208,7 @@ int do_mac (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
printf
(
"Usage:
\n
%s
\n
"
,
cmdtp
->
usage
);
break
;
}
}
else
{
}
else
{
mac_show
();
}
return
0
;
...
...
@@ -210,7 +217,10 @@ int do_mac (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
int
mac_read_from_eeprom
(
void
)
{
int
length
,
i
;
unsigned
char
dev
=
ID_EEPROM_ADDR
,
*
data
,
ethaddr
[
4
][
18
],
enetvar
[
32
];
unsigned
char
dev
=
ID_EEPROM_ADDR
;
unsigned
char
*
data
;
unsigned
char
ethaddr
[
4
][
18
];
unsigned
char
enetvar
[
32
];
unsigned
int
crc
=
0
;
length
=
sizeof
(
EEPROM_data
);
...
...
@@ -223,18 +233,20 @@ int mac_read_from_eeprom(void)
crc
=
crc32
(
crc
,
data
,
length
-
4
);
if
(
crc
!=
mac_data
.
crc
)
{
return
-
1
;
}
else
{
}
else
{
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
memcmp
(
&
mac_data
.
mac
[
i
],
"
\0\0\0\0\0\0
"
,
6
))
{
sprintf
(
ethaddr
[
i
],
"%02x:%02x:%02x:%02x:%02x:%02x"
,
\
mac_data
.
mac
[
i
][
0
],
\
mac_data
.
mac
[
i
][
1
],
\
mac_data
.
mac
[
i
][
2
],
\
mac_data
.
mac
[
i
][
3
],
\
mac_data
.
mac
[
i
][
4
],
\
sprintf
(
ethaddr
[
i
],
"%02x:%02x:%02x:%02x:%02x:%02x"
,
mac_data
.
mac
[
i
][
0
],
mac_data
.
mac
[
i
][
1
],
mac_data
.
mac
[
i
][
2
],
mac_data
.
mac
[
i
][
3
],
mac_data
.
mac
[
i
][
4
],
mac_data
.
mac
[
i
][
5
]);
sprintf
(
enetvar
,
i
?
"eth%daddr"
:
"ethaddr"
,
i
);
sprintf
(
enetvar
,
i
?
"eth%daddr"
:
"ethaddr"
,
i
);
setenv
(
enetvar
,
ethaddr
[
i
]);
}
}
...
...
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