Commit Graph

380 Commits

Author SHA1 Message Date
Tony Lindgren 9e495834e5 [ARM] 5434/1: ARM: OMAP: Fix mailbox compile for 24xx
OMAP34XX_MAILBOX_BASE must be defined both for 24xx and 34xx.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-03-28 19:35:02 +00:00
Russell King 8937b7349c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 into devel 2009-03-25 18:31:35 +00:00
Russell King fbf2b1f9cf Merge branch 'highmem' into devel 2009-03-24 22:47:45 +00:00
Felipe Balbi 18cb7aca6f ARM: OMAP3: MUSB initialization for omap hw, v2
Create a generic board-file for initializing usb
on omap2430 and omap3 boards.

Patch modified by Tony to build the module based on
CONFIG_USB_MUSB_SOC. Also merged in a patch adding
the nop xceiv from Ajay Kumar Gupta <ajay.gupta@ti.com>.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:51:24 -07:00
Tony Lindgren 828c707e6d ARM: OMAP3: Add base address definitions and resources for OMAP 3 IS, v2
This replaces earlier patch from Sergio Aguirre titled "[REVIEW PATCH 03/14]
OMAP34XX: CAM: Resources fixes".

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:51:23 -07:00
David Brownell 01971f65ff ARM: OMAP3: mmc-twl4030 init passes device nodes back, v2
When setting up HSMMC devices, pass the device nodes back so
board code can linking them to their power supply regulators.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:51:22 -07:00
Tony Lindgren b9d766c767 ARM: OMAP3: Add more GPIO mux options
This patch adds several new GPIO pins and updates
the pin naming comments.

The patch is based on earlier patches on linux-omap
list by Manikandan Pillai <mani.pillai@ti.com>,
Vaibhav Hiremath <hvaibhav@ti.com> and
David Brownell <dbrownell@users.sourceforge.net>.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:51:21 -07:00
Felipe Balbi b0b5aa3f4c ARM: OMAP: get rid of OMAP_TAG_USB, v2
OMAP_TAGS should vanish soon since they're not generic arm tags.
Most of them can be converted to a platform_data or parsed
from a command line like e.g. serial tag.

For OMAP_TAG_USB we just let boards call omap_usb_init()
passing a pointer to omap_usb_config.

Patch updated by Tony for mainline, basically make
n770 and h4 compile. Also folded in a fix for OSK
by David Brownell <dbrownell@users.sourceforge.net>.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:51:20 -07:00
Santosh Shilimkar 52176e7083 ARM: OMAP: Dispatch only relevant DMA interrupts
This fixes the spurious interrupt issue on a DMA channel.

In OMAP sDMA, contrast to the SDMA.DMA4_CSRi registers, the
SDMA.DMA4_IRQSTATUS_Lj registers are updated regardless of
the corresponding bits in the SDMA.DMA4_IRQENABLE_Lj registers.
Since there are four sDMA interrupt lines and if more than one
line is actively used by two concurrently running sDMA softwares
modules,then the spurious interrupt can be observed on the other
lines.

Fix in this patch will only dispatch the relevant and enabled
interrupts on a particular line thus perevting spurious IRQ.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Nishant Kamat <nskamat@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:51:20 -07:00
Santosh Shilimkar 2263f0222e ARM: OMAP: Get available DMA channels from cmdline
This patch set up a cmdline option for omap dma for masking the
available channels. It is needed since the OMAP DMA is a system wide
resource and can be used by another software apart from the kernel.

To reserve the omap SDMA channels for kernel dma usage, use cmdline
bootarg "omap_dma_reserve_ch=". The valid range is 1 to 32.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Nishant Kamat <nskamat@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:51:20 -07:00
Jarkko Nikula 7954763bb9 ARM: OMAP: Add method to register additional I2C busses on the command line, v2
This patch extends command line option "i2c_bus=bus_id,clkrate" so that
it allow to register additional I2C busses that are not registered with
omap_register_i2c_bus from board initialization code.

Purpose of this is to register additional board busses which are routed
to external connectors only without any on board I2C devices.

Cc: linux-i2c@vger.kernel.org
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:51:20 -07:00
Jarkko Nikula 3a853fb933 ARM: OMAP: Add command line option for I2C bus speed, v2
This patch adds a new command line option "i2c_bus=bus_id,clkrate" into
I2C bus registration helper. Purpose of the option is to override the
default board specific bus speed which is supplied by the
omap_register_i2c_bus.

The default bus speed is typically set to speed of slowest I2C chip on the
bus and overriding allow to use some experimental configurations or updated
chip versions without any kernel modifications.

Cc: linux-i2c@vger.kernel.org
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:51:20 -07:00
Jarkko Nikula d4c58bf45a ARM: OMAP: Add documentation for function omap_register_i2c_bus
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:51:19 -07:00
Timo Kokkonen 6c366e3299 ARM: OMAP: Export dmtimer functions
Make the dmtimer function symbols available so modules can take use of
them.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:51:19 -07:00
Zebediah C. McClure 59185eeeaa [OMAP850] IRQ related changes
IRQ related changes.

Signed-off-by: Zebediah C. McClure <zmc@lurian.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:51:19 -07:00
Zebediah C. McClure 557096fe28 [OMAP850] Changes to memory subsystem
Changes to memory subsystem.

Signed-off-by: Zebediah C. McClure <zmc@lurian.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:51:19 -07:00
Zebediah C. McClure 56739a6929 [OMAP850] Changes to base IO subsystem, v2
Changes to base IO subsystem.

Signed-off-by: Zebediah C. McClure <zmc@lurian.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:07:40 -07:00
Zebediah C. McClure ae302f4006 [OMAP850] Add base support for omap850 cpu
Add base support for omap850 cpu.

Signed-off-by: Zebediah C. McClure <zmc@lurian.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:07:39 -07:00
Tony Lindgren 6b0147cda6 ARM: OMAP: Remove remaining board-*.h includes from hardware.h
Also remove board-omap3beagle.h that is not included anywhere,
and move protoype for voiceblue_reset() from board-voiceblue.h
to system.h.

After this patch there are still board-ams-delta.h, board-sx1.h
and board-voiceblue.h that export some functions. These could
be removed if the functions were moved under drivers.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:07:39 -07:00
Tony Lindgren d40cdf080d ARM: OMAP: No need to include board-nokia.h from hardware.h
Move the defines to the associated board file and remove
the now unnecessary header file.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:07:38 -07:00
Tony Lindgren 0d4d9ab08a ARM: OMAP: No need to include board-overo.h from hardware.h
Move the defines to the associated board file and remove
the now unnecessary header file.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:07:38 -07:00
Tony Lindgren ec7558a62d ARM: OMAP: No need to include board-ldp.h from hardware.h
Move the defines to the associated board file and remove
the now unnecessary header file. Also rename
OMAP34XX_ETHR_START to LDP_ETHR_START.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:07:37 -07:00
Tony Lindgren 40662d7731 ARM: OMAP: No need to include board-h4.h from hardware.h
Move the defines to the associated board file and remove
the now unnecessary header file. Also rename
OMAP24XX_ETHR_GPIO_IRQ to H4_ETHR_GPIO_IRQ.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:07:36 -07:00
Tony Lindgren 7055477558 ARM: OMAP: No need to include board-apollon.h from hardware.h
Move the defines to the associated board file and remove
the now unnecessary header file.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:07:35 -07:00
Tony Lindgren a362fdbddb ARM: OMAP: No need to include board-omap2430sdp.h from hardware.h
Move the defines to the associated board file and remove
the now unnecessary header file. Also rename
SDP2430_ETHR_GPIO_IRQ to SDP2430_ETHR_GPIO_IRQ.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:07:35 -07:00
Tony Lindgren b2830810fd ARM: OMAP: No need to include board-palm*.h from hardware.h
Move the defines to the associated board file and remove
the now unnecessary header files.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:07:35 -07:00
Tony Lindgren 3a0110cdae ARM: OMAP: No need to include board-osk.h from hardware.h
Move the defines to the board file and remove the now unnecessary
header file.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:07:34 -07:00
Tony Lindgren 278267be38 ARM: OMAP: No need to include board-innovator.h from hardware.h
Move the defines to the board file and remove the now unnecessary
header file.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:07:34 -07:00
Tony Lindgren 228fe42e5e ARM: OMAP: No need to include board-h3.h from hardware.h
Also move board-h3.h to mach-omap1.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:07:33 -07:00
Tony Lindgren eb6b0b1832 ARM: OMAP: No need to include board-h2.h from hardware.h
Also move board-h2.h to mach-omap1.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:07:33 -07:00
Tony Lindgren d9558b19f2 ARM: OMAP: No need to include board-perseus2.h or board-fsample.h from hardware.h
Move defines to the board file and remove the now
unnecessary headers.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-23 18:07:32 -07:00
Hiroshi DOYU 8dff0fa55d omap mailbox: remove unnecessary header file inclusion
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
2009-03-23 18:07:32 -07:00
Hiroshi DOYU 7a781afde6 omap mailbox: convert sequence bit checking to module paramter
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
2009-03-23 18:07:31 -07:00
Hiroshi DOYU 9ae0ee0076 omap mailbox: move mailbox.h into mailbox.c
no need to keep mailbox.h separately.

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
2009-03-23 18:07:26 -07:00
Hiroshi DOYU c75ee7520b omap mailbox: add save_/restore_ctx() for PM
To preserve the registers during off-mode

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
2009-03-23 18:07:26 -07:00
Hiroshi DOYU f48cca8770 omap mailbox: fix empty struct device for omap_mbox
Since "mbox->dev" doesn't exist and isn't created either at
registration, this patch will create "struct device", which belongs to
"omap-mailbox" class and set this pointer for the member of
"struct omap_mbox".

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
2009-03-23 18:07:24 -07:00
Hiroshi DOYU 6c20a68372 omap mailbox: add initial omap3 support
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
2009-03-23 18:07:23 -07:00
Russell King 7d83f8fca5 Merge branch 'master' of git://git.marvell.com/orion into devel
Conflicts:

	arch/arm/mach-mx1/devices.c
2009-03-19 23:10:40 +00:00
Russell King be093beb60 [ARM] pass reboot command line to arch_reset()
OMAP wishes to pass state to the boot loader upon reboot in order to
instruct it whether to wait for USB-based reflashing or not.  There is
already a facility to do this via the reboot() syscall, except we ignore
the string passed to machine_restart().

This patch fixes things to pass this string to arch_reset().  This means
that we keep the reboot mode limited to telling the kernel _how_ to
perform the reboot which should be independent of what we request the
boot loader to do.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-03-19 16:20:24 +00:00
Nicolas Pitre 58edb51572 [ARM] make page_to_dma() highmem aware
If a machine class has a custom __virt_to_bus() implementation then it
must provide a __arch_page_to_dma() implementation as well which is
_not_ based on page_address() to support highmem.

This patch fixes existing __arch_page_to_dma() and provide a default
implementation otherwise.  The default implementation for highmem is
based on __pfn_to_bus() which is defined only when no custom
__virt_to_bus() is provided by the machine class.

That leaves only ebsa110 and footbridge which cannot support highmem
until they provide their own __arch_page_to_dma() implementation.
But highmem support on those legacy platforms with limited memory is
certainly not a priority.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
2009-03-15 21:01:21 -04:00
Aaro Koskinen e951651657 ARM: OMAP: Allow I2C bus driver to be compiled as a module
Fixes a linker error when OMAP I2C bus driver is compiled as a module:

   ERROR: "i2c_register_board_info" [arch/arm/plat-omap/i2c.ko] undefined!

The I2C utility functions used for board initialization should be always
built-in.

Signed-off-by: Aaro Koskinen <Aaro.Koskinen@nokia.com>
Acked-by: Jarkko Nikula  <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-04 10:07:41 -08:00
Aaro Koskinen 80ea3bac3a ARM: OMAP: sched_clock() corrected
After my OMAP3 board has been running for a while, I'm seeing weird
latency traces like this:

      sh-1574    0d.h2  153us : do_timer (tick_do_update_jiffies64)
      sh-1574    0d.h2  153us : update_wall_time (do_timer)
      sh-1574    0d.h2  153us!: omap_32k_read (update_wall_time)
      sh-1574    0d.h2 1883us : update_xtime_cache (update_wall_time)
      sh-1574    0d.h2 1883us : clocksource_get_next (update_wall_time)
      sh-1574    0d.h2 1883us+: _spin_lock_irqsave (clocksource_get_next)

and after a while:

      sh-17818   0d.h3  153us : do_timer (tick_do_update_jiffies64)
      sh-17818   0d.h3  153us : update_wall_time (do_timer)
      sh-17818   0d.h3  153us!: omap_32k_read (update_wall_time)
      sh-17818   0d.h3 1915us : update_xtime_cache (update_wall_time)
      sh-17818   0d.h3 1915us+: clocksource_get_next (update_wall_time)
      sh-17818   0d.h3 1945us : _spin_lock_irqsave (clocksource_get_next)

Turns out that sched_clock() is using cyc2ns(), which returns NTP
adjusted time. The sched_clock() frequency should not be adjusted. The
patch deletes omap_32k_ticks_to_nsecs() and rewrites sched_clock()
to do the conversion using the constant multiplier.

Signed-off-by: Aaro Koskinen <Aaro.Koskinen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-04 10:07:41 -08:00
David Brownell 87d99d6f7e ARM: OMAP: Fix compile error if pm.h is included
Change the error to a warning.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-03-04 10:07:40 -08:00
Russell King 4da3782151 [ARM] omap: clk_set_parent: deny changing parent if clock is enabled
Richard Woodruff writes:
| The historic usage of this has been against single use leaf clocks
| (1st instance of gptimer).  When it was used it did:
|       clk_get()
|       clk_set_parent()
|       clk_enable()
|
| This usage was ok for that. Use on a disabled clock is needed.
|
| If there are multiple users on the clock or it is enabled there are
| problems.
|
| The call can still be unfriendly if 2 different drivers are using the
| clock with their own clock get/enable. It might be the function should
| return an error if usecount != 0 to stop surprises.  It is all around
| better if the parenting is done when the clock is off.

This is a good reason to ensure that the clock is not enabled when
clk_set_parent() is called.

Acked-by: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-03-03 13:08:18 +00:00
Paul Walmsley d41ad52040 [ARM] OMAP3: update ES level flags to discriminate between post-ES2 revisions
Some OMAP3 chip behaviors change in ES levels after ES2.  Modify the
existing omap_chip flags to add options for ES3.0 and ES3.1.

Add a new macro, CHIP_GE_OMAP3430ES2, to cover ES levels from ES2
onwards - a common pattern for OMAP3 features.  Update all current
users of the omap_chip macros to use this new macro.

Also add CHIP_GE_OMAP3430ES3_1 to cover the USBTLL SAR errata case
(described and fixed in the following patch)

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-23 14:52:51 +00:00
Russell King c0bf31320d [ARM] omap: add support for bypassing DPLLs
This roughly corresponds with OMAP commits: 7d06c48, 3241b19,
88b5d9b, 18a5500, 9c909ac, 5c6497b, 8b1f0bd, 2ac1da8.

For both OMAP2 and OMAP3, we note the reference and bypass clocks in
the DPLL data structure.  Whenever we modify the DPLL rate, we first
ensure that both the reference and bypass clocks are enabled.  Then,
we decide whether to use the reference and DPLL, or the bypass clock
if the desired rate is identical to the bypass rate, and program the
DPLL appropriately.  Finally, we update the clock's parent, and then
disable the unused clocks.

This keeps the parents correctly balanced, and more importantly ensures
that the bypass clock is running whenever we reprogram the DPLL.  This
is especially important because the procedure for reprogramming the DPLL
involves switching to the bypass clock.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-19 17:28:30 +00:00
Russell King 8b9dbc16d4 [ARM] omap: arrange for clock recalc methods to return the rate
linux-omap source commit 33d000c99ee393fe2042f93e8422f94976d276ce
introduces a way to "dry run" clock changes before they're committed.
However, this involves putting logic to handle this into each and
every recalc function, and unfortunately due to the caching, led to
some bugs.

Solve both of issues by making the recalc methods always return the
clock rate for the clock, which the caller decides what to do with.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-14 09:59:21 +00:00
Paul Walmsley be5f34b773 [ARM] OMAP clock: drop clk_get_usecount()
This function is race-prone and mistakenly conveys the impression to
drivers that it is part of the clock interface.  Get rid of it: core
code that absolutely needs this can just check clk->usecount.  Drivers
should not use it at all.

linux-omap source commit is 5df9e4adc2f6a6d55aca53ee27b8baad18897c05.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 17:50:45 +00:00
Russell King 3f0a820c4c [ARM] omap: create a proper tree of clocks
Traditionally, we've tracked the parent/child relationships between
clk structures by setting the child's parent member to point at the
upstream clock.  As a result, when decending the tree, we have had
to scan all clocks to find the children.

Avoid this wasteful scanning by keeping a list of the clock's children.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 17:50:42 +00:00
Russell King b5088c0d90 [ARM] omap: clks: call recalc after any rate change
This implements the remainder of:
  OMAP clock: move rate recalc, propagation code up to plat-omap/clock.c
from Paul Walmsley which is not covered by the previous:
  [ARM] omap: move clock propagation into core omap clock code
  [ARM] omap: remove unnecessary calls to propagate_rate()
  [ARM] omap: move propagate_rate() calls into generic omap clock code
commits.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 17:50:41 +00:00