From 7914c5e3305c5f7e9e641fd3b6aaea88d174dae4 Mon Sep 17 00:00:00 2001 From: Russell King Date: Wed, 5 Jan 2005 23:58:22 +0000 Subject: [ARM] Quieten compiler warnings, etc with ARM set_pmd() Signed-off-by: Russell King --- include/asm-arm/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index 547e5aa8be7b..10d747ba0ce0 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h @@ -310,7 +310,7 @@ PTE_BIT_FUNC(mkyoung, |= L_PTE_YOUNG); #define set_pmd(pmdp,pmd) \ do { \ - *pmdp = pmd; \ + *(pmdp) = pmd; \ flush_pmd_entry(pmdp); \ } while (0) -- cgit v1.2.3 From 7ae2e34eecf895aa3eb72279de8ed1da6ebcf3e4 Mon Sep 17 00:00:00 2001 From: "George T. Joseph" Date: Thu, 6 Jan 2005 23:58:39 +0000 Subject: [ARM PATCH] 2334/1: Corrects ixp4xx USB base addr and adds QMGRr/EthA/EthB in ixp4xx-regs.h Patch from George Joseph Corrects the IXP4XX_USB_BASE offset to be 0xB000 instead of overlapping TIMER at 0x5000. Also adds IXP4XX_QMGR_BASE and offsets for EthA and EthB. Signed-off-by: George T. Joseph Signed-off-by: Russell King --- include/asm-arm/arch-ixp4xx/ixp4xx-regs.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h index aaf6b2a3602c..8eeb1db6309d 100644 --- a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h +++ b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h @@ -43,6 +43,10 @@ * 0xC8000000 0x0000C000 0xffbf2000 On-Chip Peripherals */ +/* + * Queue Manager + */ +#define IXP4XX_QMGR_BASE_PHYS (0x60000000) /* * Expansion BUS Configuration registers @@ -107,7 +111,9 @@ #define IXP4XX_INTC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x3000) #define IXP4XX_GPIO_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x4000) #define IXP4XX_TIMER_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x5000) -#define IXP4XX_USB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x5000) +#define IXP4XX_EthA_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x9000) +#define IXP4XX_EthB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xA000) +#define IXP4XX_USB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xB000) #define IXP4XX_UART1_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x0000) #define IXP4XX_UART2_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x1000) @@ -115,7 +121,9 @@ #define IXP4XX_INTC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x3000) #define IXP4XX_GPIO_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x4000) #define IXP4XX_TIMER_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x5000) -#define IXP4XX_USB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x5000) +#define IXP4XX_EthA_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x9000) +#define IXP4XX_EthB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xA000) +#define IXP4XX_USB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xB000) /* * Constants to make it easy to access Interrupt Controller registers -- cgit v1.2.3 From 9c0c7e70a0ea9f0358e9ce9b4ca52ca8d4cd6e70 Mon Sep 17 00:00:00 2001 From: Dave Jiang Date: Fri, 7 Jan 2005 00:12:42 +0000 Subject: [ARM PATCH] 2352/1: Increase amount of physical memory addressable on IOP platforms Patch from Dave Jiang Signed-off-by: Dave Jiang Move the VMALLOC_END to 0xfe000000 from 0xe8000000 to increase the amount of physical memory addressable on XScale IOP platforms. Signed-off-by: Russell King --- include/asm-arm/arch-iop3xx/vmalloc.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-arm/arch-iop3xx/vmalloc.h b/include/asm-arm/arch-iop3xx/vmalloc.h index d59dfeda9ab2..dc1d2a957164 100644 --- a/include/asm-arm/arch-iop3xx/vmalloc.h +++ b/include/asm-arm/arch-iop3xx/vmalloc.h @@ -13,4 +13,7 @@ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) #define VMALLOC_VMADDR(x) ((unsigned long)(x)) -#define VMALLOC_END (0xe8000000) +//#define VMALLOC_END (0xe8000000) +/* increase usable physical RAM to ~992M per RMK */ +#define VMALLOC_END (0xfe000000) + -- cgit v1.2.3 From 821e3a48cf39638fa4ca38e560ab314173d08fa6 Mon Sep 17 00:00:00 2001 From: Dave Jiang Date: Fri, 7 Jan 2005 00:23:13 +0000 Subject: [ARM PATCH] 2355/1: cleanup of PCI defines for IOP33x platforms Patch from Dave Jiang Signed-off-by: Dave Jiang Major cleanup of the IOP33x family platform PCI defines. Hopefully should be more coherent and removed some magic numbers. Also should be finalized with the latest redboot ATU config. Signed-off-by: Russell King --- arch/arm/mach-iop3xx/iop331-pci.c | 35 +++++++++++++++----------- arch/arm/mach-iop3xx/iq80331-pci.c | 34 +++++++------------------ include/asm-arm/arch-iop3xx/iop331.h | 47 +++++++++++++++++++++++++---------- include/asm-arm/arch-iop3xx/iq80331.h | 15 ----------- 4 files changed, 63 insertions(+), 68 deletions(-) (limited to 'include') diff --git a/arch/arm/mach-iop3xx/iop331-pci.c b/arch/arm/mach-iop3xx/iop331-pci.c index f6118dd10fa0..44dd213b48a3 100644 --- a/arch/arm/mach-iop3xx/iop331-pci.c +++ b/arch/arm/mach-iop3xx/iop331-pci.c @@ -4,7 +4,7 @@ * PCI support for the Intel IOP331 chipset * * Author: Dave Jiang (dave.jiang@intel.com) - * Copyright (C) 2003 Intel Corp. + * Copyright (C) 2003, 2004 Intel Corp. * * 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 @@ -26,7 +26,8 @@ #include -//#define DEBUG +#undef DEBUG +#undef DEBUG1 #ifdef DEBUG #define DBG(x...) printk(x) @@ -34,6 +35,12 @@ #define DBG(x...) do { } while (0) #endif +#ifdef DEBUG1 +#define DBG1(x...) printk(x) +#else +#define DBG1(x...) do { } while (0) +#endif + /* * This routine builds either a type0 or type1 configuration command. If the * bus is on the 80331 then a type0 made, else a type1 is created. @@ -197,21 +204,19 @@ struct pci_bus *iop331_scan_bus(int nr, struct pci_sys_data *sys) void iop331_init(void) { - DBG("PCI: Intel 80331 PCI init code.\n"); - DBG("\tATU: IOP331_ATUCMD=0x%04x\n", *IOP331_ATUCMD); - DBG("\tATU: IOP331_OMWTVR0=0x%04x, IOP331_OIOWTVR=0x%04x\n", + DBG1("PCI: Intel 80331 PCI init code.\n"); + DBG1("\tATU: IOP331_ATUCMD=0x%04x\n", *IOP331_ATUCMD); + DBG1("\tATU: IOP331_OMWTVR0=0x%04x, IOP331_OIOWTVR=0x%04x\n", *IOP331_OMWTVR0, *IOP331_OIOWTVR); - DBG("\tATU: IOP331_ATUCR=0x%08x\n", *IOP331_ATUCR); - DBG("\tATU: IOP331_IABAR0=0x%08x IOP331_IALR0=0x%08x IOP331_IATVR0=%08x\n", *IOP331_IABAR0, *IOP331_IALR0, *IOP331_IATVR0); - DBG("\tATU: IOP331_ERBAR=0x%08x IOP331_ERLR=0x%08x IOP331_ERTVR=%08x\n", *IOP331_ERBAR, *IOP331_ERLR, *IOP331_ERTVR); - DBG("\tATU: IOP331_IABAR2=0x%08x IOP331_IALR2=0x%08x IOP331_IATVR2=%08x\n", *IOP331_IABAR2, *IOP331_IALR2, *IOP331_IATVR2); - DBG("\tATU: IOP331_IABAR3=0x%08x IOP331_IALR3=0x%08x IOP331_IATVR3=%08x\n", *IOP331_IABAR3, *IOP331_IALR3, *IOP331_IATVR3); - - /* redboot changed, reset IABAR0 to something sane */ - /* fixes master aborts in plugged in cards */ - /* will clean up later and work nicely with redboot */ - *IOP331_IABAR0 = 0x00000004; + DBG1("\tATU: IOP331_OMWTVR1=0x%04x\n", *IOP331_OMWTVR1); + DBG1("\tATU: IOP331_ATUCR=0x%08x\n", *IOP331_ATUCR); + DBG1("\tATU: IOP331_IABAR0=0x%08x IOP331_IALR0=0x%08x IOP331_IATVR0=%08x\n", *IOP331_IABAR0, *IOP331_IALR0, *IOP331_IATVR0); + DBG1("\tATU: IOP31_IABAR1=0x%08x IOP331_IALR1=0x%08x\n", *IOP331_IABAR1, *IOP331_IALR1); + DBG1("\tATU: IOP331_ERBAR=0x%08x IOP331_ERLR=0x%08x IOP331_ERTVR=%08x\n", *IOP331_ERBAR, *IOP331_ERLR, *IOP331_ERTVR); + DBG1("\tATU: IOP331_IABAR2=0x%08x IOP331_IALR2=0x%08x IOP331_IATVR2=%08x\n", *IOP331_IABAR2, *IOP331_IALR2, *IOP331_IATVR2); + DBG1("\tATU: IOP331_IABAR3=0x%08x IOP331_IALR3=0x%08x IOP331_IATVR3=%08x\n", *IOP331_IABAR3, *IOP331_IALR3, *IOP331_IATVR3); + hook_fault_code(16+6, iop331_pci_abort, SIGBUS, "imprecise external abort"); } diff --git a/arch/arm/mach-iop3xx/iq80331-pci.c b/arch/arm/mach-iop3xx/iq80331-pci.c index 1eff5573d7ba..591aa32a80b8 100644 --- a/arch/arm/mach-iop3xx/iq80331-pci.c +++ b/arch/arm/mach-iop3xx/iq80331-pci.c @@ -4,7 +4,7 @@ * PCI support for the Intel IQ80331 reference board * * Author: Dave Jiang - * Copyright (C) 2003 Intel Corp. + * Copyright (C) 2003, 2004 Intel Corp. * * 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 @@ -68,44 +68,28 @@ static int iq80331_setup(int nr, struct pci_sys_data *sys) memset(res, 0, sizeof(struct resource) * 2); - res[0].start = IQ80331_PCI_IO_BASE + 0x6e000000; - res[0].end = IQ80331_PCI_IO_BASE + IQ80331_PCI_IO_SIZE - 1 + IQ80331_PCI_IO_OFFSET; + res[0].start = IOP331_PCI_LOWER_IO_BA + IOP331_PCI_IO_OFFSET; + res[0].end = IOP331_PCI_UPPER_IO_BA + IOP331_PCI_IO_OFFSET; res[0].name = "IQ80331 PCI I/O Space"; res[0].flags = IORESOURCE_IO; - res[1].start = IQ80331_PCI_MEM_BASE; - res[1].end = IQ80331_PCI_MEM_BASE + IQ80331_PCI_MEM_SIZE; + res[1].start = IOP331_PCI_LOWER_MEM_BA + IOP331_PCI_MEM_OFFSET; + res[1].end = IOP331_PCI_UPPER_MEM_BA + IOP331_PCI_MEM_OFFSET; res[1].name = "IQ80331 PCI Memory Space"; res[1].flags = IORESOURCE_MEM; request_resource(&ioport_resource, &res[0]); request_resource(&iomem_resource, &res[1]); - /* - * Since the IQ80331 is a slave card on a PCI backplane, - * it uses BAR1 to reserve a portion of PCI memory space for - * use with the private devices on the secondary bus - * (GigE and PCI-X slot). We read BAR1 and configure - * our outbound translation windows to target that - * address range and assign all devices in that - * address range. W/O this, certain BIOSes will fail - * to boot as the IQ80331 claims addresses that are - * in use by other devices. - * - * Note that the same cannot be done with I/O space, - * so hopefully the host will stick to the lower 64K for - * PCI I/O and leave us alone. - */ - sys->mem_offset = IQ80331_PCI_MEM_BASE - - (*IOP331_IABAR1 & PCI_BASE_ADDRESS_MEM_MASK); + sys->mem_offset = IOP331_PCI_MEM_OFFSET; + sys->io_offset = IOP331_PCI_IO_OFFSET; sys->resource[0] = &res[0]; sys->resource[1] = &res[1]; sys->resource[2] = NULL; - sys->io_offset = IQ80331_PCI_IO_OFFSET; - iop3xx_pcibios_min_io = IQ80331_PCI_IO_BASE; - iop3xx_pcibios_min_mem = IQ80331_PCI_MEM_BASE; + iop3xx_pcibios_min_io = IOP331_PCI_LOWER_IO_VA; + iop3xx_pcibios_min_mem = IOP331_PCI_LOWER_MEM_VA; return 1; } diff --git a/include/asm-arm/arch-iop3xx/iop331.h b/include/asm-arm/arch-iop3xx/iop331.h index c4854a1d3563..cb16c5fda78e 100644 --- a/include/asm-arm/arch-iop3xx/iop331.h +++ b/include/asm-arm/arch-iop3xx/iop331.h @@ -4,7 +4,7 @@ * Intel IOP331 Chip definitions * * Author: Dave Jiang (dave.jiang@intel.com) - * Copyright (C) 2003 Intel Corp. + * Copyright (C) 2003, 2004 Intel Corp. * * 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 @@ -21,7 +21,8 @@ */ #ifndef __ASSEMBLY__ #ifdef CONFIG_ARCH_IOP331 -#define iop_is_331() ((processor_id & 0xffffffb0) == 0x69054090) +/*#define iop_is_331() ((processor_id & 0xffffffb0) == 0x69054090) */ +#define iop_is_331() ((processor_id & 0xffffff30) == 0x69054010) #else #define iop_is_331() 0 #endif @@ -30,20 +31,28 @@ /* * IOP331 I/O and Mem space regions for PCI autoconfiguration */ -#define IOP331_PCI_LOWER_IO 0x90000000 -#define IOP331_PCI_UPPER_IO 0x900fffff -#define IOP331_PCI_LOWER_MEM 0x80000000 -#define IOP331_PCI_UPPER_MEM 0x87ffffff - -#define IOP331_PCI_WINDOW_SIZE 128 * 0x100000 - +#define IOP331_PCI_IO_WINDOW_SIZE 0x10000 +#define IOP331_PCI_LOWER_IO_PA 0x90000000 +#define IOP331_PCI_LOWER_IO_VA 0xfe000000 +#define IOP331_PCI_LOWER_IO_BA (*IOP331_OIOWTVR) +#define IOP331_PCI_UPPER_IO_PA (IOP331_PCI_LOWER_IO_PA + IOP331_PCI_IO_WINDOW_SIZE - 1) +#define IOP331_PCI_UPPER_IO_VA (IOP331_PCI_LOWER_IO_VA + IOP331_PCI_IO_WINDOW_SIZE - 1) +#define IOP331_PCI_UPPER_IO_BA (IOP331_PCI_LOWER_IO_BA + IOP331_PCI_IO_WINDOW_SIZE - 1) +#define IOP331_PCI_IO_OFFSET (IOP331_PCI_LOWER_IO_VA - IOP331_PCI_LOWER_IO_BA) + +#define IOP331_PCI_MEM_WINDOW_SIZE (~*IOP331_IALR1 + 1) +#define IOP331_PCI_LOWER_MEM_PA 0x80000000 +#define IOP331_PCI_LOWER_MEM_VA 0x80000000 +#define IOP331_PCI_LOWER_MEM_BA (*IOP331_OMWTVR0) +#define IOP331_PCI_UPPER_MEM_PA (IOP331_PCI_LOWER_MEM_PA + IOP331_PCI_MEM_WINDOW_SIZE - 1) +#define IOP331_PCI_UPPER_MEM_VA (IOP331_PCI_LOWER_MEM_VA + IOP331_PCI_MEM_WINDOW_SIZE - 1) +#define IOP331_PCI_UPPER_MEM_BA (IOP331_PCI_LOWER_MEM_BA + IOP331_PCI_MEM_WINDOW_SIZE - 1) +#define IOP331_PCI_MEM_OFFSET (IOP331_PCI_LOWER_MEM_VA - IOP331_PCI_LOWER_MEM_BA) /* * IOP331 chipset registers */ -#define IOP331_VIRT_MEM_BASE 0xfeffe000 /* chip virtual mem address*/ -// #define IOP331_VIRT_MEM_BASE 0xfff00000 /* chip virtual mem address*/ - +#define IOP331_VIRT_MEM_BASE 0xfeffe000 /* chip virtual mem address*/ #define IOP331_PHYS_MEM_BASE 0xffffe000 /* chip physical memory address */ #define IOP331_REG_ADDR(reg) (IOP331_VIRT_MEM_BASE | (reg)) @@ -248,8 +257,14 @@ #define IOP331_TU_TISR (volatile u32 *)IOP331_REG_ADDR(0x000007E8) #define IOP331_TU_WDTCR (volatile u32 *)IOP331_REG_ADDR(0x000007EC) -#define IOP331_TICK_RATE 266000000 /* 266 MHz clock */ +#if defined(CONFIG_ARCH_IOP331) +#define IOP331_TICK_RATE 266000000 /* 266 MHz IB clock */ +#endif +#if defined(CONFIG_IOP331_STEPD) || defined(CONFIG_ARCH_IQ80333) +#undef IOP331_TICK_RATE +#define IOP331_TICK_RATE 333000000 /* 333 Mhz IB clock */ +#endif /* Application accelerator unit 0x00000800 - 0x000008FF */ #define IOP331_AAU_ACR (volatile u32 *)IOP331_REG_ADDR(0x00000800) @@ -324,6 +339,11 @@ /* 0x00001740 through 0x0000176C UART 1 */ +#define IOP331_UART0_PHYS (IOP331_PHYS_MEM_BASE | 0x00001700) /* UART #1 physical */ +#define IOP331_UART1_PHYS (IOP331_PHYS_MEM_BASE | 0x00001740) /* UART #2 physical */ +#define IOP331_UART0_VIRT (IOP331_VIRT_MEM_BASE | 0x00001700) /* UART #1 virtual addr */ +#define IOP331_UART1_VIRT (IOP331_VIRT_MEM_BASE | 0x00001740) /* UART #2 virtual addr */ + /* Reserved 0x00001770 through 0x0000177F */ /* General Purpose I/O Registers */ @@ -333,6 +353,7 @@ /* Reserved 0x0000178c through 0x000019ff */ + #ifndef __ASSEMBLY__ extern void iop331_map_io(void); extern void iop331_init_irq(void); diff --git a/include/asm-arm/arch-iop3xx/iq80331.h b/include/asm-arm/arch-iop3xx/iq80331.h index a076327fe5f2..0668e78d483e 100644 --- a/include/asm-arm/arch-iop3xx/iq80331.h +++ b/include/asm-arm/arch-iop3xx/iq80331.h @@ -7,30 +7,15 @@ #ifndef _IQ80331_H_ #define _IQ80331_H_ -#define IQ80331_RAMBASE 0x00000000 - #define IQ80331_FLASHBASE 0xc0000000 /* Flash */ #define IQ80331_FLASHSIZE 0x00800000 #define IQ80331_FLASHWIDTH 1 -#define IQ80331_UART0_PHYS (IOP331_PHYS_MEM_BASE | 0x00001700) /* UART #1 physical */ -#define IQ80331_UART1_PHYS (IOP331_PHYS_MEM_BASE | 0x00001740) /* UART #2 physical */ -#define IQ80331_UART0_VIRT (IOP331_VIRT_MEM_BASE | 0x00001700) /* UART #1 virtual addr */ -#define IQ80331_UART1_VIRT (IOP331_VIRT_MEM_BASE | 0x00001740) /* UART #2 virtual addr */ #define IQ80331_7SEG_1 0xce840000 /* 7-Segment MSB */ #define IQ80331_7SEG_0 0xce850000 /* 7-Segment LSB (WO) */ #define IQ80331_ROTARY_SW 0xce8d0000 /* Rotary Switch */ #define IQ80331_BATT_STAT 0xce8f0000 /* Battery Status */ -/* - * IQ80331 PCI I/O and Mem space regions - */ -#define IQ80331_PCI_IO_BASE 0x90000000 -#define IQ80331_PCI_IO_SIZE 0x00010000 -#define IQ80331_PCI_MEM_BASE 0x80000000 -#define IQ80331_PCI_MEM_SIZE 0x08000000 -#define IQ80331_PCI_IO_OFFSET 0x6e000000 - #ifndef __ASSEMBLY__ extern void iq80331_map_io(void); #endif -- cgit v1.2.3