qe_common: add qe common functions to qe_common.c
Subsystems (7)
PATCH 2/3 qe_common: add qe common functions to qe_common.c
qe need to call some common functions, move them into public directory, add a new file drivers/soc/qe/qe_common.c for them.
--- drivers/soc/qe/Makefile | 2 +- drivers/soc/qe/qe_common.c | 185 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/fsl/qe.h | 52 +++++++++++-- 3 files changed, 230 insertions(+), 9 deletions(-) create mode 100644 drivers/soc/qe/qe_common.c
drivers/soc/qe/Makefile +1 -1
@@ -1,7 +1,7 @@ # # Makefile for the linux ppc-specific parts of QE # -obj-$(CONFIG_QUICC_ENGINE)+= qe.o qe_ic.o qe_io.o +obj-$(CONFIG_QUICC_ENGINE)+= qe.o qe_ic.o qe_io.o qe_common.o obj-$(CONFIG_UCC) += ucc.o obj-$(CONFIG_UCC_SLOW) += ucc_slow.o
drivers/soc/qe/qe_common.c new file +185 -0
185 lines not on this page · raw message
include/linux/fsl/qe.h +44 -8
64 lines not on this page · raw message
Signature · 1 line
2.1.0.27.g96db324
PATCH 3/3 rheap: move rheap.c from arch/powerpc/lib/ to lib/
qe need to use the rheap, so move it to public directory.
---
arch/powerpc/Kconfig | 3 ---
arch/powerpc/include/asm/fsl_85xx_cache_sram.h | 2 +-
arch/powerpc/lib/Makefile | 2 --
arch/powerpc/platforms/44x/Kconfig | 2 +-
arch/powerpc/platforms/85xx/Kconfig | 2 +-
arch/powerpc/platforms/Kconfig | 2 +-
arch/powerpc/platforms/Kconfig.cputype | 2 +-
arch/powerpc/sysdev/cpm1.c | 2 +-
arch/powerpc/sysdev/cpm2.c | 2 +-
arch/powerpc/sysdev/cpm_common.c | 2 +-
arch/powerpc/sysdev/ppc4xx_ocm.c | 2 +-
drivers/dma/bestcomm/Kconfig | 2 +-
drivers/soc/qe/Kconfig | 2 +-
drivers/soc/qe/qe.c | 2 +-
drivers/soc/qe/qe_common.c | 2 +-
drivers/video/Kconfig | 2 +-
include/linux/fsl/bestcomm/sram.h | 2 +-
{arch/powerpc/include/asm => include/linux/fsl}/rheap.h | 0
lib/Kconfig | 3 +++
lib/Makefile | 2 ++
{arch/powerpc/lib => lib}/rheap.c | 2 +-
21 files changed, 21 insertions(+), 21 deletions(-)
rename {arch/powerpc/include/asm => include/linux/fsl}/rheap.h (100%)
rename {arch/powerpc/lib => lib}/rheap.c (99%)arch/powerpc/Kconfig +0 -3
@@ -1046,7 +1046,4 @@ config PPC_CLOCK default n select HAVE_CLK -config PPC_LIB_RHEAP - bool - source "arch/powerpc/kvm/Kconfig"
arch/powerpc/include/asm/fsl_85xx_cache_sram.h +1 -1
@@ -26,7 +26,7 @@#ifndef __ASM_POWERPC_FSL_85XX_CACHE_SRAM_H__#define __ASM_POWERPC_FSL_85XX_CACHE_SRAM_H__ -#include <asm/rheap.h> +#include <linux/fsl/rheap.h> #include <linux/spinlock.h> /*
arch/powerpc/lib/Makefile +0 -2
@@ -26,8 +26,6 @@ obj-$(CONFIG_SMP) += locks.o obj-$(CONFIG_ALTIVEC) += vmx-helper.o endif -obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o - obj-y += code-patching.o obj-y += feature-fixups.o obj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o
arch/powerpc/platforms/44x/Kconfig +1 -1
@@ -254,7 +254,7 @@ config PPC4xx_GPIO config PPC4xx_OCM bool "PPC4xx On Chip Memory (OCM) support" depends on 4xx - select PPC_LIB_RHEAP + select LIB_RHEAP help Enable OCM support for PowerPC 4xx platforms with on chip memory, OCM provides the fast place for memory access to improve performance.
arch/powerpc/platforms/85xx/Kconfig +1 -1
@@ -19,7 +19,7 @@ if PPC32 config FSL_85XX_CACHE_SRAM bool "Freescale l2cache sram support" - select PPC_LIB_RHEAP + select LIB_RHEAP help When selected, this option enables cache-sram support for memory allocation on P1/P2 QorIQ platforms.
arch/powerpc/platforms/Kconfig +1 -1
@@ -282,7 +282,7 @@ config CPM2 bool "Enable support for the CPM2 (Communications Processor Module)" depends on (FSL_SOC_BOOKE && PPC32) || 8260 select CPM - select PPC_LIB_RHEAP + select LIB_RHEAP select PPC_PCI_CHOICE select ARCH_REQUIRE_GPIOLIB help
arch/powerpc/platforms/Kconfig.cputype +1 -1
@@ -33,7 +33,7 @@ config PPC_8xx bool "Freescale 8xx" select FSL_SOC select 8xx - select PPC_LIB_RHEAP + select LIB_RHEAP config 40x bool "AMCC 40x"
arch/powerpc/sysdev/cpm1.c +1 -1
@@ -38,7 +38,7 @@#include <asm/cpm1.h> #include <asm/io.h> #include <asm/tlbflush.h> -#include <asm/rheap.h> +#include <linux/fsl/rheap.h> #include <asm/prom.h> #include <asm/cpm.h>
arch/powerpc/sysdev/cpm2.c +1 -1
@@ -41,7 +41,7 @@#include <asm/page.h> #include <asm/pgtable.h> #include <asm/cpm2.h> -#include <asm/rheap.h> +#include <linux/fsl/rheap.h> #include <asm/fs_pd.h> #include <sysdev/fsl_soc.h>
arch/powerpc/sysdev/cpm_common.c +1 -1
@@ -26,7 +26,7 @@#include <asm/udbg.h> #include <asm/io.h> -#include <asm/rheap.h> +#include <linux/fsl/rheap.h> #include <asm/cpm.h> #include <mm/mmu_decl.h>
arch/powerpc/sysdev/ppc4xx_ocm.c +1 -1
@@ -26,7 +26,7 @@#include <linux/kernel.h> #include <linux/dma-mapping.h> #include <linux/of.h> -#include <asm/rheap.h> +#include <linux/fsl/rheap.h> #include <asm/ppc4xx_ocm.h> #include <linux/slab.h> #include <linux/debugfs.h>
drivers/dma/bestcomm/Kconfig +1 -1
@@ -6,7 +6,7 @@ config PPC_BESTCOMM tristate "Bestcomm DMA engine support" depends on PPC_MPC52xx default n - select PPC_LIB_RHEAP + select LIB_RHEAP help BestComm is the name of the communication coprocessor found on the Freescale MPC5200 family of processor. Its usage is
drivers/soc/qe/Kconfig +1 -1
@@ -5,7 +5,7 @@ config QUICC_ENGINE bool "Freescale QUICC Engine (QE) Support" depends on FSL_SOC && (PPC32 || PPC64) - select PPC_LIB_RHEAP + select LIB_RHEAP select CRC32 ---help--- The QUICC Engine (QE) is a new generation of communications
drivers/soc/qe/qe.c +1 -1
@@ -36,7 +36,7 @@#include <linux/fsl/immap_qe.h> #include <linux/fsl/qe.h> #include <asm/prom.h> -#include <asm/rheap.h> +#include <linux/fsl/rheap.h> static void qe_snums_init (void );static int qe_sdma_init (void );
drivers/soc/qe/qe_common.c +1 -1
@@ -26,7 +26,7 @@#include <linux/slab.h> #include <asm/io.h> -#include <asm/rheap.h> +#include <linux/fsl/rheap.h> #include <linux/fsl/qe.h> static spinlock_t qe_muram_lock;
drivers/video/Kconfig +1 -1
@@ -1972,7 +1972,7 @@ config FB_FSL_DIU select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT - select PPC_LIB_RHEAP + select LIB_RHEAP ---help--- Framebuffer driver for the Freescale SoC DIU
include/linux/fsl/bestcomm/sram.h +1 -1
@@ -12,7 +12,7 @@#ifndef __BESTCOMM_SRAM_H__#define __BESTCOMM_SRAM_H__ -#include <asm/rheap.h> +#include <linux/fsl/rheap.h> #include <asm/mmu.h> #include <linux/spinlock.h>
include/linux/fsl/rheap.h renamed from arch/powerpc/include/asm/rheap.h +0 -0
lib/Kconfig +3 -0
@@ -365,6 +365,9 @@ config CPU_RMAP bool depends on SMP +config LIB_RHEAP + bool + config DQL bool
lib/Makefile +2 -0
@@ -194,3 +194,5 @@ quiet_cmd_build_OID_registry = GEN $@ clean-files += oid_registry_data.c obj-$(CONFIG_UCS2_STRING) += ucs2_string.o + +obj-$(CONFIG_LIB_RHEAP) += rheap.o
lib/rheap.c renamed from arch/powerpc/lib/rheap.c +1 -1
@@ -20,7 +20,7 @@#include <linux/err.h> #include <linux/slab.h> -#include <asm/rheap.h> +#include <linux/fsl/rheap.h> /* * Fixup a list_head, needed when copying lists. If the pointers fall
Signature · 1 line
2.1.0.27.g96db324
Re: [PATCH 3/3] rheap: move rheap.c from arch/powerpc/lib/ to lib/
Quoted 21 lines · Zhao Qiang
qe need to use the rheap, so move it to public directory. =20
Signed-off-by Zhao Qiang <[email protected]>---
arch/powerpc/Kconfig | 3 --- arch/powerpc/include/asm/fsl_85xx_cache_sram.h | 2 +- arch/powerpc/lib/Makefile | 2 -- arch/powerpc/platforms/44x/Kconfig | 2 +- arch/powerpc/platforms/85xx/Kconfig | 2 +- arch/powerpc/platforms/Kconfig | 2 +- arch/powerpc/platforms/Kconfig.cputype | 2 +- arch/powerpc/sysdev/cpm1.c | 2 +- arch/powerpc/sysdev/cpm2.c | 2 +- arch/powerpc/sysdev/cpm_common.c | 2 +- arch/powerpc/sysdev/ppc4xx_ocm.c | 2 +- drivers/dma/bestcomm/Kconfig | 2 +- drivers/soc/qe/Kconfig | 2 +- drivers/soc/qe/qe.c | 2 +- drivers/soc/qe/qe_common.c | 2 +- drivers/video/Kconfig | 2 +- include/linux/fsl/bestcomm/sram.h | 2 +-
Quoted 6 lines
{
arch/powerpc/include/asm=3D>include/linux/fsl}/rheap.h| 0
lib/Kconfig | 3 +++
lib/Makefile | 2 ++
{arch/powerpc/lib=3D>lib}/rheap.c| 2 +-21 files changed, 21 insertions(+), 21 deletions(-)rename {
arch/powerpc/include/asm=3D>include/linux/fsl}/rheap.h=
(100%)
Quoted 1 line
rename {
arch/powerpc/lib=3D>lib}/rheap.c(99%)
Have you guys looked at moving to lib/genalloc.c. If we are going to = keep rheap around the include should be just in include/linux/rheap.h = not include/linux/fsl/rheap.h
However, I think genalloc should be used and kill off rheap usage.
- k=
Quoted 11 lines · Zhao Qiang
qe need to call some common functions, move them into public directory, add a new file
drivers/soc/qe/qe_common.cfor them.Signed-off-by Zhao Qiang <[email protected]>--- drivers/soc/qe/Makefile | 2 +- drivers/soc/qe/qe_common.c | 185 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/fsl/qe.h | 52 +++++++++++-- 3 files changed, 230 insertions(+), 9 deletions(-) create mode 100644 drivers/soc/qe/qe_common.c
I see code being copied, not moved.
Where is patch 1/3?
-Scott