diff options
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/au1000/Kconfig | 9 | ||||
-rw-r--r-- | arch/mips/au1000/common/pci.c | 8 | ||||
-rw-r--r-- | arch/mips/au1000/common/setup.c | 9 | ||||
-rw-r--r-- | arch/mips/cobalt/time.c | 21 | ||||
-rw-r--r-- | arch/mips/configs/bigsur_defconfig | 9 | ||||
-rw-r--r-- | arch/mips/configs/malta_defconfig | 8 | ||||
-rw-r--r-- | arch/mips/kernel/process.c | 3 | ||||
-rw-r--r-- | arch/mips/kernel/time.c | 4 | ||||
-rw-r--r-- | arch/mips/kernel/traps.c | 6 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/display.c | 4 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/memory.c | 2 | ||||
-rw-r--r-- | arch/mips/pci/pci.c | 2 | ||||
-rw-r--r-- | arch/mips/qemu/q-irq.c | 2 |
13 files changed, 56 insertions, 31 deletions
diff --git a/arch/mips/au1000/Kconfig b/arch/mips/au1000/Kconfig index 05d1354aad3a..1fe97cccead1 100644 --- a/arch/mips/au1000/Kconfig +++ b/arch/mips/au1000/Kconfig @@ -7,7 +7,6 @@ config MIPS_MTX1 bool "4G Systems MTX-1 board" select DMA_NONCOHERENT select HW_HAS_PCI - select RESOURCES_64BIT if PCI select SOC_AU1500 select SYS_SUPPORTS_LITTLE_ENDIAN @@ -22,7 +21,6 @@ config MIPS_DB1000 select SOC_AU1000 select DMA_NONCOHERENT select HW_HAS_PCI - select RESOURCES_64BIT if PCI select SYS_SUPPORTS_LITTLE_ENDIAN config MIPS_DB1100 @@ -44,7 +42,6 @@ config MIPS_DB1500 select DMA_NONCOHERENT select HW_HAS_PCI select MIPS_DISABLE_OBSOLETE_IDE - select RESOURCES_64BIT if PCI select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_LITTLE_ENDIAN @@ -54,7 +51,6 @@ config MIPS_DB1550 select HW_HAS_PCI select DMA_NONCOHERENT select MIPS_DISABLE_OBSOLETE_IDE - select RESOURCES_64BIT if PCI select SYS_SUPPORTS_LITTLE_ENDIAN config MIPS_MIRAGE @@ -68,7 +64,6 @@ config MIPS_PB1000 select SOC_AU1000 select DMA_NONCOHERENT select HW_HAS_PCI - select RESOURCES_64BIT if PCI select SWAP_IO_SPACE select SYS_SUPPORTS_LITTLE_ENDIAN @@ -77,7 +72,6 @@ config MIPS_PB1100 select SOC_AU1100 select DMA_NONCOHERENT select HW_HAS_PCI - select RESOURCES_64BIT if PCI select SWAP_IO_SPACE select SYS_SUPPORTS_LITTLE_ENDIAN @@ -86,7 +80,6 @@ config MIPS_PB1200 select SOC_AU1200 select DMA_NONCOHERENT select MIPS_DISABLE_OBSOLETE_IDE - select RESOURCES_64BIT if PCI select SYS_SUPPORTS_LITTLE_ENDIAN config MIPS_PB1500 @@ -94,7 +87,6 @@ config MIPS_PB1500 select SOC_AU1500 select DMA_NONCOHERENT select HW_HAS_PCI - select RESOURCES_64BIT if PCI select SYS_SUPPORTS_LITTLE_ENDIAN config MIPS_PB1550 @@ -103,7 +95,6 @@ config MIPS_PB1550 select DMA_NONCOHERENT select HW_HAS_PCI select MIPS_DISABLE_OBSOLETE_IDE - select RESOURCES_64BIT if PCI select SYS_SUPPORTS_LITTLE_ENDIAN config MIPS_XXS1500 diff --git a/arch/mips/au1000/common/pci.c b/arch/mips/au1000/common/pci.c index 9be99a68932a..6fa70a36a250 100644 --- a/arch/mips/au1000/common/pci.c +++ b/arch/mips/au1000/common/pci.c @@ -39,15 +39,15 @@ /* TBD */ static struct resource pci_io_resource = { - .start = (resource_size_t)PCI_IO_START, - .end = (resource_size_t)PCI_IO_END, + .start = PCI_IO_START, + .end = PCI_IO_END, .name = "PCI IO space", .flags = IORESOURCE_IO }; static struct resource pci_mem_resource = { - .start = (resource_size_t)PCI_MEM_START, - .end = (resource_size_t)PCI_MEM_END, + .start = PCI_MEM_START, + .end = PCI_MEM_END, .name = "PCI memory space", .flags = IORESOURCE_MEM }; diff --git a/arch/mips/au1000/common/setup.c b/arch/mips/au1000/common/setup.c index a90d425d4651..d885e3848ec6 100644 --- a/arch/mips/au1000/common/setup.c +++ b/arch/mips/au1000/common/setup.c @@ -137,12 +137,11 @@ phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size) #ifdef CONFIG_PCI { - u32 start, end; + u32 start = (u32)Au1500_PCI_MEM_START; + u32 end = (u32)Au1500_PCI_MEM_END; - start = (u32)Au1500_PCI_MEM_START; - end = (u32)Au1500_PCI_MEM_END; - /* check for pci memory window */ - if ((phys_addr >= start) && ((phys_addr + size) < end)) + /* Check for PCI memory window */ + if (phys_addr >= start && (phys_addr + size - 1) <= end) return (phys_t) ((phys_addr - start) + Au1500_PCI_MEM_START); } diff --git a/arch/mips/cobalt/time.c b/arch/mips/cobalt/time.c index fa819fccd5db..4a570e7145fe 100644 --- a/arch/mips/cobalt/time.c +++ b/arch/mips/cobalt/time.c @@ -27,9 +27,28 @@ void __init plat_time_init(void) { + u32 start, end; + int i = HZ / 10; + setup_pit_timer(); gt641xx_set_base_clock(GT641XX_BASE_CLOCK); - mips_timer_state = gt641xx_timer0_state; + /* + * MIPS counter frequency is measured during a 100msec interval + * using GT64111 timer0. + */ + while (!gt641xx_timer0_state()) + ; + + start = read_c0_count(); + + while (i--) + while (!gt641xx_timer0_state()) + ; + + end = read_c0_count(); + + mips_hpt_frequency = (end - start) * 10; + printk(KERN_INFO "MIPS counter frequency %dHz\n", mips_hpt_frequency); } diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_defconfig index 80b0c99c2cfb..3c70c9d16d01 100644 --- a/arch/mips/configs/bigsur_defconfig +++ b/arch/mips/configs/bigsur_defconfig @@ -76,9 +76,13 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_TIME=y +CONFIG_GENERIC_CMOS_UPDATE=y CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y # CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set +CONFIG_CEVT_BCM1480=y +CONFIG_CSRC_BCM1480=y CONFIG_DMA_COHERENT=y CONFIG_CPU_BIG_ENDIAN=y # CONFIG_CPU_LITTLE_ENDIAN is not set @@ -91,6 +95,11 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5 # # CPU selection # +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +# CONFIG_CPU_LOONGSON2 is not set # CONFIG_CPU_MIPS32_R1 is not set # CONFIG_CPU_MIPS32_R2 is not set # CONFIG_CPU_MIPS64_R1 is not set diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig index fbd2d802fdfd..4b7e43c9f69a 100644 --- a/arch/mips/configs/malta_defconfig +++ b/arch/mips/configs/malta_defconfig @@ -49,10 +49,13 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_TIME=y +CONFIG_GENERIC_CMOS_UPDATE=y CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y # CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set CONFIG_ARCH_MAY_HAVE_PC_FDC=y +CONFIG_CEVT_R4K=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_EARLY_PRINTK=y @@ -76,6 +79,10 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5 # # CPU selection # +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y # CONFIG_CPU_LOONGSON2 is not set # CONFIG_CPU_MIPS32_R1 is not set CONFIG_CPU_MIPS32_R2=y @@ -253,6 +260,7 @@ CONFIG_HW_HAS_PCI=y CONFIG_PCI=y # CONFIG_ARCH_SUPPORTS_MSI is not set CONFIG_MMU=y +CONFIG_I8253=y # # PCCARD (PCMCIA/CardBus) support diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 11cb264f59ce..2c09a442e5e5 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -77,9 +77,8 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp) unsigned long status; /* New thread loses kernel privileges. */ - status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|KU_MASK); + status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|ST0_FR|KU_MASK); #ifdef CONFIG_64BIT - status &= ~ST0_FR; status |= test_thread_flag(TIF_32BIT_REGS) ? 0 : ST0_FR; #endif status |= KU_USER; diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 52075426c373..1ecfbb7eba6c 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c @@ -109,10 +109,6 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd, cd->mult = (u32) temp; } -void __init __weak plat_time_init(void) -{ -} - /* * This function exists in order to cause an error due to a duplicate * definition if platform code should have its own implementation. The hook diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 23e73d0650a3..fcae66752972 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -1317,12 +1317,12 @@ void __init per_cpu_trap_init(void) #endif if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV) status_set |= ST0_XX; + if (cpu_has_dsp) + status_set |= ST0_MX; + change_c0_status(ST0_CU|ST0_MX|ST0_RE|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX, status_set); - if (cpu_has_dsp) - set_c0_status(ST0_MX); - #ifdef CONFIG_CPU_MIPSR2 if (cpu_has_mips_r2) { unsigned int enable = 0x0000000f; diff --git a/arch/mips/mips-boards/generic/display.c b/arch/mips/mips-boards/generic/display.c index 5d600054090a..2a0057cfc30d 100644 --- a/arch/mips/mips-boards/generic/display.c +++ b/arch/mips/mips-boards/generic/display.c @@ -37,9 +37,9 @@ void mips_display_message(const char *str) for (i = 0; i <= 14; i=i+2) { if (*str) - writel(*str++, display + i); + __raw_writel(*str++, display + i); else - writel(' ', display + i); + __raw_writel(' ', display + i); } } diff --git a/arch/mips/mips-boards/generic/memory.c b/arch/mips/mips-boards/generic/memory.c index dc272c188233..2c5c27c8e86d 100644 --- a/arch/mips/mips-boards/generic/memory.c +++ b/arch/mips/mips-boards/generic/memory.c @@ -169,6 +169,7 @@ void __init prom_meminit(void) void __init prom_free_prom_memory(void) { +#if 0 /* for now ... */ unsigned long addr; int i; @@ -180,4 +181,5 @@ void __init prom_free_prom_memory(void) free_init_pages("prom memory", addr, addr + boot_mem_map.map[i].size); } +#endif } diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index 589b745d822a..6e6981fd7934 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c @@ -242,6 +242,8 @@ static void pcibios_fixup_device_resources(struct pci_dev *dev, for (i = 0; i < PCI_NUM_RESOURCES; i++) { if (!dev->resource[i].start) continue; + if (dev->resource[i].flags & IORESOURCE_PCI_FIXED) + continue; if (dev->resource[i].flags & IORESOURCE_IO) offset = hose->io_offset; else if (dev->resource[i].flags & IORESOURCE_MEM) diff --git a/arch/mips/qemu/q-irq.c b/arch/mips/qemu/q-irq.c index 11f984767880..7df36dbe65c7 100644 --- a/arch/mips/qemu/q-irq.c +++ b/arch/mips/qemu/q-irq.c @@ -33,5 +33,5 @@ void __init arch_init_irq(void) mips_cpu_irq_init(); init_i8259_irqs(); - set_c0_status(0x8400); + set_c0_status(0x400); } |