You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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:
@@ -30,7 +30,6 @@ platforms += sibyte
|
||||
platforms += sni
|
||||
platforms += txx9
|
||||
platforms += vr41xx
|
||||
platforms += wrppmc
|
||||
|
||||
# include the platform specific files
|
||||
include $(patsubst %, $(srctree)/arch/mips/%/Platform, $(platforms))
|
||||
|
||||
+28
-48
@@ -1,6 +1,7 @@
|
||||
config MIPS
|
||||
bool
|
||||
default y
|
||||
select HAVE_CONTEXT_TRACKING
|
||||
select HAVE_GENERIC_DMA_COHERENT
|
||||
select HAVE_IDE
|
||||
select HAVE_OPROFILE
|
||||
@@ -27,6 +28,7 @@ config MIPS
|
||||
select HAVE_GENERIC_HARDIRQS
|
||||
select GENERIC_IRQ_PROBE
|
||||
select GENERIC_IRQ_SHOW
|
||||
select GENERIC_PCI_IOMAP
|
||||
select HAVE_ARCH_JUMP_LABEL
|
||||
select ARCH_WANT_IPC_PARSE_VERSION
|
||||
select IRQ_FORCED_THREADING
|
||||
@@ -46,9 +48,6 @@ config MIPS
|
||||
|
||||
menu "Machine selection"
|
||||
|
||||
config ZONE_DMA
|
||||
bool
|
||||
|
||||
choice
|
||||
prompt "System type"
|
||||
default SGI_IP22
|
||||
@@ -124,11 +123,14 @@ config BCM47XX
|
||||
|
||||
config BCM63XX
|
||||
bool "Broadcom BCM63XX based boards"
|
||||
select BOOT_RAW
|
||||
select CEVT_R4K
|
||||
select CSRC_R4K
|
||||
select DMA_NONCOHERENT
|
||||
select IRQ_CPU
|
||||
select SYS_HAS_CPU_MIPS32_R1
|
||||
select SYS_HAS_CPU_BMIPS4350 if !BCM63XX_CPU_6338 && !BCM63XX_CPU_6345 && !BCM63XX_CPU_6348
|
||||
select NR_CPUS_DEFAULT_2
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
@@ -341,7 +343,6 @@ config MIPS_SEAD3
|
||||
select DMA_NONCOHERENT
|
||||
select IRQ_CPU
|
||||
select IRQ_GIC
|
||||
select MIPS_CPU_SCACHE
|
||||
select MIPS_MSC
|
||||
select SYS_HAS_CPU_MIPS32_R1
|
||||
select SYS_HAS_CPU_MIPS32_R2
|
||||
@@ -420,7 +421,6 @@ config POWERTV
|
||||
select CSRC_POWERTV
|
||||
select DMA_NONCOHERENT
|
||||
select HW_HAS_PCI
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
select SYS_HAS_CPU_MIPS32_R2
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
@@ -713,46 +713,8 @@ config MIKROTIK_RB532
|
||||
Support the Mikrotik(tm) RouterBoard 532 series,
|
||||
based on the IDT RC32434 SoC.
|
||||
|
||||
config WR_PPMC
|
||||
bool "Wind River PPMC board"
|
||||
select CEVT_R4K
|
||||
select CSRC_R4K
|
||||
select IRQ_CPU
|
||||
select BOOT_ELF32
|
||||
select DMA_NONCOHERENT
|
||||
select HW_HAS_PCI
|
||||
select PCI_GT64XXX_PCI0
|
||||
select SWAP_IO_SPACE
|
||||
select SYS_HAS_CPU_MIPS32_R1
|
||||
select SYS_HAS_CPU_MIPS32_R2
|
||||
select SYS_HAS_CPU_MIPS64_R1
|
||||
select SYS_HAS_CPU_NEVADA
|
||||
select SYS_HAS_CPU_RM7000
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_64BIT_KERNEL
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
help
|
||||
This enables support for the Wind River MIPS32 4KC PPMC evaluation
|
||||
board, which is based on GT64120 bridge chip.
|
||||
|
||||
config CAVIUM_OCTEON_SIMULATOR
|
||||
bool "Cavium Networks Octeon Simulator"
|
||||
select CEVT_R4K
|
||||
select 64BIT_PHYS_ADDR
|
||||
select DMA_COHERENT
|
||||
select SYS_SUPPORTS_64BIT_KERNEL
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_SUPPORTS_HOTPLUG_CPU
|
||||
select SYS_HAS_CPU_CAVIUM_OCTEON
|
||||
select HOLES_IN_ZONE
|
||||
help
|
||||
The Octeon simulator is software performance model of the Cavium
|
||||
Octeon Processor. It supports simulating Octeon processors on x86
|
||||
hardware.
|
||||
|
||||
config CAVIUM_OCTEON_REFERENCE_BOARD
|
||||
bool "Cavium Networks Octeon reference board"
|
||||
config CAVIUM_OCTEON_SOC
|
||||
bool "Cavium Networks Octeon SoC based boards"
|
||||
select CEVT_R4K
|
||||
select 64BIT_PHYS_ADDR
|
||||
select DMA_COHERENT
|
||||
@@ -806,6 +768,8 @@ config NLM_XLR_BOARD
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
select USB_ARCH_HAS_OHCI if USB_SUPPORT
|
||||
select USB_ARCH_HAS_EHCI if USB_SUPPORT
|
||||
select SYS_SUPPORTS_ZBOOT
|
||||
select SYS_SUPPORTS_ZBOOT_UART16550
|
||||
help
|
||||
Support for systems based on Netlogic XLR and XLS processors.
|
||||
Say Y here if you have a XLR or XLS based board.
|
||||
@@ -832,6 +796,8 @@ config NLM_XLP_BOARD
|
||||
select SYNC_R4K
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
select USE_OF
|
||||
select SYS_SUPPORTS_ZBOOT
|
||||
select SYS_SUPPORTS_ZBOOT_UART16550
|
||||
help
|
||||
This board is based on Netlogic XLP Processor.
|
||||
Say Y here if you have a XLP based board.
|
||||
@@ -1031,7 +997,6 @@ config CPU_BIG_ENDIAN
|
||||
config CPU_LITTLE_ENDIAN
|
||||
bool "Little endian"
|
||||
depends on SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
help
|
||||
|
||||
endchoice
|
||||
|
||||
@@ -1964,7 +1929,7 @@ config MIPS_MT_FPAFF
|
||||
|
||||
config MIPS_VPE_LOADER
|
||||
bool "VPE loader support."
|
||||
depends on SYS_SUPPORTS_MULTITHREADING
|
||||
depends on SYS_SUPPORTS_MULTITHREADING && MODULES
|
||||
select CPU_MIPSR2_IRQ_VI
|
||||
select CPU_MIPSR2_IRQ_EI
|
||||
select MIPS_MT
|
||||
@@ -2382,6 +2347,19 @@ config SECCOMP
|
||||
|
||||
If unsure, say Y. Only embedded should say N here.
|
||||
|
||||
config CC_STACKPROTECTOR
|
||||
bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
|
||||
help
|
||||
This option turns on the -fstack-protector GCC feature. This
|
||||
feature puts, at the beginning of functions, a canary value on
|
||||
the stack just before the return address, and validates
|
||||
the value just before actually returning. Stack based buffer
|
||||
overflows (that need to overwrite this return address) now also
|
||||
overwrite the canary, which gets detected and the attack is then
|
||||
neutralized via a kernel panic.
|
||||
|
||||
This feature requires gcc version 4.2 or above.
|
||||
|
||||
config USE_OF
|
||||
bool
|
||||
select OF
|
||||
@@ -2413,7 +2391,6 @@ config PCI
|
||||
bool "Support for PCI controller"
|
||||
depends on HW_HAS_PCI
|
||||
select PCI_DOMAINS
|
||||
select GENERIC_PCI_IOMAP
|
||||
select NO_GENERIC_PCI_IOPORT_MAP
|
||||
help
|
||||
Find out whether you have a PCI motherboard. PCI is the name of a
|
||||
@@ -2479,6 +2456,9 @@ config I8253
|
||||
select CLKEVT_I8253
|
||||
select MIPS_EXTERNAL_TIMER
|
||||
|
||||
config ZONE_DMA
|
||||
bool
|
||||
|
||||
config ZONE_DMA32
|
||||
bool
|
||||
|
||||
|
||||
@@ -227,6 +227,10 @@ KBUILD_CPPFLAGS += -DDATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)
|
||||
|
||||
LDFLAGS += -m $(ld-emul)
|
||||
|
||||
ifdef CONFIG_CC_STACKPROTECTOR
|
||||
KBUILD_CFLAGS += -fstack-protector
|
||||
endif
|
||||
|
||||
ifdef CONFIG_MIPS
|
||||
CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
|
||||
egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
|
||||
|
||||
@@ -132,7 +132,7 @@ static void __init ap136_pci_init(u8 *eeprom)
|
||||
ath79_register_pci();
|
||||
}
|
||||
#else
|
||||
static inline void ap136_pci_init(void) {}
|
||||
static inline void ap136_pci_init(u8 *eeprom) {}
|
||||
#endif /* CONFIG_PCI */
|
||||
|
||||
static void __init ap136_setup(void)
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
menu "CPU support"
|
||||
depends on BCM63XX
|
||||
|
||||
config BCM63XX_CPU_3368
|
||||
bool "support 3368 CPU"
|
||||
select HW_HAS_PCI
|
||||
|
||||
config BCM63XX_CPU_6328
|
||||
bool "support 6328 CPU"
|
||||
select HW_HAS_PCI
|
||||
@@ -8,14 +12,9 @@ config BCM63XX_CPU_6328
|
||||
config BCM63XX_CPU_6338
|
||||
bool "support 6338 CPU"
|
||||
select HW_HAS_PCI
|
||||
select USB_ARCH_HAS_OHCI
|
||||
select USB_OHCI_BIG_ENDIAN_DESC
|
||||
select USB_OHCI_BIG_ENDIAN_MMIO
|
||||
|
||||
config BCM63XX_CPU_6345
|
||||
bool "support 6345 CPU"
|
||||
select USB_OHCI_BIG_ENDIAN_DESC
|
||||
select USB_OHCI_BIG_ENDIAN_MMIO
|
||||
|
||||
config BCM63XX_CPU_6348
|
||||
bool "support 6348 CPU"
|
||||
|
||||
@@ -28,10 +28,46 @@
|
||||
#include <bcm63xx_dev_usb_usbd.h>
|
||||
#include <board_bcm963xx.h>
|
||||
|
||||
#include <uapi/linux/bcm933xx_hcs.h>
|
||||
|
||||
#define PFX "board_bcm963xx: "
|
||||
|
||||
#define HCS_OFFSET_128K 0x20000
|
||||
|
||||
static struct board_info board;
|
||||
|
||||
/*
|
||||
* known 3368 boards
|
||||
*/
|
||||
#ifdef CONFIG_BCM63XX_CPU_3368
|
||||
static struct board_info __initdata board_cvg834g = {
|
||||
.name = "CVG834G_E15R3921",
|
||||
.expected_cpu_id = 0x3368,
|
||||
|
||||
.has_uart0 = 1,
|
||||
.has_uart1 = 1,
|
||||
|
||||
.has_enet0 = 1,
|
||||
.has_pci = 1,
|
||||
|
||||
.enet0 = {
|
||||
.has_phy = 1,
|
||||
.use_internal_phy = 1,
|
||||
},
|
||||
|
||||
.leds = {
|
||||
{
|
||||
.name = "CVG834G:green:power",
|
||||
.gpio = 37,
|
||||
.default_trigger= "default-on",
|
||||
},
|
||||
},
|
||||
|
||||
.ephy_reset_gpio = 36,
|
||||
.ephy_reset_gpio_flags = GPIOF_INIT_HIGH,
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* known 6328 boards
|
||||
*/
|
||||
@@ -639,6 +675,9 @@ static struct board_info __initdata board_DWVS0 = {
|
||||
* all boards
|
||||
*/
|
||||
static const struct board_info __initconst *bcm963xx_boards[] = {
|
||||
#ifdef CONFIG_BCM63XX_CPU_3368
|
||||
&board_cvg834g,
|
||||
#endif
|
||||
#ifdef CONFIG_BCM63XX_CPU_6328
|
||||
&board_96328avng,
|
||||
#endif
|
||||
@@ -722,8 +761,9 @@ void __init board_prom_init(void)
|
||||
unsigned int i;
|
||||
u8 *boot_addr, *cfe;
|
||||
char cfe_version[32];
|
||||
char *board_name;
|
||||
char *board_name = NULL;
|
||||
u32 val;
|
||||
struct bcm_hcs *hcs;
|
||||
|
||||
/* read base address of boot chip select (0)
|
||||
* 6328/6362 do not have MPI but boot from a fixed address
|
||||
@@ -747,7 +787,12 @@ void __init board_prom_init(void)
|
||||
|
||||
bcm63xx_nvram_init(boot_addr + BCM963XX_NVRAM_OFFSET);
|
||||
|
||||
if (BCMCPU_IS_3368()) {
|
||||
hcs = (struct bcm_hcs *)boot_addr;
|
||||
board_name = hcs->filename;
|
||||
} else {
|
||||
board_name = bcm63xx_nvram_get_name();
|
||||
}
|
||||
/* find board by name */
|
||||
for (i = 0; i < ARRAY_SIZE(bcm963xx_boards); i++) {
|
||||
if (strncmp(board_name, bcm963xx_boards[i]->name, 16))
|
||||
@@ -877,5 +922,9 @@ int __init board_register_devices(void)
|
||||
|
||||
platform_device_register(&bcm63xx_gpio_leds);
|
||||
|
||||
if (board.ephy_reset_gpio && board.ephy_reset_gpio_flags)
|
||||
gpio_request_one(board.ephy_reset_gpio,
|
||||
board.ephy_reset_gpio_flags, "ephy-reset");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+19
-7
@@ -84,7 +84,7 @@ static void enetx_set(struct clk *clk, int enable)
|
||||
else
|
||||
clk_disable_unlocked(&clk_enet_misc);
|
||||
|
||||
if (BCMCPU_IS_6358()) {
|
||||
if (BCMCPU_IS_3368() || BCMCPU_IS_6358()) {
|
||||
u32 mask;
|
||||
|
||||
if (clk->id == 0)
|
||||
@@ -110,8 +110,7 @@ static struct clk clk_enet1 = {
|
||||
*/
|
||||
static void ephy_set(struct clk *clk, int enable)
|
||||
{
|
||||
if (!BCMCPU_IS_6358())
|
||||
return;
|
||||
if (BCMCPU_IS_3368() || BCMCPU_IS_6358())
|
||||
bcm_hwclock_set(CKCTL_6358_EPHY_EN, enable);
|
||||
}
|
||||
|
||||
@@ -155,8 +154,9 @@ static struct clk clk_enetsw = {
|
||||
*/
|
||||
static void pcm_set(struct clk *clk, int enable)
|
||||
{
|
||||
if (!BCMCPU_IS_6358())
|
||||
return;
|
||||
if (BCMCPU_IS_3368())
|
||||
bcm_hwclock_set(CKCTL_3368_PCM_EN, enable);
|
||||
if (BCMCPU_IS_6358())
|
||||
bcm_hwclock_set(CKCTL_6358_PCM_EN, enable);
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ static void spi_set(struct clk *clk, int enable)
|
||||
mask = CKCTL_6338_SPI_EN;
|
||||
else if (BCMCPU_IS_6348())
|
||||
mask = CKCTL_6348_SPI_EN;
|
||||
else if (BCMCPU_IS_6358())
|
||||
else if (BCMCPU_IS_3368() || BCMCPU_IS_6358())
|
||||
mask = CKCTL_6358_SPI_EN;
|
||||
else if (BCMCPU_IS_6362())
|
||||
mask = CKCTL_6362_SPI_EN;
|
||||
@@ -318,6 +318,18 @@ unsigned long clk_get_rate(struct clk *clk)
|
||||
|
||||
EXPORT_SYMBOL(clk_get_rate);
|
||||
|
||||
int clk_set_rate(struct clk *clk, unsigned long rate)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(clk_set_rate);
|
||||
|
||||
long clk_round_rate(struct clk *clk, unsigned long rate)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(clk_round_rate);
|
||||
|
||||
struct clk *clk_get(struct device *dev, const char *id)
|
||||
{
|
||||
if (!strcmp(id, "enet0"))
|
||||
@@ -338,7 +350,7 @@ struct clk *clk_get(struct device *dev, const char *id)
|
||||
return &clk_xtm;
|
||||
if (!strcmp(id, "periph"))
|
||||
return &clk_periph;
|
||||
if (BCMCPU_IS_6358() && !strcmp(id, "pcm"))
|
||||
if ((BCMCPU_IS_3368() || BCMCPU_IS_6358()) && !strcmp(id, "pcm"))
|
||||
return &clk_pcm;
|
||||
if ((BCMCPU_IS_6362() || BCMCPU_IS_6368()) && !strcmp(id, "ipsec"))
|
||||
return &clk_ipsec;
|
||||
|
||||
+25
-3
@@ -29,6 +29,14 @@ static u8 bcm63xx_cpu_rev;
|
||||
static unsigned int bcm63xx_cpu_freq;
|
||||
static unsigned int bcm63xx_memory_size;
|
||||
|
||||
static const unsigned long bcm3368_regs_base[] = {
|
||||
__GEN_CPU_REGS_TABLE(3368)
|
||||
};
|
||||
|
||||
static const int bcm3368_irqs[] = {
|
||||
__GEN_CPU_IRQ_TABLE(3368)
|
||||
};
|
||||
|
||||
static const unsigned long bcm6328_regs_base[] = {
|
||||
__GEN_CPU_REGS_TABLE(6328)
|
||||
};
|
||||
@@ -116,6 +124,9 @@ unsigned int bcm63xx_get_memory_size(void)
|
||||
static unsigned int detect_cpu_clock(void)
|
||||
{
|
||||
switch (bcm63xx_get_cpu_id()) {
|
||||
case BCM3368_CPU_ID:
|
||||
return 300000000;
|
||||
|
||||
case BCM6328_CPU_ID:
|
||||
{
|
||||
unsigned int tmp, mips_pll_fcvo;
|
||||
@@ -266,7 +277,7 @@ static unsigned int detect_memory_size(void)
|
||||
banks = (val & SDRAM_CFG_BANK_MASK) ? 2 : 1;
|
||||
}
|
||||
|
||||
if (BCMCPU_IS_6358() || BCMCPU_IS_6368()) {
|
||||
if (BCMCPU_IS_3368() || BCMCPU_IS_6358() || BCMCPU_IS_6368()) {
|
||||
val = bcm_memc_readl(MEMC_CFG_REG);
|
||||
rows = (val & MEMC_CFG_ROW_MASK) >> MEMC_CFG_ROW_SHIFT;
|
||||
cols = (val & MEMC_CFG_COL_MASK) >> MEMC_CFG_COL_SHIFT;
|
||||
@@ -302,12 +313,19 @@ void __init bcm63xx_cpu_init(void)
|
||||
chipid_reg = BCM_6345_PERF_BASE;
|
||||
break;
|
||||
case CPU_BMIPS4350:
|
||||
if ((read_c0_prid() & 0xf0) == 0x10)
|
||||
switch ((read_c0_prid() & 0xff)) {
|
||||
case 0x04:
|
||||
chipid_reg = BCM_3368_PERF_BASE;
|
||||
break;
|
||||
case 0x10:
|
||||
chipid_reg = BCM_6345_PERF_BASE;
|
||||
else
|
||||
break;
|
||||
default:
|
||||
chipid_reg = BCM_6368_PERF_BASE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* really early to panic, but delaying panic would not help since we
|
||||
@@ -322,6 +340,10 @@ void __init bcm63xx_cpu_init(void)
|
||||
bcm63xx_cpu_rev = (tmp & REV_REVID_MASK) >> REV_REVID_SHIFT;
|
||||
|
||||
switch (bcm63xx_cpu_id) {
|
||||
case BCM3368_CPU_ID:
|
||||
bcm63xx_regs_base = bcm3368_regs_base;
|
||||
bcm63xx_irqs = bcm3368_irqs;
|
||||
break;
|
||||
case BCM6328_CPU_ID:
|
||||
bcm63xx_regs_base = bcm6328_regs_base;
|
||||
bcm63xx_irqs = bcm6328_irqs;
|
||||
|
||||
@@ -71,6 +71,7 @@ static int __init bcm63xx_detect_flash_type(void)
|
||||
case BCM6348_CPU_ID:
|
||||
/* no way to auto detect so assume parallel */
|
||||
return BCM63XX_FLASH_TYPE_PARALLEL;
|
||||
case BCM3368_CPU_ID:
|
||||
case BCM6358_CPU_ID:
|
||||
val = bcm_gpio_readl(GPIO_STRAPBUS_REG);
|
||||
if (val & STRAPBUS_6358_BOOT_SEL_PARALLEL)
|
||||
|
||||
@@ -37,7 +37,8 @@ static __init void bcm63xx_spi_regs_init(void)
|
||||
{
|
||||
if (BCMCPU_IS_6338() || BCMCPU_IS_6348())
|
||||
bcm63xx_regs_spi = bcm6348_regs_spi;
|
||||
if (BCMCPU_IS_6358() || BCMCPU_IS_6362() || BCMCPU_IS_6368())
|
||||
if (BCMCPU_IS_3368() || BCMCPU_IS_6358() ||
|
||||
BCMCPU_IS_6362() || BCMCPU_IS_6368())
|
||||
bcm63xx_regs_spi = bcm6358_regs_spi;
|
||||
}
|
||||
#else
|
||||
@@ -87,7 +88,8 @@ int __init bcm63xx_spi_register(void)
|
||||
spi_pdata.msg_ctl_width = SPI_6348_MSG_CTL_WIDTH;
|
||||
}
|
||||
|
||||
if (BCMCPU_IS_6358() || BCMCPU_IS_6362() || BCMCPU_IS_6368()) {
|
||||
if (BCMCPU_IS_3368() || BCMCPU_IS_6358() || BCMCPU_IS_6362() ||
|
||||
BCMCPU_IS_6368()) {
|
||||
spi_resources[0].end += BCM_6358_RSET_SPI_SIZE - 1;
|
||||
spi_pdata.fifo_size = SPI_6358_MSG_DATA_SIZE;
|
||||
spi_pdata.msg_type_shift = SPI_6358_MSG_TYPE_SHIFT;
|
||||
|
||||
@@ -54,7 +54,8 @@ int __init bcm63xx_uart_register(unsigned int id)
|
||||
if (id >= ARRAY_SIZE(bcm63xx_uart_devices))
|
||||
return -ENODEV;
|
||||
|
||||
if (id == 1 && (!BCMCPU_IS_6358() && !BCMCPU_IS_6368()))
|
||||
if (id == 1 && (!BCMCPU_IS_3368() && !BCMCPU_IS_6358() &&
|
||||
!BCMCPU_IS_6368()))
|
||||
return -ENODEV;
|
||||
|
||||
if (id == 0) {
|
||||
|
||||
@@ -27,6 +27,17 @@ static void __internal_irq_unmask_32(unsigned int irq) __maybe_unused;
|
||||
static void __internal_irq_unmask_64(unsigned int irq) __maybe_unused;
|
||||
|
||||
#ifndef BCMCPU_RUNTIME_DETECT
|
||||
#ifdef CONFIG_BCM63XX_CPU_3368
|
||||
#define irq_stat_reg PERF_IRQSTAT_3368_REG
|
||||
#define irq_mask_reg PERF_IRQMASK_3368_REG
|
||||
#define irq_bits 32
|
||||
#define is_ext_irq_cascaded 0
|
||||
#define ext_irq_start 0
|
||||
#define ext_irq_end 0
|
||||
#define ext_irq_count 4
|
||||
#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_3368
|
||||
#define ext_irq_cfg_reg2 0
|
||||
#endif
|
||||
#ifdef CONFIG_BCM63XX_CPU_6328
|
||||
#define irq_stat_reg PERF_IRQSTAT_6328_REG
|
||||
#define irq_mask_reg PERF_IRQMASK_6328_REG
|
||||
@@ -140,6 +151,13 @@ static void bcm63xx_init_irq(void)
|
||||
irq_mask_addr = bcm63xx_regset_address(RSET_PERF);
|
||||
|
||||
switch (bcm63xx_get_cpu_id()) {
|
||||
case BCM3368_CPU_ID:
|
||||
irq_stat_addr += PERF_IRQSTAT_3368_REG;
|
||||
irq_mask_addr += PERF_IRQMASK_3368_REG;
|
||||
irq_bits = 32;
|
||||
ext_irq_count = 4;
|
||||
ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_3368;
|
||||
break;
|
||||
case BCM6328_CPU_ID:
|
||||
irq_stat_addr += PERF_IRQSTAT_6328_REG;
|
||||
irq_mask_addr += PERF_IRQMASK_6328_REG;
|
||||
@@ -294,6 +312,10 @@ asmlinkage void plat_irq_dispatch(void)
|
||||
|
||||
if (cause & CAUSEF_IP7)
|
||||
do_IRQ(7);
|
||||
if (cause & CAUSEF_IP0)
|
||||
do_IRQ(0);
|
||||
if (cause & CAUSEF_IP1)
|
||||
do_IRQ(1);
|
||||
if (cause & CAUSEF_IP2)
|
||||
dispatch_internal();
|
||||
if (!is_ext_irq_cascaded) {
|
||||
@@ -475,6 +497,7 @@ static int bcm63xx_external_irq_set_type(struct irq_data *d,
|
||||
reg &= ~EXTIRQ_CFG_BOTHEDGE_6348(irq);
|
||||
break;
|
||||
|
||||
case BCM3368_CPU_ID:
|
||||
case BCM6328_CPU_ID:
|
||||
case BCM6338_CPU_ID:
|
||||
case BCM6345_CPU_ID:
|
||||
|
||||
@@ -42,6 +42,7 @@ void __init bcm63xx_nvram_init(void *addr)
|
||||
{
|
||||
unsigned int check_len;
|
||||
u32 crc, expected_crc;
|
||||
u8 hcs_mac_addr[ETH_ALEN] = { 0x00, 0x10, 0x18, 0xff, 0xff, 0xff };
|
||||
|
||||
/* extract nvram data */
|
||||
memcpy(&nvram, addr, sizeof(nvram));
|
||||
@@ -62,6 +63,15 @@ void __init bcm63xx_nvram_init(void *addr)
|
||||
if (crc != expected_crc)
|
||||
pr_warn("nvram checksum failed, contents may be invalid (expected %08x, got %08x)\n",
|
||||
expected_crc, crc);
|
||||
|
||||
/* Cable modems have a different NVRAM which is embedded in the eCos
|
||||
* firmware and not easily extractible, give at least a MAC address
|
||||
* pool.
|
||||
*/
|
||||
if (BCMCPU_IS_3368()) {
|
||||
memcpy(nvram.mac_addr_base, hcs_mac_addr, ETH_ALEN);
|
||||
nvram.mac_addr_count = 2;
|
||||
}
|
||||
}
|
||||
|
||||
u8 *bcm63xx_nvram_get_name(void)
|
||||
|
||||
@@ -8,7 +8,11 @@
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/bootmem.h>
|
||||
#include <linux/smp.h>
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/bmips.h>
|
||||
#include <asm/smp-ops.h>
|
||||
#include <asm/mipsregs.h>
|
||||
#include <bcm63xx_board.h>
|
||||
#include <bcm63xx_cpu.h>
|
||||
#include <bcm63xx_io.h>
|
||||
@@ -26,7 +30,9 @@ void __init prom_init(void)
|
||||
bcm_wdt_writel(WDT_STOP_2, WDT_CTL_REG);
|
||||
|
||||
/* disable all hardware blocks clock for now */
|
||||
if (BCMCPU_IS_6328())
|
||||
if (BCMCPU_IS_3368())
|
||||
mask = CKCTL_3368_ALL_SAFE_EN;
|
||||
else if (BCMCPU_IS_6328())
|
||||
mask = CKCTL_6328_ALL_SAFE_EN;
|
||||
else if (BCMCPU_IS_6338())
|
||||
mask = CKCTL_6338_ALL_SAFE_EN;
|
||||
@@ -52,6 +58,47 @@ void __init prom_init(void)
|
||||
|
||||
/* do low level board init */
|
||||
board_prom_init();
|
||||
|
||||
if (IS_ENABLED(CONFIG_CPU_BMIPS4350) && IS_ENABLED(CONFIG_SMP)) {
|
||||
/* set up SMP */
|
||||
register_smp_ops(&bmips_smp_ops);
|
||||
|
||||
/*
|
||||
* BCM6328 might not have its second CPU enabled, while BCM6358
|
||||
* needs special handling for its shared TLB, so disable SMP
|
||||
* for now.
|
||||
*/
|
||||
if (BCMCPU_IS_6328()) {
|
||||
reg = bcm_readl(BCM_6328_OTP_BASE +
|
||||
OTP_USER_BITS_6328_REG(3));
|
||||
|
||||
if (reg & OTP_6328_REG3_TP1_DISABLED)
|
||||
bmips_smp_enabled = 0;
|
||||
} else if (BCMCPU_IS_6358()) {
|
||||
bmips_smp_enabled = 0;
|
||||
}
|
||||
|
||||
if (!bmips_smp_enabled)
|
||||
return;
|
||||
|
||||
/*
|
||||
* The bootloader has set up the CPU1 reset vector at
|
||||
* 0xa000_0200.
|
||||
* This conflicts with the special interrupt vector (IV).
|
||||
* The bootloader has also set up CPU1 to respond to the wrong
|
||||
* IPI interrupt.
|
||||
* Here we will start up CPU1 in the background and ask it to
|
||||
* reconfigure itself then go back to sleep.
|
||||
*/
|
||||
memcpy((void *)0xa0000200, &bmips_smp_movevec, 0x20);
|
||||
__sync();
|
||||
set_c0_cause(C_SW0);
|
||||
cpumask_set_cpu(1, &bmips_booted_mask);
|
||||
|
||||
/*
|
||||
* FIXME: we really should have some sort of hazard barrier here
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
void __init prom_free_prom_memory(void)
|
||||
|
||||
@@ -30,6 +30,19 @@
|
||||
[BCM63XX_RESET_PCIE] = BCM## __cpu ##_RESET_PCIE, \
|
||||
[BCM63XX_RESET_PCIE_EXT] = BCM## __cpu ##_RESET_PCIE_EXT,
|
||||
|
||||
#define BCM3368_RESET_SPI SOFTRESET_3368_SPI_MASK
|
||||
#define BCM3368_RESET_ENET SOFTRESET_3368_ENET_MASK
|
||||
#define BCM3368_RESET_USBH 0
|
||||
#define BCM3368_RESET_USBD SOFTRESET_3368_USBS_MASK
|
||||
#define BCM3368_RESET_DSL 0
|
||||
#define BCM3368_RESET_SAR 0
|
||||
#define BCM3368_RESET_EPHY SOFTRESET_3368_EPHY_MASK
|
||||
#define BCM3368_RESET_ENETSW 0
|
||||
#define BCM3368_RESET_PCM SOFTRESET_3368_PCM_MASK
|
||||
#define BCM3368_RESET_MPI SOFTRESET_3368_MPI_MASK
|
||||
#define BCM3368_RESET_PCIE 0
|
||||
#define BCM3368_RESET_PCIE_EXT 0
|
||||
|
||||
#define BCM6328_RESET_SPI SOFTRESET_6328_SPI_MASK
|
||||
#define BCM6328_RESET_ENET 0
|
||||
#define BCM6328_RESET_USBH SOFTRESET_6328_USBH_MASK
|
||||
@@ -117,6 +130,10 @@
|
||||
/*
|
||||
* core reset bits
|
||||
*/
|
||||
static const u32 bcm3368_reset_bits[] = {
|
||||
__GEN_RESET_BITS_TABLE(3368)
|
||||
};
|
||||
|
||||
static const u32 bcm6328_reset_bits[] = {
|
||||
__GEN_RESET_BITS_TABLE(6328)
|
||||
};
|
||||
@@ -146,7 +163,10 @@ static int reset_reg;
|
||||
|
||||
static int __init bcm63xx_reset_bits_init(void)
|
||||
{
|
||||
if (BCMCPU_IS_6328()) {
|
||||
if (BCMCPU_IS_3368()) {
|
||||
reset_reg = PERF_SOFTRESET_6358_REG;
|
||||
bcm63xx_reset_bits = bcm3368_reset_bits;
|
||||
} else if (BCMCPU_IS_6328()) {
|
||||
reset_reg = PERF_SOFTRESET_6328_REG;
|
||||
bcm63xx_reset_bits = bcm6328_reset_bits;
|
||||
} else if (BCMCPU_IS_6338()) {
|
||||
@@ -170,6 +190,13 @@ static int __init bcm63xx_reset_bits_init(void)
|
||||
}
|
||||
#else
|
||||
|
||||
#ifdef CONFIG_BCM63XX_CPU_3368
|
||||
static const u32 bcm63xx_reset_bits[] = {
|
||||
__GEN_RESET_BITS_TABLE(3368)
|
||||
};
|
||||
#define reset_reg PERF_SOFTRESET_6358_REG
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BCM63XX_CPU_6328
|
||||
static const u32 bcm63xx_reset_bits[] = {
|
||||
__GEN_RESET_BITS_TABLE(6328)
|
||||
|
||||
@@ -68,6 +68,9 @@ void bcm63xx_machine_reboot(void)
|
||||
|
||||
/* mask and clear all external irq */
|
||||
switch (bcm63xx_get_cpu_id()) {
|
||||
case BCM3368_CPU_ID:
|
||||
perf_regs[0] = PERF_EXTIRQ_CFG_REG_3368;
|
||||
break;
|
||||
case BCM6328_CPU_ID:
|
||||
perf_regs[0] = PERF_EXTIRQ_CFG_REG_6328;
|
||||
break;
|
||||
|
||||
@@ -18,6 +18,8 @@ BOOT_HEAP_SIZE := 0x400000
|
||||
# Disable Function Tracer
|
||||
KBUILD_CFLAGS := $(shell echo $(KBUILD_CFLAGS) | sed -e "s/-pg//")
|
||||
|
||||
KBUILD_CFLAGS := $(filter-out -fstack-protector, $(KBUILD_CFLAGS))
|
||||
|
||||
KBUILD_CFLAGS := $(LINUXINCLUDE) $(KBUILD_CFLAGS) -D__KERNEL__ \
|
||||
-DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) -D"VMLINUX_LOAD_ADDRESS_ULL=$(VMLINUX_LOAD_ADDRESS)ull"
|
||||
|
||||
|
||||
@@ -23,23 +23,39 @@
|
||||
#define PORT(offset) (UART0_BASE + (4 * offset))
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_XLR
|
||||
#define UART0_BASE 0x1EF14000
|
||||
#define PORT(offset) (CKSEG1ADDR(UART0_BASE) + (4 * offset))
|
||||
#define IOTYPE unsigned int
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_XLP
|
||||
#define UART0_BASE 0x18030100
|
||||
#define PORT(offset) (CKSEG1ADDR(UART0_BASE) + (4 * offset))
|
||||
#define IOTYPE unsigned int
|
||||
#endif
|
||||
|
||||
#ifndef IOTYPE
|
||||
#define IOTYPE char
|
||||
#endif
|
||||
|
||||
#ifndef PORT
|
||||
#error please define the serial port address for your own machine
|
||||
#endif
|
||||
|
||||
static inline unsigned int serial_in(int offset)
|
||||
{
|
||||
return *((char *)PORT(offset));
|
||||
return *((volatile IOTYPE *)PORT(offset)) & 0xFF;
|
||||
}
|
||||
|
||||
static inline void serial_out(int offset, int value)
|
||||
{
|
||||
*((char *)PORT(offset)) = value;
|
||||
*((volatile IOTYPE *)PORT(offset)) = value & 0xFF;
|
||||
}
|
||||
|
||||
void putc(char c)
|
||||
{
|
||||
int timeout = 1024;
|
||||
int timeout = 1000000;
|
||||
|
||||
while (((serial_in(UART_LSR) & UART_LSR_THRE) == 0) && (timeout-- > 0))
|
||||
;
|
||||
|
||||
@@ -10,6 +10,10 @@ config CAVIUM_CN63XXP1
|
||||
non-CN63XXP1 hardware, so it is recommended to select "n"
|
||||
unless it is known the workarounds are needed.
|
||||
|
||||
endif # CPU_CAVIUM_OCTEON
|
||||
|
||||
if CAVIUM_OCTEON_SOC
|
||||
|
||||
config CAVIUM_OCTEON_2ND_KERNEL
|
||||
bool "Build the kernel to be used as a 2nd kernel on the same chip"
|
||||
default "n"
|
||||
@@ -19,17 +23,6 @@ config CAVIUM_OCTEON_2ND_KERNEL
|
||||
with this option to be run at the same time as one built without this
|
||||
option.
|
||||
|
||||
config CAVIUM_OCTEON_HW_FIX_UNALIGNED
|
||||
bool "Enable hardware fixups of unaligned loads and stores"
|
||||
default "y"
|
||||
help
|
||||
Configure the Octeon hardware to automatically fix unaligned loads
|
||||
and stores. Normally unaligned accesses are fixed using a kernel
|
||||
exception handler. This option enables the hardware automatic fixups,
|
||||
which requires only an extra 3 cycles. Disable this option if you
|
||||
are running code that relies on address exceptions on unaligned
|
||||
accesses.
|
||||
|
||||
config CAVIUM_OCTEON_CVMSEG_SIZE
|
||||
int "Number of L1 cache lines reserved for CVMSEG memory"
|
||||
range 0 54
|
||||
@@ -103,4 +96,4 @@ config OCTEON_ILM
|
||||
To compile this driver as a module, choose M here. The module
|
||||
will be called octeon-ilm
|
||||
|
||||
endif # CPU_CAVIUM_OCTEON
|
||||
endif # CAVIUM_OCTEON_SOC
|
||||
|
||||
@@ -12,11 +12,12 @@
|
||||
CFLAGS_octeon-platform.o = -I$(src)/../../../scripts/dtc/libfdt
|
||||
CFLAGS_setup.o = -I$(src)/../../../scripts/dtc/libfdt
|
||||
|
||||
obj-y := cpu.o setup.o serial.o octeon-platform.o octeon-irq.o csrc-octeon.o
|
||||
obj-y += dma-octeon.o flash_setup.o
|
||||
obj-y := cpu.o setup.o octeon-platform.o octeon-irq.o csrc-octeon.o
|
||||
obj-y += dma-octeon.o
|
||||
obj-y += octeon-memcpy.o
|
||||
obj-y += executive/
|
||||
|
||||
obj-$(CONFIG_MTD) += flash_setup.o
|
||||
obj-$(CONFIG_SMP) += smp.o
|
||||
obj-$(CONFIG_OCTEON_ILM) += oct_ilm.o
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user