Skip to contentSkip to conversation

Kill CONFIG_PPC_CPM_NEW_BINDING

PATCH New Kumar Gala 1 participant 6 messages Jun 12, 2008

Subsystems (4)
lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

cover Kill CONFIG_PPC_CPM_NEW_BINDING

With arch/ppc gone we can get rid of CONFIG_PPC_CPM_NEW_BINDING. These should be pretty trivial.

These will go via my powerpc-next tree if no one has issues.

- k

author
#1 lore raw

PATCH 1/5 cpm_uart: fix whitespace issues

---
 drivers/serial/cpm_uart/cpm_uart.h      |    8 ++++----
 drivers/serial/cpm_uart/cpm_uart_core.c |    4 ++--
 drivers/serial/cpm_uart/cpm_uart_cpm1.c |    2 +-
 drivers/serial/cpm_uart/cpm_uart_cpm1.h |    2 +-
 drivers/serial/cpm_uart/cpm_uart_cpm2.c |    6 +++---
 drivers/serial/cpm_uart/cpm_uart_cpm2.h |    2 +-
 6 files changed, 12 insertions(+), 12 deletions(-)
drivers/serial/cpm_uart/cpm_uart.h +4 -4
index 0cc39f8..3d07bec 100644
@@ -6,7 +6,7 @@
  *  Copyright (C) 2004 Freescale Semiconductor, Inc.
  *
  *  2006 (c) MontaVista Software, Inc.
- * 	Vitaly Bordug <[email protected]>
+ *	Vitaly Bordug <[email protected]>
  *
  * This file is licensed under the terms of the GNU General Public License
  * version 2. This program is licensed "as is" without any warranty of any
@@ -28,7 +28,7 @@
 #define SERIAL_CPM_MAJOR	204
 #define SERIAL_CPM_MINOR	46
 
-#define IS_SMC(pinfo) 		(pinfo->flags & FLAG_SMC)
+#define IS_SMC(pinfo)		(pinfo->flags & FLAG_SMC)
 #define IS_DISCARDING(pinfo)	(pinfo->flags & FLAG_DISCARDING)
 #define FLAG_DISCARDING	0x00000004	/* when set, don't discard */
 #define FLAG_SMC	0x00000002
@@ -70,7 +70,7 @@ struct uart_cpm_port {
 	void			(*set_lineif)(struct uart_cpm_port *);
 	u8			brg;
 	uint			 dp_addr;
-	void 			*mem_addr;
+	void			*mem_addr;
 	dma_addr_t		 dma_addr;
 	u32			mem_size;
 	/* helpers */
@@ -79,7 +79,7 @@ struct uart_cpm_port {
 	/* Keep track of 'odd' SMC2 wirings */
 	int			is_portb;
 	/* wait on close if needed */
-	int 			wait_closing;
+	int			wait_closing;
 	/* value to combine with opcode to form cpm command */
 	u32			command;
 };
drivers/serial/cpm_uart/cpm_uart_core.c +2 -2
index a19dc7e..b0104ca 100644
@@ -13,7 +13,7 @@
  *  Copyright (C) 2004, 2007 Freescale Semiconductor, Inc.
  *            (C) 2004 Intracom, S.A.
  *            (C) 2005-2006 MontaVista Software, Inc.
- * 		Vitaly Bordug <[email protected]>
+ *		Vitaly Bordug <[email protected]>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -1305,7 +1305,7 @@ static int __init cpm_uart_console_setup(struct console *co, char *options)
 		pdata = pdev->dev.platform_data;
 		if (pdata)
 			if (pdata->init_ioports)
-    	                	pdata->init_ioports(pdata);
+				pdata->init_ioports(pdata);
 
 		cpm_uart_drv_get_platform_data(pdev, 1);
 	}
drivers/serial/cpm_uart/cpm_uart_cpm1.c +1 -1
index 74f1432..bec0c97 100644
@@ -9,7 +9,7 @@
  *  Copyright (C) 2004 Freescale Semiconductor, Inc.
  *            (C) 2004 Intracom, S.A.
  *            (C) 2006 MontaVista Software, Inc.
- * 		Vitaly Bordug <[email protected]>
+ *		Vitaly Bordug <[email protected]>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
drivers/serial/cpm_uart/cpm_uart_cpm1.h +1 -1
index ddf46d3..b805698 100644
@@ -2,7 +2,7 @@
  * linux/drivers/serial/cpm_uart/cpm_uart_cpm1.h
  *
  * Driver for CPM (SCC/SMC) serial ports
- * 
+ *
  * definitions for cpm1
  *
  */
drivers/serial/cpm_uart/cpm_uart_cpm2.c +3 -3
index bb862e2..e53524c 100644
@@ -5,11 +5,11 @@
  *
  *  Maintainer: Kumar Gala ([email protected]) (CPM2)
  *              Pantelis Antoniou ([email protected]) (CPM1)
- * 
+ *
  *  Copyright (C) 2004 Freescale Semiconductor, Inc.
  *            (C) 2004 Intracom, S.A.
  *            (C) 2006 MontaVista Software, Inc.
- * 		Vitaly Bordug <[email protected]>
+ *		Vitaly Bordug <[email protected]>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -273,7 +273,7 @@ void scc4_lineif(struct uart_cpm_port *pinfo)
 #endif
 
 /*
- * Allocate DP-Ram and memory buffers. We need to allocate a transmit and 
+ * Allocate DP-Ram and memory buffers. We need to allocate a transmit and
  * receive buffer descriptors from dual port ram, and a character
  * buffer area from host mem. If we are allocating for the console we need
  * to do it from bootmem
drivers/serial/cpm_uart/cpm_uart_cpm2.h +1 -1
index 40006a7..a48b56e 100644
@@ -2,7 +2,7 @@
  * linux/drivers/serial/cpm_uart/cpm_uart_cpm2.h
  *
  * Driver for CPM (SCC/SMC) serial ports
- * 
+ *
  * definitions for cpm2
  *
  */
Signature · 1 line
1.5.5.1
author
#2 lore raw

PATCH 2/5 cpm_uart: Remove !CONFIG_PPC_CPM_NEW_BINDING code

Now that arch/ppc is gone we always define CONFIG_PPC_CPM_NEW_BINDING so we can remove all the code associated with !CONFIG_PPC_CPM_NEW_BINDING.

---
 drivers/serial/cpm_uart/cpm_uart.h      |    3 -
 drivers/serial/cpm_uart/cpm_uart_core.c |  371 +------------------------------
 drivers/serial/cpm_uart/cpm_uart_cpm1.c |  168 --------------
 drivers/serial/cpm_uart/cpm_uart_cpm1.h |   10 -
 drivers/serial/cpm_uart/cpm_uart_cpm2.c |  277 -----------------------
 drivers/serial/cpm_uart/cpm_uart_cpm2.h |   10 -
 6 files changed, 1 insertions(+), 838 deletions(-)
drivers/serial/cpm_uart/cpm_uart.h +0 -3
index 3d07bec..5c76e0a 100644
@@ -84,9 +84,6 @@ struct uart_cpm_port {
 	u32			command;
 };
 
-#ifndef CONFIG_PPC_CPM_NEW_BINDING
-extern int cpm_uart_port_map[UART_NR];
-#endif
 extern int cpm_uart_nr;
 extern struct uart_cpm_port cpm_uart_ports[UART_NR];
 
drivers/serial/cpm_uart/cpm_uart_core.c +1 -370

432 lines not on this page · raw message

drivers/serial/cpm_uart/cpm_uart_cpm1.c +0 -168

183 lines not on this page · raw message

drivers/serial/cpm_uart/cpm_uart_cpm1.h +0 -10
index b805698..10eecd6 100644
@@ -12,16 +12,6 @@
 
 #include <asm/cpm1.h>
 
-/* defines for IRQs */
-#ifndef CONFIG_PPC_CPM_NEW_BINDING
-#define SMC1_IRQ	(CPM_IRQ_OFFSET + CPMVEC_SMC1)
-#define SMC2_IRQ	(CPM_IRQ_OFFSET + CPMVEC_SMC2)
-#define SCC1_IRQ	(CPM_IRQ_OFFSET + CPMVEC_SCC1)
-#define SCC2_IRQ	(CPM_IRQ_OFFSET + CPMVEC_SCC2)
-#define SCC3_IRQ	(CPM_IRQ_OFFSET + CPMVEC_SCC3)
-#define SCC4_IRQ	(CPM_IRQ_OFFSET + CPMVEC_SCC4)
-#endif
-
 static inline void cpm_set_brg(int brg, int baud)
 {
 	cpm_setbrg(brg, baud);
drivers/serial/cpm_uart/cpm_uart_cpm2.c +0 -277

299 lines not on this page · raw message

drivers/serial/cpm_uart/cpm_uart_cpm2.h +0 -10
index a48b56e..7194c63 100644
@@ -12,16 +12,6 @@
 
 #include <asm/cpm2.h>
 
-/* defines for IRQs */
-#ifndef CONFIG_PPC_CPM_NEW_BINDING
-#define SMC1_IRQ	SIU_INT_SMC1
-#define SMC2_IRQ	SIU_INT_SMC2
-#define SCC1_IRQ	SIU_INT_SCC1
-#define SCC2_IRQ	SIU_INT_SCC2
-#define SCC3_IRQ	SIU_INT_SCC3
-#define SCC4_IRQ	SIU_INT_SCC4
-#endif
-
 static inline void cpm_set_brg(int brg, int baud)
 {
 	cpm_setbrg(brg, baud);
Signature · 1 line
1.5.5.1
author
#3 lore raw

PATCH 3/5 powerpc/cpm: Remove !CONFIG_PPC_CPM_NEW_BINDING code

Now that arch/ppc is gone we always define CONFIG_PPC_CPM_NEW_BINDING so we can remove all the code associated with !CONFIG_PPC_CPM_NEW_BINDING.

---
 include/asm-powerpc/cpm1.h |   20 --------------------
 include/asm-powerpc/cpm2.h |   26 --------------------------
 2 files changed, 0 insertions(+), 46 deletions(-)
include/asm-powerpc/cpm1.h +0 -20
index 3df4396..2ff7987 100644
@@ -42,35 +42,15 @@
 
 #define mk_cr_cmd(CH, CMD)	((CMD << 8) | (CH << 4))
 
-#ifndef CONFIG_PPC_CPM_NEW_BINDING
-/* The dual ported RAM is multi-functional.  Some areas can be (and are
- * being) used for microcode.  There is an area that can only be used
- * as data ram for buffer descriptors, which is all we use right now.
- * Currently the first 512 and last 256 bytes are used for microcode.
- */
-#define CPM_DATAONLY_BASE	((uint)0x0800)
-#define CPM_DATAONLY_SIZE	((uint)0x0700)
-#define CPM_DP_NOSPACE		((uint)0x7fffffff)
-#endif
-
 /* Export the base address of the communication processor registers
  * and dual port ram.
  */
 extern cpm8xx_t __iomem *cpmp; /* Pointer to comm processor */
 
-#ifdef CONFIG_PPC_CPM_NEW_BINDING
 #define cpm_dpalloc cpm_muram_alloc
 #define cpm_dpfree cpm_muram_free
 #define cpm_dpram_addr cpm_muram_addr
 #define cpm_dpram_phys cpm_muram_dma
-#else
-extern unsigned long cpm_dpalloc(uint size, uint align);
-extern int cpm_dpfree(unsigned long offset);
-extern unsigned long cpm_dpalloc_fixed(unsigned long offset, uint size, uint align);
-extern void cpm_dpdump(void);
-extern void *cpm_dpram_addr(unsigned long offset);
-extern uint cpm_dpram_phys(u8 *addr);
-#endif
 
 extern void cpm_setbrg(uint brg, uint rate);
 
include/asm-powerpc/cpm2.h +0 -26
index 4c85ed9..2c7fd9c 100644
@@ -78,24 +78,6 @@
 #define mk_cr_cmd(PG, SBC, MCN, OP) \
 	((PG << 26) | (SBC << 21) | (MCN << 6) | OP)
 
-#ifndef CONFIG_PPC_CPM_NEW_BINDING
-/* Dual Port RAM addresses.  The first 16K is available for almost
- * any CPM use, so we put the BDs there.  The first 128 bytes are
- * used for SMC1 and SMC2 parameter RAM, so we start allocating
- * BDs above that.  All of this must change when we start
- * downloading RAM microcode.
- */
-#define CPM_DATAONLY_BASE	((uint)128)
-#define CPM_DP_NOSPACE		((uint)0x7fffffff)
-#if defined(CONFIG_8272) || defined(CONFIG_MPC8555)
-#define CPM_DATAONLY_SIZE	((uint)(8 * 1024) - CPM_DATAONLY_BASE)
-#define CPM_FCC_SPECIAL_BASE	((uint)0x00009000)
-#else
-#define CPM_DATAONLY_SIZE	((uint)(16 * 1024) - CPM_DATAONLY_BASE)
-#define CPM_FCC_SPECIAL_BASE	((uint)0x0000b000)
-#endif
-#endif
-
 /* The number of pages of host memory we allocate for CPM.  This is
  * done early in kernel initialization to get physically contiguous
  * pages.
@@ -107,17 +89,9 @@
  */
 extern cpm_cpm2_t __iomem *cpmp; /* Pointer to comm processor */
 
-#ifdef CONFIG_PPC_CPM_NEW_BINDING
 #define cpm_dpalloc cpm_muram_alloc
 #define cpm_dpfree cpm_muram_free
 #define cpm_dpram_addr cpm_muram_addr
-#else
-extern unsigned long cpm_dpalloc(uint size, uint align);
-extern int cpm_dpfree(unsigned long offset);
-extern unsigned long cpm_dpalloc_fixed(unsigned long offset, uint size, uint align);
-extern void cpm_dpdump(void);
-extern void *cpm_dpram_addr(unsigned long offset);
-#endif
 
 extern void cpm_setbrg(uint brg, uint rate);
 extern void cpm2_fastbrg(uint brg, uint rate, int div16);
Signature · 1 line
1.5.5.1
author
#4 lore raw

PATCH 4/5 fs_enet: Remove !CONFIG_PPC_CPM_NEW_BINDING code

Now that arch/ppc is gone we always define CONFIG_PPC_CPM_NEW_BINDING so we can remove all the code associated with !CONFIG_PPC_CPM_NEW_BINDING.

Also fixed some asm/of_platform.h to linux/of_platform.h (and of_device.h)

---

Jeff, if this looks ok, its easier if this can go via the powerpc tree.

- k

 drivers/net/fs_enet/Makefile       |    5 -
 drivers/net/fs_enet/fs_enet-main.c |  309 +-----------------------------------
 drivers/net/fs_enet/fs_enet.h      |    4 -
 drivers/net/fs_enet/mac-fcc.c      |   67 +--------
 drivers/net/fs_enet/mac-fec.c      |   23 +---
 drivers/net/fs_enet/mac-scc.c      |   37 +----
 drivers/net/fs_enet/mii-bitbang.c  |  107 -------------
 drivers/net/fs_enet/mii-fec.c      |  144 +-----------------
 include/linux/fs_enet_pd.h         |    4 -
 9 files changed, 5 insertions(+), 695 deletions(-)
drivers/net/fs_enet/Makefile +0 -5
index 1ffbe07..d4a305e 100644
@@ -8,12 +8,7 @@ fs_enet-$(CONFIG_FS_ENET_HAS_SCC) += mac-scc.o
 fs_enet-$(CONFIG_FS_ENET_HAS_FEC) += mac-fec.o
 fs_enet-$(CONFIG_FS_ENET_HAS_FCC) += mac-fcc.o
 
-ifeq ($(CONFIG_PPC_CPM_NEW_BINDING),y)
 obj-$(CONFIG_FS_ENET_MDIO_FEC) += mii-fec.o
 obj-$(CONFIG_FS_ENET_MDIO_FCC) += mii-bitbang.o
-else
-fs_enet-$(CONFIG_FS_ENET_MDIO_FEC) += mii-fec.o
-fs_enet-$(CONFIG_FS_ENET_MDIO_FCC) += mii-bitbang.o
-endif
 
 fs_enet-objs := fs_enet-main.o $(fs_enet-m)
drivers/net/fs_enet/fs_enet-main.c +1 -308

344 lines not on this page · raw message

drivers/net/fs_enet/fs_enet.h +0 -4
index e05389c..db46d2e 100644
@@ -138,10 +138,6 @@ struct fs_enet_private {
 };
 
 /***************************************************************************/
-#ifndef CONFIG_PPC_CPM_NEW_BINDING
-int fs_enet_mdio_bb_init(void);
-int fs_enet_mdio_fec_init(void);
-#endif
 
 void fs_init_bds(struct net_device *dev);
 void fs_cleanup_bds(struct net_device *dev);
drivers/net/fs_enet/mac-fcc.c +1 -66

113 lines not on this page · raw message

drivers/net/fs_enet/mac-fec.c +1 -22
index 8a311d1..0a7d1c5 100644
@@ -32,6 +32,7 @@
 #include <linux/bitops.h>
 #include <linux/fs.h>
 #include <linux/platform_device.h>
+#include <linux/of_device.h>
 
 #include <asm/irq.h>
 #include <asm/uaccess.h>
@@ -43,10 +44,6 @@
 #include <asm/cpm1.h>
 #endif
 
-#ifdef CONFIG_PPC_CPM_NEW_BINDING
-#include <asm/of_device.h>
-#endif
-
 #include "fs_enet.h"
 #include "fec.h"
 
@@ -99,7 +96,6 @@ static int whack_reset(fec_t __iomem *fecp)
 
 static int do_pd_setup(struct fs_enet_private *fep)
 {
-#ifdef CONFIG_PPC_CPM_NEW_BINDING
 	struct of_device *ofdev = to_of_device(fep->dev);
 
 	fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL);
@@ -111,23 +107,6 @@ static int do_pd_setup(struct fs_enet_private *fep)
 		return -EINVAL;
 
 	return 0;
-#else
-	struct platform_device *pdev = to_platform_device(fep->dev);
-	struct resource	*r;
-
-	/* Fill out IRQ field */
-	fep->interrupt = platform_get_irq_byname(pdev,"interrupt");
-	if (fep->interrupt < 0)
-		return -EINVAL;
-
-	r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
-	fep->fec.fecp = ioremap(r->start, r->end - r->start + 1);
-
-	if(fep->fec.fecp == NULL)
-		return -EINVAL;
-
-	return 0;
-#endif
 }
 
 #define FEC_NAPI_RX_EVENT_MSK	(FEC_ENET_RXF | FEC_ENET_RXB)
drivers/net/fs_enet/mac-scc.c +1 -36
index d7ca319..029b3c7 100644
@@ -32,6 +32,7 @@
 #include <linux/bitops.h>
 #include <linux/fs.h>
 #include <linux/platform_device.h>
+#include <linux/of_platform.h>
 
 #include <asm/irq.h>
 #include <asm/uaccess.h>
@@ -43,10 +44,6 @@
 #include <asm/cpm1.h>
 #endif
 
-#ifdef CONFIG_PPC_CPM_NEW_BINDING
-#include <asm/of_platform.h>
-#endif
-
 #include "fs_enet.h"
 
 /*************************************************/
@@ -99,7 +96,6 @@ static inline int scc_cr_cmd(struct fs_enet_private *fep, u32 op)
 
 static int do_pd_setup(struct fs_enet_private *fep)
 {
-#ifdef CONFIG_PPC_CPM_NEW_BINDING
 	struct of_device *ofdev = to_of_device(fep->dev);
 
 	fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL);
@@ -115,27 +111,6 @@ static int do_pd_setup(struct fs_enet_private *fep)
 		iounmap(fep->scc.sccp);
 		return -EINVAL;
 	}
-#else
-	struct platform_device *pdev = to_platform_device(fep->dev);
-	struct resource *r;
-
-	/* Fill out IRQ field */
-	fep->interrupt = platform_get_irq_byname(pdev, "interrupt");
-	if (fep->interrupt < 0)
-		return -EINVAL;
-
-	r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
-	fep->scc.sccp = ioremap(r->start, r->end - r->start + 1);
-
-	if (fep->scc.sccp == NULL)
-		return -EINVAL;
-
-	r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pram");
-	fep->scc.ep = ioremap(r->start, r->end - r->start + 1);
-
-	if (fep->scc.ep == NULL)
-		return -EINVAL;
-#endif
 
 	return 0;
 }
@@ -149,16 +124,6 @@ static int setup_data(struct net_device *dev)
 {
 	struct fs_enet_private *fep = netdev_priv(dev);
 
-#ifndef CONFIG_PPC_CPM_NEW_BINDING
-	struct fs_platform_info *fpi = fep->fpi;
-
-	fep->scc.idx = fs_get_scc_index(fpi->fs_no);
-	if ((unsigned int)fep->fcc.idx >= 4) /* max 4 SCCs */
-		return -EINVAL;
-
-	fpi->cp_command = fep->fcc.idx << 6;
-#endif
-
 	do_pd_setup(fep);
 
 	fep->scc.hthi = 0;
drivers/net/fs_enet/mii-bitbang.c +0 -107

123 lines not on this page · raw message

drivers/net/fs_enet/mii-fec.c +1 -143

170 lines not on this page · raw message

include/linux/fs_enet_pd.h +0 -4
index 9bc045b..0ba21ee 100644
@@ -135,11 +135,7 @@ struct fs_platform_info {
 	u32 device_flags;
 
 	int phy_addr;		/* the phy address (-1 no phy) */
-#ifdef CONFIG_PPC_CPM_NEW_BINDING
 	char bus_id[16];
-#else
-	const char*	bus_id;
-#endif
 	int phy_irq;		/* the phy irq (if it exists)  */
 
 	const struct fs_mii_bus_info *bus_info;
Signature · 1 line
1.5.5.1
author
#5 lore raw

PATCH 5/5 powerpc: Remove Kconfig PPC_CPM_NEW_BINDING

With arch/ppc gone and all in kernel users of CONFIG_PPC_CPM_NEW_BINDING fixed up we dont have need for the Kconfig option anymore.

---
 arch/powerpc/platforms/85xx/Kconfig |    1 -
 arch/powerpc/platforms/Kconfig      |    5 -----
 2 files changed, 0 insertions(+), 6 deletions(-)
arch/powerpc/platforms/85xx/Kconfig +0 -1
index 91d67ee..5627a4e 100644
@@ -79,7 +79,6 @@ config TQM8548
 	help
 	  This option enables support for the TQ Components TQM8548 board.
 	select DEFAULT_UIMAGE
-	select PPC_CPM_NEW_BINDING
 	select TQM85xx
 
 config TQM8555
arch/powerpc/platforms/Kconfig +0 -5
index 87454c5..10efaf8 100644
@@ -286,11 +286,6 @@ config CPM2
 	  you wish to build a kernel for a machine with a CPM2 coprocessor
 	  on it (826x, 827x, 8560).
 
-config PPC_CPM_NEW_BINDING
-	bool
-	depends on CPM1 || CPM2
-	default y
-
 config AXON_RAM
 	tristate "Axon DDR2 memory device driver"
 	depends on PPC_IBM_CELL_BLADE
Signature · 1 line
1.5.5.1