summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoff Thorpe <Geoff.Thorpe@freescale.com>2013-03-13 09:08:11 (GMT)
committerEmil Medve <Emilian.Medve@Freescale.com>2013-04-02 09:42:37 (GMT)
commitb3f701489ffe0158ed4d104eca2e3d7579f550c0 (patch)
tree13653d9fc8838a443b0f5580bf6cb2366dd6b505
parent482a4d07104c4bfabef653eb623aa4c7c307459a (diff)
downloadlinux-fsl-qoriq-b3f701489ffe0158ed4d104eca2e3d7579f550c0.tar.xz
powerpc/85xx: Add platform support for the Freescale DPAA Q/BMan
Signed-off-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Signed-off-by: Bharat Bhushan <Bharat.Bhushan@freescale.com> Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Signed-off-by: Hai-Ying Wang <Haiying.Wang@freescale.com> Signed-off-by: Jeffrey Ladouceur <jeffrey.ladouceur@freescale.com> Signed-off-by: Jia-Fei Pan <Jiafei.Pan@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com> Signed-off-by: Vakul Garg <vakul@freescale.com> Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
-rw-r--r--arch/powerpc/Kconfig5
-rw-r--r--arch/powerpc/Makefile5
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig5
-rw-r--r--arch/powerpc/platforms/85xx/corenet_ds.c24
-rw-r--r--arch/powerpc/platforms/85xx/corenet_ds.h1
-rw-r--r--arch/powerpc/platforms/85xx/p1023_rds.c25
-rw-r--r--arch/powerpc/platforms/85xx/p2041_rdb.c5
-rw-r--r--arch/powerpc/platforms/85xx/p3041_ds.c5
-rw-r--r--arch/powerpc/platforms/85xx/p4080_ds.c1
-rw-r--r--arch/powerpc/platforms/85xx/p5020_ds.c5
-rw-r--r--arch/powerpc/platforms/85xx/p5040_ds.c5
-rw-r--r--arch/powerpc/platforms/85xx/t4240_qds.c5
12 files changed, 77 insertions, 14 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 5e14d1a..ead57a8 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -721,6 +721,11 @@ config FSL_GTM
help
Freescale General-purpose Timers support
+config HAS_FSL_QBMAN
+ bool "Datapath Acceleration Queue and Buffer management"
+ help
+ Datapath Acceleration Queue and Buffer management
+
# Yes MCA RS/6000s exist but Linux-PPC does not currently support any
config MCA
bool
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index f65c7e6..8168d06 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -67,6 +67,8 @@ LDFLAGS_vmlinux-y := -Bstatic
LDFLAGS_vmlinux-$(CONFIG_RELOCATABLE) := -pie
LDFLAGS_vmlinux := $(LDFLAGS_vmlinux-y)
+LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
+
ifeq ($(CONFIG_PPC64),y)
ifeq ($(call cc-option-yn,-mcmodel=medium),y)
# -mcmodel=medium breaks modules because it uses 32bit offsets from
@@ -86,6 +88,7 @@ endif
CFLAGS-$(CONFIG_PPC64) := -mtraceback=no -mcall-aixdesc
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,-mminimal-toc)
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions)
+
CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 -mmultiple
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,-mtune=power4)
@@ -168,6 +171,8 @@ core-$(CONFIG_PERF_EVENTS) += arch/powerpc/perf/
drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
+libs-y += $(LIBGCC)
+
# Default to zImage, override when needed
all: zImage
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index 6d1543b..eb4d678 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -222,6 +222,7 @@ config P2041_RDB
select GPIO_MPC8XXX
select HAS_RAPIDIO
select PPC_EPAPR_HV_PIC
+ select HAS_FSL_QBMAN
help
This option enables support for the P2041 RDB board
@@ -235,6 +236,7 @@ config P3041_DS
select GPIO_MPC8XXX
select HAS_RAPIDIO
select PPC_EPAPR_HV_PIC
+ select HAS_FSL_QBMAN
help
This option enables support for the P3041 DS board
@@ -248,6 +250,7 @@ config P4080_DS
select GPIO_MPC8XXX
select HAS_RAPIDIO
select PPC_EPAPR_HV_PIC
+ select HAS_FSL_QBMAN
help
This option enables support for the P4080 DS board
@@ -264,6 +267,7 @@ config P5020_DS
select GPIO_MPC8XXX
select HAS_RAPIDIO
select PPC_EPAPR_HV_PIC
+ select HAS_FSL_QBMAN
help
This option enables support for the P5020 DS board
@@ -278,6 +282,7 @@ config P5040_DS
select GPIO_MPC8XXX
select HAS_RAPIDIO
select PPC_EPAPR_HV_PIC
+ select HAS_FSL_QBMAN
help
This option enables support for the P5040 DS board
diff --git a/arch/powerpc/platforms/85xx/corenet_ds.c b/arch/powerpc/platforms/85xx/corenet_ds.c
index c59c617..1c1e2f5 100644
--- a/arch/powerpc/platforms/85xx/corenet_ds.c
+++ b/arch/powerpc/platforms/85xx/corenet_ds.c
@@ -5,8 +5,8 @@
*
* Copyright 2009-2011 Freescale Semiconductor Inc.
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
@@ -100,3 +100,23 @@ int __init corenet_ds_publish_devices(void)
{
return of_platform_bus_probe(NULL, of_device_ids, NULL);
}
+
+/* Early setup is required for large chunks of contiguous (and coarsely-aligned)
+ * memory. The following shoe-horns Q/Bman "init_early" calls into the
+ * platform setup to let them parse their CCSR nodes early on. */
+#ifdef CONFIG_FSL_QMAN_CONFIG
+void __init qman_init_early(void);
+#endif
+#ifdef CONFIG_FSL_BMAN_CONFIG
+void __init bman_init_early(void);
+#endif
+
+__init void corenet_ds_init_early(void)
+{
+#ifdef CONFIG_FSL_QMAN_CONFIG
+ qman_init_early();
+#endif
+#ifdef CONFIG_FSL_BMAN_CONFIG
+ bman_init_early();
+#endif
+}
diff --git a/arch/powerpc/platforms/85xx/corenet_ds.h b/arch/powerpc/platforms/85xx/corenet_ds.h
index ddd700b..a5b63c6 100644
--- a/arch/powerpc/platforms/85xx/corenet_ds.h
+++ b/arch/powerpc/platforms/85xx/corenet_ds.h
@@ -15,5 +15,6 @@
extern void __init corenet_ds_pic_init(void);
extern void __init corenet_ds_setup_arch(void);
extern int __init corenet_ds_publish_devices(void);
+extern void __init corenet_ds_init_early(void);
#endif
diff --git a/arch/powerpc/platforms/85xx/p1023_rds.c b/arch/powerpc/platforms/85xx/p1023_rds.c
index 9cc60a7..0859b72 100644
--- a/arch/powerpc/platforms/85xx/p1023_rds.c
+++ b/arch/powerpc/platforms/85xx/p1023_rds.c
@@ -6,8 +6,8 @@
* Description:
* P1023 RDS Board Setup
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
@@ -106,6 +106,26 @@ static int __init p1023_rds_probe(void)
}
+/* Early setup is required for large chunks of contiguous (and coarsely-aligned)
+ * memory. The following shoe-horns Q/Bman "init_early" calls into the
+ * platform setup to let them parse their CCSR nodes early on. */
+#ifdef CONFIG_FSL_QMAN_CONFIG
+void __init qman_init_early(void);
+#endif
+#ifdef CONFIG_FSL_BMAN_CONFIG
+void __init bman_init_early(void);
+#endif
+
+static __init void p1023_rds_init_early(void)
+{
+#ifdef CONFIG_FSL_QMAN_CONFIG
+ qman_init_early();
+#endif
+#ifdef CONFIG_FSL_BMAN_CONFIG
+ bman_init_early();
+#endif
+}
+
define_machine(p1023_rds) {
.name = "P1023 RDS",
.probe = p1023_rds_probe,
@@ -118,5 +138,6 @@ define_machine(p1023_rds) {
#ifdef CONFIG_PCI
.pcibios_fixup_bus = fsl_pcibios_fixup_bus,
#endif
+ .init_early = p1023_rds_init_early,
};
diff --git a/arch/powerpc/platforms/85xx/p2041_rdb.c b/arch/powerpc/platforms/85xx/p2041_rdb.c
index 000c089..6112b09 100644
--- a/arch/powerpc/platforms/85xx/p2041_rdb.c
+++ b/arch/powerpc/platforms/85xx/p2041_rdb.c
@@ -3,8 +3,8 @@
*
* Copyright 2011 Freescale Semiconductor Inc.
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
@@ -78,6 +78,7 @@ define_machine(p2041_rdb) {
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
.power_save = e500_idle,
+ .init_early = corenet_ds_init_early,
};
machine_arch_initcall(p2041_rdb, corenet_ds_publish_devices);
diff --git a/arch/powerpc/platforms/85xx/p3041_ds.c b/arch/powerpc/platforms/85xx/p3041_ds.c
index b3edc20..d0517bd 100644
--- a/arch/powerpc/platforms/85xx/p3041_ds.c
+++ b/arch/powerpc/platforms/85xx/p3041_ds.c
@@ -5,8 +5,8 @@
*
* Copyright 2009-2010 Freescale Semiconductor Inc.
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
@@ -80,6 +80,7 @@ define_machine(p3041_ds) {
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
.power_save = e500_idle,
+ .init_early = corenet_ds_init_early,
};
machine_arch_initcall(p3041_ds, corenet_ds_publish_devices);
diff --git a/arch/powerpc/platforms/85xx/p4080_ds.c b/arch/powerpc/platforms/85xx/p4080_ds.c
index 54df106..15be644 100644
--- a/arch/powerpc/platforms/85xx/p4080_ds.c
+++ b/arch/powerpc/platforms/85xx/p4080_ds.c
@@ -79,6 +79,7 @@ define_machine(p4080_ds) {
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
.power_save = e500_idle,
+ .init_early = corenet_ds_init_early,
};
machine_arch_initcall(p4080_ds, corenet_ds_publish_devices);
diff --git a/arch/powerpc/platforms/85xx/p5020_ds.c b/arch/powerpc/platforms/85xx/p5020_ds.c
index 753a42c..7eccc1a 100644
--- a/arch/powerpc/platforms/85xx/p5020_ds.c
+++ b/arch/powerpc/platforms/85xx/p5020_ds.c
@@ -5,8 +5,8 @@
*
* Copyright 2009-2010 Freescale Semiconductor Inc.
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
@@ -89,6 +89,7 @@ define_machine(p5020_ds) {
#else
.power_save = e500_idle,
#endif
+ .init_early = corenet_ds_init_early,
};
machine_arch_initcall(p5020_ds, corenet_ds_publish_devices);
diff --git a/arch/powerpc/platforms/85xx/p5040_ds.c b/arch/powerpc/platforms/85xx/p5040_ds.c
index 1138185..e07fd7b 100644
--- a/arch/powerpc/platforms/85xx/p5040_ds.c
+++ b/arch/powerpc/platforms/85xx/p5040_ds.c
@@ -3,8 +3,8 @@
*
* Copyright 2009-2010 Freescale Semiconductor Inc.
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
@@ -80,6 +80,7 @@ define_machine(p5040_ds) {
#else
.power_save = e500_idle,
#endif
+ .init_early = corenet_ds_init_early,
};
machine_arch_initcall(p5040_ds, corenet_ds_publish_devices);
diff --git a/arch/powerpc/platforms/85xx/t4240_qds.c b/arch/powerpc/platforms/85xx/t4240_qds.c
index 5998e9f..f4a215a 100644
--- a/arch/powerpc/platforms/85xx/t4240_qds.c
+++ b/arch/powerpc/platforms/85xx/t4240_qds.c
@@ -5,8 +5,8 @@
*
* Copyright 2012 Freescale Semiconductor Inc.
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
@@ -89,6 +89,7 @@ define_machine(t4240_qds) {
#else
.power_save = e500_idle,
#endif
+ .init_early = corenet_ds_init_early,
};
machine_arch_initcall(t4240_qds, corenet_ds_publish_devices);