Commit graph

1055 commits

Author SHA1 Message Date
Felipe Balbi
bdfa35118c omap: musb: remove unnecessary return
trivial patch, no functional changes.

Cc: linux-usb@vger.kernel.org
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-19 15:22:18 -08:00
Felipe Balbi
9bdde53fa5 omap: musb: remove unused dma data
we don't use those anywhere on musb driver, so
let's remove those old stuff.

Cc: linux-usb@vger.kernel.org
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-19 15:22:17 -08:00
Felipe Balbi
7db51121b8 omap: musb: remove unused soft_con field
remove unused data.

Cc: linux-usb@vger.kernel.org
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-19 15:22:17 -08:00
Felipe Balbi
bfc110ee65 arm: omap: musb: we can use clk framework
... in order to handle musb's clock. Let's start
removing the old musb-only set_clock function.

Cc: linux-usb@vger.kernel.org
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-19 15:22:17 -08:00
Felipe Balbi
68499cc571 omap: musb: remove unused data
eps_bits wasn't being used anywhere, let's remove it.

Cc: linux-usb@vger.kernel.org
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-19 15:22:17 -08:00
Maulik Mankad
884b8369ee omap: musb: Pass board specific data from board file
Pass board specific data for MUSB (like interface_type,
mode etc) from board file by defining board
specific structure.

Each board file can define this structure based on
its requirement and pass this information to the
driver.

Signed-off-by: Maulik Mankad <x0082077@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Gupta Ajay Kumar <ajay.gupta@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-19 15:22:17 -08:00
Felipe Balbi
f9828552b9 arm: omap: musb: ioremap only what's ours
omap3430 TRM says the OTG address space is 4k, not 8k.

Cc: linux-usb@vger.kernel.org
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-19 15:22:17 -08:00
Maulik Mankad
1a4f463749 omap: musb: Remove #ifdef from board-omap3evm.c
This patch removes #ifdef around usb_nop_xceiv_register()
from board-omap3evm.c

Signed-off-by: Maulik Mankad <x0082077@ti.com>
Acked-by: Olof Johansson <olof@lixom.net>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-19 15:22:17 -08:00
Thomas Weber
476544cad1 Add minimal support for DevKit8000
These patches add board support for the Timll DevKit8000.

The DevKit8000 is a beagle board clone from Timll, sold by
armkits.com. The DevKit8000 has RS232 serial port, LCD, DVI-D,
S-Video, Ethernet, SD/MMC, keyboard, camera, SPI, I2C, USB and
JTAG interface.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-19 15:22:17 -08:00
Vaibhav Hiremath
5d4292a524 AM3517: Enable I2C-GPIO Expander driver support for AM3517EVM
Add platform hook-up interface to support I2C based GPIo expander
(TCA6416).

There are 3 instances of I2C Expander on AM3517EVM,
	- One is over I2C-2 mounted on Base board
	- Two are over I2C3 mounted on UI Card

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-19 15:22:17 -08:00
Vaibhav Hiremath
f2afbbb82e AM3517: Enable RTC driver support for AM3517EVM
Add platform hook-up interface to support RTC driver (S35390A).

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-19 15:22:17 -08:00
Vaibhav Hiremath
1f738dc306 AM3517: Enable basic I2C Support
Add basic I2C board Hook-up support, where all the 3 I2C instances
are getting registered.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-19 15:22:17 -08:00
Jonas Zetterberg
b344d87a28 IGEPv2: Use Red Led1 as Heartbeat if configured
If not configured it will be exported as normal GPIO led.

Signed-off-by: Jonas Zetterberg <jozz@jozz.se>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-19 15:22:17 -08:00
Jonas Zetterberg
c67b0d9870 IGEPv2: Added WIFI support
Enabled VMMC2 LDO voltage regulator on TWL4030.
Added GPIO's (power down and reset) for WIFI chip.

Signed-off-by: Anders Hedlund <anders.j.hedlund@gmail.com>
Signed-off-by: Jonas Zetterberg <jozz@jozz.se>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-19 15:22:17 -08:00
Enric Balletbo i Serra
22f1baac70 omap3: Use timing data for omap2_init_common_hw on IGEP v2
Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-19 15:22:17 -08:00
Enric Balletbo i Serra
ec0947fa0f omap3: SDRC: add timing data for Numonyx M65KxxxxAM
Add timing data for the Numonyx M65KxxxxAM SDRAM chip, used on the
IGEP v2 board.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-17 17:23:20 -08:00
Enric Balletbo i Serra
cddb483a74 omap3: Add support for flash on IGEP v2 board
This patch adds support for flashes on IGEP v2 boards. For now
only OneNAND is supported.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-17 17:23:20 -08:00
Enric Balletbo i Serra
691de27f3c omap3: Enable DSS2 for IGEP v2 board
Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-17 17:23:20 -08:00
Enric Balletbo i Serra
d0885486d7 omap3: Add platform init code for EHCI driver on IGEP v2
Add platform init code for EHCI driver on IGEP v2

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-17 17:23:20 -08:00
Enric Balletbo i Serra
28e0f13cd1 omap3: Fix typo on IGEP v2 board
Fix typo on IGEP v2 board

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-17 17:23:20 -08:00
Enric Balletbo i Serra
7f5f23da82 omap3: Add platform data for the twl4030_codec MFD on IGEP v2
Add platform data for the twl4030_codec MFD on IGEP v2

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-17 17:23:20 -08:00
Grazvydas Ignotas
f6873eedd9 omap3: pandora: update regulator setup
Update pandora's regulator setup:
- add new regulators: VAUX2, VAUX4 and VSIM
- add new consumers: ads7846, nub controllers, USB PHY, audio DAC
- use dev names instead of struct device pointers

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-17 17:23:20 -08:00
Grazvydas Ignotas
7b097896e4 OMAP: pandora: add DSS2 support and related regulators
This patch adds configuration data for DSS2 and sets up
display related regulators.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-17 17:23:20 -08:00
Sanjeev Premi
87520aae7c omap3evm: Configure GPIO175 for touchscreen PEN_IRQ
GPIO175 is used for PEN_IRQ on the EVM. This patch
sets the mux settings for the same.

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-17 17:23:20 -08:00
Sanjeev Premi
0621d75698 omap3evm: Fixes after moving to matrix_keypad
The keypad was not working properly after migrating
to matrix_keypad.

Swapped the row, col fields of the KEY() macro in
the keymap definition to get it working again.

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-17 17:23:20 -08:00
Sanjeev Premi
aa6912d885 omap3evm: Add mux settings for keypad
This patch sets SYS_NIRQ for keypad input. It also
sets the same as a wakeup event from OFF mode.

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-17 17:23:20 -08:00
vikram pandita
31e464cdbc omap: zoom3: enable ehci support
Zoom3 board has omap3630 EHCI port2 connected to a ULPI phy.
GPIO_64 is connected to the PHY reset pin.

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Cc: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-17 14:09:23 -08:00
Tony Lindgren
80c20d543d Merge branch 'omap-fixes-for-linus' into omap-for-linus 2010-02-17 14:08:58 -08:00
Ranjith Lohithakshan
b72c7d5435 omap: Remove DEBUG_FS dependency for mux name checking
The check for a valid mux name should be performed regardless of whether
DEBUG_FS is enabled or not. Otherwise without DEBUG_FS, we get:

Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1]
last sysfs file:
Modules linked in:
CPU: 0    Not tainted  (2.6.33-rc8 #10)
PC is at strcmp+0x18/0x40
LR is at omap_mux_init_signal+0x68/0x14c
...

This fixes the issue currently seen with boards not booting up
if DEBUG_FS is not enabled in defconfig.

Note that the earlier ifndef + ifdef now becomes simpler ifdef else:
If CONFIG_OMAP_MUX is selected, we use pin names. If it's not selected,
we only want the GPIO to mux register mapping.

Signed-off-by: Ranjith Lohithakshan <ranjithl@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-17 09:51:41 -08:00
Santosh Shilimkar
d309427e79 ARM: 5917/1: OMAP4: Add L2 Cache support
This patch adds L2 Cache support for OMAP4. External L2 cache
is used in OMAP4

CC: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-15 21:39:55 +00:00
Felipe Balbi
52abcbc9c4 arm: omap: kill compile warning on board-4430-sdp.c
sdp4430_uart_config isn't used anywhere, so remove it.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:35 -08:00
Vaibhav Hiremath
e3d4d0a238 AM35xx: Introduce am35xx.h file
Add base address definations for new AM35xx IPSS modules, like
VPFE, USBOTG, CPGMAC.

Please note that the OMAP34xx IVA2 memory space is being used for
AM35xx IPSS modules.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Sriramakrishnan <srk@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:35 -08:00
Lesly A M
a1e63642a9 omap3: pm: Add T2 Keypad as a wakeup source
Changes for setting the padconf value for sys_nirq line which is
connected to T2 INTR1. This will fix the T2 keypad wakeup.

Signed-off-by: Lesly A M <x0080970@ti.com>
Signed-off-by: Teerth Reddy <teerth@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:35 -08:00
Tony Lindgren
321cfc851d omap3: Clean-up for omap_mux_init
Get rid of the ifdeffery in omap_mux_init by creating
omap_mux_init_package and omap_mux_init_signals functions.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:35 -08:00
Adrian Hunter
e0eb242446 omap_hsmmc: Allow for a shared VccQ
EMMC can have two voltage supplies, Vcc and VccQ
which are implemented in the code as consumer
supplies vmmc and vmmc_aux.

If the regulator that supplies vmmc_aux is shared
with other consumers, then sending it to sleep
will disrupt those consumers.  However, the
TWL4030-family regulators may have OFF remapped
to SLEEP, in which case 'regulator_disable()'
will put the regulator to sleep only when all
consumers are disabled - which is the desired
behaviour.

This patch adds a platform data field to allow
that option.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:34 -08:00
Adrian Hunter
1df58db8a2 omap_hsmmc: Allow for power saving without going off
An eMMC may be always powered on, so that the lowest
power saving state possible is sleeping. Add a field
to the platform data to indicate that.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:34 -08:00
Adrian Hunter
ce6f00165d omap: RX51: Remux to pull eMMC lines down when powering off
It has been discovered that, when eMMC is powered off, current
will flow from OMAP eMMC data pull-ups to the eMMC voltage supply.
Configuring pads for OMAP off-mode does not help because eMMC is
powered off independently of OMAP off-mode.  Hence the pads are
now re-configured when eMMC is powered on or off.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:34 -08:00
Adrian Hunter
e3df0fb413 omap: Reconnect hsmmc context loss count
Call the PM context-loss count function, now that there
is a prototype for it.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:34 -08:00
Adrian Hunter
68ff04231c omap: Rename hsmmc symbols to reflect independence from twl4030
hsmmc.[ch] no longer has any dependency on twl4030
and variable names should be renamed to reflect that.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:34 -08:00
Adrian Hunter
d02a900b59 omap: Rename mmc-twl4030 files to hsmmc
mmc-twl4030.[ch] no longer has any dependency on twl4030
and should be renamed to reflect that.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:34 -08:00
Adrian Hunter
db0fefc511 omap_hsmmc: Move gpio and regulator control from board file
This patch moves the setup code for GPIO's and Voltage
Regulators from the board file mmc-twl4030.c to the
driver omap_hsmmc.c.  PBIAS and other system control
configuration remains in the board file.

Moving GPIO code to the driver makes the board initialisation
code independent of when GPIO's are defined.  That makes the
board initialisation now entirely independent of its original
twl4030 roots.

Moving Voltage Regulator code to the driver allows for further
development of regulator support in the core MMC code.  It also
permits the MMC core to be compiled as a module, because the
board code no longer calls MMC core functions.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:34 -08:00
Vimal Singh
88c8460ac3 omap3: Add support for flash on 3430SDP board
This patch adds support for flashes on 3430SDP boards. All three
NAND, NOR and OneNAND are supported. I have tested it on
3430SDP (ES2 and ES3.1).

This patch can be treated as an example to "how to utilize":
'gpmc-nand.c' and 'board-sdp-flash.c'.

Similar patches can be created for 2430sdp and 3630sdp or any other
similar board.

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:34 -08:00
Vimal Singh
c2798e9342 omap3: SDP: Introducing 'board-sdp-flash.c' for flash init
This patch adds 'board-sdp-flash.c', which could be utilized
by boards similar to 3430SDP. (For ex: 2430sdp, 36030sdp).

This file does initialization for all three flash devices present
in SDP boards (NOR, NAND, OneNAND), by finding there 'cs' number
dynamically using switch setting information (S8: 1-4).
This also expects partition information from core board files (for
ex: board-3430sdp.c). Which allows to choose different default
partitions for different boards.

A new structure is created for this purpose: 'flash_partitions'
in 'mach/board-sdp.h'. This has two members:
1. struct mtd_partition *parts
2. int nr_parts

A board file is expected to fill this structure and pass it to
'sdp-flsash-init'. Partition information should be passed in
structure array of 'flash_partitions'. Partition information should
be passed in below sequence in array:
NOR
OneNAND
NAND

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:33 -08:00
Vimal Singh
2f70a1e936 omap2/3/4: Introducing 'gpmc-nand.c' for GPMC specific NAND init
Introducing 'gpmc-nand.c' for GPMC specific NAND init.
For example: GPMC timing parameters and all.
This patch also migrates gpmc related calls from 'nand/omap2.c'
to 'gpmc-nand.c'.

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:33 -08:00
vikram pandita
30e53bccfa omap2/3/4: serial: fix coding style indentaion
No logical code change

Fix coding style indentaion as per checkpatch.pl
Fix multi-line comment style reported by Nishanth Menon

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:33 -08:00
Felipe Balbi
b2fa3b7c60 omap2/3/4: gpmc: kill compile warning
Get rid of the following warnings:

arch/arm/mach-omap2/gpmc.c:550:30: warning: non-ANSI
function declaration of function 'omap3_gpmc_save_context'

arch/arm/mach-omap2/gpmc.c:581:33: warning: non-ANSI
function declaration of function 'omap3_gpmc_restore_context'

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:33 -08:00
Felipe Balbi
0cd7e1cc76 omap2/3/4: mailbox: kill compile warning in mailbox.c
Change %d to %ld to avoid the compile warning.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:33 -08:00
Janusz Krzysztofik
c8c99699bd omap: McBSP: Introduce caching in register write operations
Determine cache size required per McBSP port at init time, based on
processor type running on.

Allocate space for storing cached copies of McBSP register values at
port request.

Modify omap_msbcp_write() function to update the cache with every
register write operation.

Modify omap_mcbsp_read() to support reading from cache or hardware.

Update MCBSP_READ() macro for modified omap_mcbsp_read() function API.

Introduce a new macro that reads from the cache.

Tested on OMAP1510 based Amstrad Delta using linux-omap for-next, commit
fb7380d70e041e4b3892f6b19dff7efb609d15a4 (2.6.33-rc3+ dated 2010-01-11).
Compile-tested with: omap_perseus2_730_defconfig, omap_generic_1610_defconfig,
omap_generic_2420_defconfig, omap_2430sdp_defconfig, omap_3430sdp_defconfig,
omap_4430sdp_defconfig with CONFIG_OMAP_MCBSP=y selected.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:33 -08:00
Ladislav Michl
561b036ad9 omap: convert boards to use physmap-flash
Convert OMAP based boards to use physmap-flash. Refreshed against today's
Linux omap kernel tree

Cc: linux-mtd@lists.infradead.org
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 10:03:32 -08:00
Tony Lindgren
a3a9b36e6b omap2/3/4: Fix mach-omap2/serial.c for multiboot
Initialize UART4 only for 3630 and 44xx.

Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:27:25 -08:00
Tony Lindgren
4751227df9 omap3/4: Fix compile for multi-omap for clkops_noncore_dpll_ops
Rename clkops_noncore_dpll_ops for omap3 and omap4.

Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:27:25 -08:00
Tony Lindgren
61a07c80a7 omap2/3/4: Allow booting omap4 with multi-omap configuration
Allow booting omap4 with multi-omap configuration.

Tested only on omap2 and omap3, please somebody test
on omap4 and ack.

Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:27:25 -08:00
Tony Lindgren
e735aa8a20 omap2/3/4: Clean up entry-macro.s for adding support for omap4 multiboot
Move defines around and set up handlers based on MULTI_OMAP2.

Note that this will only allow compiling in omap4 with omap2 and
omap3. It will not yet make omap4 boot with multi-omap.

Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:27:25 -08:00
Tony Lindgren
be8f317740 omap4: Use get_irqnr_preamble
Use get_irqnr_preamble

Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:27:25 -08:00
Tony Lindgren
95d2b4e9cb omap2/3/4: Clean up defines for entry-macro.S
Define the irq base the same way as for omap2 and omap3,
and start using get_irqnr_preamble.

Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:27:24 -08:00
Tony Lindgren
4323e9f719 omap2/3: Fix initcalls for multi-omap
Otherwise the wrong initcalls can run.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:27:05 -08:00
Tony Lindgren
140455fa00 omap2/3/4: Replace orred CONFIG_ARCH_OMAP2/3/4 with CONFIG_ARCH_OMAP2PLUS
omap: Replace orred CONFIG_ARCH_OMAP2/3/4 with CONFIG_ARCH_OMAP2PLUS

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:27:04 -08:00
Tony Lindgren
a8eb7ca0cb omap3: Replace ARCH_OMAP34XX with ARCH_OMAP3
Replace ARCH_OMAP34XX with ARCH_OMAP3

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:27:02 -08:00
Tony Lindgren
088ef950dc omap2: Convert ARCH_OMAP24XX to ARCH_OMAP2
Convert ARCH_OMAP24XX to ARCH_OMAP2

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:27:01 -08:00
Tony Lindgren
d10f2b6e74 omap2/3/4: Fix mbox init for multi-omap
Fix mbox init for multi-omap

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:26:59 -08:00
Tony Lindgren
6fbd55d077 omap2/3/4: Fix omap2_map_common_io for multi-omap
Fix omap2_map_common_io for multi-omap

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:26:58 -08:00
Tony Lindgren
56213ca4e4 omap2/3: Multiboot compile fixes to compile in omap2 and omap3
Allows compiling in omap2 and omap3.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:26:55 -08:00
Tony Lindgren
9556175183 omap2/3: Make get_irqnr_and_base common for mach-omap2 multiboot
Make get_irqnr_and_base common for mach-omap2 multiboot

Thanks to a tip from Russell King <rmk+kernel@arm.linux.org.uk>,
this also optimizes the code for non-multiboot configurations by
using get_irqnr_preamble.

Note that this will only work currently for 24xx and 34xx.
Support for 44xx can be added later on for basic multiboot,
and similar patch should be done for mach-omap1/entry-macro.S.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 09:26:51 -08:00
Tony Lindgren
be26a3df0b Merge branch 'debug-ll' into omap-for-linus 2010-02-15 09:26:07 -08:00
Tony Lindgren
0c8219f030 omap: Make uncompress code and DEBUG_LL code generic
Define arch_decomp_setup() the same way as some other
architectures do. Use arch_id to configure the debug uart
based on the machine_is by storing it into the uart
scratchpad register for DEBUG_LL code to use.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 08:49:01 -08:00
Tony Lindgren
4f2c49fedf omap: Clean the serial port defines
This way we don't have conflicts with the defines
with compiling in multiple omaps. Set the addresses
for uarts in struct omap_globals for the early serial
init code.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-15 08:48:53 -08:00
Tony Lindgren
918cae1487 Merge branch 'for-tony' of git://gitorious.org/linux-omap-dss2/linux into omap-for-linus 2010-02-12 11:39:53 -08:00
Tony Lindgren
4e6d488af3 ARM: 5910/1: ARM: Add tmp register for addruart and loadsp
Otherwise more complicated uart configuration won't be possible.
We can use r1 for tmp register for both head.S and debug.S.

NOTE: This patch depends on another patch to add the the tmp register
into all debug-macro.S files. That can be done with:

$ sed -i -e "s/addruart,rx|addruart, rx/addruart, rx, tmp/"
	arch/arm/*/include/*/debug-macro.S

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-12 17:27:52 +00:00
Tomi Valkeinen
80b1cc23ac OMAP: 3430SDP: remove vdvi regulator
The regulator is now enabled by DSS driver, and thus the panel driver
doesn't need to touch it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-12 12:46:08 +02:00
Mike Rapoport
7f049ad15e omap3: cm-t35: add DSS2 display support
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-12 12:29:57 +02:00
Vaibhav Hiremath
c3d33329f4 OMAP: AM3517: Enable DSS2 for AM3517EVM board
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
[tomi.valkeinen@nokia.com: removed defconfig changes]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-12 12:29:31 +02:00
Vaibhav Hiremath
703e3061a0 OMAP: Enable DSS2 for OMAP3EVM board
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
[tomi.valkeinen@nokia.com: removed evm defconfig changes]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-12 12:28:09 +02:00
Tony Lindgren
0482e3c6f7 Merge branch 'omap-fixes-for-linus' into omap-for-linus 2010-02-10 18:18:13 -08:00
Aaro Koskinen
a6c7fdd293 OMAP: hsmmc: fix memory leak
The platform data allocated with kmalloc() will become unreachable once
the init is complete, so it should be freed. The problem was discovered
by kmemleak.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Acked-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-10 09:20:33 -08:00
Tony Lindgren
301fe8eeee omap: Disable serial port autoidle by default
Currently the omap serial clocks are autoidled after 5 seconds.
However, this causes lost characters on the serial ports. As this
is considered non-standard behaviour for Linux, disable the timeout.

Note that this will also cause blocking of any deeper omap sleep
states.

To enable the autoidling of the serial ports, do something like
this for each serial port:

# echo 5 > /sys/devices/platform/serial8250.0/sleep_timeout
# echo 5 > /sys/devices/platform/serial8250.1/sleep_timeout
...

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-03 08:48:06 -08:00
Tony Lindgren
78737ae1b0 omap: Fix arch/arm/mach-omap2/mux.c: Off by one error
David Binderman ran the sourceforge tool cppcheck over the source code of the
new Linux kernel 2.6.33-rc6:

[./arm/mach-omap2/mux.c:492]: (error) Buffer access out-of-bounds

13 characters + 1 digit + 1 zero byte is more than 14 characters.

Also add a comment on mode0 name length in case new omaps
start using longer names.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-03 08:48:06 -08:00
Tony Lindgren
9ecef43320 omap: Fix 3630 mux errors
3630 has more mux signals than 34xx. The additional pins
exist in omap36xx_cbp_subset, but are not initialized
as the superset is missing these offsets. This causes
the following errors during the boot:

mux: Unknown entry offset 0x236
mux: Unknown entry offset 0x22e
mux: Unknown entry offset 0x1ec
mux: Unknown entry offset 0x1ee
mux: Unknown entry offset 0x1f4
mux: Unknown entry offset 0x1f6
mux: Unknown entry offset 0x1f8
mux: Unknown entry offset 0x1fa
mux: Unknown entry offset 0x1fc
mux: Unknown entry offset 0x22a
mux: Unknown entry offset 0x226
mux: Unknown entry offset 0x230
mux: Unknown entry offset 0x22c
mux: Unknown entry offset 0x228

Fix this by adding the missing offsets to omap3 superset.
Note that additionally the uninitialized pins need to be
skipped on 34xx.

Based on an earlier patch by Allen Pais <allen.pais@ti.com>.

Reported-by: Allen Pais <allen.pais@ti.com>
Signed-off-by: Allen Pais <allen.pais@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-03 08:48:06 -08:00
Kevin Hilman
8d08436d78 OMAP2/3: GPMC: ensure valid clock pointer
Ensure valid clock pointer during GPMC init.  Fixes compiler
warning about potential use of uninitialized variable.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-03 08:48:06 -08:00
Kevin Hilman
74005a2b11 OMAP2/3: IRQ: ensure valid base address
Ensure valid base address during IRQ init.  Fixes compiler warning
about potential use of uninitialized variable.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-02-03 08:48:06 -08:00
Paul Walmsley
98fa3d8aea OMAP2+ powerdomains/clockdomains: prepare for multi-OMAP configs
Convert CONFIG_ARCH_OMAP34XX to CONFIG_ARCH_OMAP3, and
CONFIG_ARCH_OMAP24XX to CONFIG_ARCH_OMAP2, in preparation for Tony's
multi-OMAP patches.

While here, update some copyrights, convert instances of "34xx" to
"3xxx" where applicable, and convert preprocessor directives of the
form

    #if defined(CONFIG_ARCH_OMAP2) | defined(CONFIG_ARCH_OMAP3)

to

    #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)

for standardization.


Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
2010-01-29 10:14:23 -07:00
Rajendra Nayak
56ef28acf1 OMAP4: PRCM: Define shift macros as n instead of 1 << n
The macros defining the shift bits in registers for various
register bit fields are defined as 1 << n.
Instead define them as n. They can then be used as val << n.
The changes are generated by updating the script which autogenerates
the files modifed in the patch.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-29 10:14:22 -07:00
Paul Walmsley
e80a9729b1 OMAP2/3/4 clock: rename and clean the omap2_clk_init() functions
Rename the omap2_clk_init() in the OMAP2, 3, and 4 clock code to be
omap2xxx_clk_init(), omap3xxx_clk_init(), etc.  Remove all traces of
the (commented) old virt_prcm_set code from omap3xxx_clk_init() and
omap4xxx_clk_init(), since this will be handled with the OPP code that
is cooking in the PM branch.

After this patch, there should be very little else in the clock code
that blocks a multi-OMAP 2+3 kernel.  (OMAP2420+OMAP2430 still has some
outstanding issues that need to be resolved; this is pending on some
additions to the hwmod data.)

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-29 10:14:22 -07:00
Paul Walmsley
60c3f65191 OMAP3 DPLL: reorganize static functions
Move all static functions up to the top of the file to match the
practice in other OMAP clock code.  Make omap3_noncore_dpll_program()
static (noted by sparse) and prepend an underscore to the function
name to mark that it is file-local.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-29 10:14:22 -07:00
Paul Walmsley
feec1277a5 OMAP2/3/4 clock: omap2_clk_prepare_for_reboot() is OMAP2xxx-only
omap2_clk_prepare_for_reboot() is only applicable to OMAP2xxx chips,
so rename it to omap2xxx_clk_prepare_for_reboot() and only call it when
running on OMAP2xxx chips.  Remove the old stub in the OMAP3 clock code.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-29 10:14:22 -07:00
Paul Walmsley
da4d2904ab OMAP2/3 clock: remove unnecessary includes and clean up header
Now that almost all of the code has been removed from clock2xxx.c and
clock34xx.c, many of the includes are now unnecessary and can be removed.
While we're here, standardize the initial comment blocks.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Cc: Jouni Högander <jouni.hogander@nokia.com>
2010-01-29 10:14:22 -07:00
Paul Walmsley
4680c29f69 OMAP2/3 clock: clean up omap*_clk_arch_init()
In the OMAP3xxx clock code, remove the #ifdef CONFIG_ARCH_OMAP3 in
clock34xx.c, since this file is only compiled for OMAP3xxx builds.  Also,
rename omap2_clk_arch_init in this file to omap3xxx_clk_arch_init() to
pave the way for multi-OMAP kernels.  Ensure that it is not executed
on non-OMAP3xxx systems.

In the OMAP2xxx clock code, rename omap2_clk_arch_init in this file to
omap2xxx_clk_arch_init() to pave the way for multi-OMAP kernels.
Ensure that it is not executed on non-OMAP2xxx systems.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-29 10:14:22 -07:00
Paul Walmsley
35e424e2c0 OMAP3 clock: split out DPLL3 M2 divider functions into mach-omap2/clkt34xx_dpll3m2.c
Split the DPLL3 M2 divider clock functions out of clock34xx.c and move
them into mach-omap2/clkt34xx_dpll3m2.c. This is intended to make the
clock code easier to understand, since all of the functions needed to
manage the OMAP3 DPLL3 M2 divider are now located in their own file,
rather than being mixed with other, unrelated functions.

Clock debugging is also now more finely-grained, since the DEBUG macro
can now be defined for the DPLL3 M2 clock alone.  This should reduce
unnecessary console noise when debugging DVFS.

Also, if at some future point the mach-omap2/ directory is split
into OMAP2/3/4 variants, this clkt file can be placed in the mach-omap34xx/
directory, rather than shared with other chip types that don't use this
clock type.

This patch also lays the groundwork to skip compilation of this
code on OMAP3 chips that don't support DVFS (e.g., AM35xx) via
the Makefile, rather than via #ifdefs.

Thanks to Alexander Shishkin <virtuoso@slind.org> for his comments to
improve the patch description.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Jouni Högander <jouni.hogander@nokia.com>
Cc: Alexander Shishkin <virtuoso@slind.org>
2010-01-28 18:13:50 -07:00
Paul Walmsley
6ebe0d88f5 OMAP2 clock: don't compile OMAP2430-only functions on non-2430 builds
omap2430_clk_i2chs_find_idlest() doesn't need to be compiled in on
non-2430 builds, so skip it in those cases to save memory.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-28 18:13:50 -07:00
Paul Walmsley
44da0a5103 OMAP2xxx clock: move sys_clk code into mach-omap2/clkt2xxx_sys.c
Move the sys_clk clock functions from clock2xxx.c to
mach-omap2/clkt2xxx_sys.c.  This is intended to make the clock code
easier to understand, since all of the functions needed to manage the
sys_clk are now located in their own file, rather than being mixed
with other, unrelated functions.

Clock debugging is also now more finely-grained, since the DEBUG
macro can now be defined for the sys_clk clock alone.  This
should reduce unnecessary console noise when debugging.

Also, if at some future point the mach-omap2/ directory is split into
OMAP2/3/4 variants, this clkt file can be placed in the mach-omap2xxx/
directory, rather than shared with other chip types that don't use
this clock type.

Thanks to Alexander Shishkin <virtuoso@slind.org> for his comments to
improve the patch description.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Alexander Shishkin <virtuoso@slind.org>
2010-01-28 18:13:49 -07:00
Paul Walmsley
87a1b26c2d OMAP2xxx clock: move osc_clk code into mach-omap2/clkt2xxx_osc.c
Move the osc_clk clock functions from clock2xxx.c to
mach-omap2/clkt2xxx_osc.  This is intended to make the clock code
easier to understand, since all of the functions needed to manage the
osc_clk are now located in their own file, rather than being mixed
with other, unrelated functions.

Clock debugging is also now more finely-grained, since the DEBUG
macro can now be defined for osc_clk clocks alone.  This
should reduce unnecessary console noise when debugging.

Also, if at some future point the mach-omap2/ directory is split
into OMAP2/3/4 variants, this clkt file can be placed in the mach-omap2xxx/
directory, rather than shared with other chip types that don't use this
clock type.

Thanks to Alexander Shishkin <virtuoso@slind.org> for his comments to
improve the patch description.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Alexander Shishkin <virtuoso@slind.org>
2010-01-28 18:13:49 -07:00
Paul Walmsley
49214640f5 OMAP2xxx clock: move the APLL clock code into mach-omap2/clkt2xxx_apll.c
Move the APLL-related clock functions from clock2xxx.c to
mach-omap2/clkt2xxx_apll.c.  This is intended to make the clock code
easier to understand, since all of the functions needed to manage APLLs
are now located in their own file, rather than being mixed with other,
unrelated functions.

Clock debugging is also now more finely-grained, since the DEBUG
macro can now be defined for APLL clocks alone.  This
should reduce unnecessary console noise when debugging.

Also, if at some future point the mach-omap2/ directory is split
into OMAP2/3/4 variants, this clkt file can be placed in the mach-omap2xxx/
directory, rather than shared with other chip types that don't use this
clock type.

Thanks to Alexander Shishkin <virtuoso@slind.org> for his comments to
improve the patch description.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Cc: Alexander Shishkin <virtuoso@slind.org>
2010-01-28 18:13:49 -07:00
Paul Walmsley
734f69a773 OMAP2xxx clock: move the DVFS virtual clock code into mach-omap2/clkt2xxx_virt_prcm_set.c
Move the DVFS virtual clock functions from clock2xxx.c to
mach-omap2/clkt2xxx_virt_prcm_set.c.  This is intended to make the
clock code easier to understand, since all of the functions needed to
manage the virt_prcm_set clock are now located in their own file,
rather than being mixed with other, unrelated functions.

Clock debugging is also now more finely-grained, since the DEBUG macro
can now be defined for the virt_prcm_set clock alone.  This should
reduce unnecessary console noise when debugging.

Also, if at some future point the mach-omap2/ directory is split into
OMAP2/3/4 variants, this clkt file can be placed in the mach-omap2xxx/
directory, rather than shared with other chip types that don't use
this clock type.

Thanks to Alexander Shishkin <virtuoso@slind.org> for his comments.
Thanks also to Kevin Hilman <khilman@deeprootsystems.com> for finding
and fixing a bug with the CONFIG_CPU_FREQ portion of this patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Cc: Alexander Shishkin <virtuoso@slind.org>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-26 20:13:06 -07:00
Paul Walmsley
b1823d8616 OMAP2xxx clock: move the DPLL+CORE composite clock code into mach-omap2/clkt2xxx_dpllcore.c
Move the DPLL+CORE composite clock functions from clock2xxx.c to
mach-omap2/clkt2xxx_dpllcore.c.  This is intended to make the clock
code easier to understand, since all of the functions needed to manage
the OMAP2 DPLL+CORE clock are now located in their own file, rather
than being mixed with other, unrelated functions.

Clock debugging is also now more finely-grained, since the DEBUG
macro can now be defined for the DPLL+CORE clock alone.  This
should reduce unnecessary console noise when debugging.

Also, if at some future point the mach-omap2/ directory is split
into OMAP2/3/4 variants, this clkt file can be placed in the mach-omap2xxx/
directory, rather than shared with other chip types that don't use this
clock type.

Thanks to Alexander Shishkin <virtuoso@slind.org> for his comments to
improve the patch description.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Cc: Alexander Shishkin <virtuoso@slind.org>
2010-01-26 20:13:06 -07:00
Paul Walmsley
69ecefca51 OMAP2/3/4 clock: combine all omap2_clk_functions
The struct clk_functions for OMAP2, 3, and 4 are all essentially the
same, so combine them.  This removes one multi-OMAP kernel impediment
and saves memory on multi-OMAP builds.

The stubs for omap2_clk_{init,exit}_cpufreq() code will removed once
the OPP layer code that's currently in Kevin's PM branch is merged.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-26 20:13:04 -07:00
Paul Walmsley
4b1f76ed4f OMAP2 clock: move all static functions to the top of the file
Move static functions to the top of the file and ensure that their names
are prefixed with an underscore to conform with the practice in the newer
OMAP clock code files.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-26 20:13:04 -07:00
Paul Walmsley
df791b3ebf OMAP2/3/4 clock: move clksel clock functions into mach-omap2/clkt_clksel.c
Move all clksel-related clock functions from mach-omap2/clock.c to
mach-omap2/clkt_clksel.c.  This is intended to make the clock code
easier to understand, since all of the functions needed to manage
clksel clocks are now located in their own file, rather than being
mixed with other, unrelated functions.

Clock debugging is also now more finely-grained, since the DEBUG macro
can now be defined for clksel clocks alon.  This should reduce
unnecessary console noise when debugging.

Also, if at some future point the mach-omap2/ directory is split
into OMAP2/3/4 variants, this clkt file can be moved to the plat-omap/
directory to be shared.

Thanks to Alexander Shishkin <virtuoso@slind.org> for his comments to
improve the patch description.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Alexander Shishkin <virtuoso@slind.org>
2010-01-26 20:13:04 -07:00
Paul Walmsley
0b96af6830 OMAP2/3/4 clock: move DPLL clock functions into mach-omap2/clkt_dpll.c
Move all DPLL-related clock functions from mach-omap2/clock.c to
mach-omap2/clkt_dpll.c.  This is intended to make the clock code
easier to understand, since all of the functions needed to manage
DPLLs are now located in their own file, rather than being mixed with
other, unrelated functions.

Clock debugging is also now more finely-grained, since the DEBUG macro
can now be defined for DPLLs alone.  This should reduce unnecessary
console noise when debugging.

Also, if at some future point the mach-omap2/ directory is split
into OMAP2/3/4 variants, this clkt file can be moved to the plat-omap/
directory to be shared.

Thanks to Alexander Shishkin <virtuoso@slind.org> for his comments to
improve the patch description.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Alexander Shishkin <virtuoso@slind.org>
2010-01-26 20:13:03 -07:00
Paul Walmsley
98c4545749 OMAP3 clock: move OMAP3-specific DPLL functions to dpll3xxx.c
Mark the OMAP3-specific DPLL functions as being OMAP3-specific by moving
them from mach-omap2/dpll.c to mach-omap2/dpll3xxx.c.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
2010-01-26 20:13:03 -07:00
Kevin Hilman
46273e6f37 OMAP: hwmod: add API for slave idlemode setting
Some HW blocks have errata which requires specific slave idle mode
under certain conditions.

This patch adds an hwmod API to allow setting slave idlemode
ensuring that any SYSCONFIG register updates go through hwmod.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-26 20:13:03 -07:00
Paul Walmsley
f0271d65f9 OMAP clockdomain/powerdomain: improve documentation
This patch only affects documentation; no functional changes are
included.

Clean up comments in the current clockdomain, powerdomain code and
header files.  This mostly involves conversion to kerneldoc format,
although some clarifications are also included.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-26 20:13:02 -07:00
Paul Walmsley
915aad89fc OMAP powerdomain: remove pwrdm_clk_state_switch
Nothing calls pwrdm_clk_state_switch(), and the function that seems to be
its ideal use case calls pwrdm_clkdm_state_switch(clk->clkdm), so remove it.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <tero.kristo@nokia.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-26 20:13:02 -07:00
Paul Walmsley
cf57aa7c54 OMAP powerdomain/PM: use symbolic constants for the max number of power states
Replace some bare constants with symbolic constants.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-26 20:13:01 -07:00
Paul Walmsley
369d561445 OMAP clockdomains: add usecounting for wakeup and sleep dependencies
Add usecounting for wakeup and sleep dependencies.  In the current
situation, if several functions add dependencies on the same
clockdomains, when the first dependency removal function is called,
the dependency will be incorrectly removed from the hardware.

Add clkdm_clear_all_wkdeps() and clkdm_clear_all_sleepdeps(), which
provide a fast and usecounting-consistent way to clear all hardware
clockdomain dependencies, since accesses to these registers can be
quite slow.  pm{2,3}4xx.c has been updated to use these new functions.
The original version of this patch did not touch these files, which
previously wrote directly to the wkdep registers, and thus confused
the usecounting code.  This problem was found by Kevin Hilman
<khilman@deeprootsystems.com>.

N.B.: This patch introduces one significant functional difference over
the previous pm34xx.c code: sleepdeps are now cleared during
clockdomain initialization, whereas previously they were left
untouched.  This has been tested by Kevin and confirmed to work.

The original version of this patch also did not take into
consideration that some clockdomains do not have sleep or wakeup
dependency sources, which caused NULL pointer dereferences.  This
problem was debugged and fixed by Kevin Hilman
<khilman@deeprootsystems.com>.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Jouni Högander <jouni.hogander@nokia.com>
2010-01-26 20:13:01 -07:00
Paul Walmsley
e909d62a8a OMAP clockdomain/powerdomain: remove runtime register/unregister
OMAP clockdomains and powerdomains are currently defined statically,
only registered at boot, and never unregistered, so we can remove the
unregister function and the locking.   A variant of this was originally
suggested a while ago by Dmitry Baryshkov <dbaryshkov@gmail.com>.
This version of this patch contains an additional fix from Kevin Hilman
<khilman@deeprootsystems.com> to address one of the pwrdm_for_each_nolock()
users in mach-omap2/pm-debug.c.   Thanks Kevin.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-26 20:13:00 -07:00
Paul Walmsley
3d309cdef3 OMAP2 clockdomain: modem clockdomain is only present on OMAP2430
For some reason, previously, we included the MDM clockdomain on all 24xx,
but the stacked die-on-die modem configuration (chassis mode) is only
available on OMAP2430.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-26 20:12:59 -07:00
Paul Walmsley
a260170028 OMAP2/3 clockdomains: split shared structures so usecounting works
Previously some of the clockdomain wakeup/sleep dependency structures
were shared between several domains.  For the subsequent wakeup and sleep
dependency usecounting patch to work, these can no longer be
shared.  This patch splits the shared structures apart.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-26 20:12:59 -07:00
Paul Walmsley
55ed96945b OMAP2/3 clkdm/pwrdm: move wkdep/sleepdep handling from pwrdm to clkdm
Move clockdomain wakeup dependency and sleep dependency data
structures from the powerdomain layer to the clockdomain layer, where
they belong.  These dependencies were originally placed in the
powerdomain layer due to unclear documentation; however, it is clear
now that these dependencies are between clockdomains.  For OMAP2/3,
this is not such a big problem, but for OMAP4 this needs to be fixed.

Thanks to Benoît Cousson <b-cousson@ti.com> for his advice on this
patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoît Cousson <b-cousson@ti.com>
2010-01-26 20:12:59 -07:00
Abhijit Pagare
6b04e0d99d ARM: OMAP4 clock domains : Add the missing Clock Domain Structure
One of the clock domains was missing from the auto-generated file.
It has been added here.

Signed-off-by: Abhijit Pagare <abhijitpagare@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-26 20:12:58 -07:00
Abhijit Pagare
bf98540106 ARM: OMAP4 clock framework: Remove the checks preventing OMAP4 clockdomain validation
The clockdomain related code being in place, it is not necessary to have
some part of the clock code commented out. This would help the validation of
the clockdomain functions using the clock level interfaces.

Signed-off-by: Abhijit Pagare <abhijitpagare@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-26 20:12:58 -07:00
Paul Walmsley
e9b98f6040 OMAP clock: make the fixed divisor clock code available for all OMAPs
One of the OMAP1 clocks can use the fixed divisor recalculation code
introduced in the OMAP2 clock code, so rename the
omap2_fixed_divisor_recalc() function to omap_fixed_divisor_recalc()
and make it available to all OMAPs.  A followup patch converts the OMAP1
clock.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-26 20:12:57 -07:00
Ranjith Lohithakshan
ced825293a AM35xx: Clock table updates for AM3505/17
AM3505/17 though a OMAP3530 derivative have the following
main differences

	- Removal of the following OMAP3 modules
		- IVA
		- ISP/CAM
		- Modem and D2D components (MAD2D, SAD2D)
		- USIM
		- SSI
		- Mailboxes
		- USB OTG
		- ICR
		- MSPRO
		- SmartReflex
	- SDRC replaced with EMIF4 Controller in the SDRC subsystem
	  thus adding support for DDR2 memory devices
	- Addition of the following new modules
		- Ethernet MAC (CPGMAC)
		- CAN Controller (HECC)
		- New USB OTG Controller with integrated Phy
		- Video Processing Front End (VPFE)
		- Additional UART (UART4)
	- All security accelerators disabled on GP devices and not to
	  be accessed or configured

This patch defines CPU flags for AM3505/17 and update the clock table.
Clock support for new modules will be added by subsequent patches.

Signed-off-by: Ranjith Lohithakshan <ranjithl@ti.com>
[paul@pwsan.com: updated for 2.6.34 clock layout]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-26 20:12:57 -07:00
Paul Walmsley
2c8a177eba OMAP3 clock: reorganize CK_* platform flags
Add CK_* flags for the two new Sitara chips, AM3505 and AM3517, and
the OMAP34xx die shrink, OMAP36xx/OMAP37xx.  Introduce a new CK_*
flag, CK_3XXX, that marks all clocks that are common to OMAP3 family
chips.  CK_343X now refers to clocks that are available only on
OMAP34{1,2,3,4}0 (WTBU) and OMAP35{03,15,25,30} (any version).
At some point, the RATE_IN_* flags should be updated also.

While here, add some documentation describing the chip families
covered by these clock flags.

This patch is partially based on patches from Ranjith Lohithakshan
<ranjithl@ti.com> and Vishwanath Sripathy <vishwanath.bs@ti.com>.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Ranjith Lohithakshan <ranjithl@ti.com>
Cc: Vishwanath Sripathy <vishwanath.bs@ti.com>
2010-01-26 20:12:56 -07:00
Abhijit Pagare
8a3ddc759b ARM: OMAP4: PM: Refine the APIs to support OMAP4 features.
Port the APIs to support the OMAP4 clockdomain framework.
Also take care of the compiling requirements for the same.

Signed-off-by: Abhijit Pagare <abhijitpagare@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
2010-01-26 20:12:54 -07:00
Abhijit Pagare
1a422724c6 ARM: OMAP4: PM: Adapt the existing OMAP2/3 Clock Domain Frameworks.
The introduction of the OMAP4 Clock Domain framework requires
some adaptaions to be done in the earlier files to place the
common and uncommon data in the proper places where they belong.

Signed-off-by: Abhijit Pagare <abhijitpagare@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
2010-01-26 20:12:54 -07:00
Abhijit Pagare
30b8863d2a ARM: OMAP4: PM: Add the Autogenerated OMAP4 specific clock domain framework.
The Autogenerated OMAP4 clock domain specific file
(mach-omap2/clockdomains44xx.h) is added here.  This file is
auto-generated using python scripting, and following is the lsit of
the people involved:
Benoit Cousson
Abhijit Pagare

Signed-off-by: Abhijit Pagare <abhijitpagare@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
2010-01-26 20:12:54 -07:00
Abhijit Pagare
b099474aa4 ARM: OMAP4: PM: Modify Clock-domain interfaces for OMAP4 compatibility.
Here the APIs are modified to use absolute addresses instead of module offsets.

Signed-off-by: Abhijit Pagare <abhijitpagare@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
2010-01-26 20:12:53 -07:00
Abhijit Pagare
84c0c39aec ARM: OMAP4: PM: Make OMAP3 Clock-domain framework compatible for OMAP4.
Here the ".clkstctrl_reg" field is added to the clockdomain stucture
as the module offsets for OMAP4 do not map one to one for powerdomains
and clockdomains as it used to for OMAP3. Hence we need to use absolute
addresses to access the control registers. Some of the clock domains have
modules falling in the address space of PRM partition. Hence  necessitating
the use of absolute adresses.

Signed-off-by: Abhijit Pagare <abhijitpagare@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
2010-01-26 20:12:53 -07:00
Abhijit Pagare
3a759f09d7 ARM: OMAP4: PM: Refine the APIs to support OMAP4 features.
The proper Macros have to be used for platform specific calls and
some of the compiling requirements and init calls are taken care of.

Signed-off-by: Abhijit Pagare <abhijitpagare@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
2010-01-26 20:12:53 -07:00
Abhijit Pagare
38900c27fb ARM: OMAP4: PM: Adapt the existing OMAP2/3 and common Power Domain Frameworks.
Taking care of the platform specific and common power domains with
proper checks.  Also refining some Macros according to the latest
OMAP4 requirements.

Signed-off-by: Abhijit Pagare <abhijitpagare@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
2010-01-26 20:12:52 -07:00
Abhijit Pagare
f37c6dfac9 ARM: OMAP4: PM: Add the Autogenerated OMAP4 specific power domain framework.
The Autogenerated OMAP4 power domain specific file (mach-omap2/powerdomains44xx.h)
is added here.
This file is auto-generated using python scripting and following is the list of the people
involved:
Paul Walmsley
Benoit Cousson
Abhijit Pagare

Signed-off-by: Abhijit Pagare <abhijitpagare@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
2010-01-26 20:12:52 -07:00
Abhijit Pagare
3790300903 ARM: OMAP4: PM: OMAP4 Power Domain Porting Related Clean-up.
Module offsets were same for OMAP2 and OMAP3 while they differ for OMAP4.
Hence we need different macros for identifying platform specific offsets.

Signed-off-by: Abhijit Pagare <abhijitpagare@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
2010-01-26 20:12:51 -07:00
Abhijit Pagare
c6a6e6e203 ARM: OMAP4: PM: OMAP4 essential basic initialisations.
Some of the OMAP4 specific chip level initialisations are taken care of.

Signed-off-by: Abhijit Pagare <abhijitpagare@ti.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
[paul@pwsan.com: updated to use '4430ES1' rather than simply '4430'; updated
 to apply after the intervening cpu.h/id.c patch; thanks also to Tony
 for catching a bug in my rewrite]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-26 20:12:51 -07:00
Tony Lindgren
b2d959173f Merge branch 'omap-fixes' into omap-fixes-for-linus 2010-01-20 18:21:01 -08:00
Tony Lindgren
ccaae273c3 Merge branch 'pm-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/khilman/linux-omap-pm into omap-fixes-for-linus 2010-01-20 18:20:47 -08:00
Sergio Aguirre
6b34f9d4e6 PM debug: Fix warning when no CONFIG_DEBUG_FS
Fix following warning when CONFIG_DEBUG_FS wasn't selected:

arch/arm/mach-omap2/pm-debug.c:57: warning: 'pm_dbg_init' declared 'static' but never defined

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-20 18:16:10 -08:00
Subramani Venkatesh
b92c5721d2 OMAP3: PM: DSS PM_WKEN to refill DMA
Currently, DSS does not wakeup when there is a DMA request.  DSS wake
up event must be enabled so that the DMA request to refill the FIFO
will wake up the CORE domain.

Signed-off-by: Subramani Venkatesh <subramani.venkatesh@windriver.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-20 18:16:09 -08:00
Tero Kristo
dccaad8950 OMAP3: PM: Force write last pad config register into save area
Due to OMAP3 erratas 1.157, 1.185 the save of the last pad register
(ETK_D14 and ETK_D15) can fail sometimes when there is simultaneous
OCP access to the SCM register area. Fixed by writing the last
register to the save area.

Also, optimized the delay loop for the HW save to include an udelay(1),
which limits the number of unnecessary HW accesses to SCM register area
during the save.

Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
Acked-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-20 18:16:07 -08:00
Roel Kluin
61b17d972f OMAP: omap3_pm_get_suspend_state() error ignored in pwrdm_suspend_get()
val is an u64 pointer, we need an int to check the error.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-20 18:16:07 -08:00
Peter Ujfalusi
e3d9329640 OMAP3: PM: Enable wake-up from McBSP2, 3 and 4 modules
Wake-up from McBSP ports are needed, especially when the THRESHOLD
dma mode is in use for audio playback.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-20 18:16:06 -08:00
Manjunatha GK
ae559d8769 OMAP3: PM debug: fix build error when !CONFIG_DEBUG_FS
The PM debug code fails to build on when CONFIG_DEBUG_FS is not
enabled.

Build error log:
arch/arm/mach-omap2/built-in.o: In function `omap_sram_idle':
arch/arm/mach-omap2/pm34xx.c:449: undefined reference to `pm_dbg_regset_save'
arch/arm/mach-omap2/pm34xx.c:460: undefined reference to `pm_dbg_regset_save'
arch/arm/mach-omap2/built-in.o: In function `configure_vc':
arch/arm/mach-omap2/pm34xx.c:1237: undefined reference to `pm_dbg_regset_init'
arch/arm/mach-omap2/pm34xx.c:1238: undefined reference to `pm_dbg_regset_init'
make: *** [.tmp_vmlinux1] Error 1

This patch fixes the above errors.

Kernel booting is tested on omap zoom2 and zoom3 boards.

Signed-off-by: Manjunatha GK <manjugk@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-20 18:16:05 -08:00
Sripathy, Vishwanath
8640425b26 OMAP3: PM: Removing redundant and potentially dangerous PRCM configration
As part of Core domain context restoration while coming out of off mode
there are some registers being restored which are not required to be restored.
ROM code will have restored them already. Overwriting some of them can have
potential side effect. Eg: CM_CLKEN_PLL register should not be written while dpll is locked.
Tested on OMAP 3430 SDP for suspend/resume and off mode with sleep_while_idle enabled.

Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-20 18:16:04 -08:00
Tero Kristo
a087cad92c OMAP3: Fixed ARM aux ctrl register save/restore
Current value is stored on SDRAM and it is written back during wakeup.
Previously a static value of 0x72 was written there.

Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
Acked-by: Thara Gopinath <thara@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-20 18:16:03 -08:00
Tero Kristo
afbcf6197d OMAP3: CPUidle: Fixed timer resolution
Previously used u32 as temporary data storage that wraps around at 4.294s.

Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-20 18:16:02 -08:00
Sanjeev Premi
a174e609b5 OMAP3: PM: Remove duplicate code blocks
This patch removes code blocks that are repeated
in function prcm_setup_regs().

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-20 18:16:01 -08:00
Tero Kristo
f18cc2ff5e OMAP3: PM: Disable interrupt controller AUTOIDLE before WFI
OMAP interrupt controller goes to unknown state when there is right
combination of l3,l4 sleep/wake-up transitions, l4 autoidle in
interrupt controller and some interrupt. When this happens, interrupts
are not delivered to ARM anymore and ARM will remain in WFI (wait for
interrupt) until interrupt controller is forced to wake-up
(i.e. lauterbach).

Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-20 18:16:00 -08:00
Tero Kristo
b296c8118b OMAP3: PM: Enable system control module autoidle
Enable the auto-idle feature of the SCM block to save some additional
power.

Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-20 18:15:59 -08:00
Tero Kristo
2bbe3af3f1 OMAP3: PM: Ack pending interrupts before entering suspend
Suspending drivers may still generate interrupts just before their suspend is
completed. Any pending interrupts here will prevent sleep.

Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-20 18:15:58 -08:00
Olof Johansson
1daa8c1d75 omap: Enable GPMC clock in gpmc_init
Don't assume that gpmc_l3_clk is on, enable it before touching
configuration registers.

Note that the current code assumes that this clock is always
enabled. We are already setting smart idle and L3 autogating
for GPMC clock in gpmc_init.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-01-20 17:25:31 -08:00
Rajendra Nayak
ecbb065947 OMAP4: clocks: Fix the clksel_rate struct DPLL divs
For all DPLL's the valid dividers are same as the values
to be programmed in the register. 0 is an invalid value.
The changes are generated by updating the script which autogenerates
the file modifed in the patch.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-20 13:35:28 -07:00
Rajendra Nayak
0324f59fc9 OMAP4: PRCM: Fix the base address for CHIRONSS reg defines
The CHIRONSS has its own local PRCM module and the register defines
need to use the CHIRONSS base and not the PRM base.
The changes are generated by updating the script which autogenerates
the file modifed in the patch.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-20 13:35:27 -07:00
Tony Lindgren
e9acb9b64d omap3: Fix cpu detection
We need to set the omap_chip.oc carefully for the clocks to work.

To fix this, set the omap_chip.oc in omap3_check_features() based
on the CONTROL_IDCODE and silicon revision registers.

Also add handling for 34xx es3.1.2 as es3.1 for now.

Fixes booting on at least overo board.

Based on an earlier patch by Paul Walmsley <paul@pwsan.com>.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-01-19 18:17:36 -08:00
Tony Lindgren
d4bb72e50a omap: Fix functions for dynamic remuxing of pins
Make the omap_mux_read and write available for board code,
and rename omap_mux_set_board_signals into omap_mux_write_array.
Also add the related prototypes and comments into mux.h.

In some cases we want to change the signals dynamically,
mostly for power management.

Note that we cannot use the signal names as they are set
__init to save memory.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-01-19 18:17:35 -08:00
Tony Lindgren
2cb0c54f3a omap: Fix cmdline muxing
Looks like cmdline muxing got broken at some point when we
decided to limit muxing to __init code. Currently omap_mux_entry
list is not yet initialized when we try to initialize cmdline
muxing.

Fix this by calling omap_mux_init_list() before calling
omap_mux_set_cmdline_signals().

Reported-by: Philip Balister <philip@balister.org>
Tested-by: Philip Balister <philip@balister.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-01-19 18:17:07 -08:00
Russell King
6468e3b187 OMAP3: clock: Remove unnecessarily .init initializers from OMAP3 clocks
The first thing that omap2_init_clksel_parent() does is check for
a non-zero .clksel field in the struct clk.  Therefore, it is
pointless calling this function on clocks where the clksel field
is unset.

Remove init calls to omap2_init_clksel_parent() on clocks without
a clksel field.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-19 17:30:52 -07:00
Thara Gopinath
883edfdd58 OMAP3: hwmod: Adding flag to prevent caching of sysconfig register.
In the current implementation the sysconfig value is read into
 _sysc_cache once and an actual update to the sysconfig register
happens only if the new value paased is differnt from the one in _sysc_cache.
_sysc_cache is updated only if _HWMOD_SYSCONFIG_LOADED is not set.
This can lead to the follwing issue if off mode is enabled in modules
which employs "always-retore" mechanism of context save and restore.

        a. The module sets the sysconfig register through omap_device_enable.
           Here _sysc_cache is updated with the value written to the sysconfig
           register and left.
        b. The power domain containig the module enters off mode and the
           module context is lost.
        c. The module in use becomes active and calls omap_device_enable to
           enable itself. Here a read of sysconfig register does not happen
           as _HWMOD_SYSCONFIG_LOADED flag is set. The value to be written
           to the sysconfig register will be same as the one written in step a.
           Since _sysc_cache reflects the previous written value an update
           of the sysconfig register does not happen.
This means in modules which employs "always-restore" mechanism
after off , the sysconfig regsiters will never get updated.

This patch introduces a flag SYSC_NO_CACHE which if set ensures that the
sysconfig register is always read into _sysc_cache before an update is
attempted.

This flags need to be set only by modules which does not do a context save
but re-initializes the registers every time the module is accessed. This
includes modules like i2c, smartreflex etc.

Signed-off-by: Thara Gopinath <thara@ti.com>
[paul@pwsan.com: tweaked to apply on a different head, added flag comment]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-19 17:30:51 -07:00
Tony Lindgren
27dba4bcf8 Merge branch 'for_2.6.33rc_c' of git://git.pwsan.com/linux-2.6 into omap-fixes-for-linus 2010-01-08 14:27:56 -08:00
Paul Walmsley
cdf1a91556 OMAP2 clock: dynamically allocate CPUFreq frequency table
Dynamically allocate the CPUFreq frequency table on OMAP2xxx chips.
This fixes some compilation problems, since the kernel may not know
what chip it is running on until boot-time.  This also reduces the size
of the CPUFreq frequency table.

Problem originally reported by Felipe Balbi <felipe.balbi@nokia.com>.
Thanks also for comments on the patch from Felipe and Kevin.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-08 15:23:17 -07:00
Paul Walmsley
ca6eccb31e OMAP2xxx OPP: clean up comments in OPP data
Revise some of the comments in the OMAP2xxx OPP data for clarity.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
2010-01-08 15:23:15 -07:00
Felipe Balbi
19fe458310 OMAP2xxx clock: clk2xxx.c doesn't compile if CPUFREQ is enabled
if we enable CPUFREQ we can't build omap2 for two reasons,
one of them is fixed by the patch below.

It's failing because the __must_be_array() check in
ARRAY_SIZE() is failing and printing the following message:

arch/arm/mach-omap2/clock2xxx.c:453: error: negative width in bit-field '<anonymous>'

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
[paul@pwsan.com: commit message updated; changed rate variable name]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-08 15:23:15 -07:00
Tuukka Toivonen
3e3ee1560d OMAP3 clock: Add capability to change rate of dpll4_m5_ck
Add necessary definitions to clock framework to allow changing
dpll4_m5_ck rate.  This is used by the camera code.

Signed-off-by: Jouni Högander <jouni.hogander@nokia.com>
Signed-off-by: Tuukka Toivonen <tuukka.o.toivonen@nokia.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-08 15:23:08 -07:00
Paul Walmsley
073463ca40 OMAP3 clock: McBSP 2, 3, 4 functional clock parent is PER_96M_FCLK, not CORE_96M_FCLK
The correct parent of the McBSP 2, 3, and 4 functional clocks is
PER_96M_FCLK, not CORE_96M_FCLK.  Fix this in the OMAP clock tree.
Reported by Nicole Chalhoub <n-chalhoub@ti.com>.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Nicole Chalhoub <n-chalhoub@ti.com>
2010-01-08 15:23:07 -07:00
Kevin Hilman
9b5bc5fa4b OMAP3: clock: add clockdomains for UART1 & 2
UART1 & 2 were missing clockdomains resulting in broken omap_hwmod
init for these devices.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-08 15:23:06 -07:00
Paul Walmsley
7adb998717 OMAP2xxx IO mapping: mark DSP mappings as being 2420-only
Out of the three major OMAP2 chip types, OMAP2420, OMAP2430, and OMAP3430,
we only map the IVA on OMAP2420.  The memory mapping is not shared between
OMAP2420 and OMAP2430, so it is inappropriate to label those macros as
'24XX'; this patch changes them to '2420'.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-08 15:23:05 -07:00
Abhijit Pagare
98bb155130 ARM: OMAP3: PM: Fix the Invalid CM_CLKSTCTRL reg access.
In OMAP2/3 some of the clock-domains which did not have control
facility were being falsely written to and read using the CM_CLKSTCTRL
register though it did not exist for them. One check is added to remove
this flaw.

Signed-off-by: Abhijit Pagare <abhijitpagare@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
2010-01-08 15:23:04 -07:00
Huang Weiyi
48bca0e9c7 OMAP2: remove duplicated #include
Remove duplicated #include('s) in
  arch/arm/mach-omap2/clock34xx.c
  arch/arm/mach-omap2/io.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-08 15:23:03 -07:00
Vaibhav Hiremath
342aa2c172 omap3: EVM: Choose OMAP_PACKAGE_CBB
Without this the kernel doesn't boot, it craches in
omap_mux_package_fixup(), since the package_subset becomes NULL.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-01-08 10:29:08 -08:00
Tony Lindgren
d04eb60066 omap3: Fix booting if package is uninitialized
Otherwise bringing up new boards can be harder:

Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1]
last sysfs file:
Modules linked in:
CPU: 0    Not tainted  (2.6.33-rc2-00015-g0bc9c93-dirty #37)
PC is at omap_mux_init+0xa4/0x3d8
LR is at omap_mux_init+0x3c/0x3d8
...

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-01-08 10:29:08 -08:00
Roel Kluin
1b6e821f23 omap3: add missing parentheses
`!' has a higher precedence than `&' so parentheses are required.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-01-08 10:29:07 -08:00
Vimal Singh
6b06ebdfbd omap2/3: ZOOM: Correcting key mapping for few keys
Keys: 'right arrow', 'up arrow' and 'select' were mapped
wrongly. This patch corrects them.
This patch also adds one missing key present in the board,
currently I added it as 'unknown' key, as I am not able to
find proper description for this key.
One key entry (r: 7, c: 5) is present in the keymap, which
is really not present in the board, removing it.

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-01-08 10:29:07 -08:00
Alexander Shishkin
9230372aee omap2/3: make serial_in_override() address the right uart port
Commit f62349ee97 makes it possible to
have some other than first uart port as ttyS0, which breaks the workaround
serial_in_override() function which will try to address the first uart
port (for ttyS0) and not the one that was initialized.

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
CC: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-01-08 10:29:06 -08:00
Mika Westerberg
f2eeeae06a OMAP3: serial - fix bug introduced in
Commit f62349ee97 had side effect that
causes kernel to oops when we are suspending to ram:

	# echo mem > /sys/power/state

	WARNING: at kernel/irq/manage.c:858 __free_irq+0x90/0x174()
	Trying to free already-free IRQ 72
	Modules linked in:
	Backtrace:
	[<c00328d0>] (dump_backtrace+0x0/0x110) from [<c0347298>] (dump_stack+0x18/0x1c)
	 r7:dfd4be08 r6:c009505c r5:c03fbfd1 r4:0000035a
	[<c0347280>] (dump_stack+0x0/0x1c) from [<c005a408>] (warn_slowpath_common+0x50/0x68)
	[<c005a3b8>] (warn_slowpath_common+0x0/0x68) from [<c005a46c>] (warn_slowpath_fmt+0x30)
	 r7:c0474afc r6:00000048 r5:00000000 r4:c0474ac0
	[<c005a43c>] (warn_slowpath_fmt+0x0/0x38) from [<c009505c>] (__free_irq+0x90/0x174)
	 r3:00000048 r2:c03fc0ef
	[<c0094fcc>] (__free_irq+0x0/0x174) from [<c0095184>] (free_irq+0x44/0x64)
	[<c0095140>] (free_irq+0x0/0x64) from [<c0038100>] (omap_uart_enable_irqs+0x4c/0x90)
	 r7:c034d58c r6:00000003 r5:00000000 r4:c0463028
	[<c00380b4>] (omap_uart_enable_irqs+0x0/0x90) from [<c003d8f8>] (omap3_pm_begin+0x1c/0)
	 r5:00000003 r4:00000000
	[<c003d8dc>] (omap3_pm_begin+0x0/0x28) from [<c008d008>] (suspend_devices_and_enter+0x)
	[<c008cfd8>] (suspend_devices_and_enter+0x0/0x1dc) from [<c008d29c>] (enter_state+0xe8)
	 r5:c03f7f46 r4:00000000
	[<c008d1b4>] (enter_state+0x0/0x140) from [<c008c8e0>] (state_store+0x9c/0xc4)
	 r7:c034d58c r6:00000003 r5:00000003 r4:c03f7f46
	[<c008c844>] (state_store+0x0/0xc4) from [<c01cb2dc>] (kobj_attr_store+0x20/0x24)
	[<c01cb2bc>] (kobj_attr_store+0x0/0x24) from [<c0119420>] (sysfs_write_file+0x114/0x14)
	[<c011930c>] (sysfs_write_file+0x0/0x148) from [<c00cb298>] (vfs_write+0xb8/0x164)
	[<c00cb1e0>] (vfs_write+0x0/0x164) from [<c00cb408>] (sys_write+0x44/0x70)
	 r8:4001f000 r7:00000004 r6:df81bd00 r5:00000000 r4:00000000
	[<c00cb3c4>] (sys_write+0x0/0x70) from [<c002f040>] (ret_fast_syscall+0x0/0x38)
	 r8:c002f204 r7:00000004 r6:401fa5e8 r5:4001f000 r4:00000004

This is due the fact that uart_list list was populated in
omap_serial_early_init() and omap_uart_enable_irqs() went through this
list even when serial idle wasn't enabled for all uarts.

This patch moves the code that populates the uart_list and enables uart
clocks into omap_serial_init_port().

Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-16 12:44:04 -08:00
Balaji T K
ebeb53e1e1 mfd: twl: fix twl4030 rename for remaining driver, board files
Recent drivers/mfd/twl4030* renames to twl broke compile for
various boards as the series was missing a patch to change
the board-*.c files.

This patch renames include twl4030.h to include twl.h
and also renames twl4030_i2c_ routines.

Signed-off-by: Balaji T K <balajitk@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reviewed-by: Felipe Balbi <felipe.balbi@nokia.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-16 12:44:04 -08:00
Olof Johansson
35358281bb omap3: Allow EHCI to be built on OMAP3
OMAP34XX has EHCI, so select USB_ARCH_HAS_EHCI.

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-15 10:34:12 -08:00
Santosh Shilimkar
b07682b605 mfd: Rename twl4030* driver files to enable re-use
The upcoming TWL6030 is companion chip for OMAP4 like the current TWL4030
for OMAP3. The common modules like RTC, Regulator creates opportunity
to re-use the most of the code from twl4030.

This patch renames few common drivers twl4030* files to twl* to enable
the code re-use.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-12-13 20:05:51 +01:00
Amit Kucheria
3c684e84d1 mfd: Optimised twl4030-power power scripts for the rx51
The power scripts optimisation was mainly done by:
Tero Kristo <tero.kristo@nokia.com> and
Arnaud Mandy <ext-arnaud.2.mandy@nokia.com>

I'm only refactoring and testing it against the mainline kernel.

Signed-off-by: Amit Kucheria <amit.kucheria@verdurent.com>
Cc: Tero Kristo <tero.kristo@nokia.com>
Cc: linux-omap@vger.kernel.org
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-12-13 19:21:29 +01:00
vikram pandita
ce13d4716a omap: serial: fix non-empty uart fifo read abort
OMAP3xxx and OMAP4430 UART IP blocks have a restriction wrt RX FIFO.
Empty RX fifo read causes an abort.

OMAP3xxx:
	UART IP revision >= 0x52 have this issue
	MVR register format is:
	Bits  Field Name  Description  				Type  Reset
	31:8   RESERVED 					RO  	0x0
	7:4    MAJOR  	Major revision number of the module.  	RO  	0x--
	3:0    MINOR  	Minor revision number of the module.  	RO  	0x--

OMAP4xxx:
	All revisions have this issue
	Revision id check is not used as the format of MVR resigster has changed
	For omap4 MVR register reads as: 0x50410602 => Revision id = 0x0602
	Format of MVR register on omap4 is: (Courtesy: Cousson, Benoit)
	Bits  Field Name  Description  				Type  Reset
	31:30 SCHEME  	Scheme revision number of module  	RO  	0x1
	29:28 RESERVED   					RO  	0x1
	27:16 FUNC  	Function revision number of module  	RO  	0x041
	15:11 RTL  		Rtl revision number of module  	RO  	0x00
	10:8  MAJOR 	Major revision number of the module.  	RO  	0x6
	7:6   CUSTOM  	Custom revision number of the module.  	RO  	0x0
	5:0   MINOR  	Minor revision number of the module.  	RO  	0x02

Override the default 8250 read handler: mem_serial_in()
by a custom handler: serial_in_8250()
which makes sure that RX fifo is not read when empty

tested on zoom3(3630) board

Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:37 -08:00
Madhusudhan Chikkature
ed32350dc5 omap3: Zoom2/3: Update hsmmc board config params
Update the hsmmc zoom peripheral configuration to support:
Power saving mode
mmc2 8-bit support
Configure mmc2 as non removable

Signed-off-by: Madhusudhan Chikkature <madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:37 -08:00
Sergey Lapin
0712fb39d7 omap3: id code detection 3525 vs 3515
The runtime detection of OMAP3515 and OMAP3525
was reversed.

Signed-off-by: Sergey Lapin <slapin@ossfans.org>
Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:37 -08:00
Kalle Valo
860fc97632 omap3: rx51: Use wl1251 in SPI mode 3
Otherwise Extreme Lower Power (ELP) wakeup doesn't work properly.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:37 -08:00
Anand Gadiyar
aed79bce77 omap3: zoom2/3: make MMC slot work again
omap3: zoom2/3: make MMC slot work again

Commit 12f8dfb56 accidentally broke MMC on zoom2/3.
The .vmmc1 field of zoom_twldata was deleted. Restoring it
allows the MMC slot to work again

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Madhusudhan Chikkature <madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:36 -08:00
Mika Westerberg
f62349ee97 OMAP3: serial - allow platforms specify which UARTs to initialize
This patch adds new function: omap_serial_init_port(port) that can be
used to initialize only selected UARTs as serial ports. Platforms can
then in their board files call this function instead of omap_serial_init()
if they don't want to use all UARTs as serial ports.

Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:35 -08:00
Mike Rapoport
edc961a2fa omap3: cm-t35: add mux initialization
CM-T35 can be assembled with different set of peripherals thus making
certain interfaces available to user as GPIOs or dedicated pins. Because
of it CM-T35 bootloader sets up mux configuration only for pins
necessary to boot the system and the rest of the mux configuration is
done by the kernel. Besides, having mux configuration in the kernel
allows to minimize dependancy on bootloader.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:35 -08:00
Santosh Shilimkar
b2f5c9413c OMAP4: Remove the secondary wait loop
The secondary cores wakes up in time so the wait loop is not
necessary anymore.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:35 -08:00
Santosh Shilimkar
942e2c9e52 OMAP4: AuxCoreBoot registers only accessible in secure mode
The AuxCoreBoot0 and AuxCoreBoot1 can be only accessed in secure
mode. Replace the current code with secure monitor API's to access/modify
these registers.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:35 -08:00
Santosh Shilimkar
b570e0ec25 OMAP4: Fix cpu detection
This patch fixes the OMAP4430 cpu detection. The IC rev detection is
done with hawkeye and rev. Note that rev does not map directly to
defined processor revision numbers as ES1.0 uses value 0.It also fixes
the SCM base address to read the correct ID_CODE register.

Also the cpu_is_omap44xx() and cpu_is_omap443x() correctly populated
instead of always being true

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:34 -08:00
Grazvydas Ignotas
8d88f7f70c omap3: pandora: board file updates for .33
Pandora board file updates:
- change keycodes of game buttons
  it was decided not to use ABXY layout by the developers.
- drop i2c bus 3 speed to 100kHz
  this is needed for battery monitoring chip to work reliably.
- drop pandora_lcd platform_device
  the older DSS driver was never functional on l-o or mainline
  kernels due to missing panel driver, so remove unneeded
  pandora_lcd platform_device. This also removes last OMAP_TAG
  from the board file.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:34 -08:00
Gregoire Gentil
7a079cab46 omap3: Board file of Always Innovating OMAP3-based Touch Book
Board file of Always Innovating OMAP3-based Touch Book

Signed-off-by: Gregoire Gentil <gregoire@gentil.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:34 -08:00
Ladislav Michl
3bc4801478 omap: use smc91x_platdata to setup smc91x
Use smc91x_platdata to setup smc91x, so we can get rid of OMAP specific stuff
in smc91x driver

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:33 -08:00
Tony Lindgren
662c8b55d2 omap: mux: Add 36xx CBP package support
Add 36xx CBP package support

Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:33 -08:00
Tony Lindgren
15f45e6f27 omap: mux: Remove old mux code for 34xx
Remove old mux code for 34xx

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:33 -08:00
Tony Lindgren
4896e3940a omap: mux: Replace omap_cfg_reg() with new style signal or gpio functions
Replace omap_cfg_reg() with new style signal or gpio functions

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:32 -08:00
Tony Lindgren
b63128e812 omap: Split i2c platform init for mach-omap1 and mach-omap2
Otherwise we cannot limit new mux code to mach-omap2.
The same signal names should eventually work for other
omaps under mach-omap2.

Note that these pins don't need to be OMAP_PIN_INPUT_PULLUP,
just OMAP_PIN_INPUT is enough.

Cc: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:32 -08:00
Tony Lindgren
4b715efccf omap: mux: Add debugfs support for new mux code
Add debugfs support for new mux code

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:32 -08:00
Tony Lindgren
ca5742bdb5 omap: mux: Add new style init functions to omap3 board-*.c files
Add new style mux init functions to omap3 board-*.c files

So far Beagle has been confirmed to be a CBB package,
and CM-T35 a CUS package.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:32 -08:00
Tony Lindgren
ddaa912a21 omap: mux: Add new style pin multiplexing data for 34xx
Add new style mux data for 34xx. This should also
work with 3630 easily by adding the processor subset
and ball data.

Note that this data is __initdata, and gets optimized
out except for the GPIO pins if CONFIG_OMAP_MUX
is not set.

Also note that this data uses omap3630 naming for
the SDMMC registers instead of 34xx naming with just
MMC.

Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:32 -08:00
Tony Lindgren
15ac7afe51 omap: mux: Add new style pin multiplexing code for omap3
Initially only for 34xx. This code allows us to:

- Make the code more generic as the omap internal signal
  names can stay the same across omap generations for some
  devices

- Map mux registers to GPIO registers that is needed for
  dynamic muxing of pins during off-idle

- Override bootloader mux values via kernel cmdline using
  omap_mux=some.signa1=0x1234,some.signal2=0x1234

- View and set the mux registers via debugfs if
  CONFIG_DEBUG_FS is enabled

Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:32 -08:00
Mike Rapoport
92c9f50189 omap2: mux: intoduce omap_mux_{read,write}
intoduce omap_mux_{read,write}

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-12-11 16:16:31 -08:00
Rajendra Nayak
911bd7395c ARM: OMAP4: PM: Add init api for DPLL nodes
An api at init for all dpll nodes seem to be
needed to reparent the dpll clk node to its
bypass clk in case the dpll is in bypass.
If not done this causes sequencing issues at init
during propogate_rate.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
2009-12-11 17:00:47 -07:00
Rajendra Nayak
16975a79c8 ARM: OMAP4: PM: Add support for OMAP4 dpll api's
Most of the dpll api's from dpll.c are reused for OMAP4.
This patch does extend a few api's for OMAP4 support.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
2009-12-11 17:00:46 -07:00
Rajendra Nayak
a1391d2768 ARM: OMAP4: PM: Move DPLL control apis to dpll.c
This patch moves all the dpll control api's to a
common file dpll.c. This is in preperation of omap4
support wherein most of these api's can be reused.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
2009-12-11 17:00:46 -07:00
Rajendra Nayak
d79b126724 ARM: OMAP4: PM: Add dummy hooks for OMAP4 dpll api's
This patch adds dummy hooks for OMAP4 dpll api's. Removes
dummy hooks for clkdev api's and enables CLKDEV
for OMAP4.
Also comments clockdomain calls from within the clock
framework as its not supported yet for OMAP4.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
2009-12-11 17:00:46 -07:00
Rajendra Nayak
972c542746 ARM: OMAP4: PM: OMAP4 clock tree and clkdev registration
This patch defines all the clock nodes in OMAP4430
platform. All the clock node structs and the clkdev table is
autogenerated using a python script (gen_clock_tree.py)
developed by Paul Walmsley, Benoit Cousson and Rajendra Nayak.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
2009-12-11 17:00:45 -07:00
Rajendra Nayak
dd7084138f ARM: OMAP4: PM: Adds CM1/2 register field masks
This patch adds OMAP4 specific CM1 and CM2 module
register field masks. Auto generated using a python
script (gen_cm_shifts_and_mask.py) developed by Benoit
Cousson, Paul Walmsley and Rajendra Nayak.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
2009-12-11 17:00:45 -07:00
Rajendra Nayak
234f0c4c66 ARM: OMAP4: PM: Adds PRM register shift and mask bits
This patch adds OMAP4 specific PRM register bit field
shifts and masks. Auto generated using a python script
(gen_prm_shifts_and_mask.py) developed by Benoit Cousson,
Paul Walmsley and Rajendra Nayak.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
2009-12-11 17:00:45 -07:00
Rajendra Nayak
c1294045d2 ARM: OMAP4: PM: Adds PRM register defs for OMAP4
This patch adds OMAP4 specific PRM register defs. Auto generated
using a python script (gen_prm_4430_h.py) developed by Paul
Walmsley and Benoit Cousson.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
2009-12-11 17:00:45 -07:00
Rajendra Nayak
9b47267f3e ARM: OMAP4: PM: Adds CM1/2 register defs for OMAP4
This patch adds OMAP4 specific CM1 and CM2 module
register defs. Autogenerated using a python scripts
(gen_cm1_4430_h.py,gen_cm2_4430_h.py) developed
by Paul Walmsley and Benoit Cousson.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
2009-12-11 17:00:45 -07:00
Rajendra Nayak
77772d5f7d ARM: OMAP4: PM: PRM/CM module offsets for OMAP4
This patch adds the offsets for new modules in PRM
and CM for OMAP4
These are autogenerated using a python script (gen_prcm44xx_h.py)
developed by Paul Walmsley and Benoit Cousson.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
2009-12-11 17:00:45 -07:00
Rajendra Nayak
9ef89150ea ARM: OMAP4: PM: Fix the PRM and CM base addresses
This patch fixes the PRM and CM base addresses and adds
a new CM2 base address for OMAP4

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
2009-12-11 17:00:44 -07:00
Kevin Hilman
81d7c6ffcc OMAP: hwmod: warn on missing clockdomain
WARN if a clock/hwmod is missing a clockdomain association since
resulting hwmod will not be able to correctly enable/disable clocks.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2009-12-11 17:00:44 -07:00
Paul Walmsley
a16b1f7f86 OMAP3 hwmod: drop most of the OCP_SYSCONFIG.CLOCKACTIVITY code
Earlier, the hwmod code had considered the OCP_SYSCONFIG.CLOCKACTIVITY
bits to be incremental power saving bits, controlling internal IP
block clock gates.  This was a misapprehension.  The CLOCKACTIVITY
bits are used to indicate, in advance, which clocks will be cut when
the module acknowledges an idle request.  This enables the IP block to
take whatever action is necessary to complete any in-progress work
before asserting its IdleAck.

In the current Linux-OMAP code, this implies that the clock framework
should be changing module CLOCKACTIVITY bits as module clocks are enabled
and disabled.  We don't do that yet, but in the future, we should.
This must wait until the clock tree is annotated with omap_hwmod pointers
(or vice-versa).  In the meantime, drop most of the hwmod code that
controls CLOCKACTIVITY bits to avoid confusion.

This patch has benefited from many illuminating discussions with (in
alphabetical order) Benoît Cousson <b-cousson@ti.com>, Rajendra Nayak
<rnayak@ti.com>, and Sebastien Sabatier <s-sabatier1@ti.com>.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Sebastien Sabatier <s-sabatier1@ti.com>
Cc: Benoît Cousson <b-cousson@ti.com>
2009-12-11 17:00:43 -07:00
Paul Walmsley
718bfd7693 OMAP hwmod: add names to module MPU IRQ lines
Replace the existing u8 array of module MPU IRQ lines with a struct
that includes a name - similar to the existing struct
omap_hwmod_dma_info.  Device drivers can then use
platform_get_resource_byname() to retrieve specific IRQs without nasty
dependencies on array ordering.

Thanks to Benoît Cousson <b-cousson@ti.com> and Kevin Hilman
<khilman@deeprootsystems.com> for feedback on this approach.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoît Cousson <b-cousson@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
2009-12-11 17:00:43 -07:00
Paul Walmsley
726072e5dd OMAP3 hwmod: Add automatic OCP_SYSCONFIG AUTOIDLE handling
This patch fills in the OCP_SYSCONFIG.AUTOIDLE handling in the OMAP
hwmod code.

After this patch, the hwmod code will set the module AUTOIDLE bit
(generally <module>.OCP_SYSCONFIG.AUTOIDLE) to 1 by default upon
enable.  If the hwmod flag HWMOD_NO_OCP_AUTOIDLE is set, AUTOIDLE will
be set to 0 upon enable.  Upon module disable, AUTOIDLE will be set to
1.

Enabling module autoidle should save some power.  The only reason to
not set the OCP_SYSCONFIG.AUTOIDLE bit is if there is a bug in the
module RTL, e.g., the MPUINTC block on OMAP3.

Comments from Kevin Hilman <khilman@deeprootsystems.com> inspired this patch,
and Kevin tested an earlier version of this patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-12-11 17:00:43 -07:00
Paul Walmsley
b835d01421 OMAP3 hwmod: reprogram OCP_SYSCONFIG register after setting SOFTRESET
Reprogram the module's OCP_SYSCONFIG register after module reset (SOFTRESET
= 1).  This may not be needed, but the definition of the reset performed by
the SOFTRESET bit is unclear.

Kevin Hilman <khilman@deeprootsystems.com> tested an earlier version of
this patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-12-11 17:00:43 -07:00
Paul Walmsley
6f8b7ff5b0 OMAP clock/hwmod: fix off-by-one errors
Fix loop bailout off-by-one bugs reported by Juha Leppänen
<juha_motorsportcom@luukku.com>.

This second version incorporates comments from Russell King
<linux@arm.linux.org.uk>.  A new macro, 'omap_test_timeout', has
been created, with cleaner code, and existing code has been converted
to use it.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Juha Leppänen <juha_motorsportcom@luukku.com>
Cc: Russell King <linux@arm.linux.org.uk>
2009-12-11 17:00:43 -07:00
Thara Gopinath
3863c74b51 OMAP3: PM: Fix for MPU power domain MEM BANK position
MPU power domain bank 0 bits are displayed in position of bank 1
in PWRSTS and PREPWRSTS registers. So read them from correct
position

Signed-off-by: Thara Gopinath <thara@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2009-12-11 17:00:42 -07:00
Paul Walmsley
18862cbe47 OMAP3: SDRC: Place SDRC AC timing and MR changes in CORE DVFS SRAM code behind Kconfig
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
<rnayak@ti.com> (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 <b-cousson@ti.com> and Christophe Sucur
<c-sucur@ti.com> 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 <r-woodruff2@ti.com>, Nishanth Menon
<nm@ti.com>, and Olof Johansson <olof@lixom.net> for their comments.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Christophe Sucur <c-sucur@ti.com>
Cc: Benoît Cousson <b-cousson@ti.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Olof Johansson <olof@lixom.net>
2009-12-11 17:00:42 -07:00
Roel Kluin
1fda39e6fd OMAP2/3 powerdomain: return errors rather than returning the output of IS_ERR()
IS_ERR returns only 1 or 0, and the functions return a negative error
in other cases anyways.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2009-12-11 17:00:41 -07:00
Paul Walmsley
2354eb5a94 OMAP powerdomain/PM: use symbolic constants for the max number of power states
Replace some bare constants with power states.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
2009-12-11 17:00:41 -07:00
Paul Walmsley
6a06fa6863 OMAP clockdomain/powerdomain: optimize out sleepdep code on OMAP24xx
OMAP24xx chips don't support software-configurable sleep dependencies.
Test early for this so the compiler can redact the entire function body
on OMAP24xx.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2009-12-11 17:00:41 -07:00
Paul Walmsley
33903eb55a OMAP clockdomain/powerdomain: remove CONFIG_OMAP_DEBUG_{CLOCK,POWER}DOMAIN
Avoid cluttering the Kconfig space with debug options that are rarely
used.  These can now be enabled and disabled by patching the "#undef DEBUG"
in the source files with "#define DEBUG", conforming to the practice for
the rest of the linux-omap code.

Also, while we're here, some lines in plat-omap/Kconfig use sets of
leading spaces when those lines should start with tabs.  Convert most
of them to use tabs.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
2009-12-11 17:00:40 -07:00
Paul Walmsley
42d75e7df3 OMAP2/3 PRCM: don't export prm_*(), cm_*() functions
Device drivers and loadable modules should not be calling these
prm_* and cm_* functions, so stop exporting them.  Only core code
and device driver integration code (in arch/arm/*omap*) should
call these functions.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2009-12-11 17:00:40 -07:00
Paul Walmsley
d8a944582d OMAP2 clock: convert clock24xx.h to clock2xxx_data.c, opp2xxx*
The OMAP2 clock code currently #includes a large .h file full of static
data structures.  Instead, define the data in a .c file.

Russell King <linux@arm.linux.org.uk> proposed this new arrangement:

    http://marc.info/?l=linux-omap&m=125967425908895&w=2

This patch also deals with most of the flagrant checkpatch violations.

While here, separate the prcm_config data structures out into their own
files, opp2xxx.h and opp24{2,3}0_data.c, and only build in the OPP tables
for the target device.  This should save some memory.  In the long run,
these prcm_config tables should be replaced with OPP code.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Cc: Nishanth Menon <nm@ti.com>
2009-12-11 16:16:00 -07:00
Paul Walmsley
82e9bd5885 OMAP3 clock: convert clock34xx.h to clock34xx_data.c
The OMAP3 clock code currently #includes a large .h file full of static
data structures.  Instead, define the data in a .c file.

Russell King <linux@arm.linux.org.uk> proposed this new arrangement:

    http://marc.info/?l=linux-omap&m=125967425908895&w=2

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Russell King <linux@arm.linux.org.uk>
2009-12-11 16:12:15 -07:00
Paul Walmsley
75d4334011 OMAP2xxx clock: remove implicit dependency between rate CPU flag and clkdev_omap CPU flag
cpu_mask is reused in the OMAP2xxx clock code to match against both the
CPU-specific rate flags (e.g., RATE_IN_2420) and the OMAP clkdev integration
code CPU flags (e.g., CK_242X).  This means that any patch that renumbers the
CK_* macros, as the next patch does, will probably break.  This patch
separates the clkdev_omap and clksel_rate CPU type detection flags so
the CK_* macros can be renumbered freely.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2009-12-11 16:12:11 -07:00
Paul Walmsley
55d8a65308 OMAP2/3: move SDRC macros to mach-omap2/sdrc.h
clock34xx.c contains some macros which probably belong in mach-omap2/sdrc.h.
Move those macros to mach-omap2/sdrc.h.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2009-12-11 16:12:11 -07:00
Paul Walmsley
06b16939a3 OMAP2 clock: APLL code shouldn't rely on static clocks in its local namespace
Similar to the previous patch, the APLL code relied on the presence of the
static struct clks in its own namespace.  The APLL code didn't use them for
validation, however - it adjusted its own internal state depending on
the struct clk * that called it.  Now that static struct clks are
leaving the clock24xx.c namespace, use a more durable method: split the
omap2_clk_fixed_enable() function into omap2_clk_apll96_enable() and
omap2_clk_apll54_enable().  They still share a disable function.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2009-12-11 16:12:11 -07:00
Paul Walmsley
ebd893ded2 OMAP1/2/3 clock: remove paranoid checks in preparation for clock{,2xxx,3xxx}_data.c
Some parts of the clock code took advantage of the fact that the statically
allocated clock tree was in clock{,24xx,34xx}.c's local namespace to do some
extra argument checks.  These are overzealous and are more difficult to
maintain when the clock tree is in a separate namespace, so, remove them.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2009-12-11 16:12:07 -07:00
Tomi Valkeinen
d9056ce2af OMAP: SDP: Enable DSS2 for OMAP3 SDP board
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
2009-12-09 18:29:38 +02:00
Tomi Valkeinen
afedec183e OMAP: Add VRAM manager
Add a Video RAM manager for OMAP 2 and 3 platforms. VRAM manager is used
to allocate large continuous blocks of SDRAM or SRAM. The features VRAM
manager has that are missing from dma_alloc_* functions are:

- Support for OMAP2's SRAM
- Allocate without ioremapping
- Allocate at defined physical addresses
- Allows larger VRAM area and larger allocations

The upcoming DSS2 uses VRAM manager.

VRAM area size can be defined in kernel config, board file or with
kernel boot parameters. Board file definition overrides kernel config,
and boot parameter overrides kernel config and board file.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2009-12-09 12:04:33 +02:00
Tomi Valkeinen
dadd2bb931 OMAP: OMAPFB: add omapdss device
The upcoming new display subsystem driver is divided to two devices,
omapdss and omapfb, of which omapdss handles the actual hardware.

This patch adds a dummy omapdss platform device for the current omapfb
driver, which is then used to get the clocks. This will make it possible
for the current and the new display drivers to co-exist.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
2009-12-09 12:04:32 +02:00
Tomi Valkeinen
91773a00f8 OMAP: OMAPFB: split omapfb.h
Split arch/arm/plat-omap/include/mach/omapfb.h into two files:

include/linux/omapfb.h - ioctls etc for userspace and some kernel
                         stuff for board files
drivers/video/omap/omapfb.h - for omapfb internal use

This cleans up omapfb.h and also makes it easier for the upcoming new
DSS driver to co-exist with the old driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
2009-12-09 12:04:06 +02:00
Tomi Valkeinen
b90f8e7296 OMAP2: Add funcs for writing SMS_ROT_* registers
SMS_ROT_* registers are used by VRFB rotation engine.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
2009-12-09 11:44:32 +02:00
Linus Torvalds
1c496784a0 Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (149 commits)
  arm: omap: Add omap3_defconfig
  AM35xx: Defconfig for AM3517 EVM board
  AM35xx: Add support for AM3517 EVM board
  omap: 3630sdp: defconfig creation
  omap: 3630sdp: introduce 3630 sdp board support
  omap3: Add defconfig for IGEP v2 board
  omap3: Add minimal IGEP v2 support
  omap3: Add CompuLab CM-T35 defconfig
  omap3: Add CompuLab CM-T35 board support
  omap3: rx51: Add wl1251 wlan driver support
  omap3: rx51: Add SDRAM init
  omap1: Add default kernel configuration for Herald
  omap1: Add board support and LCD for HTC Herald
  omap: zoom2: update defconfig for LL_DEBUG_NONE
  omap: zoom3: defconfig creation
  omap3: zoom: Introduce zoom3 board support
  omap3: zoom: Drop i2c-1 speed to 2400
  omap3: zoom: rename zoom2 name to generic zoom
  omap3: zoom: split board file for software reuse
  omap3evm: MIgrate to smsc911x ethernet driver
  ...

Fix trivial conflict (two unrelated config options added next to each
other) in arch/arm/mach-omap2/Makefile
2009-12-08 08:15:29 -08:00
Linus Torvalds
79c9601c2e Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (272 commits)
  Fix soc_common PCMCIA configuration
  ARM: 5827/1: SA1100: h3100/h3600: emit messages on failed gpio_request
  ARM: 5826/1: SA1100: h3100/h3600: always build htc-egpio driver
  ARM: 5825/1: SA1100: h3600: update defconfig
  ARM: 5824/1: SA1100: reuse h3600 PCMCIA driver on h3100
  ARM: 5823/1: SA1100: h3100/h3600: add support for gpio-keys
  ARM: 5822/1: SA1100: h3100/h3600: clean up #includes
  ARM: 5821/1: SA1100: h3100/h3600: revise copyright boilerplates
  ARM: 5820/1: SA1100: h3100/h3600: split h3600.c
  ARM: 5819/1: SA1100: h3100/h3600: merge h3600.h and h3600_gpio.h into h3xxx.h
  ARM: 5818/1: SA1100: h3100/h3600: drop old GPIO definitions
  ARM: 5817/1: SA1100: h3100/h3600: configure all unused gpios as inputs
  ARM: 5816/1: SA1100: h3600: remove IRQ_GPIO_* definitions
  ARM: 5815/1: SA1100: h3100/h3600: remove now unused assign_h3600_egpio handlers
  ARM: 5814/1: SA1100: h3100/h3600: convert all users of assign_h3600_egpio to gpiolib
  ARM: 5813/1: SA1100: h3100/h3600: add htc-egpio driver
  ARM: 5812/1: SA1100: h3100/h3600: separate machine-specific LCD helpers
  ARM: 5811/2: pcmcia: convert sa1100_h3600 driver to gpiolib
  ARM: 5799/1: SA1100: h3600: stop setting direction for LCD pins
  ARM: 5798/1: SA1100: h3600: remove unused cruft from h3600.h
  ...
2009-12-08 08:12:43 -08:00
Takashi Iwai
baf9226667 Merge branch 'topic/asoc' into for-linus 2009-12-04 16:22:41 +01:00
Alexander Shishkin
183bd50f4f ARM: 5843/1: OMAP3: add AMBA devices for ETM and ETB
This enables on-chip tracing components found in omap3xxx.

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-12-02 10:25:23 +00:00
Ranjith Lohithakshan
c625327e2f AM35xx: Add support for AM3517 EVM board
This patch creates a minimal AM3517 EVM board support.

Signed-off-by: Ranjith Lohithakshan <ranjithl@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-25 14:21:01 -08:00
vikram pandita
34c9ac2376 omap: 3630sdp: introduce 3630 sdp board support
Add 3630SDP board support

The board shares the same peripherals as a zoom2 main.
So reuse the peripheral file of zoom platform.

Peripheral    zoom2    zoom3  sdp3630
---------------------------------------
Ethernet	smsc	smsc	smc
NOR		n/a     n/a	B
Onenand	  	n/a     n/a	B
HDMI		A	A	B (persent on different i2c)
NAND		A	A	A (same nand)
SDRAM		A	A	A (same sdram)
Keypad		A	A	A (same twl)
Camera		A	A	A (same sensor can be mounted)
LCD Display	A	A	A (same wvga display)
OPPs		A	A	A (same chip feature)
Audio		A	A	A (same audio via twl5030)

OMAP3630 details can be found here:
http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&navigationId=12836&contentId=52606

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-25 14:21:01 -08:00
Enric Balletbo i Serra
58e111621d omap3: Add minimal IGEP v2 support
The IGEP v2 board is a low-cost, fan-less and industrial temperature
range single board computer that unleashes laptop-like performance and
expandability without the bulk, expense, or noise of typical desktop
machines. Its architecture shares much in common with other OMAP3 boards.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-25 14:21:00 -08:00
Mike Rapoport
2886d128d8 omap3: Add CompuLab CM-T35 board support
This patch adds basic support for CompuLab CM-T35 module.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-25 14:21:00 -08:00
Kalle Valo
a24e61a9ce omap3: rx51: Add wl1251 wlan driver support
wl1251 is connected to the SPI bus in rx51, add support for this.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:33 -08:00
Tero Kristo
2000655ee7 omap3: rx51: Add SDRAM init
This patch adds board specific SDRAM init for RX51. This patch is a
collaboration of work from following people:

Juha Yrjola: Original code
Lauri Leukkunen: Port to RX51
Tero Kristo: Support for multiple OPP:s, merge of patches
Samu Onkalo: Fixed SDRAM parameters according to specs
Kalle Jokiniemi: A fix for rounding error

Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
Cc: Samu Onkalo <samu.p.onkalo@nokia.com>
Cc: Kalle Jokiniemi <kalle.jokiniemi@digia.com>
Cc: Lauri Leukkunen <lauri.leukkunen@nokia.com>
Cc: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:33 -08:00
vikram pandita
5f35fbe8b8 omap3: zoom: Introduce zoom3 board support
Zoom3 is the next version of Zoom2 board.
There has been a silicon update from zoom2 to zoom3.
        Zoom2 has OMAP34xx
        Zoom3 has OMAP3630 [1]
Zoom3 = OMAP3630 SOM board [2] + same zoom2 main board [3] + same debugboard

Zoom3 has a SDRAM part from Hynix
Zoom2 had SDRAM part from micron

Hynix memory timings are contributed by:
Chalhoub, Nicole and Bour, Vincent

Reuse the zoom2 files as much for zoom3, as at board level,
there is no change at all.

References: (courtesy Nishant Menon)
[1] OMAP3630
http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&navigationId=12836&contentId=52606

[2] SOM boards
http://logicpd.com/products/system-modules/texas-instruments-omap35x-som-lv

[3] Zoom2 boards
http://logicpd.com/products/development-kits/texas-instruments-zoom%E2%84%A2-omap34x-ii-mdp
OMAP3630:

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Cc: Nicole Chalhoub <n-chalhoub@ti.com>
Cc: Vincent Bour <v-bour@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:33 -08:00
vikram pandita
6b61a83b31 omap3: zoom: Drop i2c-1 speed to 2400
The I2C-1 bus frequency on zoom2/zoom3/sdp3630 should be 2.4 MHz.
The speed is limited by TWL5030/GAIA; a higher speed could lead to errors
on the interface.

The maximum I2C speed depends on the system clock for GAIA:
2.2 MHz (sys-clk = 19.2 MHz)
2.4 MHz (sys-clk = 26 MHz)
2.9 MHz (sys-clk = 38.4 MHz)

For Zoom2/Zoom3/SDP3630 the system clock is 26Mhz
and hence choose 2.4Mhz for I2C1 bus speed

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:33 -08:00
vikram pandita
62d0b336d4 omap3: zoom: rename zoom2 name to generic zoom
Replace zoom2 with zoom name in board-zoom-peripherals.c file
and board-zoom-debugboard.c. Create mach/board-zoom.h.

This file has functions reused for boards: Zoom2/Zoom3/sdp3630.
Hence have all functions commonly named as zoom

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:33 -08:00
vikram pandita
479f12c9e2 omap3: zoom: split board file for software reuse
Split zoom2 board file into a base board file and a board-zoom-peripherals.c
file. That way the same peripherals file can be reused for zoom3 and sdp3630
in addition to zoom2.

Also remove unused struct omap_board_config_kernel entry.

NOTE: Keep the twl4030_madc_platform_data and twl4030_platform_data
entries in board-zoom2.c to avoid merge conflicts with the pending
patches in MFD tree. These entries will be removed later as a fix.

Following list shows the commonality across the three platforms and hence the
case for software reuse:

Peripheral    zoom2    zoom3  sdp3630
---------------------------------------
Ethernet        smsc    smsc    smc
NOR             n/a     n/a     B
Onenand         n/a     n/a     B
HDMI            A       A       B (present on different i2c)
NAND            A       A       A (same nand)
SDRAM           A       A       A (same sdram)
Keypad          A       A       A (same twl)
Camera          A       A       A (same sensor can be mounted)
LCD Display     A       A       A (same wvga display)
OPPs            A       A       A (same chip feature)
Audio           A       A       A (same audio via twl5030)

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:33 -08:00
Sriram
562138a448 omap3evm: MIgrate to smsc911x ethernet driver
Migrate to smsc911x ethernet driver instead of smc911x driver.
The smsc911x ethernet driver supports NAPI and performs better
under heavy traffic. With the smc911x driver we were witnessing
very high iowait time for high IO load over NFS.

Signed-off-by: Sriramakrishnan <srk@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:33 -08:00
Mike Rapoport
1a7ec135d8 omap3evm: Initialize vmmc and vmmc_aux regulators
Initialize vmmc and vmmc_aux regulators

Note that the omap3evm_twldata.vmmc1 and omap3evm_twldata.vsim
are set in omap3_evm_i2c_init() to avoid a merge conflict
with the MFD tree. These will be initialized in omap3evm_i2c_boardinfo
as a fix later on.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:33 -08:00
Ajay Kumar Gupta
e8e51d2920 omap3evm: ehci: Update EHCI support on OMAP3EVM (Rev >= E)
Added runtime programming for the differences in EHCI interface between
OMAP3EVM revisions (Rev >= E) and (Rev < E).

Changes:
	- EHCI PHY reset GPIO pin is 21 on Rev >= E while Rev < E
	  uses GPIO pin 135.
	- Rev >= E uses EHCI Vbus enable GPIO22 line.
	- Rev >= E uses GPIO61 to select EHCI port either on main board or
	  on Mistral Daughter Card (MDC). OMAP3EVM Rev < E doesn't have
	  EHCI port on main board.
	- Currently GPIO61 it programmed to enable EHCI port on main
	  board only.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
2009-11-22 10:24:33 -08:00
Ajay Kumar Gupta
db408023b8 omap3evm: Add board revision function
Added function to differentiate between the OMAP3EVM revisions. The
chip-id of the ethernet PHY is being used for this purpose.

Rev A to D : 0x01150000
Rev >= E   : 0x92200000

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:33 -08:00
Felipe Balbi
edeae658b2 omap: Cleanup the coding style in id.c
Cleanup the coding style in id.c while avoiding unneeded switch()
statements.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:33 -08:00
C A Subramaniam
5f00ec64a3 omap: mailbox: Adds code changes to support OMAP4 mailbox
This patch adds code changes in the mailbox driver module to
add support for OMAP4 mailbox.

Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
Signed-off-by: C A Subramaniam <subramaniam.ca@ti.com>
Signed-off-by: Ramesh Gupta G <grgupta@ti.com>
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:33 -08:00
C A Subramaniam
454bf340c9 omap: mailbox: Add resources and mailbox register base address for OMAP4 mailbox
This patch adds resource information of mailbox driver for
OMAP4 mailbox module. Register base address also added

Signed-off-by: C A Subramaniam <subramaniam.ca@ti.com>
Signed-off-by: Ramesh Gupta G <grgupta@ti.com>
Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:33 -08:00
C A Subramaniam
59fdc6ebda omap: mailbox: Add build specific changes to support omap mailbox
This patch adds changes to the build related files of mailbox
driver

Signed-off-by: C A Subramaniam <subramaniam.ca@ti.com>
Signed-off-by: Ramesh Gupta G <grgupta@ti.com>
Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:32 -08:00
Kevin Hilman
cedf900d65 omap3: keep SoC features on the same line
When listing the various SoC features, print them on the same line.
So, instead of this

OMAP3430/3530 ES3.1
 - l2cache : Y
 - iva : Y
 - sgx : Y
 - neon : Y
 - isp : Y

you get this:

OMAP3430/3530 ES3.1 (l2cache iva sgx neon isp )

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:32 -08:00
Nishanth Menon
05574bb27a omap3: move check_revision above check_features
omap3_check_revision() does not depend on omap3_check_features()
move this above so that we can add logic based on revision
detected in check_features.

Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:32 -08:00
Madhu
4679232d3a omap3: HSMMC2 8-bit mux configuration
Add support for omap hsmmc2 8-bit mux configuration.

Signed-off-by: Madhusudhan Chikkature <madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:32 -08:00
Madhu
555d503ff3 omap3630: Set omap3630 MMC1 I/O speed to 52Mhz
The speed ctrl bit for MMC I/O is part of CONTROL_PROG_IO1 register
in omap3630.This patch sets it up accordingly.

Signed-off-by: Madhusudhan Chikkature <madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:32 -08:00
Madhu
41fd03d66e omap3630: Configure HSMMC1 to 4-bit
The HSMMC1 controller on omap3630 supprts only 4-bit mode. If cpu
is 3630 configure HSMMC1 wires to 4-bit.

Signed-off-by: Madhusudhan Chikkature <madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:32 -08:00
Madhu
4596d14ad8 omap3630: Add HSMMC related checks
Change the cpu_is_omap3430() check to cpu_is_omap34xx() to allow HSMMC1/2
mux configuration for omap3630.

Signed-off-by: Madhusudhan Chikkature <madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-11-22 10:24:32 -08:00