Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
e0dd6696
Unverified
Commit
e0dd6696
authored
6 years ago
by
Antonio Niño Díaz
Committed by
GitHub
6 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #1813 from oscardagrach/hikey960-iomcu-dma
hikey960: enable IOMCU DMAC
parents
df80b5bf
c8ab47d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
plat/hisilicon/hikey960/hikey960_bl31_setup.c
+16
-0
plat/hisilicon/hikey960/hikey960_bl31_setup.c
plat/hisilicon/hikey960/include/hi3660.h
+9
-0
plat/hisilicon/hikey960/include/hi3660.h
with
25 additions
and
0 deletions
+25
-0
plat/hisilicon/hikey960/hikey960_bl31_setup.c
View file @
e0dd6696
...
...
@@ -141,6 +141,21 @@ static void hikey960_edma_init(void)
}
}
static
void
hikey960_iomcu_dma_init
(
void
)
{
int
i
;
uint32_t
non_secure
;
non_secure
=
IOMCU_DMAC_SEC_CTRL_INTR_SEC
|
IOMCU_DMAC_SEC_CTRL_GLOBAL_SEC
;
mmio_write_32
(
IOMCU_DMAC_SEC_CTRL
,
non_secure
);
/* channels 0-3 are reserved */
for
(
i
=
4
;
i
<
IOMCU_DMAC_CHANNEL_NUMS
;
i
++
)
{
mmio_write_32
(
IOMCU_DMAC_AXI_CONF
(
i
),
IOMCU_DMAC_AXI_CONF_ARPROT_NS
|
IOMCU_DMAC_AXI_CONF_AWPROT_NS
);
}
}
void
bl31_platform_setup
(
void
)
{
/* Initialize the GIC driver, cpu and distributor interfaces */
...
...
@@ -150,6 +165,7 @@ void bl31_platform_setup(void)
gicv2_cpuif_enable
();
hikey960_edma_init
();
hikey960_iomcu_dma_init
();
hisi_ipc_init
();
}
...
...
This diff is collapsed.
Click to expand it.
plat/hisilicon/hikey960/include/hi3660.h
View file @
e0dd6696
...
...
@@ -373,4 +373,13 @@
#define EDMAC_SEC_CTRL_GLOBAL_SEC (1 << 0)
#define EDMAC_CHANNEL_NUMS 16
#define IOMCU_DMAC_BASE 0xffd77000
#define IOMCU_DMAC_SEC_CTRL (IOMCU_DMAC_BASE + 0x694)
#define IOMCU_DMAC_AXI_CONF(x) (IOMCU_DMAC_BASE + 0x820 + ((x) << 6))
#define IOMCU_DMAC_AXI_CONF_ARPROT_NS (1 << 6)
#define IOMCU_DMAC_AXI_CONF_AWPROT_NS (1 << 18)
#define IOMCU_DMAC_SEC_CTRL_INTR_SEC (1 << 1)
#define IOMCU_DMAC_SEC_CTRL_GLOBAL_SEC (1 << 0)
#define IOMCU_DMAC_CHANNEL_NUMS 8
#endif
/* HI3660_H */
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help