diff options
author | Florian Fainelli <florian@openwrt.org> | 2012-07-24 10:33:10 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2012-07-24 10:33:10 -0400 |
commit | 8aecfe946275d23a207c73dbaf7a7c7a8a80be24 (patch) | |
tree | 3c38a3b00aaaaf2d046bf4616a133901a93ec58d | |
parent | 0b55561bc608abbbd1b5c98e0a4e9158334086c1 (diff) |
MIPS: BCM63XX: add RNG peripheral definitions
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: mpm@selenic.com
Cc: herbert@gondor.apana.org.au
Patchwork: https://patchwork.linux-mips.org/patch/3326/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 9 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 14 |
2 files changed, 23 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h index 82a8175d912e..0c981aa5a013 100644 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | |||
@@ -129,6 +129,7 @@ enum bcm63xx_regs_set { | |||
129 | RSET_PCMDMA, | 129 | RSET_PCMDMA, |
130 | RSET_PCMDMAC, | 130 | RSET_PCMDMAC, |
131 | RSET_PCMDMAS, | 131 | RSET_PCMDMAS, |
132 | RSET_RNG | ||
132 | }; | 133 | }; |
133 | 134 | ||
134 | #define RSET_DSL_LMEM_SIZE (64 * 1024 * 4) | 135 | #define RSET_DSL_LMEM_SIZE (64 * 1024 * 4) |
@@ -152,6 +153,7 @@ enum bcm63xx_regs_set { | |||
152 | #define RSET_XTMDMA_SIZE 256 | 153 | #define RSET_XTMDMA_SIZE 256 |
153 | #define RSET_XTMDMAC_SIZE(chans) (16 * (chans)) | 154 | #define RSET_XTMDMAC_SIZE(chans) (16 * (chans)) |
154 | #define RSET_XTMDMAS_SIZE(chans) (16 * (chans)) | 155 | #define RSET_XTMDMAS_SIZE(chans) (16 * (chans)) |
156 | #define RSET_RNG_SIZE 20 | ||
155 | 157 | ||
156 | /* | 158 | /* |
157 | * 6338 register sets base address | 159 | * 6338 register sets base address |
@@ -195,6 +197,7 @@ enum bcm63xx_regs_set { | |||
195 | #define BCM_6338_PCMDMA_BASE (0xdeadbeef) | 197 | #define BCM_6338_PCMDMA_BASE (0xdeadbeef) |
196 | #define BCM_6338_PCMDMAC_BASE (0xdeadbeef) | 198 | #define BCM_6338_PCMDMAC_BASE (0xdeadbeef) |
197 | #define BCM_6338_PCMDMAS_BASE (0xdeadbeef) | 199 | #define BCM_6338_PCMDMAS_BASE (0xdeadbeef) |
200 | #define BCM_6338_RNG_BASE (0xdeadbeef) | ||
198 | 201 | ||
199 | /* | 202 | /* |
200 | * 6345 register sets base address | 203 | * 6345 register sets base address |
@@ -238,6 +241,7 @@ enum bcm63xx_regs_set { | |||
238 | #define BCM_6345_PCMDMA_BASE (0xdeadbeef) | 241 | #define BCM_6345_PCMDMA_BASE (0xdeadbeef) |
239 | #define BCM_6345_PCMDMAC_BASE (0xdeadbeef) | 242 | #define BCM_6345_PCMDMAC_BASE (0xdeadbeef) |
240 | #define BCM_6345_PCMDMAS_BASE (0xdeadbeef) | 243 | #define BCM_6345_PCMDMAS_BASE (0xdeadbeef) |
244 | #define BCM_6345_RNG_BASE (0xdeadbeef) | ||
241 | 245 | ||
242 | /* | 246 | /* |
243 | * 6348 register sets base address | 247 | * 6348 register sets base address |
@@ -278,6 +282,7 @@ enum bcm63xx_regs_set { | |||
278 | #define BCM_6348_PCMDMA_BASE (0xdeadbeef) | 282 | #define BCM_6348_PCMDMA_BASE (0xdeadbeef) |
279 | #define BCM_6348_PCMDMAC_BASE (0xdeadbeef) | 283 | #define BCM_6348_PCMDMAC_BASE (0xdeadbeef) |
280 | #define BCM_6348_PCMDMAS_BASE (0xdeadbeef) | 284 | #define BCM_6348_PCMDMAS_BASE (0xdeadbeef) |
285 | #define BCM_6348_RNG_BASE (0xdeadbeef) | ||
281 | 286 | ||
282 | /* | 287 | /* |
283 | * 6358 register sets base address | 288 | * 6358 register sets base address |
@@ -318,6 +323,7 @@ enum bcm63xx_regs_set { | |||
318 | #define BCM_6358_PCMDMA_BASE (0xfffe1800) | 323 | #define BCM_6358_PCMDMA_BASE (0xfffe1800) |
319 | #define BCM_6358_PCMDMAC_BASE (0xfffe1900) | 324 | #define BCM_6358_PCMDMAC_BASE (0xfffe1900) |
320 | #define BCM_6358_PCMDMAS_BASE (0xfffe1a00) | 325 | #define BCM_6358_PCMDMAS_BASE (0xfffe1a00) |
326 | #define BCM_6358_RNG_BASE (0xdeadbeef) | ||
321 | 327 | ||
322 | 328 | ||
323 | /* | 329 | /* |
@@ -359,6 +365,7 @@ enum bcm63xx_regs_set { | |||
359 | #define BCM_6368_PCMDMA_BASE (0xb0005800) | 365 | #define BCM_6368_PCMDMA_BASE (0xb0005800) |
360 | #define BCM_6368_PCMDMAC_BASE (0xb0005a00) | 366 | #define BCM_6368_PCMDMAC_BASE (0xb0005a00) |
361 | #define BCM_6368_PCMDMAS_BASE (0xb0005c00) | 367 | #define BCM_6368_PCMDMAS_BASE (0xb0005c00) |
368 | #define BCM_6368_RNG_BASE (0xb0004180) | ||
362 | 369 | ||
363 | 370 | ||
364 | extern const unsigned long *bcm63xx_regs_base; | 371 | extern const unsigned long *bcm63xx_regs_base; |
@@ -404,6 +411,7 @@ extern const unsigned long *bcm63xx_regs_base; | |||
404 | __GEN_RSET_BASE(__cpu, PCMDMA) \ | 411 | __GEN_RSET_BASE(__cpu, PCMDMA) \ |
405 | __GEN_RSET_BASE(__cpu, PCMDMAC) \ | 412 | __GEN_RSET_BASE(__cpu, PCMDMAC) \ |
406 | __GEN_RSET_BASE(__cpu, PCMDMAS) \ | 413 | __GEN_RSET_BASE(__cpu, PCMDMAS) \ |
414 | __GEN_RSET_BASE(__cpu, RNG) \ | ||
407 | } | 415 | } |
408 | 416 | ||
409 | #define __GEN_CPU_REGS_TABLE(__cpu) \ | 417 | #define __GEN_CPU_REGS_TABLE(__cpu) \ |
@@ -442,6 +450,7 @@ extern const unsigned long *bcm63xx_regs_base; | |||
442 | [RSET_PCMDMA] = BCM_## __cpu ##_PCMDMA_BASE, \ | 450 | [RSET_PCMDMA] = BCM_## __cpu ##_PCMDMA_BASE, \ |
443 | [RSET_PCMDMAC] = BCM_## __cpu ##_PCMDMAC_BASE, \ | 451 | [RSET_PCMDMAC] = BCM_## __cpu ##_PCMDMAC_BASE, \ |
444 | [RSET_PCMDMAS] = BCM_## __cpu ##_PCMDMAS_BASE, \ | 452 | [RSET_PCMDMAS] = BCM_## __cpu ##_PCMDMAS_BASE, \ |
453 | [RSET_RNG] = BCM_## __cpu ##_RNG_BASE, \ | ||
445 | 454 | ||
446 | 455 | ||
447 | static inline unsigned long bcm63xx_regset_address(enum bcm63xx_regs_set set) | 456 | static inline unsigned long bcm63xx_regset_address(enum bcm63xx_regs_set set) |
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h index be107e9baf28..6a8df5635e79 100644 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | |||
@@ -974,6 +974,20 @@ | |||
974 | #define M2M_DSTID_REG(x) ((x) * 0x40 + 0x18) | 974 | #define M2M_DSTID_REG(x) ((x) * 0x40 + 0x18) |
975 | 975 | ||
976 | /************************************************************************* | 976 | /************************************************************************* |
977 | * _REG relative to RSET_RNG | ||
978 | *************************************************************************/ | ||
979 | |||
980 | #define RNG_CTRL 0x00 | ||
981 | #define RNG_EN (1 << 0) | ||
982 | |||
983 | #define RNG_STAT 0x04 | ||
984 | #define RNG_AVAIL_MASK (0xff000000) | ||
985 | |||
986 | #define RNG_DATA 0x08 | ||
987 | #define RNG_THRES 0x0c | ||
988 | #define RNG_MASK 0x10 | ||
989 | |||
990 | /************************************************************************* | ||
977 | * _REG relative to RSET_SPI | 991 | * _REG relative to RSET_SPI |
978 | *************************************************************************/ | 992 | *************************************************************************/ |
979 | 993 | ||