MIPS: Alchemy updates for 4.20+
Subsystems (3)
cover MIPS: Alchemy updates for 4.20+
Here's a bunch of fixes to restore almost all functionality to the Alchemy devboards, against 4.20-rc7+.
#1 gets rid of a warning in the clockevent code, #2 let's the Alchemy on-chip ethernet driver build again, #3 removes board-specific IrDA code, as the driver is gone, #4 sync up overrides with latest cpu-features
#5 adds dma_masks to sound and mmc devices to get them
working again.
Verified on the DB1300 and DB1500 boards.
Manuel Lauss (5):
MIPS: alchemy: cpu_all_mask is forbidden for clock event devices
net: drivers/amd: restore access to MIPS Alchemy platform
MIPS: Alchemy: drop DB1000 IrDA support bits
MIPS: Alchemy: update cpu-feature-overrides
MIPS: Alchemy: update dma masks for devboard devices
arch/mips/alchemy/common/time.c | 2 +- arch/mips/alchemy/devboards/db1000.c | 76 +++---------------- arch/mips/alchemy/devboards/db1200.c | 24 +++--- arch/mips/alchemy/devboards/db1300.c | 23 +++++- arch/mips/alchemy/devboards/db1550.c | 13 +++- .../asm/mach-au1x00/cpu-feature-overrides.h | 3 + drivers/net/ethernet/amd/Kconfig | 3 +- 7 files changed, 58 insertions(+), 86 deletions(-)
Signature · 1 line
2.20.0
PATCH 1/5 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
--- arch/mips/alchemy/common/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/alchemy/common/time.c +1 -1
@@ -82,7 +82,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 = {
Signature · 1 line
2.20.0
Paul Burton
AppliedRe: [PATCH 1/5] MIPS: alchemy: cpu_all_mask is forbidden for clock event devices
Hello,
Quoted 6 lines · Manuel Lauss
change alchemy clock event device
cpu_all_masktocpu_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/0x140rtcmatch2 cpumask ==
cpu_all_mask, usingcpu_possible_maskinsteadSigned-off-by Manuel Lauss <[email protected]>
Applied to mips-fixes.
Thanks,
Paul
[ This message was auto-generated; if you believe anything is incorrect
then please email [email protected] to report it. ]
PATCH 2/5 net: drivers/amd: restore access to MIPS Alchemy platform
In reply to Manuel LaussThe MIPS Alchemy platform needs access to the au1000_eth.c driver, which resides in the AMD driver directory (as the chips were at a time made by AMD).
--- drivers/net/ethernet/amd/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/amd/Kconfig +2 -1
@@ -7,7 +7,8 @@ config NET_VENDOR_AMD default y depends on DIO || MACH_DECSTATION || MVME147 || ATARI || SUN3 || \ SUN3X || SBUS || PCI || ZORRO || (ISA && ISA_DMA_API) || \ - (ARM && ARCH_EBSA110) || ISA || EISA || PCMCIA || ARM64 + (ARM && ARCH_EBSA110) || ISA || EISA || PCMCIA || ARM64 || \ + MIPS_ALCHEMY ---help--- If you have a network (Ethernet) chipset belonging to this class, say Y.
Signature · 1 line
2.20.0
PATCH 3/5 MIPS: Alchemy: drop DB1000 IrDA support bits
In reply to Manuel LaussThe IrDA drivers are gone, drop the now unused DB1000 board support for it.
--- arch/mips/alchemy/devboards/db1000.c | 58 ---------------------------- 1 file changed, 58 deletions(-)
arch/mips/alchemy/devboards/db1000.c +0 -58
@@ -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 ;
Signature · 1 line
2.20.0
Paul Burton
AppliedRe: [PATCH 3/5] MIPS: Alchemy: drop DB1000 IrDA support bits
Hello,
Quoted 4 lines · Manuel Lauss
The IrDA drivers are gone, drop the now unused DB1000 board support for it.
Signed-off-by Manuel Lauss <[email protected]>
Applied to mips-fixes.
Thanks,
Paul
[ This message was auto-generated; if you believe anything is incorrect
then please email [email protected] to report it. ]
PATCH 4/5 MIPS: Alchemy: update cpu-feature-overrides
In reply to Manuel LaussNo shiny new stuff for Alchemy.
Tested on DB1300 and DB1500.
--- arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h | 3 +++ 1 file changed, 3 insertions(+)
arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h +3 -0
@@ -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 */
Signature · 1 line
2.20.0
Paul Burton
AppliedRe: [PATCH 4/5] MIPS: Alchemy: update cpu-feature-overrides
Hello,
Quoted 5 lines · Manuel Lauss
No shiny new stuff for Alchemy.
Tested on DB1300 and DB1500.
Signed-off-by Manuel Lauss <[email protected]>
Applied to mips-fixes.
Thanks,
Paul
[ This message was auto-generated; if you believe anything is incorrect
then please email [email protected] to report it. ]
PATCH 5/5 MIPS: Alchemy: update dma masks for devboard devices
In reply to Manuel LaussFix the DMA masks for sound and mmc devices.
Verified on DB1300 and DB1500.
--- 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(-)
arch/mips/alchemy/devboards/db1000.c +11 -7
@@ -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), }, };
arch/mips/alchemy/devboards/db1200.c +11 -13
@@ -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 = {
arch/mips/alchemy/devboards/db1300.c +19 -4
@@ -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, },
arch/mips/alchemy/devboards/db1550.c +11 -2
@@ -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 ), + }, };/**********************************************************************/
Signature · 1 line
2.20.0
Paul Burton
AppliedRe: [PATCH 5/5] MIPS: Alchemy: update dma masks for devboard devices
Hello,
Quoted 5 lines · Manuel Lauss
Fix the DMA masks for sound and mmc devices.
Verified on DB1300 and DB1500.
Signed-off-by Manuel Lauss <[email protected]>
Applied to mips-fixes.
Thanks,
Paul
[ This message was auto-generated; if you believe anything is incorrect
then please email [email protected] to report it. ]