linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] [RFC] Change MPC52xx to platform bus / ppc_sys model
@ 2005-03-21 23:06 Sylvain Munaut
  2005-03-21 23:07 ` [PATCH 1/6] ppc32: Remove unnecessary test in MPC52xx reset code Sylvain Munaut
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Sylvain Munaut @ 2005-03-21 23:06 UTC (permalink / raw)
  To: ML linuxppc-embedded

Hi all,

This series of patch changes all the MPC52xx related code
to use platform bus and ppc_sys instead of OCP. It's
divided in several patches that represents "steps" in
the conversion. However the intermediate states might
not be functionnal.

This is the first try, comments and suggestions are
welcomed.


	Sylvain

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 1/6] ppc32: Remove unnecessary test in MPC52xx reset code
  2005-03-21 23:06 [PATCH 0/6] [RFC] Change MPC52xx to platform bus / ppc_sys model Sylvain Munaut
@ 2005-03-21 23:07 ` Sylvain Munaut
  2005-03-21 23:07 ` [PATCH 2/6] ppc32: Remove the OCP system from the Freescale MPC52xx support Sylvain Munaut
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 18+ messages in thread
From: Sylvain Munaut @ 2005-03-21 23:07 UTC (permalink / raw)
  To: ML linuxppc-embedded

ppc32: Remove unnecessary test in MPC52xx reset code

That test is part of an old version of the code and
erroneously made it to mainstream.


Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
---
diff -Nru a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c
--- a/arch/ppc/syslib/mpc52xx_setup.c	2005-03-21 20:09:24 +01:00
+++ b/arch/ppc/syslib/mpc52xx_setup.c	2005-03-21 20:09:24 +01:00
@@ -46,11 +46,8 @@
 
 	/* Turn on the watchdog and wait for it to expire. It effectively
 	  does a reset */
-	if (gpt0 != NULL) {
-		out_be32(&gpt0->count, 0x000000ff);
-		out_be32(&gpt0->mode, 0x00009004);
-	} else
-		printk(KERN_ERR "mpc52xx_restart: Unable to ioremap GPT0 registers, -> looping ...");
+	out_be32(&gpt0->count, 0x000000ff);
+	out_be32(&gpt0->mode, 0x00009004);
 
 	while (1);
 }

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 2/6] ppc32: Remove the OCP system from the Freescale MPC52xx support
  2005-03-21 23:06 [PATCH 0/6] [RFC] Change MPC52xx to platform bus / ppc_sys model Sylvain Munaut
  2005-03-21 23:07 ` [PATCH 1/6] ppc32: Remove unnecessary test in MPC52xx reset code Sylvain Munaut
@ 2005-03-21 23:07 ` Sylvain Munaut
  2005-03-21 23:08 ` [PATCH 3/6] ppc32: Change constants style in Freescale MPC52xx related code Sylvain Munaut
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 18+ messages in thread
From: Sylvain Munaut @ 2005-03-21 23:07 UTC (permalink / raw)
  To: ML linuxppc-embedded

ppc32: Remove the OCP system from the Freescale MPC52xx support

We remove all usage of the OCP system as preparation to switch
to the platform bus model / ppc_sys model.
This is only for 'generic' support, drivers are adapted separatly,
afterwards.


Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
---
diff -Nru a/arch/ppc/Kconfig b/arch/ppc/Kconfig
--- a/arch/ppc/Kconfig	2005-03-21 20:09:47 +01:00
+++ b/arch/ppc/Kconfig	2005-03-21 20:09:47 +01:00
@@ -822,7 +822,7 @@
 
 config FSL_OCP
 	bool
-	depends on MPC10X_BRIDGE || PPC_MPC52xx
+	depends on MPC10X_BRIDGE
 	default y
 
 config MPC10X_OPENPIC
diff -Nru a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile
--- a/arch/ppc/platforms/Makefile	2005-03-21 20:09:47 +01:00
+++ b/arch/ppc/platforms/Makefile	2005-03-21 20:09:47 +01:00
@@ -45,7 +45,7 @@
 obj-$(CONFIG_SANDPOINT)		+= sandpoint.o
 obj-$(CONFIG_SBC82xx)		+= sbc82xx.o
 obj-$(CONFIG_SPRUCE)		+= spruce.o
-obj-$(CONFIG_LITE5200)		+= lite5200.o mpc5200.o
+obj-$(CONFIG_LITE5200)		+= lite5200.o
 
 ifeq ($(CONFIG_SMP),y)
 obj-$(CONFIG_PPC_PMAC)		+= pmac_smp.o
diff -Nru a/arch/ppc/platforms/lite5200.c b/arch/ppc/platforms/lite5200.c
--- a/arch/ppc/platforms/lite5200.c	2005-03-21 20:09:47 +01:00
+++ b/arch/ppc/platforms/lite5200.c	2005-03-21 20:09:47 +01:00
@@ -13,7 +13,7 @@
  * Dale Farnsworth <dale.farnsworth@mvista.com> and
  * Wolfgang Denk <wd@denx.de>
  * 
- * Copyright 2004 Sylvain Munaut <tnt@246tNt.com>
+ * Copyright 2004-2005 Sylvain Munaut <tnt@246tNt.com>
  * Copyright 2003 Motorola Inc.
  * Copyright 2003 MontaVista Software Inc.
  * Copyright 2003 DENX Software Engineering (wd@denx.de)
@@ -29,10 +29,10 @@
 #include <linux/kdev_t.h>
 #include <linux/root_dev.h>
 #include <linux/console.h>
+#include <linux/module.h>
 
 #include <asm/bootinfo.h>
 #include <asm/io.h>
-#include <asm/ocp.h>
 #include <asm/mpc52xx.h>
 
 #include <syslib/mpc52xx_pci.h>
@@ -46,31 +46,6 @@
 
 
 /* ======================================================================== */
-/* OCP device definition                                                    */
-/* For board/shared resources like PSCs                                     */
-/* ======================================================================== */
-/* Be sure not to load conficting devices : e.g. loading the UART drivers for
- * PSC1 and then also loading a AC97 for this same PSC.
- * For details about how to create an entry, look in the doc of the concerned
- * driver ( eg drivers/serial/mpc52xx_uart.c for the PSC in uart mode )
- */
-
-static struct ocp_def board_ocp[] = {
-	{
-		.vendor		= OCP_VENDOR_FREESCALE,
-		.function	= OCP_FUNC_PSC_UART,
-		.index		= 0,
-		.paddr		= MPC52xx_PSC1,
-		.irq		= MPC52xx_PSC1_IRQ,
-		.pm		= OCP_CPM_NA,
-	},
-	{	/* Terminating entry */
-		.vendor		= OCP_VENDOR_INVALID
-	}
-};
-
-
-/* ======================================================================== */
 /* Platform specific code                                                   */
 /* ======================================================================== */
 
@@ -131,9 +106,6 @@
 static void __init
 lite5200_setup_arch(void)
 {
-	/* Add board OCP definitions */
-	mpc52xx_add_board_devices(board_ocp);
-
 	/* CPU & Port mux setup */
 	lite5200_setup_cpu();
 
diff -Nru a/arch/ppc/platforms/mpc5200.c b/arch/ppc/platforms/mpc5200.c
--- a/arch/ppc/platforms/mpc5200.c	2005-03-21 20:09:47 +01:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,53 +0,0 @@
-/*
- * arch/ppc/platforms/mpc5200.c
- *
- * OCP Definitions for the boards based on MPC5200 processor. Contains
- * definitions for every common peripherals. (Mostly all but PSCs)
- * 
- * Maintainer : Sylvain Munaut <tnt@246tNt.com>
- *
- * Copyright 2004 Sylvain Munaut <tnt@246tNt.com>
- *
- * 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
- * kind, whether express or implied.
- */
-
-#include <asm/ocp.h>
-#include <asm/mpc52xx.h>
-
-
-static struct ocp_fs_i2c_data mpc5200_i2c_def = {
-        .flags  = FS_I2C_CLOCK_5200,
-};
-
-
-/* Here is the core_ocp struct.
- * With all the devices common to all board. Even if port multiplexing is
- * not setup for them (if the user don't want them, just don't select the
- * config option). The potentially conflicting devices (like PSCs) goes in
- * board specific file.
- */
-struct ocp_def core_ocp[] = {
-	{
-		.vendor         = OCP_VENDOR_FREESCALE,
-		.function       = OCP_FUNC_IIC,
-		.index          = 0,
-		.paddr          = MPC52xx_I2C1,
-		.irq            = OCP_IRQ_NA,   /* MPC52xx_IRQ_I2C1 - Buggy */
-		.pm             = OCP_CPM_NA,
-		.additions      = &mpc5200_i2c_def,
-	},
-	{
-		.vendor         = OCP_VENDOR_FREESCALE,
-		.function       = OCP_FUNC_IIC,
-		.index          = 1,
-		.paddr          = MPC52xx_I2C2,
-		.irq            = OCP_IRQ_NA,   /* MPC52xx_IRQ_I2C2 - Buggy */
-		.pm             = OCP_CPM_NA,
-		.additions      = &mpc5200_i2c_def,
-	},
-	{	/* Terminating entry */
-		.vendor		= OCP_VENDOR_INVALID
-	}
-};
diff -Nru a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c
--- a/arch/ppc/syslib/mpc52xx_setup.c	2005-03-21 20:09:47 +01:00
+++ b/arch/ppc/syslib/mpc52xx_setup.c	2005-03-21 20:09:47 +01:00
@@ -23,7 +23,6 @@
 #include <asm/time.h>
 #include <asm/mpc52xx.h>
 #include <asm/mpc52xx_psc.h>
-#include <asm/ocp.h>
 #include <asm/pgtable.h>
 #include <asm/ppcboot.h>
 
@@ -218,12 +217,3 @@
 	tb_ticks_per_jiffy = xlbfreq / HZ / divisor;
 	tb_to_us = mulhwu_scale_factor(xlbfreq / divisor, 1000000);
 }
-
-
-void __init
-mpc52xx_add_board_devices(struct ocp_def board_ocp[]) {
-	while (board_ocp->vendor != OCP_VENDOR_INVALID)
-		if(ocp_add_one_device(board_ocp++))
-			printk("mpc5200-ocp: Failed to add board device !\n");
-}
-
diff -Nru a/include/asm-ppc/mpc52xx.h b/include/asm-ppc/mpc52xx.h
--- a/include/asm-ppc/mpc52xx.h	2005-03-21 20:09:47 +01:00
+++ b/include/asm-ppc/mpc52xx.h	2005-03-21 20:09:47 +01:00
@@ -26,7 +26,6 @@
 #include <asm/types.h>
 
 struct pt_regs;
-struct ocp_def;
 #endif /* __ASSEMBLY__ */
 
 
@@ -391,7 +390,6 @@
 extern void mpc52xx_power_off(void);
 extern void mpc52xx_progress(char *s, unsigned short hex);
 extern void mpc52xx_calibrate_decr(void);
-extern void mpc52xx_add_board_devices(struct ocp_def board_ocp[]);
 
 extern void mpc52xx_find_bridges(void);

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 3/6] ppc32: Change constants style in Freescale MPC52xx related code
  2005-03-21 23:06 [PATCH 0/6] [RFC] Change MPC52xx to platform bus / ppc_sys model Sylvain Munaut
  2005-03-21 23:07 ` [PATCH 1/6] ppc32: Remove unnecessary test in MPC52xx reset code Sylvain Munaut
  2005-03-21 23:07 ` [PATCH 2/6] ppc32: Remove the OCP system from the Freescale MPC52xx support Sylvain Munaut
@ 2005-03-21 23:08 ` Sylvain Munaut
  2005-03-21 23:08 ` [PATCH 4/6] ppc32: Add platform bus / ppc_sys model to Freescale MPC52xx Sylvain Munaut
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 18+ messages in thread
From: Sylvain Munaut @ 2005-03-21 23:08 UTC (permalink / raw)
  To: ML linuxppc-embedded

ppc32: Change constants style in Freescale MPC52xx related code

This patch changes the way the constants used for register block
address are defined/used. This is a preparation for the use of
the platform bus / ppc_sys model.


Signed-off-by: Sylvain Munaut <tnt@246tNt.com> 
---
diff -Nru a/arch/ppc/boot/simple/mpc52xx_tty.c b/arch/ppc/boot/simple/mpc52xx_tty.c
--- a/arch/ppc/boot/simple/mpc52xx_tty.c	2005-03-21 20:10:10 +01:00
+++ b/arch/ppc/boot/simple/mpc52xx_tty.c	2005-03-21 20:10:10 +01:00
@@ -20,32 +20,31 @@
 #include <asm/io.h>
 #include <asm/time.h>
 
-#if MPC52xx_PF_CONSOLE_PORT == 0
-#define MPC52xx_CONSOLE		MPC52xx_PSC1
-#define MPC52xx_PSC_CONFIG_SHIFT	0
-#elif MPC52xx_PF_CONSOLE_PORT == 1
-#define MPC52xx_CONSOLE		MPC52xx_PSC2
-#define MPC52xx_PSC_CONFIG_SHIFT	4
-#elif MPC52xx_PF_CONSOLE_PORT == 2
-#define MPC52xx_CONSOLE		MPC52xx_PSC3
-#define MPC52xx_PSC_CONFIG_SHIFT	8
+
+#ifdef MPC52xx_PF_CONSOLE_PORT
+#define MPC52xx_CONSOLE MPC52xx_PSCx_OFFSET(MPC52xx_PF_CONSOLE_PORT)
+#define MPC52xx_PSC_CONFIG_SHIFT ((MPC52xx_PF_CONSOLE_PORT-1)<<2)
 #else
 #error "MPC52xx_PF_CONSOLE_PORT not defined"
 #endif
 
 static struct mpc52xx_psc __iomem *psc =
-	(struct mpc52xx_psc __iomem *) MPC52xx_CONSOLE;
+	(struct mpc52xx_psc __iomem *) MPC52xx_PA(MPC52xx_CONSOLE);
 
 /* The decrementer counts at the system bus clock frequency
  * divided by four.  The most accurate time base is connected to the
- * rtc.  We read the decrementer change during one rtc tick (one second)
- * and multiply by 4 to get the system bus clock frequency.
+ * rtc.  We read the decrementer change during one rtc tick
+ * and multiply by 4 to get the system bus clock frequency. Since a
+ * rtc tick is one seconds, and that's pretty long, we change the rtc
+ * dividers temporarly to set them 64x faster ;)
  */
 static int
 mpc52xx_ipbfreq(void)
 {
-	struct mpc52xx_rtc __iomem *rtc = (struct mpc52xx_rtc __iomem *)MPC52xx_RTC;
-	struct mpc52xx_cdm __iomem *cdm = (struct mpc52xx_cdm __iomem *)MPC52xx_CDM;
+	struct mpc52xx_rtc __iomem *rtc =
+		(struct mpc52xx_rtc __iomem *) MPC52xx_PA(MPC52xx_RTC_OFFSET);
+	struct mpc52xx_cdm __iomem *cdm =
+		(struct mpc52xx_cdm __iomem *) MPC52xx_PA(MPC52xx_CDM_OFFSET);
 	int current_time, previous_time;
 	int tbl_start, tbl_end;
 	int xlbfreq, ipbfreq;
@@ -68,7 +67,8 @@
 unsigned long
 serial_init(int ignored, void *ignored2)
 {
-	struct mpc52xx_gpio __iomem *gpio = (struct mpc52xx_gpio __iomem *)MPC52xx_GPIO;
+	struct mpc52xx_gpio __iomem *gpio =
+		(struct mpc52xx_gpio __iomem *) MPC52xx_PA(MPC52xx_GPIO_OFFSET);
 	int divisor;
 	int mode1;
 	int mode2;
diff -Nru a/arch/ppc/platforms/lite5200.c b/arch/ppc/platforms/lite5200.c
--- a/arch/ppc/platforms/lite5200.c	2005-03-21 20:10:10 +01:00
+++ b/arch/ppc/platforms/lite5200.c	2005-03-21 20:10:10 +01:00
@@ -73,8 +73,8 @@
 	u32 intr_ctrl;
 
 	/* Map zones */
-	xlb  = ioremap(MPC52xx_XLB,sizeof(struct mpc52xx_xlb));
-	intr = ioremap(MPC52xx_INTR,sizeof(struct mpc52xx_intr));
+	xlb  = ioremap(MPC52xx_PA(MPC52xx_XLB_OFFSET), MPC52xx_XLB_SIZE);
+	intr = ioremap(MPC52xx_PA(MPC52xx_INTR_OFFSET), MPC52xx_INTR_SIZE);
 
 	if (!xlb || !intr) {
 		printk("lite5200.c: Error while mapping XLB/INTR during "
diff -Nru a/arch/ppc/platforms/lite5200.h b/arch/ppc/platforms/lite5200.h
--- a/arch/ppc/platforms/lite5200.h	2005-03-21 20:10:10 +01:00
+++ b/arch/ppc/platforms/lite5200.h	2005-03-21 20:10:10 +01:00
@@ -17,7 +17,7 @@
 #define __PLATFORMS_LITE5200_H__
 
 /* Serial port used for low-level debug */
-#define MPC52xx_PF_CONSOLE_PORT 0	/* PSC1 */
+#define MPC52xx_PF_CONSOLE_PORT 1	/* PSC1 */
 
 
 #endif /* __PLATFORMS_LITE5200_H__ */
diff -Nru a/arch/ppc/syslib/mpc52xx_pci.c b/arch/ppc/syslib/mpc52xx_pci.c
--- a/arch/ppc/syslib/mpc52xx_pci.c	2005-03-21 20:10:10 +01:00
+++ b/arch/ppc/syslib/mpc52xx_pci.c	2005-03-21 20:10:10 +01:00
@@ -183,7 +183,7 @@
 
 	pci_assign_all_busses = 1;
 
-	pci_regs = ioremap(MPC52xx_PCI, sizeof(struct mpc52xx_pci));
+	pci_regs = ioremap(MPC52xx_PA(MPC52xx_PCI_OFFSET), MPC52xx_PCI_SIZE);
 	if (!pci_regs)
 		return;
 
diff -Nru a/arch/ppc/syslib/mpc52xx_pic.c b/arch/ppc/syslib/mpc52xx_pic.c
--- a/arch/ppc/syslib/mpc52xx_pic.c	2005-03-21 20:10:10 +01:00
+++ b/arch/ppc/syslib/mpc52xx_pic.c	2005-03-21 20:10:10 +01:00
@@ -180,8 +180,8 @@
 	u32 intr_ctrl;
 
 	/* Remap the necessary zones */
-	intr = ioremap(MPC52xx_INTR, sizeof(struct mpc52xx_intr));
-	sdma = ioremap(MPC52xx_SDMA, sizeof(struct mpc52xx_sdma));
+	intr = ioremap(MPC52xx_PA(MPC52xx_INTR_OFFSET), MPC52xx_INTR_SIZE);
+	sdma = ioremap(MPC52xx_PA(MPC52xx_SDMA_OFFSET), MPC52xx_SDMA_SIZE);
 
 	if ((intr==NULL) || (sdma==NULL))
 		panic("Can't ioremap PIC/SDMA register for init_irq !");
diff -Nru a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c
--- a/arch/ppc/syslib/mpc52xx_setup.c	2005-03-21 20:10:10 +01:00
+++ b/arch/ppc/syslib/mpc52xx_setup.c	2005-03-21 20:10:10 +01:00
@@ -38,8 +38,7 @@
 void
 mpc52xx_restart(char *cmd)
 {
-	struct mpc52xx_gpt __iomem *gpt0 =
-		(struct mpc52xx_gpt __iomem *) MPC52xx_GPTx(0);
+	struct mpc52xx_gpt __iomem *gpt0 = MPC52xx_VA(MPC52xx_GPTx_OFFSET(0));
 
 	local_irq_disable();
 
@@ -92,9 +91,7 @@
 
 
 #ifdef CONFIG_SERIAL_TEXT_DEBUG
-#ifdef MPC52xx_PF_CONSOLE_PORT
-#define MPC52xx_CONSOLE MPC52xx_PSCx(MPC52xx_PF_CONSOLE_PORT)
-#else
+#ifndef MPC52xx_PF_CONSOLE_PORT
 #error "mpc52xx PSC for console not selected"
 #endif
 
@@ -110,8 +107,9 @@
 mpc52xx_progress(char *s, unsigned short hex)
 {
 	char c;
-	struct mpc52xx_psc __iomem *psc =
-		(struct mpc52xx_psc __iomem *)MPC52xx_CONSOLE;
+	struct mpc52xx_psc __iomem *psc;
+
+	psc = MPC52xx_VA(MPC52xx_PSCx_OFFSET(MPC52xx_PF_CONSOLE_PORT));
 
 	while ((c = *s++) != 0) {
 		if (c == '\n')
@@ -140,7 +138,7 @@
 		u32 sdram_config_0, sdram_config_1;
 
 		/* Temp BAT2 mapping active when this is called ! */
-		mmap_ctl = (struct mpc52xx_mmap_ctl __iomem *) MPC52xx_MMAP_CTL;
+		mmap_ctl = MPC52xx_VA(MPC52xx_MMAP_CTL_OFFSET);
 
 		sdram_config_0 = in_be32(&mmap_ctl->sdram0);
 		sdram_config_1 = in_be32(&mmap_ctl->sdram1);
@@ -170,8 +168,8 @@
 		struct mpc52xx_rtc __iomem *rtc;
 		struct mpc52xx_cdm __iomem *cdm;
 
-		rtc = ioremap(MPC52xx_RTC, sizeof(struct mpc52xx_rtc));
-		cdm = ioremap(MPC52xx_CDM, sizeof(struct mpc52xx_cdm));
+		rtc = ioremap(MPC52xx_PA(MPC52xx_RTC_OFFSET), MPC52xx_RTC_SIZE);
+		cdm = ioremap(MPC52xx_PA(MPC52xx_CDM_OFFSET), MPC52xx_CDM_SIZE);
 
 		if ((rtc==NULL) || (cdm==NULL))
 			panic("Can't ioremap RTC/CDM while computing bus freq");
diff -Nru a/include/asm-ppc/mpc52xx.h b/include/asm-ppc/mpc52xx.h
--- a/include/asm-ppc/mpc52xx.h	2005-03-21 20:10:10 +01:00
+++ b/include/asm-ppc/mpc52xx.h	2005-03-21 20:10:10 +01:00
@@ -10,7 +10,7 @@
  * Originally written by Dale Farnsworth <dfarnsworth@mvista.com> 
  * for the 2.4 kernel.
  *
- * Copyright (C) 2004 Sylvain Munaut <tnt@246tNt.com>
+ * Copyright (C) 2004-2005 Sylvain Munaut <tnt@246tNt.com>
  * Copyright (C) 2003 MontaVista, Software, Inc.
  *
  * This file is licensed under the terms of the GNU General Public License
@@ -32,46 +32,67 @@
 /* ======================================================================== */
 /* Main registers/struct addresses                                          */
 /* ======================================================================== */
-/* Theses are PHYSICAL addresses !                                          */
-/* TODO : There should be no static mapping, but it's not yet the case, so  */
-/*        we require a 1:1 mapping                                          */
 
+/* MBAR position */
 #define MPC52xx_MBAR		0xf0000000	/* Phys address */
-#define MPC52xx_MBAR_SIZE	0x00010000
 #define MPC52xx_MBAR_VIRT	0xf0000000	/* Virt address */
+#define MPC52xx_MBAR_SIZE	0x00010000
+
+#define MPC52xx_PA(x)		((phys_addr_t)(MPC52xx_MBAR + (x)))
+#define MPC52xx_VA(x)		((void __iomem *)(MPC52xx_MBAR_VIRT + (x)))
 
-#define MPC52xx_MMAP_CTL	(MPC52xx_MBAR + 0x0000)
-#define MPC52xx_SDRAM		(MPC52xx_MBAR + 0x0100)
-#define MPC52xx_CDM		(MPC52xx_MBAR + 0x0200)
-#define MPC52xx_SFTRST		(MPC52xx_MBAR + 0x0220)
-#define MPC52xx_SFTRST_BIT	0x01000000
-#define MPC52xx_INTR		(MPC52xx_MBAR + 0x0500)
-#define MPC52xx_GPTx(x)		(MPC52xx_MBAR + 0x0600 + ((x)<<4))
-#define MPC52xx_RTC		(MPC52xx_MBAR + 0x0800)
-#define MPC52xx_MSCAN1		(MPC52xx_MBAR + 0x0900)
-#define MPC52xx_MSCAN2		(MPC52xx_MBAR + 0x0980)
-#define MPC52xx_GPIO		(MPC52xx_MBAR + 0x0b00)
-#define MPC52xx_GPIO_WKUP	(MPC52xx_MBAR + 0x0c00)
-#define MPC52xx_PCI		(MPC52xx_MBAR + 0x0d00)
-#define MPC52xx_USB_OHCI	(MPC52xx_MBAR + 0x1000)
-#define MPC52xx_SDMA		(MPC52xx_MBAR + 0x1200)
-#define MPC52xx_XLB		(MPC52xx_MBAR + 0x1f00)
-#define MPC52xx_PSCx(x)		(MPC52xx_MBAR + 0x2000 + ((x)<<9))
-#define MPC52xx_PSC1		(MPC52xx_MBAR + 0x2000)
-#define MPC52xx_PSC2		(MPC52xx_MBAR + 0x2200)
-#define MPC52xx_PSC3		(MPC52xx_MBAR + 0x2400)
-#define MPC52xx_PSC4		(MPC52xx_MBAR + 0x2600)
-#define MPC52xx_PSC5		(MPC52xx_MBAR + 0x2800)
-#define MPC52xx_PSC6		(MPC52xx_MBAR + 0x2C00)
-#define MPC52xx_FEC		(MPC52xx_MBAR + 0x3000)
-#define MPC52xx_ATA		(MPC52xx_MBAR + 0x3a00)
-#define MPC52xx_I2C1		(MPC52xx_MBAR + 0x3d00)
-#define MPC52xx_I2C_MICR	(MPC52xx_MBAR + 0x3d20)
-#define MPC52xx_I2C2		(MPC52xx_MBAR + 0x3d40)
+/* Registers zone offset/size  */
+#define MPC52xx_MMAP_CTL_OFFSET		0x0000
+#define MPC52xx_MMAP_CTL_SIZE		0x068
+#define MPC52xx_SDRAM_OFFSET		0x0100
+#define MPC52xx_SDRAM_SIZE		0x010
+#define MPC52xx_CDM_OFFSET		0x0200
+#define MPC52xx_CDM_SIZE		0x038
+#define MPC52xx_INTR_OFFSET		0x0500
+#define MPC52xx_INTR_SIZE		0x04c
+#define MPC52xx_GPTx_OFFSET(x)		(0x0600 + ((x)<<4))
+#define MPC52xx_GPT_SIZE		0x010
+#define MPC52xx_RTC_OFFSET		0x0800
+#define MPC52xx_RTC_SIZE		0x024
+#define MPC52xx_MSCAN1_OFFSET		0x0900
+#define MPC52xx_MSCAN2_OFFSET		0x0980
+#define MPC52xx_MSCAN_SIZE		0x080
+#define MPC52xx_GPIO_OFFSET		0x0b00
+#define MPC52xx_GPIO_SIZE		0x040
+#define MPC52xx_GPIO_WKUP_OFFSET	0x0c00
+#define MPC52xx_GPIO_WKUP_SIZE		0x028
+#define MPC52xx_PCI_OFFSET		0x0d00
+#define MPC52xx_PCI_SIZE		0x100
+#define MPC52xx_SPI_OFFSET		0x0f00
+#define MPC52xx_SPI_SIZE		0x020
+#define MPC52xx_USB_OFFSET		0x1000
+#define MPC52xx_USB_SIZE		0x0a0
+#define MPC52xx_SDMA_OFFSET		0x1200
+#define MPC52xx_SDMA_SIZE		0x100
+#define MPC52xx_BDLC_OFFSET		0x1300
+#define MPC52xx_BDLC_SIZE		0x010
+#define MPC52xx_XLB_OFFSET		0x1f00
+#define MPC52xx_XLB_SIZE		0x100
+#define MPC52xx_PSC1_OFFSET		0x2000
+#define MPC52xx_PSC2_OFFSET		0x2200
+#define MPC52xx_PSC3_OFFSET		0x2400
+#define MPC52xx_PSC4_OFFSET		0x2600
+#define MPC52xx_PSC5_OFFSET		0x2800
+#define MPC52xx_PSC6_OFFSET		0x2c00
+#define MPC52xx_PSCx_OFFSET(x)		(((x)!=6)?(0x1e00+((x)<<9)):0x2c00)
+#define MPC52xx_PSC_SIZE		0x0a0
+#define MPC52xx_FEC_OFFSET		0x3000
+#define MPC52xx_FEC_SIZE		0x400
+#define MPC52xx_ATA_OFFSET		0x3a00
+#define MPC52xx_ATA_SIZE		0x080
+#define MPC52xx_I2C1_OFFSET		0x3d00
+#define MPC52xx_I2C_MICR		0x3d20
+#define MPC52xx_I2C2_OFFSET		0x3d40
+#define MPC52xx_I2C_SIZE		0x020
 
 /* SRAM used for SDMA */
-#define MPC52xx_SRAM		(MPC52xx_MBAR + 0x8000)
-#define MPC52xx_SRAM_SIZE	(16*1024)
+#define MPC52xx_SRAM_OFFSET		0x8000
+#define MPC52xx_SRAM_SIZE		0x4000
 
 
 /* ======================================================================== */
@@ -118,11 +139,12 @@
 #define MPC52xx_SPI_SPIF_IRQ		(MPC52xx_PERP_IRQ_BASE + 14)
 #define MPC52xx_I2C1_IRQ		(MPC52xx_PERP_IRQ_BASE + 15)
 #define MPC52xx_I2C2_IRQ		(MPC52xx_PERP_IRQ_BASE + 16)
-#define MPC52xx_CAN1_IRQ		(MPC52xx_PERP_IRQ_BASE + 17)
-#define MPC52xx_CAN2_IRQ		(MPC52xx_PERP_IRQ_BASE + 18)
+#define MPC52xx_MSCAN1_IRQ		(MPC52xx_PERP_IRQ_BASE + 17)
+#define MPC52xx_MSCAN2_IRQ		(MPC52xx_PERP_IRQ_BASE + 18)
 #define MPC52xx_IR_RX_IRQ		(MPC52xx_PERP_IRQ_BASE + 19)
 #define MPC52xx_IR_TX_IRQ		(MPC52xx_PERP_IRQ_BASE + 20)
 #define MPC52xx_XLB_ARB_IRQ		(MPC52xx_PERP_IRQ_BASE + 21)
+#define MPC52xx_BDLC_IRQ		(MPC52xx_PERP_IRQ_BASE + 22)
 
 
 
@@ -162,7 +184,7 @@
 	u32	cs6_start;	/* MMAP_CTRL + 0x58 */
 	u32	cs6_stop;	/* MMAP_CTRL + 0x5c */
 	u32	cs7_start;	/* MMAP_CTRL + 0x60 */
-	u32	cs7_stop;	/* MMAP_CTRL + 0x60 */
+	u32	cs7_stop;	/* MMAP_CTRL + 0x64 */
 };
 
 /* SDRAM control */

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 4/6] ppc32: Add platform bus / ppc_sys model to Freescale MPC52xx
  2005-03-21 23:06 [PATCH 0/6] [RFC] Change MPC52xx to platform bus / ppc_sys model Sylvain Munaut
                   ` (2 preceding siblings ...)
  2005-03-21 23:08 ` [PATCH 3/6] ppc32: Change constants style in Freescale MPC52xx related code Sylvain Munaut
@ 2005-03-21 23:08 ` Sylvain Munaut
  2005-03-25 15:15   ` Kumar Gala
  2005-03-21 23:09 ` [PATCH 5/6] serial: Update mpc52xx_uart.c to use platform bus Sylvain Munaut
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 18+ messages in thread
From: Sylvain Munaut @ 2005-03-21 23:08 UTC (permalink / raw)
  To: ML linuxppc-embedded

ppc32: Add platform bus / ppc_sys model to Freescale MPC52xx

This patch makes all platform based around the Freescale MPC52xx use
the platform bus and more precisly the ppc_sys model put in
place by Kumar Gala.


Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
---
diff -Nru a/arch/ppc/platforms/lite5200.c b/arch/ppc/platforms/lite5200.c
--- a/arch/ppc/platforms/lite5200.c	2005-03-21 20:10:34 +01:00
+++ b/arch/ppc/platforms/lite5200.c	2005-03-21 20:10:34 +01:00
@@ -34,6 +34,7 @@
 #include <asm/bootinfo.h>
 #include <asm/io.h>
 #include <asm/mpc52xx.h>
+#include <asm/ppc_sys.h>
 
 #include <syslib/mpc52xx_pci.h>
 
@@ -49,6 +50,17 @@
 /* Platform specific code                                                   */
 /* ======================================================================== */
 
+/* Supported PSC function in "preference" order */
+struct mpc52xx_psc_func mpc52xx_psc_functions[] = {
+		{       .id     = 0,
+			.func   = "uart",
+		},
+		{       .id     = -1,   /* End entry */
+			.func   = NULL,
+		}
+	};
+
+
 static int
 lite5200_show_cpuinfo(struct seq_file *m)
 {
@@ -147,6 +159,9 @@
 			strcpy(cmd_line, (char *)(r6+KERNELBASE));
 		}
 	}
+
+	/* PPC Sys identification */
+	identify_ppc_sys_by_id(mfspr(SPRN_SVR));
 
 	/* BAT setup */
 	mpc52xx_set_bat();
diff -Nru a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile
--- a/arch/ppc/syslib/Makefile	2005-03-21 20:10:34 +01:00
+++ b/arch/ppc/syslib/Makefile	2005-03-21 20:10:34 +01:00
@@ -106,7 +106,8 @@
 obj-$(CONFIG_PCI)		+= indirect_pci.o pci_auto.o
 endif
 obj-$(CONFIG_MPC8555_CDS)	+= todc_time.o
-obj-$(CONFIG_PPC_MPC52xx)	+= mpc52xx_setup.o mpc52xx_pic.o
+obj-$(CONFIG_PPC_MPC52xx)	+= mpc52xx_setup.o mpc52xx_pic.o \
+					mpc52xx_sys.o mpc52xx_devices.o ppc_sys.o
 ifeq ($(CONFIG_PPC_MPC52xx),y)
 obj-$(CONFIG_PCI)		+= mpc52xx_pci.o
 endif
diff -Nru a/arch/ppc/syslib/mpc52xx_devices.c b/arch/ppc/syslib/mpc52xx_devices.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/syslib/mpc52xx_devices.c	2005-03-21 20:10:34 +01:00
@@ -0,0 +1,333 @@
+/*
+ * arch/ppc/syslib/mpc52xx_devices.c
+ *
+ * Freescale MPC52xx device descriptions
+ *
+ *
+ * Maintainer : Sylvain Munaut <tnt@246tNt.com>
+ *
+ * Copyright (C) 2005 Sylvain Munaut <tnt@246tNt.com>
+ *
+ * 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
+ * kind, whether express or implied.
+ */
+
+#include <linux/fsl_devices.h>
+#include <linux/resource.h>
+#include <asm/mpc52xx.h>
+#include <asm/ppc_sys.h>
+
+
+static u64 mpc52xx_dma_mask = 0xffffffffULL;
+
+static struct fsl_i2c_platform_data mpc52xx_fsl_i2c_pdata = {
+	.device_flags = FSL_I2C_DEV_CLOCK_5200,
+};
+
+
+/* We use relative offsets for IORESOURCE_MEM to be independent from the
+ * MBAR location at compile time
+ */
+
+/* TODO Add the BestComm initiator channel to the device definitions,
+   possibly using IORESOURCE_DMA. But that's when BestComm is ready ... */
+
+struct platform_device ppc_sys_platform_devices[] = {
+	[MPC52xx_MSCAN1] = {
+		.name		= "mpc52xx-mscan",
+		.id		= 0,
+		.num_resources	= 2,
+		.resource = (struct resource[]) {
+			{
+				.start	= MPC52xx_MSCAN1_OFFSET,
+				.end	= MPC52xx_MSCAN1_OFFSET +
+						MPC52xx_MSCAN_SIZE - 1,
+				.flags	= IORESOURCE_MEM,
+			},
+			{
+				.start	= MPC52xx_MSCAN1_IRQ,
+				.end	= MPC52xx_MSCAN1_IRQ,
+				.flags	= IORESOURCE_IRQ,
+			},
+		},
+	},
+	[MPC52xx_MSCAN2] = {
+		.name		= "mpc52xx-mscan",
+		.id		= 1,
+		.num_resources	= 2,
+		.resource = (struct resource[]) {
+			{
+				.start	= MPC52xx_MSCAN2_OFFSET,
+				.end	= MPC52xx_MSCAN2_OFFSET +
+						MPC52xx_MSCAN_SIZE - 1,
+				.flags	= IORESOURCE_MEM,
+			},
+			{
+				.start	= MPC52xx_MSCAN2_IRQ,
+				.end	= MPC52xx_MSCAN2_IRQ,
+				.flags	= IORESOURCE_IRQ,
+			},
+		},
+	},
+	[MPC52xx_SPI] = {
+		.name		= "mpc52xx-spi",
+		.id		= -1,
+		.num_resources	= 3,
+		.resource	= (struct resource[]) {
+			{
+				.start	= MPC52xx_SPI_OFFSET,
+				.end	= MPC52xx_SPI_OFFSET +
+						MPC52xx_SPI_SIZE - 1,
+				.flags	= IORESOURCE_MEM,
+			},
+			{
+				.name	= "modf",
+				.start	= MPC52xx_SPI_MODF_IRQ,
+				.end	= MPC52xx_SPI_MODF_IRQ,
+				.flags	= IORESOURCE_IRQ,
+			},
+			{
+				.name	= "spif",
+				.start	= MPC52xx_SPI_SPIF_IRQ,
+				.end	= MPC52xx_SPI_SPIF_IRQ,
+				.flags	= IORESOURCE_IRQ,
+			},
+		},
+	},
+	[MPC52xx_USB] = {
+		.name		= "ppc-soc-ohci",
+		.id		= -1,
+		.num_resources	= 2,
+		.dev.dma_mask	= &mpc52xx_dma_mask,
+		.dev.coherent_dma_mask = 0xffffffffULL,
+		.resource	= (struct resource[]) {
+			{
+				.start	= MPC52xx_USB_OFFSET,
+				.end	= MPC52xx_USB_OFFSET +
+						MPC52xx_USB_SIZE - 1,
+				.flags	= IORESOURCE_MEM,
+			},
+			{
+				.start	= MPC52xx_USB_IRQ,
+				.end	= MPC52xx_USB_IRQ,
+				.flags	= IORESOURCE_IRQ,
+			},
+		},
+	},
+	[MPC52xx_BDLC] = {
+		.name		= "mpc52xx-bdlc",
+		.id		= -1,
+		.num_resources	= 2,
+		.resource	= (struct resource[]) {
+			{
+				.start	= MPC52xx_BDLC_OFFSET,
+				.end	= MPC52xx_BDLC_OFFSET +
+						MPC52xx_BDLC_SIZE - 1,
+				.flags	= IORESOURCE_MEM,
+			},
+			{
+				.start	= MPC52xx_BDLC_IRQ,
+				.end	= MPC52xx_BDLC_IRQ,
+				.flags	= IORESOURCE_IRQ,
+			},
+		},
+	},
+	[MPC52xx_PSC1] = {
+		.name		= "mpc52xx-psc",
+		.id		= 0,
+		.num_resources	= 2,
+		.resource	= (struct resource[]) {
+			{
+				.start	= MPC52xx_PSC1_OFFSET,
+				.end	= MPC52xx_PSC1_OFFSET +
+						MPC52xx_PSC_SIZE - 1,
+				.flags	= IORESOURCE_MEM,
+			},
+			{
+				.start	= MPC52xx_PSC1_IRQ,
+				.end	= MPC52xx_PSC1_IRQ,
+				.flags	= IORESOURCE_IRQ,
+			},
+		},
+	},
+	[MPC52xx_PSC2] = {
+		.name		= "mpc52xx-psc",
+		.id		= 1,
+		.num_resources	= 2,
+		.resource	= (struct resource[]) {
+			{
+				.start	= MPC52xx_PSC2_OFFSET,
+				.end	= MPC52xx_PSC2_OFFSET +
+						MPC52xx_PSC_SIZE - 1,
+				.flags	= IORESOURCE_MEM,
+			},
+			{
+				.start	= MPC52xx_PSC2_IRQ,
+				.end	= MPC52xx_PSC2_IRQ,
+				.flags	= IORESOURCE_IRQ,
+			},
+		},
+	},
+	[MPC52xx_PSC3] = {
+		.name		= "mpc52xx-psc",
+		.id		= 2,
+		.num_resources	= 2,
+		.resource	= (struct resource[]) {
+			{
+				.start	= MPC52xx_PSC3_OFFSET,
+				.end	= MPC52xx_PSC3_OFFSET +
+						MPC52xx_PSC_SIZE - 1,
+				.flags	= IORESOURCE_MEM,
+			},
+			{
+				.start	= MPC52xx_PSC3_IRQ,
+				.end	= MPC52xx_PSC3_IRQ,
+				.flags	= IORESOURCE_IRQ,
+			},
+		},
+	},
+	[MPC52xx_PSC4] = {
+		.name		= "mpc52xx-psc",
+		.id		= 3,
+		.num_resources	= 2,
+		.resource	= (struct resource[]) {
+			{
+				.start	= MPC52xx_PSC4_OFFSET,
+				.end	= MPC52xx_PSC4_OFFSET +
+						MPC52xx_PSC_SIZE - 1,
+				.flags	= IORESOURCE_MEM,
+			},
+			{
+				.start	= MPC52xx_PSC4_IRQ,
+				.end	= MPC52xx_PSC4_IRQ,
+				.flags	= IORESOURCE_IRQ,
+			},
+		},
+	},
+	[MPC52xx_PSC5] = {
+		.name		= "mpc52xx-psc",
+		.id		= 4,
+		.num_resources	= 2,
+		.resource	= (struct resource[]) {
+			{
+				.start	= MPC52xx_PSC5_OFFSET,
+				.end	= MPC52xx_PSC5_OFFSET +
+						MPC52xx_PSC_SIZE - 1,
+				.flags	= IORESOURCE_MEM,
+			},
+			{
+				.start	= MPC52xx_PSC5_IRQ,
+				.end	= MPC52xx_PSC5_IRQ,
+				.flags	= IORESOURCE_IRQ,
+			},
+		},
+	},
+	[MPC52xx_PSC6] = {
+		.name		= "mpc52xx-psc",
+		.id		= 5,
+		.num_resources	= 2,
+		.resource	= (struct resource[]) {
+			{
+				.start	= MPC52xx_PSC6_OFFSET,
+				.end	= MPC52xx_PSC6_OFFSET +
+						MPC52xx_PSC_SIZE - 1,
+				.flags	= IORESOURCE_MEM,
+			},
+			{
+				.start	= MPC52xx_PSC6_IRQ,
+				.end	= MPC52xx_PSC6_IRQ,
+				.flags	= IORESOURCE_IRQ,
+			},
+		},
+	},
+	[MPC52xx_FEC] = {
+		.name		= "mpc52xx-fec",
+		.id		= -1,
+		.num_resources	= 2,
+		.resource	= (struct resource[]) {
+			{
+				.start	= MPC52xx_FEC_OFFSET,
+				.end	= MPC52xx_FEC_OFFSET +
+						MPC52xx_FEC_SIZE - 1,
+				.flags	= IORESOURCE_MEM,
+			},
+			{
+				.start	= MPC52xx_FEC_IRQ,
+				.end	= MPC52xx_FEC_IRQ,
+				.flags	= IORESOURCE_IRQ,
+			},
+		},
+	},
+	[MPC52xx_ATA] = {
+		.name		= "mpc52xx-ata",
+		.id		= -1,
+		.num_resources	= 2,
+		.resource	= (struct resource[]) {
+			{
+				.start	= MPC52xx_ATA_OFFSET,
+				.end	= MPC52xx_ATA_OFFSET +
+						MPC52xx_ATA_SIZE - 1,
+				.flags	= IORESOURCE_MEM,
+			},
+			{
+				.start	= MPC52xx_ATA_IRQ,
+				.end	= MPC52xx_ATA_IRQ,
+				.flags	= IORESOURCE_IRQ,
+			},
+		},
+	},
+	[MPC52xx_I2C1] = {
+		.name		= "fsl-i2c",
+		.id		= 0,
+		.dev.platform_data = &mpc52xx_fsl_i2c_pdata,
+		.num_resources	= 2,
+		.resource	= (struct resource[]) {
+			{
+				.start	= MPC52xx_I2C1_OFFSET,
+				.end	= MPC52xx_I2C1_OFFSET +
+						MPC52xx_I2C_SIZE - 1,
+				.flags	= IORESOURCE_MEM,
+			},
+			{
+				.start	= MPC52xx_I2C1_IRQ,
+				.end	= MPC52xx_I2C1_IRQ,
+				.flags	= IORESOURCE_IRQ,
+			},
+		},
+	},
+	[MPC52xx_I2C2] = {
+		.name		= "fsl-i2c",
+		.id		= 1,
+		.dev.platform_data = &mpc52xx_fsl_i2c_pdata,
+		.num_resources	= 2,
+		.resource	= (struct resource[]) {
+			{
+				.start	= MPC52xx_I2C2_OFFSET,
+				.end	= MPC52xx_I2C2_OFFSET +
+						MPC52xx_I2C_SIZE - 1,
+				.flags	= IORESOURCE_MEM,
+			},
+			{
+				.start	= MPC52xx_I2C2_IRQ,
+				.end	= MPC52xx_I2C2_IRQ,
+				.flags	= IORESOURCE_IRQ,
+			},
+		},
+	},
+};
+
+
+static int __init mach_mpc52xx_fixup(struct platform_device *pdev)
+{
+	ppc_sys_fixup_mem_resource(pdev, MPC52xx_MBAR);
+	return 0;
+}
+
+static int __init mach_mpc52xx_init(void)
+{
+	ppc_sys_device_fixup = mach_mpc52xx_fixup;
+	return 0;
+}
+
+postcore_initcall(mach_mpc52xx_init);
diff -Nru a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c
--- a/arch/ppc/syslib/mpc52xx_setup.c	2005-03-21 20:10:34 +01:00
+++ b/arch/ppc/syslib/mpc52xx_setup.c	2005-03-21 20:10:34 +01:00
@@ -215,3 +215,16 @@
 	tb_ticks_per_jiffy = xlbfreq / HZ / divisor;
 	tb_to_us = mulhwu_scale_factor(xlbfreq / divisor, 1000000);
 }
+
+int mpc52xx_match_psc_function(int psc_idx, const char *func)
+{
+	struct mpc52xx_psc_func *cf = mpc52xx_psc_functions;
+
+	while ((cf->id != -1) && (cf->func != NULL)) {
+		if ((cf->id == psc_idx) && !strcmp(cf->func,func))
+			return 1;
+		cf++;
+	}
+
+	return 0;
+}
diff -Nru a/arch/ppc/syslib/mpc52xx_sys.c b/arch/ppc/syslib/mpc52xx_sys.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ppc/syslib/mpc52xx_sys.c	2005-03-21 20:10:34 +01:00
@@ -0,0 +1,38 @@
+/*
+ * arch/ppc/syslib/mpc52xx_sys.c
+ *
+ * Freescale MPC52xx system descriptions
+ *
+ *
+ * Maintainer : Sylvain Munaut <tnt@246tNt.com>
+ *
+ * Copyright (C) 2005 Sylvain Munaut <tnt@246tNt.com>
+ *
+ * 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
+ * kind, whether express or implied.
+ */
+
+#include <asm/ppc_sys.h>
+
+struct ppc_sys_spec *cur_ppc_sys_spec;
+struct ppc_sys_spec ppc_sys_specs[] = {
+	{
+		.ppc_sys_name	= "5200",
+		.mask		= 0xffff0000,
+		.value		= 0x80110000,
+		.num_devices	= 15,
+		.device_list	= (enum ppc_sys_devices[])
+		{
+			MPC52xx_MSCAN1, MPC52xx_MSCAN2, MPC52xx_SPI,
+			MPC52xx_USB, MPC52xx_BDLC, MPC52xx_PSC1, MPC52xx_PSC2,
+			MPC52xx_PSC3, MPC52xx_PSC4, MPC52xx_PSC5, MPC52xx_PSC6,
+			MPC52xx_FEC, MPC52xx_ATA, MPC52xx_I2C1, MPC52xx_I2C2,
+		},
+	},
+	{	/* default match */
+		.ppc_sys_name	= "",
+		.mask		= 0x00000000,
+		.value		= 0x00000000,
+	},
+};
diff -Nru a/include/asm-ppc/mpc52xx.h b/include/asm-ppc/mpc52xx.h
--- a/include/asm-ppc/mpc52xx.h	2005-03-21 20:10:34 +01:00
+++ b/include/asm-ppc/mpc52xx.h	2005-03-21 20:10:34 +01:00
@@ -30,6 +30,29 @@
 
 
 /* ======================================================================== */
+/* PPC Sys devices definition                                               */
+/* ======================================================================== */
+
+enum ppc_sys_devices {
+	MPC52xx_MSCAN1,
+	MPC52xx_MSCAN2,
+	MPC52xx_SPI,
+	MPC52xx_USB,
+	MPC52xx_BDLC,
+	MPC52xx_PSC1,
+	MPC52xx_PSC2,
+	MPC52xx_PSC3,
+	MPC52xx_PSC4,
+	MPC52xx_PSC5,
+	MPC52xx_PSC6,
+	MPC52xx_FEC,
+	MPC52xx_ATA,
+	MPC52xx_I2C1,
+	MPC52xx_I2C2,
+};
+
+
+/* ======================================================================== */
 /* Main registers/struct addresses                                          */
 /* ======================================================================== */
 
@@ -414,6 +437,17 @@
 extern void mpc52xx_calibrate_decr(void);
 
 extern void mpc52xx_find_bridges(void);
+
+
+	/* Matching of PSC function */
+struct mpc52xx_psc_func {
+	int id;
+	char *func;
+};
+
+extern int mpc52xx_match_psc_function(int psc_idx, const char *func);
+extern struct  mpc52xx_psc_func mpc52xx_psc_functions[];
+	/* This array is to be defined in platform file */
 
 #endif /* __ASSEMBLY__ */
 
diff -Nru a/include/asm-ppc/ppc_sys.h b/include/asm-ppc/ppc_sys.h
--- a/include/asm-ppc/ppc_sys.h	2005-03-21 20:10:34 +01:00
+++ b/include/asm-ppc/ppc_sys.h	2005-03-21 20:10:34 +01:00
@@ -25,6 +25,8 @@
 #include <asm/mpc83xx.h>
 #elif defined(CONFIG_85xx)
 #include <asm/mpc85xx.h>
+#elif defined(CONFIG_PPC_MPC52xx)
+#include <asm/mpc52xx.h>
 #else
 #error "need definition of ppc_sys_devices"
 #endif

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 5/6] serial: Update mpc52xx_uart.c to use platform bus
  2005-03-21 23:06 [PATCH 0/6] [RFC] Change MPC52xx to platform bus / ppc_sys model Sylvain Munaut
                   ` (3 preceding siblings ...)
  2005-03-21 23:08 ` [PATCH 4/6] ppc32: Add platform bus / ppc_sys model to Freescale MPC52xx Sylvain Munaut
@ 2005-03-21 23:09 ` Sylvain Munaut
  2005-03-21 23:09 ` [PATCH 6/6] ppc32: Adds necessary cpu init to use USB on LITE5200 Platform Sylvain Munaut
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 18+ messages in thread
From: Sylvain Munaut @ 2005-03-21 23:09 UTC (permalink / raw)
  To: ML linuxppc-embedded

serial: Update mpc52xx_uart.c to use platform bus

All Freescale MPC52xx related code now use new constants and
the platform bus for it's driver. This patch makes this driver
make use of that.


Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
---
diff -Nru a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
--- a/drivers/serial/mpc52xx_uart.c	2005-03-21 20:11:00 +01:00
+++ b/drivers/serial/mpc52xx_uart.c	2005-03-21 20:11:00 +01:00
@@ -18,7 +18,7 @@
  * Some of the code has been inspired/copied from the 2.4 code written
  * by Dale Farnsworth <dfarnsworth@mvista.com>.
  * 
- * Copyright (C) 2004 Sylvain Munaut <tnt@246tNt.com>
+ * Copyright (C) 2004-2005 Sylvain Munaut <tnt@246tNt.com>
  * Copyright (C) 2003 MontaVista, Software, Inc.
  * 
  * This file is licensed under the terms of the GNU General Public License
@@ -26,33 +26,26 @@
  * kind, whether express or implied.
  */
  
-/* OCP Usage :
+/* Platform device Usage :
  *
- * This drivers uses the OCP model. To load the serial driver for one of the
- * PSCs, just add this to the core_ocp table :
+ * Since PSCs can have multiple function, the correct driver for each one
+ * is selected by calling mpc52xx_match_psc_function(...). The function
+ * handled by this driver is "uart".
  *
- * {
- * 	.vendor         = OCP_VENDOR_FREESCALE,
- * 	.function       = OCP_FUNC_PSC_UART,
- * 	.index          = 0,
- * 	.paddr          = MPC52xx_PSC1,
- * 	.irq            = MPC52xx_PSC1_IRQ,
- * 	.pm             = OCP_CPM_NA,
- * },
- *
- * This is for PSC1, replace the paddr and irq according to the PSC you want to
- * use. The driver all necessary registers to place the PSC in uart mode without
+ * The driver init all necessary registers to place the PSC in uart mode without
  * DCD. However, the pin multiplexing aren't changed and should be set either
  * by the bootloader or in the platform init code.
- * The index field must be equal to the PSC index ( e.g. 0 for PSC1, 1 for PSC2,
+ *
+ * The idx field must be equal to the PSC index ( e.g. 0 for PSC1, 1 for PSC2,
  * and so on). So the PSC1 is mapped to /dev/ttyS0, PSC2 to /dev/ttyS1 and so
  * on. But be warned, it's an ABSOLUTE REQUIREMENT ! This is needed mainly for
  * the console code : without this 1:1 mapping, at early boot time, when we are
  * parsing the kernel args console=ttyS?, we wouldn't know wich PSC it will be
- * mapped to because OCP stuff is not yet initialized.
+ * mapped to.
  */
 
 #include <linux/config.h>
+#include <linux/device.h>
 #include <linux/module.h>
 #include <linux/tty.h>
 #include <linux/serial.h>
@@ -61,7 +54,6 @@
 
 #include <asm/delay.h>
 #include <asm/io.h>
-#include <asm/ocp.h>
 
 #include <asm/mpc52xx.h>
 #include <asm/mpc52xx_psc.h>
@@ -191,6 +183,13 @@
 mpc52xx_uart_startup(struct uart_port *port)
 {
 	struct mpc52xx_psc __iomem *psc = PSC(port);
+	int ret;
+
+	/* Request IRQ */
+	ret = request_irq(port->irq, mpc52xx_uart_int,
+		SA_INTERRUPT | SA_SAMPLE_RANDOM, "mpc52xx_psc_uart", port);
+	if (ret)
+		return ret;
 
 	/* Reset/activate the port, clear and enable interrupts */
 	out_8(&psc->command,MPC52xx_PSC_RST_RX);
@@ -225,6 +224,9 @@
 	
 	port->read_status_mask = 0; 
 	out_be16(&psc->mpc52xx_psc_imr,port->read_status_mask);
+
+	/* Release interrupt */
+	free_irq(port->irq, port);
 }
 
 static void 
@@ -326,15 +328,21 @@
 		iounmap(port->membase);
 		port->membase = NULL;
 	}
+
+	release_mem_region(port->mapbase, MPC52xx_PSC_SIZE);
 }
 
 static int
 mpc52xx_uart_request_port(struct uart_port *port)
 {
 	if (port->flags & UPF_IOREMAP) /* Need to remap ? */
-		port->membase = ioremap(port->mapbase, sizeof(struct mpc52xx_psc));
-	
-	return port->membase != NULL ? 0 : -EBUSY;
+		port->membase = ioremap(port->mapbase, MPC52xx_PSC_SIZE);
+
+	if (!port->membase)
+		return -EINVAL;
+
+	return request_mem_region(port->mapbase, MPC52xx_PSC_SIZE,
+			"mpc52xx_psc_uart") != NULL ? 0 : -EBUSY;
 }
 
 static void
@@ -354,7 +362,7 @@
 	if ( (ser->irq != port->irq) ||
 	     (ser->io_type != SERIAL_IO_MEM) ||
 	     (ser->baud_base != port->uartclk)  || 
-	     // FIXME Should check addresses/irq as well ?
+	     (ser->iomem_base != (void*)port->mapbase) ||
 	     (ser->hub6 != 0 ) )
 		return -EINVAL;
 
@@ -630,7 +638,7 @@
 {
 	struct uart_port *port = &mpc52xx_uart_ports[co->index];
 
-	int baud = 9600;
+	int baud = CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD;
 	int bits = 8;
 	int parity = 'n';
 	int flow = 'n';
@@ -643,14 +651,12 @@
 	spin_lock_init(&port->lock);
 	port->uartclk	= __res.bi_ipbfreq / 2; /* Look at CTLR doc */
 	port->ops	= &mpc52xx_uart_ops;
-	port->mapbase	= MPC52xx_PSCx(co->index);
+	port->mapbase	= MPC52xx_PA(MPC52xx_PSCx_OFFSET(co->index+1));
 
-		/* We ioremap ourself */
-	port->membase = ioremap(port->mapbase, sizeof(struct mpc52xx_psc));
-	if (port->membase == NULL) {
-		release_mem_region(port->mapbase, sizeof(struct mpc52xx_psc));
-		return -EBUSY;
-	}
+	/* We ioremap ourself */
+	port->membase = ioremap(port->mapbase, MPC52xx_PSC_SIZE);
+	if (port->membase == NULL)
+		return -EINVAL;
 
 	/* Setup the port parameters accoding to options */
 	if (options)
@@ -707,26 +713,32 @@
 
 
 /* ======================================================================== */
-/* OCP Driver                                                               */
+/* Platform Driver                                                          */
 /* ======================================================================== */
 
 static int __devinit
-mpc52xx_uart_probe(struct ocp_device *ocp)
+mpc52xx_uart_probe(struct device *dev)
 {
+	struct platform_device *pdev = to_platform_device(dev);
+	struct resource *res = pdev->resource;
+
 	struct uart_port *port = NULL;
-	int idx, ret;
+	int i, idx, ret;
 
-	/* Get the corresponding port struct */
-	idx = ocp->def->index;
+	/* Check validity & presence */
+	idx = pdev->id;
 	if (idx < 0 || idx >= MPC52xx_PSC_MAXNUM)
 		return -EINVAL;
-	
-	port = &mpc52xx_uart_ports[idx];
+
+	if (!mpc52xx_match_psc_function(idx,"uart"))
+		return -ENODEV;
 
 	/* Init the port structure */
+	port = &mpc52xx_uart_ports[idx];
+
+	memset(port, 0x00, sizeof(struct uart_port));
+
 	spin_lock_init(&port->lock);
-	port->mapbase	= ocp->def->paddr;
-	port->irq	= ocp->def->irq;
 	port->uartclk	= __res.bi_ipbfreq / 2; /* Look at CTLR doc */
 	port->fifosize	= 255; /* Should be 512 ! But it can't be */
 	                       /* stored in a unsigned char       */
@@ -735,95 +747,65 @@
 			  ( uart_console(port) ? 0 : UPF_IOREMAP );
 	port->line	= idx;
 	port->ops	= &mpc52xx_uart_ops;
-	port->read_status_mask = 0;
-	
-	/* Requests the mem & irqs */
-	/* Unlike other serial drivers, we reserve the resources here, so we
-	 * can detect early if multiple drivers uses the same PSC. Special
-	 * care must be taken with the console PSC
-	 */
-	ret = request_irq(
-		port->irq, mpc52xx_uart_int,
-		SA_INTERRUPT | SA_SAMPLE_RANDOM, "mpc52xx_psc_uart", port);
-	if (ret)
-		goto error;
 
-	ret = request_mem_region(port->mapbase, sizeof(struct mpc52xx_psc),
-	                         "mpc52xx_psc_uart") != NULL ? 0 : -EBUSY;
-	if (ret)
-		goto free_irq;
+	/* Search for IRQ and mapbase */
+	for (i=0 ; i<pdev->num_resources ; i++, res++) {
+		if (res->flags & IORESOURCE_MEM)
+			port->mapbase = res->start;
+		else if (res->flags & IORESOURCE_IRQ)
+			port->irq = res->start;
+	}
+	if (!port->irq || !port->mapbase)
+		return -EINVAL;
 
 	/* Add the port to the uart sub-system */
 	ret = uart_add_one_port(&mpc52xx_uart_driver, port);
-	if (ret)
-		goto release_mem;
-
-	ocp_set_drvdata(ocp, (void*)port);
-
-	return 0;
-
-
-free_irq:
-	free_irq(port->irq, mpc52xx_uart_int);
-
-release_mem:
-	release_mem_region(port->mapbase, sizeof(struct mpc52xx_psc));
-
-error:
-	if (uart_console(port))
-		printk(	"mpc52xx_uart.c: Error during resource alloction for "
-			"the console port !!! Check that the console PSC is "
-			"not used by another OCP driver !!!\n" );
+	if (!ret)
+		dev_set_drvdata(dev, (void*)port);
 
 	return ret;
 }
 
-static void
-mpc52xx_uart_remove(struct ocp_device *ocp)
+static int
+mpc52xx_uart_remove(struct device *dev)
 {
-	struct uart_port *port = (struct uart_port *) ocp_get_drvdata(ocp);
+	struct uart_port *port = (struct uart_port *) dev_get_drvdata(dev);
 
-	ocp_set_drvdata(ocp, NULL);
+	dev_set_drvdata(dev, NULL);
 
-	if (port) {
+	if (port)
 		uart_remove_one_port(&mpc52xx_uart_driver, port);
-		release_mem_region(port->mapbase, sizeof(struct mpc52xx_psc));
-		free_irq(port->irq, mpc52xx_uart_int);
-	}
+
+	return 0;
 }
 
 #ifdef CONFIG_PM
 static int
-mpc52xx_uart_suspend(struct ocp_device *ocp, u32 state)
+mpc52xx_uart_suspend(struct device *dev, u32 state, u32 level)
 {
-	struct uart_port *port = (struct uart_port *) ocp_get_drvdata(ocp);
+	struct uart_port *port = (struct uart_port *) dev_get_drvdata(dev);
 
-	uart_suspend_port(&mpc52xx_uart_driver, port);
+	if (sport && level == SUSPEND_DISABLE)
+		uart_suspend_port(&mpc52xx_uart_driver, port);
 
 	return 0;
 }
 
 static int
-mpc52xx_uart_resume(struct ocp_device *ocp)
+mpc52xx_uart_resume(struct device *dev, u32 level)
 {
-	struct uart_port *port = (struct uart_port *) ocp_get_drvdata(ocp);
+	struct uart_port *port = (struct uart_port *) dev_get_drvdata(dev);
 
-	uart_resume_port(&mpc52xx_uart_driver, port);
+	if (port && level == RESUME_ENABLE)
+		uart_resume_port(&mpc52xx_uart_driver, port);
 
 	return 0;
 }
 #endif
 
-static struct ocp_device_id mpc52xx_uart_ids[] __devinitdata = {
-	{ .vendor = OCP_VENDOR_FREESCALE, .function = OCP_FUNC_PSC_UART },
-	{ .vendor = OCP_VENDOR_INVALID /* Terminating entry */ }
-};
-
-MODULE_DEVICE_TABLE(ocp, mpc52xx_uart_ids);
-
-static struct ocp_driver mpc52xx_uart_ocp_driver = {
-	.name		= "mpc52xx_psc_uart",
-	.id_table	= mpc52xx_uart_ids,
+static struct device_driver mpc52xx_uart_platform_driver = {
+	.name		= "mpc52xx-psc",
+	.bus		= &platform_bus_type,
 	.probe		= mpc52xx_uart_probe,
 	.remove		= mpc52xx_uart_remove,
 #ifdef CONFIG_PM
@@ -845,10 +827,11 @@
 	printk(KERN_INFO "Serial: MPC52xx PSC driver\n");
 
 	ret = uart_register_driver(&mpc52xx_uart_driver);
-	if (ret)
-		return ret;
-
-	ret = ocp_register_driver(&mpc52xx_uart_ocp_driver);
+	if (ret == 0) {
+		ret = driver_register(&mpc52xx_uart_platform_driver);
+		if (ret)
+			uart_unregister_driver(&mpc52xx_uart_driver);
+	}
 
 	return ret;
 }
@@ -856,7 +839,7 @@
 static void __exit
 mpc52xx_uart_exit(void)
 {
-	ocp_unregister_driver(&mpc52xx_uart_ocp_driver);
+	driver_unregister(&mpc52xx_uart_platform_driver);
 	uart_unregister_driver(&mpc52xx_uart_driver);
 }

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 6/6] ppc32: Adds necessary cpu init to use USB on LITE5200 Platform
  2005-03-21 23:06 [PATCH 0/6] [RFC] Change MPC52xx to platform bus / ppc_sys model Sylvain Munaut
                   ` (4 preceding siblings ...)
  2005-03-21 23:09 ` [PATCH 5/6] serial: Update mpc52xx_uart.c to use platform bus Sylvain Munaut
@ 2005-03-21 23:09 ` Sylvain Munaut
  2005-03-22  1:11 ` [PATCH 0/6] [RFC] Change MPC52xx to platform bus / ppc_sys model Kumar Gala
  2005-03-22  7:04 ` Future of OCP Lawrence E. Bakst
  7 siblings, 0 replies; 18+ messages in thread
From: Sylvain Munaut @ 2005-03-21 23:09 UTC (permalink / raw)
  To: ML linuxppc-embedded

ppc32: Adds necessary cpu init to use USB on LITE5200 Platform

To use external peripheral on MPC5200, some clocking registers
and port-muxing must be done. Since this is platform specific,
it's placed the platform support file. This particular patch
is for USB support on the LITE5200.


Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
---
diff -Nru a/arch/ppc/platforms/lite5200.c b/arch/ppc/platforms/lite5200.c
--- a/arch/ppc/platforms/lite5200.c	2005-03-21 20:11:23 +01:00
+++ b/arch/ppc/platforms/lite5200.c	2005-03-21 20:11:23 +01:00
@@ -79,21 +79,47 @@
 static void __init
 lite5200_setup_cpu(void)
 {
+	struct mpc52xx_cdm  __iomem *cdm;
+	struct mpc52xx_gpio __iomem *gpio;
 	struct mpc52xx_intr __iomem *intr;
 	struct mpc52xx_xlb  __iomem *xlb;
 
+	u32 port_config;
 	u32 intr_ctrl;
 
 	/* Map zones */
+	cdm  = ioremap(MPC52xx_PA(MPC52xx_CDM_OFFSET), MPC52xx_CDM_SIZE);
+	gpio = ioremap(MPC52xx_PA(MPC52xx_GPIO_OFFSET), MPC52xx_GPIO_SIZE);
 	xlb  = ioremap(MPC52xx_PA(MPC52xx_XLB_OFFSET), MPC52xx_XLB_SIZE);
 	intr = ioremap(MPC52xx_PA(MPC52xx_INTR_OFFSET), MPC52xx_INTR_SIZE);
 
-	if (!xlb || !intr) {
-		printk("lite5200.c: Error while mapping XLB/INTR during "
+	if (!cdm || !gpio || !xlb || !intr) {
+		printk("lite5200.c: Error while mapping CDM/GPIO/XLB/INTR during"
 				"lite5200_setup_cpu\n");
 		goto unmap_regs;
 	}
 
+	/* Use internal 48 Mhz */
+	out_8(&cdm->ext_48mhz_en, 0x00);
+	out_8(&cdm->fd_enable, 0x01);
+	if (in_be32(&cdm->rstcfg) & 0x40)	/* Assumes 33Mhz clock */
+		out_be16(&cdm->fd_counters, 0x0001);
+	else
+		out_be16(&cdm->fd_counters, 0x5555);
+
+	/* Get port mux config */
+	port_config = in_be32(&gpio->port_config);
+
+	/* 48Mhz internal, pin is GPIO */
+	port_config &= ~0x00800000;
+
+	/* USB port */
+	port_config &= ~0x00007000;	/* Differential mode - USB1 only */
+	port_config |=  0x00001000;
+
+	/* Commit port config */
+	out_be32(&gpio->port_config, port_config);
+
 	/* Configure the XLB Arbiter */
 	out_be32(&xlb->master_pri_enable, 0xff);
 	out_be32(&xlb->master_priority, 0x11111111);
@@ -111,6 +137,8 @@
 
 	/* Unmap reg zone */
 unmap_regs:
+	if (cdm)  iounmap(cdm);
+	if (gpio) iounmap(gpio);
 	if (xlb)  iounmap(xlb);
 	if (intr) iounmap(intr);
 }
@@ -171,7 +199,11 @@
 	isa_mem_base		= 0;
 
 	/* Powersave */
-	powersave_nap = 1;	/* We allow this platform to NAP */
+	/* This is provided as an example on how to do it. But you
+	   need to be aware that NAP disable bus snoop and that may
+	   be required for some devices to work properly, like USB ... */
+	/* powersave_nap = 1; */
+
 
 	/* Setup the ppc_md struct */
 	ppc_md.setup_arch	= lite5200_setup_arch;

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/6] [RFC] Change MPC52xx to platform bus / ppc_sys model
  2005-03-21 23:06 [PATCH 0/6] [RFC] Change MPC52xx to platform bus / ppc_sys model Sylvain Munaut
                   ` (5 preceding siblings ...)
  2005-03-21 23:09 ` [PATCH 6/6] ppc32: Adds necessary cpu init to use USB on LITE5200 Platform Sylvain Munaut
@ 2005-03-22  1:11 ` Kumar Gala
  2005-03-22  7:12   ` Sylvain Munaut
  2005-03-22  7:04 ` Future of OCP Lawrence E. Bakst
  7 siblings, 1 reply; 18+ messages in thread
From: Kumar Gala @ 2005-03-22  1:11 UTC (permalink / raw)
  To: Sylvain Munaut; +Cc: ML linuxppc-embedded

Sylvain,

Took a quick glance at the patches and they look good.  Do you have a=20
bk tree available with all these changes in them?

I think a might have a few minor comments, but might be easier to see=20
the bk tree.

- kumar

On Mar 21, 2005, at 5:06 PM, Sylvain Munaut wrote:

> Hi all,
>
> This series of patch changes all the MPC52xx related code
>  to use platform bus and ppc_sys instead of OCP. It's
>  divided in several patches that represents "steps" in
>  the conversion. However the intermediate states might
>  not be functionnal.
>
> This is the first try, comments and suggestions are
>  welcomed.
>
>
>
> =A0=A0=A0=A0=A0=A0=A0 Sylvain
>  _______________________________________________
> Linuxppc-embedded mailing list
>  Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Future of OCP
  2005-03-21 23:06 [PATCH 0/6] [RFC] Change MPC52xx to platform bus / ppc_sys model Sylvain Munaut
                   ` (6 preceding siblings ...)
  2005-03-22  1:11 ` [PATCH 0/6] [RFC] Change MPC52xx to platform bus / ppc_sys model Kumar Gala
@ 2005-03-22  7:04 ` Lawrence E. Bakst
  2005-03-22  7:48   ` Eugene Surovegin
  7 siblings, 1 reply; 18+ messages in thread
From: Lawrence E. Bakst @ 2005-03-22  7:04 UTC (permalink / raw)
  To: ML linuxppc-embedded

I apologize up front for my ignorance.

At 12:06 AM +0100 3/22/05, Sylvain Munaut wrote:
>Hi all,
>
>This series of patch changes all the MPC52xx related code
>to use platform bus and ppc_sys instead of OCP. It's
>divided in several patches that represents "steps" in
>the conversion. However the intermediate states might
>not be functionnal.
>
>This is the first try, comments and suggestions are
>welcomed.


At 9:35 AM -0600 1/18/05, Kumar Gala wrote:
>System platform_device description, discovery and management:
>
>On most embedded PPC systems we either have a core CPU and chipset
>(MPC10x, TSI10x, Marvell, etc.) or a system-on-chip device (4xx, 8xx,
>82xx, 85xx, etc.).  Some of these sub-archs have been using the On Chip
>Peripheral (OCP) driver model.  The functionality that OCP provide has
>been replaced by the generic driver model and platform_device.  Also, some
>of these device may exist across a number of architectures (PPC, MIPS,
>ARM) such that some information that is shared between the architecture
>and driver needs to exist outside of either.
>
>The ppc_sys changes add a standard way for PowerPC systems to describe the
>devices and systems that exist in the sub-arch.  Additionally, we are able
>to discover which system we are and manage which devices are actually
>registered and any platform specific fixups that may be needed.
>
>Signed-off-by: Kumar Gala <kumar.gala@freescale.com>

Q1: OK, so I gather the OCP system which until recently used to be in a separate OCP tree and was recently integrated into 2.6 is going away?

I had just started to do a 405 EP port of 2.6.11-rc4  based off of the bubinga config.

Q2: Assuming yes, to Q1, any advice on how I should proceed, continue on with an OCP port or wait for this new stuff?

Q3: How does one stay in the loop on this stuff? With only about 3 messages posted in this group and none in linuxppc-dev I am clearly in the wrong place. I feel like I missed the conversation. Where was it?

Best,

leb

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/6] [RFC] Change MPC52xx to platform bus / ppc_sys model
  2005-03-22  1:11 ` [PATCH 0/6] [RFC] Change MPC52xx to platform bus / ppc_sys model Kumar Gala
@ 2005-03-22  7:12   ` Sylvain Munaut
  2005-03-24  8:37     ` [RFC] MPC5200 PCI problem Andrey Volkov
  0 siblings, 1 reply; 18+ messages in thread
From: Sylvain Munaut @ 2005-03-22  7:12 UTC (permalink / raw)
  To: Kumar Gala; +Cc: ML linuxppc-embedded

Hi Kumar,

Kumar Gala wrote:
> Took a quick glance at the patches and they look good.  Do you have a bk 
> tree available with all these changes in them?
> 
> I think a might have a few minor comments, but might be easier to see 
> the bk tree.

Sure, bk://tnt.bkbits.net/linux-2.5-mpc52xx-pending


The only difference between that tree and the patch is a few trailing
white space that are in BK but not in the patch.

Note that now, I should also add CONFIG_PPC_MPC52xx to the change of
/proc/cpuinfo. What about a CONFIG_PPC_SYS that would include ppc_sys.o
in the kernel and activate the /proc/cpuinfo chipset line ?



	Sylvain

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Future of OCP
  2005-03-22  7:04 ` Future of OCP Lawrence E. Bakst
@ 2005-03-22  7:48   ` Eugene Surovegin
  0 siblings, 0 replies; 18+ messages in thread
From: Eugene Surovegin @ 2005-03-22  7:48 UTC (permalink / raw)
  To: Lawrence E. Bakst; +Cc: ML linuxppc-embedded

On Mon, Mar 21, 2005 at 11:04:44PM -0800, Lawrence E. Bakst wrote:
> Q1: OK, so I gather the OCP system which until recently used to be 
> in a separate OCP tree and was recently integrated into 2.6 is going 
> away?

There is a trend use platform device instead of OCP. There are no 
conceptual differences though, just a more convenient way from cross 
platform POV - OCP is PPC specific, platform device - generic 
solution. 

IMHO there is little gain from converting 4xx from OCP platform device 
(except being just like other PPC subarchs :). That's the main reason 
it hasn't been done yet. Matt seems to be busy these days, I don't see 
a point, frankly, so we just waiting for a patch :).

> I had just started to do a 405 EP port of 2.6.11-rc4  based off of 
> the bubinga config.
> 
> Q2: Assuming yes, to Q1, any advice on how I should proceed, 
> continue on with an OCP port or wait for this new stuff?

Well, I wouldn't worry much. These changes will affect mostly device 
drivers and some platform stuff. Board code (which I assume you are 
working on) won't be changed significantly if any. As I said, platform 
device stuff is conceptually similar to OCP, so changes will be mostly 
cosmetic.

> Q3: How does one stay in the loop on this stuff? With only about 3 
> messages posted in this group and none in linuxppc-dev I am clearly 
> in the wrong place. I feel like I missed the conversation. Where was 
> it?

Most discussions happen on IRC (for more info see 
http://www.penguinppc.org). Some people think it's a kind of "elitist 
circle" which requires some special invitation :), which is not true, 
obviously.

--
Eugene

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [RFC] MPC5200 PCI problem
  2005-03-22  7:12   ` Sylvain Munaut
@ 2005-03-24  8:37     ` Andrey Volkov
  2005-03-24 14:34       ` Sylvain Munaut
  0 siblings, 1 reply; 18+ messages in thread
From: Andrey Volkov @ 2005-03-24  8:37 UTC (permalink / raw)
  To: Sylvain Munaut; +Cc: ML linuxppc-embedded

Hi Sylvain,

After last synchronization with your bk,
PCI subsys stop calling drv->probe of driver for
my external PCI board (UBoot meanwhile properly displayed and init this 
board). May be I do something wrong? Or PCI is in disjoint state now?

-- 
Regards
Andrey Volkov

P.S. HOTPLUG disabled in my conf.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [RFC] MPC5200 PCI problem
  2005-03-24  8:37     ` [RFC] MPC5200 PCI problem Andrey Volkov
@ 2005-03-24 14:34       ` Sylvain Munaut
  2005-03-24 18:58         ` Andrey Volkov
  0 siblings, 1 reply; 18+ messages in thread
From: Sylvain Munaut @ 2005-03-24 14:34 UTC (permalink / raw)
  To: Andrey Volkov; +Cc: ML linuxppc-embedded

Andrey Volkov wrote:
> Hi Sylvain,
> 
> After last synchronization with your bk,
> PCI subsys stop calling drv->probe of driver for
> my external PCI board (UBoot meanwhile properly displayed and init this 
> board). May be I do something wrong? Or PCI is in disjoint state now?
> 

With which tree exactly ?

Try adding some delays in the pci configuration zone access routines in 
mpc52xx_pci.c  I remember someone needed those but still don't know why, 
the manual don't say anything about that.

What does /proc/pci shows ?


	Sylvain

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [RFC] MPC5200 PCI problem
  2005-03-24 14:34       ` Sylvain Munaut
@ 2005-03-24 18:58         ` Andrey Volkov
  2005-03-25 12:32           ` [RFC] MPC5200 Kernel/UBoot " Andrey Volkov
  0 siblings, 1 reply; 18+ messages in thread
From: Andrey Volkov @ 2005-03-24 18:58 UTC (permalink / raw)
  To: Sylvain Munaut; +Cc: ML linuxppc-embedded



Sylvain Munaut wrote:
> Andrey Volkov wrote:
> 
>> Hi Sylvain,
>>
>> After last synchronization with your bk,
>> PCI subsys stop calling drv->probe of driver for
>> my external PCI board (UBoot meanwhile properly displayed and init 
>> this board). May be I do something wrong? Or PCI is in disjoint state 
>> now?
>>
> 
> With which tree exactly ?

http://linux.bkbits.net/linux-2.5 +
bk://tnt.bkbits.net/linux-2.5-mpc52xx-pending

> 
> Try adding some delays in the pci configuration zone access routines in 
> mpc52xx_pci.c  I remember someone needed those but still don't know why, 
> the manual don't say anything about that.
Board started, after I add udelay(7) in read/write config. Really strange.

> 
> What does /proc/pci shows ?
Couldn't do it now, because fec don't platform :), but OCP.


-- 
Regards
Andrey Volkov

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [RFC] MPC5200 Kernel/UBoot PCI problem
  2005-03-24 18:58         ` Andrey Volkov
@ 2005-03-25 12:32           ` Andrey Volkov
  2005-03-25 13:02             ` Dale Farnsworth
  2005-03-25 14:00             ` Sylvain Munaut
  0 siblings, 2 replies; 18+ messages in thread
From: Andrey Volkov @ 2005-03-25 12:32 UTC (permalink / raw)
  To: Sylvain Munaut, Wolfgang Denk; +Cc: linuxppc-embedded

Hi Sylvain, Wolfgang,

> 
>>
>> Try adding some delays in the pci configuration zone access routines 
>> in mpc52xx_pci.c  I remember someone needed those but still don't know 
>> why, the manual don't say anything about that.
> 
> Board started, after I add udelay(7) in read/write config. Really strange.

Sylvain, answer was in PCI2.2 specification, not in manual.

Wolfgang, as I see, you use same trick in u-boot, as Sylvain suggested 
to me. IMHO this trick is wrong. Below I explain why.

When I insert udelay(1000) after deassertion of RST# (write 0 to PR of 
PCIGSCR), AND remove ALL delays from read/write config, board started 
too ;). Hence problem not in the MPC, but in slow board(s) (re)start
(I was lucky with my board, because udelay must be 1000000).

Here some quotations from "PCI Local Bus Specification rev. 2.2":

 From table 4-6 Timing parameters:
					       |  Min	|Max| Unit
Trhfa| RST# High to First configuration access | 2**25	|   | clocks
Trhff| RST# High to First FRAME# assertion     |   5	|   | clocks

2**25 clocks = 1.016 sec for 33MHz and 0.508 sec for 66MHz PCI.

 From Chapter "4.3.2 Reset":

....
Some PCI devices must be prepared to respond as a target Trhff time 
after RST# deasserts. For example, devices in the path between the CPU 
and the boot ROM (not expansion ROM) must be prepared to respond as a 
target Trhff time after RST# deasserts.

All other devices must be prepared to respond as a target not more than 
Trhfa after the deassertion of RST#. It is recommended that the system 
wait at least Trhfa following the deassertion of RST# to a device before 
the first access to that device, unless the device is in the path 
between the CPU and the boot ROM or the system knows that the device is
ready sooner.

Software that accesses devices prior to the expiration of Trhfa must be 
prepared for the devices either not to respond at all (resulting in 
Master-Abort) or for the devices to respond with Retry until the 
expiration of Trhfa. At no time can a device return invalid data. 
Devices are exempt from the Maximum Retry Time specification and the 
target initial latency requirement until the expiration of Trhfa.
....

-- 
Regards
Andrey Volkov

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [RFC] MPC5200 Kernel/UBoot PCI problem
  2005-03-25 12:32           ` [RFC] MPC5200 Kernel/UBoot " Andrey Volkov
@ 2005-03-25 13:02             ` Dale Farnsworth
  2005-03-25 14:00             ` Sylvain Munaut
  1 sibling, 0 replies; 18+ messages in thread
From: Dale Farnsworth @ 2005-03-25 13:02 UTC (permalink / raw)
  To: Andrey Volkov, linuxppc-embedded

On Fri, Mar 25, 2005 at 12:32:34PM +0000, Andrey Volkov wrote:
> >Board started, after I add udelay(7) in read/write config. Really strange.
> 
> Sylvain, answer was in PCI2.2 specification, not in manual.
> 
> Wolfgang, as I see, you use same trick in u-boot, as Sylvain suggested 
> to me. IMHO this trick is wrong. Below I explain why.
> 
> When I insert udelay(1000) after deassertion of RST# (write 0 to PR of 
> PCIGSCR), AND remove ALL delays from read/write config, board started 
> too ;). Hence problem not in the MPC, but in slow board(s) (re)start
> (I was lucky with my board, because udelay must be 1000000).

Good catch Andrey!

-Dale

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [RFC] MPC5200 Kernel/UBoot PCI problem
  2005-03-25 12:32           ` [RFC] MPC5200 Kernel/UBoot " Andrey Volkov
  2005-03-25 13:02             ` Dale Farnsworth
@ 2005-03-25 14:00             ` Sylvain Munaut
  1 sibling, 0 replies; 18+ messages in thread
From: Sylvain Munaut @ 2005-03-25 14:00 UTC (permalink / raw)
  To: Andrey Volkov; +Cc: linuxppc-embedded

Hi Andrey,


Andrey Volkov wrote:
>>> Try adding some delays in the pci configuration zone access routines 
>>> in mpc52xx_pci.c  I remember someone needed those but still don't 
>>> know why, the manual don't say anything about that.
>>
>>
>> Board started, after I add udelay(7) in read/write config. Really 
>> strange.
> 
> 
> Sylvain, answer was in PCI2.2 specification, not in manual.
> 

Indeed good catch ! Never imagined the delay was so long.

It should be possible to use the sched_clock(void) to know if we're
booting since long enough, because just waiting 1 full second is ... long.


	Sylvain

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 4/6] ppc32: Add platform bus / ppc_sys model to Freescale MPC52xx
  2005-03-21 23:08 ` [PATCH 4/6] ppc32: Add platform bus / ppc_sys model to Freescale MPC52xx Sylvain Munaut
@ 2005-03-25 15:15   ` Kumar Gala
  0 siblings, 0 replies; 18+ messages in thread
From: Kumar Gala @ 2005-03-25 15:15 UTC (permalink / raw)
  To: Sylvain Munaut; +Cc: ML linuxppc-embedded

One question, do you really need #defines for the device offsets in=20
mpc52xx_devices.c ?  Are these used anywhere else?

- kumar

On Mar 21, 2005, at 5:08 PM, Sylvain Munaut wrote:

> ppc32: Add platform bus / ppc_sys model to Freescale MPC52xx
>
> This patch makes all platform based around the Freescale MPC52xx use
>  the platform bus and more precisly the ppc_sys model put in
>  place by Kumar Gala.
>
>
>
> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>

[ snip ]

> diff -Nru a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile
> --- a/arch/ppc/syslib/Makefile=A0 2005-03-21 20:10:34 +01:00
>  +++ b/arch/ppc/syslib/Makefile=A0 2005-03-21 20:10:34 +01:00
>  @@ -106,7 +106,8 @@
>  =A0obj-$(CONFIG_PCI)=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 +=3D =
indirect_pci.o pci_auto.o
>  =A0endif
>  =A0obj-$(CONFIG_MPC8555_CDS)=A0=A0=A0=A0=A0 +=3D todc_time.o
> -obj-$(CONFIG_PPC_MPC52xx)=A0=A0=A0=A0=A0 +=3D mpc52xx_setup.o =
mpc52xx_pic.o
> +obj-$(CONFIG_PPC_MPC52xx)=A0=A0=A0=A0=A0 +=3D mpc52xx_setup.o =
mpc52xx_pic.o \
>  +=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =
=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 mpc52xx_sys.o=20
> mpc52xx_devices.o ppc_sys.o
>  =A0ifeq ($(CONFIG_PPC_MPC52xx),y)
> =A0obj-$(CONFIG_PCI)=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 +=3D =
mpc52xx_pci.o
> =A0endif
>  diff -Nru a/arch/ppc/syslib/mpc52xx_devices.c=20
> b/arch/ppc/syslib/mpc52xx_devices.c
> --- /dev/null=A0=A0 Wed Dec 31 16:00:00 196900
>  +++ b/arch/ppc/syslib/mpc52xx_devices.c 2005-03-21 20:10:34 +01:00
>  @@ -0,0 +1,333 @@
>  +/*
>  + * arch/ppc/syslib/mpc52xx_devices.c
> + *
>  + * Freescale MPC52xx device descriptions
>  + *
>  + *
>  + * Maintainer : Sylvain Munaut <tnt@246tNt.com>
> + *
>  + * Copyright (C) 2005 Sylvain Munaut <tnt@246tNt.com>
> + *
>  + * This file is licensed under the terms of the GNU General Public=20=

> License
>  + * version 2. This program is licensed "as is" without any warranty=20=

> of any
>  + * kind, whether express or implied.
>  + */
>  +
>  +#include <linux/fsl_devices.h>
> +#include <linux/resource.h>
> +#include <asm/mpc52xx.h>
> +#include <asm/ppc_sys.h>
> +
>  +
>  +static u64 mpc52xx_dma_mask =3D 0xffffffffULL;
>  +
>  +static struct fsl_i2c_platform_data mpc52xx_fsl_i2c_pdata =3D {
>  +=A0=A0=A0=A0=A0=A0 .device_flags =3D FSL_I2C_DEV_CLOCK_5200,
> +};
>  +
>  +
>  +/* We use relative offsets for IORESOURCE_MEM to be independent from=20=

> the
>  + * MBAR location at compile time
>  + */
>  +
>  +/* TODO Add the BestComm initiator channel to the device =
definitions,
>  +=A0=A0 possibly using IORESOURCE_DMA. But that's when BestComm is =
ready=20
> ... */
>  +
>  +struct platform_device ppc_sys_platform_devices[] =3D {
>  +=A0=A0=A0=A0=A0=A0 [MPC52xx_MSCAN1] =3D {
>  +=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 .name=A0=A0 =A0=A0=A0=A0=A0=A0=
=A0 =3D "mpc52xx-mscan",
>  +=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 .id=A0=A0=A0=A0 =A0=A0=A0=A0=A0=
=A0=A0 =3D 0,
> +=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 .num_resources=A0 =3D 2,
>  +=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 .resource =3D (struct =
resource[]) {
>  +=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 {
>  +=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =
=A0=A0=A0=A0=A0=A0=A0 .start=A0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3D MPC52xx_I2C2_IRQ,
> +=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =
=A0=A0=A0=A0=A0=A0=A0 .end=A0=A0=A0 =3D MPC52xx_I2C2_IRQ,
> +=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =
=A0=A0=A0=A0=A0=A0=A0 .flags=A0 =3D IORESOURCE_IRQ,
> +=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 },
>  +=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 },
>  +=A0=A0=A0=A0=A0=A0 },
>  +};
>  +
>  +
>  +static int __init mach_mpc52xx_fixup(struct platform_device *pdev)
>  +{
>  +=A0=A0=A0=A0=A0=A0 ppc_sys_fixup_mem_resource(pdev, MPC52xx_MBAR);
> +=A0=A0=A0=A0=A0=A0 return 0;
>  +}
>  +
>  +static int __init mach_mpc52xx_init(void)
> +{
>  +=A0=A0=A0=A0=A0=A0 ppc_sys_device_fixup =3D mach_mpc52xx_fixup;
> +=A0=A0=A0=A0=A0=A0 return 0;
>  +}
>  +
>  +postcore_initcall(mach_mpc52xx_init);

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2005-03-25 15:16 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-21 23:06 [PATCH 0/6] [RFC] Change MPC52xx to platform bus / ppc_sys model Sylvain Munaut
2005-03-21 23:07 ` [PATCH 1/6] ppc32: Remove unnecessary test in MPC52xx reset code Sylvain Munaut
2005-03-21 23:07 ` [PATCH 2/6] ppc32: Remove the OCP system from the Freescale MPC52xx support Sylvain Munaut
2005-03-21 23:08 ` [PATCH 3/6] ppc32: Change constants style in Freescale MPC52xx related code Sylvain Munaut
2005-03-21 23:08 ` [PATCH 4/6] ppc32: Add platform bus / ppc_sys model to Freescale MPC52xx Sylvain Munaut
2005-03-25 15:15   ` Kumar Gala
2005-03-21 23:09 ` [PATCH 5/6] serial: Update mpc52xx_uart.c to use platform bus Sylvain Munaut
2005-03-21 23:09 ` [PATCH 6/6] ppc32: Adds necessary cpu init to use USB on LITE5200 Platform Sylvain Munaut
2005-03-22  1:11 ` [PATCH 0/6] [RFC] Change MPC52xx to platform bus / ppc_sys model Kumar Gala
2005-03-22  7:12   ` Sylvain Munaut
2005-03-24  8:37     ` [RFC] MPC5200 PCI problem Andrey Volkov
2005-03-24 14:34       ` Sylvain Munaut
2005-03-24 18:58         ` Andrey Volkov
2005-03-25 12:32           ` [RFC] MPC5200 Kernel/UBoot " Andrey Volkov
2005-03-25 13:02             ` Dale Farnsworth
2005-03-25 14:00             ` Sylvain Munaut
2005-03-22  7:04 ` Future of OCP Lawrence E. Bakst
2005-03-22  7:48   ` Eugene Surovegin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).