diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2013-09-06 22:53:35 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-09-06 22:53:35 -0400 |
commit | eeca9fad52fc4bfdf42c38bfcf383e932eb3e9d6 (patch) | |
tree | cc51c880459d41c0e8d7576405bef4c987bc7aa0 /arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | |
parent | ff6f83fc9d44db09997937c3475d525a6866fbb4 (diff) | |
parent | b48a97be8e6c2afdba2f3b61fd88c3c7743fbd73 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Merge upstream tree in order to reinstate crct10dif.
Diffstat (limited to 'arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h')
-rw-r--r-- | arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 119 |
1 files changed, 117 insertions, 2 deletions
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h index 336228990808..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 |
@@ -173,7 +187,10 @@ enum bcm63xx_regs_set { | |||
173 | #define BCM_6358_RSET_SPI_SIZE 1804 | 187 | #define BCM_6358_RSET_SPI_SIZE 1804 |
174 | #define BCM_6368_RSET_SPI_SIZE 1804 | 188 | #define BCM_6368_RSET_SPI_SIZE 1804 |
175 | #define RSET_ENET_SIZE 2048 | 189 | #define RSET_ENET_SIZE 2048 |
176 | #define RSET_ENETDMA_SIZE 2048 | 190 | #define RSET_ENETDMA_SIZE 256 |
191 | #define RSET_6345_ENETDMA_SIZE 64 | ||
192 | #define RSET_ENETDMAC_SIZE(chans) (16 * (chans)) | ||
193 | #define RSET_ENETDMAS_SIZE(chans) (16 * (chans)) | ||
177 | #define RSET_ENETSW_SIZE 65536 | 194 | #define RSET_ENETSW_SIZE 65536 |
178 | #define RSET_UART_SIZE 24 | 195 | #define RSET_UART_SIZE 24 |
179 | #define RSET_UDC_SIZE 256 | 196 | #define RSET_UDC_SIZE 256 |
@@ -191,6 +208,53 @@ enum bcm63xx_regs_set { | |||
191 | #define RSET_RNG_SIZE 20 | 208 | #define RSET_RNG_SIZE 20 |
192 | 209 | ||
193 | /* | 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 | /* | ||
194 | * 6328 register sets base address | 258 | * 6328 register sets base address |
195 | */ | 259 | */ |
196 | #define BCM_6328_DSL_LMEM_BASE (0xdeadbeef) | 260 | #define BCM_6328_DSL_LMEM_BASE (0xdeadbeef) |
@@ -235,6 +299,8 @@ enum bcm63xx_regs_set { | |||
235 | #define BCM_6328_PCMDMAS_BASE (0xdeadbeef) | 299 | #define BCM_6328_PCMDMAS_BASE (0xdeadbeef) |
236 | #define BCM_6328_RNG_BASE (0xdeadbeef) | 300 | #define BCM_6328_RNG_BASE (0xdeadbeef) |
237 | #define BCM_6328_MISC_BASE (0xb0001800) | 301 | #define BCM_6328_MISC_BASE (0xb0001800) |
302 | #define BCM_6328_OTP_BASE (0xb0000600) | ||
303 | |||
238 | /* | 304 | /* |
239 | * 6338 register sets base address | 305 | * 6338 register sets base address |
240 | */ | 306 | */ |
@@ -298,7 +364,7 @@ enum bcm63xx_regs_set { | |||
298 | #define BCM_6345_USBDMA_BASE (0xfffe2800) | 364 | #define BCM_6345_USBDMA_BASE (0xfffe2800) |
299 | #define BCM_6345_ENET0_BASE (0xfffe1800) | 365 | #define BCM_6345_ENET0_BASE (0xfffe1800) |
300 | #define BCM_6345_ENETDMA_BASE (0xfffe2800) | 366 | #define BCM_6345_ENETDMA_BASE (0xfffe2800) |
301 | #define BCM_6345_ENETDMAC_BASE (0xfffe2900) | 367 | #define BCM_6345_ENETDMAC_BASE (0xfffe2840) |
302 | #define BCM_6345_ENETDMAS_BASE (0xfffe2a00) | 368 | #define BCM_6345_ENETDMAS_BASE (0xfffe2a00) |
303 | #define BCM_6345_ENETSW_BASE (0xdeadbeef) | 369 | #define BCM_6345_ENETSW_BASE (0xdeadbeef) |
304 | #define BCM_6345_PCMCIA_BASE (0xfffe2028) | 370 | #define BCM_6345_PCMCIA_BASE (0xfffe2028) |
@@ -620,6 +686,9 @@ static inline unsigned long bcm63xx_regset_address(enum bcm63xx_regs_set set) | |||
620 | #ifdef BCMCPU_RUNTIME_DETECT | 686 | #ifdef BCMCPU_RUNTIME_DETECT |
621 | return bcm63xx_regs_base[set]; | 687 | return bcm63xx_regs_base[set]; |
622 | #else | 688 | #else |
689 | #ifdef CONFIG_BCM63XX_CPU_3368 | ||
690 | __GEN_RSET(3368) | ||
691 | #endif | ||
623 | #ifdef CONFIG_BCM63XX_CPU_6328 | 692 | #ifdef CONFIG_BCM63XX_CPU_6328 |
624 | __GEN_RSET(6328) | 693 | __GEN_RSET(6328) |
625 | #endif | 694 | #endif |
@@ -687,6 +756,52 @@ enum bcm63xx_irq { | |||
687 | }; | 756 | }; |
688 | 757 | ||
689 | /* | 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 | /* | ||
690 | * 6328 irqs | 805 | * 6328 irqs |
691 | */ | 806 | */ |
692 | #define BCM_6328_HIGH_IRQ_BASE (IRQ_INTERNAL_BASE + 32) | 807 | #define BCM_6328_HIGH_IRQ_BASE (IRQ_INTERNAL_BASE + 32) |