Browse Source

powerpc, dma: move bestcomm driver from arch/powerpc/sysdev to drivers/dma

The bestcomm dma hardware, and some of its users like the FEC ethernet
component, is used in different FreeScale parts, including non-powerpc
parts like the ColdFire MCF547x & MCF548x families.  Don't keep the
driver hidden in arch/powerpc where it is inaccessible for other arches.
.c files are moved to drivers/dma/bestcomm, while .h files are moved to
include/linux/fsl/bestcomm.  Makefiles, Kconfigs and #include directives
are updated for the new file locations.

Tested by recompiling for MPC5200 with all bestcomm users enabled.

Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Philippe De Muyter 13 years ago
parent
commit
9a32299394

+ 3 - 3
arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c

@@ -20,9 +20,9 @@
 #include <asm/mpc52xx.h>
 #include <asm/mpc52xx.h>
 #include <asm/time.h>
 #include <asm/time.h>
 
 
-#include <sysdev/bestcomm/bestcomm.h>
-#include <sysdev/bestcomm/bestcomm_priv.h>
-#include <sysdev/bestcomm/gen_bd.h>
+#include <linux/fsl/bestcomm/bestcomm.h>
+#include <linux/fsl/bestcomm/bestcomm_priv.h>
+#include <linux/fsl/bestcomm/gen_bd.h>
 
 
 MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>");
 MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>");
 MODULE_DESCRIPTION("MPC5200 LocalPlus FIFO device driver");
 MODULE_DESCRIPTION("MPC5200 LocalPlus FIFO device driver");

+ 0 - 2
arch/powerpc/platforms/Kconfig

@@ -352,8 +352,6 @@ config OF_RTC
 	  Uses information from the OF or flattened device tree to instantiate
 	  Uses information from the OF or flattened device tree to instantiate
 	  platform devices for direct mapped RTC chips like the DS1742 or DS1743.
 	  platform devices for direct mapped RTC chips like the DS1742 or DS1743.
 
 
-source "arch/powerpc/sysdev/bestcomm/Kconfig"
-
 config SIMPLE_GPIO
 config SIMPLE_GPIO
 	bool "Support for simple, memory-mapped GPIO controllers"
 	bool "Support for simple, memory-mapped GPIO controllers"
 	depends on PPC
 	depends on PPC

+ 0 - 1
arch/powerpc/sysdev/Makefile

@@ -26,7 +26,6 @@ obj-$(CONFIG_SIMPLE_GPIO)	+= simple_gpio.o
 obj-$(CONFIG_FSL_RIO)		+= fsl_rio.o fsl_rmu.o
 obj-$(CONFIG_FSL_RIO)		+= fsl_rio.o fsl_rmu.o
 obj-$(CONFIG_TSI108_BRIDGE)	+= tsi108_pci.o tsi108_dev.o
 obj-$(CONFIG_TSI108_BRIDGE)	+= tsi108_pci.o tsi108_dev.o
 obj-$(CONFIG_QUICC_ENGINE)	+= qe_lib/
 obj-$(CONFIG_QUICC_ENGINE)	+= qe_lib/
-obj-$(CONFIG_PPC_BESTCOMM)	+= bestcomm/
 mv64x60-$(CONFIG_PCI)		+= mv64x60_pci.o
 mv64x60-$(CONFIG_PCI)		+= mv64x60_pci.o
 obj-$(CONFIG_MV64X60)		+= $(mv64x60-y) mv64x60_pic.o mv64x60_dev.o \
 obj-$(CONFIG_MV64X60)		+= $(mv64x60-y) mv64x60_pic.o mv64x60_dev.o \
 				   mv64x60_udbg.o
 				   mv64x60_udbg.o

+ 1 - 1
drivers/Makefile

@@ -29,7 +29,7 @@ obj-$(CONFIG_PNP)		+= pnp/
 obj-y				+= amba/
 obj-y				+= amba/
 # Many drivers will want to use DMA so this has to be made available
 # Many drivers will want to use DMA so this has to be made available
 # really early.
 # really early.
-obj-$(CONFIG_DMA_ENGINE)	+= dma/
+obj-$(CONFIG_DMADEVICES)	+= dma/
 
 
 obj-$(CONFIG_VIRTIO)		+= virtio/
 obj-$(CONFIG_VIRTIO)		+= virtio/
 obj-$(CONFIG_XEN)		+= xen/
 obj-$(CONFIG_XEN)		+= xen/

+ 3 - 3
drivers/ata/pata_mpc52xx.c

@@ -26,9 +26,9 @@
 #include <asm/prom.h>
 #include <asm/prom.h>
 #include <asm/mpc52xx.h>
 #include <asm/mpc52xx.h>
 
 
-#include <sysdev/bestcomm/bestcomm.h>
-#include <sysdev/bestcomm/bestcomm_priv.h>
-#include <sysdev/bestcomm/ata.h>
+#include <linux/fsl/bestcomm/bestcomm.h>
+#include <linux/fsl/bestcomm/bestcomm_priv.h>
+#include <linux/fsl/bestcomm/ata.h>
 
 
 #define DRV_NAME	"mpc52xx_ata"
 #define DRV_NAME	"mpc52xx_ata"
 
 

+ 2 - 0
drivers/dma/Kconfig

@@ -125,6 +125,8 @@ config MPC512X_DMA
 	---help---
 	---help---
 	  Enable support for the Freescale MPC512x built-in DMA engine.
 	  Enable support for the Freescale MPC512x built-in DMA engine.
 
 
+source "drivers/dma/bestcomm/Kconfig"
+
 config MV_XOR
 config MV_XOR
 	bool "Marvell XOR engine support"
 	bool "Marvell XOR engine support"
 	depends on PLAT_ORION
 	depends on PLAT_ORION

+ 1 - 0
drivers/dma/Makefile

@@ -10,6 +10,7 @@ obj-$(CONFIG_INTEL_IOATDMA) += ioat/
 obj-$(CONFIG_INTEL_IOP_ADMA) += iop-adma.o
 obj-$(CONFIG_INTEL_IOP_ADMA) += iop-adma.o
 obj-$(CONFIG_FSL_DMA) += fsldma.o
 obj-$(CONFIG_FSL_DMA) += fsldma.o
 obj-$(CONFIG_MPC512X_DMA) += mpc512x_dma.o
 obj-$(CONFIG_MPC512X_DMA) += mpc512x_dma.o
+obj-$(CONFIG_PPC_BESTCOMM) += bestcomm/
 obj-$(CONFIG_MV_XOR) += mv_xor.o
 obj-$(CONFIG_MV_XOR) += mv_xor.o
 obj-$(CONFIG_DW_DMAC) += dw_dmac.o
 obj-$(CONFIG_DW_DMAC) += dw_dmac.o
 obj-$(CONFIG_AT_HDMAC) += at_hdmac.o
 obj-$(CONFIG_AT_HDMAC) += at_hdmac.o

+ 0 - 0
arch/powerpc/sysdev/bestcomm/Kconfig → drivers/dma/bestcomm/Kconfig


+ 0 - 0
arch/powerpc/sysdev/bestcomm/Makefile → drivers/dma/bestcomm/Makefile


+ 3 - 3
arch/powerpc/sysdev/bestcomm/ata.c → drivers/dma/bestcomm/ata.c

@@ -18,9 +18,9 @@
 #include <linux/types.h>
 #include <linux/types.h>
 #include <asm/io.h>
 #include <asm/io.h>
 
 
-#include "bestcomm.h"
-#include "bestcomm_priv.h"
-#include "ata.h"
+#include <linux/fsl/bestcomm/bestcomm.h>
+#include <linux/fsl/bestcomm/bestcomm_priv.h>
+#include <linux/fsl/bestcomm/ata.h>
 
 
 
 
 /* ======================================================================== */
 /* ======================================================================== */

+ 0 - 0
arch/powerpc/sysdev/bestcomm/bcom_ata_task.c → drivers/dma/bestcomm/bcom_ata_task.c


+ 0 - 0
arch/powerpc/sysdev/bestcomm/bcom_fec_rx_task.c → drivers/dma/bestcomm/bcom_fec_rx_task.c


+ 0 - 0
arch/powerpc/sysdev/bestcomm/bcom_fec_tx_task.c → drivers/dma/bestcomm/bcom_fec_tx_task.c


+ 0 - 0
arch/powerpc/sysdev/bestcomm/bcom_gen_bd_rx_task.c → drivers/dma/bestcomm/bcom_gen_bd_rx_task.c


+ 0 - 0
arch/powerpc/sysdev/bestcomm/bcom_gen_bd_tx_task.c → drivers/dma/bestcomm/bcom_gen_bd_tx_task.c


+ 3 - 3
arch/powerpc/sysdev/bestcomm/bestcomm.c → drivers/dma/bestcomm/bestcomm.c

@@ -23,9 +23,9 @@
 #include <asm/irq.h>
 #include <asm/irq.h>
 #include <asm/mpc52xx.h>
 #include <asm/mpc52xx.h>
 
 
-#include "sram.h"
-#include "bestcomm_priv.h"
-#include "bestcomm.h"
+#include <linux/fsl/bestcomm/sram.h>
+#include <linux/fsl/bestcomm/bestcomm_priv.h>
+#include "linux/fsl/bestcomm/bestcomm.h"
 
 
 #define DRIVER_NAME "bestcomm-core"
 #define DRIVER_NAME "bestcomm-core"
 
 

+ 3 - 3
arch/powerpc/sysdev/bestcomm/fec.c → drivers/dma/bestcomm/fec.c

@@ -16,9 +16,9 @@
 #include <linux/types.h>
 #include <linux/types.h>
 #include <asm/io.h>
 #include <asm/io.h>
 
 
-#include "bestcomm.h"
-#include "bestcomm_priv.h"
-#include "fec.h"
+#include <linux/fsl/bestcomm/bestcomm.h>
+#include <linux/fsl/bestcomm/bestcomm_priv.h>
+#include <linux/fsl/bestcomm/fec.h>
 
 
 
 
 /* ======================================================================== */
 /* ======================================================================== */

+ 3 - 3
arch/powerpc/sysdev/bestcomm/gen_bd.c → drivers/dma/bestcomm/gen_bd.c

@@ -21,9 +21,9 @@
 #include <asm/mpc52xx.h>
 #include <asm/mpc52xx.h>
 #include <asm/mpc52xx_psc.h>
 #include <asm/mpc52xx_psc.h>
 
 
-#include "bestcomm.h"
-#include "bestcomm_priv.h"
-#include "gen_bd.h"
+#include <linux/fsl/bestcomm/bestcomm.h>
+#include <linux/fsl/bestcomm/bestcomm_priv.h>
+#include <linux/fsl/bestcomm/gen_bd.h>
 
 
 
 
 /* ======================================================================== */
 /* ======================================================================== */

+ 1 - 1
arch/powerpc/sysdev/bestcomm/sram.c → drivers/dma/bestcomm/sram.c

@@ -23,7 +23,7 @@
 #include <asm/io.h>
 #include <asm/io.h>
 #include <asm/mmu.h>
 #include <asm/mmu.h>
 
 
-#include "sram.h"
+#include <linux/fsl/bestcomm/sram.h>
 
 
 
 
 /* Struct keeping our 'state' */
 /* Struct keeping our 'state' */

+ 2 - 2
drivers/net/ethernet/freescale/fec_mpc52xx.c

@@ -40,8 +40,8 @@
 #include <asm/delay.h>
 #include <asm/delay.h>
 #include <asm/mpc52xx.h>
 #include <asm/mpc52xx.h>
 
 
-#include <sysdev/bestcomm/bestcomm.h>
-#include <sysdev/bestcomm/fec.h>
+#include <linux/fsl/bestcomm/bestcomm.h>
+#include <linux/fsl/bestcomm/fec.h>
 
 
 #include "fec_mpc52xx.h"
 #include "fec_mpc52xx.h"
 
 

+ 0 - 0
arch/powerpc/sysdev/bestcomm/ata.h → include/linux/fsl/bestcomm/ata.h


+ 0 - 0
arch/powerpc/sysdev/bestcomm/bestcomm.h → include/linux/fsl/bestcomm/bestcomm.h


+ 0 - 0
arch/powerpc/sysdev/bestcomm/bestcomm_priv.h → include/linux/fsl/bestcomm/bestcomm_priv.h


+ 0 - 0
arch/powerpc/sysdev/bestcomm/fec.h → include/linux/fsl/bestcomm/fec.h


+ 0 - 0
arch/powerpc/sysdev/bestcomm/gen_bd.h → include/linux/fsl/bestcomm/gen_bd.h


+ 0 - 0
arch/powerpc/sysdev/bestcomm/sram.h → include/linux/fsl/bestcomm/sram.h


+ 2 - 2
sound/soc/fsl/mpc5200_dma.c

@@ -14,8 +14,8 @@
 
 
 #include <sound/soc.h>
 #include <sound/soc.h>
 
 
-#include <sysdev/bestcomm/bestcomm.h>
-#include <sysdev/bestcomm/gen_bd.h>
+#include <linux/fsl/bestcomm/bestcomm.h>
+#include <linux/fsl/bestcomm/gen_bd.h>
 #include <asm/mpc52xx_psc.h>
 #include <asm/mpc52xx_psc.h>
 
 
 #include "mpc5200_dma.h"
 #include "mpc5200_dma.h"