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
b8c5b472
Commit
b8c5b472
authored
9 years ago
by
Tom Rini
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
git://git.denx.de/u-boot-socfpga
parents
447b9cdf
217db227
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
arch/arm/mach-socfpga/qts-filter.sh
+45
-31
45 additions, 31 deletions
arch/arm/mach-socfpga/qts-filter.sh
drivers/ddr/altera/sdram.c
+1
-0
1 addition, 0 deletions
drivers/ddr/altera/sdram.c
drivers/fpga/socfpga.c
+1
-1
1 addition, 1 deletion
drivers/fpga/socfpga.c
with
47 additions
and
32 deletions
arch/arm/mach-socfpga/qts-filter.sh
+
45
−
31
View file @
b8c5b472
...
@@ -3,13 +3,15 @@
...
@@ -3,13 +3,15 @@
#
#
# Process iocsr_config_*.[ch]
# Process iocsr_config_*.[ch]
# $1: SoC type
# $1: SoC type
# $2: Input directory
# $2: Input handoff directory
# $3: Output directory
# $3: Input BSP Generated directory
# $4: Output directory
#
#
process_iocsr_config
()
{
process_iocsr_config
()
{
soc
=
"
$1
"
soc
=
"
$1
"
in_dir
=
"
$2
"
in_qts_dir
=
"
$2
"
out_dir
=
"
$3
"
in_bsp_dir
=
"
$3
"
out_dir
=
"
$4
"
(
(
cat
<<
EOF
cat
<<
EOF
...
@@ -26,13 +28,13 @@ EOF
...
@@ -26,13 +28,13 @@ EOF
# Retrieve the scan chain lengths
# Retrieve the scan chain lengths
grep
'CONFIG_HPS_IOCSR_SCANCHAIN[0-9]\+_LENGTH'
\
grep
'CONFIG_HPS_IOCSR_SCANCHAIN[0-9]\+_LENGTH'
\
${
in_dir
}
/generated/iocsr_config_
${
soc
}
.h |
tr
-d
"()"
${
in_
bsp_
dir
}
/generated/iocsr_config_
${
soc
}
.h |
tr
-d
"()"
echo
""
echo
""
# Retrieve the scan chain config and zap the ad-hoc length encoding
# Retrieve the scan chain config and zap the ad-hoc length encoding
sed
-n
'/^const/ !b; :next {/^const/ s/(.*)//;p;n;b next}'
\
sed
-n
'/^const/ !b; :next {/^const/ s/(.*)//;p;n;b next}'
\
${
in_dir
}
/generated/iocsr_config_
${
soc
}
.c
${
in_
bsp_
dir
}
/generated/iocsr_config_
${
soc
}
.c
cat
<<
EOF
cat
<<
EOF
...
@@ -49,8 +51,9 @@ EOF
...
@@ -49,8 +51,9 @@ EOF
#
#
process_pinmux_config
()
{
process_pinmux_config
()
{
soc
=
"
$1
"
soc
=
"
$1
"
in_dir
=
"
$2
"
in_qts_dir
=
"
$2
"
out_dir
=
"
$3
"
in_bsp_dir
=
"
$3
"
out_dir
=
"
$4
"
(
(
cat
<<
EOF
cat
<<
EOF
...
@@ -67,7 +70,7 @@ EOF
...
@@ -67,7 +70,7 @@ EOF
# Retrieve the pinmux config and zap the ad-hoc length encoding
# Retrieve the pinmux config and zap the ad-hoc length encoding
sed
-n
'/^unsigned/ !b; :next {/^unsigned/ {s/\[.*\]/[]/;s/unsigned long/const u8/};p;n;b next}'
\
sed
-n
'/^unsigned/ !b; :next {/^unsigned/ {s/\[.*\]/[]/;s/unsigned long/const u8/};p;n;b next}'
\
${
in_dir
}
/generated/pinmux_config_
${
soc
}
.c
${
in_
bsp_
dir
}
/generated/pinmux_config_
${
soc
}
.c
cat
<<
EOF
cat
<<
EOF
...
@@ -84,8 +87,9 @@ EOF
...
@@ -84,8 +87,9 @@ EOF
#
#
process_pll_config
()
{
process_pll_config
()
{
soc
=
"
$1
"
soc
=
"
$1
"
in_dir
=
"
$2
"
in_qts_dir
=
"
$2
"
out_dir
=
"
$3
"
in_bsp_dir
=
"
$3
"
out_dir
=
"
$4
"
(
(
cat
<<
EOF
cat
<<
EOF
...
@@ -102,7 +106,7 @@ EOF
...
@@ -102,7 +106,7 @@ EOF
# Retrieve the pll config and zap parenthesis
# Retrieve the pll config and zap parenthesis
sed
-n
'/CONFIG_HPS/ !b; :next {/CONFIG_HPS/ s/[()]//g;/endif/ b;p;n;b next}'
\
sed
-n
'/CONFIG_HPS/ !b; :next {/CONFIG_HPS/ s/[()]//g;/endif/ b;p;n;b next}'
\
${
in_dir
}
/generated/pll_config.h
${
in_
bsp_
dir
}
/generated/pll_config.h
cat
<<
EOF
cat
<<
EOF
...
@@ -126,8 +130,9 @@ grep_sdram_config() {
...
@@ -126,8 +130,9 @@ grep_sdram_config() {
#
#
process_sdram_config
()
{
process_sdram_config
()
{
soc
=
"
$1
"
soc
=
"
$1
"
in_dir
=
"
$2
"
in_qts_dir
=
"
$2
"
out_dir
=
"
$3
"
in_bsp_dir
=
"
$3
"
out_dir
=
"
$4
"
(
(
cat
<<
EOF
cat
<<
EOF
...
@@ -144,29 +149,32 @@ EOF
...
@@ -144,29 +149,32 @@ EOF
echo
"/* SDRAM configuration */"
echo
"/* SDRAM configuration */"
# Retrieve the sdram config, zap broken lines and zap parenthesis
# Retrieve the sdram config, zap broken lines and zap parenthesis
sed
-n
"/
\\\\
$/
{N;s/
\\\\\n
/
\t
/};p"
${
in_dir
}
/generated/sdram/sdram_config.h |
sed
-n
"/
\\\\
$/
{N;s/
\\\\\n
/
\t
/};p"
\
${
in_bsp_dir
}
/generated/sdram/sdram_config.h |
sed
-n
'/CONFIG_HPS/ !b; :next {/CONFIG_HPS/ s/[()]//g;/endif/ b;p;n;b next}'
|
sed
-n
'/CONFIG_HPS/ !b; :next {/CONFIG_HPS/ s/[()]//g;/endif/ b;p;n;b next}'
|
sort
-u
| grep_sdram_config
sort
-u
| grep_sdram_config
echo
""
echo
""
echo
"/* Sequencer auto configuration */"
echo
"/* Sequencer auto configuration */"
sed
-n
"/__RW_MGR/ {s/__//;s/
\+\(
[^ ]
\+\)
$/
\t\1
/p}"
\
sed
-n
"/__RW_MGR/ {s/__//;s/
\+\(
[^ ]
\+\)
$/
\t\1
/p}"
\
${
in_dir
}
/hps_isw_handoff/
*
/sequencer_auto.h |
sort
-u
| grep_sdram_config
${
in_qts_dir
}
/hps_isw_handoff/
*
/sequencer_auto.h |
sort
-u
| grep_sdram_config
echo
""
echo
""
echo
"/* Sequencer defines configuration */"
echo
"/* Sequencer defines configuration */"
sed
-n
"/^#define [^_]/ {s/__//;s/
\+\(
[^ ]
\+\)
$/
\t\1
/p}"
\
sed
-n
"/^#define [^_]/ {s/__//;s/
\+\(
[^ ]
\+\)
$/
\t\1
/p}"
\
${
in_dir
}
/hps_isw_handoff/
*
/sequencer_defines.h |
sort
-u
| grep_sdram_config
${
in_qts_dir
}
/hps_isw_handoff/
*
/sequencer_defines.h |
sort
-u
| grep_sdram_config
echo
""
echo
""
echo
"/* Sequencer ac_rom_init configuration */"
echo
"/* Sequencer ac_rom_init configuration */"
sed
-n
'/^const.*\[/ !b; :next {/^const.*\[/ {N;s/\n//;s/alt_u32/u32/;s/\[.*\]/[]/};/endif/ b;p;n;b next}'
\
sed
-n
'/^const.*\[/ !b; :next {/^const.*\[/ {N;s/\n//;s/alt_u32/u32/;s/\[.*\]/[]/};/endif/ b;p;n;b next}'
\
${
in_dir
}
/hps_isw_handoff/
*
/sequencer_auto_ac_init.c
${
in_
qts_
dir
}
/hps_isw_handoff/
*
/sequencer_auto_ac_init.c
echo
""
echo
""
echo
"/* Sequencer inst_rom_init configuration */"
echo
"/* Sequencer inst_rom_init configuration */"
sed
-n
'/^const.*\[/ !b; :next {/^const.*\[/ {N;s/\n//;s/alt_u32/u32/;s/\[.*\]/[]/};/endif/ b;p;n;b next}'
\
sed
-n
'/^const.*\[/ !b; :next {/^const.*\[/ {N;s/\n//;s/alt_u32/u32/;s/\[.*\]/[]/};/endif/ b;p;n;b next}'
\
${
in_dir
}
/hps_isw_handoff/
*
/sequencer_auto_inst_init.c
${
in_
qts_
dir
}
/hps_isw_handoff/
*
/sequencer_auto_inst_init.c
cat
<<
EOF
cat
<<
EOF
...
@@ -176,30 +184,36 @@ EOF
...
@@ -176,30 +184,36 @@ EOF
}
}
usage
()
{
usage
()
{
echo
"
$0
[soc_type] [input_dir] [output_dir]"
echo
"
$0
[soc_type] [input_
qts_dir] [input_bsp_
dir] [output_dir]"
echo
"Process QTS-generated headers into U-Boot compatible ones."
echo
"Process QTS-generated headers into U-Boot compatible ones."
echo
""
echo
""
echo
" soc_type
\t\t
Type of SoC, either 'cyclone5' or 'arria5',"
echo
-e
" soc_type
\t
-
\t
Type of SoC, either 'cyclone5' or 'arria5'."
echo
" input_dir
\t\t
Directory with the QTS project."
echo
-e
" input_qts_dir
\t
-
\t
Directory with compiled Quartus project"
echo
" output_dir
\t\t
Directory to store the U-Boot compatible headers."
echo
-e
"
\t\t\t\t
and containing the Quartus project file (QPF)."
echo
-e
" input_bsp_dir
\t
-
\t
Directory with generated bsp containing"
echo
-e
"
\t\t\t\t
the settings.bsp file."
echo
-e
" output_dir
\t
-
\t
Directory to store the U-Boot compatible"
echo
-e
"
\t\t\t\t
headers."
echo
""
echo
""
}
}
soc
=
"
$1
"
soc
=
"
$1
"
in_dir
=
"
$2
"
in_qts_dir
=
"
$2
"
out_dir
=
"
$3
"
in_bsp_dir
=
"
$3
"
out_dir
=
"
$4
"
if
[
"$#"
-ne
3
]
;
then
if
[
"$#"
-ne
4
]
;
then
usage
usage
exit
1
exit
1
fi
fi
if
[
!
-d
"
${
in_dir
}
"
-o
!
-d
"
${
out_dir
}
"
-o
-z
"
${
soc
}
"
]
;
then
if
[
!
-d
"
${
in_qts_dir
}
"
-o
!
-d
"
${
in_bsp_dir
}
"
-o
\
!
-d
"
${
out_dir
}
"
-o
-z
"
${
soc
}
"
]
;
then
usage
usage
exit
3
exit
3
fi
fi
process_iocsr_config
"
${
soc
}
"
"
${
in_dir
}
"
"
${
out_dir
}
"
process_iocsr_config
"
${
soc
}
"
"
${
in_
qts_dir
}
"
"
${
in_bsp_
dir
}
"
"
${
out_dir
}
"
process_pinmux_config
"
${
soc
}
"
"
${
in_dir
}
"
"
${
out_dir
}
"
process_pinmux_config
"
${
soc
}
"
"
${
in_
qts_dir
}
"
"
${
in_bsp_
dir
}
"
"
${
out_dir
}
"
process_pll_config
"
${
soc
}
"
"
${
in_dir
}
"
"
${
out_dir
}
"
process_pll_config
"
${
soc
}
"
"
${
in_
qts_dir
}
"
"
${
in_bsp_
dir
}
"
"
${
out_dir
}
"
process_sdram_config
"
${
soc
}
"
"
${
in_dir
}
"
"
${
out_dir
}
"
process_sdram_config
"
${
soc
}
"
"
${
in_
qts_dir
}
"
"
${
in_bsp_
dir
}
"
"
${
out_dir
}
"
This diff is collapsed.
Click to expand it.
drivers/ddr/altera/sdram.c
+
1
−
0
View file @
b8c5b472
...
@@ -218,6 +218,7 @@ static void sdram_dump_protection_config(void)
...
@@ -218,6 +218,7 @@ static void sdram_dump_protection_config(void)
readl
(
&
sdr_ctrl
->
protport_default
));
readl
(
&
sdr_ctrl
->
protport_default
));
for
(
rules
=
0
;
rules
<
20
;
rules
++
)
{
for
(
rules
=
0
;
rules
<
20
;
rules
++
)
{
rule
.
rule
=
rules
;
sdram_get_rule
(
&
rule
);
sdram_get_rule
(
&
rule
);
debug
(
"Rule %d, rules ...
\n
"
,
rules
);
debug
(
"Rule %d, rules ...
\n
"
,
rules
);
debug
(
" sdram start %x
\n
"
,
rule
.
sdram_start
);
debug
(
" sdram start %x
\n
"
,
rule
.
sdram_start
);
...
...
This diff is collapsed.
Click to expand it.
drivers/fpga/socfpga.c
+
1
−
1
View file @
b8c5b472
...
@@ -269,7 +269,7 @@ int socfpga_load(Altera_desc *desc, const void *rbf_data, size_t rbf_size)
...
@@ -269,7 +269,7 @@ int socfpga_load(Altera_desc *desc, const void *rbf_data, size_t rbf_size)
/* Prior programming the FPGA, all bridges need to be shut off */
/* Prior programming the FPGA, all bridges need to be shut off */
/* Disable all signals from hps peripheral controller to fpga */
/* Disable all signals from hps peripheral controller to fpga */
writel
(
0
,
&
sysmgr_regs
->
fpgaintfgrp_
module
);
writel
(
0
,
&
sysmgr_regs
->
fpgaintfgrp_
gbl
);
/* Disable all signals from FPGA to HPS SDRAM */
/* Disable all signals from FPGA to HPS SDRAM */
#define SDR_CTRLGRP_FPGAPORTRST_ADDRESS 0x5080
#define SDR_CTRLGRP_FPGAPORTRST_ADDRESS 0x5080
...
...
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