aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h')
-rw-r--r--arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h111
1 files changed, 110 insertions, 1 deletions
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
index 0c981aa5a013..b842b6d2ba5e 100644
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
@@ -9,6 +9,7 @@
9 * compile time if only one CPU support is enabled (idea stolen from 9 * compile time if only one CPU support is enabled (idea stolen from
10 * arm mach-types) 10 * arm mach-types)
11 */ 11 */
12#define BCM6328_CPU_ID 0x6328
12#define BCM6338_CPU_ID 0x6338 13#define BCM6338_CPU_ID 0x6338
13#define BCM6345_CPU_ID 0x6345 14#define BCM6345_CPU_ID 0x6345
14#define BCM6348_CPU_ID 0x6348 15#define BCM6348_CPU_ID 0x6348
@@ -20,6 +21,19 @@ u16 __bcm63xx_get_cpu_id(void);
20u16 bcm63xx_get_cpu_rev(void); 21u16 bcm63xx_get_cpu_rev(void);
21unsigned int bcm63xx_get_cpu_freq(void); 22unsigned int bcm63xx_get_cpu_freq(void);
22 23
24#ifdef CONFIG_BCM63XX_CPU_6328
25# ifdef bcm63xx_get_cpu_id
26# undef bcm63xx_get_cpu_id
27# define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id()
28# define BCMCPU_RUNTIME_DETECT
29# else
30# define bcm63xx_get_cpu_id() BCM6328_CPU_ID
31# endif
32# define BCMCPU_IS_6328() (bcm63xx_get_cpu_id() == BCM6328_CPU_ID)
33#else
34# define BCMCPU_IS_6328() (0)
35#endif
36
23#ifdef CONFIG_BCM63XX_CPU_6338 37#ifdef CONFIG_BCM63XX_CPU_6338
24# ifdef bcm63xx_get_cpu_id 38# ifdef bcm63xx_get_cpu_id
25# undef bcm63xx_get_cpu_id 39# undef bcm63xx_get_cpu_id
@@ -129,7 +143,8 @@ enum bcm63xx_regs_set {
129 RSET_PCMDMA, 143 RSET_PCMDMA,
130 RSET_PCMDMAC, 144 RSET_PCMDMAC,
131 RSET_PCMDMAS, 145 RSET_PCMDMAS,
132 RSET_RNG 146 RSET_RNG,
147 RSET_MISC
133}; 148};
134 149
135#define RSET_DSL_LMEM_SIZE (64 * 1024 * 4) 150#define RSET_DSL_LMEM_SIZE (64 * 1024 * 4)
@@ -156,6 +171,49 @@ enum bcm63xx_regs_set {
156#define RSET_RNG_SIZE 20 171#define RSET_RNG_SIZE 20
157 172
158/* 173/*
174 * 6328 register sets base address
175 */
176#define BCM_6328_DSL_LMEM_BASE (0xdeadbeef)
177#define BCM_6328_PERF_BASE (0xb0000000)
178#define BCM_6328_TIMER_BASE (0xb0000040)
179#define BCM_6328_WDT_BASE (0xb000005c)
180#define BCM_6328_UART0_BASE (0xb0000100)
181#define BCM_6328_UART1_BASE (0xb0000120)
182#define BCM_6328_GPIO_BASE (0xb0000080)
183#define BCM_6328_SPI_BASE (0xdeadbeef)
184#define BCM_6328_UDC0_BASE (0xdeadbeef)
185#define BCM_6328_USBDMA_BASE (0xdeadbeef)
186#define BCM_6328_OHCI0_BASE (0xdeadbeef)
187#define BCM_6328_OHCI_PRIV_BASE (0xdeadbeef)
188#define BCM_6328_USBH_PRIV_BASE (0xdeadbeef)
189#define BCM_6328_MPI_BASE (0xdeadbeef)
190#define BCM_6328_PCMCIA_BASE (0xdeadbeef)
191#define BCM_6328_SDRAM_REGS_BASE (0xdeadbeef)
192#define BCM_6328_DSL_BASE (0xb0001900)
193#define BCM_6328_UBUS_BASE (0xdeadbeef)
194#define BCM_6328_ENET0_BASE (0xdeadbeef)
195#define BCM_6328_ENET1_BASE (0xdeadbeef)
196#define BCM_6328_ENETDMA_BASE (0xb000d800)
197#define BCM_6328_ENETDMAC_BASE (0xb000da00)
198#define BCM_6328_ENETDMAS_BASE (0xb000dc00)
199#define BCM_6328_ENETSW_BASE (0xb0e00000)
200#define BCM_6328_EHCI0_BASE (0x10002500)
201#define BCM_6328_SDRAM_BASE (0xdeadbeef)
202#define BCM_6328_MEMC_BASE (0xdeadbeef)
203#define BCM_6328_DDR_BASE (0xb0003000)
204#define BCM_6328_M2M_BASE (0xdeadbeef)
205#define BCM_6328_ATM_BASE (0xdeadbeef)
206#define BCM_6328_XTM_BASE (0xdeadbeef)
207#define BCM_6328_XTMDMA_BASE (0xb000b800)
208#define BCM_6328_XTMDMAC_BASE (0xdeadbeef)
209#define BCM_6328_XTMDMAS_BASE (0xdeadbeef)
210#define BCM_6328_PCM_BASE (0xb000a800)
211#define BCM_6328_PCMDMA_BASE (0xdeadbeef)
212#define BCM_6328_PCMDMAC_BASE (0xdeadbeef)
213#define BCM_6328_PCMDMAS_BASE (0xdeadbeef)
214#define BCM_6328_RNG_BASE (0xdeadbeef)
215#define BCM_6328_MISC_BASE (0xb0001800)
216/*
159 * 6338 register sets base address 217 * 6338 register sets base address
160 */ 218 */
161#define BCM_6338_DSL_LMEM_BASE (0xfff00000) 219#define BCM_6338_DSL_LMEM_BASE (0xfff00000)
@@ -198,6 +256,7 @@ enum bcm63xx_regs_set {
198#define BCM_6338_PCMDMAC_BASE (0xdeadbeef) 256#define BCM_6338_PCMDMAC_BASE (0xdeadbeef)
199#define BCM_6338_PCMDMAS_BASE (0xdeadbeef) 257#define BCM_6338_PCMDMAS_BASE (0xdeadbeef)
200#define BCM_6338_RNG_BASE (0xdeadbeef) 258#define BCM_6338_RNG_BASE (0xdeadbeef)
259#define BCM_6338_MISC_BASE (0xdeadbeef)
201 260
202/* 261/*
203 * 6345 register sets base address 262 * 6345 register sets base address
@@ -242,6 +301,7 @@ enum bcm63xx_regs_set {
242#define BCM_6345_PCMDMAC_BASE (0xdeadbeef) 301#define BCM_6345_PCMDMAC_BASE (0xdeadbeef)
243#define BCM_6345_PCMDMAS_BASE (0xdeadbeef) 302#define BCM_6345_PCMDMAS_BASE (0xdeadbeef)
244#define BCM_6345_RNG_BASE (0xdeadbeef) 303#define BCM_6345_RNG_BASE (0xdeadbeef)
304#define BCM_6345_MISC_BASE (0xdeadbeef)
245 305
246/* 306/*
247 * 6348 register sets base address 307 * 6348 register sets base address
@@ -283,6 +343,7 @@ enum bcm63xx_regs_set {
283#define BCM_6348_PCMDMAC_BASE (0xdeadbeef) 343#define BCM_6348_PCMDMAC_BASE (0xdeadbeef)
284#define BCM_6348_PCMDMAS_BASE (0xdeadbeef) 344#define BCM_6348_PCMDMAS_BASE (0xdeadbeef)
285#define BCM_6348_RNG_BASE (0xdeadbeef) 345#define BCM_6348_RNG_BASE (0xdeadbeef)
346#define BCM_6348_MISC_BASE (0xdeadbeef)
286 347
287/* 348/*
288 * 6358 register sets base address 349 * 6358 register sets base address
@@ -324,6 +385,7 @@ enum bcm63xx_regs_set {
324#define BCM_6358_PCMDMAC_BASE (0xfffe1900) 385#define BCM_6358_PCMDMAC_BASE (0xfffe1900)
325#define BCM_6358_PCMDMAS_BASE (0xfffe1a00) 386#define BCM_6358_PCMDMAS_BASE (0xfffe1a00)
326#define BCM_6358_RNG_BASE (0xdeadbeef) 387#define BCM_6358_RNG_BASE (0xdeadbeef)
388#define BCM_6358_MISC_BASE (0xdeadbeef)
327 389
328 390
329/* 391/*
@@ -366,6 +428,7 @@ enum bcm63xx_regs_set {
366#define BCM_6368_PCMDMAC_BASE (0xb0005a00) 428#define BCM_6368_PCMDMAC_BASE (0xb0005a00)
367#define BCM_6368_PCMDMAS_BASE (0xb0005c00) 429#define BCM_6368_PCMDMAS_BASE (0xb0005c00)
368#define BCM_6368_RNG_BASE (0xb0004180) 430#define BCM_6368_RNG_BASE (0xb0004180)
431#define BCM_6368_MISC_BASE (0xdeadbeef)
369 432
370 433
371extern const unsigned long *bcm63xx_regs_base; 434extern const unsigned long *bcm63xx_regs_base;
@@ -412,6 +475,7 @@ extern const unsigned long *bcm63xx_regs_base;
412 __GEN_RSET_BASE(__cpu, PCMDMAC) \ 475 __GEN_RSET_BASE(__cpu, PCMDMAC) \
413 __GEN_RSET_BASE(__cpu, PCMDMAS) \ 476 __GEN_RSET_BASE(__cpu, PCMDMAS) \
414 __GEN_RSET_BASE(__cpu, RNG) \ 477 __GEN_RSET_BASE(__cpu, RNG) \
478 __GEN_RSET_BASE(__cpu, MISC) \
415 } 479 }
416 480
417#define __GEN_CPU_REGS_TABLE(__cpu) \ 481#define __GEN_CPU_REGS_TABLE(__cpu) \
@@ -451,6 +515,7 @@ extern const unsigned long *bcm63xx_regs_base;
451 [RSET_PCMDMAC] = BCM_## __cpu ##_PCMDMAC_BASE, \ 515 [RSET_PCMDMAC] = BCM_## __cpu ##_PCMDMAC_BASE, \
452 [RSET_PCMDMAS] = BCM_## __cpu ##_PCMDMAS_BASE, \ 516 [RSET_PCMDMAS] = BCM_## __cpu ##_PCMDMAS_BASE, \
453 [RSET_RNG] = BCM_## __cpu ##_RNG_BASE, \ 517 [RSET_RNG] = BCM_## __cpu ##_RNG_BASE, \
518 [RSET_MISC] = BCM_## __cpu ##_MISC_BASE, \
454 519
455 520
456static inline unsigned long bcm63xx_regset_address(enum bcm63xx_regs_set set) 521static inline unsigned long bcm63xx_regset_address(enum bcm63xx_regs_set set)
@@ -458,6 +523,9 @@ static inline unsigned long bcm63xx_regset_address(enum bcm63xx_regs_set set)
458#ifdef BCMCPU_RUNTIME_DETECT 523#ifdef BCMCPU_RUNTIME_DETECT
459 return bcm63xx_regs_base[set]; 524 return bcm63xx_regs_base[set];
460#else 525#else
526#ifdef CONFIG_BCM63XX_CPU_6328
527 __GEN_RSET(6328)
528#endif
461#ifdef CONFIG_BCM63XX_CPU_6338 529#ifdef CONFIG_BCM63XX_CPU_6338
462 __GEN_RSET(6338) 530 __GEN_RSET(6338)
463#endif 531#endif
@@ -512,6 +580,47 @@ enum bcm63xx_irq {
512}; 580};
513 581
514/* 582/*
583 * 6328 irqs
584 */
585#define BCM_6328_HIGH_IRQ_BASE (IRQ_INTERNAL_BASE + 32)
586
587#define BCM_6328_TIMER_IRQ (IRQ_INTERNAL_BASE + 31)
588#define BCM_6328_SPI_IRQ 0
589#define BCM_6328_UART0_IRQ (IRQ_INTERNAL_BASE + 28)
590#define BCM_6328_UART1_IRQ (BCM_6328_HIGH_IRQ_BASE + 7)
591#define BCM_6328_DSL_IRQ (IRQ_INTERNAL_BASE + 4)
592#define BCM_6328_UDC0_IRQ 0
593#define BCM_6328_ENET0_IRQ 0
594#define BCM_6328_ENET1_IRQ 0
595#define BCM_6328_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 12)
596#define BCM_6328_OHCI0_IRQ (IRQ_INTERNAL_BASE + 9)
597#define BCM_6328_EHCI0_IRQ (IRQ_INTERNAL_BASE + 10)
598#define BCM_6328_PCMCIA_IRQ 0
599#define BCM_6328_ENET0_RXDMA_IRQ 0
600#define BCM_6328_ENET0_TXDMA_IRQ 0
601#define BCM_6328_ENET1_RXDMA_IRQ 0
602#define BCM_6328_ENET1_TXDMA_IRQ 0
603#define BCM_6328_PCI_IRQ (IRQ_INTERNAL_BASE + 23)
604#define BCM_6328_ATM_IRQ 0
605#define BCM_6328_ENETSW_RXDMA0_IRQ (BCM_6328_HIGH_IRQ_BASE + 0)
606#define BCM_6328_ENETSW_RXDMA1_IRQ (BCM_6328_HIGH_IRQ_BASE + 1)
607#define BCM_6328_ENETSW_RXDMA2_IRQ (BCM_6328_HIGH_IRQ_BASE + 2)
608#define BCM_6328_ENETSW_RXDMA3_IRQ (BCM_6328_HIGH_IRQ_BASE + 3)
609#define BCM_6328_ENETSW_TXDMA0_IRQ (BCM_6328_HIGH_IRQ_BASE + 4)
610#define BCM_6328_ENETSW_TXDMA1_IRQ (BCM_6328_HIGH_IRQ_BASE + 5)
611#define BCM_6328_ENETSW_TXDMA2_IRQ (BCM_6328_HIGH_IRQ_BASE + 6)
612#define BCM_6328_ENETSW_TXDMA3_IRQ (BCM_6328_HIGH_IRQ_BASE + 7)
613#define BCM_6328_XTM_IRQ (BCM_6328_HIGH_IRQ_BASE + 31)
614#define BCM_6328_XTM_DMA0_IRQ (BCM_6328_HIGH_IRQ_BASE + 11)
615
616#define BCM_6328_PCM_DMA0_IRQ (IRQ_INTERNAL_BASE + 2)
617#define BCM_6328_PCM_DMA1_IRQ (IRQ_INTERNAL_BASE + 3)
618#define BCM_6328_EXT_IRQ0 (IRQ_INTERNAL_BASE + 24)
619#define BCM_6328_EXT_IRQ1 (IRQ_INTERNAL_BASE + 25)
620#define BCM_6328_EXT_IRQ2 (IRQ_INTERNAL_BASE + 26)
621#define BCM_6328_EXT_IRQ3 (IRQ_INTERNAL_BASE + 27)
622
623/*
515 * 6338 irqs 624 * 6338 irqs
516 */ 625 */
517#define BCM_6338_TIMER_IRQ (IRQ_INTERNAL_BASE + 0) 626#define BCM_6338_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)