Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle: "MIPS updates: - All the things that didn't make 3.10. - Removes the Windriver PPMC platform. Nobody will miss it. - Remove a workaround from kernel/irq/irqdomain.c which was there exclusivly for MIPS. Patch by Grant Likely. - More small improvments for the SEAD 3 platform - Improvments on the BMIPS / SMP support for the BCM63xx series. - Various cleanups of dead leftovers. - Platform support for the Cavium Octeon-based EdgeRouter Lite. Two large KVM patchsets didn't make it for this pull request because their respective authors are vacationing" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (124 commits) MIPS: Kconfig: Add missing MODULES dependency to VPE_LOADER MIPS: BCM63xx: CLK: Add dummy clk_{set,round}_rate() functions MIPS: SEAD3: Disable L2 cache on SEAD-3. MIPS: BCM63xx: Enable second core SMP on BCM6328 if available MIPS: BCM63xx: Add SMP support to prom.c MIPS: define write{b,w,l,q}_relaxed MIPS: Expose missing pci_io{map,unmap} declarations MIPS: Malta: Update GCMP detection. Revert "MIPS: make CAC_ADDR and UNCAC_ADDR account for PHYS_OFFSET" MIPS: APSP: Remove <asm/kspd.h> SSB: Kconfig: Amend SSB_EMBEDDED dependencies MIPS: microMIPS: Fix improper definition of ISA exception bit. MIPS: Don't try to decode microMIPS branch instructions where they cannot exist. MIPS: Declare emulate_load_store_microMIPS as a static function. MIPS: Fix typos and cleanup comment MIPS: Cleanup indentation and whitespace MIPS: BMIPS: support booting from physical CPU other than 0 MIPS: Only set cpu_has_mmips if SYS_SUPPORTS_MICROMIPS MIPS: GIC: Fix gic_set_affinity infinite loop MIPS: Don't save/restore OCTEON wide multiplier state on syscalls. ...
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
* compile time if only one CPU support is enabled (idea stolen from
|
||||
* arm mach-types)
|
||||
*/
|
||||
#define BCM3368_CPU_ID 0x3368
|
||||
#define BCM6328_CPU_ID 0x6328
|
||||
#define BCM6338_CPU_ID 0x6338
|
||||
#define BCM6345_CPU_ID 0x6345
|
||||
@@ -22,6 +23,19 @@ u16 __bcm63xx_get_cpu_id(void);
|
||||
u8 bcm63xx_get_cpu_rev(void);
|
||||
unsigned int bcm63xx_get_cpu_freq(void);
|
||||
|
||||
#ifdef CONFIG_BCM63XX_CPU_3368
|
||||
# ifdef bcm63xx_get_cpu_id
|
||||
# undef bcm63xx_get_cpu_id
|
||||
# define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id()
|
||||
# define BCMCPU_RUNTIME_DETECT
|
||||
# else
|
||||
# define bcm63xx_get_cpu_id() BCM3368_CPU_ID
|
||||
# endif
|
||||
# define BCMCPU_IS_3368() (bcm63xx_get_cpu_id() == BCM3368_CPU_ID)
|
||||
#else
|
||||
# define BCMCPU_IS_3368() (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BCM63XX_CPU_6328
|
||||
# ifdef bcm63xx_get_cpu_id
|
||||
# undef bcm63xx_get_cpu_id
|
||||
@@ -193,6 +207,53 @@ enum bcm63xx_regs_set {
|
||||
#define RSET_XTMDMAS_SIZE(chans) (16 * (chans))
|
||||
#define RSET_RNG_SIZE 20
|
||||
|
||||
/*
|
||||
* 3368 register sets base address
|
||||
*/
|
||||
#define BCM_3368_DSL_LMEM_BASE (0xdeadbeef)
|
||||
#define BCM_3368_PERF_BASE (0xfff8c000)
|
||||
#define BCM_3368_TIMER_BASE (0xfff8c040)
|
||||
#define BCM_3368_WDT_BASE (0xfff8c080)
|
||||
#define BCM_3368_UART0_BASE (0xfff8c100)
|
||||
#define BCM_3368_UART1_BASE (0xfff8c120)
|
||||
#define BCM_3368_GPIO_BASE (0xfff8c080)
|
||||
#define BCM_3368_SPI_BASE (0xfff8c800)
|
||||
#define BCM_3368_HSSPI_BASE (0xdeadbeef)
|
||||
#define BCM_3368_UDC0_BASE (0xdeadbeef)
|
||||
#define BCM_3368_USBDMA_BASE (0xdeadbeef)
|
||||
#define BCM_3368_OHCI0_BASE (0xdeadbeef)
|
||||
#define BCM_3368_OHCI_PRIV_BASE (0xdeadbeef)
|
||||
#define BCM_3368_USBH_PRIV_BASE (0xdeadbeef)
|
||||
#define BCM_3368_USBD_BASE (0xdeadbeef)
|
||||
#define BCM_3368_MPI_BASE (0xfff80000)
|
||||
#define BCM_3368_PCMCIA_BASE (0xfff80054)
|
||||
#define BCM_3368_PCIE_BASE (0xdeadbeef)
|
||||
#define BCM_3368_SDRAM_REGS_BASE (0xdeadbeef)
|
||||
#define BCM_3368_DSL_BASE (0xdeadbeef)
|
||||
#define BCM_3368_UBUS_BASE (0xdeadbeef)
|
||||
#define BCM_3368_ENET0_BASE (0xfff98000)
|
||||
#define BCM_3368_ENET1_BASE (0xfff98800)
|
||||
#define BCM_3368_ENETDMA_BASE (0xfff99800)
|
||||
#define BCM_3368_ENETDMAC_BASE (0xfff99900)
|
||||
#define BCM_3368_ENETDMAS_BASE (0xfff99a00)
|
||||
#define BCM_3368_ENETSW_BASE (0xdeadbeef)
|
||||
#define BCM_3368_EHCI0_BASE (0xdeadbeef)
|
||||
#define BCM_3368_SDRAM_BASE (0xdeadbeef)
|
||||
#define BCM_3368_MEMC_BASE (0xfff84000)
|
||||
#define BCM_3368_DDR_BASE (0xdeadbeef)
|
||||
#define BCM_3368_M2M_BASE (0xdeadbeef)
|
||||
#define BCM_3368_ATM_BASE (0xdeadbeef)
|
||||
#define BCM_3368_XTM_BASE (0xdeadbeef)
|
||||
#define BCM_3368_XTMDMA_BASE (0xdeadbeef)
|
||||
#define BCM_3368_XTMDMAC_BASE (0xdeadbeef)
|
||||
#define BCM_3368_XTMDMAS_BASE (0xdeadbeef)
|
||||
#define BCM_3368_PCM_BASE (0xfff9c200)
|
||||
#define BCM_3368_PCMDMA_BASE (0xdeadbeef)
|
||||
#define BCM_3368_PCMDMAC_BASE (0xdeadbeef)
|
||||
#define BCM_3368_PCMDMAS_BASE (0xdeadbeef)
|
||||
#define BCM_3368_RNG_BASE (0xdeadbeef)
|
||||
#define BCM_3368_MISC_BASE (0xdeadbeef)
|
||||
|
||||
/*
|
||||
* 6328 register sets base address
|
||||
*/
|
||||
@@ -238,6 +299,8 @@ enum bcm63xx_regs_set {
|
||||
#define BCM_6328_PCMDMAS_BASE (0xdeadbeef)
|
||||
#define BCM_6328_RNG_BASE (0xdeadbeef)
|
||||
#define BCM_6328_MISC_BASE (0xb0001800)
|
||||
#define BCM_6328_OTP_BASE (0xb0000600)
|
||||
|
||||
/*
|
||||
* 6338 register sets base address
|
||||
*/
|
||||
@@ -623,6 +686,9 @@ static inline unsigned long bcm63xx_regset_address(enum bcm63xx_regs_set set)
|
||||
#ifdef BCMCPU_RUNTIME_DETECT
|
||||
return bcm63xx_regs_base[set];
|
||||
#else
|
||||
#ifdef CONFIG_BCM63XX_CPU_3368
|
||||
__GEN_RSET(3368)
|
||||
#endif
|
||||
#ifdef CONFIG_BCM63XX_CPU_6328
|
||||
__GEN_RSET(6328)
|
||||
#endif
|
||||
@@ -689,6 +755,52 @@ enum bcm63xx_irq {
|
||||
IRQ_XTM_DMA0,
|
||||
};
|
||||
|
||||
/*
|
||||
* 3368 irqs
|
||||
*/
|
||||
#define BCM_3368_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)
|
||||
#define BCM_3368_SPI_IRQ (IRQ_INTERNAL_BASE + 1)
|
||||
#define BCM_3368_UART0_IRQ (IRQ_INTERNAL_BASE + 2)
|
||||
#define BCM_3368_UART1_IRQ (IRQ_INTERNAL_BASE + 3)
|
||||
#define BCM_3368_DSL_IRQ 0
|
||||
#define BCM_3368_UDC0_IRQ 0
|
||||
#define BCM_3368_OHCI0_IRQ 0
|
||||
#define BCM_3368_ENET0_IRQ (IRQ_INTERNAL_BASE + 8)
|
||||
#define BCM_3368_ENET1_IRQ (IRQ_INTERNAL_BASE + 6)
|
||||
#define BCM_3368_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 9)
|
||||
#define BCM_3368_ENET0_RXDMA_IRQ (IRQ_INTERNAL_BASE + 15)
|
||||
#define BCM_3368_ENET0_TXDMA_IRQ (IRQ_INTERNAL_BASE + 16)
|
||||
#define BCM_3368_HSSPI_IRQ 0
|
||||
#define BCM_3368_EHCI0_IRQ 0
|
||||
#define BCM_3368_USBD_IRQ 0
|
||||
#define BCM_3368_USBD_RXDMA0_IRQ 0
|
||||
#define BCM_3368_USBD_TXDMA0_IRQ 0
|
||||
#define BCM_3368_USBD_RXDMA1_IRQ 0
|
||||
#define BCM_3368_USBD_TXDMA1_IRQ 0
|
||||
#define BCM_3368_USBD_RXDMA2_IRQ 0
|
||||
#define BCM_3368_USBD_TXDMA2_IRQ 0
|
||||
#define BCM_3368_ENET1_RXDMA_IRQ (IRQ_INTERNAL_BASE + 17)
|
||||
#define BCM_3368_ENET1_TXDMA_IRQ (IRQ_INTERNAL_BASE + 18)
|
||||
#define BCM_3368_PCI_IRQ (IRQ_INTERNAL_BASE + 31)
|
||||
#define BCM_3368_PCMCIA_IRQ 0
|
||||
#define BCM_3368_ATM_IRQ 0
|
||||
#define BCM_3368_ENETSW_RXDMA0_IRQ 0
|
||||
#define BCM_3368_ENETSW_RXDMA1_IRQ 0
|
||||
#define BCM_3368_ENETSW_RXDMA2_IRQ 0
|
||||
#define BCM_3368_ENETSW_RXDMA3_IRQ 0
|
||||
#define BCM_3368_ENETSW_TXDMA0_IRQ 0
|
||||
#define BCM_3368_ENETSW_TXDMA1_IRQ 0
|
||||
#define BCM_3368_ENETSW_TXDMA2_IRQ 0
|
||||
#define BCM_3368_ENETSW_TXDMA3_IRQ 0
|
||||
#define BCM_3368_XTM_IRQ 0
|
||||
#define BCM_3368_XTM_DMA0_IRQ 0
|
||||
|
||||
#define BCM_3368_EXT_IRQ0 (IRQ_INTERNAL_BASE + 25)
|
||||
#define BCM_3368_EXT_IRQ1 (IRQ_INTERNAL_BASE + 26)
|
||||
#define BCM_3368_EXT_IRQ2 (IRQ_INTERNAL_BASE + 27)
|
||||
#define BCM_3368_EXT_IRQ3 (IRQ_INTERNAL_BASE + 28)
|
||||
|
||||
|
||||
/*
|
||||
* 6328 irqs
|
||||
*/
|
||||
|
@@ -11,6 +11,7 @@ static inline unsigned long bcm63xx_gpio_count(void)
|
||||
switch (bcm63xx_get_cpu_id()) {
|
||||
case BCM6328_CPU_ID:
|
||||
return 32;
|
||||
case BCM3368_CPU_ID:
|
||||
case BCM6358_CPU_ID:
|
||||
return 40;
|
||||
case BCM6338_CPU_ID:
|
||||
|
@@ -15,6 +15,39 @@
|
||||
/* Clock Control register */
|
||||
#define PERF_CKCTL_REG 0x4
|
||||
|
||||
#define CKCTL_3368_MAC_EN (1 << 3)
|
||||
#define CKCTL_3368_TC_EN (1 << 5)
|
||||
#define CKCTL_3368_US_TOP_EN (1 << 6)
|
||||
#define CKCTL_3368_DS_TOP_EN (1 << 7)
|
||||
#define CKCTL_3368_APM_EN (1 << 8)
|
||||
#define CKCTL_3368_SPI_EN (1 << 9)
|
||||
#define CKCTL_3368_USBS_EN (1 << 10)
|
||||
#define CKCTL_3368_BMU_EN (1 << 11)
|
||||
#define CKCTL_3368_PCM_EN (1 << 12)
|
||||
#define CKCTL_3368_NTP_EN (1 << 13)
|
||||
#define CKCTL_3368_ACP_B_EN (1 << 14)
|
||||
#define CKCTL_3368_ACP_A_EN (1 << 15)
|
||||
#define CKCTL_3368_EMUSB_EN (1 << 17)
|
||||
#define CKCTL_3368_ENET0_EN (1 << 18)
|
||||
#define CKCTL_3368_ENET1_EN (1 << 19)
|
||||
#define CKCTL_3368_USBU_EN (1 << 20)
|
||||
#define CKCTL_3368_EPHY_EN (1 << 21)
|
||||
|
||||
#define CKCTL_3368_ALL_SAFE_EN (CKCTL_3368_MAC_EN | \
|
||||
CKCTL_3368_TC_EN | \
|
||||
CKCTL_3368_US_TOP_EN | \
|
||||
CKCTL_3368_DS_TOP_EN | \
|
||||
CKCTL_3368_APM_EN | \
|
||||
CKCTL_3368_SPI_EN | \
|
||||
CKCTL_3368_USBS_EN | \
|
||||
CKCTL_3368_BMU_EN | \
|
||||
CKCTL_3368_PCM_EN | \
|
||||
CKCTL_3368_NTP_EN | \
|
||||
CKCTL_3368_ACP_B_EN | \
|
||||
CKCTL_3368_ACP_A_EN | \
|
||||
CKCTL_3368_EMUSB_EN | \
|
||||
CKCTL_3368_USBU_EN)
|
||||
|
||||
#define CKCTL_6328_PHYMIPS_EN (1 << 0)
|
||||
#define CKCTL_6328_ADSL_QPROC_EN (1 << 1)
|
||||
#define CKCTL_6328_ADSL_AFE_EN (1 << 2)
|
||||
@@ -181,6 +214,7 @@
|
||||
#define SYS_PLL_SOFT_RESET 0x1
|
||||
|
||||
/* Interrupt Mask register */
|
||||
#define PERF_IRQMASK_3368_REG 0xc
|
||||
#define PERF_IRQMASK_6328_REG 0x20
|
||||
#define PERF_IRQMASK_6338_REG 0xc
|
||||
#define PERF_IRQMASK_6345_REG 0xc
|
||||
@@ -190,6 +224,7 @@
|
||||
#define PERF_IRQMASK_6368_REG 0x20
|
||||
|
||||
/* Interrupt Status register */
|
||||
#define PERF_IRQSTAT_3368_REG 0x10
|
||||
#define PERF_IRQSTAT_6328_REG 0x28
|
||||
#define PERF_IRQSTAT_6338_REG 0x10
|
||||
#define PERF_IRQSTAT_6345_REG 0x10
|
||||
@@ -199,6 +234,7 @@
|
||||
#define PERF_IRQSTAT_6368_REG 0x28
|
||||
|
||||
/* External Interrupt Configuration register */
|
||||
#define PERF_EXTIRQ_CFG_REG_3368 0x14
|
||||
#define PERF_EXTIRQ_CFG_REG_6328 0x18
|
||||
#define PERF_EXTIRQ_CFG_REG_6338 0x14
|
||||
#define PERF_EXTIRQ_CFG_REG_6345 0x14
|
||||
@@ -236,6 +272,13 @@
|
||||
#define PERF_SOFTRESET_6362_REG 0x10
|
||||
#define PERF_SOFTRESET_6368_REG 0x10
|
||||
|
||||
#define SOFTRESET_3368_SPI_MASK (1 << 0)
|
||||
#define SOFTRESET_3368_ENET_MASK (1 << 2)
|
||||
#define SOFTRESET_3368_MPI_MASK (1 << 3)
|
||||
#define SOFTRESET_3368_EPHY_MASK (1 << 6)
|
||||
#define SOFTRESET_3368_USBS_MASK (1 << 11)
|
||||
#define SOFTRESET_3368_PCM_MASK (1 << 13)
|
||||
|
||||
#define SOFTRESET_6328_SPI_MASK (1 << 0)
|
||||
#define SOFTRESET_6328_EPHY_MASK (1 << 1)
|
||||
#define SOFTRESET_6328_SAR_MASK (1 << 2)
|
||||
@@ -1370,7 +1413,7 @@
|
||||
#define SPI_6348_RX_DATA 0x80
|
||||
#define SPI_6348_RX_DATA_SIZE 0x3f
|
||||
|
||||
/* BCM 6358/6262/6368 SPI core */
|
||||
/* BCM 3368/6358/6262/6368 SPI core */
|
||||
#define SPI_6358_MSG_CTL 0x00 /* 16-bits register */
|
||||
#define SPI_6358_MSG_CTL_WIDTH 16
|
||||
#define SPI_6358_MSG_DATA 0x02
|
||||
@@ -1511,4 +1554,11 @@
|
||||
|
||||
#define PCIE_DEVICE_OFFSET 0x8000
|
||||
|
||||
/*************************************************************************
|
||||
* _REG relative to RSET_OTP
|
||||
*************************************************************************/
|
||||
|
||||
#define OTP_USER_BITS_6328_REG(i) (0x20 + (i) * 4)
|
||||
#define OTP_6328_REG3_TP1_DISABLED BIT(9)
|
||||
|
||||
#endif /* BCM63XX_REGS_H_ */
|
||||
|
@@ -47,6 +47,12 @@ struct board_info {
|
||||
|
||||
/* GPIO LEDs */
|
||||
struct gpio_led leds[5];
|
||||
|
||||
/* External PHY reset GPIO */
|
||||
unsigned int ephy_reset_gpio;
|
||||
|
||||
/* External PHY reset GPIO flags from gpio.h */
|
||||
unsigned long ephy_reset_gpio_flags;
|
||||
};
|
||||
|
||||
#endif /* ! BOARD_BCM963XX_H_ */
|
||||
|
@@ -11,6 +11,10 @@ static inline phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size)
|
||||
static inline int is_bcm63xx_internal_registers(phys_t offset)
|
||||
{
|
||||
switch (bcm63xx_get_cpu_id()) {
|
||||
case BCM3368_CPU_ID:
|
||||
if (offset >= 0xfff80000)
|
||||
return 1;
|
||||
break;
|
||||
case BCM6338_CPU_ID:
|
||||
case BCM6345_CPU_ID:
|
||||
case BCM6348_CPU_ID:
|
||||
|
Reference in New Issue
Block a user