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
76a22410
Commit
76a22410
authored
11 years ago
by
Tom Rini
Browse files
Options
Downloads
Plain Diff
Merge branch 'fpga' of
git://www.denx.de/git/u-boot-microblaze
parents
edabc1bc
32d7cdd3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
common/cmd_fpga.c
+19
-3
19 additions, 3 deletions
common/cmd_fpga.c
drivers/fpga/zynqpl.c
+13
-2
13 additions, 2 deletions
drivers/fpga/zynqpl.c
with
32 additions
and
5 deletions
common/cmd_fpga.c
+
19
−
3
View file @
76a22410
...
@@ -160,9 +160,25 @@ int do_fpga(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
...
@@ -160,9 +160,25 @@ int do_fpga(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
image_header_t
*
hdr
=
image_header_t
*
hdr
=
(
image_header_t
*
)
fpga_data
;
(
image_header_t
*
)
fpga_data
;
ulong
data
;
ulong
data
;
uint8_t
comp
;
data
=
(
ulong
)
image_get_data
(
hdr
);
data_size
=
image_get_data_size
(
hdr
);
comp
=
image_get_comp
(
hdr
);
if
(
comp
==
IH_COMP_GZIP
)
{
ulong
image_buf
=
image_get_data
(
hdr
);
data
=
image_get_load
(
hdr
);
ulong
image_size
=
~
0UL
;
if
(
gunzip
((
void
*
)
data
,
~
0UL
,
(
void
*
)
image_buf
,
&
image_size
)
!=
0
)
{
puts
(
"GUNZIP: error
\n
"
);
return
1
;
}
data_size
=
image_size
;
}
else
{
data
=
(
ulong
)
image_get_data
(
hdr
);
data_size
=
image_get_data_size
(
hdr
);
}
rc
=
fpga_load
(
dev
,
(
void
*
)
data
,
data_size
);
rc
=
fpga_load
(
dev
,
(
void
*
)
data
,
data_size
);
}
}
break
;
break
;
...
...
This diff is collapsed.
Click to expand it.
drivers/fpga/zynqpl.c
+
13
−
2
View file @
76a22410
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#include
<common.h>
#include
<common.h>
#include
<asm/io.h>
#include
<asm/io.h>
#include
<zynqpl.h>
#include
<zynqpl.h>
#include
<asm/sizes.h>
#include
<asm/arch/hardware.h>
#include
<asm/arch/hardware.h>
#include
<asm/arch/sys_proto.h>
#include
<asm/arch/sys_proto.h>
...
@@ -177,8 +178,14 @@ int zynq_load(Xilinx_desc *desc, const void *buf, size_t bsize)
...
@@ -177,8 +178,14 @@ int zynq_load(Xilinx_desc *desc, const void *buf, size_t bsize)
return
FPGA_FAIL
;
return
FPGA_FAIL
;
}
}
if
((
u32
)
buf_start
&
0x3
)
{
if
((
u32
)
buf
<
SZ_1M
)
{
u32
*
new_buf
=
(
u32
*
)((
u32
)
buf
&
~
0x3
);
printf
(
"%s: Bitstream has to be placed up to 1MB (%x)
\n
"
,
__func__
,
(
u32
)
buf
);
return
FPGA_FAIL
;
}
if
((
u32
)
buf
!=
ALIGN
((
u32
)
buf
,
ARCH_DMA_MINALIGN
))
{
u32
*
new_buf
=
(
u32
*
)
ALIGN
((
u32
)
buf
,
ARCH_DMA_MINALIGN
);
printf
(
"%s: Align buffer at %x to %x(swap %d)
\n
"
,
__func__
,
printf
(
"%s: Align buffer at %x to %x(swap %d)
\n
"
,
__func__
,
(
u32
)
buf_start
,
(
u32
)
new_buf
,
swap
);
(
u32
)
buf_start
,
(
u32
)
new_buf
,
swap
);
...
@@ -284,6 +291,10 @@ int zynq_load(Xilinx_desc *desc, const void *buf, size_t bsize)
...
@@ -284,6 +291,10 @@ int zynq_load(Xilinx_desc *desc, const void *buf, size_t bsize)
debug
(
"%s: Source = 0x%08X
\n
"
,
__func__
,
(
u32
)
buf
);
debug
(
"%s: Source = 0x%08X
\n
"
,
__func__
,
(
u32
)
buf
);
debug
(
"%s: Size = %zu
\n
"
,
__func__
,
bsize
);
debug
(
"%s: Size = %zu
\n
"
,
__func__
,
bsize
);
/* flush(clean & invalidate) d-cache range buf */
flush_dcache_range
((
u32
)
buf
,
(
u32
)
buf
+
roundup
(
bsize
,
ARCH_DMA_MINALIGN
));
/* Set up the transfer */
/* Set up the transfer */
writel
((
u32
)
buf
|
1
,
&
devcfg_base
->
dma_src_addr
);
writel
((
u32
)
buf
|
1
,
&
devcfg_base
->
dma_src_addr
);
writel
(
0xFFFFFFFF
,
&
devcfg_base
->
dma_dst_addr
);
writel
(
0xFFFFFFFF
,
&
devcfg_base
->
dma_dst_addr
);
...
...
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