* [PATCH 1/3] powerpc eeh: cleanup comments
From: Linas Vepstas @ 2007-11-02 20:25 UTC (permalink / raw)
To: Paul Mackerras; +Cc: ppc-dev
In-Reply-To: <20071102201957.GU2183@austin.ibm.com>
Clean up commentary, remove dead code.
Signed-off-by Linas Vepstas <linas@austin.ibm.com>
----
arch/powerpc/platforms/pseries/eeh_driver.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
Index: linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh_driver.c
===================================================================
--- linux-2.6.23-rc8-mm1.orig/arch/powerpc/platforms/pseries/eeh_driver.c 2007-10-16 11:39:18.000000000 -0500
+++ linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh_driver.c 2007-10-16 11:46:30.000000000 -0500
@@ -113,9 +113,9 @@ static void eeh_report_error(struct pci_
/**
* eeh_report_mmio_enabled - tell drivers that MMIO has been enabled
*
- * Report an EEH error to each device driver, collect up and
- * merge the device driver responses. Cumulative response
- * passed back in "userdata".
+ * Tells each device driver that IO ports, MMIO and config space I/O
+ * are now enabled. Collects up and merges the device driver responses.
+ * Cumulative response passed back in "userdata".
*/
static void eeh_report_mmio_enabled(struct pci_dev *dev, void *userdata)
@@ -123,8 +123,6 @@ static void eeh_report_mmio_enabled(stru
enum pci_ers_result rc, *res = userdata;
struct pci_driver *driver = dev->driver;
- // dev->error_state = pci_channel_mmio_enabled;
-
if (!driver ||
!driver->err_handler ||
!driver->err_handler->mmio_enabled)
^ permalink raw reply
* [PATCH 2/3]: powerpc eeh: drivers that need reset trump others
From: Linas Vepstas @ 2007-11-02 20:27 UTC (permalink / raw)
To: Paul Mackerras; +Cc: ppc-dev
In-Reply-To: <20071102202555.GA13828@austin.ibm.com>
Bugfix: if a driver controlling one part of a multi-function
pci card has asked for a reset, honor that request above all
othres.
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
----
arch/powerpc/platforms/pseries/eeh_driver.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
Index: linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh_driver.c
===================================================================
--- linux-2.6.23-rc8-mm1.orig/arch/powerpc/platforms/pseries/eeh_driver.c 2007-10-16 11:46:30.000000000 -0500
+++ linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh_driver.c 2007-10-16 11:54:27.000000000 -0500
@@ -105,9 +105,10 @@ static void eeh_report_error(struct pci_
return;
rc = driver->err_handler->error_detected (dev, pci_channel_io_frozen);
+
+ /* A driver that needs a reset trumps all others */
+ if (rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
if (*res == PCI_ERS_RESULT_NONE) *res = rc;
- if (*res == PCI_ERS_RESULT_DISCONNECT &&
- rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
}
/**
@@ -129,9 +130,10 @@ static void eeh_report_mmio_enabled(stru
return;
rc = driver->err_handler->mmio_enabled (dev);
+
+ /* A driver that needs a reset trumps all others */
+ if (rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
if (*res == PCI_ERS_RESULT_NONE) *res = rc;
- if (*res == PCI_ERS_RESULT_DISCONNECT &&
- rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
}
/**
^ permalink raw reply
* [PATCH 3/3]: powerpc eeh: avoid crash on null device.
From: Linas Vepstas @ 2007-11-02 20:29 UTC (permalink / raw)
To: Paul Mackerras; +Cc: ppc-dev
In-Reply-To: <20071102202750.GB13828@austin.ibm.com>
Bugfix: avoid crash if there's no pci device for a given
openfirmware node.
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
----
arch/powerpc/platforms/pseries/eeh.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
Index: linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh.c
===================================================================
--- linux-2.6.23-rc8-mm1.orig/arch/powerpc/platforms/pseries/eeh.c 2007-10-16 13:55:03.000000000 -0500
+++ linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh.c 2007-10-16 14:04:39.000000000 -0500
@@ -186,6 +186,11 @@ static size_t gather_pci_data(struct pci
n += scnprintf(buf+n, len-n, "cmd/stat:%x\n", cfg);
printk(KERN_WARNING "EEH: PCI cmd/status register: %08x\n", cfg);
+ if (!dev) {
+ printk(KERN_WARNING "EEH: no PCI device for this of node\n");
+ return n;
+ }
+
/* Gather bridge-specific registers */
if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) {
rtas_read_config(pdn, PCI_SEC_STATUS, 2, &cfg);
@@ -198,7 +203,7 @@ static size_t gather_pci_data(struct pci
}
/* Dump out the PCI-X command and status regs */
- cap = pci_find_capability(pdn->pcidev, PCI_CAP_ID_PCIX);
+ cap = pci_find_capability(dev, PCI_CAP_ID_PCIX);
if (cap) {
rtas_read_config(pdn, cap, 4, &cfg);
n += scnprintf(buf+n, len-n, "pcix-cmd:%x\n", cfg);
@@ -210,7 +215,7 @@ static size_t gather_pci_data(struct pci
}
/* If PCI-E capable, dump PCI-E cap 10, and the AER */
- cap = pci_find_capability(pdn->pcidev, PCI_CAP_ID_EXP);
+ cap = pci_find_capability(dev, PCI_CAP_ID_EXP);
if (cap) {
n += scnprintf(buf+n, len-n, "pci-e cap10:\n");
printk(KERN_WARNING
@@ -222,7 +227,7 @@ static size_t gather_pci_data(struct pci
printk(KERN_WARNING "EEH: PCI-E %02x: %08x\n", i, cfg);
}
- cap = pci_find_ext_capability(pdn->pcidev, PCI_EXT_CAP_ID_ERR);
+ cap = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR);
if (cap) {
n += scnprintf(buf+n, len-n, "pci-e AER:\n");
printk(KERN_WARNING
^ permalink raw reply
* Re: [2.6 patch] the scheduled I2C RTC driver removal
From: Jean Delvare @ 2007-11-02 22:12 UTC (permalink / raw)
To: Adrian Bunk; +Cc: linuxppc-dev, linux-kernel, rtc-linux, i2c
In-Reply-To: <20071031230357.GW7227@stusta.de>
Hi Adrian,
On Thu, 1 Nov 2007 00:03:58 +0100, Adrian Bunk wrote:
> This patch contains the scheduled removal of legacy I2C RTC drivers with
> replacement drivers.
I'm adding the rtc list in Cc.
>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
>
> ---
>
> Documentation/feature-removal-schedule.txt | 7
> arch/powerpc/platforms/83xx/mpc832x_mds.c | 24 -
> arch/powerpc/platforms/83xx/mpc834x_mds.c | 24 -
> arch/powerpc/platforms/83xx/mpc836x_mds.c | 24 -
> arch/ppc/platforms/83xx/mpc834x_sys.c | 20 -
> arch/ppc/platforms/85xx/tqm85xx.c | 21 -
> arch/ppc/platforms/katana.c | 21 -
> drivers/i2c/chips/Kconfig | 38 -
> drivers/i2c/chips/Makefile | 3
> drivers/i2c/chips/ds1337.c | 410 --------------------
> drivers/i2c/chips/ds1374.c | 267 -------------
> drivers/i2c/chips/m41t00.c | 413 ---------------------
> include/linux/m41t00.h | 50 --
> 13 files changed, 1322 deletions(-)
Obviously we're not yet ready to remove the drivers, as some platforms
still use them! The remaining platforms need to be updated to use the
new RTC drivers first. The mapping is as follows:
chip | old driver | new driver |
-----------+------------+--------------+
DS1337 | ds1337 | rtc-ds1307 |
DS1339 | ds1337 | rtc-ds1307 |
DS1374 | ds1374 | rtc-ds1374 |
M41T00 | m41t00 | rtc-ds1307 |
M41T81 | m41t00 | rtc-m41t80 |
M41ST85 | m41t00 | rtc-m41t80 |
So, PPC people, please update your platform code to make use of the new
drivers now, and let me know when you're done. As soon as all platforms
are converted, I'll apply Adrian's patch.
Thanks.
>
> bf858b44b3071082be3aaf71e2d46ddb26415247
> diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
> index 6bb9be5..391f2d1 100644
> --- a/Documentation/feature-removal-schedule.txt
> +++ b/Documentation/feature-removal-schedule.txt
> @@ -275,13 +275,6 @@ Who: Tejun Heo <htejun@gmail.com>
>
> ---------------------------
>
> -What: Legacy RTC drivers (under drivers/i2c/chips)
> -When: November 2007
> -Why: Obsolete. We have a RTC subsystem with better drivers.
> -Who: Jean Delvare <khali@linux-fr.org>
> -
> ----------------------------
> -
> What: iptables SAME target
> When: 1.1. 2008
> Files: net/ipv4/netfilter/ipt_SAME.c, include/linux/netfilter_ipv4/ipt_SAME.h
> diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c
> index 972fa85..66382df 100644
> --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
> +++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
> @@ -145,30 +145,6 @@ static void __init mpc832x_sys_init_IRQ(void)
> #endif /* CONFIG_QUICC_ENGINE */
> }
>
> -#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
> -extern ulong ds1374_get_rtc_time(void);
> -extern int ds1374_set_rtc_time(ulong);
> -
> -static int __init mpc832x_rtc_hookup(void)
> -{
> - struct timespec tv;
> -
> - if (!machine_is(mpc832x_mds))
> - return 0;
> -
> - ppc_md.get_rtc_time = ds1374_get_rtc_time;
> - ppc_md.set_rtc_time = ds1374_set_rtc_time;
> -
> - tv.tv_nsec = 0;
> - tv.tv_sec = (ppc_md.get_rtc_time) ();
> - do_settimeofday(&tv);
> -
> - return 0;
> -}
> -
> -late_initcall(mpc832x_rtc_hookup);
> -#endif
> -
> /*
> * Called very early, MMU is off, device-tree isn't unflattened
> */
> diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c
> index 00aed7c..a81bb3c 100644
> --- a/arch/powerpc/platforms/83xx/mpc834x_mds.c
> +++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c
> @@ -106,30 +106,6 @@ static void __init mpc834x_mds_init_IRQ(void)
> ipic_set_default_priority();
> }
>
> -#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
> -extern ulong ds1374_get_rtc_time(void);
> -extern int ds1374_set_rtc_time(ulong);
> -
> -static int __init mpc834x_rtc_hookup(void)
> -{
> - struct timespec tv;
> -
> - if (!machine_is(mpc834x_mds))
> - return 0;
> -
> - ppc_md.get_rtc_time = ds1374_get_rtc_time;
> - ppc_md.set_rtc_time = ds1374_set_rtc_time;
> -
> - tv.tv_nsec = 0;
> - tv.tv_sec = (ppc_md.get_rtc_time) ();
> - do_settimeofday(&tv);
> -
> - return 0;
> -}
> -
> -late_initcall(mpc834x_rtc_hookup);
> -#endif
> -
> /*
> * Called very early, MMU is off, device-tree isn't unflattened
> */
> diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c
> index 0f3855c..8d87b9c 100644
> --- a/arch/powerpc/platforms/83xx/mpc836x_mds.c
> +++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c
> @@ -152,30 +152,6 @@ static void __init mpc836x_mds_init_IRQ(void)
> #endif /* CONFIG_QUICC_ENGINE */
> }
>
> -#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
> -extern ulong ds1374_get_rtc_time(void);
> -extern int ds1374_set_rtc_time(ulong);
> -
> -static int __init mpc8360_rtc_hookup(void)
> -{
> - struct timespec tv;
> -
> - if (!machine_is(mpc836x_mds))
> - return 0;
> -
> - ppc_md.get_rtc_time = ds1374_get_rtc_time;
> - ppc_md.set_rtc_time = ds1374_set_rtc_time;
> -
> - tv.tv_nsec = 0;
> - tv.tv_sec = (ppc_md.get_rtc_time) ();
> - do_settimeofday(&tv);
> -
> - return 0;
> -}
> -
> -late_initcall(mpc8360_rtc_hookup);
> -#endif
> -
> /*
> * Called very early, MMU is off, device-tree isn't unflattened
> */
> diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c
> index b84f8df..cb0a749 100644
> --- a/arch/ppc/platforms/83xx/mpc834x_sys.c
> +++ b/arch/ppc/platforms/83xx/mpc834x_sys.c
> @@ -224,26 +224,6 @@ mpc834x_sys_init_IRQ(void)
> ipic_set_default_priority();
> }
>
> -#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
> -extern ulong ds1374_get_rtc_time(void);
> -extern int ds1374_set_rtc_time(ulong);
> -
> -static int __init
> -mpc834x_rtc_hookup(void)
> -{
> - struct timespec tv;
> -
> - ppc_md.get_rtc_time = ds1374_get_rtc_time;
> - ppc_md.set_rtc_time = ds1374_set_rtc_time;
> -
> - tv.tv_nsec = 0;
> - tv.tv_sec = (ppc_md.get_rtc_time)();
> - do_settimeofday(&tv);
> -
> - return 0;
> -}
> -late_initcall(mpc834x_rtc_hookup);
> -#endif
> static __inline__ void
> mpc834x_sys_set_bat(void)
> {
> diff --git a/arch/ppc/platforms/85xx/tqm85xx.c b/arch/ppc/platforms/85xx/tqm85xx.c
> index 4ee2bd1..27ce389 100644
> --- a/arch/ppc/platforms/85xx/tqm85xx.c
> +++ b/arch/ppc/platforms/85xx/tqm85xx.c
> @@ -258,27 +258,6 @@ int tqm85xx_show_cpuinfo(struct seq_file *m)
> return 0;
> }
>
> -#if defined(CONFIG_I2C) && defined(CONFIG_SENSORS_DS1337)
> -extern ulong ds1337_get_rtc_time(void);
> -extern int ds1337_set_rtc_time(unsigned long nowtime);
> -
> -static int __init
> -tqm85xx_rtc_hookup(void)
> -{
> - struct timespec tv;
> -
> - ppc_md.set_rtc_time = ds1337_set_rtc_time;
> - ppc_md.get_rtc_time = ds1337_get_rtc_time;
> -
> - tv.tv_nsec = 0;
> - tv.tv_sec = (ppc_md.get_rtc_time)();
> - do_settimeofday(&tv);
> -
> - return 0;
> -}
> -late_initcall(tqm85xx_rtc_hookup);
> -#endif
> -
> #ifdef CONFIG_PCI
> /*
> * interrupt routing
> diff --git a/arch/ppc/platforms/katana.c b/arch/ppc/platforms/katana.c
> index 52f63e6..fe6e88c 100644
> --- a/arch/ppc/platforms/katana.c
> +++ b/arch/ppc/platforms/katana.c
> @@ -838,27 +838,6 @@ katana_find_end_of_memory(void)
> return bdp->bi_memsize;
> }
>
> -#if defined(CONFIG_I2C_MV64XXX) && defined(CONFIG_SENSORS_M41T00)
> -extern ulong m41t00_get_rtc_time(void);
> -extern int m41t00_set_rtc_time(ulong);
> -
> -static int __init
> -katana_rtc_hookup(void)
> -{
> - struct timespec tv;
> -
> - ppc_md.get_rtc_time = m41t00_get_rtc_time;
> - ppc_md.set_rtc_time = m41t00_set_rtc_time;
> -
> - tv.tv_nsec = 0;
> - tv.tv_sec = (ppc_md.get_rtc_time)();
> - do_settimeofday(&tv);
> -
> - return 0;
> -}
> -late_initcall(katana_rtc_hookup);
> -#endif
> -
> #if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(CONFIG_SERIAL_MPSC_CONSOLE)
> static void __init
> katana_map_io(void)
> diff --git a/drivers/i2c/chips/Kconfig b/drivers/i2c/chips/Kconfig
> index 2e1c24f..5b8eb02 100644
> --- a/drivers/i2c/chips/Kconfig
> +++ b/drivers/i2c/chips/Kconfig
> @@ -4,32 +4,6 @@
>
> menu "Miscellaneous I2C Chip support"
>
> -config SENSORS_DS1337
> - tristate "Dallas DS1337 and DS1339 Real Time Clock (DEPRECATED)"
> - depends on EXPERIMENTAL
> - help
> - If you say yes here you get support for Dallas Semiconductor
> - DS1337 and DS1339 real-time clock chips.
> -
> - This driver can also be built as a module. If so, the module
> - will be called ds1337.
> -
> - This driver is deprecated and will be dropped soon. Use
> - rtc-ds1307 instead.
> -
> -config SENSORS_DS1374
> - tristate "Dallas DS1374 Real Time Clock (DEPRECATED)"
> - depends on EXPERIMENTAL
> - help
> - If you say yes here you get support for Dallas Semiconductor
> - DS1374 real-time clock chips.
> -
> - This driver can also be built as a module. If so, the module
> - will be called ds1374.
> -
> - This driver is deprecated and will be dropped soon. Use
> - rtc-ds1374 instead.
> -
> config DS1682
> tristate "Dallas DS1682 Total Elapsed Time Recorder with Alarm"
> depends on EXPERIMENTAL
> @@ -116,18 +90,6 @@ config TPS65010
> This driver can also be built as a module. If so, the module
> will be called tps65010.
>
> -config SENSORS_M41T00
> - tristate "ST M41T00 RTC chip (DEPRECATED)"
> - depends on PPC32
> - help
> - If you say yes here you get support for the ST M41T00 RTC chip.
> -
> - This driver can also be built as a module. If so, the module
> - will be called m41t00.
> -
> - This driver is deprecated and will be dropped soon. Use
> - rtc-ds1307 or rtc-m41t80 instead.
> -
> config SENSORS_MAX6875
> tristate "Maxim MAX6875 Power supply supervisor"
> depends on EXPERIMENTAL
> diff --git a/drivers/i2c/chips/Makefile b/drivers/i2c/chips/Makefile
> index ca924e1..1d5d1a5 100644
> --- a/drivers/i2c/chips/Makefile
> +++ b/drivers/i2c/chips/Makefile
> @@ -2,12 +2,9 @@
> # Makefile for miscellaneous I2C chip drivers.
> #
>
> -obj-$(CONFIG_SENSORS_DS1337) += ds1337.o
> -obj-$(CONFIG_SENSORS_DS1374) += ds1374.o
> obj-$(CONFIG_DS1682) += ds1682.o
> obj-$(CONFIG_SENSORS_EEPROM) += eeprom.o
> obj-$(CONFIG_SENSORS_MAX6875) += max6875.o
> -obj-$(CONFIG_SENSORS_M41T00) += m41t00.o
> obj-$(CONFIG_SENSORS_PCA9539) += pca9539.o
> obj-$(CONFIG_SENSORS_PCF8574) += pcf8574.o
> obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o
> (...)
--
Jean Delvare
^ permalink raw reply
* Re: [PATCH] dtc: Fix the install target
From: David Gibson @ 2007-11-03 0:37 UTC (permalink / raw)
To: Emil Medve; +Cc: linuxppc-dev, jdl
In-Reply-To: <1194017175-25610-1-git-send-email-Emilian.Medve@Freescale.com>
On Fri, Nov 02, 2007 at 10:26:15AM -0500, Emil Medve wrote:
> /usr/bin/install: cannot stat `fdt.h': No such file or directory
> /usr/bin/install: cannot stat `libfdt.h': No such file or directory
>
> Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: GDB bdi2000 and mpc85xx
From: Wang, Baojun @ 2007-11-03 3:40 UTC (permalink / raw)
To: Stuart Hodgson; +Cc: linuxppc-embedded
In-Reply-To: <394028554.26200@lzu.edu.cn>
[-- Attachment #1: Type: text/plain, Size: 3363 bytes --]
On Saturday 03 November 2007 01:17:48, Stuart Hodgson wrote:
> Hi,
>
> I am attempting to get Kernel debugging working on our mpc8541 based
> board via a BDI2000. The various components in use are
>
> kernel - 2.6.19.2
> BDI firmware - 1.08
> U-Boot - 1.2.0
> ppc_85xx-gdb - from eldk4.1 (6.3.0.0-1.21_3rh)
>
>
> Kernel is configured with `-g` in CFLAGS and not with CONFIG_BDI_SWITCH,
> from the information I have read around the subject this seem to be
> correct. I also have `MMU XLAT`, and `PTBASE 0xF0` set in by BDI
> configuration file. The default value for XLAT of `0xc0000000` matches
> the kernel our kernel config.
>
> Steps that I done so far
>
> 1. Power on BDI
> 2. Power on the board
> 3. BDI> reset run
> 4. Enter u-boot environment to stop linux booting immediately.
> 5. BDI> HALT
> 6. BDI> BREAK HARD
> 7. BDI> BI 0xc025a51c (this is the address of start_kernel for my build)
> 8. BDI> GO
> 9. From U-boot prompt `bootm`, kernel is copied from flash and loading
> begins
> 10. Kernel does not halt at start_kernel and continues to the login
>
> If I attempt to break at an address later in the boot sequence, such as
> qmx19_ata_input_data (this is the area that I am trying to investigate)
> I get
>
> - TARGET: core #0 has entered debug mode
>
> So from here I attempt to connect to the BDI from gdb
>
> linux> cd ~/linux-2.6.19.2
> linux> ppc_85xx-gdb vmlimux
Most of the operation could be done within gdb
BDI> reset
powerpc-unknown-linux-gnu-gdb vmlinux
(gdb) target remote bdi:2001
(gdb) ^C
(gdb) b *0x12345678
(gdb) c
...
> "
> GNU gdb Red Hat Linux (6.3.0.0-1.21_3rh)
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
> are welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "--host=i386-redhat-linux --target=ppc-linux".
> The target architecture is set automatically (currently powerpc:603)
> "
>
> I noticed here that the last line does not match the e500 core I am
> using, but there does not seem to a change if I change this using `set
> architecture powerpc:e500`
>
>
> (gdb) tar rem <bdi_ip>:2001
> Remote debugging using <bdi_ip>:2001
> 0x00000000 in ?? ()
Which configuration file do you use for mpc85xx? probably is the config file
problem?
> What I don't understand here is why 0x00000000 is shown as the address,
> further on the BDI the following error is shown then the connection is made
>
> "
> *** MMU: address translation for 0x00000000 failed
> Stuart Hodgson
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Wang
--
Wang, Baojun Lanzhou University
Distributed & Embedded System Lab http://dslab.lzu.edu.cn
School of Information Science and Engeneering wangbj@lzu.edu.cn
Tianshui South Road 222. Lanzhou 730000 .P.R.China
Tel:+86-931-8912025 Fax:+86-931-8912022
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH] ehea: add kexec support
From: Michael Neuling @ 2007-11-03 6:06 UTC (permalink / raw)
To: Christoph Raisch
Cc: Thomas Q Klein, ossthema, Jeff Garzik, Jan-Bernd Themann, netdev,
linux-kernel, linux-ppc, Marcus Eder, Stefan Roscher
In-Reply-To: <OF3FAFDB41.AF236738-ONC1257387.00376233-C1257387.00389861@de.ibm.com>
> Michael Ellerman <michael@ellerman.id.au> wrote on 02.11.2007 07:30:08:
>
> > On Wed, 2007-10-31 at 20:48 +0100, Christoph Raisch wrote:
> > > Michael Ellerman <michael@ellerman.id.au> wrote on 30.10.2007 23:50:36:
> > If that's really the way it works then eHEA is more or less broken for
> > kdump I'm afraid.
>
> We think we have a way to workaround this, but let me first try to
> explain the base problem.
>
> DD allocates HEA resources and gets firmware_handles for these resources.
> To free the resources DD needs to use exactly these handles.
> There's no generic firmware call "clean out all resources".
> Allocating the same resources twice does not work.
Can we get a new firmware call to do this?
> So a new kernel can't free the resources allocated by an old kernel,
> because the numeric values of the handles aren't known anymore.
How many possible handles are there?
If the handles are lost, is the only way to clear out the HEA resources
is to reset the partition?
> Potential Solution:
> Hea driver cleanup function hooks into ppc_md.machine_crash_shutdown
> and frees all firmware resources at shutdown time of the crashed kernel.
This means the crashed kernel now has to be trusted to shut down and
free up the resources. Isn't trusting the crashing kernel in this way
against the whole kdump idea?
> crash_kexec continues and loads new kernel.
> The new kernel restarts the HEA driver within kdump kernel, which will work
> because resources have been freed before.
>
> Michael, would this work?
>
> Gruss / Regards
> Christoph R.
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
^ permalink raw reply
* Re: [PATCH] Restore deterministic CPU accounting on powerpc
From: Balbir Singh @ 2007-11-03 9:02 UTC (permalink / raw)
To: Paul Mackerras
Cc: Peter Zijlstra, linuxppc-dev, linux-kernel, Christian Borntraeger,
Martin Schwidefsky, Ingo Molnar, Thomas Gleixner
In-Reply-To: <18218.44089.274628.680088@cargo.ozlabs.ibm.com>
> +#ifndef CONFIG_VIRT_CPU_ACCOUNTING
> +void account_process_tick(int user_tick)
> +{
> + if (user_tick) {
> + account_user_time(p, jiffies_to_cputime(1));
> + account_user_time_scaled(p, jiffies_to_cputime(1));
> + } else {
> + account_system_time(p, HARDIRQ_OFFSET, jiffies_to_cputime(1));
> + account_system_time_scaled(p, jiffies_to_cputime(1));
> + }
> +}
> +#endif
> +
Hi, Paul,
So, scaled accounting will not be available if
CONFIG_VIRT_CPU_ACCOUNTING is defined? Am I reading this correctly
Balbir Singh
^ permalink raw reply
* Re: [PATCH] Restore deterministic CPU accounting on powerpc
From: Ingo Molnar @ 2007-11-03 9:32 UTC (permalink / raw)
To: Paul Mackerras
Cc: Peter Zijlstra, linuxppc-dev, linux-kernel, Christian Borntraeger,
Martin Schwidefsky, Thomas Gleixner
In-Reply-To: <20071103085420.GA14551@elte.hu>
* Ingo Molnar <mingo@elte.hu> wrote:
> * Paul Mackerras <paulus@samba.org> wrote:
>
> > Since powerpc started using CONFIG_GENERIC_CLOCKEVENTS, the
> > deterministic CPU accounting (CONFIG_VIRT_CPU_ACCOUNTING) has been
> > broken on powerpc, because we end up counting user time twice: once in
> > timer_interrupt() and once in update_process_times().
> >
> > This fixes the problem by pulling the code in update_process_times
> > that updates utime and stime into a separate function called
> > account_process_tick. If CONFIG_VIRT_CPU_ACCOUNTING is not defined,
> > there is a version of account_process_tick in kernel/timer.c that
> > simply accounts a whole tick to either utime or stime as before. If
> > CONFIG_VIRT_CPU_ACCOUNTING is defined, then arch code gets to
> > implement account_process_tick.
> >
> > This also lets us simplify the s390 code a bit; it means that the s390
> > timer interrupt can now call update_process_times even when
> > CONFIG_VIRT_CPU_ACCOUNTING is turned on, and can just implement a
> > suitable account_process_tick().
> >
> > Signed-off-by: Paul Mackerras <paulus@samba.org>
>
> lets push this towards Linus via the scheduler tree, ok?
hm, i've removed it for now because it doesnt even build due toj:
+#ifndef CONFIG_VIRT_CPU_ACCOUNTING
+void account_process_tick(int user_tick)
+{
+ if (user_tick) {
+ account_user_time(p, jiffies_to_cputime(1));
+ account_user_time_scaled(p, jiffies_to_cputime(1));
Ingo
^ permalink raw reply
* Re: [PATCH] Restore deterministic CPU accounting on powerpc
From: Ingo Molnar @ 2007-11-03 8:54 UTC (permalink / raw)
To: Paul Mackerras
Cc: Peter Zijlstra, linuxppc-dev, linux-kernel, Christian Borntraeger,
Martin Schwidefsky, Thomas Gleixner
In-Reply-To: <18218.44089.274628.680088@cargo.ozlabs.ibm.com>
* Paul Mackerras <paulus@samba.org> wrote:
> Since powerpc started using CONFIG_GENERIC_CLOCKEVENTS, the
> deterministic CPU accounting (CONFIG_VIRT_CPU_ACCOUNTING) has been
> broken on powerpc, because we end up counting user time twice: once in
> timer_interrupt() and once in update_process_times().
>
> This fixes the problem by pulling the code in update_process_times
> that updates utime and stime into a separate function called
> account_process_tick. If CONFIG_VIRT_CPU_ACCOUNTING is not defined,
> there is a version of account_process_tick in kernel/timer.c that
> simply accounts a whole tick to either utime or stime as before. If
> CONFIG_VIRT_CPU_ACCOUNTING is defined, then arch code gets to
> implement account_process_tick.
>
> This also lets us simplify the s390 code a bit; it means that the s390
> timer interrupt can now call update_process_times even when
> CONFIG_VIRT_CPU_ACCOUNTING is turned on, and can just implement a
> suitable account_process_tick().
>
> Signed-off-by: Paul Mackerras <paulus@samba.org>
lets push this towards Linus via the scheduler tree, ok?
Ingo
^ permalink raw reply
* Re: [PATCH] Restore deterministic CPU accounting on powerpc
From: Paul Mackerras @ 2007-11-03 11:44 UTC (permalink / raw)
To: Balbir Singh
Cc: Peter Zijlstra, linuxppc-dev, linux-kernel, Christian Borntraeger,
Martin Schwidefsky, Ingo Molnar, Thomas Gleixner
In-Reply-To: <661de9470711030202x24d0186cuc96a70156ecfa23f@mail.gmail.com>
Balbir Singh writes:
> So, scaled accounting will not be available if
> CONFIG_VIRT_CPU_ACCOUNTING is defined? Am I reading this correctly
No, what makes you think that? If VIRT_CPU_ACCOUNTING=y it is the
responsibility of the arch's account_process_tick to update the scaled
stats. And the powerpc version does that by calling
account_user_time_scaled().
Paul.
^ permalink raw reply
* Re: [PATCH] Restore deterministic CPU accounting on powerpc
From: Paul Mackerras @ 2007-11-03 12:06 UTC (permalink / raw)
To: Ingo Molnar
Cc: Peter Zijlstra, linuxppc-dev, linux-kernel, Christian Borntraeger,
Martin Schwidefsky, Thomas Gleixner
In-Reply-To: <20071103093240.GA22932@elte.hu>
Ingo Molnar writes:
> hm, i've removed it for now because it doesnt even build due toj:
*blush*
New patch coming. Sending it to Linus via the scheduler tree sounds
fine to me.
Paul.
^ permalink raw reply
* [PATCH v2] Restore deterministic CPU accounting on powerpc
From: Paul Mackerras @ 2007-11-03 12:12 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra, Thomas Gleixner
Cc: Martin Schwidefsky, Christian Borntraeger, linux-kernel,
linuxppc-dev
Since powerpc started using CONFIG_GENERIC_CLOCKEVENTS, the
deterministic CPU accounting (CONFIG_VIRT_CPU_ACCOUNTING) has been
broken on powerpc, because we end up counting user time twice: once in
timer_interrupt() and once in update_process_times().
This fixes the problem by pulling the code in update_process_times
that updates utime and stime into a separate function called
account_process_tick. If CONFIG_VIRT_CPU_ACCOUNTING is not defined,
there is a version of account_process_tick in kernel/timer.c that
simply accounts a whole tick to either utime or stime as before. If
CONFIG_VIRT_CPU_ACCOUNTING is defined, then arch code gets to
implement account_process_tick.
This also lets us simplify the s390 code a bit; it means that the s390
timer interrupt can now call update_process_times even when
CONFIG_VIRT_CPU_ACCOUNTING is turned on, and can just implement a
suitable account_process_tick().
Signed-off-by: Paul Mackerras <paulus@samba.org>
---
account_process_tick now takes the task_struct * as an argument.
Tested both with and without CONFIG_VIRT_CPU_ACCOUNTING.
arch/powerpc/kernel/process.c | 2 +-
arch/powerpc/kernel/time.c | 25 +------------------------
arch/s390/kernel/time.c | 4 ----
arch/s390/kernel/vtime.c | 8 +-------
include/linux/sched.h | 1 +
kernel/timer.c | 21 ++++++++++++++-------
6 files changed, 18 insertions(+), 43 deletions(-)
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index b9d8837..41e13f4 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -350,7 +350,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
local_irq_save(flags);
account_system_vtime(current);
- account_process_vtime(current);
+ account_process_tick(current, 0);
calculate_steal_time();
last = _switch(old_thread, new_thread);
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 9eb3284..a70dfb7 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -259,7 +259,7 @@ void account_system_vtime(struct task_struct *tsk)
* user and system time records.
* Must be called with interrupts disabled.
*/
-void account_process_vtime(struct task_struct *tsk)
+void account_process_tick(struct task_struct *tsk, int user_tick)
{
cputime_t utime, utimescaled;
@@ -274,18 +274,6 @@ void account_process_vtime(struct task_struct *tsk)
account_user_time_scaled(tsk, utimescaled);
}
-static void account_process_time(struct pt_regs *regs)
-{
- int cpu = smp_processor_id();
-
- account_process_vtime(current);
- run_local_timers();
- if (rcu_pending(cpu))
- rcu_check_callbacks(cpu, user_mode(regs));
- scheduler_tick();
- run_posix_cpu_timers(current);
-}
-
/*
* Stuff for accounting stolen time.
*/
@@ -375,7 +363,6 @@ static void snapshot_purr(void)
#else /* ! CONFIG_VIRT_CPU_ACCOUNTING */
#define calc_cputime_factors()
-#define account_process_time(regs) update_process_times(user_mode(regs))
#define calculate_steal_time() do { } while (0)
#endif
@@ -599,16 +586,6 @@ void timer_interrupt(struct pt_regs * regs)
get_lppaca()->int_dword.fields.decr_int = 0;
#endif
- /*
- * We cannot disable the decrementer, so in the period
- * between this cpu's being marked offline in cpu_online_map
- * and calling stop-self, it is taking timer interrupts.
- * Avoid calling into the scheduler rebalancing code if this
- * is the case.
- */
- if (!cpu_is_offline(cpu))
- account_process_time(regs);
-
if (evt->event_handler)
evt->event_handler(evt);
else
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index 48dae49..6c6be1f 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -145,12 +145,8 @@ void account_ticks(u64 time)
do_timer(ticks);
#endif
-#ifdef CONFIG_VIRT_CPU_ACCOUNTING
- account_tick_vtime(current);
-#else
while (ticks--)
update_process_times(user_mode(get_irq_regs()));
-#endif
s390_do_profile();
}
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index 84ff78d..c5f05b3 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -32,7 +32,7 @@ static DEFINE_PER_CPU(struct vtimer_queue, virt_cpu_timer);
* Update process times based on virtual cpu times stored by entry.S
* to the lowcore fields user_timer, system_timer & steal_clock.
*/
-void account_tick_vtime(struct task_struct *tsk)
+void account_process_tick(struct task_struct *tsk, int user_tick)
{
cputime_t cputime;
__u64 timer, clock;
@@ -64,12 +64,6 @@ void account_tick_vtime(struct task_struct *tsk)
S390_lowcore.steal_clock -= cputime << 12;
account_steal_time(tsk, cputime);
}
-
- run_local_timers();
- if (rcu_pending(smp_processor_id()))
- rcu_check_callbacks(smp_processor_id(), rcu_user_flag);
- scheduler_tick();
- run_posix_cpu_timers(tsk);
}
/*
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 155d743..8001528 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -254,6 +254,7 @@ long io_schedule_timeout(long timeout);
extern void cpu_init (void);
extern void trap_init(void);
+extern void account_process_tick(struct task_struct *task, int user);
extern void update_process_times(int user);
extern void scheduler_tick(void);
diff --git a/kernel/timer.c b/kernel/timer.c
index fb4e67d..ada3183 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -817,6 +817,19 @@ unsigned long next_timer_interrupt(void)
#endif
+#ifndef CONFIG_VIRT_CPU_ACCOUNTING
+void account_process_tick(struct task_struct *p, int user_tick)
+{
+ if (user_tick) {
+ account_user_time(p, jiffies_to_cputime(1));
+ account_user_time_scaled(p, jiffies_to_cputime(1));
+ } else {
+ account_system_time(p, HARDIRQ_OFFSET, jiffies_to_cputime(1));
+ account_system_time_scaled(p, jiffies_to_cputime(1));
+ }
+}
+#endif
+
/*
* Called from the timer interrupt handler to charge one tick to the current
* process. user_tick is 1 if the tick is user time, 0 for system.
@@ -827,13 +840,7 @@ void update_process_times(int user_tick)
int cpu = smp_processor_id();
/* Note: this timer irq context must be accounted for as well. */
- if (user_tick) {
- account_user_time(p, jiffies_to_cputime(1));
- account_user_time_scaled(p, jiffies_to_cputime(1));
- } else {
- account_system_time(p, HARDIRQ_OFFSET, jiffies_to_cputime(1));
- account_system_time_scaled(p, jiffies_to_cputime(1));
- }
+ account_process_tick(p, user_tick);
run_local_timers();
if (rcu_pending(cpu))
rcu_check_callbacks(cpu, user_tick);
^ permalink raw reply related
* Re: [PATCH] Restore deterministic CPU accounting on powerpc
From: Balbir Singh @ 2007-11-03 16:47 UTC (permalink / raw)
To: Paul Mackerras
Cc: Peter Zijlstra, linuxppc-dev, linux-kernel, Christian Borntraeger,
Martin Schwidefsky, Ingo Molnar, Thomas Gleixner
In-Reply-To: <18220.24362.604297.53633@cargo.ozlabs.ibm.com>
Paul Mackerras wrote:
> Balbir Singh writes:
>
>> So, scaled accounting will not be available if
>> CONFIG_VIRT_CPU_ACCOUNTING is defined? Am I reading this correctly
>
> No, what makes you think that? If VIRT_CPU_ACCOUNTING=y it is the
> responsibility of the arch's account_process_tick to update the scaled
> stats. And the powerpc version does that by calling
> account_user_time_scaled().
>
> Paul.
I looked at the diff's and could just see the reversal of scaled
accounting. I looked at account_process_vtime(), now
account_process_tick() and things seem fine. I was mislead by the
diff.
--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
^ permalink raw reply
* [PATCH] change fallocate to match unistd.h on powerpc
From: Patrick Mansfield @ 2007-11-03 17:42 UTC (permalink / raw)
To: linuxppc-dev, Paul Mackerras, anton
Fix the fallocate system call on powerpc to match its unistd.h.
This implies none of these system calls are currently working with the
unistd.h sys call values:
fallocate
signalfd
timerfd
eventfd
sync_file_range2
Signed-off-by: Patrick Mansfield <patmans@us.ibm.com>
Acked-by: Anton Blanchard <anton@samba.org>
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h
index cc6d872..11d5383 100644
--- a/include/asm-powerpc/systbl.h
+++ b/include/asm-powerpc/systbl.h
@@ -308,8 +308,8 @@ COMPAT_SYS_SPU(move_pages)
SYSCALL_SPU(getcpu)
COMPAT_SYS(epoll_pwait)
COMPAT_SYS_SPU(utimensat)
-COMPAT_SYS(fallocate)
COMPAT_SYS_SPU(signalfd)
COMPAT_SYS_SPU(timerfd)
SYSCALL_SPU(eventfd)
COMPAT_SYS_SPU(sync_file_range2)
+COMPAT_SYS(fallocate)
-- Patrick Mansfield
^ permalink raw reply related
* [PATCH1/2] [POWERPC] Kill non-existant symbols from ksyms and commproc.h
From: Jochen Friedrich @ 2007-11-03 19:01 UTC (permalink / raw)
To: linuxppc-embedded@ozlabs.org; +Cc: linux-kernel
Remove exports of __res and cpm_install_handler/cpm_free_handler.
Remove cpm_install_handler/cpm_free_handler from the commproc.h as well.
Both were used for ARCH=ppc and aren't defined for ARCH=powerpc.
CC arch/powerpc/kernel/ppc_ksyms.o
arch/powerpc/kernel/ppc_ksyms.c:180: error: '__res' undeclared here (not in a function)
arch/powerpc/kernel/ppc_ksyms.c:180: warning: type defaults to 'int' in declaration of '__res'
make[1]: *** [arch/powerpc/kernel/ppc_ksyms.o] Error 1
make: *** [arch/powerpc/kernel] Error 2
LD .tmp_vmlinux1
arch/powerpc/kernel/built-in.o:(__ksymtab+0x198): undefined reference to `cpm_free_handler'
arch/powerpc/kernel/built-in.o:(__ksymtab+0x1a0): undefined reference to `cpm_install_handler'
make: *** [.tmp_vmlinux1] Error 1
Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
arch/powerpc/kernel/ppc_ksyms.c | 12 ------------
include/asm-powerpc/commproc.h | 3 ---
2 files changed, 0 insertions(+), 15 deletions(-)
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index c6b1aa3..13ebeb2 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -45,10 +45,6 @@
#include <asm/signal.h>
#include <asm/dcr.h>
-#ifdef CONFIG_8xx
-#include <asm/commproc.h>
-#endif
-
#ifdef CONFIG_PPC64
EXPORT_SYMBOL(local_irq_restore);
#endif
@@ -172,14 +168,6 @@ EXPORT_SYMBOL(console_drivers);
EXPORT_SYMBOL(cacheable_memcpy);
#endif
-#ifdef CONFIG_8xx
-EXPORT_SYMBOL(cpm_install_handler);
-EXPORT_SYMBOL(cpm_free_handler);
-#endif /* CONFIG_8xx */
-#if defined(CONFIG_8xx)
-EXPORT_SYMBOL(__res);
-#endif
-
#ifdef CONFIG_PPC32
EXPORT_SYMBOL(next_mmu_context);
EXPORT_SYMBOL(set_context);
diff --git a/include/asm-powerpc/commproc.h b/include/asm-powerpc/commproc.h
index 0307c84..5dff922 100644
--- a/include/asm-powerpc/commproc.h
+++ b/include/asm-powerpc/commproc.h
@@ -698,9 +698,6 @@ typedef struct risc_timer_pram {
#define CICR_IEN ((uint)0x00000080) /* Int. enable */
#define CICR_SPS ((uint)0x00000001) /* SCC Spread */
-extern void cpm_install_handler(int vec, void (*handler)(void *), void *dev_id);
-extern void cpm_free_handler(int vec);
-
#define IMAP_ADDR (get_immrbase())
#define CPM_PIN_INPUT 0
--
1.5.3.4
^ permalink raw reply related
* [PATCH0/2] [POWERPC] Two bug fixes for 2.6.24
From: Jochen Friedrich @ 2007-11-03 19:00 UTC (permalink / raw)
To: linuxppc-embedded@ozlabs.org; +Cc: linux-kernel, Jeff Garzik, netdev
Here is a series fixing some bugs for 8xx powerpc CPUs.
1. [POWERPC] Kill non-existant symbols from ksyms and commproc.h
2. [POWERPC] fs_enet: select PHYLIB as the driver needs it
This series can be pulled from git://git.bocc.de/dbox2.git for-2.6.24
Thanks,
Jochen
^ permalink raw reply
* [PATCH2/2] [POWERPC] fs_enet: select PHYLIB as the driver needs it.
From: Jochen Friedrich @ 2007-11-03 19:01 UTC (permalink / raw)
To: linuxppc-embedded@ozlabs.org; +Cc: linux-kernel, Jeff Garzik, netdev
Add a select PHYLIB to config FS_ENET as the driver uses functions of
libphy.
LD .tmp_vmlinux1
drivers/built-in.o: In function `fs_ioctl':
drivers/net/fs_enet/fs_enet-main.c:952: undefined reference to `phy_mii_ioctl'
[...]
make: *** [.tmp_vmlinux1] Error 1
Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
drivers/net/fs_enet/Kconfig | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/fs_enet/Kconfig b/drivers/net/fs_enet/Kconfig
index 2765e49..24502d2 100644
--- a/drivers/net/fs_enet/Kconfig
+++ b/drivers/net/fs_enet/Kconfig
@@ -2,6 +2,7 @@ config FS_ENET
tristate "Freescale Ethernet Driver"
depends on CPM1 || CPM2
select MII
+ select PHYLIB
config FS_ENET_HAS_SCC
bool "Chip has an SCC usable for ethernet"
--
1.5.3.4
^ permalink raw reply related
* [PATCH] [POWERPC] Fix typo #ifdef -> #ifndef
From: Jochen Friedrich @ 2007-11-03 19:16 UTC (permalink / raw)
To: linuxppc-embedded@ozlabs.org; +Cc: linux-kernel, Jeff Garzik, netdev
fpi->cp_command should be overwritten only if CONFIG_PPC_CPM_NEW_BINDING
is NOT set. Otherwise it is already set from the device tree.
Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
This can be pulled from git://git.bocc.de/dbox2.git for-2.6.24
drivers/net/fs_enet/mac-scc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c
index 03134f4..48f2f30 100644
--- a/drivers/net/fs_enet/mac-scc.c
+++ b/drivers/net/fs_enet/mac-scc.c
@@ -158,7 +158,7 @@ static int setup_data(struct net_device *dev)
{
struct fs_enet_private *fep = netdev_priv(dev);
-#ifdef CONFIG_PPC_CPM_NEW_BINDING
+#ifndef CONFIG_PPC_CPM_NEW_BINDING
struct fs_platform_info *fpi = fep->fpi;
fep->scc.idx = fs_get_scc_index(fpi->fs_no);
--
1.5.3.4
^ permalink raw reply related
* [RFC] [POWERPC] Add support for PHY-less fs_enet operation
From: Jochen Friedrich @ 2007-11-03 19:23 UTC (permalink / raw)
To: linuxppc-embedded@ozlabs.org; +Cc: Jeff Garzik
Hi,
this patch implements PHY-less operation for fs-enet.
Is this the way it should be done or is the preferred way to have some configuration in the deveice tree and using the fixed PHY instead?
What is your opinion on this?
Thanks,
Jochen
---
drivers/net/fs_enet/fs_enet-main.c | 40 ++++++++++++++++++++++++-----------
drivers/net/fs_enet/mac-scc.c | 2 +-
2 files changed, 28 insertions(+), 14 deletions(-)
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index f2a4d39..e142eff 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -702,13 +702,16 @@ static void fs_timeout(struct net_device *dev)
spin_lock_irqsave(&fep->lock, flags);
if (dev->flags & IFF_UP) {
- phy_stop(fep->phydev);
+ if (fep->phydev)
+ phy_stop(fep->phydev);
(*fep->ops->stop)(dev);
(*fep->ops->restart)(dev);
- phy_start(fep->phydev);
+ if (fep->phydev)
+ phy_start(fep->phydev);
}
- phy_start(fep->phydev);
+ if (fep->phydev)
+ phy_start(fep->phydev);
wake = fep->tx_free && !(CBDR_SC(fep->cur_tx) & BD_ENET_TX_READY);
spin_unlock_irqrestore(&fep->lock, flags);
@@ -784,12 +787,12 @@ static int fs_init_phy(struct net_device *dev)
fep->oldlink = 0;
fep->oldspeed = 0;
fep->oldduplex = -1;
- if(fep->fpi->bus_id)
+ if(fep->fpi->bus_id && fep->fpi->bus_id[0])
phydev = phy_connect(dev, fep->fpi->bus_id, &fs_adjust_link, 0,
PHY_INTERFACE_MODE_MII);
else {
printk("No phy bus ID specified in BSP code\n");
- return -EINVAL;
+ return 0;
}
if (IS_ERR(phydev)) {
printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name);
@@ -826,7 +829,14 @@ static int fs_enet_open(struct net_device *dev)
napi_disable(&fep->napi);
return err;
}
- phy_start(fep->phydev);
+ if (fep->phydev)
+ phy_start(fep->phydev);
+ else {
+ fep->ops->restart(dev);
+ netif_schedule(dev);
+ netif_carrier_on(dev);
+ netif_start_queue(dev);
+ }
return 0;
}
@@ -839,7 +849,8 @@ static int fs_enet_close(struct net_device *dev)
netif_stop_queue(dev);
netif_carrier_off(dev);
napi_disable(&fep->napi);
- phy_stop(fep->phydev);
+ if (fep->phydev)
+ phy_stop(fep->phydev);
spin_lock_irqsave(&fep->lock, flags);
spin_lock(&fep->tx_lock);
@@ -848,7 +859,8 @@ static int fs_enet_close(struct net_device *dev)
spin_unlock_irqrestore(&fep->lock, flags);
/* release any irqs */
- phy_disconnect(fep->phydev);
+ if (fep->phydev)
+ phy_disconnect(fep->phydev);
fep->phydev = NULL;
fs_free_irq(dev, fep->interrupt);
@@ -897,13 +909,17 @@ static void fs_get_regs(struct net_device *dev, struct ethtool_regs *regs,
static int fs_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct fs_enet_private *fep = netdev_priv(dev);
- return phy_ethtool_gset(fep->phydev, cmd);
+ if (fep->phydev)
+ return phy_ethtool_gset(fep->phydev, cmd);
+ else
+ return 0;
}
static int fs_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct fs_enet_private *fep = netdev_priv(dev);
- phy_ethtool_sset(fep->phydev, cmd);
+ if (fep->phydev)
+ phy_ethtool_sset(fep->phydev, cmd);
return 0;
}
@@ -1238,9 +1254,7 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
fpi->use_napi = 1;
fpi->napi_weight = 17;
- ret = find_phy(ofdev->node, fpi);
- if (ret)
- goto out_free_fpi;
+ find_phy(ofdev->node, fpi);
privsize = sizeof(*fep) +
sizeof(struct sk_buff **) *
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c
index 48f2f30..018f876 100644
--- a/drivers/net/fs_enet/mac-scc.c
+++ b/drivers/net/fs_enet/mac-scc.c
@@ -389,7 +389,7 @@ static void restart(struct net_device *dev)
W16(sccp, scc_psmr, SCC_PSMR_ENCRC | SCC_PSMR_NIB22);
/* Set full duplex mode if needed */
- if (fep->phydev->duplex)
+ if ((fep->phydev) && (fep->phydev->duplex))
S16(sccp, scc_psmr, SCC_PSMR_LPB | SCC_PSMR_FDE);
S32(sccp, scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT);
--
1.5.3.4
^ permalink raw reply related
* [PATCH] [POWERPC] Fix fs_enet module build
From: Jochen Friedrich @ 2007-11-03 20:45 UTC (permalink / raw)
To: linuxppc-embedded@ozlabs.org; +Cc: netdev, linux-kernel, Jeff Garzik
If fs_enet is build as module, mii-fec/mii-bitbang should be build as
module, as well. Otherwise some symbols remain undefined.
Building modules, stage 2.
MODPOST 5 modules
ERROR: "fs_scc_ops" [drivers/net/fs_enet/fs_enet.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
This can be pulled from git://git.bocc.de/dbox2.git for-2.6.24
drivers/net/fs_enet/Makefile | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/net/fs_enet/Makefile b/drivers/net/fs_enet/Makefile
index 02d4dc1..2f7563a 100644
--- a/drivers/net/fs_enet/Makefile
+++ b/drivers/net/fs_enet/Makefile
@@ -4,7 +4,15 @@
obj-$(CONFIG_FS_ENET) += fs_enet.o
-obj-$(CONFIG_8xx) += mac-fec.o mac-scc.o mii-fec.o
-obj-$(CONFIG_CPM2) += mac-fcc.o mii-bitbang.o
+fs_enet-$(CONFIG_8xx) += mac-fec.o mac-scc.o
+fs_enet-$(CONFIG_CPM2) += mac-fcc.o
+
+ifeq ($(CONFIG_8xx),y)
+ obj-$(CONFIG_FS_ENET) += mii-fec.o
+endif
+
+ifeq ($(CONFIG_CPM2),y)
+ obj-$(CONFIG_FS_ENET) += mii-bitbang.o
+endif
fs_enet-objs := fs_enet-main.o
--
1.5.3.4
^ permalink raw reply related
* [PATCH v2 00/12] [POWERPC] Add TQM5200/CM5200/Motion-PRO board support
From: Marian Balakowicz @ 2007-11-03 23:52 UTC (permalink / raw)
To: linuxppc-dev
This is a secon respin of the patches that add arch/powerpc support for
three MPC5200 based boards: TQ-Components TQM5200, Schindler CM5200
and Promess Motion-PRO. Please review.
[POWERPC] Promess Motion-PRO defconfig
[POWERPC] Promess Motion-PRO DTS
[POWERPC] Motion-PRO: Add LED support.
[POWERPC] CM5200 defconfig
[POWERPC] CM5200 DTS
[POWERPC] TQM5200 defconfig
[POWERPC] TQM5200 DTS
[POWERPC] Export mpc52xx_map_node() routine symbol
[POWERPC] Add generic support for simple MPC5200 based boards
[POWERPC] Add common mpc52xx_setup_pci() routine
[POWERPC] Add 'fsl,lpb' bus type for MPC5200 LocalPlus Bus
[POWERPC] Add 'model: ...' line to common show_cpuinfo()
Cheers,
m.
^ permalink raw reply
* [PATCH v2 01/12] [POWERPC] Add 'model: ...' line to common show_cpuinfo()
From: Marian Balakowicz @ 2007-11-03 23:52 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071103235210.31906.83423.stgit@hekate.izotz.org>
Print out 'model' property of '/' node as a machine name
in generic show_cpuinfo() routine.
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
---
arch/powerpc/kernel/setup-common.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 2de00f8..cb291f1 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -165,6 +165,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
unsigned short min;
if (cpu_id == NR_CPUS) {
+ struct device_node *root;
+ const char *model = NULL;
#if defined(CONFIG_SMP) && defined(CONFIG_PPC32)
unsigned long bogosum = 0;
int i;
@@ -176,6 +178,13 @@ static int show_cpuinfo(struct seq_file *m, void *v)
seq_printf(m, "timebase\t: %lu\n", ppc_tb_freq);
if (ppc_md.name)
seq_printf(m, "platform\t: %s\n", ppc_md.name);
+ root = of_find_node_by_path("/");
+ if (root)
+ model = of_get_property(root, "model", NULL);
+ of_node_put(root);
+ if (model)
+ seq_printf(m, "model\t\t: %s\n", model);
+
if (ppc_md.show_cpuinfo != NULL)
ppc_md.show_cpuinfo(m);
^ permalink raw reply related
* [PATCH v2 02/12] [POWERPC] Add 'fsl, lpb' bus type for MPC5200 LocalPlus Bus
From: Marian Balakowicz @ 2007-11-03 23:52 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071103235210.31906.83423.stgit@hekate.izotz.org>
Define MPC52xx specific device id list, add new
'fsl,lpb' compatible id for LocalPlus Bus.
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
---
arch/powerpc/platforms/52xx/mpc52xx_common.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 9850685..2df97c5 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -124,11 +124,18 @@ mpc5200_setup_xlb_arbiter(void)
iounmap(xlb);
}
+static struct of_device_id mpc52xx_ids[] = {
+ { .type = "soc", },
+ { .compatible = "soc", },
+ { .compatible = "fsl,lpb", },
+ {},
+};
+
void __init
mpc52xx_declare_of_platform_devices(void)
{
/* Find every child of the SOC node and add it to of_platform */
- if (of_platform_bus_probe(NULL, NULL, NULL))
+ if (of_platform_bus_probe(NULL, mpc52xx_ids, NULL))
printk(KERN_ERR __FILE__ ": "
"Error while probing of_platform bus\n");
}
^ permalink raw reply related
* [PATCH v2 03/12] [POWERPC] Add common mpc52xx_setup_pci() routine
From: Marian Balakowicz @ 2007-11-03 23:52 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071103235210.31906.83423.stgit@hekate.izotz.org>
This patch moves a generic pci init code from lite5200
platform file to a common mpc52xx_setup_pci() routine
and adds additional compatibility property verification.
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
---
arch/powerpc/platforms/52xx/lite5200.c | 12 +-----------
arch/powerpc/platforms/52xx/mpc52xx_pci.c | 15 +++++++++++++++
include/asm-powerpc/mpc52xx.h | 5 +++++
3 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index 25d2bfa..ce903be 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -131,10 +131,6 @@ static void lite5200_resume_finish(void __iomem *mbar)
static void __init lite5200_setup_arch(void)
{
-#ifdef CONFIG_PCI
- struct device_node *np;
-#endif
-
if (ppc_md.progress)
ppc_md.progress("lite5200_setup_arch()", 0);
@@ -154,13 +150,7 @@ static void __init lite5200_setup_arch(void)
lite5200_pm_init();
#endif
-#ifdef CONFIG_PCI
- np = of_find_node_by_type(NULL, "pci");
- if (np) {
- mpc52xx_add_bridge(np);
- of_node_put(np);
- }
-#endif
+ mpc52xx_setup_pci();
}
/*
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index 4c6c82a..89304f2 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -406,3 +406,18 @@ mpc52xx_add_bridge(struct device_node *node)
return 0;
}
+
+void __init mpc52xx_setup_pci(void)
+{
+ struct device_node *pci;
+
+ pci = of_find_node_by_type(NULL, "pci");
+ if (!pci)
+ return;
+
+ if (of_device_is_compatible(pci, "fsl,mpc5200-pci") ||
+ of_device_is_compatible(pci, "mpc5200-pci"))
+ mpc52xx_add_bridge(pci);
+
+ of_node_put(pci);
+}
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h
index fcb2ebb..d7efbe0 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -257,7 +257,12 @@ extern void mpc52xx_declare_of_platform_devices(void);
extern void mpc52xx_init_irq(void);
extern unsigned int mpc52xx_get_irq(void);
+#ifdef CONFIG_PCI
extern int __init mpc52xx_add_bridge(struct device_node *node);
+extern void __init mpc52xx_setup_pci(void);
+#else
+static inline void mpc52xx_setup_pci(void) { }
+#endif
extern void __init mpc52xx_map_wdt(void);
extern void mpc52xx_restart(char *cmd);
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox