04 Oct, 2007

3 commits


10 Jul, 2007

1 commit


10 May, 2007

1 commit


09 May, 2007

1 commit


10 Nov, 2006

2 commits

  • The cpm_uart driver is initialised incorrectly, if there is a frame buffer
    console, and CONFIG_SERIAL_CPM_CONSOLE is defined. The driver fails to
    call cpm_uart_init_portdesc() and set_lineif() in this case.

    Signed-off-by: Kalle Pokki
    Signed-off-by: Vitaly Bordug
    Signed-off-by: Paul Mackerras

    Kalle Pokki
     
  • The SMC and SCC hardware transmitter is enabled at the wrong
    place. Simply writing twice to the non-console port, like

    $ echo asdf > /dev/ttyCPM1
    $ echo asdf > /dev/ttyCPM1

    puts the shell into endless uninterruptible sleep, since the
    transmitter is stopped after the first write, and is not enabled
    before the shutdown function of the second write. Thus the transmit
    buffers are never emptied.

    Signed-off-by: Kalle Pokki
    Signed-off-by: Vitaly Bordug
    Signed-off-by: Paul Mackerras

    Kalle Pokki
     

05 Oct, 2006

1 commit

  • Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
    of passing regs around manually through all ~1800 interrupt handlers in the
    Linux kernel.

    The regs pointer is used in few places, but it potentially costs both stack
    space and code to pass it around. On the FRV arch, removing the regs parameter
    from all the genirq function results in a 20% speed up of the IRQ exit path
    (ie: from leaving timer_interrupt() to leaving do_IRQ()).

    Where appropriate, an arch may override the generic storage facility and do
    something different with the variable. On FRV, for instance, the address is
    maintained in GR28 at all times inside the kernel as part of general exception
    handling.

    Having looked over the code, it appears that the parameter may be handed down
    through up to twenty or so layers of functions. Consider a USB character
    device attached to a USB hub, attached to a USB controller that posts its
    interrupts through a cascaded auxiliary interrupt controller. A character
    device driver may want to pass regs to the sysrq handler through the input
    layer which adds another few layers of parameter passing.

    I've build this code with allyesconfig for x86_64 and i386. I've runtested the
    main part of the code on FRV and i386, though I can't test most of the drivers.
    I've also done partial conversion for powerpc and MIPS - these at least compile
    with minimal configurations.

    This will affect all archs. Mostly the changes should be relatively easy.
    Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

    struct pt_regs *old_regs = set_irq_regs(regs);

    And put the old one back at the end:

    set_irq_regs(old_regs);

    Don't pass regs through to generic_handle_irq() or __do_IRQ().

    In timer_interrupt(), this sort of change will be necessary:

    - update_process_times(user_mode(regs));
    - profile_tick(CPU_PROFILING, regs);
    + update_process_times(user_mode(get_irq_regs()));
    + profile_tick(CPU_PROFILING);

    I'd like to move update_process_times()'s use of get_irq_regs() into itself,
    except that i386, alone of the archs, uses something other than user_mode().

    Some notes on the interrupt handling in the drivers:

    (*) input_dev() is now gone entirely. The regs pointer is no longer stored in
    the input_dev struct.

    (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
    something different depending on whether it's been supplied with a regs
    pointer or not.

    (*) Various IRQ handler function pointers have been moved to type
    irq_handler_t.

    Signed-Off-By: David Howells
    (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)

    David Howells
     

22 Sep, 2006

2 commits

  • The fs_no mean used to be fs_enet driver driven, hence it was an
    enumeration across all the possible fs_enet "users" in the SoC. Now, with
    QE on the pipeline, and to make DTS descriptions more clear, fs_no features
    relevant SoC part number, with additional field to describe the SoC type.

    Another reason for that is now not only fs_enet is going to utilize those
    stuff. There might be UART, HLDC, and even USB, so to prevent confusion and
    be ready for upcoming OF_device transfer, fs_enet and cpm_uart drivers were
    updated in that concern, as well as the relevant DTS.

    Signed-off-by: Vitaly Bordug

    Vitaly Bordug
     
  • Incorporating the new way of cpm2 immr access, introduced in the previous
    patch, into CPM2 peripheral devices (fs_enet and cpm_uart). Both ppc and
    powerpc approved working( real actions taken in powerpc only, ppc just
    has a wrapper to keep init stuff consistent).

    Signed-off-by: Vitaly Bordug

    Vitaly Bordug
     

21 Sep, 2006

1 commit


01 Jul, 2006

1 commit


26 May, 2006

1 commit

  • This fixes various odd things that missed update together with cpm_uart
    platform_device move. Unified resources names, restructurisation, etc.
    Also, addressed issue with recent phys/virt translation rework. Being
    cache-coherent, CPM2's do alloc_bootmem() for the console stuff, and it was
    used to treat console buffer descriptor mapping 1:1 (as in CPM1 case),
    which is definitely wrong.

    Signed-off-by: Vitaly Bordug
    Signed-off-by: Paul Mackerras

    Vitaly Bordug
     

03 May, 2006

2 commits

  • A number of small issues are fixed, and added the header file, missed from the
    original series. With this, driver should be pretty stable as tested among
    both platform-device-driven and "old way" boards. Also added missing GPL
    statement , and updated year field on existing ones to reflect
    code update.

    Signed-off-by: Vitaly Bordug
    Signed-off-by: Paul Mackerras

    Vitaly Bordug
     
  • SCC uart sends a break sequence each time it is stopped with the
    CPM_CR_STOP_TX command. That means that each time an application closes the
    serial device, a break is transmitted. To fix this, graceful tx stop is
    issued for SCC.

    Signed-off-by: David Jander
    Signed-off-by: Vitaly Bordug
    Signed-off-by: Paul Mackerras

    Vitaly Bordug
     

28 Apr, 2006

2 commits

  • Current address translation methods can produce wrong results, because
    virt_to_bus and vice versa may not produce correct offsets on dma-allocated
    memory. The right way is, while tracking both phys and virt address of the
    window that has been allocated for boffer descriptors, and use those
    numbers to compute the offset and make translation properly.

    Signed-off-by: Vitaly Bordug
    Signed-off-by: Paul Mackerras

    Vitaly Bordug
     
  • This is intended to make the driver code more generic and flexible,
    to get rid of board-specific layouts within driver, and generic rehaul,
    yet keeping compatibility with the existing stuff utilizing it, being
    compatible with legacy behavior (but with complaints that legacy mode
    used).

    Signed-off-by: Vitaly Bordug
    Signed-off-by: Paul Mackerras

    Vitaly Bordug
     

09 Feb, 2006

1 commit


05 Feb, 2006

1 commit


09 Jan, 2006

1 commit

  • while using SCC as uart and as serial console at same time I got this:

    [ 138.214258] Oops: kernel access of bad area, sig: 11 [#1]
    [ 138.218832] PREEMPT
    [ 138.221021] NIP: C0105C48 LR: C0105E60 SP: C03D5D10 REGS: c03d5c60 TRAP: 0300 Not tainted
    [ 138.229280] MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
    [ 138.234713] DAR: 00000000, DSISR: C0000000
    [ 138.238745] TASK = c0349420[693] 'sh' THREAD: c03d4000
    [ 138.243754] Last syscall: 6
    [ 138.246402] GPR00: FEFFFFFF C03D5D10 C0349420 C01FB094 00000011 00000000 C1ECFBBC C01F24B0
    [ 138.254602] GPR08: FF002820 00000000 FF0028C0 00000000 19133615 A0CBCD5E 02000300 00000000
    [ 138.262804] GPR16: 00000000 01FF9E4C 00000000 7FA9A770 00000000 00000000 1003E2A8 00000000
    [ 138.271003] GPR24: 100562F4 7F9B6EF4 C0210000 C02A5338 C01FB094 00000000 C01FB094 C1F14574
    [ 138.279376] NIP [c0105c48] cpm_uart_tx_pump+0x4c/0x22c
    [ 138.284419] LR [c0105e60] cpm_uart_start_tx+0x38/0xb0
    [ 138.289361] Call trace:
    [ 138.291762] [c0105e60] cpm_uart_start_tx+0x38/0xb0
    [ 138.296547] [c010277c] uart_send_xchar+0x88/0x118
    [ 138.301244] [c01029a0] uart_unthrottle+0x6c/0x138
    [ 138.305942] [c00ece10] check_unthrottle+0x60/0x64
    [ 138.310641] [c00ecec4] reset_buffer_flags+0xb0/0x138
    [ 138.315595] [c00ecf64] n_tty_flush_buffer+0x18/0x78
    [ 138.320465] [c00e81b0] tty_ldisc_flush+0x64/0x7c
    [ 138.325078] [c010410c] uart_close+0xf0/0x2c8
    [ 138.329348] [c00e9c48] release_dev+0x724/0x8d4
    [ 138.333790] [c00e9e18] tty_release+0x20/0x3c
    [ 138.338061] [c006e544] __fput+0x178/0x1e0
    [ 138.342076] [c006c43c] filp_close+0x54/0xac
    [ 138.346261] [c0002d90] ret_from_syscall+0x0/0x44
    [ 138.352386] note: sh[693] exited with preempt_count 2

    a easy way to reproduce it is log into the system using ssh and do:
    cat >/dev/ttyCPM0
    then, switch to minicom and write some stuff on it back to ssh, a control C
    produce the oops

    this happens because uart_close calls uart_shutdown which frees xmit.buf,
    currently used by xchar sending in cpm_uart_tx_pump(), which seems wrong.

    the attached patch fixes the oops and also fixes xchar sending.

    Signed-off-by: Paul Mackerras

    Aristeu Sergio Rozanski Filho
     

14 Nov, 2005

1 commit


05 Sep, 2005

1 commit


31 Aug, 2005

1 commit

  • The start_tx and stop_tx methods were passed a flag to indicate
    whether the start/stop was from the tty start/stop callbacks, and
    some drivers used this flag to decide whether to ask the UART to
    immediately stop transmission (where the UART supports such a
    feature.)

    There are other cases when we wish this to occur - when CTS is
    lowered, or if we change from soft to hard flow control and CTS
    is inactive. In these cases, this flag was false, and we would
    allow the transmitter to drain before stopping.

    There is really only one case where we want to let the transmitter
    drain before disabling, and that's when we run out of characters
    to send.

    Hence, re-jig the start_tx and stop_tx methods to eliminate this
    flag, and introduce new functions for the special "disable and
    allow transmitter to drain" case.

    Signed-off-by: Russell King

    Russell King
     

10 Aug, 2005

2 commits


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds