21 Jul, 2007

2 commits

  • 1. split pxa_cpu_suspend to pxa25x_cpu_suspend and pxa27x_cpu_suspend
    and make pxa25x_cpu_pm_enter() and pxa27x_cpu_pm_enter() to invoke
    the corresponding _suspend functions, thus remove all those ugly
    #ifdef .. #endif out of sleep.S

    2. move the declarations of those suspend functions to pm.h

    note: this is not a clean enough solution until all the pxa25x and
    pxa27x specific part is further removed out of sleep.S, sleep.S is
    supposed to contain generic code only

    Signed-off-by: eric miao
    Signed-off-by: Russell King

    Eric Miao
     
  • 1. introduce a structure pxa_cpu_pm_fns for pxa25x/pxa27x specific
    operations as follows:

    struct pxa_cpu_pm_fns {
    int save_size;
    void (*save)(unsigned long *);
    void (*restore)(unsigned long *);
    int (*valid)(suspend_state_t state);
    void (*enter)(suspend_state_t state);
    }

    2. processor specific registers saving and restoring are performed
    by calling the corresponding (*save) and (*restore)

    3. pxa_cpu_pm_fns->save_size should be initialized to the required
    size for processor specific registers saving, the allocated
    memory address will be passed to (*save) and (*restore)

    memory allocation happens early in pxa_pm_init(), and save_size
    should be assigned prior to this (which is usually true, since
    pxa_pm_init() happens in device_initcall()

    4. there're some redundancies for those SLEEP_SAVE_XXX and related
    macros, will be fixed later, one way possible is for the system
    devices to handle the specific registers saving and restoring

    Signed-off-by: eric miao
    Signed-off-by: Russell King

    Eric Miao
     

13 Jul, 2007

1 commit


12 Jul, 2007

7 commits

  • Since the number of dma channels varies between pxa25x and pxa27x, it
    introduces some specific code in dma.c. This patch moves the specific
    code to pxa25x.c and pxa27x.c and makes dma.c more generic.

    1. add pxa_init_dma() for dma initialization, the number of channels
    are passed in by the argument

    2. add a "prio" field to the "struct pxa_dma_channel" for the channel
    priority, and is initialized in pxa_init_dma()

    3. use a general priority comparison with the channels "prio" field so
    to remove the processor specific pxa_for_each_dma_prio macro, this
    is not lightning fast as the original one, but it is acceptable as
    it happens when requesting dma, which is usually not so performance
    critical

    Signed-off-by: eric miao
    Acked-by: Nicolas Pitre
    Signed-off-by: Russell King

    Eric Miao
     
  • ICIP2 is not examined during IRQ entrance, this patch add the
    checking if the processor is PXA27x or later, with CoreG bits
    in CPUID (Core Generation) > 1

    Signed-off-by: eric miao
    Signed-off-by: Russell King

    Eric Miao
     
  • 1. define PXA_GPIO_IRQ_BASE to be right after the internal IRQs,
    and define PXA_GPIO_IRQ_NUM to be 128 for all PXA2xx variants

    2. make the code specific to the high IRQ numbers (32..64) to be
    PXA27x specific

    3. add a function pxa_init_irq_high() to initialize the internal
    high IRQ chip, the invoke of this function could be moved to
    PXA27x specific initialization code

    Signed-off-by: eric miao
    Signed-off-by: Russell King

    Eric Miao
     
  • 1. PXA_IRQ_SKIP is defined to be 7 on PXA25x so that the first IRQ
    starts from zero. This makes IRQ numbering inconsistent between
    PXA25x and PXA27x. Remove this macro so that the same IRQ_XXXXX
    definition has the same value on both PXA25x and PXA27x.

    2. make IRQ_SSP3..IRQ_PWRI2C valid only if PXA27x is defined, this
    avoids unintentional use of these macros on PXA25x

    Signed-off-by: eric miao
    Signed-off-by: Russell King

    Eric Miao
     
  • Signed-off-by: Russell King

    Russell King
     
  • pxamci.h redefines the MMC registers differently so they can be used
    with ioremap. Remove the incompatible definitions from pxa-regs.h.

    Signed-off-by: Russell King

    Russell King
     
  • pxa_pm_finish() does nothing but return zero. The core code
    does nothing with this return value, and will not try to call
    the finish method in the pm_ops structure if it is NULL.

    Therefore, we can remove this useless function.

    Signed-off-by: Russell King

    Russell King
     

03 Jun, 2007

1 commit


07 May, 2007

1 commit

  • * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (82 commits)
    [ARM] Add comments marking in-use ptrace numbers
    [ARM] Move syscall saving out of the way of utrace
    [ARM] 4360/1: S3C24XX: regs-udc.h remove unused macro
    [ARM] 4358/1: S3C24XX: mach-qt2410.c: remove linux/mmc/protocol.h header
    [ARM] mm 10: allow memory type to be specified with ioremap
    [ARM] mm 9: add additional device memory types
    [ARM] mm 8: define mem_types table L1 bit 4 to be for ARMv6
    [ARM] iop: add missing parens in macro
    [ARM] mm 7: remove duplicated __ioremap() prototypes
    ARM: OMAP: fix OMAP1 mpuio suspend/resume oops
    ARM: OMAP: MPUIO wake updates
    ARM: OMAP: speed up gpio irq handling
    ARM: OMAP: plat-omap changes for 2430 SDP
    ARM: OMAP: gpio object shrinkage, cleanup
    ARM: OMAP: /sys/kernel/debug/omap_gpio
    ARM: OMAP: Implement workaround for GPIO wakeup bug in OMAP2420 silicon
    ARM: OMAP: Enable 24xx GPIO autoidling
    [ARM] 4318/2: DSM-G600 Board Support
    [ARM] 4227/1: minor head.S fixups
    [ARM] 4328/1: Move i.MX UART regs to driver
    ...

    Linus Torvalds
     

05 May, 2007

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (46 commits)
    mmc-omap: Clean up omap set_ios and make MMC_POWER_ON work
    mmc-omap: Fix omap to use MMC_POWER_ON
    mmc-omap: add missing '\n'
    mmc: make tifm_sd_set_dma_data() static
    mmc: remove old card states
    mmc: support unsafe resume of cards
    mmc: separate out reading EXT_CSD
    mmc: break apart switch function
    MMC: Fix handling of low-voltage cards
    MMC: Consolidate voltage definitions
    mmc: add bus handler
    wbsd: check for data opcode earlier
    mmc: Separate out protocol ops
    mmc: Move core functions to subdir
    mmc: deprecate mmc bus topology
    mmc: remove card upon suspend
    mmc: allow suspended block driver to be removed
    mmc: Flush pending detects on host removal
    mmc: Move host and card drivers to subdirs
    mmc: Move queue functions to mmc_block
    ...

    Linus Torvalds
     

01 May, 2007

2 commits


22 Apr, 2007

2 commits

  • This patch removes the unnecessary bit number from CKENnn_XXXX
    definitions for PXA, so that

    CKEN0_PWM0 --> CKEN_PWM0
    CKEN1_PWM1 --> CKEN_PWM1
    ...
    CKEN24_CAMERA --> CKEN_CAMERA

    The reasons for the change of these defitions are:

    1. they do not scale - they are currently valid for pxa2xx, but
    definitely not valid for pxa3xx, e.g., pxa3xx has bit 3 for camera
    instead of bit 24

    2. they are unnecessary - the peripheral name within the definition
    has already announced its usage, we don't need those bit numbers
    to know which peripheral we are going to enable/disable clock for

    3. they are inconvenient - think about this: a driver programmer
    for pxa has to remember which bit in the CKEN register to turn
    on/off

    Another change in the patch is to make the definitions equal to its
    clock bit index, so that

    #define CKEN_CAMERA (24)

    instead of

    #define CKEN_CAMERA (1 << 24)

    this change, however, will add a run-time bit shift operation in
    pxa_set_cken(), but the benefit of this change is that it scales
    when bit index exceeds 32, e.g., pxa3xx has two registers CKENA
    and CKENB, totally 64 bit for this, suppose CAMERA clock enabling
    bit is CKENB:10, one can simply define CKEN_CAMERA to be (32 + 10)
    and so that pxa_set_cken() need minimum change to adapt to that.

    Signed-off-by: eric miao
    Signed-off-by: Russell King

    Eric Miao
     
  • Reposted patch for kernel 2.6.21-rc2.

    The driver i2c-pxa doesn't set the class member in i2c_adapter, which
    is used to register the I2C adapter. The hwmon (sensors) drivers (e.g.
    adm1021) that are connected to a i2c-pxa adapter don't attach because
    they expect that the adapter supports class I2C_CLASS_HWMON.

    This patch adds functionality to allow platforms to set the class and
    pass it as platform_data to the i2c-pxa driver. Sample usage in
    platform code:

    static struct i2c_pxa_platform_data my_i2c_platform_data = {
    .class = I2C_CLASS_HWMON
    };

    static void __init my_platform_init(void)
    {
    (void) platform_add_devices(devices, ARRAY_SIZE(devices));

    pxa_set_i2c_info(&my_i2c_platform_data);
    }

    Signed-off-by: Matej Kenda
    Signed-off-by: Russell King

    Matej Kenda
     

25 Mar, 2007

2 commits

  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    [ARM] 4278/1: configure pxa27x I2C SCL as "input"
    [ARM] 4272/1: Missing symbol h1940_pm_return fix
    [ARM] 4235/1: ns9xxx: declare the clock functions as "const"
    [ARM] 4271/1: iop32x: fix ep80219 detection (support iq80219 platforms)
    [ARM] 4270/2: mach-s3c2443/irq.c off by one error in dma irqs

    Linus Torvalds
     
  • It has been reported by Julian Deng that configuring the pxa27x i2c SCL line as output generates a short negative pulse on it during the call to pxa_gpio_mode(GPIO117_I2CSCL_MD); as it first switches it to output and then configures it for the alternate function. The SCL line is in fact bidirectional and can also be configured as 117 | GPIO_ALT_FN_1_IN, in which case the pulse is not generated. This is exactly what this patch does.

    Author: Julian Deng

    Signed-off-by: G. Liakhovetski
    Signed-off-by: Russell King

    Guennadi Liakhovetski
     

17 Mar, 2007

1 commit

  • It's been pointed out that output GPIOs should have an initial value, to
    avoid signal glitching ... among other things, it can be some time before
    a driver is ready. This patch corrects that oversight, fixing

    - documentation
    - platforms supporting the GPIO interface
    - users of that call (just one for now, others are pending)

    There's only one user of this call for now since most platforms are still
    using non-generic GPIO setup code, which in most cases already couples the
    initial value with its "set output mode" request.

    Note that most platforms are clear about the hardware letting the output
    value be set before the pin direction is changed, but the s3c241x docs are
    vague on that topic ... so those chips might not avoid the glitches.

    Signed-off-by: David Brownell
    Acked-by: Andrew Victor
    Acked-by: Milan Svoboda
    Acked-by: Haavard Skinnemoen
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

16 Mar, 2007

1 commit


21 Feb, 2007

2 commits

  • Based on the discussion last december (http://lkml.org/lkml/2006/12/20/242),
    this patch:

    - moves the PXA_LAST_GPIO check into pxa_gpio_mode
    - fixes comment and includes in gpio.h
    - replaces the gpio_set/get_value macros with inline
    functions and adds a non-inline version to avoid
    code explosion when gpio is not a constant.

    Signed-off-by: Philipp Zabel
    Signed-off-by: David Brownell
    Signed-off-by: Nicolas Pitre
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Philipp Zabel
     
  • Russell King
     

20 Feb, 2007

2 commits

  • Conflicts:
    include/asm-arm/arch-at91rm9200/entry-macro.S

    Signed-off-by: Russell King

    Russell King
     
  • * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (117 commits)
    [ARM] 4058/2: iop32x: set ->broken_parity_status on n2100 onboard r8169 ports
    [ARM] 4140/1: AACI stability add ac97 timeout and retries
    [ARM] 4139/1: AACI record support
    [ARM] 4138/1: AACI: multiple channel support for IRQ handling
    [ARM] 4211/1: Provide a defconfig for ns9xxx
    [ARM] 4210/1: base for new machine type "NetSilicon NS9360"
    [ARM] 4222/1: S3C2443: Remove reference to missing S3C2443_PM
    [ARM] 4221/1: S3C2443: DMA support
    [ARM] 4220/1: S3C24XX: DMA system initialised from sysdev
    [ARM] 4219/1: S3C2443: DMA source definitions
    [ARM] 4218/1: S3C2412: fix CONFIG_CPU_S3C2412_ONLY wrt to S3C2443
    [ARM] 4217/1: S3C24XX: remove the dma channel show at startup
    [ARM] 4090/2: avoid clash between PXA and SA1111 defines
    [ARM] 4216/1: add .gitignore entries for ARM specific files
    [ARM] 4214/2: S3C2410: Add Armzone QT2410
    [ARM] 4215/1: s3c2410 usb device: per-platform vbus_draw
    [ARM] 4213/1: S3C2410 - Update definition of ADCTSC_XY_PST
    [ARM] 4098/1: ARM: rtc_lock only used with rtc_cmos
    [ARM] 4137/1: Add kexec support
    [ARM] 4201/1: SMP barriers pair needed for the secondary boot process
    ...

    Fix up conflict due to typedef removal in sound/arm/aaci.h

    Linus Torvalds
     

18 Feb, 2007

1 commit


17 Feb, 2007

2 commits

  • get_irqnr_preamble allows machines to take some action before entering the
    get_irqnr_and_base loop. On iop we enable cp6 access.

    arch_ret_to_user is added to the userspace return path to allow individual
    architectures to take actions, like disabling coprocessor access, before
    the final return to userspace.

    Per Nicolas Pitre's note, there is no need to cp_wait on the return to user
    as the latency to return is sufficient.

    Signed-off-by: Dan Williams
    Signed-off-by: Russell King

    Dan Williams
     
  • The Lubbock platform uses both a PXA25x and a SA1111 at the same time.
    Both chips have the same "Serial Audio Controller" registers although
    the SA1111 one is never expected to be used in preference to the PXA25x
    one. So let's disable the SA1111 defines whenever compilation is for a
    PXA architecture and make the PXA defines always defined.

    This removes a bunch of "already defined" warnings as well since the
    current hack to prevent them depended on include ordering which wasn't
    always right.

    While at it, clean up the SA1111 defines allowing to get rid of the
    __CCREG() macro.

    Signed-off-by: Nicolas Pitre
    Signed-off-by: Russell King

    Nicolas Pitre
     

13 Feb, 2007

1 commit


08 Feb, 2007

2 commits

  • This patchs adds some missing register bit defs for the PXA SSP ports audio registers and fixes up some other broken bit definitions as noticed by Russell.

    Signed-off-by: Liam Girdwood
    Signed-off-by: Russell King

    Liam Girdwood
     
  • This patch renames pxa_gpio_set/get functions defined in drivers/usb/gadget/pxa2xx_udc.h to udc_gpio_set/get.

    These functions are moved from drivers/usb/gadget/pxa2xx_udc.h to include/asm-arm/arch-pxa2xx/udc.h

    Creates new functions: udc_gpio_to_irq, udc_gpio_init_vbus, udc_gpio_init_pullup in include/asm-arm/arch-pxa2xx/udc.h. These functions are used in drivers/usb/gadget/pxa2xx_udc.c instead of direct low-level (pxa2xx only) functions.

    Creates all these udc_gpio_* functions in include/asm-arm/arch-ixp4xx/udc.h. This implementation has no real code because ixp4xx doesn't use vbus - only vbus uses all these gpio functions (and because ixp4xx misses any function which converts number of gpio pin into it's irq).

    This is next step to make pxa2xx_udc fully work on ixp4xx platform.

    Signed-off-by: Milan Svoboda
    Signed-off-by: Russell King

    Milan Svoboda
     

03 Jan, 2007

2 commits


11 Dec, 2006

1 commit

  • Stabilize PIO mode transfers against a range of word sizes and FIFO
    thresholds and fixes word size setup/override issues.

    1) 16 and 32 bit DMA/PIO transfers broken due to timing differences.
    2) Potential for bad transfer counts due to transfer size assumptions.
    3) Setup function broken is multiple ways.
    4) Per transfer bit_per_word changes break DMA setup in pump_tranfers.
    5) False positive timeout are not errors.
    6) Changes in pxa2xx_spi_chip not effective in calls to setup.
    7) Timeout scaling wrong for PXA255 NSSP.
    8) Driver leaks memory while busy during unloading.

    Known issues:

    SPI_CS_HIGH and SPI_LSB_FIRST settings in struct spi_device are not handled.

    Testing:

    This patch has been test against the "random length, random bits/word,
    random data (verified on loopback) and stepped baud rate by octaves
    (3.6MHz to 115kHz)" test. It is robust in PIO mode, using any
    combination of tx and rx thresholds, and also in DMA mode (which
    internally computes the thresholds).

    Much thanks to Ned Forrester for exhaustive reviews, fixes and testing.
    The driver is substantially better for his efforts.

    Signed-off-by: Stephen Street
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Street
     

08 Dec, 2006

1 commit

  • Merge:
    Atmel AT91RM9200 and AT91SAM9260 changes
    General ARM developments
    Disconfiguous memory cleanups
    64-bit/32-bit division and sched_clock extension patches
    EP93xx support changes
    IOP support changes

    Signed-off-by: Russell King

    Russell King
     

01 Dec, 2006

1 commit

  • Most architectures have fairly simple discontiguous memory - a
    simple set of successive regions each containing some memory.
    These can be described simply as a log2 of their maximum size,
    along with the base address of the first region and the number
    of regions.

    The base address is already described by PHYS_PFN_OFFSET, and
    the number of regions via the MAX_NUMNODES and the number of
    online nodes.

    If we then supply the log2 of their maximum size, all the other
    discontigmem macros can move into generic code.

    There is one exception: lh7a40x seems to have a more complicated
    setup; this is left alone.

    Signed-off-by: Russell King

    Russell King
     

30 Nov, 2006

3 commits


04 Nov, 2006

1 commit