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
03ce1620
Unverified
Commit
03ce1620
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 #1703 from oscardagrach/hikey960-dmac-fix
hikey960: initialize EDMAC and channels
parents
ae4a99b9
87f6740c
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
+7
-0
plat/hisilicon/hikey960/include/hi3660.h
with
23 additions
and
0 deletions
+23
-0
plat/hisilicon/hikey960/hikey960_bl31_setup.c
View file @
03ce1620
...
...
@@ -14,6 +14,7 @@
#include <generic_delay_timer.h>
#include <gicv2.h>
#include <hi3660.h>
#include <mmio.h>
#include <hisi_ipc.h>
#include <interrupt_mgmt.h>
#include <interrupt_props.h>
...
...
@@ -143,6 +144,19 @@ void bl31_plat_arch_setup(void)
BL31_COHERENT_RAM_LIMIT
);
}
static
void
hikey960_edma_init
(
void
)
{
int
i
;
uint32_t
non_secure
;
non_secure
=
EDMAC_SEC_CTRL_INTR_SEC
|
EDMAC_SEC_CTRL_GLOBAL_SEC
;
mmio_write_32
(
EDMAC_SEC_CTRL
,
non_secure
);
for
(
i
=
0
;
i
<
EDMAC_CHANNEL_NUMS
;
i
++
)
{
mmio_write_32
(
EDMAC_AXI_CONF
(
i
),
(
1
<<
6
)
|
(
1
<<
18
));
}
}
void
bl31_platform_setup
(
void
)
{
/* Initialize the GIC driver, cpu and distributor interfaces */
...
...
@@ -151,6 +165,8 @@ void bl31_platform_setup(void)
gicv2_pcpu_distif_init
();
gicv2_cpuif_enable
();
hikey960_edma_init
();
hisi_ipc_init
();
}
...
...
This diff is collapsed.
Click to expand it.
plat/hisilicon/hikey960/include/hi3660.h
View file @
03ce1620
...
...
@@ -366,4 +366,11 @@
/* GPIO219: PD interrupt. pull up */
#define IOCG_AO_043_REG (IOCG_AO_REG_BASE + 0x030)
#define EDMAC_BASE 0xfdf30000
#define EDMAC_SEC_CTRL (EDMAC_BASE + 0x694)
#define EDMAC_AXI_CONF(x) (EDMAC_BASE + 0x820 + (x << 6))
#define EDMAC_SEC_CTRL_INTR_SEC (1 << 1)
#define EDMAC_SEC_CTRL_GLOBAL_SEC (1 << 0)
#define EDMAC_CHANNEL_NUMS 16
#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