| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
#include <common/debug.h> |
| 8 |
#include <lib/mmio.h> |
| 9 |
|
| 10 |
#include <sunxi_ccu.h> |
| 11 |
#include <sunxi_mmap.h> |
| 12 |
#include <sunxi_private.h> |
| 13 |
#include <sunxi_spc.h> |
| 14 |
|
| 15 |
#define DMA_SEC_REG 0x20 |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
void sunxi_security_setup(void) |
| 24 |
{ |
| 25 |
int i; |
| 26 |
|
| 27 |
INFO("Configuring SPC Controller\n"); |
| 28 |
|
| 29 |
for (i = 0; i < SUNXI_SPC_NUM_PORTS; i++) |
| 30 |
mmio_write_32(SUNXI_SPC_DECPORT_SET_REG(i), 0xffffffff); |
| 31 |
|
| 32 |
|
| 33 |
mmio_write_32(SUNXI_CCU_SEC_SWITCH_REG, 0x7); |
| 34 |
|
| 35 |
|
| 36 |
mmio_write_32(SUNXI_R_PRCM_SEC_SWITCH_REG, 0x1); |
| 37 |
|
| 38 |
|
| 39 |
mmio_write_32(SUNXI_DMA_BASE + DMA_SEC_REG, 0xffff); |
| 40 |
} |