diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-05-05 13:23:53 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-05-05 13:23:53 +0000 |
commit | 88b1485bf9e933ca73957eccd7e2e59f99f6770f (patch) | |
tree | 518da61bc7e216e2222ad080f9605610352bba37 /sys/dev/fdt | |
parent | 27a1cf5acd5def5732a4221c0b35f65989da1650 (diff) |
Add eMMC-related clocks.
Diffstat (limited to 'sys/dev/fdt')
-rw-r--r-- | sys/dev/fdt/rkclock.c | 9 | ||||
-rw-r--r-- | sys/dev/fdt/rkclock_clocks.h | 4 |
2 files changed, 12 insertions, 1 deletions
diff --git a/sys/dev/fdt/rkclock.c b/sys/dev/fdt/rkclock.c index f10aae5d164..d641cdfbe41 100644 --- a/sys/dev/fdt/rkclock.c +++ b/sys/dev/fdt/rkclock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rkclock.c,v 1.1 2017/04/30 17:42:32 kettenis Exp $ */ +/* $OpenBSD: rkclock.c,v 1.2 2017/05/05 13:23:52 kettenis Exp $ */ /* * Copyright (c) 2017 Mark Kettenis <kettenis@openbsd.org> * @@ -30,6 +30,7 @@ /* Registers */ #define RK3399_CRU_CLKSEL_CON(i) (0x0100 + (i) * 4) +#define RK3399_CRU_CLKGATE_CON(i) (0x0300 + (i) * 4) #include "rkclock_clocks.h" @@ -213,6 +214,9 @@ rk3399_enable(void *cookie, uint32_t *cells, int on) uint32_t idx = cells[0]; switch (idx) { + case RK3399_CLK_EMMC: + /* Enabled by frimware! */ + break; case RK3399_CLK_UART0: case RK3399_CLK_UART1: case RK3399_CLK_UART2: @@ -225,6 +229,9 @@ rk3399_enable(void *cookie, uint32_t *cells, int on) case RK3399_HCLK_HOST1_ARB: /* Enabled by firmware! */ break; + case RK3399_ACLK_EMMC: + /* Enabled by firmware! */ + break; default: printf("%s: 0x%08x\n", __func__, idx); break; diff --git a/sys/dev/fdt/rkclock_clocks.h b/sys/dev/fdt/rkclock_clocks.h index 7f5948327e9..1b83c854a3a 100644 --- a/sys/dev/fdt/rkclock_clocks.h +++ b/sys/dev/fdt/rkclock_clocks.h @@ -1,10 +1,14 @@ /* Public Domain */ +#define RK3399_CLK_EMMC 78 + #define RK3399_CLK_UART0 81 #define RK3399_CLK_UART1 82 #define RK3399_CLK_UART2 83 #define RK3399_CLK_UART3 84 +#define RK3399_ACLK_EMMC 240 + #define RK3399_HCLK_HOST0 456 #define RK3399_HCLK_HOST0_ARB 457 #define RK3399_HCLK_HOST1 458 |