Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
f7427da1
Commit
f7427da1
authored
Feb 25, 2020
by
Soby Mathew
Committed by
TrustedFirmware Code Review
Feb 25, 2020
Browse files
Merge "uniphier: make on-chip SRAM region configurable" into integration
parents
2f39c55c
8eaffdf7
Changes
1
Show whitespace changes
Inline
Side-by-side
plat/socionext/uniphier/uniphier_io_storage.c
View file @
f7427da1
...
...
@@ -23,7 +23,6 @@
#define UNIPHIER_ROM_REGION_BASE 0x00000000ULL
#define UNIPHIER_ROM_REGION_SIZE 0x10000000ULL
#define UNIPHIER_OCM_REGION_BASE 0x30000000ULL
#define UNIPHIER_OCM_REGION_SIZE 0x00040000ULL
#define UNIPHIER_BLOCK_BUF_OFFSET 0x04200000UL
...
...
@@ -278,12 +277,20 @@ static int uniphier_io_nor_setup(unsigned int soc_id, size_t buffer_offset)
return
uniphier_io_memmap_setup
(
0x70000
);
}
static
int
uniphier_io_usb_setup
(
unsigned
int
soc_id
,
size_t
buffer_offset
)
static
const
uintptr_t
uniphier_ocm_base
[]
=
{
[
UNIPHIER_SOC_LD11
]
=
0x30000000
,
[
UNIPHIER_SOC_LD20
]
=
0x30000000
,
[
UNIPHIER_SOC_PXS3
]
=
0x30000000
,
};
static
int
uniphier_io_rom_api_setup
(
unsigned
int
soc
)
{
struct
io_block_dev_spec
*
block_dev_spec
;
uintptr_t
ocm_base
;
int
ret
;
/* use ROM API for loading images from USB storage */
assert
(
soc
<
ARRAY_SIZE
(
uniphier_ocm_base
));
ocm_base
=
uniphier_ocm_base
[
soc
];
ret
=
mmap_add_dynamic_region
(
UNIPHIER_ROM_REGION_BASE
,
UNIPHIER_ROM_REGION_BASE
,
UNIPHIER_ROM_REGION_SIZE
,
...
...
@@ -296,14 +303,26 @@ static int uniphier_io_usb_setup(unsigned int soc_id, size_t buffer_offset)
* load functions provided by the ROM use this memory region as a work
* area, but do not cater to cache coherency.
*/
ret
=
mmap_add_dynamic_region
(
UNIPHIER_OCM_REGION_BASE
,
UNIPHIER_OCM_REGION_BASE
,
ret
=
mmap_add_dynamic_region
(
ocm_base
,
ocm_base
,
UNIPHIER_OCM_REGION_SIZE
,
MT_DEVICE
|
MT_RW
|
MT_SECURE
);
if
(
ret
)
return
ret
;
ret
=
uniphier_usb_init
(
soc_id
,
&
block_dev_spec
);
return
0
;
}
static
int
uniphier_io_usb_setup
(
unsigned
int
soc
,
size_t
buffer_offset
)
{
struct
io_block_dev_spec
*
block_dev_spec
;
int
ret
;
/* use ROM API for loading images from USB storage */
ret
=
uniphier_io_rom_api_setup
(
soc
);
if
(
ret
)
return
ret
;
ret
=
uniphier_usb_init
(
soc
,
&
block_dev_spec
);
if
(
ret
)
return
ret
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment