Commit graph

334395 commits

Author SHA1 Message Date
Tony Lindgren 622297fdec ARM: OMAP: Make plat/sram.h local to plat-omap
We can move this from plat to be local to plat-omap
for common ARM zImage support.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 12:04:34 -07:00
Tony Lindgren a8f7445c7b ARM: OMAP: Move plat/led.h to include/linux/platform_data
We need to move this away from plat for ARM common
zImage support.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 12:03:18 -07:00
Tony Lindgren e6a6e5ad17 ARM: OMAP: Make plat/common.h local to mach-omap1 and mach-omap2
We cannot keep this in plat/common.h for common zImage support.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 11:58:54 -07:00
Tony Lindgren 3a8761c027 ARM: OMAP: Split plat-omap/i2c.c into mach-omap1 and mach-omap2
There's no need to keep the device related things in the
common i2c.c as omap2+ is using hwmod. Split the code to
mach-omap1 and mach-omap2 parts and only leave common
code to plat-omap/i2c.c.

Note that as omap1 only has one i2c controller, we can
now remove the old device related macros.

Reviewed-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 11:36:50 -07:00
Tony Lindgren 8599e7c587 ARM: OMAP2+: Make board-zoom.h local
This can be local to mach-omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 11:36:46 -07:00
Tony Lindgren 54b693d467 ARM: OMAP1: Move plat/tc.h to mach/tc.h for omap1
We cannot keep this in plat as it causes problems
with the ARM single zImage support.

Cc: Felipe Balbi <balbi@ti.com>
Cc: linux-pcmcia@lists.infradead.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 11:36:40 -07:00
Tony Lindgren 4c98dc6b8e ARM: OMAP: Make plat/fpga.h local to arch/arm/plat-omap
There's no need to have this file in plat/fpga.h. We can
make it local to plat-omap replacing fpga_read/write
functions directly with readb/writeb as that's how
they are already defined in fpga.h.

Note that 2420 based H4 is also using the fpga, so let's
keep the led support around in plat-omap until we flip
over mach-omap2 to device tree.

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: Felipe Balbi <balbi@ti.com>
Cc: linux-usb@vger.kernel.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 11:36:37 -07:00
Tony Lindgren 6832c95599 Merge branch 'omap-for-v3.8/cleanup-headers-dss' into omap-for-v3.8/cleanup-headers
Conflicts:
	arch/arm/mach-omap2/board-omap3logic.c
	arch/arm/mach-omap2/gpmc.c
	drivers/media/platform/omap/omap_vout.c
	drivers/media/platform/omap/omap_vout_vrfb.c
2012-10-17 11:21:34 -07:00
Tony Lindgren 46cddc01aa Merge branch 'omap-for-v3.8/cleanup-headers-mmc' into omap-for-v3.8/cleanup-headers
Conflicts:
	arch/arm/mach-omap1/devices.c
	arch/arm/mach-omap2/omap_hwmod_33xx_data.c
	arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
	drivers/mmc/host/omap.c
2012-10-17 11:13:42 -07:00
Tony Lindgren 99f0b8d6b0 Merge branch 'omap-for-v3.8/cleanup-headers-gpmc' into omap-for-v3.8/cleanup-headers
Conflicts:
	arch/arm/mach-omap2/board-3430sdp.c
	arch/arm/mach-omap2/board-h4.c
	arch/arm/mach-omap2/board-rx51-peripherals.c
	arch/arm/mach-omap2/board-rx51.c
	arch/arm/mach-omap2/pm34xx.c
	drivers/mtd/nand/omap2.c
	drivers/mtd/onenand/omap2.c
2012-10-17 11:07:18 -07:00
Paul Walmsley 3e6ece13d9 ARM: OMAP: move plat-omap/include/plat/sdrc.h into mach-omap2/sdrc.h
Remove arch/arm/plat-omap/include/plat/sdrc.h by folding its contents
into arch/arm/mach-omap2/sdrc.h.  The objective is to assist Tony in
cleaning out arch/arm/plat-omap/, as his upstreams request.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
[tony@atomide.com: updated to remove rotate macros]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-17 10:18:37 -07:00
Tony Lindgren 94c657853b Merge branch 'omap-for-v3.8/cleanup-headers-dma' into omap-for-v3.8/cleanup-headers
Conflicts:
	drivers/crypto/omap-aes.c
	drivers/crypto/omap-sham.c
	drivers/dma/omap-dma.c
2012-10-17 10:01:30 -07:00
Tony Lindgren 1d81aea146 Merge remote-tracking branch 'tomi/3.8/vrfb-conversion' into omap-for-v3.8/cleanup-headers-dss 2012-10-17 09:51:57 -07:00
Tomi Valkeinen a89d1a87ad OMAPFB: use omap_vrfb_supported()
Replace cpu_is_*() check with omap_vrfb_supported().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-17 12:18:14 +03:00
Tomi Valkeinen aa1e49a375 OMAPDSS: VRFB: add omap_vrfb_supported()
Add an exported function omap_vrfb_supported() which returns true if the
vrfb driver has been loaded succesfully. This can be used to decide if
VRFB can be used or not.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-17 12:17:18 +03:00
Tomi Valkeinen 8c05a41224 OMAP: SDRC: remove VRFB code
Now that VRFB driver handles its registers independently, we can remove
the VRFB related code from OMAP's sdrc.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
2012-10-17 12:11:12 +03:00
Tomi Valkeinen 6a1c9f6d19 OMAP: move arch/arm/plat-omap/include/plat/vrfb.h
Now that vrfb driver is not omap dependent anymore, we can move vrfb.h
from arch/arm/plat-omap/include/plat to include/video/omapvrfb.h.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Vaibhav Hiremath <hvaibhav@ti.com>
2012-10-17 12:11:12 +03:00
Tomi Valkeinen 406c8563a7 OMAP: VRFB: convert vrfb to platform device
This patch converts vrfb library into a platform device, in an effort to
remove omap dependencies.

The platform device is registered in arch/arm/plat-omap/fb.c and
assigned resources depending on whether running on omap2 or omap3.

The vrfb driver will parse those resources and use them to access vrfb
configuration registers and the vrfb virtual rotation areas.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
2012-10-17 12:09:35 +03:00
Tomi Valkeinen 35f70935c6 OMAPDSS: remove <plat/cpu.h> includes
cpu_is_* calls are no longer used in omapdss, so the includes for
<plat/cpu.h> can be removed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-17 11:57:07 +03:00
Tony Lindgren 94709014ea Merge tag 'gpmc-czimage' of git://gitorious.org/x0148406-public/linux-kernel into omap-for-v3.8/cleanup-headers-gpmc
gpmc cleanup for common ARM zImage
2012-10-16 14:54:19 -07:00
Tomi Valkeinen 6fa44907ee OMAPDSS: HDMI: use omapdss_version
Use omapdss_version in hdmi.c to select the proper hdmi features.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-16 13:44:00 +03:00
Tomi Valkeinen bd81ed0818 OMAPDSS: DSS: use omapdss_version
Use omapdss_version in dss.c to select the proper dss features.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-16 13:43:59 +03:00
Tomi Valkeinen 84b4762302 OMAPDSS: DISPC: use omapdss_version
Use omapdss_version in dispc.c to select the proper dispc features.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-16 13:43:58 +03:00
Tomi Valkeinen 649514c65c OMAPDSS: use omapdss_version in dss_features.c
Pass the omapdss_version to dss_features.c and use it to select the
proper dss features.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-16 13:43:57 +03:00
Tomi Valkeinen acd18af93a OMAPDSS: add omapdss_version
Add new enum, omapdss_version, that is used to tell which DSS hardware
version the SoC has. This enum is initialized during platform init, and
passed in the platform data to omapdss driver.

Note that the versions are not "continuous", that is, you cannot check
if the version is less or greater than something, but you need to check
for exact version match. In other words, this is invalid:

/* test if DSS is 3630 or earlier */
if (ver <= OMAPDSS_VER_OMAP3630)
	...

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2012-10-16 13:43:56 +03:00
Tony Lindgren 27615a97b2 ARM: OMAP: Trivial driver changes to remove include plat/cpu.h
Drivers should not use cpu_is_omap or cpu_class_is_omap macros,
they should be private to the platform init code. And we'll be
removing plat/cpu.h and only have a private soc.h for the
arch/arm/*omap* code.

This patch is intended as preparation for the core omap changes
and removes the need to include plat/cpu.h from several drivers.
This is needed for the ARM common zImage support.

These changes are OK to do because:

- omap-rng.c does not need plat/cpu.h

- omap-aes.c and omap-sham.c get the proper platform_data
  passed to them so they don't need extra checks in the driver

- omap-dma.c and omap-pcm.c can test the arch locally as
  omap1 and omap2 cannot be compiled together because of
  conflicting compiler flags

Cc: Deepak Saxena <dsaxena@plexity.net>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David S. Miller <davem@davemloft.net>
Cc: Venkatraman S <svenkatr@ti.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Dan Williams <djbw@fb.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-crypto@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
Cc: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org
[tony@atomide.com: mmc changes folded in to an earlier patch]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-15 16:24:23 -07:00
Paul Walmsley a656a06bbf staging: tidspbridge: remove unnecessary include of <plat/clock.h>
The DSPBridge driver includes arch/arm/plat-omap/include/plat/clock.h.
All of the <plat/ ...> includes are causing problems with the ARM
single image kernel effort.  Remove this one.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-15 16:24:12 -07:00
Lokesh Vutla 2b6c4e7324 ARM: OMAP: DMA: Move plat/dma.h to plat-omap/dma-omap.h
Move plat/dma.h to plat-omap/dma-omap.h as part of single
zImage work

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-15 14:04:53 -07:00
Lokesh Vutla d5e7c864f3 ARM: OMAP2+: DMA: Moving OMAP2+ DMA channel definitions to mach-omap2
Similar to omap1, some of the omap2+ dma channel definitions are
used by some drivers. For moving omap2+ dma channel definitions
to mach-omap2/, the used ones should be defined locally to driver.
Drivers can eliminate it using DT, platform data, or IORESOURCE_DMA
And moving omap2+ DMA channel definitions to mach-omap2

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-15 14:03:51 -07:00
Lokesh Vutla 8c4cc00552 ARM: OMAP1: DMA: Moving OMAP1 DMA channel definitions to mach-omap1
Some of the omap1 dma channel definitions are used by some drivers.
For moving omap1 dma channel definitions to mach-omap1/, the used
ones should be defined locally to driver. Driver can eliminate it
by using DT, platform data, or IORESOURCE_DMA.
And moving OMAP1 DMA channel definitions to mach-omap1

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-15 14:01:01 -07:00
Lokesh Vutla cc8c29d9ff ARM: OMAP: DMA: Removing plat/dma-44xx.h
None of the DMA channel definitions defined in
plat/dma-44xx.h are used. So removing it.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-15 14:00:53 -07:00
Tony Lindgren 53db20d123 mmc: omap: Remove cpu_is_omap usage from the driver
This is needed for the ARM common zImage support.

We can use the existing slot features to pass omap1
specific options to the driver. For omap2 we don't
want to pass anything new as that will be eventually
moved to use device tree based init.

Note that this patch depends on earlier patch that
moves plat/mmc.h into include/linux/platform_data.

Cc: linux-mmc@vger.kernel.org
Cc: Venkatraman S <svenkatr@ti.com>
Acked-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-15 12:10:33 -07:00
Tony Lindgren 68f39e74fb ARM: OMAP: Split plat/mmc.h into local headers and platform_data
We need to remove this from plat for ARM common zImage
support.

Also remove includes not needed by the omap_hsmmc.c driver.

Cc: linux-mmc@vger.kernel.org
Acked-by: Chris Ball <cjb@laptop.org>
Acked-by: Venkatraman S <svenkatr@ti.com>
[tony@atomide.com: fold in removal of unused driver includes]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-15 12:09:43 -07:00
Afzal Mohammed 3ef5d0071c ARM: OMAP2+: gpmc: localize gpmc header
Requirement of gpmc header outside of mach-omap2 has been
cutoff, move gpmc header file in plat-omap folder to local
mach-omap2 folder

Objective - common zImage participation of omap

Signed-off-by: Afzal Mohammed <afzal@ti.com>
2012-10-15 14:42:15 +05:30
Afzal Mohammed c46406a3f2 ARM: OMAP2+: gpmc: remove exported nand functions
nand driver handles gpmc-nand block fully, hence no more
users for these exported nand functions, remove it.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
2012-10-15 14:42:13 +05:30
Afzal Mohammed 2ef9f3ddec mtd: nand: omap: handle gpmc bch[48]
gpmc-nand bch registers are now available in driver,
make use of it to handle bch[48] instead of relying
on gpmc exported functions.

And so nand driver no longer needs gpmc header, remove it.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
2012-10-15 14:42:12 +05:30
Afzal Mohammed 2fdf0c9896 ARM: OMAP2+: gpmc: nand register helper bch update
Update helper function that provides gpmc-nand register
details for nand driver with bch register information.
Using this nand driver can be made self sufficient to
handle remaining gpmc-nand operations by itself instead
of relying on gpmc exported nand functions.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
2012-10-15 14:42:10 +05:30
Afzal Mohammed 3852ccd66a ARM: OMAP2+: nand: bch capability check
Capability of bch schemes could be discovered using soc
revision checks. If soc revision indicates that selected
ecc scheme is not supported bail out.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
2012-10-15 14:42:08 +05:30
Afzal Mohammed 47f88af4ed mtd: nand: omap: bring in gpmc nand macros
Bring onto driver the macros defined in gpmc.h that are
not necessary outside driver, helps in removing inclusion
of gpmc.h too. Also remove GPMC prefix on those macros to
make clear it's independence with gpmc header.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
2012-10-15 14:42:07 +05:30
Afzal Mohammed bc3668ea04 ARM: OMAP2+: nand: header cleanup
For common arm zImage existing nand header file
in platform specific location was moved to generic
platform data location, but it contained more than
platform data, remove it. New local header has been
created for exposing functions.

Also move gpmc-nand platform data to platform header
meant for nand from gpmc header file

Signed-off-by: Afzal Mohammed <afzal@ti.com>
2012-10-15 14:42:05 +05:30
Afzal Mohammed b6ab13e7d6 ARM: OMAP2+: onenand: header cleanup
For common arm zImage existing onenand header file
in platform specific location was moved to generic
platform data location, but it contained more than
platform data, remove it. New local header has been
created for exposing functions.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
2012-10-15 14:42:03 +05:30
Afzal Mohammed b7754452b3 mtd: onenand: omap: use pdata info instead of cpu_is
platform data now contains a field to indicate whether
soc belongs to omap34xx family, use it instead of
cpu_is_* check.

This helps in removing dependency of platform specific
header file - cpu.h

Signed-off-by: Afzal Mohammed <afzal@ti.com>
2012-10-15 14:42:01 +05:30
Afzal Mohammed eb77b6a78a ARM: OMAP2+: onenand: connected soc info in pdata
onenand driver needs to know whether soc is falling under
34xx family to properly handle onenand. But driver is not
supposed to do cpu_is_* check, hence educate platform data
with this information. Driver can make use of it to avoid
cpu_is_* check.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
2012-10-15 14:41:59 +05:30
Afzal Mohammed 4ea1e4ba7b mtd: nand: omap: read nand using register address
Now that gpmc-nand registers are available in driver, use it
to read nand data.

"65b97cf  mtd: nand: omap2: handle nand on gpmc" modified all
other instances. After initial versions of that patch, a new
change added reading nand data using gpmc exposed function.
In the final version this change was not taken care.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
2012-10-15 14:41:58 +05:30
Afzal Mohammed 48b51d4dda mtd: nand: omap: free region as per resource size
memory as is now obtained via resource, upon freeing use
resource size. This also helps get rid of one macro.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
2012-10-15 14:41:56 +05:30
Afzal Mohammed 89d1efc1fd mtd: onenand: omap: cleanup gpmc dependency
requesting, freeing gpmc cs is now handled fully
by gpmc, remove left out gpmc dependency as well
as unnecessary include of gpmc.h

Signed-off-by: Afzal Mohammed <afzal@ti.com>
2012-10-15 14:41:55 +05:30
Afzal Mohammed 1b47ca1a12 ARM: OMAP2+: gpmc: remove cs# in sync clk div calc
Divider value for a certain sync clk is determined solely
based on gpmc fclk. CS# does not have any role here, thus
remove presence of CS# in clock divider calculation API.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Reviewed-by: Jon Hunter <jon-hunter@ti.com>
2012-10-15 14:41:45 +05:30
Jon Hunter 757ef79188 ARM: OMAP2+: GPMC: Remove unused OneNAND get_freq() platform function
A platform function pointer for getting the frequency of a OneNAND device
was added so that a platform could specify a custom function for returning
the frequency and not just rely on the OneNAND version to determine the
frequency. However, this platform function pointer is not currently being
used and I am not sure if it ever has.

OneNAND devices are not so common these days and as far as I know not being
used with new devices. Therefore, it is most likely that this get_freq()
function pointer will not be used and so remove it.

Given that the get_freq() function pointer is not used, neither is the
clk_dep variable and so all references to it can also be removed.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Afzal Mohammed <afzal@ti.com>
2012-10-15 14:40:35 +05:30
Afzal Mohammed 46376884ce ARM: OMAP2+: onenand: refactor for clarity
Refactor set_async_mode & set_sync_mode functions to
separate out timing calculation & actual configuration
(GPMC & OneNAND side).

Thanks to Jon for his suggestions.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Reviewed-by: Jon Hunter <jon-hunter@ti.com>
2012-10-15 14:40:26 +05:30
Afzal Mohammed 2e618261c9 ARM: OMAP2+: nand: unify init functions
Helper function for updating nand platform data has been
added the capability to take timing structure arguement.
Usage of omap_nand_flash_init() has been replaced by modifed
one, omap_nand_flash_init was doing things similar to
board_nand_init except that NAND CS# were being acquired
based on bootloader setting. As CS# is hardwired for a given
board, acquiring gpmc CS# has been removed, and updated with
the value on board.

NAND CS# used in beagle board & omap3evm was found to be CS0.
Thomas Weber <thomas.weber.linux@googlemail.com> reported
that value of devkit8000 to be CS0. Overo board was found
to be using CS0 based on u-boot, while google grep says
omap3touchbook too has CS0.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Reviewed-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
2012-10-15 12:00:44 +05:30