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
38718425
Commit
38718425
authored
21 years ago
by
Stefan Roese
Browse files
Options
Downloads
Patches
Plain Diff
Code cleanup.
parent
b6d9e4f5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
board/esd/pci405/cmd_pci405.c
+2
-121
2 additions, 121 deletions
board/esd/pci405/cmd_pci405.c
include/configs/PCI405.h
+1
-5
1 addition, 5 deletions
include/configs/PCI405.h
with
3 additions
and
126 deletions
board/esd/pci405/cmd_pci405.c
+
2
−
121
View file @
38718425
...
...
@@ -36,66 +36,7 @@
extern
int
do_bootm
(
cmd_tbl_t
*
,
int
,
int
,
char
*
[]);
#if 0 /* test-only */
#include "../common/fpga.c"
void error_print(void)
{
int i;
volatile unsigned char *ptr;
volatile unsigned long *ptr2;
printf("\n 2nd SJA1000:\n");
ptr = 0xf0000100;
for (i=0; i<0x20; i++) {
printf("%02x ", *ptr++);
}
ptr2 = 0xf0400008;
printf("\nTimestamp = %x\n", *ptr2);
udelay(1000);
printf("Timestamp = %x\n", *ptr2);
udelay(1000);
printf("Timestamp = %x\n", *ptr2);
#if 0 /* test-only */
/*
* Reset FPGA via FPGA_DATA pin
*/
printf("Resetting FPGA...\n");
SET_FPGA(FPGA_PRG | FPGA_CLK);
udelay(1000); /* wait 1ms */
SET_FPGA(FPGA_PRG | FPGA_CLK | FPGA_DATA);
udelay(1000); /* wait 1ms */
do_loadpci(NULL, 0,0, NULL);
#endif
}
void read_loop(void)
{
int i;
volatile unsigned char *ptr;
volatile unsigned char val;
volatile unsigned long *ptr2;
printf("\nread loop on 1st sja1000...");
while (1) {
ptr = 0xf0000000;
/* printf("\n1st SJA1000:\n");*/
for (i=0; i<0x20; i++) {
i = i;
val = *ptr++;
/* printf("%02x ", val);*/
}
/* Abort if ctrl-c was pressed */
if (ctrlc()) {
puts("\nAbort\n");
return 0;
}
}
}
#endif
/*
* Command loadpci: wait for signal from host and boot image.
*/
...
...
@@ -110,66 +51,6 @@ int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
char
str
[]
=
"
\\
|/-"
;
char
*
local_args
[
2
];
#if 0 /* test-only */
puts("\nStarting sja1000 test...");
{
int count;
volatile unsigned char *ptr;
volatile unsigned char val;
volatile unsigned char val2;
#if 1 /* write test */
ptr = 0xf0000014;
for (i=1; i<11; i++)
*ptr++ = i;
#endif
count = 0;
while (1) {
count++;
#if 0 /* write test */
ptr = 0xf0000014;
for (i=1; i<11; i++)
*ptr++ = i;
#endif
#if 1 /* read test */
ptr = 0xf0000014;
for (i=1; i<11; i++) {
val = *ptr++;
#if 1
if (val != i) {
ptr = 0xf0000100;
val = *ptr; /* trigger las */
ptr = 0xf0000014;
val2 = *ptr;
printf("\nERROR: count=%d: soll=%x ist=%x -> staring read loop on 1st sja1000...\n", count, i, val);
printf("soll=%x ist=%x -> staring read loop on 1st sja1000...\n", 1, val2);
return 0; /* test-only */
udelay(1000);
error_print();
read_loop();
return 0;
}
#endif
}
#endif
/* Abort if ctrl-c was pressed */
if (ctrlc()) {
puts("\nAbort\n");
return 0;
}
if (!(count % 100000)) {
printf(".");
}
}
}
#endif
/*
* Mark sync address
*/
...
...
@@ -212,13 +93,13 @@ int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
printf
(
"
\n
Storing PCI Configuration Regs...
\n
"
);
}
else
{
sprintf
(
addr
,
"%08x"
,
*
ptr
);
/*
* Boot image
*/
printf
(
"
\n
Booting image at addr 0x%s ...
\n
"
,
addr
);
setenv
(
"loadaddr"
,
addr
);
local_args
[
0
]
=
argv
[
0
];
local_args
[
1
]
=
NULL
;
status
=
do_bootm
(
cmdtp
,
0
,
1
,
local_args
);
...
...
This diff is collapsed.
Click to expand it.
include/configs/PCI405.h
+
1
−
5
View file @
38718425
...
...
@@ -40,11 +40,7 @@
#define CONFIG_BOARD_PRE_INIT 1
/* call board_pre_init() */
#define CONFIG_MISC_INIT_R 1
/* call misc_init_r() on init */
#if 1
/* test-only */
#define CONFIG_SYS_CLK_FREQ 25000000
/* external frequency to pll */
#else
#define CONFIG_SYS_CLK_FREQ 16000000
/* external frequency to pll */
#endif
#define CONFIG_BAUDRATE 115200
#define CONFIG_BOOTDELAY 3
/* autoboot after 3 seconds */
...
...
@@ -92,7 +88,7 @@
#define CONFIG_SDRAM_BANK0 1
/* init onboard SDRAM bank 0 */
#define CONFIG_PRAM 2048
/* reserve 2 MB "protected RAM" */
#define CONFIG_PRAM 2048
/* reserve 2 MB "protected RAM" */
/*
* Miscellaneous configurable options
...
...
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