From 8a38dacf87180738d42b058334c951eba15d2d47 Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Mon, 10 Dec 2018 12:40:38 +0100 Subject: MIPS: BCM63XX: fix switch core reset on BCM6368 The Ethernet Switch core mask was set to 0, causing the switch core to be not reset on BCM6368 on boot. Provide the proper mask so the switch core gets reset to a known good state. Fixes: 799faa626c71 ("MIPS: BCM63XX: add core reset helper") Signed-off-by: Jonas Gorski Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Ralf Baechle Cc: James Hogan Cc: Florian Fainelli --- arch/mips/bcm63xx/reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/bcm63xx/reset.c b/arch/mips/bcm63xx/reset.c index a2af38cf28a7..64574e74cb23 100644 --- a/arch/mips/bcm63xx/reset.c +++ b/arch/mips/bcm63xx/reset.c @@ -120,7 +120,7 @@ #define BCM6368_RESET_DSL 0 #define BCM6368_RESET_SAR SOFTRESET_6368_SAR_MASK #define BCM6368_RESET_EPHY SOFTRESET_6368_EPHY_MASK -#define BCM6368_RESET_ENETSW 0 +#define BCM6368_RESET_ENETSW SOFTRESET_6368_ENETSW_MASK #define BCM6368_RESET_PCM SOFTRESET_6368_PCM_MASK #define BCM6368_RESET_MPI SOFTRESET_6368_MPI_MASK #define BCM6368_RESET_PCIE 0 -- cgit v1.2.3 From bbb8a75208937beee3bba746da7addb194588619 Mon Sep 17 00:00:00 2001 From: Manuel Lauss Date: Wed, 19 Dec 2018 08:07:59 +0100 Subject: MIPS: alchemy: cpu_all_mask is forbidden for clock event devices change alchemy clock event device cpu_all_mask to cpu_possible_mask. Gets rid of a warning, which then does the same substitution: WARNING: CPU: 0 PID: 0 at kernel/time/clockevents.c:468 clockevents_register_device+0x130/0x140 rtcmatch2 cpumask == cpu_all_mask, using cpu_possible_mask instead Signed-off-by: Manuel Lauss Signed-off-by: Paul Burton Cc: Linux-MIPS --- arch/mips/alchemy/common/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c index 32d1333bb243..166e842c044f 100644 --- a/arch/mips/alchemy/common/time.c +++ b/arch/mips/alchemy/common/time.c @@ -81,7 +81,7 @@ static struct clock_event_device au1x_rtcmatch2_clockdev = { .features = CLOCK_EVT_FEAT_ONESHOT, .rating = 1500, .set_next_event = au1x_rtcmatch2_set_next_event, - .cpumask = cpu_all_mask, + .cpumask = cpu_possible_mask, }; static struct irqaction au1x_rtcmatch2_irqaction = { -- cgit v1.2.3 From e898d084eae086762406d487b3e81185c47de35d Mon Sep 17 00:00:00 2001 From: Manuel Lauss Date: Wed, 19 Dec 2018 08:08:01 +0100 Subject: MIPS: Alchemy: drop DB1000 IrDA support bits The IrDA drivers are gone, drop the now unused DB1000 board support for it. Signed-off-by: Manuel Lauss Signed-off-by: Paul Burton Cc: Linux-MIPS --- arch/mips/alchemy/devboards/db1000.c | 58 ------------------------------------ 1 file changed, 58 deletions(-) diff --git a/arch/mips/alchemy/devboards/db1000.c b/arch/mips/alchemy/devboards/db1000.c index 13e3c84859fe..aab842a8ddf3 100644 --- a/arch/mips/alchemy/devboards/db1000.c +++ b/arch/mips/alchemy/devboards/db1000.c @@ -389,58 +389,6 @@ static struct platform_device db1100_mmc1_dev = { /******************************************************************************/ -static void db1000_irda_set_phy_mode(int mode) -{ - unsigned short mask = BCSR_RESETS_IRDA_MODE_MASK | BCSR_RESETS_FIR_SEL; - - switch (mode) { - case AU1000_IRDA_PHY_MODE_OFF: - bcsr_mod(BCSR_RESETS, mask, BCSR_RESETS_IRDA_MODE_OFF); - break; - case AU1000_IRDA_PHY_MODE_SIR: - bcsr_mod(BCSR_RESETS, mask, BCSR_RESETS_IRDA_MODE_FULL); - break; - case AU1000_IRDA_PHY_MODE_FIR: - bcsr_mod(BCSR_RESETS, mask, BCSR_RESETS_IRDA_MODE_FULL | - BCSR_RESETS_FIR_SEL); - break; - } -} - -static struct au1k_irda_platform_data db1000_irda_platdata = { - .set_phy_mode = db1000_irda_set_phy_mode, -}; - -static struct resource au1000_irda_res[] = { - [0] = { - .start = AU1000_IRDA_PHYS_ADDR, - .end = AU1000_IRDA_PHYS_ADDR + 0x0fff, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = AU1000_IRDA_TX_INT, - .end = AU1000_IRDA_TX_INT, - .flags = IORESOURCE_IRQ, - }, - [2] = { - .start = AU1000_IRDA_RX_INT, - .end = AU1000_IRDA_RX_INT, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device db1000_irda_dev = { - .name = "au1000-irda", - .id = -1, - .dev = { - .platform_data = &db1000_irda_platdata, - }, - .resource = au1000_irda_res, - .num_resources = ARRAY_SIZE(au1000_irda_res), -}; - -/******************************************************************************/ - static struct ads7846_platform_data db1100_touch_pd = { .model = 7846, .vref_mv = 3300, @@ -497,15 +445,10 @@ static struct platform_device *db1x00_devs[] = { &db1x00_audio_dev, }; -static struct platform_device *db1000_devs[] = { - &db1000_irda_dev, -}; - static struct platform_device *db1100_devs[] = { &au1100_lcd_device, &db1100_mmc0_dev, &db1100_mmc1_dev, - &db1000_irda_dev, }; int __init db1000_dev_setup(void) @@ -565,7 +508,6 @@ int __init db1000_dev_setup(void) d1 = 3; /* GPIO number, NOT irq! */ s0 = AU1000_GPIO1_INT; s1 = AU1000_GPIO4_INT; - platform_add_devices(db1000_devs, ARRAY_SIZE(db1000_devs)); } else if ((board == BCSR_WHOAMI_PB1500) || (board == BCSR_WHOAMI_PB1500R2)) { c0 = AU1500_GPIO203_INT; -- cgit v1.2.3 From 7a3097be955efd979e96ced5edab651a4c09d42f Mon Sep 17 00:00:00 2001 From: Manuel Lauss Date: Wed, 19 Dec 2018 08:08:02 +0100 Subject: MIPS: Alchemy: update cpu-feature-overrides No shiny new stuff for Alchemy. Tested on DB1300 and DB1500. Signed-off-by: Manuel Lauss Signed-off-by: Paul Burton Cc: Linux-MIPS --- arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h b/arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h index f439cf9cf9d1..ecfbb5aeada3 100644 --- a/arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h @@ -75,10 +75,12 @@ #define cpu_dcache_line_size() 32 #define cpu_icache_line_size() 32 #define cpu_scache_line_size() 0 +#define cpu_tcache_line_size() 0 #define cpu_has_perf_cntr_intr_bit 0 #define cpu_has_vz 0 #define cpu_has_msa 0 +#define cpu_has_ufr 0 #define cpu_has_fre 0 #define cpu_has_cdmm 0 #define cpu_has_small_pages 0 @@ -88,5 +90,6 @@ #define cpu_has_badinstr 0 #define cpu_has_badinstrp 0 #define cpu_has_contextconfig 0 +#define cpu_has_perf 0 #endif /* __ASM_MACH_AU1X00_CPU_FEATURE_OVERRIDES_H */ -- cgit v1.2.3 From 994bc7fae916f8783ea7d357f1ccd6b3a67919f7 Mon Sep 17 00:00:00 2001 From: Manuel Lauss Date: Wed, 19 Dec 2018 08:08:03 +0100 Subject: MIPS: Alchemy: update dma masks for devboard devices Fix the DMA masks for sound and mmc devices. Verified on DB1300 and DB1500. Signed-off-by: Manuel Lauss Signed-off-by: Paul Burton Cc: Linux-MIPS --- arch/mips/alchemy/devboards/db1000.c | 18 +++++++++++------- arch/mips/alchemy/devboards/db1200.c | 24 +++++++++++------------- arch/mips/alchemy/devboards/db1300.c | 23 +++++++++++++++++++---- arch/mips/alchemy/devboards/db1550.c | 13 +++++++++++-- 4 files changed, 52 insertions(+), 26 deletions(-) diff --git a/arch/mips/alchemy/devboards/db1000.c b/arch/mips/alchemy/devboards/db1000.c index aab842a8ddf3..7f99592cf56b 100644 --- a/arch/mips/alchemy/devboards/db1000.c +++ b/arch/mips/alchemy/devboards/db1000.c @@ -82,6 +82,8 @@ static int db1500_map_pci_irq(const struct pci_dev *d, u8 slot, u8 pin) return -1; } +static u64 au1xxx_all_dmamask = DMA_BIT_MASK(32); + static struct resource alchemy_pci_host_res[] = { [0] = { .start = AU1500_PCI_PHYS_ADDR, @@ -120,13 +122,11 @@ static struct resource au1100_lcd_resources[] = { } }; -static u64 au1100_lcd_dmamask = DMA_BIT_MASK(32); - static struct platform_device au1100_lcd_device = { .name = "au1100-lcd", .id = 0, .dev = { - .dma_mask = &au1100_lcd_dmamask, + .dma_mask = &au1xxx_all_dmamask, .coherent_dma_mask = DMA_BIT_MASK(32), }, .num_resources = ARRAY_SIZE(au1100_lcd_resources), @@ -170,6 +170,10 @@ static struct platform_device db1x00_codec_dev = { static struct platform_device db1x00_audio_dev = { .name = "db1000-audio", + .dev = { + .dma_mask = &au1xxx_all_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(32), + }, }; /******************************************************************************/ @@ -338,13 +342,11 @@ static struct resource au1100_mmc0_resources[] = { } }; -static u64 au1xxx_mmc_dmamask = DMA_BIT_MASK(32); - static struct platform_device db1100_mmc0_dev = { .name = "au1xxx-mmc", .id = 0, .dev = { - .dma_mask = &au1xxx_mmc_dmamask, + .dma_mask = &au1xxx_all_dmamask, .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = &db1100_mmc_platdata[0], }, @@ -379,7 +381,7 @@ static struct platform_device db1100_mmc1_dev = { .name = "au1xxx-mmc", .id = 1, .dev = { - .dma_mask = &au1xxx_mmc_dmamask, + .dma_mask = &au1xxx_all_dmamask, .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = &db1100_mmc_platdata[1], }, @@ -416,6 +418,8 @@ static struct platform_device db1100_spi_dev = { .id = 0, .dev = { .platform_data = &db1100_spictl_pd, + .dma_mask = &au1xxx_all_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(32), }, }; diff --git a/arch/mips/alchemy/devboards/db1200.c b/arch/mips/alchemy/devboards/db1200.c index 4bf02f96ab7f..fb11c578e178 100644 --- a/arch/mips/alchemy/devboards/db1200.c +++ b/arch/mips/alchemy/devboards/db1200.c @@ -153,6 +153,8 @@ int __init db1200_board_setup(void) /******************************************************************************/ +static u64 au1200_all_dmamask = DMA_BIT_MASK(32); + static struct mtd_partition db1200_spiflash_parts[] = { { .name = "spi_flash", @@ -324,13 +326,11 @@ static struct resource db1200_ide_res[] = { }, }; -static u64 au1200_ide_dmamask = DMA_BIT_MASK(32); - static struct platform_device db1200_ide_dev = { .name = "pata_platform", .id = 0, .dev = { - .dma_mask = &au1200_ide_dmamask, + .dma_mask = &au1200_all_dmamask, .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = &db1200_ide_info, }, @@ -566,13 +566,11 @@ static struct resource au1200_mmc0_resources[] = { } }; -static u64 au1xxx_mmc_dmamask = DMA_BIT_MASK(32); - static struct platform_device db1200_mmc0_dev = { .name = "au1xxx-mmc", .id = 0, .dev = { - .dma_mask = &au1xxx_mmc_dmamask, + .dma_mask = &au1200_all_dmamask, .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = &db1200_mmc_platdata[0], }, @@ -607,7 +605,7 @@ static struct platform_device pb1200_mmc1_dev = { .name = "au1xxx-mmc", .id = 1, .dev = { - .dma_mask = &au1xxx_mmc_dmamask, + .dma_mask = &au1200_all_dmamask, .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = &db1200_mmc_platdata[1], }, @@ -657,13 +655,11 @@ static struct resource au1200_lcd_res[] = { } }; -static u64 au1200_lcd_dmamask = DMA_BIT_MASK(32); - static struct platform_device au1200_lcd_dev = { .name = "au1200-lcd", .id = 0, .dev = { - .dma_mask = &au1200_lcd_dmamask, + .dma_mask = &au1200_all_dmamask, .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = &db1200fb_pd, }, @@ -717,11 +713,9 @@ static struct au1550_spi_info db1200_spi_platdata = { .activate_cs = db1200_spi_cs_en, }; -static u64 spi_dmamask = DMA_BIT_MASK(32); - static struct platform_device db1200_spi_dev = { .dev = { - .dma_mask = &spi_dmamask, + .dma_mask = &au1200_all_dmamask, .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = &db1200_spi_platdata, }, @@ -766,6 +760,10 @@ static struct platform_device db1200_audio_dev = { static struct platform_device db1200_sound_dev = { /* name assigned later based on switch setting */ .id = 1, /* PSC ID */ + .dev = { + .dma_mask = &au1200_all_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(32), + }, }; static struct platform_device db1200_stac_dev = { diff --git a/arch/mips/alchemy/devboards/db1300.c b/arch/mips/alchemy/devboards/db1300.c index ad7dd8e89598..8ac1f56ee57d 100644 --- a/arch/mips/alchemy/devboards/db1300.c +++ b/arch/mips/alchemy/devboards/db1300.c @@ -148,6 +148,8 @@ static void __init db1300_gpio_config(void) /**********************************************************************/ +static u64 au1300_all_dmamask = DMA_BIT_MASK(32); + static void au1300_nand_cmd_ctrl(struct nand_chip *this, int cmd, unsigned int ctrl) { @@ -438,6 +440,8 @@ static struct resource db1300_ide_res[] = { static struct platform_device db1300_ide_dev = { .dev = { + .dma_mask = &au1300_all_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = &db1300_ide_info, }, .name = "pata_platform", @@ -560,7 +564,9 @@ static struct resource au1300_sd1_res[] = { static struct platform_device db1300_sd1_dev = { .dev = { - .platform_data = &db1300_sd1_platdata, + .dma_mask = &au1300_all_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(32), + .platform_data = &db1300_sd1_platdata, }, .name = "au1xxx-mmc", .id = 1, @@ -625,7 +631,9 @@ static struct resource au1300_sd0_res[] = { static struct platform_device db1300_sd0_dev = { .dev = { - .platform_data = &db1300_sd0_platdata, + .dma_mask = &au1300_all_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(32), + .platform_data = &db1300_sd0_platdata, }, .name = "au1xxx-mmc", .id = 0, @@ -652,10 +660,18 @@ static struct platform_device db1300_i2sdma_dev = { static struct platform_device db1300_sndac97_dev = { .name = "db1300-ac97", + .dev = { + .dma_mask = &au1300_all_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(32), + }, }; static struct platform_device db1300_sndi2s_dev = { .name = "db1300-i2s", + .dev = { + .dma_mask = &au1300_all_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(32), + }, }; /**********************************************************************/ @@ -700,13 +716,12 @@ static struct resource au1300_lcd_res[] = { } }; -static u64 au1300_lcd_dmamask = DMA_BIT_MASK(32); static struct platform_device db1300_lcd_dev = { .name = "au1200-lcd", .id = 0, .dev = { - .dma_mask = &au1300_lcd_dmamask, + .dma_mask = &au1300_all_dmamask, .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = &db1300fb_pd, }, diff --git a/arch/mips/alchemy/devboards/db1550.c b/arch/mips/alchemy/devboards/db1550.c index 7700ad0b93b4..3e0c75c0ece0 100644 --- a/arch/mips/alchemy/devboards/db1550.c +++ b/arch/mips/alchemy/devboards/db1550.c @@ -82,6 +82,8 @@ int __init db1550_board_setup(void) /*****************************************************************************/ +static u64 au1550_all_dmamask = DMA_BIT_MASK(32); + static struct mtd_partition db1550_spiflash_parts[] = { { .name = "spi_flash", @@ -269,11 +271,10 @@ static struct au1550_spi_info db1550_spi_platdata = { .activate_cs = db1550_spi_cs_en, }; -static u64 spi_dmamask = DMA_BIT_MASK(32); static struct platform_device db1550_spi_dev = { .dev = { - .dma_mask = &spi_dmamask, + .dma_mask = &au1550_all_dmamask, .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = &db1550_spi_platdata, }, @@ -397,10 +398,18 @@ static struct platform_device db1550_i2sdma_dev = { static struct platform_device db1550_sndac97_dev = { .name = "db1550-ac97", + .dev = { + .dma_mask = &au1550_all_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(32), + }, }; static struct platform_device db1550_sndi2s_dev = { .name = "db1550-i2s", + .dev = { + .dma_mask = &au1550_all_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(32), + }, }; /**********************************************************************/ -- cgit v1.2.3 From 9bd2f7eeaed129627a609b5c98098f0fd7805d24 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Tue, 18 Dec 2018 15:26:36 +0100 Subject: MAINTAINERS: Add a maintainer for MSCC MIPS SoCs Microsemi has been bought by Microchip and Microchip is supporting those SoCs. Signed-off-by: Alexandre Belloni Acked-by: Woojung Huh Signed-off-by: Paul Burton Cc: James Hogan Cc: Ralf Baechle Cc: linux-kernel@vger.kernel.org --- MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index f4855974f325..50223cba6ddb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9801,8 +9801,9 @@ F: drivers/dma/at_xdmac.c MICROSEMI MIPS SOCS M: Alexandre Belloni +M: Microchip Linux Driver Support L: linux-mips@linux-mips.org -S: Maintained +S: Supported F: arch/mips/generic/board-ocelot.c F: arch/mips/configs/generic/board-ocelot.config F: arch/mips/boot/dts/mscc/ -- cgit v1.2.3 From 0b15394475e3bcaf35ca4bf22fc55d56df67224e Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Mon, 17 Dec 2018 10:47:48 +0100 Subject: MIPS: ralink: Select CONFIG_CPU_MIPSR2_IRQ_VI on MT7620/8 Testing has shown, that when using mainline U-Boot on MT7688 based boards, the system may hang or crash while mounting the root-fs. The main issue here is that mainline U-Boot configures EBase to a value near the end of system memory. And with CONFIG_CPU_MIPSR2_IRQ_VI disabled, trap_init() will not allocate a new area to place the exception handler. The original value will be used and the handler will be copied to this location, which might already be used by some userspace application. The MT7688 supports VI - its config3 register is 0x00002420, so VInt (Bit 5) is set. But without setting CONFIG_CPU_MIPSR2_IRQ_VI this bit will not be evaluated to result in "cpu_has_vi" being set. This patch now selects CONFIG_CPU_MIPSR2_IRQ_VI on MT7620/8 which results trap_init() to allocate some memory for the exception handler. Please note that this issue was not seen with the Mediatek U-Boot version, as it does not touch EBase (stays at default of 0x8000.0000). This is strictly also not correct as the kernel (_text) resides here. Signed-off-by: Stefan Roese [paul.burton@mips.com: s/beeing/being/] Signed-off-by: Paul Burton Cc: John Crispin Cc: Daniel Schwierzeck Cc: Ralf Baechle Cc: linux-mips@linux-mips.org --- arch/mips/ralink/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig index 1f9cb0e3c79a..613d61763433 100644 --- a/arch/mips/ralink/Kconfig +++ b/arch/mips/ralink/Kconfig @@ -38,6 +38,7 @@ choice config SOC_MT7620 bool "MT7620/8" + select CPU_MIPSR2_IRQ_VI select HW_HAS_PCI config SOC_MT7621 -- cgit v1.2.3 From d025bff1b6b923ce9c2f744d8278e0f2d6609eaf Mon Sep 17 00:00:00 2001 From: Dengcheng Zhu Date: Wed, 26 Dec 2018 22:08:52 +0000 Subject: mailmap: Update name spelling and email for Dengcheng Zhu Change my first name spelling from Deng-Cheng to Dengcheng. Update email addresses. Signed-off-by: Dengcheng Zhu Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org --- .mailmap | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index a76be45fef6c..4c78e7dd18fa 100644 --- a/.mailmap +++ b/.mailmap @@ -47,7 +47,10 @@ Corey Minyard Damian Hobson-Garcia David Brownell David Woodhouse -Deng-Cheng Zhu +Dengcheng Zhu +Dengcheng Zhu +Dengcheng Zhu +Dengcheng Zhu Dmitry Eremin-Solenikov Domen Puncer Douglas Gilbert -- cgit v1.2.3 From 682fee802843b332f9c51ffc8e062de5ff773f2e Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Sun, 30 Dec 2018 12:55:09 +0100 Subject: MIPS: BCM63XX: drop unused and broken DSP platform device Trying to register the DSP platform device results in a null pointer access: [ 0.124184] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 804e305c, ra == 804e6f20 [ 0.135208] Oops[#1]: [ 0.137514] CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.87 ... [ 0.197117] epc : 804e305c bcm63xx_dsp_register+0x80/0xa4 [ 0.202838] ra : 804e6f20 board_register_devices+0x258/0x390 ... This happens because it tries to copy the passed platform data over the platform_device's unpopulated platform_data. Since this code has been broken since its submission, no driver was ever submitted for it, and apparently nobody was using it, just remove it instead of trying to fix it. Fixes: e7300d04bd08 ("MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs.") Signed-off-by: Jonas Gorski Signed-off-by: Paul Burton Acked-by: Florian Fainelli Cc: linux-mips@linux-mips.org Cc: Ralf Baechle Cc: James Hogan --- arch/mips/bcm63xx/Makefile | 6 +-- arch/mips/bcm63xx/boards/board_bcm963xx.c | 20 -------- arch/mips/bcm63xx/dev-dsp.c | 56 ---------------------- .../include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h | 14 ------ .../mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 5 -- 5 files changed, 3 insertions(+), 98 deletions(-) delete mode 100644 arch/mips/bcm63xx/dev-dsp.c delete mode 100644 arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h diff --git a/arch/mips/bcm63xx/Makefile b/arch/mips/bcm63xx/Makefile index c69f297fc1df..d89651e538f6 100644 --- a/arch/mips/bcm63xx/Makefile +++ b/arch/mips/bcm63xx/Makefile @@ -1,8 +1,8 @@ # SPDX-License-Identifier: GPL-2.0 obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \ - setup.o timer.o dev-dsp.o dev-enet.o dev-flash.o \ - dev-pcmcia.o dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o \ - dev-wdt.o dev-usb-usbd.o + setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \ + dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o dev-wdt.o \ + dev-usb-usbd.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o obj-y += boards/ diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c index b2097c0d2ed7..36ec3dc2c999 100644 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -289,14 +288,6 @@ static struct board_info __initdata board_96348gw_10 = { .has_pccard = 1, .has_ehci0 = 1, - .has_dsp = 1, - .dsp = { - .gpio_rst = 6, - .gpio_int = 34, - .cs = 2, - .ext_irq = 2, - }, - .leds = { { .name = "adsl-fail", @@ -401,14 +392,6 @@ static struct board_info __initdata board_96348gw = { .has_ohci0 = 1, - .has_dsp = 1, - .dsp = { - .gpio_rst = 6, - .gpio_int = 34, - .ext_irq = 2, - .cs = 2, - }, - .leds = { { .name = "adsl-fail", @@ -898,9 +881,6 @@ int __init board_register_devices(void) if (board.has_usbd) bcm63xx_usbd_register(&board.usbd); - if (board.has_dsp) - bcm63xx_dsp_register(&board.dsp); - /* Generate MAC address for WLAN and register our SPROM, * do this after registering enet devices */ diff --git a/arch/mips/bcm63xx/dev-dsp.c b/arch/mips/bcm63xx/dev-dsp.c deleted file mode 100644 index 5bb5b154c9bd..000000000000 --- a/arch/mips/bcm63xx/dev-dsp.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Broadcom BCM63xx VoIP DSP registration - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * Copyright (C) 2009 Florian Fainelli - */ - -#include -#include -#include - -#include -#include -#include -#include - -static struct resource voip_dsp_resources[] = { - { - .start = -1, /* filled at runtime */ - .end = -1, /* filled at runtime */ - .flags = IORESOURCE_MEM, - }, - { - .start = -1, /* filled at runtime */ - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device bcm63xx_voip_dsp_device = { - .name = "bcm63xx-voip-dsp", - .id = -1, - .num_resources = ARRAY_SIZE(voip_dsp_resources), - .resource = voip_dsp_resources, -}; - -int __init bcm63xx_dsp_register(const struct bcm63xx_dsp_platform_data *pd) -{ - struct bcm63xx_dsp_platform_data *dpd; - u32 val; - - /* Get the memory window */ - val = bcm_mpi_readl(MPI_CSBASE_REG(pd->cs - 1)); - val &= MPI_CSBASE_BASE_MASK; - voip_dsp_resources[0].start = val; - voip_dsp_resources[0].end = val + 0xFFFFFFF; - voip_dsp_resources[1].start = pd->ext_irq; - - /* copy given platform data */ - dpd = bcm63xx_voip_dsp_device.dev.platform_data; - memcpy(dpd, pd, sizeof (*pd)); - - return platform_device_register(&bcm63xx_voip_dsp_device); -} diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h deleted file mode 100644 index 4e4970787371..000000000000 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __BCM63XX_DSP_H -#define __BCM63XX_DSP_H - -struct bcm63xx_dsp_platform_data { - unsigned gpio_rst; - unsigned gpio_int; - unsigned cs; - unsigned ext_irq; -}; - -int __init bcm63xx_dsp_register(const struct bcm63xx_dsp_platform_data *pd); - -#endif /* __BCM63XX_DSP_H */ diff --git a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h index 5e5b1bc4a324..830f53f28e3f 100644 --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h @@ -7,7 +7,6 @@ #include #include #include -#include /* * flash mapping @@ -31,7 +30,6 @@ struct board_info { unsigned int has_ohci0:1; unsigned int has_ehci0:1; unsigned int has_usbd:1; - unsigned int has_dsp:1; unsigned int has_uart0:1; unsigned int has_uart1:1; @@ -43,9 +41,6 @@ struct board_info { /* USB config */ struct bcm63xx_usbd_platform_data usbd; - /* DSP config */ - struct bcm63xx_dsp_platform_data dsp; - /* GPIO LEDs */ struct gpio_led leds[5]; -- cgit v1.2.3 From db1ce3f5d01d2d6d5714aefba0159d2cb5167a0b Mon Sep 17 00:00:00 2001 From: Huacai Chen Date: Tue, 25 Dec 2018 08:51:01 +0800 Subject: MIPS: Fix a R10000_LLSC_WAR logic in atomic.h Commit 4936084c2ee2 ("MIPS: Cleanup R10000_LLSC_WAR logic in atomic.h") introduce a mistake in atomic64_fetch_##op##_relaxed(), because it forget to delete R10000_LLSC_WAR in the if-condition. So fix it. Fixes: 4936084c2ee2 ("MIPS: Cleanup R10000_LLSC_WAR logic in atomic.h") Signed-off-by: Huacai Chen Signed-off-by: Paul Burton Cc: Joshua Kinard Cc: Ralf Baechle Cc: Steven J . Hill Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # 4.19+ --- arch/mips/include/asm/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h index e8fbfd419151..43fcd35e2957 100644 --- a/arch/mips/include/asm/atomic.h +++ b/arch/mips/include/asm/atomic.h @@ -313,7 +313,7 @@ static __inline__ long atomic64_fetch_##op##_relaxed(long i, atomic64_t * v) \ { \ long result; \ \ - if (kernel_uses_llsc && R10000_LLSC_WAR) { \ + if (kernel_uses_llsc) { \ long temp; \ \ __asm__ __volatile__( \ -- cgit v1.2.3 From edefae94b7b9f10d5efe32dece5a36e9d9ecc29e Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Wed, 2 Jan 2019 20:43:01 +0200 Subject: MIPS: OCTEON: mark RGMII interface disabled on OCTEON III Commit 885872b722b7 ("MIPS: Octeon: Add Octeon III CN7xxx interface detection") added RGMII interface detection for OCTEON III, but it results in the following logs: [ 7.165984] ERROR: Unsupported Octeon model in __cvmx_helper_rgmii_probe [ 7.173017] ERROR: Unsupported Octeon model in __cvmx_helper_rgmii_probe The current RGMII routines are valid only for older OCTEONS that use GMX/ASX hardware blocks. On later chips AGL should be used, but support for that is missing in the mainline. Until that is added, mark the interface as disabled. Fixes: 885872b722b7 ("MIPS: Octeon: Add Octeon III CN7xxx interface detection") Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: stable@vger.kernel.org # 4.7+ --- arch/mips/cavium-octeon/executive/cvmx-helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c b/arch/mips/cavium-octeon/executive/cvmx-helper.c index d2251bb1f369..539dd30d6188 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-helper.c +++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c @@ -266,7 +266,8 @@ static cvmx_helper_interface_mode_t __cvmx_get_mode_cn7xxx(int interface) case 3: return CVMX_HELPER_INTERFACE_MODE_LOOP; case 4: - return CVMX_HELPER_INTERFACE_MODE_RGMII; + /* TODO: Implement support for AGL (RGMII). */ + return CVMX_HELPER_INTERFACE_MODE_DISABLED; default: return CVMX_HELPER_INTERFACE_MODE_DISABLED; } -- cgit v1.2.3