Commit Graph

82 Commits

Author SHA1 Message Date
Tony Lindgren 4952af4357 ARM: OMAP2+: Make id.h local
This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-09-20 15:02:22 -07:00
Tony Lindgren 3c101c41fb smatch and string-wrapping cleanups for the OMAP subarch code.
These changes fix some of the more meaningful warnings that smatch
 returns for the OMAP subarch code, and unwraps strings that are
 wrapped at the 80-column boundary, to conform with the current
 practice.
 
 Basic build, boot, and PM logs are available here:
 
 http://www.pwsan.com/omap/testlogs/warnings_a_cleanup_3.7/20120912025927/
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQUKL1AAoJEMePsQ0LvSpL+a8QAJlJR9uwqUKu60GfbQEeegce
 k6pr0xXYvHEmbro/v6O4ezs2o716EBgwBWnId97oOZvVnwhPbEHR87UH8FFOIWOQ
 +/ui5MxXtYWNjYcDOzdF95reFM1szAAxQu8k9wXg+WBtZ4zCkhknpoftShRbOdg0
 BgO0r1iY/wuoFaYgGFKSNdObPVgSTENjbtg/LVvB/V3PQjYmUBosJVH0tPO/LQio
 pWhozfFuiWbARYxPg6dMOn8yQ5mCeWErpv4WZjM+dgcrkLYyPdI2uUS3Ka8F7Az2
 ImC+k0gU6WwkjyKqv/SG2wg5+3Sh8ZZsX0EKXwq0gQEmLWacENS1ELRT3+HcxGru
 HoAhE46URb4NGzBt7rkIkGg0HcajfORDtZSrGfsEclDmrVV5+JgUzC+PEDiwSxVU
 LqpJIZ8lxjqBNPSlmXqtEgTG32M6E9fDII8JdGC64vUv+vXzuhpJCXF78I8+A+Hv
 oSBbTOCzYGz1xp06G6Hzadpo5I1LocBRemsnhw2O9oNDdUZxiGo/qJcWfk2wpMQ6
 4c/kHbYEsJ6/7eVe5kNtdkeptAXp1AFO5XIhQpSAs1O1Rr++nDNahaUJA56xev8x
 GoEZCYLGMGpQnINW6g0Srzwp8n1ywSgt3Gt2fbDTAP+Q02DPT3IIWWs4LlIDIrjZ
 w0q1kAp1+In5is3pxJvT
 =ythb
 -----END PGP SIGNATURE-----

Merge tag 'omap-cleanup-b-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into cleanup-makefile-sparse

smatch and string-wrapping cleanups for the OMAP subarch code.

These changes fix some of the more meaningful warnings that smatch
returns for the OMAP subarch code, and unwraps strings that are
wrapped at the 80-column boundary, to conform with the current
practice.

Basic build, boot, and PM logs are available here:

http://www.pwsan.com/omap/testlogs/warnings_a_cleanup_3.7/20120912025927/
2012-09-12 20:42:36 -07:00
Tony Lindgren dbc0416104 ARM: OMAP: Split plat/hardware.h, use local soc.h for omap2+
As the plat and mach includes need to disappear for single zImage work,
we need to remove plat/hardware.h.

Do this by splitting plat/hardware.h into omap1 and omap2+ specific files.

The old plat/hardware.h already has omap1 only defines, so it gets moved
to mach/hardware.h for omap1. For omap2+, we use the local soc.h
that for now just includes the related SoC headers to keep this patch more
readable.

Note that the local soc.h still includes plat/cpu.h that can be dealt
with in later patches. Let's also include plat/serial.h from common.h for
all the board-*.c files. This allows making the include files local later
on without patching these files again.

Note that only minimal changes are done in this patch for the
drivers/watchdog/omap_wdt.c driver to keep things compiling. Further
patches are needed to eventually remove cpu_is_omap usage in the drivers.

Also only minimal changes are done to sound/soc/omap/* to remove the
unneeded includes and to define OMAP44XX_MCPDM_L3_BASE locally so there's
no need to include omap44xx.h.

While at it, also sort some of the includes in the standard way.

Cc: linux-watchdog@vger.kernel.org
Cc: alsa-devel@alsa-project.org
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: Liam Girdwood <lrg@ti.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-09-12 18:06:31 -07:00
Paul Walmsley 7852ec0536 ARM: OMAP: unwrap strings
Find and unwrap wrapped strings in the style:

	pr_debug("clockdomain: hardware cannot set/clear wake up of "
		 "%s when %s wakes up\n", clkdm1->name, clkdm2->name);

Keeping these strings contiguous seems to be the current Linux kernel
policy.

The offending lines were found with the following command:

    pcregrep -rnM '"\s*$\s*"' arch/arm/*omap*

While here, some messages have been clarified, some pr_warning(
... calls have been converted to pr_warn( ..., and some printk(KERN_*
... have been converted to pr_*.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2012-09-12 02:57:10 -06:00
R Sricharan b13e80a8bf ARM: OMAP5: id: Add cpu id for ES versions
Adding the OMAP5 ES1.0, 2.0 and OMAP5432 cpu revision
detection support.

Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
2012-07-09 19:14:39 +05:30
Vaibhav Hiremath 971b8a9c3e ARM: OMAP2+: am33xx: Change cpu_is_am33xx to soc_is_am33xx
As per recent discussion on the linux-omap list, we are
moving in the direction where, we will have only architecture,
ARCH_OMAP2PLUS and all devices/platforms will be treated
as a SoC underneath.

So the first step in this direction is to adopt this change
for all new devices getting in, converting
cpu_is_am33xx/335x() ==> soc_is_am33xx/335x()

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-07-05 08:05:15 -07:00
Tony Lindgren 4564747649 Merge branch 'for_3.5/fixes/pm' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into fixes 2012-06-04 02:09:45 -07:00
Mark A. Greer 1ce0299687 arm: omap3: am35x: Don't mark missing features as present
The Chip Identification register on the am35x family of SoCs
has bits 12, 7:5, and 3:2 marked as reserved and are read as
zeroes.  Unfortunately, on other omap SoCs, a 0 bit means a
feature is "Full Use" so the OMAP3_CHECK_FEATURE() macro
called by omap3_check_features() will incorrectly interpret
those zeroes to mean that a feature is present even though it
isn't.  To fix that, the feature bits that are incorrectly
set (namely, OMAP3_HAS_IVA and OMAP3_HAS_ISP) need to be
cleared after all of the calls to OMAP3_CHECK_FEATURE() in
omap3_check_features() are made.

Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
[khilman@ti.com: use soc_is_am35xx() instead of cpu_is_am35xx()]
Signed-off-by: Kevin Hilman <khilman@ti.com>
2012-05-11 16:47:19 -07:00
Olof Johansson 5056c073d1 Simplify some SoC config options before things get too unreadable.
Note that this depends on a fix in omap-fixes-non-critical-for-v3.5,
 so it's based on that.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPrAV8AAoJEBvUPslcq6VzYZAP/045jltORwb24AWaz4wYlraZ
 v+Ctq25GmirZiFU9/88N5EHeYNQI1ep/sdtzLb+Pcfe1uqGGkoXMBEtyQ12if2yI
 1vFoRaHDFHTNOsi3Y0SfOrE6q+zFX8SqVtTUSzXI0QELY2wektKLdC4THHmf5M/R
 g0aRLTBbPDtpWHkqjuU4u7gKu7doOJtBJ8n/pZG+oZ2xn8AKJQ/l3J2nF0fBhSX5
 HsvrKtc5lhMNVCpmi0D+kJAIsKRdDREA94dLoUPIEdxSK4b6w5/hclPwzZDcnrm5
 6jLFWVxs3vxJoWXB86CDhweqWF5nxMitb/DQvYYKDSJJz8xqu+j2vZ9tAApQhQax
 uUsr5UH/TP/fd37TJuVJUqGRLjcYy6KfVVDdxqenrQodxsffsFAQ+qD4YoQ8WRKs
 soeknAI2WMNoOkEud6nJZzADNeSmbQC2hBdZ1QioScgC3O7ubv0FjsjAd8CKr46d
 vcQ5DglQeFeTrUAA+eCtP7ZMFlWMWi7pKiyaXo+YkT0kaFYCZLxyuEglI/DhrcZl
 1rEu6foUegdigDM+L+WF5wTEPZXtWRdQTHv+aZiu6GXZ3/AbPrLxM3qWuYR4uyZ4
 uhMs5xPXIK99OpCmqy9nAIekYq8nicZCsdnL8HGp5L28Lmhg9ITKonXsD6p4GHS2
 OJ29rPNiJyh/RMQQIq3i
 =V8mj
 -----END PGP SIGNATURE-----

Merge tag 'omap-cleanup-renames-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup2

Simplify some SoC config options before things get too unreadable.

Note that this depends on a fix in omap-fixes-non-critical-for-v3.5,
so it's based on that.

By Kevin Hilman (3) and others
via Tony Lindgren
* tag 'omap-cleanup-renames-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: Kconfig: convert SOC_OMAPAM33XX to SOC_AM33XX
  ARM: OMAP2+: Kconfig: convert SOC_OMAPTI81XX to SOC_TI81XX
  ARM: OMAP: igep0020: Specify the VPLL2 regulator unconditionally
  ARM: OMAP2+: INTC: fix Kconfig option for TI81XX
  ARM: OMAP2+: remove incorrect irq_chip ack field
  ARM: OMAP4: Adding ID for OMAP4460 ES1.1
  ARM: OMAP4: panda: add statics to remove warnings
  ARM: OMAP2+: Incorrect Register Offsets in OMAP Mailbox
  ARM: OMAP: fix trivial warnings for dspbridge
  ARM: OMAP4: hsmmc: check for null pointer
  ARM: OMAP1: fix compilation issue in board-sx1.c
2012-05-10 23:32:04 -07:00
Kevin Hilman 68a88b9887 ARM: OMAP: AM35xx: convert 3517 detection/flags to AM35xx
Currently cpu_is_omap3517() actually detects any device in the AM35x
family (3517 and no-SGX version 3505.)  To make it more clear what is
being detected, convert the names from 3517 to AM35xx.

This adds a new soc_is_am35xx() which duplicates the cpu_is_omap3517().
In order to avoid cross-tree dependencies with clock-tree changes,
cpu_is_omap3517() is left until the clock changes are merged,
at which point cpu_is_omap3517() will be completely removed.

Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
Tested-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
[tony@atomide.com: change to use soc_is_omap instead]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-05-10 09:39:42 -07:00
Chris Lalancette 33ee0db539 ARM: OMAP4: Adding ID for OMAP4460 ES1.1
Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-05-09 10:28:00 -07:00
Linus Torvalds 281b05392f ARM: SoC specific updates
These changes are all specific to an soc family or the code for
 one soc. Lots of work for Tegra3 this time, but also a lot of other
 platforms. There will be another (smaller) set of soc patches later in
 the merge window for stuff that has dependencies on external trees or
 that was sent just before the merge window opened.
 
 The asoc tree added a few devices to the i.mx platform, which conflict
 with other devices added in the same place here.
 
 The tegra Makefile conflicts between a number of branches, mostly because
 of changes regarding localtimer.c, which was removed in the end.
 
 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIVAwUAT24+62CrR//JCVInAQLQBQ/8ClDSFYKTkh3XuzryyO3xkiuuj9wp3/av
 oEzro6HmSFDeWlqyQYYM9nKn6n3zFyyumG7oHt3OyRwrtV742rMOpTK+/Ntj2lFB
 xUVwKQfu2gEMHvwca3VoXia/pX7knvedEf9bNjeCznkKxQCKCArK2821/2UDGhwx
 L3/lD70AhpfK0DInNr6HusnZG2pzCdV1tLXUvgs08I68wL7Ps1TDPOLLyTo9dAgf
 k+E1cpRNLahyiVUBfnp+n3Dg0T+/7iD6zrR7bE9i/zhv6XUcLPt2K5XqYnPuQvzK
 sHIG8zROmNWzaIzgwYVpJAofi0SHq1OjvA7RtepOq/pGe5QvB9y1RISlpwzBr6Fh
 4yuBkeN/Azk0xSHw5w++8L4y/oSSNhB9OWgIZGChZMW33bnHyiZW9mDFJ/PyWD0F
 kRl++tTuQqDvT5Wx4DXX8RGekIiFq48+MMx3yJjuGarmVsPEvShQCf8TkBbl/KQY
 /AEXMJTaVTED0R/q+NOY/r4oMFC4JtAVo1ZtTga+N5cYWQCwI9HVSgAKw84Yc1Hj
 h9r7XjDhmGYFWMfWe9V5NtFNmXl6tAo66fMzSG6+9k+UEXiF1WrhnzBuks5zFU7z
 z4WBRL0GmaNBdq58dJoM4lucnuhhQk2m7wz5Lt4o17enw0dAfSXQMstDMnbE7c51
 65yZh8o9mxs=
 =WdYR
 -----END PGP SIGNATURE-----

Merge tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull "ARM: SoC specific updates" from Arnd Bergmann:
 "These changes are all specific to an soc family or the code for one
  soc.  Lots of work for Tegra3 this time, but also a lot of other
  platforms.  There will be another (smaller) set of soc patches later
  in the merge window for stuff that has dependencies on external trees
  or that was sent just before the merge window opened.

  The asoc tree added a few devices to the i.mx platform, which conflict
  with other devices added in the same place here.

  The tegra Makefile conflicts between a number of branches, mostly
  because of changes regarding localtimer.c, which was removed in the
  end.

  Signed-off-by: Arnd Bergmann <arnd@arndb.de>"

Fix up some trivial conflicts, including the mentioned Tegra Makefile.

* tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (51 commits)
  ARM: EXYNOS: fix cycle count for periodic mode of clock event timers
  ARM: EXYNOS: add support JPEG
  ARM: EXYNOS: Add DMC1, allow PPMU access for DMC
  ARM: SAMSUNG: Correct MIPI-CSIS io memory resource definition
  ARM: SAMSUNG: fix __init attribute on regarding s3c_set_platdata()
  ARM: SAMSUNG: Add __init attribute to samsung_bl_set()
  ARM: S5PV210: Add usb otg phy control
  ARM: S3C64XX: Add usb otg phy control
  ARM: EXYNOS: Enable l2 configuration through device tree
  ARM: EXYNOS: remove useless code to save/restore L2
  ARM: EXYNOS: save L2 settings during bootup
  ARM: S5P: add L2 early resume code
  ARM: EXYNOS: Add support AFTR mode on EXYNOS4210
  ARM: mx35: Setup the AIPS registers
  ARM: mx5: Use common function for configuring AIPS
  ARM: mx3: Setup AIPS registers
  ARM: mx3: Let mx31 and mx35 enter in LPM mode in WFI
  ARM: defconfig: imx_v6_v7: build in REGULATOR_FIXED_VOLTAGE
  ARM: imx: update imx_v6_v7_defconfig
  ARM: tegra: Demote EMC clock inconsistency BUG to WARN
  ...
2012-03-27 16:14:44 -07:00
Arnd Bergmann f82989bde1 Merge branch 'fixes' of git://gitorious.org/linux-davinci/linux-davinci into next/fixes-non-critical
* 'fixes' of git://gitorious.org/linux-davinci/linux-davinci: (2 commits)
  ARM: davinci: DA850: move da850_register_pm to .init.text
  ARM: davinci: cpufreq: fix compiler warning

(update to v3.3-rc7)

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-03-15 15:51:06 +00:00
Olof Johansson ae0b82504e Merge branch 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/renesas into next/soc
* 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/renesas: (234 commits)
  ARM: shmobile: remove additional __io() macro use
  ARM: mach-shmobile: default to no earlytimer
  ARM: mach-shmobile: r8a7779 and Marzen timer rework
  ARM: mach-shmobile: r8a7740 and Bonito timer rework
  ARM: mach-shmobile: sh73a0, AG5EVM and Kota2 timer rework
  ARM: mach-shmobile: sh7372, AP4EVB and Mackerel timer rework
  ARM: mach-shmobile: sh7377 and G4EVM timer rework
  ARM: mach-shmobile: sh7367 and G3EVM timer rework
  ARM: mach-shmobile: add shmobile_earlytimer_init()
  ARM: mach-shmobile: Move sh7372 AP4EVB external clk setup
  ARM: mach-shmobile: Move sh7372 Mackerel external clk setup
  ARM: mach-shmobile: rename clk_init() to shmobile_clk_init()
  ARM: mach-shmobile: r8a7779 L2 cache support
  ARM: mach-shmobile: r8a7779 map_io and init_early update
  ARM: mach-shmobile: r8a7740 map_io and init_early update
  ARM: mach-shmobile: sh73a0 map_io and init_early update
  ARM: mach-shmobile: sh7372 map_io and init_early update
  ARM: mach-shmobile: sh7377 map_io and init_early update
  ARM: mach-shmobile: sh7367 map_io and init_early update
  sh: remove clk_ops
  ...

  (includes an update to v3.3-rc7)

Conflicts:
	arch/arm/mach-omap2/id.c
2012-03-13 17:38:09 -07:00
Afzal Mohammed fb3cfb1ff9 ARM: OMAP2+: id: Add am33xx SoC type detection
Determine SoC type, i.e. whether GP or HS

Note: cpu_is_34xx() is true for am33xx also. Doing
cpu_is_am33xx() check after cpu_is_34xx() will not
achieve what we want due to the above reason.
Hence cpu_is_am33xx() is done before cpu_is_34xx()

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-03-05 16:11:01 -08:00
Vaibhav Hiremath c2d1355476 ARM: OMAP: id: Add missing break statement in omap3xxx_check_revision
Add missing break statement in the function omap3xxx_check_revision.

The commit id 4390f5b2cb [ARM: OMAP: TI814X: Add cpu type macros
and detection support], removed the 'break' statement from the function
omap3xxx_check_revision(), resulting into wrong omap/cpu_revision
initialization for AM335x devices.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
[tony@atomide.com: refreshed to apply after changes to cpu_rev]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-02-29 14:41:35 -08:00
Vaibhav Hiremath 4de34f3572 ARM: OMAP2+: split omap2/3/4_check_revision function
We need to detect the SoC revision early, but the SoC
feature detection can be done later on. In order to allow
further clean-up later on, this patch separates the SoC
revision check from the SoC feature check.

This patch doesn't change functionality or behavior of the code
execution; it barely cleans up the code and splits into SoC
specific implementation for Rev ID and feature detection.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
[tony@atomide.com: updated comments]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-12-19 15:47:14 -08:00
Vaibhav Hiremath 50a01e6440 ARM: OMAP2+: Make cpu_rev static global variable
As part of omap revision code cleanup, make cpu_rev
variable static global to the file (id.c). This is
needed so we can split the SoC detection from SoC
feature detection in the following patch. Also move
omap3_cpuinfo function a bit as that will be shared
by other omap3 like SoCs.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
[tony@atomide.com: updated comments]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-12-19 15:40:54 -08:00
Hemant Pedanekar 4390f5b2cb ARM: OMAP: TI814X: Add cpu type macros and detection support
This patch adds cpu type, macros for identification of TI814X device.

Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
[tony@atomide.com: left out CK_TI814X for now]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-12-13 10:46:45 -08:00
Hemant Pedanekar a920360f03 ARM: OMAP: TI81XX: Prepare for addition of TI814X support
This patch updates existing macros, functions used for TI816X, to enable
addition of other SoCs belonging to TI81XX family (e.g., TI814X).

The approach taken is to use TI81XX/ti81xx for code/data going to be common
across all TI81XX devices.

cpu_is_ti81xx() is introduced to handle code common across TI81XX devices.

In addition, ti8168_evm_map_io() is now replaced with ti81xx_map_io() and moved
in mach-omap2/common.c as same will be used for TI814X and is not board
specific.

Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-12-13 10:46:44 -08:00
Leonid Iziumtsev ec023e46f7 ARM: OMAP: ID: Chip detection for OMAP4470
Add support for detection of the next chip in the OMAP4 family: OMAP4470 ES1.0

For more details on OMAP4470, visit:
http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&navigationId=12869&contentId=123362

Signed-off-by: Leonid Iziumtsev <x0153368@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-12-13 10:46:44 -08:00
David Anders 55035c1524 ARM: OMAP: id: add chip id recognition for omap4430 es2.3
allow for the omap4430 es2.3 revision to be recognized in the
omap4_check_revision() function.

most aspects of all omap4430 es2.x versions are identical, however
a number of small variations such as default pullup or pulldown
resistor configurations vary between revisions.

detailed information on silicon errata for omap4430 revisions can
be found at http://focus.ti.com/pdfs/wtbu/swpz009D.pdf

Signed-off-by: David Anders <x0132446@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-12-13 10:46:44 -08:00
Afzal Mohammed 1e6cb146c3 ARM: OMAP: am33xx: Update common OMAP machine specific sources
This patch updates the common machine specific source files for
support for AM33XX/AM335x with cpu type, macros for identification of
AM33XX/AM335X device.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Tested-by: Kevin Hilman <khilman@ti.com>
[tony@atomide.com: updated for map_io and common.h changes, dropped CK_AM33XX]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-12-13 10:46:43 -08:00
Tony Lindgren 4e65331c6b ARM: 7159/1: OMAP: Introduce local common.h files
As suggested by Russell King - ARM Linux <linux@arm.linux.org.uk>,
there's no need to keep local prototypes in non-local headers.

Add mach-omap1/common.h and mach-omap2/common.h and move the
local prototypes there from plat/common.h and mach/omap4-common.h.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-11-17 17:09:30 +00:00
Tony Lindgren 7fd92b56e5 Merge branch 'for_3.2/pm-cleanup-2' of git://github.com/khilman/linux-omap-pm into fixes 2011-11-04 17:40:52 -07:00
Paul Walmsley b02b917211 ARM: OMAP3: PM: fix I/O wakeup and I/O chain clock control detection
The way that we detect which OMAP3 chips support I/O wakeup and
software I/O chain clock control is broken.

Currently, I/O wakeup is marked as present for all OMAP3 SoCs other
than the AM3505/3517.  The TI81xx family of SoCs are at present
considered to be OMAP3 SoCs, but don't support I/O wakeup.  To resolve
this, convert the existing blacklist approach to an explicit,
whitelist support, in which only SoCs which are known to support I/O
wakeup are listed.  (At present, this only includes OMAP34xx,
OMAP3503, OMAP3515, OMAP3525, OMAP3530, and OMAP36xx.)

Also, the current code incorrectly detects the presence of a
software-controllable I/O chain clock on several chips that don't
support it.  This results in writes to reserved bitfields, unnecessary
delays, and console messages on kernels running on those chips:

    http://www.spinics.net/lists/linux-omap/msg58735.html

Convert this test to a feature test with a chip-by-chip whitelist.

Thanks to Dave Hylands <dhylands@gmail.com> for reporting this problem
and doing some testing to help isolate the cause.  Thanks to Steve
Sakoman <sakoman@gmail.com> for catching a bug in the first version of
this patch.  Thanks to Russell King <linux@arm.linux.org.uk> for
comments.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Dave Hylands <dhylands@gmail.com>
Cc: Steve Sakoman <sakoman@gmail.com>
Tested-by: Steve Sakoman <sakoman@gmail.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-10-07 13:41:49 -07:00
Paul Walmsley 00c46b3069 OMAP: id: remove OMAP_CHIP declarations, code
Now that all of the users of the OMAP_CHIP bitfield code have been converted
to use lists, the OMAP_CHIP code, data, and declarations can be removed.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2011-09-14 17:23:39 -06:00
Paul Walmsley 3b32b7d62e OMAP3: id: remove duplicate code for testing SoC ES level
omap3_cpuinfo() contains essentially duplicated code from
omap3_check_revision(), just for the purpose of determining the chip ES level.
Set the cpu_rev char array pointer in omap3_check_revision() instead,
and drop the now-useless code from omap3_cpuinfo().

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Abhilash Koyamangalath <abhilash.kv@ti.com>
2011-09-14 15:44:55 -06:00
Paul Walmsley 51ec811a29 OMAP3: id: add fallthrough warning; fix some CodingStyle issues
Emit a warning to the console in omap3_check_revision() if that code
cannot determine what type of SoC the system is currently running on.

Remove some extra whitespace, remove some duplicate code, and
add an appropriate comment to a fallthrough case.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Hemant Pedanekar <hemantp@ti.com>
Tested-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Abhilash Koyamangalath <abhilash.kv@ti.com>
2011-09-14 15:44:44 -06:00
Paul Walmsley 9ed2ba7aa7 OMAP3: id: use explicit omap_revision codes for 3505/3517 ES levels
Use explicit revision codes for OMAP/AM 3505/3517 ES levels, as the rest
of the OMAP2+ SoCs do in mach-omap2/cpu.c.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Sanjeev Premi <premi@ti.com>
Tested-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Abhilash Koyamangalath <abhilash.kv@ti.com>
2011-09-14 15:44:30 -06:00
Paul Walmsley 91d92d6cc8 OMAP3: id: remove useless strcpy()s
omap3_cpuinfo() is filled with useless strcpy() calls; remove them.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Sanjeev Premi <premi@ti.com>
Tested-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Abhilash Koyamangalath <abhilash.kv@ti.com>
2011-09-14 15:44:14 -06:00
Paul Walmsley 1f1b0353aa OMAP3: id: remove identification codes that only correspond to marketing names
The OMAP3505/AM3505 appears to be based on the same silicon as the
OMAP3517/AM3517, with some features disabled via eFuse bits.  Follow
the same practice as OMAP3430 and identify these devices internally as
part of the OMAP3517/AM3517 family.

The OMAP3503/3515/3525/3530 chips appear to be based on the same silicon
as the OMAP3430, with some features disabled via eFuse bits.  Identify
these devices internally as part of the OMAP3430 family.

Remove the old OMAP35XX_CLASS, which actually covered two very different
chip families.  The OMAP3503/3515/3525/3530 chips will now be covered by
OMAP343X_CLASS, since the silicon appears to be identical.  For the
OMAP3517/AM3517 family, create a new class, OMAP3517_CLASS.

Thanks to Tony Lindgren <tony@atomide.com> for some help with the second
revision of this patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Sanjeev Premi <premi@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Tested-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Abhilash Koyamangalath <abhilash.kv@ti.com>
2011-09-13 19:52:13 -06:00
Aneesh V cc0170b2d9 OMAP4: ID: add omap_has_feature for max freq supported
Macros for identifying the max frequency supported by various
OMAP4 variants - Expanding along the lines of OMAP3's feature
handling.

[nm@ti.com: minor fixes for checks that should only for 443x|446x]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Aneesh V <aneesh@ti.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Reviewed-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-07-08 02:11:45 -07:00
Aneesh V fa54dccddc OMAP: ID: introduce chip detection for OMAP4460
Add support for detecting the latest in the OMAP4 family: OMAP4460
Among other changes, the new chip also can support 1.5GHz A9s,
1080p stereoscopic 3D and 12 MP stereo (dual camera). In addition,
we have changes to OPPs supported, clock tree etc, hence having a
chip detection is required.

For more details on OMAP4460, see Highlights:
http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?contentId=53243&navigationId=12843&templateId=6123

Public TRM is available here as usual:
http://focus.ti.com/general/docs/wtbu/wtbudocumentcenter.tsp?templateId=6123&navigationId=12667

[nm@ti.com: cleanups and introduction of ramp system]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Aneesh V <aneesh@ti.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Reviewed-by: Paul Walmsley <paul@pwsan.com>
[tony@atomide.com: updated to not use CHIP_IS_OMAP44XX]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-07-08 02:07:48 -07:00
Andy Green b235e00783 OMAP2+: Common CPU DIE ID reading code reads wrong registers for OMAP4430
This adapts the register offsets used to read the CPU DIE ID registers
when run on 44XX so they match what is in the OMAP4430 Reference Manual
page 269

Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-03-14 11:12:54 -07:00
Nishant Kamat e49c4d27ab omap: Add chip id recognition for OMAP4 ES2.1 and ES2.2
Allow OMAP4 ES2.1 and ES2.2 revisions to be recognized in the
omap4_check_revision() function.

Mainly, ES2.1 has fixes that allow LPDDR to be used at 100% OPP (400MHz).
ES2.2 additionally has a couple of power management fixes (to reduce
leakage), an I2C1 SDA line state fix, and a floating point write
corruption fix (cortex erratum).

Even though the current mainline support doesn't need to distinguish
between ES2.X versions, it's still useful to know the correct silicon
rev when issues are reported. Moreover, these id checks can be used by
power management code that selects suitable OPPs considering the
memory speed limitation on ES2.0.

For details about the silicon errata on OMAP4430, refer
http://focus.ti.com/pdfs/wtbu/SWPZ009A_OMAP4430_Errata_Public_vA.pdf

Signed-off-by: Nishant Kamat <nskamat@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-02-17 16:16:35 -08:00
Hemant Pedanekar 01001712c9 TI816X: Update common OMAP machine specific sources
This patch updates the common machine specific source files with support for
TI816X.

Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-02-16 08:31:39 -08:00
Paul Walmsley 4814ced511 OMAP: control: move plat-omap/control.h to mach-omap2/control.h
Only OMAP2+ platforms have the System Control Module (SCM) IP block.
In the past, we've kept the SCM header file in plat-omap.  This has
led to abuse - device drivers including it; includes being added that
create implicit dependencies on OMAP2+ builds; etc.

In response, move the SCM headers into mach-omap2/.

As part of this, remove the direct SCM access from the OMAP UDC
driver.  It was clearly broken.  The UDC code needs an indepth review for
use on OMAP2+ chips.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Cory Maccarrone <darkstar6262@gmail.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
2010-10-08 11:40:20 -06:00
Sanjeev Premi 76abab2135 omap2/3: Update revision identification
The existing definitions for cpu revision used
upper nibble in the bits[15:08]. With OMAP3630,
definitions use lower nibble.

This patch unifies the definitions to start
at lower nibble.

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-10-01 16:35:24 -07:00
Tony Lindgren 91f6c90c8d Merge branch 'omap4_and_sdrc_2.6.27' of git://git.pwsan.com/linux-2.6 into omap-for-linus 2010-09-27 13:17:13 -07:00
Santosh Shilimkar dcf5ef3f42 omap4: control: Fix the control module register accesses
This patch has multiple fixes together. To ensure that git bisect work across
commits, all changes are clubbed together

1. Move the common control base address to control core
2. Remove the manually coeded defines and use the ones from headers.
3. Fix the the status register define in id.c for OMAP4
4. Fix all the register define in hsmmc.c
5. Use the control pad accessor API for omap4 hsmmc register accesses

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-09-27 14:02:58 -06:00
Santosh Shilimkar ed6be0bafc omap4: Update id.c and cpu.h for es2.0
This patch updates the id.c and cpu.h files to support
omap4 ES2.0 silicon detection. Few initial omap4 es2 samples
IDCODE is same as es1. So the patch uses ARM cpuid register to
detect the ES version for such samples

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
2010-09-24 11:30:17 +05:30
Nishanth Menon 77c0870ca5 omap3: id: fix 3630 rev detection
Wrong placement of break causes all revisions of 3630 to be
detected as 3630 es1.2, we need to break main loop if we have
an identified chip, default falls through as in the rest of the
switches in this function.

Cc: Paul Walmsley <paul@pwsan.com>
Cc: Sanjeev Premi <premi@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Manjunath K <manjugk@ti.com>
Cc: Anand Gadiyar <gadiyar@ti.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-08-16 09:21:19 +03:00
Anand Gadiyar b0a1a6ce05 OMAP3630: Add ES1.1 and ES1.2 detection
Add revision detection for ES1.1 and ES1.2. Set default
revision as ES1.2.

Add CHIP_GE_OMAP3630ES1_1 to detect revisions 1.1 and later.
This is needed for at least one feature that is broken in
3630ES1.0 but exists on older (3430 ES3.1) and newer revisions.

Additionally, update some of the CHIP_GE_* macros to use other
macros for ease of maintenance.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Manjunatha GK <manjugk@ti.com>
[tony@atomide.com: update to remove fallthrough handling]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-08-04 14:43:51 +03:00
Kan-Ru Chen c46732bbf3 omap: Use omap_get_die_id() to get the DIE ids
Signed-off-by: Kan-Ru Chen <kanru@0xlab.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-08-02 14:21:41 +03:00
Kan-Ru Chen 2e130fc3d4 omap: Add new interface omap_get_die_id
Allow DIE id to be get and used by others.

Signed-off-by: Kan-Ru Chen <kanru@0xlab.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-08-02 14:21:41 +03:00
stanley.miao ad0c63f1d6 OMAP3: AM3505/3517 do not have IO wakeup capability
AM3505/3517 doesn't have IO wakeup capability, so we do not need to set
the bit OMAP3430_EN_IO and the bit OMAP3430_EN_IO_CHAIN in the register
PM_WKEN_WKUP when the system enters suspend state.

Tested on AM3517EVM and OMAP3530EVM.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-08-02 14:21:40 +03:00
Nishanth Menon 5ebc0d526a omap2/3: id: fix sparse warning
omap24xx_check_revision, omap3_check_features,
omap3_check_revision, omap4_check_revision, omap3_cpuinfo
are not used elsewhere, it should be static

Also fixes the following sparse warnings:
arch/arm/mach-omap2/id.c:105:13: warning: symbol 'omap24xx_check_revision'
was not declared. Should it be static?
arch/arm/mach-omap2/id.c:167:13: warning: symbol 'omap3_check_features'
was not declared. Should it be static?
arch/arm/mach-omap2/id.c:189:13: warning: symbol 'omap3_check_revision'
was not declared. Should it be static?
arch/arm/mach-omap2/id.c:270:13: warning: symbol 'omap4_check_revision'
was not declared. Should it be static?
arch/arm/mach-omap2/id.c:300:13: warning: symbol 'omap3_cpuinfo'
was not declared. Should it be static?

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-08-02 14:21:40 +03:00
Tony Lindgren b610ec5023 Merge branch 'for_2.6.34_b' of git://git.pwsan.com/linux-2.6 into omap-for-linus 2010-02-24 20:53:03 -08:00
Vishwanath BS 7356f0b26b OMAP3 clock: add support for 192Mhz DPLL4M2 output
In 3630, DPLL4M2 output can be 96MHz or 192MHz (for SGX to run at
192). This patch has changes to support this feature. 96MHz clock is
generated by dividing 192Mhz clock by 2 using CM_CLKSEL_CORE register.
SGX can select Core Clock, 192MHz clock or CM_96M_FCLK as it's
functional clock. In summary changes done are:
1. Added a feature called omap3_has_192mhz_clk and enabled for 3630
2. Added a new clock node called omap_192m_alwon_ck
3. Made omap_96m_alwon_fck to derive its clock from omap_192m_alwon_ck

Signed-off-by: Vishwanath BS <Vishwanath.bs@ti.com>
[paul@pwsan.com: fixed whitespace]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-02-24 12:15:03 -07:00