* [PATCH 6/6] poewrpc/85xx: headers cleanup
From: Dmitry Eremin-Solenikov @ 2011-11-17 17:56 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <1321552581-29773-1-git-send-email-dbaryshkov@gmail.com>
Drop lots of unused headers after board files merge/splitup
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
arch/powerpc/platforms/85xx/corenet_ds.c | 17 ---------------
arch/powerpc/platforms/85xx/ksi8560.c | 16 ---------------
arch/powerpc/platforms/85xx/mpc8536_ds.c | 13 ------------
arch/powerpc/platforms/85xx/mpc85xx_ads.c | 10 ---------
arch/powerpc/platforms/85xx/mpc85xx_cds.c | 23 ---------------------
arch/powerpc/platforms/85xx/mpc85xx_ds.c | 12 -----------
arch/powerpc/platforms/85xx/mpc85xx_mds.c | 31 +++-------------------------
arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 12 -----------
arch/powerpc/platforms/85xx/p1010rdb.c | 10 ---------
arch/powerpc/platforms/85xx/p1022_ds.c | 5 +--
arch/powerpc/platforms/85xx/p1023_rds.c | 13 ------------
arch/powerpc/platforms/85xx/p2041_rdb.c | 15 +-------------
arch/powerpc/platforms/85xx/p3041_ds.c | 15 +-------------
arch/powerpc/platforms/85xx/p3060_qds.c | 8 ++----
arch/powerpc/platforms/85xx/p4080_ds.c | 14 +------------
arch/powerpc/platforms/85xx/p5020_ds.c | 15 +-------------
arch/powerpc/platforms/85xx/sbc8548.c | 28 --------------------------
arch/powerpc/platforms/85xx/sbc8560.c | 15 +-------------
arch/powerpc/platforms/85xx/socrates.c | 15 +-------------
arch/powerpc/platforms/85xx/stx_gp3.c | 15 +-------------
arch/powerpc/platforms/85xx/tqm85xx.c | 13 +-----------
arch/powerpc/platforms/85xx/xes_mpc85xx.c | 14 -------------
22 files changed, 17 insertions(+), 312 deletions(-)
diff --git a/arch/powerpc/platforms/85xx/corenet_ds.c b/arch/powerpc/platforms/85xx/corenet_ds.c
index d782d55..8028d37 100644
--- a/arch/powerpc/platforms/85xx/corenet_ds.c
+++ b/arch/powerpc/platforms/85xx/corenet_ds.c
@@ -11,26 +11,9 @@
* option) any later version.
*/
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/delay.h>
-#include <linux/interrupt.h>
-#include <linux/memblock.h>
-
-#include <asm/system.h>
-#include <asm/time.h>
#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
-#include <asm/ppc-pci.h>
-#include <mm/mmu_decl.h>
-#include <asm/prom.h>
-#include <asm/udbg.h>
-#include <asm/mpic.h>
#include <linux/of_platform.h>
-#include <sysdev/fsl_soc.h>
-#include <sysdev/fsl_pci.h>
#include "mpc85xx.h"
diff --git a/arch/powerpc/platforms/85xx/ksi8560.c b/arch/powerpc/platforms/85xx/ksi8560.c
index 2f5c3bb..2c7f9d9 100644
--- a/arch/powerpc/platforms/85xx/ksi8560.c
+++ b/arch/powerpc/platforms/85xx/ksi8560.c
@@ -12,28 +12,12 @@
*
*/
-#include <linux/stddef.h>
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/delay.h>
-#include <linux/seq_file.h>
#include <linux/of_platform.h>
-#include <asm/system.h>
-#include <asm/time.h>
#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
#include <asm/mpic.h>
-#include <mm/mmu_decl.h>
-#include <asm/udbg.h>
-#include <asm/prom.h>
-
-#include <sysdev/fsl_soc.h>
-#include <sysdev/fsl_pci.h>
#include <asm/cpm2.h>
-#include <sysdev/cpm2_pic.h>
#include "mpc85xx.h"
diff --git a/arch/powerpc/platforms/85xx/mpc8536_ds.c b/arch/powerpc/platforms/85xx/mpc8536_ds.c
index 8a7fc81..cc46db4 100644
--- a/arch/powerpc/platforms/85xx/mpc8536_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc8536_ds.c
@@ -9,22 +9,9 @@
* option) any later version.
*/
-#include <linux/stddef.h>
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/delay.h>
-#include <linux/seq_file.h>
-#include <linux/interrupt.h>
#include <linux/of_platform.h>
-#include <linux/memblock.h>
-#include <asm/system.h>
-#include <asm/time.h>
#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
-#include <mm/mmu_decl.h>
-#include <asm/prom.h>
#include <asm/udbg.h>
#include <asm/mpic.h>
#include <asm/swiotlb.h>
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index 384b4cc..27298ec 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -11,20 +11,11 @@
* option) any later version.
*/
-#include <linux/stddef.h>
-#include <linux/kernel.h>
#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/delay.h>
-#include <linux/seq_file.h>
#include <linux/of_platform.h>
-#include <asm/system.h>
-#include <asm/time.h>
#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
#include <asm/mpic.h>
-#include <mm/mmu_decl.h>
#include <asm/udbg.h>
#include <sysdev/fsl_soc.h>
@@ -32,7 +23,6 @@
#ifdef CONFIG_CPM2
#include <asm/cpm2.h>
-#include <sysdev/cpm2_pic.h>
#endif
#include "mpc85xx.h"
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 0e551d7..b9bb364 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -11,35 +11,12 @@
* option) any later version.
*/
-#include <linux/stddef.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/errno.h>
-#include <linux/reboot.h>
#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/major.h>
-#include <linux/console.h>
-#include <linux/delay.h>
-#include <linux/seq_file.h>
-#include <linux/initrd.h>
-#include <linux/module.h>
#include <linux/interrupt.h>
-#include <linux/fsl_devices.h>
#include <linux/of_platform.h>
-#include <asm/system.h>
-#include <asm/pgtable.h>
-#include <asm/page.h>
-#include <linux/atomic.h>
-#include <asm/time.h>
-#include <asm/io.h>
#include <asm/machdep.h>
-#include <asm/ipic.h>
-#include <asm/pci-bridge.h>
#include <asm/irq.h>
-#include <mm/mmu_decl.h>
-#include <asm/prom.h>
#include <asm/udbg.h>
#include <asm/mpic.h>
#include <asm/i8259.h>
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
index 246d33a..f43537c 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
@@ -12,26 +12,14 @@
* option) any later version.
*/
-#include <linux/stddef.h>
-#include <linux/kernel.h>
#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/delay.h>
-#include <linux/seq_file.h>
#include <linux/interrupt.h>
#include <linux/of_platform.h>
-#include <linux/memblock.h>
-#include <asm/system.h>
-#include <asm/time.h>
#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
-#include <mm/mmu_decl.h>
-#include <asm/prom.h>
#include <asm/udbg.h>
#include <asm/mpic.h>
#include <asm/i8259.h>
-#include <asm/swiotlb.h>
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index 1f5f1af..69a80b8 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -16,42 +16,19 @@
* option) any later version.
*/
-#include <linux/stddef.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/errno.h>
-#include <linux/reboot.h>
-#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/major.h>
-#include <linux/console.h>
-#include <linux/delay.h>
-#include <linux/seq_file.h>
-#include <linux/initrd.h>
-#include <linux/module.h>
-#include <linux/fsl_devices.h>
#include <linux/of_platform.h>
#include <linux/of_device.h>
#include <linux/phy.h>
-#include <linux/memblock.h>
-#include <asm/system.h>
-#include <linux/atomic.h>
-#include <asm/time.h>
-#include <asm/io.h>
#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
-#include <asm/irq.h>
-#include <mm/mmu_decl.h>
-#include <asm/prom.h>
#include <asm/udbg.h>
-#include <sysdev/fsl_soc.h>
-#include <sysdev/fsl_pci.h>
-#include <sysdev/simple_gpio.h>
#include <asm/qe.h>
#include <asm/qe_ic.h>
#include <asm/mpic.h>
-#include <asm/swiotlb.h>
+
+#include <sysdev/fsl_soc.h>
+#include <sysdev/fsl_pci.h>
+#include <sysdev/simple_gpio.h>
#include "mpc85xx.h"
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
index 82906b0..b6578a5 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
@@ -9,21 +9,9 @@
* option) any later version.
*/
-#include <linux/stddef.h>
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/delay.h>
-#include <linux/seq_file.h>
-#include <linux/interrupt.h>
#include <linux/of_platform.h>
-#include <asm/system.h>
-#include <asm/time.h>
#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
-#include <mm/mmu_decl.h>
-#include <asm/prom.h>
#include <asm/udbg.h>
#include <asm/mpic.h>
diff --git a/arch/powerpc/platforms/85xx/p1010rdb.c b/arch/powerpc/platforms/85xx/p1010rdb.c
index 832ed1d..d68c5f8 100644
--- a/arch/powerpc/platforms/85xx/p1010rdb.c
+++ b/arch/powerpc/platforms/85xx/p1010rdb.c
@@ -9,19 +9,9 @@
* option) any later version.
*/
-#include <linux/stddef.h>
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/delay.h>
-#include <linux/interrupt.h>
#include <linux/of_platform.h>
-#include <asm/system.h>
-#include <asm/time.h>
#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
-#include <mm/mmu_decl.h>
-#include <asm/prom.h>
#include <asm/udbg.h>
#include <asm/mpic.h>
diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c b/arch/powerpc/platforms/85xx/p1022_ds.c
index 82da3dd..fd2ec71 100644
--- a/arch/powerpc/platforms/85xx/p1022_ds.c
+++ b/arch/powerpc/platforms/85xx/p1022_ds.c
@@ -18,14 +18,13 @@
#include <linux/pci.h>
#include <linux/of_platform.h>
-#include <linux/memblock.h>
#include <asm/div64.h>
+#include <asm/udbg.h>
#include <asm/mpic.h>
-#include <asm/swiotlb.h>
+#include <asm/fsl_guts.h>
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
-#include <asm/fsl_guts.h>
#include "mpc85xx.h"
diff --git a/arch/powerpc/platforms/85xx/p1023_rds.c b/arch/powerpc/platforms/85xx/p1023_rds.c
index 0098775..f14b315 100644
--- a/arch/powerpc/platforms/85xx/p1023_rds.c
+++ b/arch/powerpc/platforms/85xx/p1023_rds.c
@@ -12,22 +12,9 @@
* option) any later version.
*/
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/errno.h>
-#include <linux/pci.h>
-#include <linux/delay.h>
-#include <linux/module.h>
-#include <linux/fsl_devices.h>
#include <linux/of_platform.h>
-#include <linux/of_device.h>
-#include <asm/system.h>
-#include <asm/time.h>
#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
-#include <mm/mmu_decl.h>
-#include <asm/prom.h>
#include <asm/udbg.h>
#include <asm/mpic.h>
diff --git a/arch/powerpc/platforms/85xx/p2041_rdb.c b/arch/powerpc/platforms/85xx/p2041_rdb.c
index eda6ed5..985ee0e 100644
--- a/arch/powerpc/platforms/85xx/p2041_rdb.c
+++ b/arch/powerpc/platforms/85xx/p2041_rdb.c
@@ -9,26 +9,13 @@
* option) any later version.
*/
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/delay.h>
-#include <linux/interrupt.h>
-#include <linux/phy.h>
-
-#include <asm/system.h>
-#include <asm/time.h>
#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
-#include <mm/mmu_decl.h>
-#include <asm/prom.h>
#include <asm/udbg.h>
#include <asm/mpic.h>
+#include <asm/ehv_pic.h>
-#include <linux/of_platform.h>
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
-#include <asm/ehv_pic.h>
#include "corenet_ds.h"
diff --git a/arch/powerpc/platforms/85xx/p3041_ds.c b/arch/powerpc/platforms/85xx/p3041_ds.c
index 96d99a3..b969c1f 100644
--- a/arch/powerpc/platforms/85xx/p3041_ds.c
+++ b/arch/powerpc/platforms/85xx/p3041_ds.c
@@ -11,26 +11,13 @@
* option) any later version.
*/
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/delay.h>
-#include <linux/interrupt.h>
-#include <linux/phy.h>
-
-#include <asm/system.h>
-#include <asm/time.h>
#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
-#include <mm/mmu_decl.h>
-#include <asm/prom.h>
#include <asm/udbg.h>
#include <asm/mpic.h>
+#include <asm/ehv_pic.h>
-#include <linux/of_platform.h>
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
-#include <asm/ehv_pic.h>
#include "corenet_ds.h"
diff --git a/arch/powerpc/platforms/85xx/p3060_qds.c b/arch/powerpc/platforms/85xx/p3060_qds.c
index 01dcf44..318a2de 100644
--- a/arch/powerpc/platforms/85xx/p3060_qds.c
+++ b/arch/powerpc/platforms/85xx/p3060_qds.c
@@ -9,16 +9,14 @@
* option) any later version.
*/
-#include <linux/kernel.h>
-#include <linux/interrupt.h>
-#include <linux/phy.h>
#include <asm/machdep.h>
#include <asm/udbg.h>
#include <asm/mpic.h>
-#include <linux/of_platform.h>
+#include <asm/ehv_pic.h>
+
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
-#include <asm/ehv_pic.h>
+
#include "corenet_ds.h"
/*
diff --git a/arch/powerpc/platforms/85xx/p4080_ds.c b/arch/powerpc/platforms/85xx/p4080_ds.c
index d1b21d7..bd5ded3 100644
--- a/arch/powerpc/platforms/85xx/p4080_ds.c
+++ b/arch/powerpc/platforms/85xx/p4080_ds.c
@@ -11,25 +11,13 @@
* option) any later version.
*/
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/delay.h>
-#include <linux/interrupt.h>
-
-#include <asm/system.h>
-#include <asm/time.h>
#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
-#include <mm/mmu_decl.h>
-#include <asm/prom.h>
#include <asm/udbg.h>
#include <asm/mpic.h>
+#include <asm/ehv_pic.h>
-#include <linux/of_platform.h>
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
-#include <asm/ehv_pic.h>
#include "corenet_ds.h"
diff --git a/arch/powerpc/platforms/85xx/p5020_ds.c b/arch/powerpc/platforms/85xx/p5020_ds.c
index e8cba50..1ff0277 100644
--- a/arch/powerpc/platforms/85xx/p5020_ds.c
+++ b/arch/powerpc/platforms/85xx/p5020_ds.c
@@ -11,26 +11,13 @@
* option) any later version.
*/
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/delay.h>
-#include <linux/interrupt.h>
-#include <linux/phy.h>
-
-#include <asm/system.h>
-#include <asm/time.h>
#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
-#include <mm/mmu_decl.h>
-#include <asm/prom.h>
#include <asm/udbg.h>
#include <asm/mpic.h>
+#include <asm/ehv_pic.h>
-#include <linux/of_platform.h>
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
-#include <asm/ehv_pic.h>
#include "corenet_ds.h"
diff --git a/arch/powerpc/platforms/85xx/sbc8548.c b/arch/powerpc/platforms/85xx/sbc8548.c
index e948b4c..32f5d4d 100644
--- a/arch/powerpc/platforms/85xx/sbc8548.c
+++ b/arch/powerpc/platforms/85xx/sbc8548.c
@@ -14,35 +14,7 @@
* option) any later version.
*/
-#include <linux/stddef.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/errno.h>
-#include <linux/reboot.h>
-#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/major.h>
-#include <linux/console.h>
-#include <linux/delay.h>
-#include <linux/seq_file.h>
-#include <linux/initrd.h>
-#include <linux/module.h>
-#include <linux/interrupt.h>
-#include <linux/fsl_devices.h>
-#include <linux/of_platform.h>
-
-#include <asm/system.h>
-#include <asm/pgtable.h>
-#include <asm/page.h>
-#include <linux/atomic.h>
-#include <asm/time.h>
-#include <asm/io.h>
#include <asm/machdep.h>
-#include <asm/ipic.h>
-#include <asm/pci-bridge.h>
-#include <asm/irq.h>
-#include <mm/mmu_decl.h>
-#include <asm/prom.h>
#include <asm/udbg.h>
#include <asm/mpic.h>
diff --git a/arch/powerpc/platforms/85xx/sbc8560.c b/arch/powerpc/platforms/85xx/sbc8560.c
index b0c62f0..adae8a5 100644
--- a/arch/powerpc/platforms/85xx/sbc8560.c
+++ b/arch/powerpc/platforms/85xx/sbc8560.c
@@ -13,21 +13,9 @@
* option) any later version.
*/
-#include <linux/stddef.h>
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/delay.h>
-#include <linux/seq_file.h>
-#include <linux/of_platform.h>
-
-#include <asm/system.h>
-#include <asm/time.h>
#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
-#include <asm/mpic.h>
-#include <mm/mmu_decl.h>
#include <asm/udbg.h>
+#include <asm/mpic.h>
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
@@ -36,7 +24,6 @@
#ifdef CONFIG_CPM2
#include <asm/cpm2.h>
-#include <sysdev/cpm2_pic.h>
#endif
static void __init sbc8560_pic_init(void)
diff --git a/arch/powerpc/platforms/85xx/socrates.c b/arch/powerpc/platforms/85xx/socrates.c
index 67535a5..d414ce7 100644
--- a/arch/powerpc/platforms/85xx/socrates.c
+++ b/arch/powerpc/platforms/85xx/socrates.c
@@ -21,22 +21,9 @@
* option) any later version.
*/
-#include <linux/stddef.h>
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/delay.h>
-#include <linux/seq_file.h>
-#include <linux/of_platform.h>
-
-#include <asm/system.h>
-#include <asm/time.h>
#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
-#include <asm/mpic.h>
-#include <asm/prom.h>
-#include <mm/mmu_decl.h>
#include <asm/udbg.h>
+#include <asm/mpic.h>
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
diff --git a/arch/powerpc/platforms/85xx/stx_gp3.c b/arch/powerpc/platforms/85xx/stx_gp3.c
index 18a9fc5..407abba 100644
--- a/arch/powerpc/platforms/85xx/stx_gp3.c
+++ b/arch/powerpc/platforms/85xx/stx_gp3.c
@@ -20,22 +20,9 @@
* option) any later version.
*/
-#include <linux/stddef.h>
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/delay.h>
-#include <linux/seq_file.h>
-#include <linux/of_platform.h>
-
-#include <asm/system.h>
-#include <asm/time.h>
#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
-#include <asm/mpic.h>
-#include <asm/prom.h>
-#include <mm/mmu_decl.h>
#include <asm/udbg.h>
+#include <asm/mpic.h>
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c
index 56c5518..3d89453 100644
--- a/arch/powerpc/platforms/85xx/tqm85xx.c
+++ b/arch/powerpc/platforms/85xx/tqm85xx.c
@@ -18,22 +18,11 @@
* option) any later version.
*/
-#include <linux/stddef.h>
-#include <linux/kernel.h>
#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/delay.h>
-#include <linux/seq_file.h>
-#include <linux/of_platform.h>
-#include <asm/system.h>
-#include <asm/time.h>
#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
-#include <asm/mpic.h>
-#include <asm/prom.h>
-#include <mm/mmu_decl.h>
#include <asm/udbg.h>
+#include <asm/mpic.h>
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
diff --git a/arch/powerpc/platforms/85xx/xes_mpc85xx.c b/arch/powerpc/platforms/85xx/xes_mpc85xx.c
index e1ddff5..77b6a37 100644
--- a/arch/powerpc/platforms/85xx/xes_mpc85xx.c
+++ b/arch/powerpc/platforms/85xx/xes_mpc85xx.c
@@ -12,21 +12,7 @@
* published by the Free Software Foundation.
*/
-#include <linux/stddef.h>
-#include <linux/kernel.h>
-#include <linux/pci.h>
-#include <linux/kdev_t.h>
-#include <linux/delay.h>
-#include <linux/seq_file.h>
-#include <linux/interrupt.h>
-#include <linux/of_platform.h>
-
-#include <asm/system.h>
-#include <asm/time.h>
#include <asm/machdep.h>
-#include <asm/pci-bridge.h>
-#include <mm/mmu_decl.h>
-#include <asm/prom.h>
#include <asm/udbg.h>
#include <asm/mpic.h>
--
1.7.7.1
^ permalink raw reply related
* [PATCH 5/6] powerpc/85xx: separate i8259 handling to common function
From: Dmitry Eremin-Solenikov @ 2011-11-17 17:56 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <1321552581-29773-1-git-send-email-dbaryshkov@gmail.com>
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
arch/powerpc/platforms/85xx/mpc85xx.h | 4 +++
arch/powerpc/platforms/85xx/mpc85xx_cds.c | 25 +-----------------
arch/powerpc/platforms/85xx/mpc85xx_common.c | 36 ++++++++++++++++++++++++++
arch/powerpc/platforms/85xx/mpc85xx_ds.c | 27 +------------------
4 files changed, 42 insertions(+), 50 deletions(-)
diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms/85xx/mpc85xx.h
index e2a6631..1bf61f3 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx.h
+++ b/arch/powerpc/platforms/85xx/mpc85xx.h
@@ -12,4 +12,8 @@ static inline void __init mpc85xx_cpm2_pic_init(void) {}
#define MPC85xx_NO_PRIMARY_PHB 0xffff
extern void mpc85xx_setup_arch(unsigned primary_phb_addr);
+#ifdef CONFIG_PPC_I8259
+extern int mpc85xx_i8259_setup_irq(void);
+#endif
+
#endif
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 49366e7..0e551d7 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -195,30 +195,7 @@ static void __init mpc85xx_cds_pic_init(void)
static int mpc85xx_cds_8259_attach(void)
{
int ret;
- struct device_node *np = NULL;
- struct device_node *cascade_node = NULL;
- int cascade_irq;
-
- /* Initialize the i8259 controller */
- for_each_node_by_type(np, "interrupt-controller")
- if (of_device_is_compatible(np, "chrp,iic")) {
- cascade_node = np;
- break;
- }
-
- if (cascade_node == NULL) {
- printk(KERN_DEBUG "Could not find i8259 PIC\n");
- return -ENODEV;
- }
-
- cascade_irq = irq_of_parse_and_map(cascade_node, 0);
- if (cascade_irq == NO_IRQ) {
- printk(KERN_ERR "Failed to map cascade interrupt\n");
- return -ENXIO;
- }
-
- i8259_init(cascade_node, 0);
- of_node_put(cascade_node);
+ int cascade_irq = mpc85xx_i8259_setup_irq();
/*
* Hook the interrupt to make sure desc->action is never NULL.
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_common.c b/arch/powerpc/platforms/85xx/mpc85xx_common.c
index 87e61a3..1602c7a 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_common.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_common.c
@@ -9,6 +9,7 @@
#include <linux/of_platform.h>
#include <linux/pci.h>
+#include <asm/i8259.h>
#include <asm/machdep.h>
#include <asm/mpic.h>
@@ -158,3 +159,38 @@ void __init mpc85xx_setup_arch(unsigned primary_phb_addr)
}
#endif
}
+
+#ifdef CONFIG_PPC_I8259
+int __init mpc85xx_i8259_setup_irq(void)
+{
+ struct device_node *np;
+ struct device_node *cascade_node = NULL;
+ int cascade_irq;
+
+ /* Initialize the i8259 controller */
+ for_each_node_by_type(np, "interrupt-controller")
+ if (of_device_is_compatible(np, "chrp,iic")) {
+ cascade_node = np;
+ break;
+ }
+
+ if (cascade_node == NULL) {
+ printk(KERN_DEBUG "Could not find i8259 PIC\n");
+ return -ENODEV;
+ }
+
+ cascade_irq = irq_of_parse_and_map(cascade_node, 0);
+ if (cascade_irq == NO_IRQ) {
+ printk(KERN_ERR "Failed to map cascade interrupt\n");
+ return -ENXIO;
+ }
+
+ pr_debug("%s: cascade mapped to irq %d\n", __func__, cascade_irq);
+
+ i8259_init(cascade_node, 0);
+ of_node_put(cascade_node);
+
+ return cascade_irq;
+}
+
+#endif
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
index bd9931a..246d33a 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
@@ -60,32 +60,7 @@ static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
static void __init mpc85xx_ds_i8259_init(void)
{
- struct device_node *np;
- struct device_node *cascade_node = NULL;
- int cascade_irq;
-
- /* Initialize the i8259 controller */
- for_each_node_by_type(np, "interrupt-controller")
- if (of_device_is_compatible(np, "chrp,iic")) {
- cascade_node = np;
- break;
- }
-
- if (cascade_node == NULL) {
- printk(KERN_DEBUG "Could not find i8259 PIC\n");
- return;
- }
-
- cascade_irq = irq_of_parse_and_map(cascade_node, 0);
- if (cascade_irq == NO_IRQ) {
- printk(KERN_ERR "Failed to map cascade interrupt\n");
- return;
- }
-
- DBG("mpc85xxds: cascade mapped to irq %d\n", cascade_irq);
-
- i8259_init(cascade_node, 0);
- of_node_put(cascade_node);
+ int cascade_irq = mpc85xx_i8259_setup_irq();
irq_set_chained_handler(cascade_irq, mpc85xx_8259_cascade);
}
--
1.7.7.1
^ permalink raw reply related
* Re: [PATCH 3/6] powerpc/85xx: separate MPIC handling code
From: Lee Nipper @ 2011-11-17 18:30 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: linuxppc-dev
In-Reply-To: <1321552581-29773-3-git-send-email-dbaryshkov@gmail.com>
On Thu, Nov 17, 2011 at 11:56 AM, Dmitry Eremin-Solenikov
<dbaryshkov@gmail.com> wrote:
> All mpc85xx boards deal with MPIC initialization in more or less the
> same way. The only difrerences are some flags (WANTS_RESET,
> BROKEN_FRR_NIRQS, SINGLE_DEST_CPU), and some bugs like leaking device
> node counter, etc. To minimize problems, switch all boards to use one
> single instance of code.
>
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
<snip>
> diff --git a/arch/powerpc/platforms/85xx/mpc85xx_common.c b/arch/powerpc/=
platforms/85xx/mpc85xx_common.c
> index fe40668..7579e24 100644
> --- a/arch/powerpc/platforms/85xx/mpc85xx_common.c
> +++ b/arch/powerpc/platforms/85xx/mpc85xx_common.c
> @@ -7,6 +7,9 @@
> =A0*/
> =A0#include <linux/of_platform.h>
>
> +#include <asm/machdep.h>
> +#include <asm/mpic.h>
> +
> =A0#include <sysdev/cpm2_pic.h>
>
> =A0#include "mpc85xx.h"
> @@ -63,3 +66,43 @@ void __init mpc85xx_cpm2_pic_init(void)
> =A0 =A0 =A0 =A0irq_set_chained_handler(irq, cpm2_cascade);
> =A0}
> =A0#endif
> +
> +
> +void __init mpc85xx_init_mpic(bool reset, bool broken_frr, bool singlede=
st)
> +{
> + =A0 =A0 =A0 struct mpic *mpic;
> + =A0 =A0 =A0 struct resource r;
> + =A0 =A0 =A0 struct device_node *np =3D NULL;
> + =A0 =A0 =A0 unsigned int flags =3D MPIC_PRIMARY | MPIC_BIG_ENDIAN |
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 MPIC_BROKEN=
_FRR_NIRQS | MPIC_SINGLE_DEST_CPU;
since parameters broken_frr and singledest are used later,
flags should probably be just:
=A0 =A0 unsigned int flags =3D MPIC_PRIMARY | MPIC_BIG_ENDIAN;
> +
> + =A0 =A0 =A0 np =3D of_find_node_by_type(np, "open-pic");
> +
> + =A0 =A0 =A0 if (np =3D=3D NULL) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(KERN_ERR "Could not find open-pic no=
de\n");
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return;
> + =A0 =A0 =A0 }
> +
> + =A0 =A0 =A0 if (of_address_to_resource(np, 0, &r)) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(KERN_ERR "Failed to map mpic registe=
r space\n");
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 of_node_put(np);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return;
> + =A0 =A0 =A0 }
> +
> + =A0 =A0 =A0 if (reset)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 flags |=3D MPIC_WANTS_RESET;
> + =A0 =A0 =A0 if (broken_frr)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 flags |=3D MPIC_BROKEN_FRR_NIRQS;
> + =A0 =A0 =A0 if (singledest)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 flags |=3D MPIC_SINGLE_DEST_CPU;
> + =A0 =A0 =A0 if (ppc_md.get_irq =3D=3D mpic_get_coreint_irq)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 flags |=3D MPIC_ENABLE_COREINT;
> +
> + =A0 =A0 =A0 mpic =3D mpic_alloc(np, r.start, flags, 0, 256, " OpenPIC =
=A0");
> + =A0 =A0 =A0 BUG_ON(mpic =3D=3D NULL);
> +
> + =A0 =A0 =A0 /* Return the mpic node */
> + =A0 =A0 =A0 of_node_put(np);
> +
> + =A0 =A0 =A0 mpic_init(mpic);
> +}
<snip>
> --
> 1.7.7.1
^ permalink raw reply
* Re: [PATCH 3/6] powerpc/85xx: separate MPIC handling code
From: Dmitry Eremin-Solenikov @ 2011-11-17 18:43 UTC (permalink / raw)
To: lee.nipper; +Cc: linuxppc-dev
In-Reply-To: <CALg11mj7DG2KE=pODJ526zQdQZSc4vFuDCtEGGYXNiwxpGAcyA@mail.gmail.com>
On 11/17/2011 10:30 PM, Lee Nipper wrote:
> On Thu, Nov 17, 2011 at 11:56 AM, Dmitry Eremin-Solenikov
> <dbaryshkov@gmail.com> wrote:
>> All mpc85xx boards deal with MPIC initialization in more or less the
>> same way. The only difrerences are some flags (WANTS_RESET,
>> BROKEN_FRR_NIRQS, SINGLE_DEST_CPU), and some bugs like leaking device
>> node counter, etc. To minimize problems, switch all boards to use one
>> single instance of code.
>>
>> Signed-off-by: Dmitry Eremin-Solenikov<dbaryshkov@gmail.com>
>
> <snip>
>
>> diff --git a/arch/powerpc/platforms/85xx/mpc85xx_common.c b/arch/powerpc/platforms/85xx/mpc85xx_common.c
>> index fe40668..7579e24 100644
>> --- a/arch/powerpc/platforms/85xx/mpc85xx_common.c
>> +++ b/arch/powerpc/platforms/85xx/mpc85xx_common.c
>> @@ -7,6 +7,9 @@
>> */
>> #include<linux/of_platform.h>
>>
>> +#include<asm/machdep.h>
>> +#include<asm/mpic.h>
>> +
>> #include<sysdev/cpm2_pic.h>
>>
>> #include "mpc85xx.h"
>> @@ -63,3 +66,43 @@ void __init mpc85xx_cpm2_pic_init(void)
>> irq_set_chained_handler(irq, cpm2_cascade);
>> }
>> #endif
>> +
>> +
>> +void __init mpc85xx_init_mpic(bool reset, bool broken_frr, bool singledest)
>> +{
>> + struct mpic *mpic;
>> + struct resource r;
>> + struct device_node *np = NULL;
>> + unsigned int flags = MPIC_PRIMARY | MPIC_BIG_ENDIAN |
>> + MPIC_BROKEN_FRR_NIRQS | MPIC_SINGLE_DEST_CPU;
>
> since parameters broken_frr and singledest are used later,
> flags should probably be just:
>
> unsigned int flags = MPIC_PRIMARY | MPIC_BIG_ENDIAN;
Yes, forgot about this when cleaning up. Sorry.
>
>> +
>> + np = of_find_node_by_type(np, "open-pic");
>> +
>> + if (np == NULL) {
>> + printk(KERN_ERR "Could not find open-pic node\n");
>> + return;
>> + }
>> +
>> + if (of_address_to_resource(np, 0,&r)) {
>> + printk(KERN_ERR "Failed to map mpic register space\n");
>> + of_node_put(np);
>> + return;
>> + }
>> +
>> + if (reset)
>> + flags |= MPIC_WANTS_RESET;
>> + if (broken_frr)
>> + flags |= MPIC_BROKEN_FRR_NIRQS;
>> + if (singledest)
>> + flags |= MPIC_SINGLE_DEST_CPU;
>> + if (ppc_md.get_irq == mpic_get_coreint_irq)
>> + flags |= MPIC_ENABLE_COREINT;
>> +
>> + mpic = mpic_alloc(np, r.start, flags, 0, 256, " OpenPIC ");
>> + BUG_ON(mpic == NULL);
>> +
>> + /* Return the mpic node */
>> + of_node_put(np);
>> +
>> + mpic_init(mpic);
>> +}
>
> <snip>
>
>> --
>> 1.7.7.1
--
With best wishes
Dmitry
^ permalink raw reply
* Re: [PATCH v3 2/3] hvc_init(): Enforce one-time initialization.
From: Miche Baker-Harvey @ 2011-11-17 18:57 UTC (permalink / raw)
To: Rusty Russell
Cc: Stephen Rothwell, xen-devel, Konrad Rzeszutek Wilk,
Greg Kroah-Hartman, linux-kernel, virtualization, Anton Blanchard,
Amit Shah, Mike Waychison, ppc-dev, Eric Northrup
In-Reply-To: <874nybqo0o.fsf@rustcorp.com.au>
Rusty, Michael, Stephen, et al,
Thanks for your comments on these patches.
For what I'm trying to do, all three patches are necessary, but maybe
I'm going about it the wrong way. Your input would be appreciated.
I'm in no way claiming that these patches are "right", just that it's
working for me, and that what's in the current pool is not.
What I'm trying to do is:
On X86,
under KVM,
start a virtio console device,
with multiple ports on the device,
at least one of which is also a console (as well as ttyS0).
(Eventually, we want to be able to add virtio console ports on the
fly, and to have multiple virtio console ports be consoles.)
When all three of the patches are in place, this works great. (By
great, I mean that getty's start up on all of ttyS0, hvc0 and hvc1,
and console output goes to ttyS0 and to hvc0.
"who" shows three users: =A0ttyS0, hvc0, and hvc1.
"cat /proc/consoles" shows both ttyS0 and hvc0.
I can use all three getty's, and console output really does appear on
both the consoles.
Based on Rusty's comments, I tried removing each of the patches
individually. Here's what happens today. I've seen other failure modes
depending on what precisely I'm passing the guest.
There's three patches:
1/3 "fix locking of vtermno"
2/3 "enforce one-time initialization with hvc_init
"3/3 "use separate struct console * for each console"
If I remove the "fix locking of vtermno", I only get one virtio
console terminal. =A0"who" shows the ttyS0 and the hvc0, and I can log
into the gettys on both. I don't get the second virtio console getty.
Interestingly, hvc0 shows up in /proc/consoles twice, and in fact the
console output is dumped twice to hvc0 (as you'd expect from looking
at printk.c, each line appears twice, followed by the next line.)
If I remove the "enforce one-time initialization with hvc_init" patch,
which makes sure only a single thread is doing the hvc_init, and gates
anyone from continuing until it has completed, I get different
failures, including hangs, and dereferences of NULL pointers.
If I remove the "use separate struct console * for each console"patch,
what I'm seeing now is that while all of ttyS0, hvc0, and hvc1 are
present with gettys running on them, of the three, only ttyS0 is a
console.
I also re-tried each patch alone:
For either the "fix locking of vtermno" or "use separate struct
console * for each console" patches (in other words, not the "enforce
one-time initialization with hvc_init" patch), I panic during boot
with a null dereference.
For just the "enforce one-time initialization with hvc_init" patch, I
see all of hvc0, hvc1, and ttyS0 in a "who" listing, but only one
getty is available with an hvc. Also, an echo to *either* "hvc0"
or"hvc1" appears on the single hvc getty. =A0Also, no virtio console
appears in the /proc/consoles list.
Michael, I agree with you about the comment and naming of the mutex
around hvc_init.
Stephen, the duplicate messages are not something I'm seeing. =A0It's
probably the case that there are two "consoles" (registered in printk)
that have the same tty as their target. I've added a call to
register_console in hvc_alloc, and I'm guessing that something in your
system is making your tty register as a console in hvc_instantiate,
and then it's re-registered in hvc_alloc, but I really am not sure. We
don't have earlyprintk support, so the register_console in
hvc_instantiate is never called.
Miche
^ permalink raw reply
* [PATCH 1/2] powerpc/85xx: add pixis indirect mode device tree node
From: Timur Tabi @ 2011-11-17 18:57 UTC (permalink / raw)
To: kumar.gala, linuxppc-dev
The Freescale P1022 has a unique pin muxing "feature" where the DIU video
controller's video signals are muxed with 24 of the local bus address signals.
When the DIU is enabled, the bulk of the local bus is disabled, preventing
access to memory-mapped devices like NOR flash and the pixis FPGA.
In this situation, the pixis supports "indirect mode", which allows access
to the pixis itself by reading/writing addresses on specific local bus
chip selects. CS0 is used to select which pixis register to access, and
CS1 is used to read/write the value.
To support this, we introduce another board-control child node of the
localbus node that contains a 'reg' property for CS0 and CS1. This will
produce the correct physical addresses for CS0 and CS1.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
arch/powerpc/boot/dts/p1022ds.dts | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/boot/dts/p1022ds.dts b/arch/powerpc/boot/dts/p1022ds.dts
index 24a73e9..3e85d8c 100644
--- a/arch/powerpc/boot/dts/p1022ds.dts
+++ b/arch/powerpc/boot/dts/p1022ds.dts
@@ -24,6 +24,20 @@
0x2 0x0 0xf 0xffa00000 0x00040000
0x3 0x0 0xf 0xffdf0000 0x00008000>;
+ /*
+ * This node is used to access the pixis via "indirect" mode,
+ * which is done by writing the pixis register index to chip
+ * select 0 and the value to/from chip select 1. Indirect
+ * mode is the only way to access the pixis when DIU video
+ * is enabled. Note that this assumes that the first column
+ * of the 'ranges' property above is the chip select number.
+ */
+ board-control@0,0 {
+ compatible = "fsl,p1022ds-indirect-pixis";
+ reg = <0x0 0x0 1 /* CS0 */
+ 0x1 0x0 1>; /* CS1 */
+ };
+
nor@0,0 {
#address-cells = <1>;
#size-cells = <1>;
--
1.7.3.4
^ permalink raw reply related
* [PATCH 2/2] powerpc/85xx: p1022ds: enable monitor switching via pixis indirect mode
From: Timur Tabi @ 2011-11-17 18:57 UTC (permalink / raw)
To: kumar.gala, linuxppc-dev
In-Reply-To: <1321556259-4459-1-git-send-email-timur@freescale.com>
When the P1022's DIU video controller is active, the pixis must be accessed
in "indirect" mode, which uses localbus chip select addresses.
Switching between the DVI and LVDS monitor ports is handled by the pixis,
so that switching needs to be done via indirect mode.
This has the side-effect of no longer requiring U-Boot to enable the DIU.
Now Linux can enable the DIU all by itself.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
arch/powerpc/platforms/85xx/p1022_ds.c | 132 ++++++++++++++++++++++++++-----
1 files changed, 110 insertions(+), 22 deletions(-)
diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c b/arch/powerpc/platforms/85xx/p1022_ds.c
index fda1571..7bdb9af 100644
--- a/arch/powerpc/platforms/85xx/p1022_ds.c
+++ b/arch/powerpc/platforms/85xx/p1022_ds.c
@@ -29,6 +29,10 @@
#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)
+#define PMUXCR_ELBCDIU_MASK 0xc0000000
+#define PMUXCR_ELBCDIU_NOR16 0x80000000
+#define PMUXCR_ELBCDIU_DIU 0x40000000
+
/*
* Board-specific initialization of the DIU. This code should probably be
* executed when the DIU is opened, rather than in arch code, but the DIU
@@ -46,11 +50,22 @@
#define CLKDVDR_PXCLK_MASK 0x00FF0000
/* Some ngPIXIS register definitions */
+#define PX_CTL 3
+#define PX_BRDCFG0 8
+#define PX_BRDCFG1 9
+
+#define PX_BRDCFG0_ELBC_SPI_MASK 0xc0
+#define PX_BRDCFG0_ELBC_SPI_ELBC 0x00
+#define PX_BRDCFG0_ELBC_SPI_NULL 0xc0
+#define PX_BRDCFG0_ELBC_DIU 0x02
+
#define PX_BRDCFG1_DVIEN 0x80
#define PX_BRDCFG1_DFPEN 0x40
#define PX_BRDCFG1_BACKLIGHT 0x20
#define PX_BRDCFG1_DDCEN 0x10
+#define PX_CTL_ALTACC 0x80
+
/*
* DIU Area Descriptor
*
@@ -129,44 +144,117 @@ static void p1022ds_set_gamma_table(enum fsl_diu_monitor_port port,
*/
static void p1022ds_set_monitor_port(enum fsl_diu_monitor_port port)
{
- struct device_node *np;
- void __iomem *pixis;
- u8 __iomem *brdcfg1;
+ struct device_node *guts_node = NULL;
+ struct device_node *indirect_node = NULL;
+ struct ccsr_guts_85xx __iomem *guts = NULL;
+ u8 __iomem *lbc_lcs0_ba = NULL;
+ u8 __iomem *lbc_lcs1_ba = NULL;
+ u8 b;
- np = of_find_compatible_node(NULL, NULL, "fsl,p1022ds-fpga");
- if (!np)
- /* older device trees used "fsl,p1022ds-pixis" */
- np = of_find_compatible_node(NULL, NULL, "fsl,p1022ds-pixis");
- if (!np) {
- pr_err("p1022ds: missing ngPIXIS node\n");
+ /* Map the global utilities registers. */
+ guts_node = of_find_compatible_node(NULL, NULL, "fsl,p1022-guts");
+ if (!guts_node) {
+ pr_err("p1022ds: missing global utilties device node\n");
return;
}
- pixis = of_iomap(np, 0);
- if (!pixis) {
- pr_err("p1022ds: could not map ngPIXIS registers\n");
- return;
+ guts = of_iomap(guts_node, 0);
+ if (!guts) {
+ pr_err("p1022ds: could not map global utilties device\n");
+ goto exit;
}
- brdcfg1 = pixis + 9; /* BRDCFG1 is at offset 9 in the ngPIXIS */
+
+ indirect_node = of_find_compatible_node(NULL, NULL,
+ "fsl,p1022ds-indirect-pixis");
+ if (!indirect_node) {
+ pr_err("p1022ds: missing pixis indirect mode node\n");
+ goto exit;
+ }
+
+ lbc_lcs0_ba = of_iomap(indirect_node, 0);
+ if (!lbc_lcs0_ba) {
+ pr_err("p1022ds: could not map localbus chip select 0\n");
+ goto exit;
+ }
+
+ lbc_lcs1_ba = of_iomap(indirect_node, 1);
+ if (!lbc_lcs1_ba) {
+ pr_err("p1022ds: could not map localbus chip select 1\n");
+ goto exit;
+ }
+
+ /* Make sure we're in indirect mode first. */
+ if ((in_be32(&guts->pmuxcr) & PMUXCR_ELBCDIU_MASK) !=
+ PMUXCR_ELBCDIU_DIU) {
+ struct device_node *pixis_node;
+ void __iomem *pixis;
+
+ pixis_node =
+ of_find_compatible_node(NULL, NULL, "fsl,p1022ds-fpga");
+ if (!pixis_node) {
+ pr_err("p1022ds: missing pixis node\n");
+ goto exit;
+ }
+
+ pixis = of_iomap(pixis_node, 0);
+ of_node_put(pixis_node);
+ if (!pixis) {
+ pr_err("p1022ds: could not map pixis registers\n");
+ goto exit;
+ }
+
+ /* Enable indirect PIXIS mode. */
+ setbits8(pixis + PX_CTL, PX_CTL_ALTACC);
+ iounmap(pixis);
+
+ /* Switch the board mux to the DIU */
+ out_8(lbc_lcs0_ba, PX_BRDCFG0); /* BRDCFG0 */
+ b = in_8(lbc_lcs1_ba);
+ b |= PX_BRDCFG0_ELBC_DIU;
+ out_8(lbc_lcs1_ba, b);
+
+ /* Set the chip mux to DIU mode. */
+ clrsetbits_be32(&guts->pmuxcr, PMUXCR_ELBCDIU_MASK,
+ PMUXCR_ELBCDIU_DIU);
+ in_be32(&guts->pmuxcr);
+ }
+
switch (port) {
case FSL_DIU_PORT_DVI:
- printk(KERN_INFO "%s:%u\n", __func__, __LINE__);
/* Enable the DVI port, disable the DFP and the backlight */
- clrsetbits_8(brdcfg1, PX_BRDCFG1_DFPEN | PX_BRDCFG1_BACKLIGHT,
- PX_BRDCFG1_DVIEN);
+ out_8(lbc_lcs0_ba, PX_BRDCFG1);
+ b = in_8(lbc_lcs1_ba);
+ b &= ~(PX_BRDCFG1_DFPEN | PX_BRDCFG1_BACKLIGHT);
+ b |= PX_BRDCFG1_DVIEN;
+ out_8(lbc_lcs1_ba, b);
break;
case FSL_DIU_PORT_LVDS:
- printk(KERN_INFO "%s:%u\n", __func__, __LINE__);
+ /*
+ * LVDS also needs backlight enabled, otherwise the display
+ * will be blank.
+ */
/* Enable the DFP port, disable the DVI and the backlight */
- clrsetbits_8(brdcfg1, PX_BRDCFG1_DVIEN | PX_BRDCFG1_BACKLIGHT,
- PX_BRDCFG1_DFPEN);
+ out_8(lbc_lcs0_ba, PX_BRDCFG1);
+ b = in_8(lbc_lcs1_ba);
+ b &= ~PX_BRDCFG1_DVIEN;
+ b |= PX_BRDCFG1_DFPEN | PX_BRDCFG1_BACKLIGHT;
+ out_8(lbc_lcs1_ba, b);
break;
default:
pr_err("p1022ds: unsupported monitor port %i\n", port);
}
- iounmap(pixis);
+exit:
+ if (lbc_lcs1_ba)
+ iounmap(lbc_lcs1_ba);
+ if (lbc_lcs0_ba)
+ iounmap(lbc_lcs0_ba);
+ if (guts)
+ iounmap(guts);
+
+ of_node_put(indirect_node);
+ of_node_put(guts_node);
}
/**
--
1.7.3.4
^ permalink raw reply related
* Re: [PATCH v3 1/3] virtio_console: Fix locking of vtermno.
From: Amit Shah @ 2011-11-17 19:09 UTC (permalink / raw)
To: Rusty Russell
Cc: Stephen Rothwell, xen-devel, Konrad Rzeszutek Wilk,
Greg Kroah-Hartman, Miche Baker-Harvey, linux-kernel,
virtualization, Anton Blanchard, Mike Waychison, ppc-dev,
Eric Northrup
In-Reply-To: <877h37qo5z.fsf@rustcorp.com.au>
On (Fri) 11 Nov 2011 [14:57:20], Rusty Russell wrote:
> On Tue, 08 Nov 2011 13:44:58 -0800, Miche Baker-Harvey <miche@google.com> wrote:
> > Some modifications of vtermno were not done under the spinlock.
> >
> > Moved assignment from vtermno and increment of vtermno together,
> > putting both under the spinlock. Revert vtermno on failure.
> >
> > Signed-off-by: Miche Baker-Harvey <miche@google.com>
>
> Does it matter? It's normal not to lock in a function called
> "init_XXX", since it's not exposed yet.
>
> Or is it?
Slight misnomer, I suppose.
We do this init_console_port() as part of add_port() if the port is a
console port. Should it be named 'mark_console_port()'? Dunno,
doesn't sound like the right name. init fits closest.
Amit
^ permalink raw reply
* Re: [PATCH v2 2/7] powerpc/85xx: add HOTPLUG_CPU support
From: Scott Wood @ 2011-11-17 19:44 UTC (permalink / raw)
To: Li Yang-R58472
Cc: Wood Scott-B07421, linuxppc-dev@lists.ozlabs.org,
Zhao Chenhui-B35336
In-Reply-To: <3F607A5180246847A760FD34122A1E052D4486@039-SN1MPN1-003.039d.mgd.msft.net>
On Thu, Nov 17, 2011 at 05:16:09AM -0600, Li Yang-R58472 wrote:
>
>
> >Cc: linuxppc-dev@lists.ozlabs.org; Li Yang-R58472
> >Subject: Re: [PATCH v2 2/7] powerpc/85xx: add HOTPLUG_CPU support
> >
> >On 11/16/2011 03:55 AM, Zhao Chenhui wrote:
> >> +static void __cpuinit smp_85xx_mach_cpu_die(void) {
> >> + unsigned int cpu = smp_processor_id();
> >> + register u32 tmp;
> >> +
> >> + local_irq_disable();
> >> + idle_task_exit();
> >> + generic_set_cpu_dead(cpu);
> >> + mb();
> >> +
> >> + mtspr(SPRN_TCR, 0);
> >> + mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS);
> >
> >Clearing these bits in TSR should be unnecessary since we clear TCR -- and
> >doesn't really accomplish anything since the TSR bits can continue to be
> >set.
>
> I also recommend setting the CORE_IRQ_MASK and CORE_CI_MASK in the
> POWMGTCSR register so that no interrupt will wakeup the core from NAP.
Any interrupt that we don't want to use as a wakeup source should already
be disabled at the MPIC. Won't disabling IRQs in POWMGTCSR prevent us
from being woken by devices that we want to use as a wakeup source?
> >If watchdog is in use, we need to set the period to the highest possible
> >to effectively disable it.
>
> Setting it to the highest timeout doesn't really disable the watchdog.
It means the watchdog won't expire for thousands of years, which is
beyond any reasonable design parameter for uptime.
We already do this in Topaz when entering nap.
> >> +static int __cpuinit smp_85xx_kick_cpu(int nr)
> >> +
> >> {
> >> unsigned long flags;
> >> const u64 *cpu_rel_addr;
> >> - __iomem u32 *bptr_vaddr;
> >> + __iomem struct epapr_spin_table *epapr;
> >
> >Please don't call this just "epapr". That's like calling a reference to
> >any powerpc-specific struct "powerpc".
> >
> >How about "spin_table"?
>
> You mean the name of the variable not the structure, right? I agree.
Right, the variable name.
> >> struct smp_ops_t smp_85xx_ops = {
> >> .kick_cpu = smp_85xx_kick_cpu,
> >> + .setup_cpu = smp_85xx_setup_cpu,
> >> +#ifdef CONFIG_HOTPLUG_CPU
> >> + .cpu_disable = generic_cpu_disable,
> >> + .cpu_die = generic_cpu_die,
> >> +#endif
> >
> >Only fill these fields in on e500v1/v2, until we properly support e500mc.
> >Likewise in ppc_md.cpu_die and anywhere else we advertise this
> >functionality.
>
> Is there a standard function call that can tell that it is an e500mc not legacy e500?
Use CONFIG_E500MC -- we don't support combined e500v2/e500mc kernels for
other reasons.
If that ever changes, we'll need to do something based on the cpu table.
-Scott
^ permalink raw reply
* Re: [PATCH v2 4/7] powerpc/85xx: add support to JOG feature using cpufreq interface
From: Scott Wood @ 2011-11-17 19:54 UTC (permalink / raw)
To: Zhao Chenhui; +Cc: linuxppc-dev
In-Reply-To: <20111117115322.GA10020@localhost.localdomain>
On Thu, Nov 17, 2011 at 07:53:22PM +0800, Zhao Chenhui wrote:
> On Wed, Nov 16, 2011 at 06:17:56PM -0600, Scott Wood wrote:
> > On 11/16/2011 03:55 AM, Zhao Chenhui wrote:
> > > + local_irq_save(flags);
> > > + /*
> > > + * A Jog request can not be asserted when any core is in a low power
> > > + * state. Before executing a jog request, any core which is in
> > > + * a low power state must be waked by a interrupt.
> > > + */
> > > + if (mpc85xx_freqs == p1022_freqs_table) {
> > > + powersave = ppc_md.power_save;
> > > + ppc_md.power_save = NULL;
> > > + wmb();
> > > + val = in_be32(guts + POWMGTCSR);
> > > + for_each_online_cpu(i) {
> > > + if (val & ((POWMGTCSR_CORE0_DOZING |
> > > + POWMGTCSR_CORE0_NAPPING) << (i * 2)))
> > > + smp_send_reschedule(i);
> > > + }
> > > + }
> >
> > This is racy, what if another core read ppc_md.power_save just before
> > you wrote NULL, but hasn't yet entered a low power state?
> >
>
> Yes, It's rare but it is possible. Perhaps I can check if the core is
> in ppc_md.power_save() by the flag _TLF_NAPPING.
There's still a race window between when power_save is checked and when
_TLF_NAPPING is set.
Just send the IPI unconditionally to all CPUs. Since we want to clear
MSR[EE] on all CPUs, what we really want is probably smp_call_function().
The called function would be entered with interrupts disabled, should
update an atomic counter to check in with the main core, and should wait
for the main core to indicate that jog is finished and it's OK to return.
> > > + local_irq_restore(flags);
> > > +
> > > + /* verify */
> > > + if (!spin_event_timeout(get_pll(hw_cpu) == pll, 10000, 10)) {
> > > + pr_err("%s: Fail to switch the core frequency. "
> > > + "The current PLL of core %d is %d instead of %d.\n",
> > > + __func__, hw_cpu, get_pll(hw_cpu), pll);
> > > + ret = -EINVAL;
> > > + }
> >
> > Shouldn't the pll be where it's supposed to be as soon as we resume
> > execution? I don't see a need to spin here, provided we properly wait
> > for the jog to happen earlier (which we want to do so that we don't
> > enable power_save and EE early).
>
> I found some delay is needed to wait the pll to update in tests.
This delay should happen earlier -- you should spin waiting for
POWMGTCSR[JOG] to clear before you enable interrupts, restore
ppc_md.power_save, or do any other cleanup that assumes you're done with
the jog.
Have you seen the PLL not be updated after POWMGTCSR[JOG] is clear?
-Scott
^ permalink raw reply
* Re: [PATCH 08/29] powerpc/85xx: Rework MPC8536DS device trees
From: Scott Wood @ 2011-11-17 20:44 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <1321514181-28897-8-git-send-email-galak@kernel.crashing.org>
On Thu, Nov 17, 2011 at 01:16:00AM -0600, Kumar Gala wrote:
> Utilize new split between board & SoC, and new SoC device trees split
> into pre & post utilizing 'template' includes for SoC IP blocks.
>
> Other changes include:
> * Moved to specifying interrupt-parent for mpic at root
> * Moved to 4-cell mpic interrupt cells to support MPIC timers
> * Added localbus node, but no chipselect details at this point
> * Reworked PCIe nodes to allow supportin IRQs for controller (errors)
> * and moved
> PCI device IRQs down to virtual bridge level
> * Moved mdio nodes up one level instead of under tsec nodes
> * Added GPIO controller node to MPC8536 SoC template
> [ marked as MPC8572 compatiable to get errata handling that applies ]
> * Added missing cache-line-size & cache-size properties missing from
> L2-cache node
> * Added IP level IEEE 1588 / ptp timer node
>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
> arch/powerpc/boot/dts/fsl/mpc8536si-post.dtsi | 248 ++++++++++++++
> arch/powerpc/boot/dts/fsl/mpc8536si-pre.dtsi | 63 ++++
OK, so rather than ask again what the real reason for this is, I went
ahead and tried it without the pre/post split.
It seems the issue with putting everything in "pre" is that we can't
rewrite a node name. We can let the board supply its own reg/ranges, but
not the unit address of a previously-defined node.
Putting everything in post works, provided the setting of board-level
compatible is removed from the "si" file. And since the board file is
driving this process, if it really wanted to override something from the
"si" file, it could do so after the include (just as it would currently
need to do to override anything in "post").
-Scott
^ permalink raw reply
* Re: [PATCH 3/4] poewrpc/83xx: headers cleanup
From: Stephen Rothwell @ 2011-11-17 21:12 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: linuxppc-dev
In-Reply-To: <1321541330-2330-3-git-send-email-dbaryshkov@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]
Hi Dmitry,
On Thu, 17 Nov 2011 18:48:49 +0400 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> wrote:
>
> Drop lots of unused headers after board files merge/splitup
Please inly drop include files if nothing in them is actually used. You
need to do this by inspection, not by compilation testing. The problem
is that indirect inclusions change over time and also depending on what
CONFIG options are selected. Just a few examples below ...
> diff --git a/arch/powerpc/platforms/83xx/km83xx.c b/arch/powerpc/platforms/83xx/km83xx.c
> index 65eb792..3b29e35 100644
> --- a/arch/powerpc/platforms/83xx/km83xx.c
> +++ b/arch/powerpc/platforms/83xx/km83xx.c
> @@ -11,35 +11,9 @@
> * option) any later version.
> */
>
> -#include <linux/stddef.h>
> -#include <linux/kernel.h>
> -#include <linux/init.h>
> -#include <linux/errno.h>
> -#include <linux/reboot.h>
> -#include <linux/pci.h>
> -#include <linux/kdev_t.h>
> -#include <linux/major.h>
> -#include <linux/console.h>
> -#include <linux/delay.h>
> -#include <linux/seq_file.h>
> -#include <linux/root_dev.h>
> -#include <linux/initrd.h>
> -#include <linux/of_platform.h>
> -#include <linux/of_device.h>
Where is this file going to get its definition of "struct device_node" or
"of_find_node_by_name"?
> -#include <asm/system.h>
> -#include <linux/atomic.h>
> -#include <asm/time.h>
> -#include <asm/io.h>
> -#include <asm/machdep.h>
or "ppc_md" or "define_machine"?
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH 3/6] powerpc/85xx: separate MPIC handling code
From: Stephen Rothwell @ 2011-11-17 21:20 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: linuxppc-dev, lee.nipper
In-Reply-To: <4EC555D7.1080808@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1187 bytes --]
Hi Dmitry,
On Thu, 17 Nov 2011 22:43:35 +0400 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> wrote:
>
> On 11/17/2011 10:30 PM, Lee Nipper wrote:
> > On Thu, Nov 17, 2011 at 11:56 AM, Dmitry Eremin-Solenikov
> > <dbaryshkov@gmail.com> wrote:
> >> All mpc85xx boards deal with MPIC initialization in more or less the
> >> same way. The only difrerences are some flags (WANTS_RESET,
> >> BROKEN_FRR_NIRQS, SINGLE_DEST_CPU), and some bugs like leaking device
> >> node counter, etc. To minimize problems, switch all boards to use one
> >> single instance of code.
> >>
> >> Signed-off-by: Dmitry Eremin-Solenikov<dbaryshkov@gmail.com>
> >
> > <snip>
> >
> > since parameters broken_frr and singledest are used later,
> > flags should probably be just:
> >
> > unsigned int flags = MPIC_PRIMARY | MPIC_BIG_ENDIAN;
>
> Yes, forgot about this when cleaning up. Sorry.
Since the three arguments to this function are just used to set flags,
maybe it would be better to just pass in the extra flags required in each
case as a single argument.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH 6/6] poewrpc/85xx: headers cleanup
From: Stephen Rothwell @ 2011-11-17 21:22 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: linuxppc-dev
In-Reply-To: <1321552581-29773-6-git-send-email-dbaryshkov@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 438 bytes --]
Hi Dmitry,
On Thu, 17 Nov 2011 21:56:21 +0400 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> wrote:
>
> Drop lots of unused headers after board files merge/splitup
Again, I am concerned that you may have removed too many includes (though
I didn't explicitly check this time).
In general, these clean ups look great.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: oprofile callgraph support missing for common cpus
From: Joakim Tjernlund @ 2011-11-17 21:27 UTC (permalink / raw)
To: Andy Fleming; +Cc: linuxppc-dev, maynardj, oprofile-list
In-Reply-To: <A8CB2347-27B6-482A-B49B-F434FBFCBC10@freescale.com>
Andy Fleming <afleming@freescale.com> wrote on 2011/11/17 18:51:52:
>
>
> On Nov 17, 2011, at 11:30 AM, Maynard Johnson wrote:
>
> >>
> >> Notice the first
> >> if (!cur_cpu_spec->oprofile_cpu_type)
> >> return -ENODEV;
> >>
> >> if (firmware_has_feature(FW_FEATURE_ISERIES))
> >> return -ENODEV;
> >> For my e300c2 cpu both if's are false and I don't get support for callgraph/backtrace
> >> support. Moving the ops->backtrace = op_powerpc_backtrace; to the top
> >> enables backtrace for me.
> > What kernel version are you using? Actually, looking at a 3.0.3 tree I happen to have available, I see oprofile h/w event support (in arch/powerpc/kernel/cputable.c) for e300c3 and e300c4, but not the other e300 flavors. I've added Andy Flemming from Freescale to cc. Maybe he knows why e300c2
isn't supported.
>
> e300c2 does not have hardware performance monitor events.
>
> However, it should be able to support timer-based profiling, right? And why not support backtrace from there? Do we require hardware counters to get a backtrace?
It sure seems to work :)
If it doesn't, one needs to make sure /dev/oprofile/backtrace_depth isn't published as it is now.
Question, what is the sample rate for timer based oprofile?
Is it HZ depended?
Jocke
^ permalink raw reply
* Re: [PATCH 2/2] powerpc/85xx: p1022ds: enable monitor switching via pixis indirect mode
From: Stephen Rothwell @ 2011-11-17 21:29 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev, kumar.gala
In-Reply-To: <1321556259-4459-2-git-send-email-timur@freescale.com>
[-- Attachment #1: Type: text/plain, Size: 883 bytes --]
Hi Timur,
On Thu, 17 Nov 2011 12:57:39 -0600 Timur Tabi <timur@freescale.com> wrote:
>
> @@ -129,44 +144,117 @@ static void p1022ds_set_gamma_table(enum fsl_diu_monitor_port port,
> */
> static void p1022ds_set_monitor_port(enum fsl_diu_monitor_port port)
> {
> - struct device_node *np;
> - void __iomem *pixis;
> - u8 __iomem *brdcfg1;
> + struct device_node *guts_node = NULL;
There is no point in initialising this as it is assigned before being
used.
> + struct device_node *indirect_node = NULL;
> + struct ccsr_guts_85xx __iomem *guts = NULL;
> + u8 __iomem *lbc_lcs0_ba = NULL;
> + u8 __iomem *lbc_lcs1_ba = NULL;
And if you had multiple error path labels, you could avoid these others
as well (and the NULL checks on the error path).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH 3/6] powerpc/85xx: separate MPIC handling code
From: Scott Wood @ 2011-11-17 21:33 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: linuxppc-dev
In-Reply-To: <1321552581-29773-3-git-send-email-dbaryshkov@gmail.com>
On Thu, Nov 17, 2011 at 09:56:18PM +0400, Dmitry Eremin-Solenikov wrote:
> All mpc85xx boards deal with MPIC initialization in more or less the
> same way. The only difrerences are some flags (WANTS_RESET,
> BROKEN_FRR_NIRQS, SINGLE_DEST_CPU), and some bugs like leaking device
> node counter, etc. To minimize problems, switch all boards to use one
> single instance of code.
SINGLE_DEST_CPU should apply to all 85xx (the boards that omit it are
probably non-SMP where it doesn't matter), and probably BROKEN_FRR_NIRQS
as well (shouldn't hurt, at least).
> + mpc85xx_init_mpic(0, 1, 1);
This is awkward to read, named flags are better -- and already exist for
this. :-)
Something like this should be clearer and still allow any override the
board wishes (such as for 85xx CAMP):
#define MPC85XX_MPIC_FLAGS (...)
most_boards:
mpc85xx_init_mpic(MPC85XX_MPIC_FLAGS)
85xx CAMP:
mpc85xx_init_mpic(MPC85XX_MPIC_FLAGS & ~MPIC_WANTS_RESET);
-Scott
^ permalink raw reply
* Re: [PATCH 2/2] powerpc/85xx: p1022ds: enable monitor switching via pixis indirect mode
From: Scott Wood @ 2011-11-17 21:37 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev, kumar.gala
In-Reply-To: <1321556259-4459-2-git-send-email-timur@freescale.com>
On Thu, Nov 17, 2011 at 12:57:39PM -0600, Timur Tabi wrote:
> When the P1022's DIU video controller is active, the pixis must be accessed
> in "indirect" mode, which uses localbus chip select addresses.
>
> Switching between the DVI and LVDS monitor ports is handled by the pixis,
> so that switching needs to be done via indirect mode.
>
> This has the side-effect of no longer requiring U-Boot to enable the DIU.
> Now Linux can enable the DIU all by itself.
Under what circumstances does Linux do this? How does Linux prevent the
NOR flash driver from binding to the device when this mode has been or
will be used?
-Scott
^ permalink raw reply
* Re: [PATCH 1/2] powerpc/85xx: add pixis indirect mode device tree node
From: Scott Wood @ 2011-11-17 21:50 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev, kumar.gala
In-Reply-To: <1321556259-4459-1-git-send-email-timur@freescale.com>
On Thu, Nov 17, 2011 at 12:57:38PM -0600, Timur Tabi wrote:
> The Freescale P1022 has a unique pin muxing "feature" where the DIU video
> controller's video signals are muxed with 24 of the local bus address signals.
> When the DIU is enabled, the bulk of the local bus is disabled, preventing
> access to memory-mapped devices like NOR flash and the pixis FPGA.
>
> In this situation, the pixis supports "indirect mode", which allows access
> to the pixis itself by reading/writing addresses on specific local bus
> chip selects. CS0 is used to select which pixis register to access, and
> CS1 is used to read/write the value.
>
> To support this, we introduce another board-control child node of the
> localbus node that contains a 'reg' property for CS0 and CS1. This will
> produce the correct physical addresses for CS0 and CS1.
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> arch/powerpc/boot/dts/p1022ds.dts | 14 ++++++++++++++
> 1 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/boot/dts/p1022ds.dts b/arch/powerpc/boot/dts/p1022ds.dts
> index 24a73e9..3e85d8c 100644
> --- a/arch/powerpc/boot/dts/p1022ds.dts
> +++ b/arch/powerpc/boot/dts/p1022ds.dts
> @@ -24,6 +24,20 @@
> 0x2 0x0 0xf 0xffa00000 0x00040000
> 0x3 0x0 0xf 0xffdf0000 0x00008000>;
>
> + /*
> + * This node is used to access the pixis via "indirect" mode,
> + * which is done by writing the pixis register index to chip
> + * select 0 and the value to/from chip select 1. Indirect
> + * mode is the only way to access the pixis when DIU video
> + * is enabled. Note that this assumes that the first column
> + * of the 'ranges' property above is the chip select number.
> + */
> + board-control@0,0 {
> + compatible = "fsl,p1022ds-indirect-pixis";
> + reg = <0x0 0x0 1 /* CS0 */
> + 0x1 0x0 1>; /* CS1 */
> + };
> +
> nor@0,0 {
> #address-cells = <1>;
> #size-cells = <1>;
U-Boot should mark some of these devices as disabled, based on whether
indirect mode is enabled on boot. If you're not going to do that, at
least remove simple-bus from the compatible list.
Something like this is probably the best way to describe it:
localbus {
compatible = "...", "fsl,elbc", "simple-bus";
ranges = <...>;
#address-cells = <2>;
#size-cells = <2>;
mux {
compatible = "fsl,p1022ds-localbus-mux"; // no simple-bus
fsl,localbus-mux-mode = "indirect"; // inital state on boot
ranges;
#address-cells = <2>;
#size-cells = <2>;
board-control@0,0 {
compatible = "fsl,p1022ds-indirect-pixis";
reg = <0 0 1
1 0 1>;
fsl,localbus-mux-avail = "indirect";
};
flash@0,0 {
...
fsl,localbus-mux-avail = "direct";
};
...
};
};
Or encode the mode as part of reg, as I suggested for someone else here:
http://lists.ozlabs.org/pipermail/devicetree-discuss/2011-November/009378.html
-Scott
^ permalink raw reply
* Re: [PATCH net-next] ibm/emac: fix improper cleanup when device is removed to allow re-bind
From: David Miller @ 2011-11-17 22:05 UTC (permalink / raw)
To: wg; +Cc: Netdev, Linuxppc-dev
In-Reply-To: <4EC506E4.5060806@grandegger.com>
From: Wolfgang Grandegger <wg@grandegger.com>
Date: Thu, 17 Nov 2011 14:06:44 +0100
> The re-binding (unbind..bind) of an EMAC device fails because the
> static variable "busy_phy_map" is not updated when the device is
> removed.
>
> Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH 1/3] mtd/nand: fix coding style issue in drivers/mtd/nand/fsl_elbc.c
From: Artem Bityutskiy @ 2011-11-17 22:08 UTC (permalink / raw)
To: b35362; +Cc: linuxppc-dev, linux-kernel, linux-mtd, scottwood, akpm, dwmw2
In-Reply-To: <1321349355-1639-1-git-send-email-b35362@freescale.com>
On Tue, 2011-11-15 at 17:29 +0800, b35362@freescale.com wrote:
> From: Liu Shuo <b35362@freescale.com>
>
> fix whitespaces,tabs coding style issue and use #include <linux/io.h> instead of <asm/io.h>
> in drivers/mtd/nand/fsl_elbc.c.
>
> Signed-off-by: Liu Shuo <b35362@freescale.com>
> Signed-off-by: Li Yang <leoli@freescale.com>
Hi, It is really matter of taste whether to use only tabs for
indentations or tabs + few spaces to align nicely with the previous
line. I personally prefer the latter and dislike when people use only
tabs. But other people love tabs and use them everywhere, even like
#define\tBLAH_BLAH\tvalue, which I find ugly, but I do not mind people
using this.
So no, please, let's leave the indentation as is in this file. It is ok
to assume tab is 8 spaces in the kernel.
Artem.
^ permalink raw reply
* Re: [PATCH 2/2] powerpc/85xx: p1022ds: enable monitor switching via pixis indirect mode
From: Timur Tabi @ 2011-11-17 22:09 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev, kumar.gala
In-Reply-To: <20111118082929.5ee8d4f07d84f2bf65e18006@canb.auug.org.au>
Stephen Rothwell wrote:
>> static void p1022ds_set_monitor_port(enum fsl_diu_monitor_port port)
>> {
>> - struct device_node *np;
>> - void __iomem *pixis;
>> - u8 __iomem *brdcfg1;
>> + struct device_node *guts_node = NULL;
>
> There is no point in initialising this as it is assigned before being
> used.
Ok.
>> + struct device_node *indirect_node = NULL;
>> + struct ccsr_guts_85xx __iomem *guts = NULL;
>> + u8 __iomem *lbc_lcs0_ba = NULL;
>> + u8 __iomem *lbc_lcs1_ba = NULL;
>
> And if you had multiple error path labels, you could avoid these others
> as well (and the NULL checks on the error path).
But I don't want multiple error path labels. The error path could only happen if someone passed in a broken device tree (i.e. pretty much never), so I'm not keen on complicating my code just to optimize something that will never be used.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply
* Re: [PATCH 2/2] powerpc/85xx: p1022ds: enable monitor switching via pixis indirect mode
From: Timur Tabi @ 2011-11-17 22:12 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, kumar.gala
In-Reply-To: <20111117213733.GC14736@schlenkerla.am.freescale.net>
Scott Wood wrote:
>> This has the side-effect of no longer requiring U-Boot to enable the DIU.
>> Now Linux can enable the DIU all by itself.
>
> Under what circumstances does Linux do this?
p1022ds_set_monitor_port() is called by the DIU driver when it enables the DIU. This happens on boot, for example, if you enable the framebuffer console.
> How does Linux prevent the
> NOR flash driver from binding to the device when this mode has been or
> will be used?
It doesn't. This isn't a simple problem to solve. On the P1022, NOR flash and the DIU are incompatible, and yet that's exactly what we ship on the P1022DS board. We could just remove the NOR flash node from the DTS.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply
* Re: [PATCH 2/3] mtd/nand : set Nand flash page address to FBAR and FPAR correctly
From: Artem Bityutskiy @ 2011-11-17 22:13 UTC (permalink / raw)
To: b35362
Cc: Artem.Bityutskiy, linuxppc-dev, linux-kernel, Tang Yuantian,
linux-mtd, Jerry Huang, scottwood, akpm, dwmw2
In-Reply-To: <1321349355-1639-2-git-send-email-b35362@freescale.com>
On Tue, 2011-11-15 at 17:29 +0800, b35362@freescale.com wrote:
> From: Liu Shuo <b35362@freescale.com>
>
> If we use the Nand flash chip whose number of pages in a block is greater
> than 64(for large page), we must treat the low bit of FBAR as being the
> high bit of the page address due to the limitation of FCM, it simply uses
> the low 6-bits (for large page) of the combined block/page address as the
> FPAR component, rather than considering the actual block size.
Looks like this patch depends on the previous white-space clean-up patch
- could you please refactor it (and 3/3 too) and resend?
Artem.
^ permalink raw reply
* Re: [PATCH 2/2] powerpc/85xx: p1022ds: enable monitor switching via pixis indirect mode
From: Scott Wood @ 2011-11-17 22:25 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev, kumar.gala
In-Reply-To: <4EC586B2.5060604@freescale.com>
On Thu, Nov 17, 2011 at 04:12:02PM -0600, Timur Tabi wrote:
> Scott Wood wrote:
>
> >> This has the side-effect of no longer requiring U-Boot to enable the DIU.
> >> Now Linux can enable the DIU all by itself.
> >
> > Under what circumstances does Linux do this?
>
> p1022ds_set_monitor_port() is called by the DIU driver when it enables
> the DIU. This happens on boot, for example, if you enable the
> framebuffer console.
>
> > How does Linux prevent the
> > NOR flash driver from binding to the device when this mode has been or
> > will be used?
>
> It doesn't. This isn't a simple problem to solve. On the P1022, NOR
> flash and the DIU are incompatible, and yet that's exactly what we ship
> on the P1022DS board. We could just remove the NOR flash node from the
> DTS.
As we discussed earlier, you could have a kernel boot parameter that
indicates what mode you'd like the localbus to run in. Then, platform
code could update the device tree before any drivers bind.
Or, have U-boot set up the desired mode before entering the kernel, and
provide an appropriate device tree.
Letting the kernel bind to localbus devices such as NOR flash, and then
taking the devices away without notice just because another device gets
initialized, is not the way to go. We've already left "it just works"
territory, might as well make the user choose explicitly.
-Scott
^ permalink raw reply
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