From 990f2f223cb479a15afda9eb8552582aa82e2404 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 15 Apr 2014 15:20:50 +0200 Subject: clk: mmp: stop using platform headers The mmp clock drivers currently hardcode the physical addresses for the clock registers. This is generally a bad idea, and it also gets in the way of multiplatform builds, which make the platform header files inaccessible to device drivers. To work around the header file problem, this patch changes the calling convention so the three mmp clock drivers get initialized with the base addresses as arguments from the platform code. It would still be useful to have a larger rework of the clock drivers, with DT integration to let the clocks actually be probed automatically, and the base addresses passed as DT properties. I am unsure if anyone is still interested in the mmp platform, so it is possible that this won't happen. Signed-off-by: Arnd Bergmann Cc: Mike Turquette Cc: Chao Xie Cc: Eric Miao Cc: Haojian Zhuang --- arch/arm/mach-mmp/clock-mmp2.c | 4 +++- arch/arm/mach-mmp/clock-pxa168.c | 4 +++- arch/arm/mach-mmp/clock-pxa910.c | 4 +++- arch/arm/mach-mmp/common.h | 3 --- arch/arm/mach-mmp/mmp2.c | 5 ++++- arch/arm/mach-mmp/pxa168.c | 5 ++++- arch/arm/mach-mmp/pxa910.c | 6 +++++- drivers/clk/mmp/clk-mmp2.c | 12 ++++++------ drivers/clk/mmp/clk-pxa168.c | 12 ++++++------ drivers/clk/mmp/clk-pxa910.c | 14 +++++++------- include/linux/clk/mmp.h | 17 +++++++++++++++++ 11 files changed, 58 insertions(+), 28 deletions(-) create mode 100644 include/linux/clk/mmp.h diff --git a/arch/arm/mach-mmp/clock-mmp2.c b/arch/arm/mach-mmp/clock-mmp2.c index 53d77cbd6000..6847c49bbb39 100644 --- a/arch/arm/mach-mmp/clock-mmp2.c +++ b/arch/arm/mach-mmp/clock-mmp2.c @@ -4,6 +4,7 @@ #include #include #include +#include #include @@ -105,7 +106,8 @@ static struct clk_lookup mmp2_clkregs[] = { INIT_CLKREG(&clk_sdh3, "sdhci-pxav3.3", "PXA-SDHCLK"), }; -void __init mmp2_clk_init(void) +void __init mmp2_clk_init(phys_addr_t mpmu_phys, phys_addr_t apmu_phys, + phys_addr_t apbc_phys) { clkdev_add_table(ARRAY_AND_SIZE(mmp2_clkregs)); } diff --git a/arch/arm/mach-mmp/clock-pxa168.c b/arch/arm/mach-mmp/clock-pxa168.c index c572f219ae26..bfa54bb16449 100644 --- a/arch/arm/mach-mmp/clock-pxa168.c +++ b/arch/arm/mach-mmp/clock-pxa168.c @@ -4,6 +4,7 @@ #include #include #include +#include #include @@ -85,7 +86,8 @@ static struct clk_lookup pxa168_clkregs[] = { INIT_CLKREG(&clk_rtc, "sa1100-rtc", NULL), }; -void __init pxa168_clk_init(void) +void __init pxa168_clk_init(phys_addr_t mpmu_phys, phys_addr_t apmu_phys, + phys_addr_t apbc_phys) { clkdev_add_table(ARRAY_AND_SIZE(pxa168_clkregs)); } diff --git a/arch/arm/mach-mmp/clock-pxa910.c b/arch/arm/mach-mmp/clock-pxa910.c index 379e1df61c70..ef7d3dbc8731 100644 --- a/arch/arm/mach-mmp/clock-pxa910.c +++ b/arch/arm/mach-mmp/clock-pxa910.c @@ -4,6 +4,7 @@ #include #include #include +#include #include @@ -61,7 +62,8 @@ static struct clk_lookup pxa910_clkregs[] = { INIT_CLKREG(&clk_rtc, "sa1100-rtc", NULL), }; -void __init pxa910_clk_init(void) +void __init pxa910_clk_init(phys_addr_t mpmu_phys, phys_addr_t apmu_phys, + phys_addr_t apbc_phys, phys_addr_t apbcp_phys) { clkdev_add_table(ARRAY_AND_SIZE(pxa910_clkregs)); } diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h index cf445bae6d77..7453a90c34bd 100644 --- a/arch/arm/mach-mmp/common.h +++ b/arch/arm/mach-mmp/common.h @@ -5,6 +5,3 @@ extern void timer_init(int irq); extern void __init mmp_map_io(void); extern void mmp_restart(enum reboot_mode, const char *); -extern void __init pxa168_clk_init(void); -extern void __init pxa910_clk_init(void); -extern void __init mmp2_clk_init(void); diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c index a70b5530bd42..c8914ef21f7f 100644 --- a/arch/arm/mach-mmp/mmp2.c +++ b/arch/arm/mach-mmp/mmp2.c @@ -9,6 +9,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include @@ -111,7 +112,9 @@ static int __init mmp2_init(void) mfp_init_base(MFPR_VIRT_BASE); mfp_init_addr(mmp2_addr_map); pxa_init_dma(IRQ_MMP2_DMA_RIQ, 16); - mmp2_clk_init(); + mmp2_clk_init(APB_PHYS_BASE + 0x50000, + AXI_PHYS_BASE + 0x82800, + APB_PHYS_BASE + 0x15000); } return 0; diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c index 144e997624c0..53f21554ae63 100644 --- a/arch/arm/mach-mmp/pxa168.c +++ b/arch/arm/mach-mmp/pxa168.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -56,7 +57,9 @@ static int __init pxa168_init(void) mfp_init_base(MFPR_VIRT_BASE); mfp_init_addr(pxa168_mfp_addr_map); pxa_init_dma(IRQ_PXA168_DMA_INT0, 32); - pxa168_clk_init(); + pxa168_clk_init(APB_PHYS_BASE + 0x50000, + AXI_PHYS_BASE + 0x82800, + APB_PHYS_BASE + 0x15000); } return 0; diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c index eb57ee196842..545404261327 100644 --- a/arch/arm/mach-mmp/pxa910.c +++ b/arch/arm/mach-mmp/pxa910.c @@ -7,6 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include @@ -97,7 +98,10 @@ static int __init pxa910_init(void) mfp_init_base(MFPR_VIRT_BASE); mfp_init_addr(pxa910_mfp_addr_map); pxa_init_dma(IRQ_PXA910_DMA_INT0, 32); - pxa910_clk_init(); + pxa910_clk_init(APB_PHYS_BASE + 0x50000, + AXI_PHYS_BASE + 0x82800, + APB_PHYS_BASE + 0x15000, + APB_PHYS_BASE + 0x3b000); } return 0; diff --git a/drivers/clk/mmp/clk-mmp2.c b/drivers/clk/mmp/clk-mmp2.c index 09d2832fbd78..38931dbd1eff 100644 --- a/drivers/clk/mmp/clk-mmp2.c +++ b/drivers/clk/mmp/clk-mmp2.c @@ -9,6 +9,7 @@ * warranty of any kind, whether express or implied. */ +#include #include #include #include @@ -16,8 +17,6 @@ #include #include -#include - #include "clk.h" #define APBC_RTC 0x0 @@ -73,7 +72,8 @@ static const char *sdh_parent[] = {"pll1_4", "pll2", "usb_pll", "pll1"}; static const char *disp_parent[] = {"pll1", "pll1_16", "pll2", "vctcxo"}; static const char *ccic_parent[] = {"pll1_2", "pll1_16", "vctcxo"}; -void __init mmp2_clk_init(void) +void __init mmp2_clk_init(phys_addr_t mpmu_phys, phys_addr_t apmu_phys, + phys_addr_t apbc_phys) { struct clk *clk; struct clk *vctcxo; @@ -81,19 +81,19 @@ void __init mmp2_clk_init(void) void __iomem *apmu_base; void __iomem *apbc_base; - mpmu_base = ioremap(APB_PHYS_BASE + 0x50000, SZ_4K); + mpmu_base = ioremap(mpmu_phys, SZ_4K); if (mpmu_base == NULL) { pr_err("error to ioremap MPMU base\n"); return; } - apmu_base = ioremap(AXI_PHYS_BASE + 0x82800, SZ_4K); + apmu_base = ioremap(apmu_phys, SZ_4K); if (apmu_base == NULL) { pr_err("error to ioremap APMU base\n"); return; } - apbc_base = ioremap(APB_PHYS_BASE + 0x15000, SZ_4K); + apbc_base = ioremap(apbc_phys, SZ_4K); if (apbc_base == NULL) { pr_err("error to ioremap APBC base\n"); return; diff --git a/drivers/clk/mmp/clk-pxa168.c b/drivers/clk/mmp/clk-pxa168.c index 93e967c0f972..0dd83fb950c9 100644 --- a/drivers/clk/mmp/clk-pxa168.c +++ b/drivers/clk/mmp/clk-pxa168.c @@ -9,6 +9,7 @@ * warranty of any kind, whether express or implied. */ +#include #include #include #include @@ -16,8 +17,6 @@ #include #include -#include - #include "clk.h" #define APBC_RTC 0x28 @@ -66,7 +65,8 @@ static const char *disp_parent[] = {"pll1_2", "pll1_12"}; static const char *ccic_parent[] = {"pll1_2", "pll1_12"}; static const char *ccic_phy_parent[] = {"pll1_6", "pll1_12"}; -void __init pxa168_clk_init(void) +void __init pxa168_clk_init(phys_addr_t mpmu_phys, phys_addr_t apmu_phys, + phys_addr_t apbc_phys) { struct clk *clk; struct clk *uart_pll; @@ -74,19 +74,19 @@ void __init pxa168_clk_init(void) void __iomem *apmu_base; void __iomem *apbc_base; - mpmu_base = ioremap(APB_PHYS_BASE + 0x50000, SZ_4K); + mpmu_base = ioremap(mpmu_phys, SZ_4K); if (mpmu_base == NULL) { pr_err("error to ioremap MPMU base\n"); return; } - apmu_base = ioremap(AXI_PHYS_BASE + 0x82800, SZ_4K); + apmu_base = ioremap(apmu_phys, SZ_4K); if (apmu_base == NULL) { pr_err("error to ioremap APMU base\n"); return; } - apbc_base = ioremap(APB_PHYS_BASE + 0x15000, SZ_4K); + apbc_base = ioremap(apbc_phys, SZ_4K); if (apbc_base == NULL) { pr_err("error to ioremap APBC base\n"); return; diff --git a/drivers/clk/mmp/clk-pxa910.c b/drivers/clk/mmp/clk-pxa910.c index 993abcdb32cc..e1d2ce22cdf1 100644 --- a/drivers/clk/mmp/clk-pxa910.c +++ b/drivers/clk/mmp/clk-pxa910.c @@ -9,6 +9,7 @@ * warranty of any kind, whether express or implied. */ +#include #include #include #include @@ -16,8 +17,6 @@ #include #include -#include - #include "clk.h" #define APBC_RTC 0x28 @@ -64,7 +63,8 @@ static const char *disp_parent[] = {"pll1_2", "pll1_12"}; static const char *ccic_parent[] = {"pll1_2", "pll1_12"}; static const char *ccic_phy_parent[] = {"pll1_6", "pll1_12"}; -void __init pxa910_clk_init(void) +void __init pxa910_clk_init(phys_addr_t mpmu_phys, phys_addr_t apmu_phys, + phys_addr_t apbc_phys, phys_addr_t apbcp_phys) { struct clk *clk; struct clk *uart_pll; @@ -73,25 +73,25 @@ void __init pxa910_clk_init(void) void __iomem *apbcp_base; void __iomem *apbc_base; - mpmu_base = ioremap(APB_PHYS_BASE + 0x50000, SZ_4K); + mpmu_base = ioremap(mpmu_phys, SZ_4K); if (mpmu_base == NULL) { pr_err("error to ioremap MPMU base\n"); return; } - apmu_base = ioremap(AXI_PHYS_BASE + 0x82800, SZ_4K); + apmu_base = ioremap(apmu_phys, SZ_4K); if (apmu_base == NULL) { pr_err("error to ioremap APMU base\n"); return; } - apbcp_base = ioremap(APB_PHYS_BASE + 0x3b000, SZ_4K); + apbcp_base = ioremap(apbcp_phys, SZ_4K); if (apbcp_base == NULL) { pr_err("error to ioremap APBC extension base\n"); return; } - apbc_base = ioremap(APB_PHYS_BASE + 0x15000, SZ_4K); + apbc_base = ioremap(apbc_phys, SZ_4K); if (apbc_base == NULL) { pr_err("error to ioremap APBC base\n"); return; diff --git a/include/linux/clk/mmp.h b/include/linux/clk/mmp.h new file mode 100644 index 000000000000..607321fa2c2b --- /dev/null +++ b/include/linux/clk/mmp.h @@ -0,0 +1,17 @@ +#ifndef __CLK_MMP_H +#define __CLK_MMP_H + +#include + +extern void pxa168_clk_init(phys_addr_t mpmu_phys, + phys_addr_t apmu_phys, + phys_addr_t apbc_phys); +extern void pxa910_clk_init(phys_addr_t mpmu_phys, + phys_addr_t apmu_phys, + phys_addr_t apbc_phys, + phys_addr_t apbcp_phys); +extern void mmp2_clk_init(phys_addr_t mpmu_phys, + phys_addr_t apmu_phys, + phys_addr_t apbc_phys); + +#endif -- cgit From d33c43ac185e2921e0f541872719588c3d491c60 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 15 Apr 2014 15:38:39 +0200 Subject: ARM: make xscale iwmmxt code multiplatform aware In a multiplatform configuration, we may end up building a kernel for both Marvell PJ1 and an ARMv4 CPU implementation. In that case, the xscale-cp0 code is built with gcc -march=armv4{,t}, which results in a build error from the coprocessor instructions. Since we know this code will only have to run on an actual xscale processor, we can simply build the entire file for ARMv5TE. Related to this, we need to handle the iWMMXT initialization sequence differently during boot, to ensure we don't try to touch xscale specific registers on other CPUs from the xscale_cp0_init initcall. cpu_is_xscale() used to be hardcoded to '1' in any configuration that enables any XScale-compatible core, but this breaks once we can have a combined kernel with MMP1 and something else. In this patch, I replace the existing cpu_is_xscale() macro with a new cpu_is_xscale_family() macro that evaluates true for xscale, xsc3 and mohawk, which makes the behavior more deterministic. The two existing users of cpu_is_xscale() are modified accordingly, but slightly change behavior for kernels that enable CPU_MOHAWK without also enabling CPU_XSCALE or CPU_XSC3. Previously, these would leave leave PMD_BIT4 in the page tables untouched, now they clear it as we've always done for kernels that enable both MOHAWK and the support for the older CPU types. Since the previous behavior was inconsistent, I assume it was unintentional. Signed-off-by: Arnd Bergmann --- arch/arm/include/asm/cputype.h | 22 +++++++++++++++++++--- arch/arm/kernel/xscale-cp0.c | 7 +++++++ arch/arm/mm/idmap.c | 2 +- arch/arm/mm/mmu.c | 2 +- 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h index 85e374f873ac..b23c6c81c9ad 100644 --- a/arch/arm/include/asm/cputype.h +++ b/arch/arm/include/asm/cputype.h @@ -228,10 +228,26 @@ static inline int cpu_is_xsc3(void) } #endif -#if !defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_CPU_XSC3) -#define cpu_is_xscale() 0 +#if !defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_CPU_XSC3) && \ + !defined(CONFIG_CPU_MOHAWK) +#define cpu_is_xscale_family() 0 #else -#define cpu_is_xscale() 1 +static inline int cpu_is_xscale_family(void) +{ + unsigned int id; + id = read_cpuid_id() & 0xffffe000; + + switch (id) { + case 0x69052000: /* Intel XScale 1 */ + case 0x69054000: /* Intel XScale 2 */ + case 0x69056000: /* Intel XScale 3 */ + case 0x56056000: /* Marvell XScale 3 */ + case 0x56158000: /* Marvell Mohawk */ + return 1; + } + + return 0; +} #endif /* diff --git a/arch/arm/kernel/xscale-cp0.c b/arch/arm/kernel/xscale-cp0.c index bdbb8853a19b..77a2eef72115 100644 --- a/arch/arm/kernel/xscale-cp0.c +++ b/arch/arm/kernel/xscale-cp0.c @@ -15,6 +15,9 @@ #include #include #include +#include + +asm(" .arch armv5te\n"); static inline void dsp_save_state(u32 *state) { @@ -152,6 +155,10 @@ static int __init xscale_cp0_init(void) { u32 cp_access; + /* do not attempt to probe iwmmxt on non-xscale family CPUs */ + if (!cpu_is_xscale_family()) + return 0; + cp_access = xscale_cp_access_read() & ~3; xscale_cp_access_write(cp_access | 1); diff --git a/arch/arm/mm/idmap.c b/arch/arm/mm/idmap.c index e7a81cebbb2e..d65909697165 100644 --- a/arch/arm/mm/idmap.c +++ b/arch/arm/mm/idmap.c @@ -86,7 +86,7 @@ static void identity_mapping_add(pgd_t *pgd, const char *text_start, prot |= PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AF; - if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) + if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale_family()) prot |= PMD_BIT4; pgd += pgd_index(addr); diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 4867f5daf82c..e0e911ea32e6 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -477,7 +477,7 @@ static void __init build_mem_type_table(void) * "update-able on write" bit on ARM610). However, Xscale and * Xscale3 require this bit to be cleared. */ - if (cpu_is_xscale() || cpu_is_xsc3()) { + if (cpu_is_xscale_family()) { for (i = 0; i < ARRAY_SIZE(mem_types); i++) { mem_types[i].prot_sect &= ~PMD_BIT4; mem_types[i].prot_l1 &= ~PMD_BIT4; -- cgit From 0f67b876092ae4fabe6ff81a92c785a69edb0022 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Wed, 16 Apr 2014 09:54:02 +0200 Subject: ARM: mohawk: allow building with MMU disabled It is in principle possible to build an MMP kernel for the mohawk CPU with the MMU code disabled, except for one simple build error: proc-mohawk.S:345: Error: invalid operands (*UND* and *UND* sections) for `|' proc-mohawk.S:345: Error: invalid operands (*ABS* and *UND* sections) for `|' proc-mohawk.S:345: Error: invalid operands (*UND* and *UND* sections) for `|' proc-mohawk.S:345: Error: invalid operands (*UND* and *UND* sections) for `|' proc-mohawk.S:345: Error: undefined symbol L_PTE_USER used as an immediate value This patch changes the proc-mohawk code to do the same as the other CPUs and not try to actually do anything for the cpu_mohawk_set_pte_ext function, which won't be used anyway. Signed-off-by: Arnd Bergmann --- arch/arm/mm/proc-mohawk.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mm/proc-mohawk.S b/arch/arm/mm/proc-mohawk.S index d65edf717bf7..6f07d2ef4ff2 100644 --- a/arch/arm/mm/proc-mohawk.S +++ b/arch/arm/mm/proc-mohawk.S @@ -342,11 +342,13 @@ ENTRY(cpu_mohawk_switch_mm) */ .align 5 ENTRY(cpu_mohawk_set_pte_ext) +#ifdef CONFIG_MMU armv3_set_pte_ext mov r0, r0 mcr p15, 0, r0, c7, c10, 1 @ clean D entry mcr p15, 0, r0, c7, c10, 4 @ drain WB ret lr +#endif .globl cpu_mohawk_suspend_size .equ cpu_mohawk_suspend_size, 4 * 6 -- cgit From 74911e3a0eca6b3e03bc0764af9486b783b44ebf Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 15 Apr 2014 17:36:43 +0200 Subject: ARM: mmp: remove remaining legacy pxa-dma support All drivers have stopped using this code, so we can just as well stop initializing it. Signed-off-by: Arnd Bergmann --- arch/arm/mach-mmp/include/mach/dma.h | 13 ------------- arch/arm/mach-mmp/mmp2.c | 2 -- arch/arm/mach-mmp/pxa168.c | 2 -- arch/arm/mach-mmp/pxa910.c | 2 -- arch/arm/plat-pxa/Makefile | 2 +- 5 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 arch/arm/mach-mmp/include/mach/dma.h diff --git a/arch/arm/mach-mmp/include/mach/dma.h b/arch/arm/mach-mmp/include/mach/dma.h deleted file mode 100644 index 1d6914544da4..000000000000 --- a/arch/arm/mach-mmp/include/mach/dma.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * linux/arch/arm/mach-mmp/include/mach/dma.h - */ - -#ifndef __ASM_MACH_DMA_H -#define __ASM_MACH_DMA_H - -#include - -#define DMAC_REGS_VIRT (APB_VIRT_BASE + 0x00000) - -#include -#endif /* __ASM_MACH_DMA_H */ diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c index c8914ef21f7f..82eb53f5136a 100644 --- a/arch/arm/mach-mmp/mmp2.c +++ b/arch/arm/mach-mmp/mmp2.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -111,7 +110,6 @@ static int __init mmp2_init(void) #endif mfp_init_base(MFPR_VIRT_BASE); mfp_init_addr(mmp2_addr_map); - pxa_init_dma(IRQ_MMP2_DMA_RIQ, 16); mmp2_clk_init(APB_PHYS_BASE + 0x50000, AXI_PHYS_BASE + 0x82800, APB_PHYS_BASE + 0x15000); diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c index 53f21554ae63..7367f4b079e4 100644 --- a/arch/arm/mach-mmp/pxa168.c +++ b/arch/arm/mach-mmp/pxa168.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -56,7 +55,6 @@ static int __init pxa168_init(void) if (cpu_is_pxa168()) { mfp_init_base(MFPR_VIRT_BASE); mfp_init_addr(pxa168_mfp_addr_map); - pxa_init_dma(IRQ_PXA168_DMA_INT0, 32); pxa168_clk_init(APB_PHYS_BASE + 0x50000, AXI_PHYS_BASE + 0x82800, APB_PHYS_BASE + 0x15000); diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c index 545404261327..15f7be01fed8 100644 --- a/arch/arm/mach-mmp/pxa910.c +++ b/arch/arm/mach-mmp/pxa910.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -97,7 +96,6 @@ static int __init pxa910_init(void) #endif mfp_init_base(MFPR_VIRT_BASE); mfp_init_addr(pxa910_mfp_addr_map); - pxa_init_dma(IRQ_PXA910_DMA_INT0, 32); pxa910_clk_init(APB_PHYS_BASE + 0x50000, AXI_PHYS_BASE + 0x82800, APB_PHYS_BASE + 0x15000, diff --git a/arch/arm/plat-pxa/Makefile b/arch/arm/plat-pxa/Makefile index 1fc941944912..e507aebbef52 100644 --- a/arch/arm/plat-pxa/Makefile +++ b/arch/arm/plat-pxa/Makefile @@ -2,7 +2,7 @@ # Makefile for code common across different PXA processor families # -obj-y := dma.o +obj-$(CONFIG_ARCH_PXA) := dma.o obj-$(CONFIG_PXA3xx) += mfp.o obj-$(CONFIG_ARCH_MMP) += mfp.o -- cgit From 8bf42cc8888f1475728104d386fc9306b8ef7e3e Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 15 Apr 2014 20:33:14 +0200 Subject: ARM: mmp: make plat-pxa build standalone The ssp.c driver in plat-pxa is the only remaining file including a mach/*.h header from mmp. It actually doesn't need mach/hardware.h at all, so we can remove the #include. Signed-off-by: Arnd Bergmann --- arch/arm/plat-pxa/ssp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c index daa1a65f2eb7..ba13f793fbce 100644 --- a/arch/arm/plat-pxa/ssp.c +++ b/arch/arm/plat-pxa/ssp.c @@ -34,7 +34,6 @@ #include #include -#include static DEFINE_MUTEX(ssp_lock); static LIST_HEAD(ssp_list); -- cgit From b501fd7b1c0f10d3967d3abbd6c9d091b3384999 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 15 Apr 2014 20:38:32 +0200 Subject: ARM: mmp: make all header files local The mach/*.h headers are now inaccessible to any external code, so we can move them all into the mach-mmp directory itself and remove the subdirectories. A few headers are not used at all, so we remove them here. Signed-off-by: Arnd Bergmann --- arch/arm/mach-mmp/addr-map.h | 44 +++ arch/arm/mach-mmp/aspenite.c | 8 +- arch/arm/mach-mmp/avengers_lite.c | 8 +- arch/arm/mach-mmp/brownstone.c | 8 +- arch/arm/mach-mmp/clock-mmp2.c | 2 +- arch/arm/mach-mmp/clock-pxa168.c | 2 +- arch/arm/mach-mmp/clock-pxa910.c | 2 +- arch/arm/mach-mmp/clock.c | 2 +- arch/arm/mach-mmp/clock.h | 2 - arch/arm/mach-mmp/common.c | 4 +- arch/arm/mach-mmp/cputype.h | 55 ++++ arch/arm/mach-mmp/devices.c | 8 +- arch/arm/mach-mmp/devices.h | 56 ++++ arch/arm/mach-mmp/flint.c | 8 +- arch/arm/mach-mmp/gplugd.c | 6 +- arch/arm/mach-mmp/include/mach/addr-map.h | 46 ---- arch/arm/mach-mmp/include/mach/cputype.h | 55 ---- arch/arm/mach-mmp/include/mach/devices.h | 56 ---- arch/arm/mach-mmp/include/mach/hardware.h | 4 - arch/arm/mach-mmp/include/mach/irqs.h | 239 ---------------- arch/arm/mach-mmp/include/mach/mfp-mmp2.h | 395 --------------------------- arch/arm/mach-mmp/include/mach/mfp-pxa168.h | 354 ------------------------ arch/arm/mach-mmp/include/mach/mfp-pxa910.h | 169 ------------ arch/arm/mach-mmp/include/mach/mfp.h | 34 --- arch/arm/mach-mmp/include/mach/mmp2.h | 102 ------- arch/arm/mach-mmp/include/mach/pm-mmp2.h | 61 ----- arch/arm/mach-mmp/include/mach/pm-pxa910.h | 77 ------ arch/arm/mach-mmp/include/mach/pxa168.h | 137 ---------- arch/arm/mach-mmp/include/mach/pxa910.h | 87 ------ arch/arm/mach-mmp/include/mach/regs-apbc.h | 24 -- arch/arm/mach-mmp/include/mach/regs-apmu.h | 33 --- arch/arm/mach-mmp/include/mach/regs-icu.h | 71 ----- arch/arm/mach-mmp/include/mach/regs-smc.h | 37 --- arch/arm/mach-mmp/include/mach/regs-timers.h | 44 --- arch/arm/mach-mmp/include/mach/regs-usb.h | 253 ----------------- arch/arm/mach-mmp/include/mach/teton_bga.h | 27 -- arch/arm/mach-mmp/irqs.h | 239 ++++++++++++++++ arch/arm/mach-mmp/jasper.c | 8 +- arch/arm/mach-mmp/mfp-mmp2.h | 395 +++++++++++++++++++++++++++ arch/arm/mach-mmp/mfp-pxa168.h | 354 ++++++++++++++++++++++++ arch/arm/mach-mmp/mfp-pxa910.h | 169 ++++++++++++ arch/arm/mach-mmp/mfp.h | 34 +++ arch/arm/mach-mmp/mmp2.c | 16 +- arch/arm/mach-mmp/mmp2.h | 103 +++++++ arch/arm/mach-mmp/pm-mmp2.c | 12 +- arch/arm/mach-mmp/pm-mmp2.h | 61 +++++ arch/arm/mach-mmp/pm-pxa910.c | 12 +- arch/arm/mach-mmp/pm-pxa910.h | 77 ++++++ arch/arm/mach-mmp/pxa168.c | 22 +- arch/arm/mach-mmp/pxa168.h | 138 ++++++++++ arch/arm/mach-mmp/pxa910.c | 16 +- arch/arm/mach-mmp/pxa910.h | 88 ++++++ arch/arm/mach-mmp/regs-apbc.h | 22 ++ arch/arm/mach-mmp/regs-apmu.h | 31 +++ arch/arm/mach-mmp/regs-icu.h | 69 +++++ arch/arm/mach-mmp/regs-timers.h | 42 +++ arch/arm/mach-mmp/regs-usb.h | 253 +++++++++++++++++ arch/arm/mach-mmp/tavorevb.c | 8 +- arch/arm/mach-mmp/teton_bga.c | 10 +- arch/arm/mach-mmp/teton_bga.h | 25 ++ arch/arm/mach-mmp/time.c | 11 +- arch/arm/mach-mmp/ttc_dkb.c | 10 +- 62 files changed, 2346 insertions(+), 2399 deletions(-) create mode 100644 arch/arm/mach-mmp/addr-map.h create mode 100644 arch/arm/mach-mmp/cputype.h create mode 100644 arch/arm/mach-mmp/devices.h delete mode 100644 arch/arm/mach-mmp/include/mach/addr-map.h delete mode 100644 arch/arm/mach-mmp/include/mach/cputype.h delete mode 100644 arch/arm/mach-mmp/include/mach/devices.h delete mode 100644 arch/arm/mach-mmp/include/mach/hardware.h delete mode 100644 arch/arm/mach-mmp/include/mach/irqs.h delete mode 100644 arch/arm/mach-mmp/include/mach/mfp-mmp2.h delete mode 100644 arch/arm/mach-mmp/include/mach/mfp-pxa168.h delete mode 100644 arch/arm/mach-mmp/include/mach/mfp-pxa910.h delete mode 100644 arch/arm/mach-mmp/include/mach/mfp.h delete mode 100644 arch/arm/mach-mmp/include/mach/mmp2.h delete mode 100644 arch/arm/mach-mmp/include/mach/pm-mmp2.h delete mode 100644 arch/arm/mach-mmp/include/mach/pm-pxa910.h delete mode 100644 arch/arm/mach-mmp/include/mach/pxa168.h delete mode 100644 arch/arm/mach-mmp/include/mach/pxa910.h delete mode 100644 arch/arm/mach-mmp/include/mach/regs-apbc.h delete mode 100644 arch/arm/mach-mmp/include/mach/regs-apmu.h delete mode 100644 arch/arm/mach-mmp/include/mach/regs-icu.h delete mode 100644 arch/arm/mach-mmp/include/mach/regs-smc.h delete mode 100644 arch/arm/mach-mmp/include/mach/regs-timers.h delete mode 100644 arch/arm/mach-mmp/include/mach/regs-usb.h delete mode 100644 arch/arm/mach-mmp/include/mach/teton_bga.h create mode 100644 arch/arm/mach-mmp/irqs.h create mode 100644 arch/arm/mach-mmp/mfp-mmp2.h create mode 100644 arch/arm/mach-mmp/mfp-pxa168.h create mode 100644 arch/arm/mach-mmp/mfp-pxa910.h create mode 100644 arch/arm/mach-mmp/mfp.h create mode 100644 arch/arm/mach-mmp/mmp2.h create mode 100644 arch/arm/mach-mmp/pm-mmp2.h create mode 100644 arch/arm/mach-mmp/pm-pxa910.h create mode 100644 arch/arm/mach-mmp/pxa168.h create mode 100644 arch/arm/mach-mmp/pxa910.h create mode 100644 arch/arm/mach-mmp/regs-apbc.h create mode 100644 arch/arm/mach-mmp/regs-apmu.h create mode 100644 arch/arm/mach-mmp/regs-icu.h create mode 100644 arch/arm/mach-mmp/regs-timers.h create mode 100644 arch/arm/mach-mmp/regs-usb.h create mode 100644 arch/arm/mach-mmp/teton_bga.h diff --git a/arch/arm/mach-mmp/addr-map.h b/arch/arm/mach-mmp/addr-map.h new file mode 100644 index 000000000000..2739d27bc89d --- /dev/null +++ b/arch/arm/mach-mmp/addr-map.h @@ -0,0 +1,44 @@ +/* + * Common address map definitions + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ASM_MACH_ADDR_MAP_H +#define __ASM_MACH_ADDR_MAP_H + +/* APB - Application Subsystem Peripheral Bus + * + * NOTE: the DMA controller registers are actually on the AXI fabric #1 + * slave port to AHB/APB bridge, due to its close relationship to those + * peripherals on APB, let's count it into the ABP mapping area. + */ +#define APB_PHYS_BASE 0xd4000000 +#define APB_VIRT_BASE IOMEM(0xfe000000) +#define APB_PHYS_SIZE 0x00200000 + +#define AXI_PHYS_BASE 0xd4200000 +#define AXI_VIRT_BASE IOMEM(0xfe200000) +#define AXI_PHYS_SIZE 0x00200000 + +/* Static Memory Controller - Chip Select 0 and 1 */ +#define SMC_CS0_PHYS_BASE 0x80000000 +#define SMC_CS0_PHYS_SIZE 0x10000000 +#define SMC_CS1_PHYS_BASE 0x90000000 +#define SMC_CS1_PHYS_SIZE 0x10000000 + +#define APMU_VIRT_BASE (AXI_VIRT_BASE + 0x82800) +#define APMU_REG(x) (APMU_VIRT_BASE + (x)) + +#define APBC_VIRT_BASE (APB_VIRT_BASE + 0x015000) +#define APBC_REG(x) (APBC_VIRT_BASE + (x)) + +#define MPMU_VIRT_BASE (APB_VIRT_BASE + 0x50000) +#define MPMU_REG(x) (MPMU_VIRT_BASE + (x)) + +#define CIU_VIRT_BASE (AXI_VIRT_BASE + 0x82c00) +#define CIU_REG(x) (CIU_VIRT_BASE + (x)) + +#endif /* __ASM_MACH_ADDR_MAP_H */ diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c index 7e0248582efd..5db0edf716dd 100644 --- a/arch/arm/mach-mmp/aspenite.c +++ b/arch/arm/mach-mmp/aspenite.c @@ -22,14 +22,14 @@ #include #include -#include -#include -#include -#include #include