From abe21004c6583d90c51dcfea7b89168a538a111c Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Tue, 25 May 2010 16:46:55 +0200 Subject: [PATCH] --- yaml --- r: 200803 b: refs/heads/master c: 4d5d85906ad109987504033fa04991f1b0a2e552 h: refs/heads/master i: 200801: fdfd496fc79b70de186d4b46d827463e0c871400 200799: 2d8fbfac56368ea3c8137b27b27528e441a3a021 v: v3 --- [refs] | 2 +- trunk/arch/arm/Kconfig | 3 +- trunk/arch/arm/include/asm/mach/udc_pxa2xx.h | 4 +-- trunk/arch/arm/include/asm/processor.h | 4 --- trunk/arch/arm/mach-mx3/mach-mx31lilly.c | 33 ++++++++++++------- trunk/arch/arm/mach-pxa/mioa701.c | 2 +- trunk/arch/arm/mach-pxa/z2.c | 26 +++++++++------ trunk/arch/arm/mach-realview/realview_eb.c | 3 +- .../arch/arm/mach-realview/realview_pb1176.c | 3 +- .../arch/arm/mach-realview/realview_pb11mp.c | 3 +- trunk/arch/arm/mach-realview/realview_pba8.c | 3 +- trunk/arch/arm/mach-realview/realview_pbx.c | 3 +- trunk/arch/arm/mach-vexpress/ct-ca9x4.c | 3 +- trunk/arch/arm/mm/Kconfig | 19 ----------- trunk/arch/arm/mm/cache-v6.S | 18 +++------- trunk/arch/arm/mm/dma-mapping.c | 18 +++++----- trunk/arch/arm/plat-pxa/Makefile | 3 +- trunk/drivers/power/z2_battery.c | 12 +++++-- 18 files changed, 72 insertions(+), 90 deletions(-) diff --git a/[refs] b/[refs] index b17949b6897f..f77eab0352f1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fb35f1ce6bc8c2301f918a7fb6d7dd8e0bfee8c5 +refs/heads/master: 4d5d85906ad109987504033fa04991f1b0a2e552 diff --git a/trunk/arch/arm/Kconfig b/trunk/arch/arm/Kconfig index 98922f7d2d12..1f254bd6c937 100644 --- a/trunk/arch/arm/Kconfig +++ b/trunk/arch/arm/Kconfig @@ -955,8 +955,7 @@ config XSCALE_PMU default y config CPU_HAS_PMU - depends on (CPU_V6 || CPU_V7 || XSCALE_PMU) && \ - (!ARCH_OMAP3 || OMAP3_EMU) + depends on CPU_V6 || CPU_V7 || XSCALE_PMU default y bool diff --git a/trunk/arch/arm/include/asm/mach/udc_pxa2xx.h b/trunk/arch/arm/include/asm/mach/udc_pxa2xx.h index 833306ee9e7f..f3eabf1ecec3 100644 --- a/trunk/arch/arm/include/asm/mach/udc_pxa2xx.h +++ b/trunk/arch/arm/include/asm/mach/udc_pxa2xx.h @@ -21,8 +21,8 @@ struct pxa2xx_udc_mach_info { * here. Note that sometimes the signals go through inverters... */ bool gpio_vbus_inverted; - int gpio_vbus; /* high == vbus present */ + u16 gpio_vbus; /* high == vbus present */ bool gpio_pullup_inverted; - int gpio_pullup; /* high == pullup activated */ + u16 gpio_pullup; /* high == pullup activated */ }; diff --git a/trunk/arch/arm/include/asm/processor.h b/trunk/arch/arm/include/asm/processor.h index 7bed3daf83b8..6a89567ffc5b 100644 --- a/trunk/arch/arm/include/asm/processor.h +++ b/trunk/arch/arm/include/asm/processor.h @@ -91,11 +91,7 @@ extern void release_thread(struct task_struct *); unsigned long get_wchan(struct task_struct *p); -#if __LINUX_ARM_ARCH__ == 6 -#define cpu_relax() smp_mb() -#else #define cpu_relax() barrier() -#endif /* * Create a new kernel thread diff --git a/trunk/arch/arm/mach-mx3/mach-mx31lilly.c b/trunk/arch/arm/mach-mx3/mach-mx31lilly.c index d3d5877c750e..b2c7f512070f 100644 --- a/trunk/arch/arm/mach-mx3/mach-mx31lilly.c +++ b/trunk/arch/arm/mach-mx3/mach-mx31lilly.c @@ -115,6 +115,8 @@ static struct platform_device physmap_flash_device = { /* USB */ +#if defined(CONFIG_USB_ULPI) + #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) @@ -244,10 +246,20 @@ static struct mxc_usbh_platform_data usbh2_pdata = { .flags = MXC_EHCI_POWER_PINS_ENABLED, }; -static struct platform_device *devices[] __initdata = { - &smsc91x_device, - &physmap_flash_device, -}; +static void lilly1131_usb_init(void) +{ + usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, + USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); + usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, + USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); + + mxc_register_device(&mxc_usbh1, &usbh1_pdata); + mxc_register_device(&mxc_usbh2, &usbh2_pdata); +} + +#else +static inline void lilly1131_usb_init(void) {} +#endif /* CONFIG_USB_ULPI */ /* SPI */ @@ -279,6 +291,11 @@ static struct spi_board_info mc13783_dev __initdata = { .platform_data = &mc13783_pdata, }; +static struct platform_device *devices[] __initdata = { + &smsc91x_device, + &physmap_flash_device, +}; + static int mx31lilly_baseboard; core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444); @@ -321,13 +338,7 @@ static void __init mx31lilly_board_init(void) platform_add_devices(devices, ARRAY_SIZE(devices)); /* USB */ - usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, - USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); - usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, - USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); - - mxc_register_device(&mxc_usbh1, &usbh1_pdata); - mxc_register_device(&mxc_usbh2, &usbh2_pdata); + lilly1131_usb_init(); } static void __init mx31lilly_timer_init(void) diff --git a/trunk/arch/arm/mach-pxa/mioa701.c b/trunk/arch/arm/mach-pxa/mioa701.c index fa6a708b4099..d60db87dde08 100644 --- a/trunk/arch/arm/mach-pxa/mioa701.c +++ b/trunk/arch/arm/mach-pxa/mioa701.c @@ -697,7 +697,7 @@ static struct i2c_board_info __initdata mioa701_pi2c_devices[] = { }; /* Board I2C devices. */ -static struct i2c_board_info mioa701_i2c_devices[] = { +static struct i2c_board_info __initdata mioa701_i2c_devices[] = { { I2C_BOARD_INFO("mt9m111", 0x5d), }, diff --git a/trunk/arch/arm/mach-pxa/z2.c b/trunk/arch/arm/mach-pxa/z2.c index d303c6929d32..f5d1ae3db3a4 100644 --- a/trunk/arch/arm/mach-pxa/z2.c +++ b/trunk/arch/arm/mach-pxa/z2.c @@ -3,9 +3,8 @@ * * Support for the Zipit Z2 Handheld device. * - * Copyright (C) 2009-2010 Marek Vasut - * - * Based on research and code by: Ken McGuire + * Author: Ken McGuire + * Created: Jan 25, 2009 * Based on mainstone.c as modified for the Zipit Z2. * * This program is free software; you can redistribute it and/or modify @@ -158,14 +157,21 @@ static struct mtd_partition z2_flash_parts[] = { { .name = "U-Boot Bootloader", .offset = 0x0, - .size = 0x40000, - }, { + .size = 0x20000, + }, + { + .name = "Linux Kernel", + .offset = 0x20000, + .size = 0x220000, + }, + { + .name = "Filesystem", + .offset = 0x240000, + .size = 0x5b0000, + }, + { .name = "U-Boot Environment", - .offset = 0x40000, - .size = 0x60000, - }, { - .name = "Flash", - .offset = 0x60000, + .offset = 0x7f0000, .size = MTDPART_SIZ_FULL, }, }; diff --git a/trunk/arch/arm/mach-realview/realview_eb.c b/trunk/arch/arm/mach-realview/realview_eb.c index 4425018fab82..422ccd70d5f5 100644 --- a/trunk/arch/arm/mach-realview/realview_eb.c +++ b/trunk/arch/arm/mach-realview/realview_eb.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -458,7 +457,7 @@ static void __init realview_eb_init(void) MACHINE_START(REALVIEW_EB, "ARM-RealView EB") /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ - .phys_io = REALVIEW_EB_UART0_BASE & SECTION_MASK, + .phys_io = REALVIEW_EB_UART0_BASE, .io_pg_offst = (IO_ADDRESS(REALVIEW_EB_UART0_BASE) >> 18) & 0xfffc, .boot_params = PHYS_OFFSET + 0x00000100, .fixup = realview_fixup, diff --git a/trunk/arch/arm/mach-realview/realview_pb1176.c b/trunk/arch/arm/mach-realview/realview_pb1176.c index 099a1f125cf8..96568ebfa2bb 100644 --- a/trunk/arch/arm/mach-realview/realview_pb1176.c +++ b/trunk/arch/arm/mach-realview/realview_pb1176.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include @@ -352,7 +351,7 @@ static void __init realview_pb1176_init(void) MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176") /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ - .phys_io = REALVIEW_PB1176_UART0_BASE & SECTION_MASK, + .phys_io = REALVIEW_PB1176_UART0_BASE, .io_pg_offst = (IO_ADDRESS(REALVIEW_PB1176_UART0_BASE) >> 18) & 0xfffc, .boot_params = PHYS_OFFSET + 0x00000100, .fixup = realview_pb1176_fixup, diff --git a/trunk/arch/arm/mach-realview/realview_pb11mp.c b/trunk/arch/arm/mach-realview/realview_pb11mp.c index 0e07a5ccb75f..7fbefbbebaf0 100644 --- a/trunk/arch/arm/mach-realview/realview_pb11mp.c +++ b/trunk/arch/arm/mach-realview/realview_pb11mp.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -374,7 +373,7 @@ static void __init realview_pb11mp_init(void) MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore") /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ - .phys_io = REALVIEW_PB11MP_UART0_BASE & SECTION_MASK, + .phys_io = REALVIEW_PB11MP_UART0_BASE, .io_pg_offst = (IO_ADDRESS(REALVIEW_PB11MP_UART0_BASE) >> 18) & 0xfffc, .boot_params = PHYS_OFFSET + 0x00000100, .fixup = realview_fixup, diff --git a/trunk/arch/arm/mach-realview/realview_pba8.c b/trunk/arch/arm/mach-realview/realview_pba8.c index ac2f06f1ca50..d3c113b3dfce 100644 --- a/trunk/arch/arm/mach-realview/realview_pba8.c +++ b/trunk/arch/arm/mach-realview/realview_pba8.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include @@ -324,7 +323,7 @@ static void __init realview_pba8_init(void) MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ - .phys_io = REALVIEW_PBA8_UART0_BASE & SECTION_MASK, + .phys_io = REALVIEW_PBA8_UART0_BASE, .io_pg_offst = (IO_ADDRESS(REALVIEW_PBA8_UART0_BASE) >> 18) & 0xfffc, .boot_params = PHYS_OFFSET + 0x00000100, .fixup = realview_fixup, diff --git a/trunk/arch/arm/mach-realview/realview_pbx.c b/trunk/arch/arm/mach-realview/realview_pbx.c index 08fd683adc4c..a235ba30996b 100644 --- a/trunk/arch/arm/mach-realview/realview_pbx.c +++ b/trunk/arch/arm/mach-realview/realview_pbx.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include @@ -410,7 +409,7 @@ static void __init realview_pbx_init(void) MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ - .phys_io = REALVIEW_PBX_UART0_BASE & SECTION_MASK, + .phys_io = REALVIEW_PBX_UART0_BASE, .io_pg_offst = (IO_ADDRESS(REALVIEW_PBX_UART0_BASE) >> 18) & 0xfffc, .boot_params = PHYS_OFFSET + 0x00000100, .fixup = realview_pbx_fixup, diff --git a/trunk/arch/arm/mach-vexpress/ct-ca9x4.c b/trunk/arch/arm/mach-vexpress/ct-ca9x4.c index 6353459bb567..9b11eedba65f 100644 --- a/trunk/arch/arm/mach-vexpress/ct-ca9x4.c +++ b/trunk/arch/arm/mach-vexpress/ct-ca9x4.c @@ -10,7 +10,6 @@ #include #include -#include #include #include #include @@ -237,7 +236,7 @@ static void ct_ca9x4_init(void) } MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4") - .phys_io = V2M_UART0 & SECTION_MASK, + .phys_io = V2M_UART0, .io_pg_offst = (__MMIO_P2V(V2M_UART0) >> 18) & 0xfffc, .boot_params = PHYS_OFFSET + 0x00000100, .map_io = ct_ca9x4_map_io, diff --git a/trunk/arch/arm/mm/Kconfig b/trunk/arch/arm/mm/Kconfig index fc1b2fa59429..346ae14824a5 100644 --- a/trunk/arch/arm/mm/Kconfig +++ b/trunk/arch/arm/mm/Kconfig @@ -735,25 +735,6 @@ config NEEDS_SYSCALL_FOR_CMPXCHG Forget about fast user space cmpxchg support. It is just not possible. -config DMA_CACHE_RWFO - bool "Enable read/write for ownership DMA cache maintenance" - depends on CPU_V6 && SMP - default y - help - The Snoop Control Unit on ARM11MPCore does not detect the - cache maintenance operations and the dma_{map,unmap}_area() - functions may leave stale cache entries on other CPUs. By - enabling this option, Read or Write For Ownership in the ARMv6 - DMA cache maintenance functions is performed. These LDR/STR - instructions change the cache line state to shared or modified - so that the cache operation has the desired effect. - - Note that the workaround is only valid on processors that do - not perform speculative loads into the D-cache. For such - processors, if cache maintenance operations are not broadcast - in hardware, other workarounds are needed (e.g. cache - maintenance broadcasting in software via FIQ). - config OUTER_CACHE bool diff --git a/trunk/arch/arm/mm/cache-v6.S b/trunk/arch/arm/mm/cache-v6.S index 86aa689ef1aa..e46ecd847138 100644 --- a/trunk/arch/arm/mm/cache-v6.S +++ b/trunk/arch/arm/mm/cache-v6.S @@ -211,9 +211,8 @@ v6_dma_inv_range: mcrne p15, 0, r1, c7, c15, 1 @ clean & invalidate unified line #endif 1: -#ifdef CONFIG_DMA_CACHE_RWFO - ldr r2, [r0] @ read for ownership - str r2, [r0] @ write for ownership +#ifdef CONFIG_SMP + str r0, [r0] @ write for ownership #endif #ifdef HARVARD_CACHE mcr p15, 0, r0, c7, c6, 1 @ invalidate D line @@ -235,7 +234,7 @@ v6_dma_inv_range: v6_dma_clean_range: bic r0, r0, #D_CACHE_LINE_SIZE - 1 1: -#ifdef CONFIG_DMA_CACHE_RWFO +#ifdef CONFIG_SMP ldr r2, [r0] @ read for ownership #endif #ifdef HARVARD_CACHE @@ -258,7 +257,7 @@ v6_dma_clean_range: ENTRY(v6_dma_flush_range) bic r0, r0, #D_CACHE_LINE_SIZE - 1 1: -#ifdef CONFIG_DMA_CACHE_RWFO +#ifdef CONFIG_SMP ldr r2, [r0] @ read for ownership str r2, [r0] @ write for ownership #endif @@ -284,13 +283,9 @@ ENTRY(v6_dma_map_area) add r1, r1, r0 teq r2, #DMA_FROM_DEVICE beq v6_dma_inv_range -#ifndef CONFIG_DMA_CACHE_RWFO - b v6_dma_clean_range -#else teq r2, #DMA_TO_DEVICE beq v6_dma_clean_range b v6_dma_flush_range -#endif ENDPROC(v6_dma_map_area) /* @@ -300,11 +295,6 @@ ENDPROC(v6_dma_map_area) * - dir - DMA direction */ ENTRY(v6_dma_unmap_area) -#ifndef CONFIG_DMA_CACHE_RWFO - add r1, r1, r0 - teq r2, #DMA_TO_DEVICE - bne v6_dma_inv_range -#endif mov pc, lr ENDPROC(v6_dma_unmap_area) diff --git a/trunk/arch/arm/mm/dma-mapping.c b/trunk/arch/arm/mm/dma-mapping.c index 9e7742f0a102..13fa536d82e6 100644 --- a/trunk/arch/arm/mm/dma-mapping.c +++ b/trunk/arch/arm/mm/dma-mapping.c @@ -24,6 +24,15 @@ #include #include +/* Sanity check size */ +#if (CONSISTENT_DMA_SIZE % SZ_2M) +#error "CONSISTENT_DMA_SIZE must be multiple of 2MiB" +#endif + +#define CONSISTENT_OFFSET(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PAGE_SHIFT) +#define CONSISTENT_PTE_INDEX(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PGDIR_SHIFT) +#define NUM_CONSISTENT_PTES (CONSISTENT_DMA_SIZE >> PGDIR_SHIFT) + static u64 get_coherent_dma_mask(struct device *dev) { u64 mask = ISA_DMA_THRESHOLD; @@ -114,15 +123,6 @@ static void __dma_free_buffer(struct page *page, size_t size) } #ifdef CONFIG_MMU -/* Sanity check size */ -#if (CONSISTENT_DMA_SIZE % SZ_2M) -#error "CONSISTENT_DMA_SIZE must be multiple of 2MiB" -#endif - -#define CONSISTENT_OFFSET(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PAGE_SHIFT) -#define CONSISTENT_PTE_INDEX(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PGDIR_SHIFT) -#define NUM_CONSISTENT_PTES (CONSISTENT_DMA_SIZE >> PGDIR_SHIFT) - /* * These are the page tables (2MB each) covering uncached, DMA consistent allocations */ diff --git a/trunk/arch/arm/plat-pxa/Makefile b/trunk/arch/arm/plat-pxa/Makefile index a17cc0c6a6b0..6187edfbcb77 100644 --- a/trunk/arch/arm/plat-pxa/Makefile +++ b/trunk/arch/arm/plat-pxa/Makefile @@ -2,9 +2,8 @@ # Makefile for code common across different PXA processor families # -obj-y := dma.o +obj-y := dma.o pmu.o -obj-$(CONFIG_ARCH_PXA) += pmu.o obj-$(CONFIG_GENERIC_GPIO) += gpio.o obj-$(CONFIG_PXA3xx) += mfp.o obj-$(CONFIG_ARCH_MMP) += mfp.o diff --git a/trunk/drivers/power/z2_battery.c b/trunk/drivers/power/z2_battery.c index 85064a9f649e..9cca465436e3 100644 --- a/trunk/drivers/power/z2_battery.c +++ b/trunk/drivers/power/z2_battery.c @@ -9,13 +9,19 @@ * */ +#include +#include #include -#include +#include +#include #include +#include +#include +#include #include #include -#include -#include +#include +#include #include #define Z2_DEFAULT_NAME "Z2"