18 Mar, 2011

1 commit

  • * 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (258 commits)
    omap: zoom: host should not pull up wl1271's irq line
    arm: plat-omap: iommu: fix request_mem_region() error path
    OMAP2+: Common CPU DIE ID reading code reads wrong registers for OMAP4430
    omap4: mux: Remove duplicate mux modes
    omap: iovmm: don't check 'da' to set IOVMF_DA_FIXED flag
    omap: iovmm: disallow mapping NULL address when IOVMF_DA_ANON is set
    omap2+: mux: Fix compile when CONFIG_OMAP_MUX is not selected
    omap4: board-omap4panda: Initialise the serial pads
    omap3: board-3430sdp: Initialise the serial pads
    omap4: board-4430sdp: Initialise the serial pads
    omap2+: mux: Add macro for configuring static with omap_hwmod_mux_init
    omap2+: mux: Remove the use of IDLE flag
    omap2+: Add separate list for dynamic pads to mux
    perf: add OMAP support for the new power events
    OMAP4: Add IVA OPP enteries.
    OMAP4: Update Voltage Rail Values for MPU, IVA and CORE
    OMAP4: Enable 800 MHz and 1 GHz MPU-OPP
    OMAP3+: OPP: Replace voltage values with Macros
    OMAP3: wdtimer: Fix CORE idle transition
    Watchdog: omap_wdt: add fine grain runtime-pm
    ...

    Fix up various conflicts in
    - arch/arm/mach-omap2/board-omap3evm.c
    - arch/arm/mach-omap2/clock3xxx_data.c
    - arch/arm/mach-omap2/usb-musb.c
    - arch/arm/plat-omap/include/plat/usb.h
    - drivers/usb/musb/musb_core.h

    Linus Torvalds
     

10 Mar, 2011

1 commit

  • * Build unconditionally as ARM for correct interoperation with
    OMAP firmware.

    * Remove deprecated PC-relative stores

    * Add the required ENDPROC() directive for each ENTRY().

    * .align before data words

    Signed-off-by: Dave Martin
    Tested-by: Jean Pihet
    Signed-off-by: Kevin Hilman

    Dave Martin
     

04 Feb, 2011

1 commit

  • The new fncpy API is better suited* for copying some
    code to SRAM at runtime. This patch changes the ad-hoc
    code to the more generic fncpy API.

    *: 1. fncpy ensures that the thumb mode bit is propagated,
    2. fncpy provides the security of type safety between the
    original function and the sram function pointer.

    Tested OK on OMAP3 in low power modes (RET/OFF)
    using omap2plus_defconfig with !CONFIG_THUMB2_KERNEL.
    Compile tested on OMAP1/2 using omap1_defconfig.

    Boot tested on OMAP1 & OMAP2
    Tested OK with suspend/resume on OMAP2420/n810

    Boots fine on osk5912 and n800

    Signed-off-by: Jean Pihet
    Acked-by: Kevin Hilman
    Acked-by: Tony Lindgren
    Reviewed-by: Dave Martin
    Tested-by: Kevin Hilman
    Tested-by: Tony Lindgren
    Signed-off-by: Russell King

    Jean Pihet
     

22 Dec, 2010

2 commits

  • Some users were observing crashes during the execution of CORE DVFS
    code from OCM RAM -- a locally-modified copy of the linux-omap code.
    Richard Woodruff tracked this down to a DTLB miss which had been
    inadvertently and intermittently caused by the local modifications.
    (The TLB miss caused the ARM MMU to attempt to walk the page tables
    stored in SDRAM, which was not possible since SDRAM is off-line for a
    portion of the CORE DVFS OCM RAM code.)

    Add a note to the OMAP2 & OMAP3 CORE DVFS SRAM code to warn others that
    changes may result in crashes here if they are not carefully tested.

    Signed-off-by: Paul Walmsley
    Cc: Richard Woodruff
    Cc: Jon Hunter
    Cc: Nishanth Menon

    Paul Walmsley
     
  • In preparation for adding OMAP4-specific PRCM accessor/mutator
    functions, split the existing OMAP2/3 PRCM code into OMAP2/3-specific
    files. Most of what was in mach-omap2/{cm,prm}.{c,h} has now been
    moved into mach-omap2/{cm,prm}2xxx_3xxx.{c,h}, since it was
    OMAP2xxx/3xxx-specific.

    This process also requires the #includes in each of these files to be
    changed to reference the new file name. As part of doing so, add some
    comments into plat-omap/sram.c and plat-omap/mcbsp.c, which use
    "sideways includes", to indicate that these users of the PRM/CM includes
    should not be doing so.

    Thanks to Felipe Contreras for comments on this
    patch.

    Signed-off-by: Paul Walmsley
    Cc: Jarkko Nikula
    Cc: Peter Ujfalusi
    Cc: Liam Girdwood
    Cc: Omar Ramirez Luna
    Acked-by: Omar Ramirez Luna
    Cc: Felipe Contreras
    Acked-by: Felipe Contreras
    Cc: Greg Kroah-Hartman
    Acked-by: Mark Brown
    Reviewed-by: Kevin Hilman
    Tested-by: Kevin Hilman
    Tested-by: Rajendra Nayak
    Tested-by: Santosh Shilimkar

    Paul Walmsley
     

28 Sep, 2010

1 commit

  • When changing the L3 clock frequency, the CPU is executing from internal RAM
    and the SDRC clock is disabled. During this time accesses made to external
    DDR are stalled. If the ARM subsystem attempts to access the DDR while the
    SDRC clock is disabled this will stall the CPU until the access to the SDRC
    timeouts. A timeout on the SDRC should never occur. Once a timeout occurs all
    the following accesses will be aborted and the DDR is no longer accessible.

    Although the code being executed in the internal RAM does not directly access
    the DDR, it was found that the branch prediction logic in the CPU may cause
    the CPU to prefetch code from a DDR location while the SDRC clock is disabled.
    This was causing an SDRC timeout which resulted in a system hang.

    This patch fixes this problem by ensuring the branch prediction logic is
    disabled while changing the L3 clock frequency. The branch prediction logic
    is disabled by clearing the Z-bit in the ARM CTRL register.

    Disabling the branch prediction logic does not have any noticable impact
    on the execution time of this code section. The hardware observability
    signals were used to monitor the sdrc idle time with and without this
    patch when operating at different CPU frequencies (150MHz, 500MHz and
    600MHz) and the total sdrc idle time when changing frequenct was in
    the range of 9-11us. This was measured on an omap3430 SDP running the
    omapzoom p-android-omap-2.6.29 branch.

    Signed-off-by: Jon Hunter
    Signed-off-by: Paul Walmsley
    Cc: Santosh Shilimkar
    Cc: Richard Woodruff
    Cc: Tony Lindgren

    Jon Hunter
     

12 Dec, 2009

1 commit

  • The code that reprograms the SDRC memory controller during CORE DVFS,
    mach-omap2/sram34xx.S:omap3_sram_configure_core_dpll(), does not
    ensure that all L3 initiators are prevented from accessing the SDRAM
    before modifying the SDRC AC timing and MR registers. This can cause
    memory to be corrupted or cause the SDRC to enter an unpredictable
    state. This patch places that code behind a Kconfig option,
    CONFIG_OMAP3_SDRC_AC_TIMING for now, and adds a note explaining what
    is going on. Ideally the code can be added back in once supporting
    code is present to ensure that other initiators aren't touching the
    SDRAM. At the very least, these registers should be reprogrammable
    during kernel init to deal with buggy bootloaders. Users who know
    that all other system initiators will not be touching the SDRAM can
    also re-enable this Kconfig option.

    This is a modification of a patch originally written by Rajendra Nayak
    (the original is at http://patchwork.kernel.org/patch/51927/).
    Rather than removing the code completely, this patch just comments it out.

    Thanks to Benoît Cousson and Christophe Sucur
    for explaining the technical basis for this and for
    explaining what can be done to make this path work in future code.
    Thanks to Richard Woodruff , Nishanth Menon
    , and Olof Johansson for their comments.

    Signed-off-by: Paul Walmsley
    Cc: Rajendra Nayak
    Cc: Christophe Sucur
    Cc: Benoît Cousson
    Cc: Richard Woodruff
    Cc: Nishanth Menon
    Cc: Olof Johansson

    Paul Walmsley
     

25 Jul, 2009

4 commits

  • The clock stabilization delay post a M2 divider change is needed
    even before a SDRC interface clock re-enable and not only before
    jumping back to SDRAM.

    Signed-off-by: Rajendra Nayak
    Signed-off-by: Paul Walmsley

    Rajendra Nayak
     
  • This patch fixes a bug in the CORE dpll scaling sequence which was
    errouneously clearing some bits in the SDRC DLLA CTRL register and
    hence causing a freeze. The issue was observed only on platforms
    which scale CORE dpll to < 83Mhz and hence program the DLL in fixed
    delay mode.

    Issue reported by Limei Wang , with debugging
    assistance from Richard Woodruff and Girish
    Ghongdemath .

    Signed-off-by: Rajendra Nayak
    Cc: Limei Wang
    Cc: Richard Woodruff
    Cc: Girish Ghongdemath
    Signed-off-by: Paul Walmsley
    [paul@pwsan.com: updated patch description to include collaboration credits]

    Rajendra Nayak
     
  • Stop setting SDRC_POWER.PWDENA on boot. There is a nasty erratum
    (34xx erratum 1.150) that can cause memory corruption if PWDENA is
    enabled.

    Based originally on a patch from Samu P. Onkalo .

    Tested on BeagleBoard rev C2.

    Signed-off-by: Paul Walmsley
    Cc: Samu P. Onkalo

    Paul Walmsley
     
  • Some OMAP3 boards (Beagle Cx, Overo, RX51, Pandora) have 2
    SDRAM parts connected to the SDRC.

    This patch adds the following:
    - add a new argument of type omap_sdrc_params struct*
    to omap2_init_common_hw and omap2_sdrc_init for the 2nd CS params
    - adapted the OMAP boards files to the new prototype of
    omap2_init_common_hw
    - add the SDRC 2nd CS registers offsets defines
    - adapt the sram sleep code to configure the SDRC for the 2nd CS

    Note: If the 2nd param to omap2_init_common_hw is NULL, then the
    parameters are not programmed into the SDRC CS1 registers

    Tested on 3430 SDP and Beagleboard rev C2 and B5, with
    suspend/resume and frequency changes (cpufreq).

    Signed-off-by: Jean Pihet
    Signed-off-by: Paul Walmsley

    Jean Pihet
     

20 Jun, 2009

7 commits


13 May, 2009

5 commits

  • According to the 34xx TRM Rev. K section 11.2.4.4.11.1 "Purpose of the
    DLL/CDL Module," the SDRC delay-locked-loop can be locked at any SDRC
    clock frequency from 83MHz to 166MHz. CDP code unconditionally
    unlocked the DLL whenever shifting to a lower SDRC speed, but this
    seems unnecessary and error-prone, as the DLL is no longer able to
    compensate for process, voltage, and temperature variations. Instead,
    only unlock the DLL when the SDRC clock rate would be less than 83MHz.

    Signed-off-by: Paul Walmsley

    Paul Walmsley
     
  • Renumber registers in omap3_sram_configure_core_dpll() assembly code to
    make space for additional parameters.

    Signed-off-by: Paul Walmsley

    Paul Walmsley
     
  • Clear the SDRC_POWER.PWRENA bit before putting the SDRAM into self-refresh
    mode. This prevents the SDRC from attempting to power off the SDRAM,
    which can cause the system to hang.

    Signed-off-by: Paul Walmsley

    Paul Walmsley
     
  • Where necessary, add interconnect barriers to force posted writes to
    complete before continuing.

    Signed-off-by: Paul Walmsley

    Paul Walmsley
     
  • Add more barriers in the SRAM CORE DPLL M2 divider change code.

    - Add a DSB SY after the function's entry point to flush all cached
    and buffered writes and wait for the interconnect to claim that they
    have completed[1]. The idea here is to force all delayed write
    traffic going to the SDRAM to at least post to the L3 interconnect
    before continuing. If these writes are allowed to occur after the
    SDRC is idled, the writes will not be acknowledged and the ARM will
    stall.

    Note that in this case, it does not matter if the writes actually
    complete to the SDRAM - it is only necessary for the writes to leave
    the ARM itself. If the writes are posted by the interconnect when
    the SDRC goes into idle, the writes will be delayed until the SDRC
    returns from idle[2]. If the SDRC is in the middle of a write when
    it is requested to enter idle, the SDRC will not acknowledge the
    idle request until the writes complete to the SDRAM.[3]

    The old-style DMB in sdram_in_selfrefresh is now superfluous, so,
    remove it.

    - Add an ISB before the function's exit point to prevent the ARM from
    speculatively executing into SDRAM before the SDRAM is enabled[4].

    ...

    1. ARMv7 ARM (DDI 0406A) A3-47, A3-48.

    2. Private communication with Richard Woodruff .

    3. Private communication with Richard Woodruff .

    4. ARMv7 ARM (DDI 0406A) A3-48.

    Signed-off-by: Paul Walmsley
    Cc: Richard Woodruff

    Paul Walmsley
     

09 Oct, 2008

1 commit

  • Add minimal omap3430 support based on earlier patches from
    Syed Mohammed Khasim. Also merge in omap34xx SRAM support
    from Karthik Dasu and use consistent naming for sram init
    functions.

    Also do following changes that make 34xx support usable:

    - Remove unused sram.c functions for 34xx

    - Rename IRQ_SIR_IRQ to INTCPS_SIR_IRQ and define it locally
    in entry-macro.S

    - Update mach-omap2/io.c to support 2420, 2430, and 34xx

    - Also merge in 34xx GPMC changes to add fields wr_access and
    wr_data_mux_bus from Adrian Hunter

    - Remove memory initialization call omap2_init_memory() until
    until more generic memory initialization patches are posted.
    It's OK to rely on bootloader initialization until then.

    Signed-off-by: Syed Mohammed, Khasim
    Signed-off-by: Karthik Dasu
    Signed-off-by: Adrian Hunter
    Signed-off-by: Tony Lindgren

    Syed Mohammed, Khasim