Skip to contentSkip to conversation

m68k: atari: Rename shifter to shifter_st to avoid conflict

PATCH In review Geert Uytterhoeven 2 participants 3 messages Aug 12, 2019 – Aug 19, 2019

Subsystems (2)
lore
Share & tools
lore

Geert Uytterhoeven

author maintainer
#0 lore raw

PATCH 1/1 m68k: atari: Rename shifter to shifter_st to avoid conflict

When test-compiling the BCM2835 pin control driver on m68k:

    In file included from arch/m68k/include/asm/io_mm.h:32:0,
                     from arch/m68k/include/asm/io.h:8,
                     from include/linux/io.h:13,
                     from include/linux/irq.h:20,
                     from include/linux/gpio/driver.h:7,
                     from drivers/pinctrl/bcm/pinctrl-bcm2835.c:17:
    drivers/pinctrl/bcm/pinctrl-bcm2835.c: In function 'bcm2711_pull_config_set':
    arch/m68k/include/asm/atarihw.h:190:22: error: expected identifier or '(' before 'volatile'
     # define shifter ((*(volatile struct SHIFTER *)SHF_BAS))

"shifter" is a too generic name for a global definition.

As the corresponding definition for Atari TT is already called "shifter_tt", fix this by renaming the definition for Atari ST to "shifter_st".

---
To be queued in the m68k tree for v5.4.

 arch/m68k/atari/config.c        |  6 ++---
 arch/m68k/include/asm/atarihw.h |  4 ++--
 drivers/video/fbdev/atafb.c     | 42 ++++++++++++++++-----------------
 3 files changed, 26 insertions(+), 26 deletions(-)
arch/m68k/atari/config.c +3 -3
index 902255e7b5b2ad56..73bf5ea9ee1bf1cf 100644
@@ -246,9 +246,9 @@ void __init config_atari(void)
 	} else if (hwreg_present(tt_palette)) {
 		ATARIHW_SET(TT_SHIFTER);
 		pr_cont(" TT_SHIFTER");
-	} else if (hwreg_present(&shifter.bas_hi)) {
-		if (hwreg_present(&shifter.bas_lo) &&
-		    (shifter.bas_lo = 0x0aau, shifter.bas_lo == 0x0aau)) {
+	} else if (hwreg_present(&shifter_st.bas_hi)) {
+		if (hwreg_present(&shifter_st.bas_lo) &&
+		    (shifter_st.bas_lo = 0x0aau, shifter_st.bas_lo == 0x0aau)) {
 			ATARIHW_SET(EXTD_SHIFTER);
 			pr_cont(" EXTD_SHIFTER");
 		} else {
arch/m68k/include/asm/atarihw.h +2 -2
index 533008262b691ad9..13828dcc45ff79ac 100644
@@ -170,7 +170,7 @@ static inline void dma_cache_maintenance( unsigned long paddr,
 #define TT_HIGH 6
 
 #define SHF_BAS (0xffff8200)
-struct SHIFTER
+struct SHIFTER_ST
  {
 	u_char pad1;
 	u_char bas_hi;
@@ -187,7 +187,7 @@ struct SHIFTER
 	u_char pad7;
 	u_char bas_lo;
  };
-# define shifter ((*(volatile struct SHIFTER *)SHF_BAS))
+# define shifter_st ((*(volatile struct SHIFTER_ST *)SHF_BAS))
 
 #define SHF_FBAS (0xffff820e)
 struct SHIFTER_F030
drivers/video/fbdev/atafb.c +21 -21

98 lines not on this page · raw message

Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Geert Uytterhoeven

When test-compiling the BCM2835 pin control driver on m68k:

    In file included from arch/m68k/include/asm/io_mm.h:32:0,
                     from arch/m68k/include/asm/io.h:8,
                     from include/linux/io.h:13,
                     from include/linux/irq.h:20,
                     from include/linux/gpio/driver.h:7,
                     from drivers/pinctrl/bcm/pinctrl-bcm2835.c:17:
    drivers/pinctrl/bcm/pinctrl-bcm2835.c: In function 'bcm2711_pull_config_set':
    arch/m68k/include/asm/atarihw.h:190:22: error: expected identifier or '(' before 'volatile'
     # define shifter ((*(volatile struct SHIFTER *)SHF_BAS))

"shifter" is a too generic name for a global definition.

Quoted 7 lines

As the corresponding definition for Atari TT is already called "shifter_tt", fix this by renaming the definition for Atari ST to "shifter_st".

Finally we can use the sh pfc pin controller on our m68k Atari.

Now if I can only resolder the capacitors on my Atari TT ST before the board self-destructs I will one day test this.

Yours,
Linus Walleij

author maintainer Applied
#2 lore raw
Quoted 23 lines · Linus Walleij
Quoted 14 lines · Geert Uytterhoeven

When test-compiling the BCM2835 pin control driver on m68k:

    In file included from arch/m68k/include/asm/io_mm.h:32:0,
                     from arch/m68k/include/asm/io.h:8,
                     from include/linux/io.h:13,
                     from include/linux/irq.h:20,
                     from include/linux/gpio/driver.h:7,
                     from drivers/pinctrl/bcm/pinctrl-bcm2835.c:17:
    drivers/pinctrl/bcm/pinctrl-bcm2835.c: In function 'bcm2711_pull_config_set':
    arch/m68k/include/asm/atarihw.h:190:22: error: expected identifier or '(' before 'volatile'
     # define shifter ((*(volatile struct SHIFTER *)SHF_BAS))

"shifter" is a too generic name for a global definition.

Quoted 7 lines

As the corresponding definition for Atari TT is already called "shifter_tt", fix this by renaming the definition for Atari ST to "shifter_st".

Quoted 6 lines

Finally we can use the sh pfc pin controller on our m68k Atari.

Now if I can only resolder the capacitors on my Atari TT ST before the board self-destructs I will one day test this.

Thanks, applied and queued for v5.4.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds