diff options
Diffstat (limited to 'arch/powerpc/platforms/83xx')
| -rw-r--r-- | arch/powerpc/platforms/83xx/Kconfig | 32 | ||||
| -rw-r--r-- | arch/powerpc/platforms/83xx/Makefile | 4 | ||||
| -rw-r--r-- | arch/powerpc/platforms/83xx/asp834x.c | 11 | ||||
| -rw-r--r-- | arch/powerpc/platforms/83xx/km83xx.c | 1 | ||||
| -rw-r--r-- | arch/powerpc/platforms/83xx/mpc830x_rdb.c | 1 | ||||
| -rw-r--r-- | arch/powerpc/platforms/83xx/mpc831x_rdb.c | 1 | ||||
| -rw-r--r-- | arch/powerpc/platforms/83xx/mpc832x_mds.c | 110 | ||||
| -rw-r--r-- | arch/powerpc/platforms/83xx/mpc832x_rdb.c | 13 | ||||
| -rw-r--r-- | arch/powerpc/platforms/83xx/mpc834x_itx.c | 11 | ||||
| -rw-r--r-- | arch/powerpc/platforms/83xx/mpc834x_mds.c | 101 | ||||
| -rw-r--r-- | arch/powerpc/platforms/83xx/mpc836x_mds.c | 210 | ||||
| -rw-r--r-- | arch/powerpc/platforms/83xx/mpc836x_rdk.c | 11 | ||||
| -rw-r--r-- | arch/powerpc/platforms/83xx/mpc837x_mds.c | 103 | ||||
| -rw-r--r-- | arch/powerpc/platforms/83xx/mpc837x_rdb.c | 1 | 
14 files changed, 5 insertions, 605 deletions
| diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig index bee119725f61..d355ad40995f 100644 --- a/arch/powerpc/platforms/83xx/Kconfig +++ b/arch/powerpc/platforms/83xx/Kconfig @@ -25,13 +25,6 @@ config MPC831x_RDB  	help  	  This option enables support for the MPC8313 RDB and MPC8315 RDB boards. -config MPC832x_MDS -	bool "Freescale MPC832x MDS" -	select DEFAULT_UIMAGE -	select PPC_MPC832x -	help -	  This option enables support for the MPC832x MDS evaluation board. -  config MPC832x_RDB  	bool "Freescale MPC832x RDB"  	select DEFAULT_UIMAGE @@ -39,18 +32,6 @@ config MPC832x_RDB  	help  	  This option enables support for the MPC8323 RDB board. -config MPC834x_MDS -	bool "Freescale MPC834x MDS" -	select DEFAULT_UIMAGE -	select PPC_MPC834x -	help -	  This option enables support for the MPC 834x MDS evaluation board. - -	  Be aware that PCI buses can only function when MDS board is plugged -	  into the PIB (Platform IO Board) board from Freescale which provide -	  3 PCI slots.  The PIBs PCI initialization is the bootloader's -	  responsibility. -  config MPC834x_ITX  	bool "Freescale MPC834x ITX"  	select DEFAULT_UIMAGE @@ -61,12 +42,6 @@ config MPC834x_ITX  	  Be aware that PCI initialization is the bootloader's  	  responsibility. -config MPC836x_MDS -	bool "Freescale MPC836x MDS" -	select DEFAULT_UIMAGE -	help -	  This option enables support for the MPC836x MDS Processor Board. -  config MPC836x_RDK  	bool "Freescale/Logic MPC836x RDK"  	select DEFAULT_UIMAGE @@ -76,13 +51,6 @@ config MPC836x_RDK  	  This option enables support for the MPC836x RDK Processor Board,  	  also known as ZOOM PowerQUICC Kit. -config MPC837x_MDS -	bool "Freescale MPC837x MDS" -	select DEFAULT_UIMAGE -	select PPC_MPC837x -	help -	  This option enables support for the MPC837x MDS Processor Board. -  config MPC837x_RDB  	bool "Freescale MPC837x RDB/WLAN"  	select DEFAULT_UIMAGE diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile index 41cb5f842eff..6b4013e01b3b 100644 --- a/arch/powerpc/platforms/83xx/Makefile +++ b/arch/powerpc/platforms/83xx/Makefile @@ -8,12 +8,8 @@ obj-$(CONFIG_MCU_MPC8349EMITX)	+= mcu_mpc8349emitx.o  obj-$(CONFIG_MPC830x_RDB)	+= mpc830x_rdb.o  obj-$(CONFIG_MPC831x_RDB)	+= mpc831x_rdb.o  obj-$(CONFIG_MPC832x_RDB)	+= mpc832x_rdb.o -obj-$(CONFIG_MPC834x_MDS)	+= mpc834x_mds.o  obj-$(CONFIG_MPC834x_ITX)	+= mpc834x_itx.o -obj-$(CONFIG_MPC836x_MDS)	+= mpc836x_mds.o  obj-$(CONFIG_MPC836x_RDK)	+= mpc836x_rdk.o -obj-$(CONFIG_MPC832x_MDS)	+= mpc832x_mds.o -obj-$(CONFIG_MPC837x_MDS)	+= mpc837x_mds.o  obj-$(CONFIG_MPC837x_RDB)	+= mpc837x_rdb.o  obj-$(CONFIG_ASP834x)		+= asp834x.o  obj-$(CONFIG_KMETER1)		+= km83xx.o diff --git a/arch/powerpc/platforms/83xx/asp834x.c b/arch/powerpc/platforms/83xx/asp834x.c index 68061c2a57c1..6870d0c34f1d 100644 --- a/arch/powerpc/platforms/83xx/asp834x.c +++ b/arch/powerpc/platforms/83xx/asp834x.c @@ -32,23 +32,14 @@ static void __init asp834x_setup_arch(void)  machine_device_initcall(asp834x, mpc83xx_declare_of_platform_devices); -/* - * Called very early, MMU is off, device-tree isn't unflattened - */ -static int __init asp834x_probe(void) -{ -	return of_machine_is_compatible("analogue-and-micro,asp8347e"); -} -  define_machine(asp834x) {  	.name			= "ASP8347E", -	.probe			= asp834x_probe, +	.compatible		= "analogue-and-micro,asp8347e",  	.setup_arch		= asp834x_setup_arch,  	.discover_phbs		= mpc83xx_setup_pci,  	.init_IRQ		= mpc83xx_ipic_init_IRQ,  	.get_irq		= ipic_get_irq,  	.restart		= mpc83xx_restart,  	.time_init		= mpc83xx_time_init, -	.calibrate_decr		= generic_calibrate_decr,  	.progress		= udbg_progress,  }; diff --git a/arch/powerpc/platforms/83xx/km83xx.c b/arch/powerpc/platforms/83xx/km83xx.c index 907acdecc94a..26ddc7136547 100644 --- a/arch/powerpc/platforms/83xx/km83xx.c +++ b/arch/powerpc/platforms/83xx/km83xx.c @@ -184,6 +184,5 @@ define_machine(mpc83xx_km) {  	.get_irq	= ipic_get_irq,  	.restart	= mpc83xx_restart,  	.time_init	= mpc83xx_time_init, -	.calibrate_decr	= generic_calibrate_decr,  	.progress	= udbg_progress,  }; diff --git a/arch/powerpc/platforms/83xx/mpc830x_rdb.c b/arch/powerpc/platforms/83xx/mpc830x_rdb.c index 956d4389effa..534bb227480d 100644 --- a/arch/powerpc/platforms/83xx/mpc830x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc830x_rdb.c @@ -53,6 +53,5 @@ define_machine(mpc830x_rdb) {  	.get_irq		= ipic_get_irq,  	.restart		= mpc83xx_restart,  	.time_init		= mpc83xx_time_init, -	.calibrate_decr		= generic_calibrate_decr,  	.progress		= udbg_progress,  }; diff --git a/arch/powerpc/platforms/83xx/mpc831x_rdb.c b/arch/powerpc/platforms/83xx/mpc831x_rdb.c index 3b578f080e3b..7b901ab3b864 100644 --- a/arch/powerpc/platforms/83xx/mpc831x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc831x_rdb.c @@ -53,6 +53,5 @@ define_machine(mpc831x_rdb) {  	.get_irq		= ipic_get_irq,  	.restart		= mpc83xx_restart,  	.time_init		= mpc83xx_time_init, -	.calibrate_decr		= generic_calibrate_decr,  	.progress		= udbg_progress,  }; diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c deleted file mode 100644 index 435344405d2c..000000000000 --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c +++ /dev/null @@ -1,110 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * Copyright 2006 Freescale Semiconductor, Inc. All rights reserved. - * - * Description: - * MPC832xE MDS board specific routines. - */ - -#include <linux/stddef.h> -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/errno.h> -#include <linux/reboot.h> -#include <linux/pci.h> -#include <linux/kdev_t.h> -#include <linux/major.h> -#include <linux/console.h> -#include <linux/delay.h> -#include <linux/seq_file.h> -#include <linux/root_dev.h> -#include <linux/initrd.h> -#include <linux/of_platform.h> -#include <linux/of_device.h> - -#include <linux/atomic.h> -#include <asm/time.h> -#include <asm/io.h> -#include <asm/machdep.h> -#include <asm/ipic.h> -#include <asm/irq.h> -#include <asm/udbg.h> -#include <sysdev/fsl_soc.h> -#include <sysdev/fsl_pci.h> -#include <soc/fsl/qe/qe.h> - -#include "mpc83xx.h" - -#undef DEBUG -#ifdef DEBUG -#define DBG(fmt...) udbg_printf(fmt) -#else -#define DBG(fmt...) -#endif - -/* ************************************************************************ - * - * Setup the architecture - * - */ -static void __init mpc832x_sys_setup_arch(void) -{ -	struct device_node *np; -	u8 __iomem *bcsr_regs = NULL; - -	mpc83xx_setup_arch(); - -	/* Map BCSR area */ -	np = of_find_node_by_name(NULL, "bcsr"); -	if (np) { -		struct resource res; - -		of_address_to_resource(np, 0, &res); -		bcsr_regs = ioremap(res.start, resource_size(&res)); -		of_node_put(np); -	} - -#ifdef CONFIG_QUICC_ENGINE -	if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) { -		par_io_init(np); -		of_node_put(np); - -		for_each_node_by_name(np, "ucc") -			par_io_of_config(np); -	} - -	if ((np = of_find_compatible_node(NULL, "network", "ucc_geth")) -			!= NULL){ -		/* Reset the Ethernet PHYs */ -#define BCSR8_FETH_RST 0x50 -		clrbits8(&bcsr_regs[8], BCSR8_FETH_RST); -		udelay(1000); -		setbits8(&bcsr_regs[8], BCSR8_FETH_RST); -		iounmap(bcsr_regs); -		of_node_put(np); -	} -#endif				/* CONFIG_QUICC_ENGINE */ -} - -machine_device_initcall(mpc832x_mds, mpc83xx_declare_of_platform_devices); - -/* - * Called very early, MMU is off, device-tree isn't unflattened - */ -static int __init mpc832x_sys_probe(void) -{ -	return of_machine_is_compatible("MPC832xMDS"); -} - -define_machine(mpc832x_mds) { -	.name 		= "MPC832x MDS", -	.probe 		= mpc832x_sys_probe, -	.setup_arch 	= mpc832x_sys_setup_arch, -	.discover_phbs	= mpc83xx_setup_pci, -	.init_IRQ	= mpc83xx_ipic_init_IRQ, -	.get_irq 	= ipic_get_irq, -	.restart 	= mpc83xx_restart, -	.time_init 	= mpc83xx_time_init, -	.calibrate_decr	= generic_calibrate_decr, -	.progress 	= udbg_progress, -}; diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c index caa96edf0e72..3b4e4173c59e 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c @@ -144,7 +144,7 @@ static int __init fsl_spi_init(struct spi_board_info *board_infos,  static void mpc83xx_spi_cs_control(struct spi_device *spi, bool on)  { -	pr_debug("%s %d %d\n", __func__, spi->chip_select, on); +	pr_debug("%s %d %d\n", __func__, spi_get_chipselect(spi, 0), on);  	par_io_data_set(3, 13, on);  } @@ -212,23 +212,14 @@ static void __init mpc832x_rdb_setup_arch(void)  machine_device_initcall(mpc832x_rdb, mpc83xx_declare_of_platform_devices); -/* - * Called very early, MMU is off, device-tree isn't unflattened - */ -static int __init mpc832x_rdb_probe(void) -{ -	return of_machine_is_compatible("MPC832xRDB"); -} -  define_machine(mpc832x_rdb) {  	.name		= "MPC832x RDB", -	.probe		= mpc832x_rdb_probe, +	.compatible	= "MPC832xRDB",  	.setup_arch	= mpc832x_rdb_setup_arch,  	.discover_phbs  = mpc83xx_setup_pci,  	.init_IRQ	= mpc83xx_ipic_init_IRQ,  	.get_irq	= ipic_get_irq,  	.restart	= mpc83xx_restart,  	.time_init	= mpc83xx_time_init, -	.calibrate_decr	= generic_calibrate_decr,  	.progress	= udbg_progress,  }; diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c index 6a110f275304..e45b98ff02d8 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c @@ -57,23 +57,14 @@ static void __init mpc834x_itx_setup_arch(void)  	mpc834x_usb_cfg();  } -/* - * Called very early, MMU is off, device-tree isn't unflattened - */ -static int __init mpc834x_itx_probe(void) -{ -	return of_machine_is_compatible("MPC834xMITX"); -} -  define_machine(mpc834x_itx) {  	.name			= "MPC834x ITX", -	.probe			= mpc834x_itx_probe, +	.compatible		= "MPC834xMITX",  	.setup_arch		= mpc834x_itx_setup_arch,  	.discover_phbs  	= mpc83xx_setup_pci,  	.init_IRQ		= mpc83xx_ipic_init_IRQ,  	.get_irq		= ipic_get_irq,  	.restart		= mpc83xx_restart,  	.time_init		= mpc83xx_time_init, -	.calibrate_decr		= generic_calibrate_decr,  	.progress		= udbg_progress,  }; diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c deleted file mode 100644 index 7dde5a75332b..000000000000 --- a/arch/powerpc/platforms/83xx/mpc834x_mds.c +++ /dev/null @@ -1,101 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * arch/powerpc/platforms/83xx/mpc834x_mds.c - * - * MPC834x MDS board specific routines - * - * Maintainer: Kumar Gala <galak@kernel.crashing.org> - */ - -#include <linux/stddef.h> -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/errno.h> -#include <linux/reboot.h> -#include <linux/pci.h> -#include <linux/kdev_t.h> -#include <linux/major.h> -#include <linux/console.h> -#include <linux/delay.h> -#include <linux/seq_file.h> -#include <linux/root_dev.h> -#include <linux/of_address.h> -#include <linux/of_platform.h> - -#include <linux/atomic.h> -#include <asm/time.h> -#include <asm/io.h> -#include <asm/machdep.h> -#include <asm/ipic.h> -#include <asm/irq.h> -#include <asm/udbg.h> -#include <sysdev/fsl_soc.h> -#include <sysdev/fsl_pci.h> - -#include "mpc83xx.h" - -#define BCSR5_INT_USB		0x02 -static int __init mpc834xemds_usb_cfg(void) -{ -	struct device_node *np; -	void __iomem *bcsr_regs = NULL; -	u8 bcsr5; - -	mpc834x_usb_cfg(); -	/* Map BCSR area */ -	np = of_find_node_by_name(NULL, "bcsr"); -	if (np) { -		struct resource res; - -		of_address_to_resource(np, 0, &res); -		bcsr_regs = ioremap(res.start, resource_size(&res)); -		of_node_put(np); -	} -	if (!bcsr_regs) -		return -1; - -	/* -	 * if Processor Board is plugged into PIB board, -	 * force to use the PHY on Processor Board -	 */ -	bcsr5 = in_8(bcsr_regs + 5); -	if (!(bcsr5 & BCSR5_INT_USB)) -		out_8(bcsr_regs + 5, (bcsr5 | BCSR5_INT_USB)); -	iounmap(bcsr_regs); -	return 0; -} - -/* ************************************************************************ - * - * Setup the architecture - * - */ -static void __init mpc834x_mds_setup_arch(void) -{ -	mpc83xx_setup_arch(); - -	mpc834xemds_usb_cfg(); -} - -machine_device_initcall(mpc834x_mds, mpc83xx_declare_of_platform_devices); - -/* - * Called very early, MMU is off, device-tree isn't unflattened - */ -static int __init mpc834x_mds_probe(void) -{ -	return of_machine_is_compatible("MPC834xMDS"); -} - -define_machine(mpc834x_mds) { -	.name			= "MPC834x MDS", -	.probe			= mpc834x_mds_probe, -	.setup_arch		= mpc834x_mds_setup_arch, -	.discover_phbs  	= mpc83xx_setup_pci, -	.init_IRQ		= mpc83xx_ipic_init_IRQ, -	.get_irq		= ipic_get_irq, -	.restart		= mpc83xx_restart, -	.time_init		= mpc83xx_time_init, -	.calibrate_decr		= generic_calibrate_decr, -	.progress		= udbg_progress, -}; diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c deleted file mode 100644 index b1e6665be5d3..000000000000 --- a/arch/powerpc/platforms/83xx/mpc836x_mds.c +++ /dev/null @@ -1,210 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * Copyright 2006 Freescale Semiconductor, Inc. All rights reserved. - * - * Author: Li Yang <LeoLi@freescale.com> - *	   Yin Olivia <Hong-hua.Yin@freescale.com> - * - * Description: - * MPC8360E MDS board specific routines. - * - * Changelog: - * Jun 21, 2006	Initial version - */ - -#include <linux/stddef.h> -#include <linux/kernel.h> -#include <linux/compiler.h> -#include <linux/init.h> -#include <linux/errno.h> -#include <linux/reboot.h> -#include <linux/pci.h> -#include <linux/kdev_t.h> -#include <linux/major.h> -#include <linux/console.h> -#include <linux/delay.h> -#include <linux/seq_file.h> -#include <linux/root_dev.h> -#include <linux/initrd.h> -#include <linux/of_platform.h> -#include <linux/of_device.h> - -#include <linux/atomic.h> -#include <asm/time.h> -#include <asm/io.h> -#include <asm/machdep.h> -#include <asm/ipic.h> -#include <asm/irq.h> -#include <asm/udbg.h> -#include <sysdev/fsl_soc.h> -#include <sysdev/fsl_pci.h> -#include <soc/fsl/qe/qe.h> - -#include "mpc83xx.h" - -#undef DEBUG -#ifdef DEBUG -#define DBG(fmt...) udbg_printf(fmt) -#else -#define DBG(fmt...) -#endif - -/* ************************************************************************ - * - * Setup the architecture - * - */ -static void __init mpc836x_mds_setup_arch(void) -{ -	struct device_node *np; -	u8 __iomem *bcsr_regs = NULL; - -	mpc83xx_setup_arch(); - -	/* Map BCSR area */ -	np = of_find_node_by_name(NULL, "bcsr"); -	if (np) { -		struct resource res; - -		of_address_to_resource(np, 0, &res); -		bcsr_regs = ioremap(res.start, resource_size(&res)); -		of_node_put(np); -	} - -#ifdef CONFIG_QUICC_ENGINE -	if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) { -		par_io_init(np); -		of_node_put(np); - -		for_each_node_by_name(np, "ucc") -			par_io_of_config(np); -#ifdef CONFIG_QE_USB -		/* Must fixup Par IO before QE GPIO chips are registered. */ -		par_io_config_pin(1,  2, 1, 0, 3, 0); /* USBOE  */ -		par_io_config_pin(1,  3, 1, 0, 3, 0); /* USBTP  */ -		par_io_config_pin(1,  8, 1, 0, 1, 0); /* USBTN  */ -		par_io_config_pin(1, 10, 2, 0, 3, 0); /* USBRXD */ -		par_io_config_pin(1,  9, 2, 1, 3, 0); /* USBRP  */ -		par_io_config_pin(1, 11, 2, 1, 3, 0); /* USBRN  */ -		par_io_config_pin(2, 20, 2, 0, 1, 0); /* CLK21  */ -#endif /* CONFIG_QE_USB */ -	} - -	if ((np = of_find_compatible_node(NULL, "network", "ucc_geth")) -			!= NULL){ -		uint svid; - -		/* Reset the Ethernet PHY */ -#define BCSR9_GETHRST 0x20 -		clrbits8(&bcsr_regs[9], BCSR9_GETHRST); -		udelay(1000); -		setbits8(&bcsr_regs[9], BCSR9_GETHRST); - -		/* handle mpc8360ea rev.2.1 erratum 2: RGMII Timing */ -		svid = mfspr(SPRN_SVR); -		if (svid == 0x80480021) { -			void __iomem *immap; - -			immap = ioremap(get_immrbase() + 0x14a8, 8); - -			/* -			 * IMMR + 0x14A8[4:5] = 11 (clk delay for UCC 2) -			 * IMMR + 0x14A8[18:19] = 11 (clk delay for UCC 1) -			 */ -			setbits32(immap, 0x0c003000); - -			/* -			 * IMMR + 0x14AC[20:27] = 10101010 -			 * (data delay for both UCC's) -			 */ -			clrsetbits_be32(immap + 4, 0xff0, 0xaa0); - -			iounmap(immap); -		} - -		iounmap(bcsr_regs); -		of_node_put(np); -	} -#endif				/* CONFIG_QUICC_ENGINE */ -} - -machine_device_initcall(mpc836x_mds, mpc83xx_declare_of_platform_devices); - -#ifdef CONFIG_QE_USB -static int __init mpc836x_usb_cfg(void) -{ -	u8 __iomem *bcsr; -	struct device_node *np; -	const char *mode; -	int ret = 0; - -	np = of_find_compatible_node(NULL, NULL, "fsl,mpc8360mds-bcsr"); -	if (!np) -		return -ENODEV; - -	bcsr = of_iomap(np, 0); -	of_node_put(np); -	if (!bcsr) -		return -ENOMEM; - -	np = of_find_compatible_node(NULL, NULL, "fsl,mpc8323-qe-usb"); -	if (!np) { -		ret = -ENODEV; -		goto err; -	} - -#define BCSR8_TSEC1M_MASK	(0x3 << 6) -#define BCSR8_TSEC1M_RGMII	(0x0 << 6) -#define BCSR8_TSEC2M_MASK	(0x3 << 4) -#define BCSR8_TSEC2M_RGMII	(0x0 << 4) -	/* -	 * Default is GMII (2), but we should set it to RGMII (0) if we use -	 * USB (Eth PHY is in RGMII mode anyway). -	 */ -	clrsetbits_8(&bcsr[8], BCSR8_TSEC1M_MASK | BCSR8_TSEC2M_MASK, -			       BCSR8_TSEC1M_RGMII | BCSR8_TSEC2M_RGMII); - -#define BCSR13_USBMASK	0x0f -#define BCSR13_nUSBEN	0x08 /* 1 - Disable, 0 - Enable			*/ -#define BCSR13_USBSPEED	0x04 /* 1 - Full, 0 - Low			*/ -#define BCSR13_USBMODE	0x02 /* 1 - Host, 0 - Function			*/ -#define BCSR13_nUSBVCC	0x01 /* 1 - gets VBUS, 0 - supplies VBUS 	*/ - -	clrsetbits_8(&bcsr[13], BCSR13_USBMASK, BCSR13_USBSPEED); - -	mode = of_get_property(np, "mode", NULL); -	if (mode && !strcmp(mode, "peripheral")) { -		setbits8(&bcsr[13], BCSR13_nUSBVCC); -		qe_usb_clock_set(QE_CLK21, 48000000); -	} else { -		setbits8(&bcsr[13], BCSR13_USBMODE); -	} - -	of_node_put(np); -err: -	iounmap(bcsr); -	return ret; -} -machine_arch_initcall(mpc836x_mds, mpc836x_usb_cfg); -#endif /* CONFIG_QE_USB */ - -/* - * Called very early, MMU is off, device-tree isn't unflattened - */ -static int __init mpc836x_mds_probe(void) -{ -	return of_machine_is_compatible("MPC836xMDS"); -} - -define_machine(mpc836x_mds) { -	.name		= "MPC836x MDS", -	.probe		= mpc836x_mds_probe, -	.setup_arch	= mpc836x_mds_setup_arch, -	.discover_phbs  = mpc83xx_setup_pci, -	.init_IRQ	= mpc83xx_ipic_init_IRQ, -	.get_irq	= ipic_get_irq, -	.restart	= mpc83xx_restart, -	.time_init	= mpc83xx_time_init, -	.calibrate_decr	= generic_calibrate_decr, -	.progress	= udbg_progress, -}; diff --git a/arch/powerpc/platforms/83xx/mpc836x_rdk.c b/arch/powerpc/platforms/83xx/mpc836x_rdk.c index 731bc5ce726d..1fc9d1235a7c 100644 --- a/arch/powerpc/platforms/83xx/mpc836x_rdk.c +++ b/arch/powerpc/platforms/83xx/mpc836x_rdk.c @@ -28,23 +28,14 @@ static void __init mpc836x_rdk_setup_arch(void)  	mpc83xx_setup_arch();  } -/* - * Called very early, MMU is off, device-tree isn't unflattened. - */ -static int __init mpc836x_rdk_probe(void) -{ -	return of_machine_is_compatible("fsl,mpc8360rdk"); -} -  define_machine(mpc836x_rdk) {  	.name		= "MPC836x RDK", -	.probe		= mpc836x_rdk_probe, +	.compatible	= "fsl,mpc8360rdk",  	.setup_arch	= mpc836x_rdk_setup_arch,  	.discover_phbs  = mpc83xx_setup_pci,  	.init_IRQ	= mpc83xx_ipic_init_IRQ,  	.get_irq	= ipic_get_irq,  	.restart	= mpc83xx_restart,  	.time_init	= mpc83xx_time_init, -	.calibrate_decr	= generic_calibrate_decr,  	.progress	= udbg_progress,  }; diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c b/arch/powerpc/platforms/83xx/mpc837x_mds.c deleted file mode 100644 index fa3538803af7..000000000000 --- a/arch/powerpc/platforms/83xx/mpc837x_mds.c +++ /dev/null @@ -1,103 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * arch/powerpc/platforms/83xx/mpc837x_mds.c - * - * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved. - * - * MPC837x MDS board specific routines - */ - -#include <linux/pci.h> -#include <linux/of.h> -#include <linux/of_address.h> -#include <linux/of_platform.h> - -#include <asm/time.h> -#include <asm/ipic.h> -#include <asm/udbg.h> -#include <sysdev/fsl_pci.h> - -#include "mpc83xx.h" - -#define BCSR12_USB_SER_MASK	0x8a -#define BCSR12_USB_SER_PIN	0x80 -#define BCSR12_USB_SER_DEVICE	0x02 - -static int __init mpc837xmds_usb_cfg(void) -{ -	struct device_node *np; -	const void *phy_type, *mode; -	void __iomem *bcsr_regs = NULL; -	u8 bcsr12; -	int ret; - -	ret = mpc837x_usb_cfg(); -	if (ret) -		return ret; -	/* Map BCSR area */ -	np = of_find_compatible_node(NULL, NULL, "fsl,mpc837xmds-bcsr"); -	if (np) { -		bcsr_regs = of_iomap(np, 0); -		of_node_put(np); -	} -	if (!bcsr_regs) -		return -1; - -	np = of_find_node_by_name(NULL, "usb"); -	if (!np) { -		ret = -ENODEV; -		goto out; -	} -	phy_type = of_get_property(np, "phy_type", NULL); -	if (phy_type && !strcmp(phy_type, "ulpi")) { -		clrbits8(bcsr_regs + 12, BCSR12_USB_SER_PIN); -	} else if (phy_type && !strcmp(phy_type, "serial")) { -		mode = of_get_property(np, "dr_mode", NULL); -		bcsr12 = in_8(bcsr_regs + 12) & ~BCSR12_USB_SER_MASK; -		bcsr12 |= BCSR12_USB_SER_PIN; -		if (mode && !strcmp(mode, "peripheral")) -			bcsr12 |= BCSR12_USB_SER_DEVICE; -		out_8(bcsr_regs + 12, bcsr12); -	} else { -		printk(KERN_ERR "USB DR: unsupported PHY\n"); -	} - -	of_node_put(np); -out: -	iounmap(bcsr_regs); -	return ret; -} - -/* ************************************************************************ - * - * Setup the architecture - * - */ -static void __init mpc837x_mds_setup_arch(void) -{ -	mpc83xx_setup_arch(); -	mpc837xmds_usb_cfg(); -} - -machine_device_initcall(mpc837x_mds, mpc83xx_declare_of_platform_devices); - -/* - * Called very early, MMU is off, device-tree isn't unflattened - */ -static int __init mpc837x_mds_probe(void) -{ -	return of_machine_is_compatible("fsl,mpc837xmds"); -} - -define_machine(mpc837x_mds) { -	.name			= "MPC837x MDS", -	.probe			= mpc837x_mds_probe, -	.setup_arch		= mpc837x_mds_setup_arch, -	.discover_phbs  	= mpc83xx_setup_pci, -	.init_IRQ		= mpc83xx_ipic_init_IRQ, -	.get_irq		= ipic_get_irq, -	.restart		= mpc83xx_restart, -	.time_init		= mpc83xx_time_init, -	.calibrate_decr		= generic_calibrate_decr, -	.progress		= udbg_progress, -}; diff --git a/arch/powerpc/platforms/83xx/mpc837x_rdb.c b/arch/powerpc/platforms/83xx/mpc837x_rdb.c index 5d48c6842098..39e78018dd0b 100644 --- a/arch/powerpc/platforms/83xx/mpc837x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc837x_rdb.c @@ -78,6 +78,5 @@ define_machine(mpc837x_rdb) {  	.get_irq		= ipic_get_irq,  	.restart		= mpc83xx_restart,  	.time_init		= mpc83xx_time_init, -	.calibrate_decr		= generic_calibrate_decr,  	.progress		= udbg_progress,  }; | 
