09 Dec, 2006

1 commit

  • This facility provides three entry points:

    ilog2() Log base 2 of unsigned long
    ilog2_u32() Log base 2 of u32
    ilog2_u64() Log base 2 of u64

    These facilities can either be used inside functions on dynamic data:

    int do_something(long q)
    {
    ...;
    y = ilog2(x)
    ...;
    }

    Or can be used to statically initialise global variables with constant values:

    unsigned n = ilog2(27);

    When performing static initialisation, the compiler will report "error:
    initializer element is not constant" if asked to take a log of zero or of
    something not reducible to a constant. They treat negative numbers as
    unsigned.

    When not dealing with a constant, they fall back to using fls() which permits
    them to use arch-specific log calculation instructions - such as BSR on
    x86/x86_64 or SCAN on FRV - if available.

    [akpm@osdl.org: MMC fix]
    Signed-off-by: David Howells
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Herbert Xu
    Cc: David Howells
    Cc: Wojtek Kaniewski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

08 Dec, 2006

3 commits

  • Pass struct dev pointer to dma_cache_sync()

    dma_cache_sync() is ill-designed in that it does not have a struct device
    pointer argument which makes proper support for systems that consist of a
    mix of coherent and non-coherent DMA devices hard. Change dma_cache_sync
    to take a struct device pointer as first argument and fix all its callers
    to pass it.

    Signed-off-by: Ralf Baechle
    Cc: James Bottomley
    Cc: "David S. Miller"
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     
  • Move process freezing functions from include/linux/sched.h to freezer.h, so
    that modifications to the freezer or the kernel configuration don't require
    recompiling just about everything.

    [akpm@osdl.org: fix ueagle driver]
    Signed-off-by: Nigel Cunningham
    Cc: "Rafael J. Wysocki"
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nigel Cunningham
     
  • While working on SH kprobes, I noticed that avr32 got the preemption
    handling wrong in the no probe case. The idea is that upon entry of
    kprobe_handler() preemption is disabled outright across the life of the
    kprobe, only to be re-enabled in post_kprobe_handler().

    However, in the event that the probe is never activated, there's never any
    chance of hitting the post probe handler, which allows for the current
    avr32 implementation to disable preemption indefinitely, as it's currently
    missing a re-enable when no probe is activated.

    Signed-off-by: Paul Mundt
    Cc: Haavard Skinnemoen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mundt
     

06 Nov, 2006

4 commits


28 Oct, 2006

1 commit

  • Add a vmlinux.lds.h helper macro for defining the eight-level initcall table,
    teach all the architectures to use it.

    This is a prerequisite for a patch which performs initcall synchronisation for
    multithreaded-probing.

    Cc: Greg KH
    Signed-off-by: Andrew Morton
    [ Added AVR32 as well ]
    Signed-off-by: Haavard Skinnemoen
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

26 Oct, 2006

6 commits


12 Oct, 2006

1 commit


05 Oct, 2006

5 commits

  • Allow the board to remap actual USART peripheral devices to serial
    devices by calling at32_map_usart(hw_id, serial_line). This ensures
    that even though ATSTK1002 uses USART1 as the first serial port, it
    will still have a ttyS0 device.

    This also adds a board-specific early setup hook and moves the
    at32_setup_serial_console() call there from the platform code.

    Signed-off-by: Haavard Skinnemoen
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen
     
  • In order to initialize the serial console early, the atmel_serial
    driver had to do a hack where it compared the physical address of the
    port with an address known to be permanently mapped, and used it as a
    virtual address. This got around the limitation that ioremap() isn't
    always available when the console is being initalized.

    This patch removes that hack and replaces it with a new "regs" field
    in struct atmel_uart_data that the board-specific code can initialize
    to a fixed virtual mapping for platform devices where this is possible.
    It also initializes the DBGU's regs field with the address the driver
    used to check against.

    On AVR32, the "regs" field is initialized from the physical base
    address when this it can be accessed through a permanently 1:1 mapped
    segment, i.e. the P4 segment.

    If regs is NULL, the console initialization is delayed until the "real"
    driver is up and running and ioremap() can be used.

    Signed-off-by: Haavard Skinnemoen
    Acked-by: Andrew Victor
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen
     
  • Rename the following public definitions:
    * AT91_NR_UART -> ATMEL_MAX_UART
    * struct at91_uart_data -> struct atmel_uart_data
    * at91_default_console_device -> atmel_default_console_device

    Signed-off-by: Haavard Skinnemoen
    Acked-by: Andrew Victor
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen
     
  • Rename the "at91_usart" platform driver "atmel_usart" and update
    platform devices accordingly.

    Signed-off-by: Haavard Skinnemoen
    Acked-by: Andrew Victor
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen
     
  • Rename the following Kconfig symbols:
    * CONFIG_SERIAL_AT91 -> CONFIG_SERIAL_ATMEL
    * CONFIG_SERIAL_AT91_CONSOLE -> CONFIG_SERIAL_ATMEL_CONSOLE
    * CONFIG_SERIAL_AT91_TTYAT -> CONFIG_SERIAL_ATMEL_TTYAT

    Signed-off-by: Haavard Skinnemoen
    Acked-by: Andrew Victor
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen
     

02 Oct, 2006

1 commit

  • Move execve() into arch/avr32/kernel/sys_avr32.c, rename it to
    kernel_execve() and return the syscall return value directly without
    setting errno.

    This also gets rid of the __KERNEL_SYSCALLS__ stuff from unistd.h and
    expands #ifdef __KERNEL__ to cover everything in unistd.h except the
    __NR_foo definitions.

    Signed-off-by: Haavard Skinnemoen
    Cc: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen
     

01 Oct, 2006

1 commit


30 Sep, 2006

1 commit

  • Pass ticks to do_timer() and update_times(), and adjust x86_64 and s390
    timer interrupt handler with this change.

    Currently update_times() calculates ticks by "jiffies - wall_jiffies", but
    callers of do_timer() should know how many ticks to update. Passing ticks
    get rid of this redundant calculation. Also there are another redundancy
    pointed out by Martin Schwidefsky.

    This cleanup make a barrier added by
    5aee405c662ca644980c184774277fc6d0769a84 needless. So this patch removes
    it.

    As a bonus, this cleanup make wall_jiffies can be removed easily, since now
    wall_jiffies is always synced with jiffies. (This patch does not really
    remove wall_jiffies. It would be another cleanup patch)

    Signed-off-by: Atsushi Nemoto
    Cc: Martin Schwidefsky
    Cc: "Eric W. Biederman"
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: john stultz
    Cc: Andi Kleen
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Acked-by: Russell King
    Cc: Ian Molton
    Cc: Mikael Starvik
    Acked-by: David Howells
    Cc: Yoshinori Sato
    Cc: Hirokazu Takata
    Acked-by: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Richard Curnow
    Cc: William Lee Irwin III
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Cc: Miles Bader
    Cc: Chris Zankel
    Acked-by: "Luck, Tony"
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     

27 Sep, 2006

1 commit


26 Sep, 2006

3 commits

  • FRegister a platform device for the AT49BV6416 NOR flash chip on the ATSTK1000
    development board for use by the physmap MTD driver.

    The SMC timings are set up before the platform device is registered so that no
    board-specific mapping driver is necessary.

    Signed-off-by: Haavard Skinnemoen
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen
     
  • This patchset adds the necessary drivers and infrastructure to access the
    external flash on the ATSTK1000 board through the MTD subsystem. With this
    stuff in place, it will be possible to use a jffs2 filesystem stored in the
    external flash as a root filesystem. It might also be possible to update the
    boot loader if you drop the write protection of partition 0.

    As suggested by David Woodhouse, I reworked the patches to use the physmap
    driver instead of introducing a separate mapping driver for the ATSTK1000.
    I've also cleaned up the hsmc header by removing useless comments and
    converting spaces to tabs (my headerfile generator needs some work.)

    Unfortunately, I couldn't unlock the flash in fixup_use_atmel_lock because the
    erase regions hadn't been set up yet, so I had to do it from cfi_amdstd_setup
    instead.

    This patch:

    This adds a simple API for configuring the static memory controller along with
    an implementation for the Atmel HSMC.

    Signed-off-by: Haavard Skinnemoen
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen
     
  • This adds support for the Atmel AVR32 architecture as well as the AT32AP7000
    CPU and the AT32STK1000 development board.

    AVR32 is a new high-performance 32-bit RISC microprocessor core, designed for
    cost-sensitive embedded applications, with particular emphasis on low power
    consumption and high code density. The AVR32 architecture is not binary
    compatible with earlier 8-bit AVR architectures.

    The AVR32 architecture, including the instruction set, is described by the
    AVR32 Architecture Manual, available from

    http://www.atmel.com/dyn/resources/prod_documents/doc32000.pdf

    The Atmel AT32AP7000 is the first CPU implementing the AVR32 architecture. It
    features a 7-stage pipeline, 16KB instruction and data caches and a full
    Memory Management Unit. It also comes with a large set of integrated
    peripherals, many of which are shared with the AT91 ARM-based controllers from
    Atmel.

    Full data sheet is available from

    http://www.atmel.com/dyn/resources/prod_documents/doc32003.pdf

    while the CPU core implementation including caches and MMU is documented by
    the AVR32 AP Technical Reference, available from

    http://www.atmel.com/dyn/resources/prod_documents/doc32001.pdf

    Information about the AT32STK1000 development board can be found at

    http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3918

    including a BSP CD image with an earlier version of this patch, development
    tools (binaries and source/patches) and a root filesystem image suitable for
    booting from SD card.

    Alternatively, there's a preliminary "getting started" guide available at
    http://avr32linux.org/twiki/bin/view/Main/GettingStarted which provides links
    to the sources and patches you will need in order to set up a cross-compiling
    environment for avr32-linux.

    This patch, as well as the other patches included with the BSP and the
    toolchain patches, is actively supported by Atmel Corporation.

    [dmccr@us.ibm.com: Fix more pxx_page macro locations]
    [bunk@stusta.de: fix `make defconfig']
    Signed-off-by: Haavard Skinnemoen
    Signed-off-by: Adrian Bunk
    Signed-off-by: Dave McCracken
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen