Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Florian Fainelli and committed by
Ralf Baechle
8aecfe94 0b55561b

+23
+9
arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
··· 129 129 RSET_PCMDMA, 130 130 RSET_PCMDMAC, 131 131 RSET_PCMDMAS, 132 + RSET_RNG 132 133 }; 133 134 134 135 #define RSET_DSL_LMEM_SIZE (64 * 1024 * 4) ··· 153 152 #define RSET_XTMDMA_SIZE 256 154 153 #define RSET_XTMDMAC_SIZE(chans) (16 * (chans)) 155 154 #define RSET_XTMDMAS_SIZE(chans) (16 * (chans)) 155 + #define RSET_RNG_SIZE 20 156 156 157 157 /* 158 158 * 6338 register sets base address ··· 197 195 #define BCM_6338_PCMDMA_BASE (0xdeadbeef) 198 196 #define BCM_6338_PCMDMAC_BASE (0xdeadbeef) 199 197 #define BCM_6338_PCMDMAS_BASE (0xdeadbeef) 198 + #define BCM_6338_RNG_BASE (0xdeadbeef) 200 199 201 200 /* 202 201 * 6345 register sets base address ··· 241 238 #define BCM_6345_PCMDMA_BASE (0xdeadbeef) 242 239 #define BCM_6345_PCMDMAC_BASE (0xdeadbeef) 243 240 #define BCM_6345_PCMDMAS_BASE (0xdeadbeef) 241 + #define BCM_6345_RNG_BASE (0xdeadbeef) 244 242 245 243 /* 246 244 * 6348 register sets base address ··· 282 278 #define BCM_6348_PCMDMA_BASE (0xdeadbeef) 283 279 #define BCM_6348_PCMDMAC_BASE (0xdeadbeef) 284 280 #define BCM_6348_PCMDMAS_BASE (0xdeadbeef) 281 + #define BCM_6348_RNG_BASE (0xdeadbeef) 285 282 286 283 /* 287 284 * 6358 register sets base address ··· 323 318 #define BCM_6358_PCMDMA_BASE (0xfffe1800) 324 319 #define BCM_6358_PCMDMAC_BASE (0xfffe1900) 325 320 #define BCM_6358_PCMDMAS_BASE (0xfffe1a00) 321 + #define BCM_6358_RNG_BASE (0xdeadbeef) 326 322 327 323 328 324 /* ··· 365 359 #define BCM_6368_PCMDMA_BASE (0xb0005800) 366 360 #define BCM_6368_PCMDMAC_BASE (0xb0005a00) 367 361 #define BCM_6368_PCMDMAS_BASE (0xb0005c00) 362 + #define BCM_6368_RNG_BASE (0xb0004180) 368 363 369 364 370 365 extern const unsigned long *bcm63xx_regs_base; ··· 411 404 __GEN_RSET_BASE(__cpu, PCMDMA) \ 412 405 __GEN_RSET_BASE(__cpu, PCMDMAC) \ 413 406 __GEN_RSET_BASE(__cpu, PCMDMAS) \ 407 + __GEN_RSET_BASE(__cpu, RNG) \ 414 408 } 415 409 416 410 #define __GEN_CPU_REGS_TABLE(__cpu) \ ··· 450 442 [RSET_PCMDMA] = BCM_## __cpu ##_PCMDMA_BASE, \ 451 443 [RSET_PCMDMAC] = BCM_## __cpu ##_PCMDMAC_BASE, \ 452 444 [RSET_PCMDMAS] = BCM_## __cpu ##_PCMDMAS_BASE, \ 445 + [RSET_RNG] = BCM_## __cpu ##_RNG_BASE, \ 453 446 454 447 455 448 static inline unsigned long bcm63xx_regset_address(enum bcm63xx_regs_set set)
+14
arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
··· 974 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 991 * _REG relative to RSET_SPI 978 992 *************************************************************************/ 979 993