Re: [2.6 patch] m68k: remove the dead PCI code

Previous thread: [2.6 patch] blackfin: let PCI depend on BROKEN by Adrian Bunk on Tuesday, August 19, 2008 - 6:47 am. (1 message)

Next thread: [PATCH] identify_ramdisk_image(): correct typo about return value in comment by Geert Uytterhoeven on Tuesday, August 19, 2008 - 6:47 am. (1 message)
From: Adrian Bunk
Date: Tuesday, August 19, 2008 - 6:47 am

There exists blackfin hardware with PCI support, but the support
currently in the kernel fails to build starting with:

<--  snip  -->

...
  CC      init/main.o
In file included from dma-mapping.h:5,
                 from dma-mapping.h:52,
                 from dmaengine.h:29,
                 from skbuff.h:29,
                 from netlink.h:155,
                 from genetlink.h:4,
                 from genetlink.h:4,
                 from taskstats_kern.h:12,
                 from main.c:46:
dma-mapping.h: In function 'dma_supported': ma-mapping.h:24: 
error: implicit declaration of function 'pci_dma_supported'
...
make[2]: *** [init/main.o] Error 1


<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---
3bdc07c86b6fd5fc18b7676a75c3ff907e00e807 
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 2e7515e..77a5bdf 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -702,6 +702,7 @@ menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)"
 
 config PCI
 	bool "PCI support"
+	depends on BROKEN
 	help
 	  Support for PCI bus.
 

--

From: Geert Uytterhoeven
Date: Tuesday, August 19, 2008 - 7:13 am

blackfin != m68knommu

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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
--

From: Adrian Bunk
Date: Tuesday, August 19, 2008 - 7:32 am

s/blackfin/m68knommu/ in the patch description (relict from copying it 
from the other similar patch, see http://lkml.org/lkml/2008/8/19/196).


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

--

From: Matthew Wilcox
Date: Tuesday, August 19, 2008 - 8:05 am

^^^^^^^^

Hopefully someone fixes it instead of just acking this patch.

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--

From: Bryan Wu
Date: Thursday, August 21, 2008 - 8:44 pm

Sorry for the delay, I was out on my vacation this week.

Thanks all
-Bryan
--

From: Greg Ungerer
Date: Sunday, August 24, 2008 - 11:16 pm

Hi Adrian,


I think we should just remove the underlying comempci access
code which is the only user of this (arch/m68knommu/kernel/comempci.c).
Nobody has used it in a very long time. And the hardware itself is
old, and completely brain-damaged by design.

Regards


-- 
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg@snapgear.com
SnapGear -- a Secure Computing Company      PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
--

From: Adrian Bunk
Date: Monday, August 25, 2008 - 1:43 pm

A patch for removing the comempci code is below.

It's a bit suspicious that asm/elia.h is now removed since comempci.c 
was the only user. What's the sttus of the eLIA platform?

But COMEMPCI fails with a different error - this init/main.o build error 
is present for CONFIG_PCI=y, CONFIG_COMEMPCI=n, so the dependency of PCI 

cu
Adrian


<--  snip  -->


The COMEMPCI code didn't even compile.

Greg Ungerer said:
I think we should just remove the underlying comempci access
code which is the only user of this (arch/m68knommu/kernel/comempci.c).
Nobody has used it in a very long time. And the hardware itself is
old, and completely brain-damaged by design.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

 arch/m68knommu/Kconfig              |    4 
 arch/m68knommu/include/asm/anchor.h |  112 ---
 arch/m68knommu/include/asm/elia.h   |   41 -
 arch/m68knommu/include/asm/mcfpci.h |  119 ---
 arch/m68knommu/include/asm/pci.h    |   23 
 arch/m68knommu/kernel/Makefile      |    1 
 arch/m68knommu/kernel/comempci.c    |  980 ----------------------------
 7 files changed, 1280 deletions(-)

6c2fed7cd1aad31f7c1518cfcb0d7d8f438ba8a4 
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 77a5bdf..15ffd55 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -706,10 +706,6 @@ config PCI
 	help
 	  Support for PCI bus.
 
-config COMEMPCI
-	bool "CO-MEM lite PCI controller support"
-	depends on (M5307 || M5407)
-
 source "drivers/pci/Kconfig"
 
 source "drivers/pcmcia/Kconfig"
diff --git a/arch/m68knommu/include/asm/anchor.h b/arch/m68knommu/include/asm/anchor.h
deleted file mode 100644
index 871c0d5..0000000
--- a/arch/m68knommu/include/asm/anchor.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/****************************************************************************/
-
-/*
- *	anchor.h -- Anchor CO-MEM Lite PCI host bridge part.
- *
- *	(C) Copyright 2000, Moreton Bay (www.moreton.com.au)
- ...
From: Greg Ungerer
Date: Thursday, August 28, 2008 - 9:13 pm

Hi Adrian,


Only ever a handful where made, and that was in 1999.
I doubt anyone could ever use the PCI interface on it

Unless I am mistaken there is now no need for the CONFIG_PCI option
if selecting m68knommu. The only m68knommu platforms that had PCI
as far as I know where those that use the comempci part.

The patch looks ok to me too (acked below).

Regards


-- 
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg@snapgear.com
Secure Computing Corporation                PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
--

From: Adrian Bunk
Date: Friday, August 29, 2008 - 12:01 am

That implies I can also kill the m68k PCI code since m68knommu will 


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

--

From: Geert Uytterhoeven
Date: Friday, August 29, 2008 - 12:31 am

Sure. If the FreeScale guys ever forward-port their ColdFire/MMU code to
current mainline, we can readd it.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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
--

From: Adrian Bunk
Date: Sunday, August 31, 2008 - 9:10 am

cu
Adrian


<--  snip    -->


This patch removes the no longer used m68k PCI code.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

 arch/m68k/Kconfig         |    4 
 arch/m68k/kernel/Makefile |    1 
 arch/m68k/kernel/bios32.c |  516 --------------------------------------
 include/asm-m68k/dma.h    |    4 
 include/asm-m68k/io.h     |   66 ----
 include/asm-m68k/pci.h    |   51 ---
 6 files changed, 7 insertions(+), 635 deletions(-)


diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 7bacc1c..4b046fa 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -136,10 +136,6 @@ config ATARI
 	  this kernel on an Atari, say Y here and browse the material
 	  available in <file:Documentation/m68k>; otherwise say N.
 
-config PCI
-	bool
-	help
-
 config MAC
 	bool "Macintosh support"
 	depends on !MMU_SUN3
diff --git a/arch/m68k/kernel/Makefile b/arch/m68k/kernel/Makefile
index 3a7f622..55d5d6b 100644
--- a/arch/m68k/kernel/Makefile
+++ b/arch/m68k/kernel/Makefile
@@ -14,5 +14,4 @@ obj-y	:= entry.o process.o traps.o ints.o signal.o ptrace.o module.o \
 
 devres-y = ../../../kernel/irq/devres.o
 
-obj-$(CONFIG_PCI)	+= bios32.o
 obj-y$(CONFIG_MMU_SUN3) += dma.o	# no, it's not a typo
diff --git a/arch/m68k/kernel/bios32.c b/arch/m68k/kernel/bios32.c
deleted file mode 100644
index 1c3b752..0000000
--- a/arch/m68k/kernel/bios32.c
+++ /dev/null
@@ -1,516 +0,0 @@
-/*
- * bios32.c - PCI BIOS functions for m68k systems.
- *
- * Written by Wout Klaren.
- *
- * Based on the DEC Alpha bios32.c by Dave Rusling and David Mosberger.
- */
-
-#include <linux/init.h>
-#include <linux/kernel.h>
-
-#if 0
-# define DBG_DEVS(args)		printk args
-#else
-# define DBG_DEVS(args)
-#endif
-
-#ifdef CONFIG_PCI
-
-/*
- * PCI support for Linux/m68k. Currently only the Hades is supported.
- *
- * The support for PCI bridges in the DEC Alpha version has
- * been removed in this version.
- */
-
-#include <linux/pci.h>
-#include <linux/slab.h>
-#include ...
From: Geert Uytterhoeven
Date: Wednesday, September 3, 2008 - 12:22 am

Thanks! Will queue for 2.6.28, too.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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
--

From: Geert Uytterhoeven
Date: Saturday, September 6, 2008 - 5:23 am

I'd like to keep this comment, as the #define is still there.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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
--

From: Jesse Barnes
Date: Monday, September 8, 2008 - 10:06 pm

Btw, I'm assuming you'll be queuing this up, Geert.  Let me know if you want 
to do otherwise...

Thanks,
Jesse
--

From: Geert Uytterhoeven
Date: Tuesday, September 9, 2008 - 12:11 am

Yes, I will.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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
--

From: Adrian Bunk
Date: Thursday, September 25, 2008 - 6:31 am

Sorry for the late answer.


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

--

From: Greg Ungerer
Date: Friday, August 29, 2008 - 4:07 am

Hi Adrian,


Yeah, I guess we can add in back in of anyone complains.

Yep.

Regards


-- 
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg@snapgear.com
SnapGear -- a Secure Computing Company      PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
--

From: Adrian Bunk
Date: Sunday, August 31, 2008 - 9:10 am

cu
Adrian


<--  snip  -->


Greg Ungerer said about this board:
Only ever a handful where made, and that was in 1999.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

 arch/m68knommu/Kconfig                |    6 ------
 arch/m68knommu/Makefile               |    1 -
 arch/m68knommu/include/asm/system.h   |    2 +-
 arch/m68knommu/platform/5307/config.c |    2 +-
 4 files changed, 2 insertions(+), 9 deletions(-)


diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 15ffd55..f43d50f 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -399,12 +399,6 @@ config M5307C3
 	help
 	  Support for the Motorola M5307C3 board.
 
-config eLIA
-	bool "Moreton Bay eLIA board support"
-	depends on M5307
-	help
-	  Support for the Moreton Bay eLIA board.
-
 config SECUREEDGEMP3
 	bool "SnapGear SecureEdge/MP3 platform support"
 	depends on M5307
diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile
index b63bbcf..fd0fb30 100644
--- a/arch/m68knommu/Makefile
+++ b/arch/m68knommu/Makefile
@@ -41,7 +41,6 @@ board-$(CONFIG_M5271EVB)	:= M5271EVB
 board-$(CONFIG_M5275EVB)	:= M5275EVB
 board-$(CONFIG_M5282EVB)	:= M5282EVB
 board-$(CONFIG_ELITE)		:= eLITE
-board-$(CONFIG_eLIA)		:= eLIA
 board-$(CONFIG_NETtel)		:= NETtel
 board-$(CONFIG_SECUREEDGEMP3)	:= MP3
 board-$(CONFIG_CLEOPATRA)	:= CLEOPATRA
diff --git a/arch/m68knommu/include/asm/system.h b/arch/m68knommu/include/asm/system.h
index 40f49de..4496c0a 100644
--- a/arch/m68knommu/include/asm/system.h
+++ b/arch/m68knommu/include/asm/system.h
@@ -230,7 +230,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
         jmp 0xf0000400;			\
         ");				\
 })
-#elif defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
+#elif defined(CONFIG_NETtel) || \
       defined(CONFIG_SECUREEDGEMP3) || defined(CONFIG_CLEOPATRA)
 #define HARD_RESET_NOW() ({		\
         asm("				\
diff --git a/arch/m68knommu/platform/5307/config.c ...
From: Adrian Bunk
Date: Sunday, August 31, 2008 - 9:10 am

Patch to remove the few PCI bits (on top of the comempci removal) is 

cu
Adrian


<--  snip  -->


This patch removes the no longer used PCI option.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

 arch/m68knommu/Kconfig                   |   13 -------------
 arch/m68knommu/include/asm/dma-mapping.h |    4 ----
 2 files changed, 17 deletions(-)


diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index f43d50f..46b9c43 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -692,21 +692,8 @@ config ISA_DMA_API
 	depends on !M5272
 	default y
 
-menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)"
-
-config PCI
-	bool "PCI support"
-	help
-	  Support for PCI bus.
-
-source "drivers/pci/Kconfig"
-
 source "drivers/pcmcia/Kconfig"
 
-source "drivers/pci/hotplug/Kconfig"
-
-endmenu
-
 menu "Executable file formats"
 
 source "fs/Kconfig.binfmt"
diff --git a/arch/m68knommu/include/asm/dma-mapping.h b/arch/m68knommu/include/asm/dma-mapping.h
index 6aeab18..1748f2b 100644
--- a/arch/m68knommu/include/asm/dma-mapping.h
+++ b/arch/m68knommu/include/asm/dma-mapping.h
@@ -1,10 +1,6 @@
 #ifndef _M68KNOMMU_DMA_MAPPING_H
 #define _M68KNOMMU_DMA_MAPPING_H
 
-#ifdef CONFIG_PCI
-#include <asm-generic/dma-mapping.h>
-#else
 #include <asm-generic/dma-mapping-broken.h>
-#endif
 
 #endif  /* _M68KNOMMU_DMA_MAPPING_H */

--

Previous thread: [2.6 patch] blackfin: let PCI depend on BROKEN by Adrian Bunk on Tuesday, August 19, 2008 - 6:47 am. (1 message)

Next thread: [PATCH] identify_ramdisk_image(): correct typo about return value in comment by Geert Uytterhoeven on Tuesday, August 19, 2008 - 6:47 am. (1 message)