aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/kernel/armksyms.c3
-rw-r--r--arch/arm/mach-ixp4xx/common-pci.c4
-rw-r--r--arch/arm/mach-ixp4xx/coyote-setup.c27
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-setup.c3
-rw-r--r--arch/arm/mm/proc-v6.S2
-rw-r--r--include/asm-arm/arch-ixp4xx/io.h176
6 files changed, 198 insertions, 17 deletions
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
index b713c44c6fb4..835d450797a1 100644
--- a/arch/arm/kernel/armksyms.c
+++ b/arch/arm/kernel/armksyms.c
@@ -41,7 +41,10 @@ extern void fp_enter(void);
41 * This has a special calling convention; it doesn't 41 * This has a special calling convention; it doesn't
42 * modify any of the usual registers, except for LR. 42 * modify any of the usual registers, except for LR.
43 */ 43 */
44#define EXPORT_CRC_ALIAS(sym) __CRC_SYMBOL(sym, "")
45
44#define EXPORT_SYMBOL_ALIAS(sym,orig) \ 46#define EXPORT_SYMBOL_ALIAS(sym,orig) \
47 EXPORT_CRC_ALIAS(sym) \
45 const struct kernel_symbol __ksymtab_##sym \ 48 const struct kernel_symbol __ksymtab_##sym \
46 __attribute__((section("__ksymtab"))) = \ 49 __attribute__((section("__ksymtab"))) = \
47 { (unsigned long)&orig, #sym }; 50 { (unsigned long)&orig, #sym };
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
index aa92e3708838..2b544363c078 100644
--- a/arch/arm/mach-ixp4xx/common-pci.c
+++ b/arch/arm/mach-ixp4xx/common-pci.c
@@ -453,8 +453,8 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys)
453 local_write_config(PCI_COMMAND, 2, PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); 453 local_write_config(PCI_COMMAND, 2, PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY);
454 454
455 res[0].name = "PCI I/O Space"; 455 res[0].name = "PCI I/O Space";
456 res[0].start = 0x00001000; 456 res[0].start = 0x00000000;
457 res[0].end = 0xffff0000; 457 res[0].end = 0x0000ffff;
458 res[0].flags = IORESOURCE_IO; 458 res[0].flags = IORESOURCE_IO;
459 459
460 res[1].name = "PCI Memory Space"; 460 res[1].name = "PCI Memory Space";
diff --git a/arch/arm/mach-ixp4xx/coyote-setup.c b/arch/arm/mach-ixp4xx/coyote-setup.c
index c6335f51907d..4ff4393ef0ea 100644
--- a/arch/arm/mach-ixp4xx/coyote-setup.c
+++ b/arch/arm/mach-ixp4xx/coyote-setup.c
@@ -56,21 +56,24 @@ static struct resource coyote_uart_resource = {
56 .flags = IORESOURCE_MEM, 56 .flags = IORESOURCE_MEM,
57}; 57};
58 58
59static struct plat_serial8250_port coyote_uart_data = { 59static struct plat_serial8250_port coyote_uart_data[] = {
60 .mapbase = IXP4XX_UART2_BASE_PHYS, 60 {
61 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET, 61 .mapbase = IXP4XX_UART2_BASE_PHYS,
62 .irq = IRQ_IXP4XX_UART2, 62 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
63 .flags = UPF_BOOT_AUTOCONF, 63 .irq = IRQ_IXP4XX_UART2,
64 .iotype = UPIO_MEM, 64 .flags = UPF_BOOT_AUTOCONF,
65 .regshift = 2, 65 .iotype = UPIO_MEM,
66 .uartclk = IXP4XX_UART_XTAL, 66 .regshift = 2,
67 .uartclk = IXP4XX_UART_XTAL,
68 },
69 { },
67}; 70};
68 71
69static struct platform_device coyote_uart = { 72static struct platform_device coyote_uart = {
70 .name = "serial8250", 73 .name = "serial8250",
71 .id = 0, 74 .id = 0,
72 .dev = { 75 .dev = {
73 .platform_data = &coyote_uart_data, 76 .platform_data = coyote_uart_data,
74 }, 77 },
75 .num_resources = 1, 78 .num_resources = 1,
76 .resource = &coyote_uart_resource, 79 .resource = &coyote_uart_resource,
@@ -87,10 +90,10 @@ static void __init coyote_init(void)
87 *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0; 90 *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
88 91
89 if (machine_is_ixdpg425()) { 92 if (machine_is_ixdpg425()) {
90 coyote_uart_data.membase = 93 coyote_uart_data[0].membase =
91 (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET); 94 (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET);
92 coyote_uart_data.mapbase = IXP4XX_UART1_BASE_PHYS; 95 coyote_uart_data[0].mapbase = IXP4XX_UART1_BASE_PHYS;
93 coyote_uart_data.irq = IRQ_IXP4XX_UART1; 96 coyote_uart_data[0].irq = IRQ_IXP4XX_UART1;
94 } 97 }
95 98
96 99
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
index f2e9c0ea0501..c2ba759e9946 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -95,7 +95,8 @@ static struct plat_serial8250_port ixdp425_uart_data[] = {
95 .iotype = UPIO_MEM, 95 .iotype = UPIO_MEM,
96 .regshift = 2, 96 .regshift = 2,
97 .uartclk = IXP4XX_UART_XTAL, 97 .uartclk = IXP4XX_UART_XTAL,
98 } 98 },
99 { },
99}; 100};
100 101
101static struct platform_device ixdp425_uart = { 102static struct platform_device ixdp425_uart = {
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S
index e3d8510f4340..352db98ee269 100644
--- a/arch/arm/mm/proc-v6.S
+++ b/arch/arm/mm/proc-v6.S
@@ -200,7 +200,7 @@ __v6_setup:
200 mcr p15, 0, r4, c2, c0, 1 @ load TTB1 200 mcr p15, 0, r4, c2, c0, 1 @ load TTB1
201#ifdef CONFIG_VFP 201#ifdef CONFIG_VFP
202 mrc p15, 0, r0, c1, c0, 2 202 mrc p15, 0, r0, c1, c0, 2
203 orr r0, r0, #(3 << 20) 203 orr r0, r0, #(0xf << 20)
204 mcr p15, 0, r0, c1, c0, 2 @ Enable full access to VFP 204 mcr p15, 0, r0, c1, c0, 2 @ Enable full access to VFP
205#endif 205#endif
206 mrc p15, 0, r0, c1, c0, 0 @ read control register 206 mrc p15, 0, r0, c1, c0, 0 @ read control register
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h
index c27b9d3079a7..7495026e2c18 100644
--- a/include/asm-arm/arch-ixp4xx/io.h
+++ b/include/asm-arm/arch-ixp4xx/io.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * Author: Deepak Saxena <dsaxena@plexity.net> 4 * Author: Deepak Saxena <dsaxena@plexity.net>
5 * 5 *
6 * Copyright (C) 2002-2004 MontaVista Software, Inc. 6 * Copyright (C) 2002-2005 MontaVista Software, Inc.
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
@@ -383,6 +383,180 @@ __ixp4xx_insl(u32 io_addr, u32 *vaddr, u32 count)
383 *vaddr++ = inl(io_addr); 383 *vaddr++ = inl(io_addr);
384} 384}
385 385
386#define __is_io_address(p) (((unsigned long)p >= 0x0) && \
387 ((unsigned long)p <= 0x0000ffff))
388static inline unsigned int
389__ixp4xx_ioread8(void __iomem *port)
390{
391 if (__is_io_address(port))
392 return (unsigned int)__ixp4xx_inb((unsigned int)port);
393 else
394#ifndef CONFIG_IXP4XX_INDIRECT_PCI
395 return (unsigned int)__raw_readb((u32)port);
396#else
397 return (unsigned int)__ixp4xx_readb((u32)port);
398#endif
399}
400
401static inline void
402__ixp4xx_ioread8_rep(u32 port, u8 *vaddr, u32 count)
403{
404 if (__is_io_address(port))
405 __ixp4xx_insb(port, vaddr, count);
406 else
407#ifndef CONFIG_IXP4XX_INDIRECT_PCI
408 __raw_readsb((void __iomem *)port, vaddr, count);
409#else
410 __ixp4xx_readsb(port, vaddr, count);
411#endif
412}
413
414static inline unsigned int
415__ixp4xx_ioread16(void __iomem *port)
416{
417 if (__is_io_address(port))
418 return (unsigned int)__ixp4xx_inw((unsigned int)port);
419 else
420#ifndef CONFIG_IXP4XX_INDIRECT_PCI
421 return le16_to_cpu(__raw_readw((u32)port));
422#else
423 return (unsigned int)__ixp4xx_readw((u32)port);
424#endif
425}
426
427static inline void
428__ixp4xx_ioread16_rep(u32 port, u16 *vaddr, u32 count)
429{
430 if (__is_io_address(port))
431 __ixp4xx_insw(port, vaddr, count);
432 else
433#ifndef CONFIG_IXP4XX_INDIRECT_PCI
434 __raw_readsw((void __iomem *)port, vaddr, count);
435#else
436 __ixp4xx_readsw(port, vaddr, count);
437#endif
438}
439
440static inline unsigned int
441__ixp4xx_ioread32(void __iomem *port)
442{
443 if (__is_io_address(port))
444 return (unsigned int)__ixp4xx_inl((unsigned int)port);
445 else {
446#ifndef CONFIG_IXP4XX_INDIRECT_PCI
447 return le32_to_cpu(__raw_readl((u32)port));
448#else
449 return (unsigned int)__ixp4xx_readl((u32)port);
450#endif
451 }
452}
453
454static inline void
455__ixp4xx_ioread32_rep(u32 port, u32 *vaddr, u32 count)
456{
457 if (__is_io_address(port))
458 __ixp4xx_insl(port, vaddr, count);
459 else
460#ifndef CONFIG_IXP4XX_INDIRECT_PCI
461 __raw_readsl((void __iomem *)port, vaddr, count);
462#else
463 __ixp4xx_readsl(port, vaddr, count);
464#endif
465}
466
467static inline void
468__ixp4xx_iowrite8(u8 value, void __iomem *port)
469{
470 if (__is_io_address(port))
471 __ixp4xx_outb(value, (unsigned int)port);
472 else
473#ifndef CONFIG_IXP4XX_INDIRECT_PCI
474 __raw_writeb(value, (u32)port);
475#else
476 __ixp4xx_writeb(value, (u32)port);
477#endif
478}
479
480static inline void
481__ixp4xx_iowrite8_rep(u32 port, u8 *vaddr, u32 count)
482{
483 if (__is_io_address(port))
484 __ixp4xx_outsb(port, vaddr, count);
485#ifndef CONFIG_IXP4XX_INDIRECT_PCI
486 __raw_writesb((void __iomem *)port, vaddr, count);
487#else
488 __ixp4xx_writesb(port, vaddr, count);
489#endif
490}
491
492static inline void
493__ixp4xx_iowrite16(u16 value, void __iomem *port)
494{
495 if (__is_io_address(port))
496 __ixp4xx_outw(value, (unsigned int)port);
497 else
498#ifndef CONFIG_IXP4XX_INDIRECT_PCI
499 __raw_writew(cpu_to_le16(value), (u32)port);
500#else
501 __ixp4xx_writew(value, (u32)port);
502#endif
503}
504
505static inline void
506__ixp4xx_iowrite16_rep(u32 port, u16 *vaddr, u32 count)
507{
508 if (__is_io_address(port))
509 __ixp4xx_outsw(port, vaddr, count);
510#ifndef CONFIG_IXP4XX_INDIRECT_PCI
511 __raw_readsw((void __iomem *)port, vaddr, count);
512#else
513 __ixp4xx_writesw(port, vaddr, count);
514#endif
515}
516
517static inline void
518__ixp4xx_iowrite32(u32 value, void __iomem *port)
519{
520 if (__is_io_address(port))
521 __ixp4xx_outl(value, (unsigned int)port);
522 else
523#ifndef CONFIG_IXP4XX_INDIRECT_PCI
524 __raw_writel(cpu_to_le32(value), (u32)port);
525#else
526 __ixp4xx_writel(value, (u32)port);
527#endif
528}
529
530static inline void
531__ixp4xx_iowrite32_rep(u32 port, u32 *vaddr, u32 count)
532{
533 if (__is_io_address(port))
534 __ixp4xx_outsl(port, vaddr, count);
535#ifndef CONFIG_IXP4XX_INDIRECT_PCI
536 __raw_readsl((void __iomem *)port, vaddr, count);
537#else
538 __ixp4xx_outsl(port, vaddr, count);
539#endif
540}
541
542#define ioread8(p) __ixp4xx_ioread8(p)
543#define ioread16(p) __ixp4xx_ioread16(p)
544#define ioread32(p) __ixp4xx_ioread32(p)
545
546#define ioread8_rep(p, v, c) __ixp4xx_ioread8_rep(p, v, c)
547#define ioread16_rep(p, v, c) __ixp4xx_ioread16_rep(p, v, c)
548#define ioread32_rep(p, v, c) __ixp4xx_ioread32_rep(p, v, c)
549
550#define iowrite8(v,p) __ixp4xx_iowrite8(v,p)
551#define iowrite16(v,p) __ixp4xx_iowrite16(v,p)
552#define iowrite32(v,p) __ixp4xx_iowrite32(v,p)
553
554#define iowrite8_rep(p, v, c) __ixp4xx_iowrite8_rep(p, v, c)
555#define iowrite16_rep(p, v, c) __ixp4xx_iowrite16_rep(p, v, c)
556#define iowrite32_rep(p, v, c) __ixp4xx_iowrite32_rep(p, v, c)
557
558#define ioport_map(port, nr) ((void __iomem*)port)
559#define ioport_unmap(addr)
386 560
387#endif // __ASM_ARM_ARCH_IO_H 561#endif // __ASM_ARM_ARCH_IO_H
388 562