diff options
Diffstat (limited to 'arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h')
-rw-r--r-- | arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 112 |
1 files changed, 112 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 e6e65dc7d502..19f9134bfe2f 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 BCM3368_CPU_ID 0x3368 | ||
12 | #define BCM6328_CPU_ID 0x6328 | 13 | #define BCM6328_CPU_ID 0x6328 |
13 | #define BCM6338_CPU_ID 0x6338 | 14 | #define BCM6338_CPU_ID 0x6338 |
14 | #define BCM6345_CPU_ID 0x6345 | 15 | #define BCM6345_CPU_ID 0x6345 |
@@ -22,6 +23,19 @@ u16 __bcm63xx_get_cpu_id(void); | |||
22 | u8 bcm63xx_get_cpu_rev(void); | 23 | u8 bcm63xx_get_cpu_rev(void); |
23 | unsigned int bcm63xx_get_cpu_freq(void); | 24 | unsigned int bcm63xx_get_cpu_freq(void); |
24 | 25 | ||
26 | #ifdef CONFIG_BCM63XX_CPU_3368 | ||
27 | # ifdef bcm63xx_get_cpu_id | ||
28 | # undef bcm63xx_get_cpu_id | ||
29 | # define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id() | ||
30 | # define BCMCPU_RUNTIME_DETECT | ||
31 | # else | ||
32 | # define bcm63xx_get_cpu_id() BCM3368_CPU_ID | ||
33 | # endif | ||
34 | # define BCMCPU_IS_3368() (bcm63xx_get_cpu_id() == BCM3368_CPU_ID) | ||
35 | #else | ||
36 | # define BCMCPU_IS_3368() (0) | ||
37 | #endif | ||
38 | |||
25 | #ifdef CONFIG_BCM63XX_CPU_6328 | 39 | #ifdef CONFIG_BCM63XX_CPU_6328 |
26 | # ifdef bcm63xx_get_cpu_id | 40 | # ifdef bcm63xx_get_cpu_id |
27 | # undef bcm63xx_get_cpu_id | 41 | # undef bcm63xx_get_cpu_id |
@@ -194,6 +208,53 @@ enum bcm63xx_regs_set { | |||
194 | #define RSET_RNG_SIZE 20 | 208 | #define RSET_RNG_SIZE 20 |
195 | 209 | ||
196 | /* | 210 | /* |
211 | * 3368 register sets base address | ||
212 | */ | ||
213 | #define BCM_3368_DSL_LMEM_BASE (0xdeadbeef) | ||
214 | #define BCM_3368_PERF_BASE (0xfff8c000) | ||
215 | #define BCM_3368_TIMER_BASE (0xfff8c040) | ||
216 | #define BCM_3368_WDT_BASE (0xfff8c080) | ||
217 | #define BCM_3368_UART0_BASE (0xfff8c100) | ||
218 | #define BCM_3368_UART1_BASE (0xfff8c120) | ||
219 | #define BCM_3368_GPIO_BASE (0xfff8c080) | ||
220 | #define BCM_3368_SPI_BASE (0xfff8c800) | ||
221 | #define BCM_3368_HSSPI_BASE (0xdeadbeef) | ||
222 | #define BCM_3368_UDC0_BASE (0xdeadbeef) | ||
223 | #define BCM_3368_USBDMA_BASE (0xdeadbeef) | ||
224 | #define BCM_3368_OHCI0_BASE (0xdeadbeef) | ||
225 | #define BCM_3368_OHCI_PRIV_BASE (0xdeadbeef) | ||
226 | #define BCM_3368_USBH_PRIV_BASE (0xdeadbeef) | ||
227 | #define BCM_3368_USBD_BASE (0xdeadbeef) | ||
228 | #define BCM_3368_MPI_BASE (0xfff80000) | ||
229 | #define BCM_3368_PCMCIA_BASE (0xfff80054) | ||
230 | #define BCM_3368_PCIE_BASE (0xdeadbeef) | ||
231 | #define BCM_3368_SDRAM_REGS_BASE (0xdeadbeef) | ||
232 | #define BCM_3368_DSL_BASE (0xdeadbeef) | ||
233 | #define BCM_3368_UBUS_BASE (0xdeadbeef) | ||
234 | #define BCM_3368_ENET0_BASE (0xfff98000) | ||
235 | #define BCM_3368_ENET1_BASE (0xfff98800) | ||
236 | #define BCM_3368_ENETDMA_BASE (0xfff99800) | ||
237 | #define BCM_3368_ENETDMAC_BASE (0xfff99900) | ||
238 | #define BCM_3368_ENETDMAS_BASE (0xfff99a00) | ||
239 | #define BCM_3368_ENETSW_BASE (0xdeadbeef) | ||
240 | #define BCM_3368_EHCI0_BASE (0xdeadbeef) | ||
241 | #define BCM_3368_SDRAM_BASE (0xdeadbeef) | ||
242 | #define BCM_3368_MEMC_BASE (0xfff84000) | ||
243 | #define BCM_3368_DDR_BASE (0xdeadbeef) | ||
244 | #define BCM_3368_M2M_BASE (0xdeadbeef) | ||
245 | #define BCM_3368_ATM_BASE (0xdeadbeef) | ||
246 | #define BCM_3368_XTM_BASE (0xdeadbeef) | ||
247 | #define BCM_3368_XTMDMA_BASE (0xdeadbeef) | ||
248 | #define BCM_3368_XTMDMAC_BASE (0xdeadbeef) | ||
249 | #define BCM_3368_XTMDMAS_BASE (0xdeadbeef) | ||
250 | #define BCM_3368_PCM_BASE (0xfff9c200) | ||
251 | #define BCM_3368_PCMDMA_BASE (0xdeadbeef) | ||
252 | #define BCM_3368_PCMDMAC_BASE (0xdeadbeef) | ||
253 | #define BCM_3368_PCMDMAS_BASE (0xdeadbeef) | ||
254 | #define BCM_3368_RNG_BASE (0xdeadbeef) | ||
255 | #define BCM_3368_MISC_BASE (0xdeadbeef) | ||
256 | |||
257 | /* | ||
197 | * 6328 register sets base address | 258 | * 6328 register sets base address |
198 | */ | 259 | */ |
199 | #define BCM_6328_DSL_LMEM_BASE (0xdeadbeef) | 260 | #define BCM_6328_DSL_LMEM_BASE (0xdeadbeef) |
@@ -238,6 +299,8 @@ enum bcm63xx_regs_set { | |||
238 | #define BCM_6328_PCMDMAS_BASE (0xdeadbeef) | 299 | #define BCM_6328_PCMDMAS_BASE (0xdeadbeef) |
239 | #define BCM_6328_RNG_BASE (0xdeadbeef) | 300 | #define BCM_6328_RNG_BASE (0xdeadbeef) |
240 | #define BCM_6328_MISC_BASE (0xb0001800) | 301 | #define BCM_6328_MISC_BASE (0xb0001800) |
302 | #define BCM_6328_OTP_BASE (0xb0000600) | ||
303 | |||
241 | /* | 304 | /* |
242 | * 6338 register sets base address | 305 | * 6338 register sets base address |
243 | */ | 306 | */ |
@@ -623,6 +686,9 @@ static inline unsigned long bcm63xx_regset_address(enum bcm63xx_regs_set set) | |||
623 | #ifdef BCMCPU_RUNTIME_DETECT | 686 | #ifdef BCMCPU_RUNTIME_DETECT |
624 | return bcm63xx_regs_base[set]; | 687 | return bcm63xx_regs_base[set]; |
625 | #else | 688 | #else |
689 | #ifdef CONFIG_BCM63XX_CPU_3368 | ||
690 | __GEN_RSET(3368) | ||
691 | #endif | ||
626 | #ifdef CONFIG_BCM63XX_CPU_6328 | 692 | #ifdef CONFIG_BCM63XX_CPU_6328 |
627 | __GEN_RSET(6328) | 693 | __GEN_RSET(6328) |
628 | #endif | 694 | #endif |
@@ -690,6 +756,52 @@ enum bcm63xx_irq { | |||
690 | }; | 756 | }; |
691 | 757 | ||
692 | /* | 758 | /* |
759 | * 3368 irqs | ||
760 | */ | ||
761 | #define BCM_3368_TIMER_IRQ (IRQ_INTERNAL_BASE + 0) | ||
762 | #define BCM_3368_SPI_IRQ (IRQ_INTERNAL_BASE + 1) | ||
763 | #define BCM_3368_UART0_IRQ (IRQ_INTERNAL_BASE + 2) | ||
764 | #define BCM_3368_UART1_IRQ (IRQ_INTERNAL_BASE + 3) | ||
765 | #define BCM_3368_DSL_IRQ 0 | ||
766 | #define BCM_3368_UDC0_IRQ 0 | ||
767 | #define BCM_3368_OHCI0_IRQ 0 | ||
768 | #define BCM_3368_ENET0_IRQ (IRQ_INTERNAL_BASE + 8) | ||
769 | #define BCM_3368_ENET1_IRQ (IRQ_INTERNAL_BASE + 6) | ||
770 | #define BCM_3368_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 9) | ||
771 | #define BCM_3368_ENET0_RXDMA_IRQ (IRQ_INTERNAL_BASE + 15) | ||
772 | #define BCM_3368_ENET0_TXDMA_IRQ (IRQ_INTERNAL_BASE + 16) | ||
773 | #define BCM_3368_HSSPI_IRQ 0 | ||
774 | #define BCM_3368_EHCI0_IRQ 0 | ||
775 | #define BCM_3368_USBD_IRQ 0 | ||
776 | #define BCM_3368_USBD_RXDMA0_IRQ 0 | ||
777 | #define BCM_3368_USBD_TXDMA0_IRQ 0 | ||
778 | #define BCM_3368_USBD_RXDMA1_IRQ 0 | ||
779 | #define BCM_3368_USBD_TXDMA1_IRQ 0 | ||
780 | #define BCM_3368_USBD_RXDMA2_IRQ 0 | ||
781 | #define BCM_3368_USBD_TXDMA2_IRQ 0 | ||
782 | #define BCM_3368_ENET1_RXDMA_IRQ (IRQ_INTERNAL_BASE + 17) | ||
783 | #define BCM_3368_ENET1_TXDMA_IRQ (IRQ_INTERNAL_BASE + 18) | ||
784 | #define BCM_3368_PCI_IRQ (IRQ_INTERNAL_BASE + 31) | ||
785 | #define BCM_3368_PCMCIA_IRQ 0 | ||
786 | #define BCM_3368_ATM_IRQ 0 | ||
787 | #define BCM_3368_ENETSW_RXDMA0_IRQ 0 | ||
788 | #define BCM_3368_ENETSW_RXDMA1_IRQ 0 | ||
789 | #define BCM_3368_ENETSW_RXDMA2_IRQ 0 | ||
790 | #define BCM_3368_ENETSW_RXDMA3_IRQ 0 | ||
791 | #define BCM_3368_ENETSW_TXDMA0_IRQ 0 | ||
792 | #define BCM_3368_ENETSW_TXDMA1_IRQ 0 | ||
793 | #define BCM_3368_ENETSW_TXDMA2_IRQ 0 | ||
794 | #define BCM_3368_ENETSW_TXDMA3_IRQ 0 | ||
795 | #define BCM_3368_XTM_IRQ 0 | ||
796 | #define BCM_3368_XTM_DMA0_IRQ 0 | ||
797 | |||
798 | #define BCM_3368_EXT_IRQ0 (IRQ_INTERNAL_BASE + 25) | ||
799 | #define BCM_3368_EXT_IRQ1 (IRQ_INTERNAL_BASE + 26) | ||
800 | #define BCM_3368_EXT_IRQ2 (IRQ_INTERNAL_BASE + 27) | ||
801 | #define BCM_3368_EXT_IRQ3 (IRQ_INTERNAL_BASE + 28) | ||
802 | |||
803 | |||
804 | /* | ||
693 | * 6328 irqs | 805 | * 6328 irqs |
694 | */ | 806 | */ |
695 | #define BCM_6328_HIGH_IRQ_BASE (IRQ_INTERNAL_BASE + 32) | 807 | #define BCM_6328_HIGH_IRQ_BASE (IRQ_INTERNAL_BASE + 32) |