aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuslan V. Sushko <rsushko@ru.mvista.com>2007-04-06 10:00:31 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-04-21 15:51:55 -0400
commit45fba0846f5a5a48ed3c394aa4f8ca93699e7655 (patch)
tree9c5b34c26fbb3364f2cb4dc80501abaf31458a1b
parent25735d10ba477d5128b1e5ccef42062bea429075 (diff)
[ARM] 4311/1: ixp4xx: add KIXRP435 platform
Add Intel KIXRP435 Reference Platform based on IXP43x processor. Fixed after review : access to cp15 removed in identification functions, used access to global processor_id instead Signed-off-by: Vladimir Barinov <vbarinov@ru.mvista.com> Signed-off-by: Ruslan Sushko <rsushko@ru.mvista.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/configs/ixp4xx_defconfig2
-rw-r--r--arch/arm/mach-ixp4xx/Kconfig13
-rw-r--r--arch/arm/mach-ixp4xx/common-pci.c4
-rw-r--r--arch/arm/mach-ixp4xx/common.c6
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-pci.c2
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-setup.c18
-rw-r--r--arch/arm/mm/proc-xscale.S28
-rw-r--r--include/asm-arm/arch-ixp4xx/entry-macro.S4
-rw-r--r--include/asm-arm/arch-ixp4xx/hardware.h4
-rw-r--r--include/asm-arm/arch-ixp4xx/io.h2
-rw-r--r--include/asm-arm/arch-ixp4xx/irqs.h6
-rw-r--r--include/asm-arm/arch-ixp4xx/ixp4xx-regs.h36
12 files changed, 106 insertions, 19 deletions
diff --git a/arch/arm/configs/ixp4xx_defconfig b/arch/arm/configs/ixp4xx_defconfig
index fabf74c51a88..db850a5689eb 100644
--- a/arch/arm/configs/ixp4xx_defconfig
+++ b/arch/arm/configs/ixp4xx_defconfig
@@ -117,11 +117,13 @@ CONFIG_ARCH_ADI_COYOTE=y
117CONFIG_ARCH_IXDP425=y 117CONFIG_ARCH_IXDP425=y
118CONFIG_MACH_IXDPG425=y 118CONFIG_MACH_IXDPG425=y
119CONFIG_MACH_IXDP465=y 119CONFIG_MACH_IXDP465=y
120CONFIG_MACH_KIXRP435=y
120CONFIG_ARCH_IXCDP1100=y 121CONFIG_ARCH_IXCDP1100=y
121CONFIG_ARCH_PRPMC1100=y 122CONFIG_ARCH_PRPMC1100=y
122CONFIG_MACH_NAS100D=y 123CONFIG_MACH_NAS100D=y
123CONFIG_ARCH_IXDP4XX=y 124CONFIG_ARCH_IXDP4XX=y
124CONFIG_CPU_IXP46X=y 125CONFIG_CPU_IXP46X=y
126CONFIG_CPU_IXP43X=y
125# CONFIG_MACH_GTWX5715 is not set 127# CONFIG_MACH_GTWX5715 is not set
126 128
127# 129#
diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig
index 8a339cdfe222..dd0fb7239a80 100644
--- a/arch/arm/mach-ixp4xx/Kconfig
+++ b/arch/arm/mach-ixp4xx/Kconfig
@@ -62,6 +62,12 @@ config MACH_IXDP465
62 IXDP465 Development Platform (Also known as BMP). 62 IXDP465 Development Platform (Also known as BMP).
63 For more information on this platform, see <file:Documentation/arm/IXP4xx>. 63 For more information on this platform, see <file:Documentation/arm/IXP4xx>.
64 64
65config MACH_KIXRP435
66 bool "KIXRP435"
67 help
68 Say 'Y' here if you want your kernel to support Intel's
69 KIXRP435 Reference Platform.
70 For more information on this platform, see <file:Documentation/arm/IXP4xx>.
65 71
66# 72#
67# IXCDP1100 is the exact same HW as IXDP425, but with a different machine 73# IXCDP1100 is the exact same HW as IXDP425, but with a different machine
@@ -94,7 +100,7 @@ config MACH_NAS100D
94# 100#
95config ARCH_IXDP4XX 101config ARCH_IXDP4XX
96 bool 102 bool
97 depends on ARCH_IXDP425 || MACH_IXDP465 103 depends on ARCH_IXDP425 || MACH_IXDP465 || MACH_KIXRP435
98 default y 104 default y
99 105
100# 106#
@@ -105,6 +111,11 @@ config CPU_IXP46X
105 depends on MACH_IXDP465 111 depends on MACH_IXDP465
106 default y 112 default y
107 113
114config CPU_IXP43X
115 bool
116 depends on MACH_KIXRP435
117 default y
118
108config MACH_GTWX5715 119config MACH_GTWX5715
109 bool "Gemtek WX5715 (Linksys WRV54G)" 120 bool "Gemtek WX5715 (Linksys WRV54G)"
110 depends on ARCH_IXP4XX 121 depends on ARCH_IXP4XX
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
index 9562177b5fe1..bf04121d1a31 100644
--- a/arch/arm/mach-ixp4xx/common-pci.c
+++ b/arch/arm/mach-ixp4xx/common-pci.c
@@ -374,7 +374,7 @@ void __init ixp4xx_pci_preinit(void)
374 * Determine which PCI read method to use. 374 * Determine which PCI read method to use.
375 * Rev 0 IXP425 requires workaround. 375 * Rev 0 IXP425 requires workaround.
376 */ 376 */
377 if (!(processor_id & 0xf) && !cpu_is_ixp46x()) { 377 if (!(processor_id & 0xf) && cpu_is_ixp42x()) {
378 printk("PCI: IXP42x A0 silicon detected - " 378 printk("PCI: IXP42x A0 silicon detected - "
379 "PCI Non-Prefetch Workaround Enabled\n"); 379 "PCI Non-Prefetch Workaround Enabled\n");
380 ixp4xx_pci_read = ixp4xx_pci_read_errata; 380 ixp4xx_pci_read = ixp4xx_pci_read_errata;
@@ -480,7 +480,7 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys)
480 res[0].flags = IORESOURCE_IO; 480 res[0].flags = IORESOURCE_IO;
481 481
482 res[1].name = "PCI Memory Space"; 482 res[1].name = "PCI Memory Space";
483 res[1].start = 0x48000000; 483 res[1].start = PCIBIOS_MIN_MEM;
484#ifndef CONFIG_IXP4XX_INDIRECT_PCI 484#ifndef CONFIG_IXP4XX_INDIRECT_PCI
485 res[1].end = 0x4bffffff; 485 res[1].end = 0x4bffffff;
486#else 486#else
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 39f2eeb219b4..030dd75d053a 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -192,7 +192,7 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type)
192 192
193static void ixp4xx_irq_mask(unsigned int irq) 193static void ixp4xx_irq_mask(unsigned int irq)
194{ 194{
195 if (cpu_is_ixp46x() && irq >= 32) 195 if ((cpu_is_ixp46x() || cpu_is_ixp43x()) && irq >= 32)
196 *IXP4XX_ICMR2 &= ~(1 << (irq - 32)); 196 *IXP4XX_ICMR2 &= ~(1 << (irq - 32));
197 else 197 else
198 *IXP4XX_ICMR &= ~(1 << irq); 198 *IXP4XX_ICMR &= ~(1 << irq);
@@ -215,7 +215,7 @@ static void ixp4xx_irq_unmask(unsigned int irq)
215 if (!(ixp4xx_irq_edge & (1 << irq))) 215 if (!(ixp4xx_irq_edge & (1 << irq)))
216 ixp4xx_irq_ack(irq); 216 ixp4xx_irq_ack(irq);
217 217
218 if (cpu_is_ixp46x() && irq >= 32) 218 if ((cpu_is_ixp46x() || cpu_is_ixp43x()) && irq >= 32)
219 *IXP4XX_ICMR2 |= (1 << (irq - 32)); 219 *IXP4XX_ICMR2 |= (1 << (irq - 32));
220 else 220 else
221 *IXP4XX_ICMR |= (1 << irq); 221 *IXP4XX_ICMR |= (1 << irq);
@@ -239,7 +239,7 @@ void __init ixp4xx_init_irq(void)
239 /* Disable all interrupt */ 239 /* Disable all interrupt */
240 *IXP4XX_ICMR = 0x0; 240 *IXP4XX_ICMR = 0x0;
241 241
242 if (cpu_is_ixp46x()) { 242 if (cpu_is_ixp46x() || cpu_is_ixp43x()) {
243 /* Route upper 32 sources to IRQ instead of FIQ */ 243 /* Route upper 32 sources to IRQ instead of FIQ */
244 *IXP4XX_ICLR2 = 0x00; 244 *IXP4XX_ICLR2 = 0x00;
245 245
diff --git a/arch/arm/mach-ixp4xx/ixdp425-pci.c b/arch/arm/mach-ixp4xx/ixdp425-pci.c
index 99c1dc8033c8..408796004812 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-pci.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-pci.c
@@ -66,7 +66,7 @@ struct hw_pci ixdp425_pci __initdata = {
66int __init ixdp425_pci_init(void) 66int __init ixdp425_pci_init(void)
67{ 67{
68 if (machine_is_ixdp425() || machine_is_ixcdp1100() || 68 if (machine_is_ixdp425() || machine_is_ixcdp1100() ||
69 machine_is_ixdp465()) 69 machine_is_ixdp465() || machine_is_kixrp435())
70 pci_common_init(&ixdp425_pci); 70 pci_common_init(&ixdp425_pci);
71 return 0; 71 return 0;
72} 72}
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
index 04b1d56396a0..ec4f07950ec6 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -115,6 +115,11 @@ static void __init ixdp425_init(void)
115 ixdp425_flash_resource.end = 115 ixdp425_flash_resource.end =
116 IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1; 116 IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
117 117
118 if (cpu_is_ixp43x()) {
119 ixdp425_uart.num_resources = 1;
120 ixdp425_uart_data[1].flags = 0;
121 }
122
118 platform_add_devices(ixdp425_devices, ARRAY_SIZE(ixdp425_devices)); 123 platform_add_devices(ixdp425_devices, ARRAY_SIZE(ixdp425_devices));
119} 124}
120 125
@@ -156,3 +161,16 @@ MACHINE_START(IXCDP1100, "Intel IXCDP1100 Development Platform")
156 .init_machine = ixdp425_init, 161 .init_machine = ixdp425_init,
157MACHINE_END 162MACHINE_END
158#endif 163#endif
164
165#ifdef CONFIG_MACH_KIXRP435
166MACHINE_START(KIXRP435, "Intel KIXRP435 Reference Platform")
167 /* Maintainer: MontaVista Software, Inc. */
168 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
169 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
170 .map_io = ixp4xx_map_io,
171 .init_irq = ixp4xx_init_irq,
172 .timer = &ixp4xx_timer,
173 .boot_params = 0x0100,
174 .init_machine = ixdp425_init,
175MACHINE_END
176#endif
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S
index d29fe927ee9e..c156ddab9a2d 100644
--- a/arch/arm/mm/proc-xscale.S
+++ b/arch/arm/mm/proc-xscale.S
@@ -584,6 +584,11 @@ cpu_ixp42x_name:
584 .asciz "XScale-IXP42x Family" 584 .asciz "XScale-IXP42x Family"
585 .size cpu_ixp42x_name, . - cpu_ixp42x_name 585 .size cpu_ixp42x_name, . - cpu_ixp42x_name
586 586
587 .type cpu_ixp43x_name, #object
588cpu_ixp43x_name:
589 .asciz "XScale-IXP43x Family"
590 .size cpu_ixp43x_name, . - cpu_ixp43x_name
591
587 .type cpu_ixp46x_name, #object 592 .type cpu_ixp46x_name, #object
588cpu_ixp46x_name: 593cpu_ixp46x_name:
589 .asciz "XScale-IXP46x Family" 594 .asciz "XScale-IXP46x Family"
@@ -843,6 +848,29 @@ __ixp42x_proc_info:
843 .long xscale_cache_fns 848 .long xscale_cache_fns
844 .size __ixp42x_proc_info, . - __ixp42x_proc_info 849 .size __ixp42x_proc_info, . - __ixp42x_proc_info
845 850
851 .type __ixp43x_proc_info, #object
852__ixp43x_proc_info:
853 .long 0x69054040
854 .long 0xfffffff0
855 .long PMD_TYPE_SECT | \
856 PMD_SECT_BUFFERABLE | \
857 PMD_SECT_CACHEABLE | \
858 PMD_SECT_AP_WRITE | \
859 PMD_SECT_AP_READ
860 .long PMD_TYPE_SECT | \
861 PMD_SECT_AP_WRITE | \
862 PMD_SECT_AP_READ
863 b __xscale_setup
864 .long cpu_arch_name
865 .long cpu_elf_name
866 .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
867 .long cpu_ixp43x_name
868 .long xscale_processor_functions
869 .long v4wbi_tlb_fns
870 .long xscale_mc_user_fns
871 .long xscale_cache_fns
872 .size __ixp43x_proc_info, . - __ixp43x_proc_info
873
846 .type __ixp46x_proc_info, #object 874 .type __ixp46x_proc_info, #object
847__ixp46x_proc_info: 875__ixp46x_proc_info:
848 .long 0x69054200 876 .long 0x69054200
diff --git a/include/asm-arm/arch-ixp4xx/entry-macro.S b/include/asm-arm/arch-ixp4xx/entry-macro.S
index dadb568b7ef0..f144a005ed95 100644
--- a/include/asm-arm/arch-ixp4xx/entry-macro.S
+++ b/include/asm-arm/arch-ixp4xx/entry-macro.S
@@ -31,9 +31,9 @@
31 31
321001: 321001:
33 /* 33 /*
34 * IXP465 has an upper IRQ status register 34 * IXP465/IXP435 has an upper IRQ status register
35 */ 35 */
36#if defined(CONFIG_CPU_IXP46X) 36#if defined(CONFIG_CPU_IXP46X) || defined(CONFIG_CPU_IXP43X)
37 ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP2_OFFSET) 37 ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP2_OFFSET)
38 ldr \irqstat, [\irqstat] @ get upper interrupts 38 ldr \irqstat, [\irqstat] @ get upper interrupts
39 mov \irqnr, #63 39 mov \irqnr, #63
diff --git a/include/asm-arm/arch-ixp4xx/hardware.h b/include/asm-arm/arch-ixp4xx/hardware.h
index 88fd0877dcc1..24bc5883fa56 100644
--- a/include/asm-arm/arch-ixp4xx/hardware.h
+++ b/include/asm-arm/arch-ixp4xx/hardware.h
@@ -17,8 +17,8 @@
17#ifndef __ASM_ARCH_HARDWARE_H__ 17#ifndef __ASM_ARCH_HARDWARE_H__
18#define __ASM_ARCH_HARDWARE_H__ 18#define __ASM_ARCH_HARDWARE_H__
19 19
20#define PCIBIOS_MIN_IO 0x00001000 20#define PCIBIOS_MIN_IO 0x00001000
21#define PCIBIOS_MIN_MEM 0x48000000 21#define PCIBIOS_MIN_MEM (cpu_is_ixp43x() ? 0x40000000 : 0x48000000)
22 22
23/* 23/*
24 * We override the standard dma-mask routines for bouncing. 24 * We override the standard dma-mask routines for bouncing.
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h
index a41ba229c564..b8b3cbcd2d3a 100644
--- a/include/asm-arm/arch-ixp4xx/io.h
+++ b/include/asm-arm/arch-ixp4xx/io.h
@@ -61,7 +61,7 @@ extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data);
61static inline void __iomem * 61static inline void __iomem *
62__ixp4xx_ioremap(unsigned long addr, size_t size, unsigned long flags) 62__ixp4xx_ioremap(unsigned long addr, size_t size, unsigned long flags)
63{ 63{
64 if((addr < 0x48000000) || (addr > 0x4fffffff)) 64 if((addr < PCIBIOS_MIN_MEM) || (addr > 0x4fffffff))
65 return __ioremap(addr, size, flags); 65 return __ioremap(addr, size, flags);
66 66
67 return (void *)addr; 67 return (void *)addr;
diff --git a/include/asm-arm/arch-ixp4xx/irqs.h b/include/asm-arm/arch-ixp4xx/irqs.h
index e44a563d00ff..73a9aa583745 100644
--- a/include/asm-arm/arch-ixp4xx/irqs.h
+++ b/include/asm-arm/arch-ixp4xx/irqs.h
@@ -62,10 +62,10 @@
62/* 62/*
63 * Only first 32 sources are valid if running on IXP42x systems 63 * Only first 32 sources are valid if running on IXP42x systems
64 */ 64 */
65#ifndef CONFIG_CPU_IXP46X 65#if defined(CONFIG_CPU_IXP46X) || defined(CONFIG_CPU_IXP43X)
66#define NR_IRQS 32
67#else
68#define NR_IRQS 64 66#define NR_IRQS 64
67#else
68#define NR_IRQS 32
69#endif 69#endif
70 70
71#define XSCALE_PMU_IRQ (IRQ_IXP4XX_XSCALE_PMU) 71#define XSCALE_PMU_IRQ (IRQ_IXP4XX_XSCALE_PMU)
diff --git a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
index ed35e5c94f40..deb989950c52 100644
--- a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
+++ b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
@@ -607,15 +607,43 @@
607 607
608#define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */ 608#define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */
609 609
610/* Processor id value in CP15 Register 0 */
611#define IXP425_PROCESSOR_ID_VALUE 0x690541c0
612#define IXP435_PROCESSOR_ID_VALUE 0x69054040
613#define IXP465_PROCESSOR_ID_VALUE 0x69054200
614#define IXP4XX_PROCESSOR_ID_MASK 0xfffffff0
615
610#ifndef __ASSEMBLY__ 616#ifndef __ASSEMBLY__
617static inline int cpu_is_ixp42x(void)
618{
619 extern unsigned int processor_id;
620
621 if ((processor_id & IXP4XX_PROCESSOR_ID_MASK) ==
622 IXP425_PROCESSOR_ID_VALUE )
623 return 1;
624
625 return 0;
626}
627
628static inline int cpu_is_ixp43x(void)
629{
630#ifdef CONFIG_CPU_IXP43X
631 extern unsigned int processor_id;
632
633 if ((processor_id & IXP4XX_PROCESSOR_ID_MASK) ==
634 IXP435_PROCESSOR_ID_VALUE )
635 return 1;
636#endif
637 return 0;
638}
639
611static inline int cpu_is_ixp46x(void) 640static inline int cpu_is_ixp46x(void)
612{ 641{
613#ifdef CONFIG_CPU_IXP46X 642#ifdef CONFIG_CPU_IXP46X
614 unsigned int processor_id; 643 extern unsigned int processor_id;
615
616 asm("mrc p15, 0, %0, cr0, cr0, 0;" : "=r"(processor_id) :);
617 644
618 if ((processor_id & 0xffffff00) == 0x69054200) 645 if ((processor_id & IXP4XX_PROCESSOR_ID_MASK) ==
646 IXP465_PROCESSOR_ID_VALUE )
619 return 1; 647 return 1;
620#endif 648#endif
621 return 0; 649 return 0;