Merge branches 'consolidate', 'ep93xx', 'fixes', 'misc', 'mmci', 'remove' and 'spear...
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 23 May 2011 18:27:40 +0000 (19:27 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 23 May 2011 18:27:40 +0000 (19:27 +0100)
1  2  3  4  5  6  7 
arch/arm/Kconfig
arch/arm/Makefile
arch/arm/boot/compressed/head.S
arch/arm/mm/flush.c
arch/arm/plat-spear/include/plat/clock.h

diff --combined arch/arm/Kconfig
@@@@@@@@ -28,7 -28,7 -28,7 -28,7 -28,7 -28,7 -28,6 +28,7 @@@@@@@@ config AR
        select HAVE_C_RECORDMCOUNT
        select HAVE_GENERIC_HARDIRQS
        select HAVE_SPARSE_IRQ
      + select GENERIC_IRQ_SHOW
        help
          The ARM series is a line of low-power-consumption RISC chip designs
          licensed by ARM Ltd and targeted at embedded applications and
@@@@@@@@ -197,15 -197,15 -197,15 -197,21 -197,15 -197,15 -196,15 +197,21 @@@@@@@@ config ARM_PATCH_PHYS_VIR
        depends on !XIP_KERNEL && MMU
        depends on !ARCH_REALVIEW || !SPARSEMEM
        help
--- ---   Patch phys-to-virt translation functions at runtime according to
--- ---   the position of the kernel in system memory.
+++ +++   Patch phys-to-virt and virt-to-phys translation functions at
+++ +++   boot and module load time according to the position of the
+++ +++   kernel in system memory.
       
--- ---   This can only be used with non-XIP with MMU kernels where
--- ---   the base of physical memory is at a 16MB boundary.
+++ +++   This can only be used with non-XIP MMU kernels where the base
+++ +++   of physical memory is at a 16MB boundary, or theoretically 64K
+++ +++   for the MSM machine class.
       
       config ARM_PATCH_PHYS_VIRT_16BIT
        def_bool y
        depends on ARM_PATCH_PHYS_VIRT && ARCH_MSM
+++ +++ help
+++ +++   This option extends the physical to virtual translation patching
+++ +++   to allow physical memory down to a theoretical minimum of 64K
+++ +++   boundaries.
       
       source "init/Kconfig"
       
@@@@@@@@ -297,7 -297,6 -297,6 -303,6 -297,6 -297,6 -296,6 +303,7 @@@@@@@@ config ARCH_BCMRIN
        depends on MMU
        select CPU_V6
        select ARM_AMBA
 ++++++ select ARM_TIMER_SP804
        select CLKDEV_LOOKUP
        select GENERIC_CLOCKEVENTS
        select ARCH_WANT_OPTIONAL_GPIOLIB
@@@@@@@@ -367,8 -366,7 -366,7 -372,7 -366,7 -366,7 -365,6 +373,8 @@@@@@@@ config ARCH_MX
        select GENERIC_CLOCKEVENTS
        select ARCH_REQUIRE_GPIOLIB
        select CLKDEV_LOOKUP
 ++++++ select CLKSRC_MMIO
      + select HAVE_SCHED_CLOCK
        help
          Support for Freescale MXC/iMX-based family of processors
       
@@@@@@@@ -377,13 -375,21 -375,21 -381,21 -375,21 -375,21 -373,21 +383,13 @@@@@@@@ config ARCH_MX
        select GENERIC_CLOCKEVENTS
        select ARCH_REQUIRE_GPIOLIB
        select CLKDEV_LOOKUP
 ++++++ select CLKSRC_MMIO
        help
          Support for Freescale MXS-based family of processors
       
 ------config ARCH_STMP3XXX
 ------ bool "Freescale STMP3xxx"
 ------ select CPU_ARM926T
 ------ select CLKDEV_LOOKUP
 ------ select ARCH_REQUIRE_GPIOLIB
 ------ select GENERIC_CLOCKEVENTS
 ------ select USB_ARCH_HAS_EHCI
 ------ help
 ------   Support for systems based on the Freescale 3xxx CPUs.
 ------
       config ARCH_NETX
        bool "Hilscher NetX based"
 ++++++ select CLKSRC_MMIO
        select CPU_ARM926T
        select ARM_VIC
        select GENERIC_CLOCKEVENTS
@@@@@@@@ -451,7 -457,6 -457,6 -463,6 -457,6 -457,6 -455,6 +457,7 @@@@@@@@ config ARCH_IXP200
       config ARCH_IXP4XX
        bool "IXP4xx-based"
        depends on MMU
 ++++++ select CLKSRC_MMIO
        select CPU_XSCALE
        select GENERIC_GPIO
        select GENERIC_CLOCKEVENTS
@@@@@@@@ -492,7 -497,6 -497,6 -503,6 -497,6 -497,6 -495,6 +498,7 @@@@@@@@ config ARCH_LOK
       
       config ARCH_LPC32XX
        bool "NXP LPC32XX"
 ++++++ select CLKSRC_MMIO
        select CPU_ARM926T
        select ARCH_REQUIRE_GPIOLIB
        select HAVE_IDE
@@@@@@@@ -550,24 -554,23 -554,23 -560,23 -554,23 -554,11 -552,23 +556,12 @@@@@@@@ config ARCH_KS869
          Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based
          System-on-Chip devices.
       
----- -config ARCH_NS9XXX
----- - bool "NetSilicon NS9xxx"
----- - select CPU_ARM926T
----- - select GENERIC_GPIO
----- - select GENERIC_CLOCKEVENTS
----- - select HAVE_CLK
----- - help
----- -   Say Y here if you intend to run this kernel on a NetSilicon NS9xxx
----- -   System.
----- -
----- -   <http://www.digi.com/products/microprocessors/index.jsp>
----- -
       config ARCH_W90X900
        bool "Nuvoton W90X900 CPU"
        select CPU_ARM926T
        select ARCH_REQUIRE_GPIOLIB
        select CLKDEV_LOOKUP
 ++++++ select CLKSRC_MMIO
        select GENERIC_CLOCKEVENTS
        help
          Support for Nuvoton (Winbond logic dept.) ARM9 processor,
@@@@@@@@ -589,7 -592,6 -592,6 -598,6 -592,6 -580,6 -590,6 +583,7 @@@@@@@@ config ARCH_NUC93
       config ARCH_TEGRA
        bool "NVIDIA Tegra"
        select CLKDEV_LOOKUP
 ++++++ select CLKSRC_MMIO
        select GENERIC_TIME
        select GENERIC_CLOCKEVENTS
        select GENERIC_GPIO
@@@@@@@@ -615,7 -617,6 -617,6 -623,6 -617,6 -605,6 -615,6 +609,7 @@@@@@@@ config ARCH_PX
        select ARCH_MTD_XIP
        select ARCH_HAS_CPUFREQ
        select CLKDEV_LOOKUP
 ++++++ select CLKSRC_MMIO
        select ARCH_REQUIRE_GPIOLIB
        select GENERIC_CLOCKEVENTS
        select HAVE_SCHED_CLOCK
@@@@@@@@ -666,7 -667,6 -667,6 -673,6 -667,6 -655,6 -665,6 +660,7 @@@@@@@@ config ARCH_RP
       
       config ARCH_SA1100
        bool "SA1100-based"
 ++++++ select CLKSRC_MMIO
        select CPU_SA1100
        select ISA
        select ARCH_SPARSEMEM_ENABLE
@@@@@@@@ -694,7 -694,7 -694,7 -700,7 -694,7 -682,7 -692,7 +688,7 @@@@@@@@ config ARCH_S3C241
          the Samsung SMDK2410 development board (and derivatives).
       
          Note, the S3C2416 and the S3C2450 are so close that they even share
      -   the same SoC ID code. This means that there is no seperate machine
      +   the same SoC ID code. This means that there is no separate machine
          directory (no arch/arm/mach-s3c2450) as the S3C2416 was first.
       
       config ARCH_S3C64XX
@@@@@@@@ -803,7 -803,6 -803,6 -809,6 -803,6 -791,6 -801,6 +797,7 @@@@@@@@ config ARCH_SHAR
       
       config ARCH_TCC_926
        bool "Telechips TCC ARM926-based systems"
 ++++++ select CLKSRC_MMIO
        select CPU_ARM926T
        select HAVE_CLK
        select CLKDEV_LOOKUP
       config ARCH_U300
        bool "ST-Ericsson U300 Series"
        depends on MMU
 ++++++ select CLKSRC_MMIO
        select CPU_ARM926T
        select HAVE_SCHED_CLOCK
        select HAVE_TCM
@@@@@@@@ -876,7 -874,6 -874,6 -880,6 -874,6 -862,6 -872,6 +870,7 @@@@@@@@ config PLAT_SPEA
        select ARM_AMBA
        select ARCH_REQUIRE_GPIOLIB
        select CLKDEV_LOOKUP
 ++++++ select CLKSRC_MMIO
        select GENERIC_CLOCKEVENTS
        select HAVE_CLK
        help
@@@@@@@@ -954,8 -951,8 -951,8 -957,8 -951,8 -939,6 -949,8 +948,6 @@@@@@@@ source "arch/arm/mach-netx/Kconfig
       source "arch/arm/mach-nomadik/Kconfig"
       source "arch/arm/plat-nomadik/Kconfig"
       
----- -source "arch/arm/mach-ns9xxx/Kconfig"
----- -
       source "arch/arm/mach-nuc93x/Kconfig"
       
       source "arch/arm/plat-omap/Kconfig"
@@@@@@@@ -1008,6 -1005,8 -1005,8 -1011,8 -1005,8 -991,8 -1003,8 +1000,6 @@@@@@@@ source "arch/arm/mach-exynos4/Kconfig
       
       source "arch/arm/mach-shmobile/Kconfig"
       
 ------source "arch/arm/plat-stmp3xxx/Kconfig"
 ------
       source "arch/arm/mach-tegra/Kconfig"
       
       source "arch/arm/mach-u300/Kconfig"
@@@@@@@@ -1034,7 -1033,6 -1033,6 -1039,6 -1033,6 -1019,6 -1031,6 +1026,7 @@@@@@@@ config PLAT_IO
       
       config PLAT_ORION
        bool
 ++++++ select CLKSRC_MMIO
        select HAVE_SCHED_CLOCK
       
       config PLAT_PXA
@@@@@@@@ -1045,7 -1043,6 -1043,6 -1049,6 -1043,6 -1029,6 -1041,6 +1037,7 @@@@@@@@ config PLAT_VERSATIL
       
       config ARM_TIMER_SP804
        bool
 ++++++ select CLKSRC_MMIO
       
       source arch/arm/mm/Kconfig
       
@@@@@@@@ -1321,8 -1318,8 -1318,8 -1324,7 -1318,8 -1304,8 -1316,8 +1313,7 @@@@@@@@ menu "Kernel Features
       source "kernel/time/Kconfig"
       
       config SMP
--- --- bool "Symmetric Multi-Processing (EXPERIMENTAL)"
--- --- depends on EXPERIMENTAL
+++ +++ bool "Symmetric Multi-Processing"
        depends on CPU_V6K || CPU_V7
        depends on GENERIC_CLOCKEVENTS
        depends on REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP || \
@@@@@@@@ -1524,8 -1521,8 -1521,8 -1526,8 -1521,8 -1507,8 -1519,8 +1515,8 @@@@@@@@ config ARCH_SELECT_MEMORY_MODE
        def_bool ARCH_SPARSEMEM_ENABLE
       
       config HIGHMEM
--- --- bool "High Memory Support (EXPERIMENTAL)"
--- --- depends on MMU && EXPERIMENTAL
+++ +++ bool "High Memory Support"
+++ +++ depends on MMU
        help
          The address space of ARM processors is only 4 Gigabytes large
          and it has to accommodate user address space, kernel address
       config HIGHPTE
        bool "Allocate 2nd-level pagetables from highmem"
        depends on HIGHMEM
      - depends on !OUTER_CACHE
       
       config HW_PERF_EVENTS
        bool "Enable hardware performance counter support for perf events"
          time by entering them here. As a minimum, you should specify the
          memory size and the root device (e.g., mem=64M root=/dev/nfs).
       
+++ +++choice
+++ +++ prompt "Kernel command line type" if CMDLINE != ""
+++ +++ default CMDLINE_FROM_BOOTLOADER
+++ +++
+++ +++config CMDLINE_FROM_BOOTLOADER
+++ +++ bool "Use bootloader kernel arguments if available"
+++ +++ help
+++ +++   Uses the command-line options passed by the boot loader. If
+++ +++   the boot loader doesn't provide any, the default kernel command
+++ +++   string provided in CMDLINE will be used.
+++ +++
+++ +++config CMDLINE_EXTEND
+++ +++ bool "Extend bootloader kernel arguments"
+++ +++ help
+++ +++   The command-line arguments provided by the boot loader will be
+++ +++   appended to the default kernel command string.
+++ +++
       config CMDLINE_FORCE
        bool "Always use the default kernel command string"
--- --- depends on CMDLINE != ""
        help
          Always use the default kernel command string, even if the boot
          loader passes other arguments to the kernel.
          This is useful if you cannot or don't want to change the
          command-line options your boot loader passes to the kernel.
--- ---
--- ---   If unsure, say N.
+++ +++endchoice
       
       config XIP_KERNEL
        bool "Kernel Execute-In-Place from ROM"
@@@@@@@@ -2013,9 -2010,9 -2010,9 -2030,9 -2010,9 -1996,9 -2009,6 +2019,9 @@@@@@@@ menu "Power management options
       source "kernel/power/Kconfig"
       
       config ARCH_SUSPEND_POSSIBLE
-- ---  depends on !ARCH_S5P64X0 && !ARCH_S5P6442
++ ++++ depends on !ARCH_S5P64X0 && !ARCH_S5P6442 && !ARCH_S5PC100
      + depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \
      +         CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE
        def_bool y
       
       endmenu
diff --combined arch/arm/Makefile
@@@@@@@@ -164,7 -164,7 -164,7 -164,7 -164,7 -164,6 -164,7 +164,6 @@@@@@@@ machine-$(CONFIG_ARCH_MXC91231)               := mxc
       machine-$(CONFIG_ARCH_MXS)               := mxs
       machine-$(CONFIG_ARCH_NETX)              := netx
       machine-$(CONFIG_ARCH_NOMADIK)           := nomadik
----- -machine-$(CONFIG_ARCH_NS9XXX)            := ns9xxx
       machine-$(CONFIG_ARCH_OMAP1)             := omap1
       machine-$(CONFIG_ARCH_OMAP2)             := omap2
       machine-$(CONFIG_ARCH_OMAP3)             := omap2
@@@@@@@@ -185,6 -185,8 -185,8 -185,8 -185,8 -184,8 -185,8 +184,6 @@@@@@@@ machine-$(CONFIG_ARCH_EXYNOS4)                := exyn
       machine-$(CONFIG_ARCH_SA1100)            := sa1100
       machine-$(CONFIG_ARCH_SHARK)             := shark
       machine-$(CONFIG_ARCH_SHMOBILE)  := shmobile
 ------machine-$(CONFIG_ARCH_STMP378X)          := stmp378x
 ------machine-$(CONFIG_ARCH_STMP37XX)          := stmp37xx
       machine-$(CONFIG_ARCH_TCC8K)             := tcc8k
       machine-$(CONFIG_ARCH_TEGRA)             := tegra
       machine-$(CONFIG_ARCH_U300)              := u300
@@@@@@@@ -205,6 -207,7 -207,7 -207,7 -207,7 -206,7 -207,7 +204,6 @@@@@@@@ machine-$(CONFIG_MACH_SPEAR600)               := spe
       plat-$(CONFIG_ARCH_MXC)          := mxc
       plat-$(CONFIG_ARCH_OMAP) := omap
       plat-$(CONFIG_ARCH_S3C64XX)      := samsung
 ------plat-$(CONFIG_ARCH_STMP3XXX)     := stmp3xxx
       plat-$(CONFIG_ARCH_TCC_926)      := tcc
       plat-$(CONFIG_PLAT_IOP)          := iop
       plat-$(CONFIG_PLAT_NOMADIK)      := nomadik
       
       #if defined(CONFIG_DEBUG_ICEDCC)
       
      -#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K)
      +#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7)
                .macro  loadsp, rb, tmp
                .endm
                .macro  writeb, ch, rb
                mcr     p14, 0, \ch, c0, c5, 0
                .endm
      -#elif defined(CONFIG_CPU_V7)
      -         .macro  loadsp, rb, tmp
      -         .endm
      -         .macro  writeb, ch, rb
      -wait:            mrc     p14, 0, pc, c0, c1, 0
      -         bcs     wait
      -         mcr     p14, 0, \ch, c0, c5, 0
      -         .endm
       #elif defined(CONFIG_CPU_XSCALE)
                .macro  loadsp, rb, tmp
                .endm
                bl      cache_on
       
       restart: adr     r0, LC0
 - ----         ldmia   r0, {r1, r2, r3, r5, r6, r9, r11, r12}
 - ----         ldr     sp, [r0, #32]
 + ++++         ldmia   r0, {r1, r2, r3, r6, r9, r11, r12}
 + ++++         ldr     sp, [r0, #28]
       
                /*
                 * We might be running at a different address.  We need
                 * to fix up various pointers.
                 */
                sub     r0, r0, r1              @ calculate the delta offset
 - ----         add     r5, r5, r0              @ _start
                add     r6, r6, r0              @ _edata
       
       #ifndef CONFIG_ZBOOT_ROM
       /*
        * Check to see if we will overwrite ourselves.
        *   r4  = final kernel address
 - ---- *   r5  = start of this image
        *   r9  = size of decompressed image
        *   r10 = end of this image, including  bss/stack/malloc space if non XIP
        * We basically want:
 - ---- *   r4 >= r10 -> OK
 - ---- *   r4 + image length <= r5 -> OK
 + ++++ *   r4 - 16k page directory >= r10 -> OK
 + ++++ *   r4 + image length <= current position (pc) -> OK
        */
 + ++++         add     r10, r10, #16384
                cmp     r4, r10
                bhs     wont_overwrite
                add     r10, r4, r9
 - ----         cmp     r10, r5
 + ++++   ARM(          cmp     r10, pc         )
 + ++++ THUMB(          mov     lr, pc          )
 + ++++ THUMB(          cmp     r10, lr         )
                bls     wont_overwrite
       
       /*
        * Relocate ourselves past the end of the decompressed kernel.
 - ---- *   r5  = start of this image
        *   r6  = _edata
        *   r10 = end of the decompressed kernel
        * Because we always copy ahead, we need to do it from the end and go
        * backward in case the source and destination overlap.
        */
 - ----         /* Round up to next 256-byte boundary. */
 - ----         add     r10, r10, #256
 + ++++         /*
 + ++++          * Bump to the next 256-byte boundary with the size of
 + ++++          * the relocation code added. This avoids overwriting
 + ++++          * ourself when the offset is small.
 + ++++          */
 + ++++         add     r10, r10, #((reloc_code_end - restart + 256) & ~255)
                bic     r10, r10, #255
       
 + ++++         /* Get start of code we want to copy and align it down. */
 + ++++         adr     r5, restart
 + ++++         bic     r5, r5, #31
 + ++++
                sub     r9, r6, r5              @ size to copy
                add     r9, r9, #31             @ rounded up to a multiple
                bic     r9, r9, #31             @ ... of 32 bytes
                /* Preserve offset to relocated code. */
                sub     r6, r9, r6
       
 + ++++#ifndef CONFIG_ZBOOT_ROM
 + ++++         /* cache_clean_flush may use the stack, so relocate it */
 + ++++         add     sp, sp, r6
 + ++++#endif
 + ++++
                bl      cache_clean_flush
       
                adr     r0, BSYM(restart)
@@@@@@@@ -346,6 -333,7 -346,6 -333,7 -333,7 -333,7 -341,7 +346,6 @@@@@@@@ not_relocated:        mov     r0, #
       LC0:             .word   LC0                     @ r1
                .word   __bss_start             @ r2
                .word   _end                    @ r3
 - ----         .word   _start                  @ r5
                .word   _edata                  @ r6
                .word   _image_size             @ r9
                .word   _got_start              @ r11
@@@@@@@@ -459,7 -447,7 -459,7 -447,11 -447,7 -447,7 -455,7 +459,11 @@@@@@@@ __setup_mmu:        sub     r3, r4, #16384          @ Pag
                orr     r1, r1, #3 << 10
                add     r2, r3, #16384
       1:               cmp     r1, r9                  @ if virt > start of RAM
+++ +++#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
+++ +++         orrhs   r1, r1, #0x08           @ set cacheable
+++ +++#else
                orrhs   r1, r1, #0x0c           @ set cacheable, bufferable
+++ +++#endif
                cmp     r1, r10                 @ if virt > end of RAM
                bichs   r1, r1, #0x0c           @ clear cacheable, bufferable
                str     r1, [r0], #4            @ 1:1 mapping
                mov     pc, lr
       ENDPROC(__setup_mmu)
       
+++ +++__arm926ejs_mmu_cache_on:
+++ +++#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
+++ +++         mov     r0, #4                  @ put dcache in WT mode
+++ +++         mcr     p15, 7, r0, c15, c0, 0
+++ +++#endif
+++ +++
       __armv4_mmu_cache_on:
                mov     r12, lr
       #ifdef CONFIG_MMU
@@@@@@@@ -664,7 -652,7 -664,7 -662,13 -652,7 -652,7 -660,7 +674,13 @@@@@@@@ proc_types
                W(b)    __armv4_mpu_cache_on
                W(b)    __armv4_mpu_cache_off
                W(b)    __armv4_mpu_cache_flush
+ +    
+++ +++         .word   0x41069260              @ ARM926EJ-S (v5TEJ)
+++ +++         .word   0xff0ffff0
+++ +++         b       __arm926ejs_mmu_cache_on
+++ +++         b       __armv4_mmu_cache_off
+++ +++         b       __armv5tej_mmu_cache_flush
 +  +++
                .word   0x00007000              @ ARM7 IDs
                .word   0x0000f000
                mov     pc, lr
@@@@@@@@ -1074,7 -1062,6 -1074,7 -1078,6 -1062,6 -1062,6 -1070,6 +1090,7 @@@@@@@@ memdump:      mov     r12, r
       #endif
       
                .ltorg
 + ++++reloc_code_end:
       
                .align
                .section ".stack", "aw", %nobits
diff --combined arch/arm/mm/flush.c
@@@@@@@@ -253,8 -253,8 -253,8 -253,8 -253,8 -253,8 -253,8 +253,8 @@@@@@@@ void __sync_icache_dcache(pte_t pteval
       
        if (!test_and_set_bit(PG_dcache_clean, &page->flags))
                __flush_dcache_page(mapping, page);
--- --- /* pte_exec() already checked above for non-aliasing VIPT cache */
--- --- if (cache_is_vipt_nonaliasing() || pte_exec(pteval))
+++ +++
+++ +++ if (pte_exec(pteval))
                __flush_icache_all();
       }
       #endif
        *  kernel cache lines for later.  Otherwise, we assume we have
        *  aliasing mappings.
        *
-- ---- * Note that we disable the lazy flush for SMP.
++ ++++ * Note that we disable the lazy flush for SMP configurations where
++ ++++ * the cache maintenance operations are not automatically broadcasted.
        */
       void flush_dcache_page(struct page *page)
       {
@@@@@@@@ -89,7 -89,7 -89,7 -89,7 -89,7 -89,7 -89,7 +89,7 @@@@@@@@ struct rate_config 
        * @sibling: node for list of clocks having same parents
        * @private_data: clock specific private data
        * @node: list to maintain clocks linearly
      - * @cl: clocklook up assoicated with this clock
      + * @cl: clocklook up associated with this clock
        * @dent: object for debugfs
        */
       struct clk {
@@@@@@@@ -224,6 -224,6 -224,6 -224,6 -224,6 -224,6 -224,7 +224,7 @@@@@@@@ struct clcd_rate_tbl 
       };
       
       /* platform specific clock functions */
++++++ void __init clk_init(void);
       void clk_register(struct clk_lookup *cl);
       void recalc_root_clocks(void);