pandora-kernel.git
15 years agoOMAP2/3: PRCM: fix misc. compiler warnings
Kevin Hilman [Thu, 28 Jan 2010 17:17:16 +0000 (09:17 -0800)]
OMAP2/3: PRCM: fix misc. compiler warnings

- missing return in omap_prcm_get_reset_sources()
- potential use of uninitialized variable in omap_prcm_arch_reset()

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2: clock: fix misc. OMAP24xx compile issues
Kevin Hilman [Thu, 28 Jan 2010 17:17:15 +0000 (09:17 -0800)]
OMAP2: clock: fix misc. OMAP24xx compile issues

- Convert use of non-existant cpu_is_omap2xxx() to cpu_is_omap24xx()
- Change prefix of OMAP2 CPUfreq init/exit functions from
  omap2xxx_ to omap2_ as used in clock.c
- fix 'possible use of uninitialized variable' warning in
  omap2xxx_clk_init()

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2/3: GPMC: ensure valid clock pointer
Kevin Hilman [Thu, 28 Jan 2010 17:17:14 +0000 (09:17 -0800)]
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>
15 years agoOMAP2/3: IRQ: ensure valid base address
Kevin Hilman [Thu, 28 Jan 2010 17:17:13 +0000 (09:17 -0800)]
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>
15 years agoLinux-omap rebuilt: clock changes and multi-omap added to for-next
Tony Lindgren [Wed, 27 Jan 2010 19:43:44 +0000 (11:43 -0800)]
Linux-omap rebuilt: clock changes and multi-omap added to for-next

$ git checkout -b tmp-rebuild-1264621416 linus
$ git merge -m "Merge omap-fixes" omap-fixes
$ git merge -m "Merge omap-testing" omap-testing
$ git merge -m "Merge for-next" for-next
$ git merge -m "Merge cbus" cbus
$ git merge -s ours master
$ git checkout master
$ git merge tmp-rebuild-1264621416

To view the changes since the last rebuild, please do
$ git diff 14e4577ff7680165bae8e3b06b455915707afea9..6a3faaa77771ea3b7dc4423ba383aee17b41325f arch/arm/*omap*/

15 years agoMerge cbus
Tony Lindgren [Wed, 27 Jan 2010 19:43:40 +0000 (11:43 -0800)]
Merge cbus

15 years agoMerge for-next
Tony Lindgren [Wed, 27 Jan 2010 19:43:39 +0000 (11:43 -0800)]
Merge for-next

15 years agoMerge omap-testing
Tony Lindgren [Wed, 27 Jan 2010 19:43:38 +0000 (11:43 -0800)]
Merge omap-testing

15 years agocbus: Fix init on boards with no cbus
Tony Lindgren [Wed, 27 Jan 2010 19:43:14 +0000 (11:43 -0800)]
cbus: Fix init on boards with no cbus

This really should get fixed by converting cbus to
use drivers/mfd.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: Fix compile if not selected
Tony Lindgren [Wed, 27 Jan 2010 19:07:28 +0000 (11:07 -0800)]
cbus: Fix compile if not selected

Fix compile if not selected

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap: zoom3: enable ehci support
vikram pandita [Wed, 27 Jan 2010 18:31:17 +0000 (10:31 -0800)]
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: Gadiyar, Anand <gadiyar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap: serial: fix coding style indentaion
vikram pandita [Wed, 27 Jan 2010 18:31:17 +0000 (10:31 -0800)]
omap: 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: Menon, Nishanth <nm@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap3: pm: Add T2 Keypad as a wakeup source
Lesly A M [Wed, 27 Jan 2010 18:31:16 +0000 (10:31 -0800)]
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>
15 years agoARCH OMAP : enable ARCH_HAS_HOLES_MEMORYMODEL for OMAP
Sriram [Wed, 27 Jan 2010 18:47:01 +0000 (10:47 -0800)]
ARCH OMAP : enable ARCH_HAS_HOLES_MEMORYMODEL for OMAP

OMAP platforms(like OMAP3530) include DSP or other co-processors
for media acceleration. when carving out memory for the
accelerators we can end up creating a hole in the memory map
of sort:
<kernel memory><hole(memory for accelerator)><kernel memory>

To handle such a memory configuration ARCH_HAS_HOLES_MEMORYMODEL
has to be enabled. For further information refer discussion at:
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg15262.html.

Signed-off-by: Sriramakrishnan <srk@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap: Clean-up for omap_mux_init
Tony Lindgren [Wed, 27 Jan 2010 18:31:16 +0000 (10:31 -0800)]
omap: 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>
15 years agoMTD: remove no longer used OMAP flash map
Ladislav Michl [Wed, 27 Jan 2010 18:31:15 +0000 (10:31 -0800)]
MTD: remove no longer used OMAP flash map

All OMAP boards are now using physmap-flash.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap: convert boards to use physmap-flash
Ladislav Michl [Wed, 27 Jan 2010 18:31:15 +0000 (10:31 -0800)]
omap: convert boards to use physmap-flash

Convert OMAP based boards to use physmap-flash. Refreshed against today's
Linux omap kernel tree

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap2/3: Update omap3_defconfig to build in all the 2420 based boards
Tony Lindgren [Mon, 25 Jan 2010 23:19:36 +0000 (15:19 -0800)]
omap2/3: Update omap3_defconfig to build in all the 2420 based boards

Note that booting 2420 depends on another patch posted earlier to not
select CONFIG_CPU_32v6K if CONFIG_ARCH_OMAP2 is selected.

Also note that we cannot add omap2430 in yet because of the different
clock addresses compared to 2420. Also note that we cannot have
CONFIG_CPU_32v6K=y in order to boot on 24xx.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap2/3: Fix initcalls for multi-omap
Tony Lindgren [Mon, 25 Jan 2010 21:01:49 +0000 (13:01 -0800)]
omap2/3: Fix initcalls for multi-omap

Otherwise the wrong initcalls can run.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap2/3/4: Replace orred CONFIG_ARCH_OMAP2/3/4 with CONFIG_ARCH_OMAP2PLUS
Tony Lindgren [Mon, 25 Jan 2010 19:44:53 +0000 (11:44 -0800)]
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>
15 years agoomap3: Replace ARCH_OMAP34XX with ARCH_OMAP3
Tony Lindgren [Mon, 25 Jan 2010 18:38:37 +0000 (10:38 -0800)]
omap3: Replace ARCH_OMAP34XX with ARCH_OMAP3

Replace ARCH_OMAP34XX with ARCH_OMAP3

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap2: Convert ARCH_OMAP24XX to ARCH_OMAP2
Tony Lindgren [Wed, 27 Jan 2010 03:17:05 +0000 (19:17 -0800)]
omap2: Convert ARCH_OMAP24XX to ARCH_OMAP2

Convert ARCH_OMAP24XX to ARCH_OMAP2

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap2/3/4: Fix mbox init for multi-omap
Tony Lindgren [Wed, 27 Jan 2010 03:17:05 +0000 (19:17 -0800)]
omap2/3/4: Fix mbox init for multi-omap

Fix mbox init for multi-omap

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap2/3/4: Fix omap2_map_common_io for multi-omap
Tony Lindgren [Wed, 27 Jan 2010 03:17:04 +0000 (19:17 -0800)]
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>
15 years agoomap: Fix dmtimer.c for multi-omap boot
Tony Lindgren [Wed, 27 Jan 2010 03:17:04 +0000 (19:17 -0800)]
omap: Fix dmtimer.c for multi-omap boot

Fix dmtimer.c for multi-omap boot. Also remove legacy
clk_enable/disable wrappers that are no longer needed.

Note that the clock handling should be further improved
to make use of the clock aliases.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap2/3: Multiboot compile fixes to compile in omap2 and omap3
Tony Lindgren [Wed, 27 Jan 2010 03:17:04 +0000 (19:17 -0800)]
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>
15 years agoomap2/3: Make get_irqnr_and_base common for mach-omap2 multiboot
Tony Lindgren [Wed, 27 Jan 2010 03:17:04 +0000 (19:17 -0800)]
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>
15 years agoomap: Remove old DEBUG_LL serial port options
Tony Lindgren [Wed, 27 Jan 2010 03:17:03 +0000 (19:17 -0800)]
omap: Remove old DEBUG_LL serial port options

These are no longer needed. Note that zoom boards
should now set their own function in uncompress.h
and debug-macro.S for the external UART.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap: Make uncompress code and DEBUG_LL code generic
Tony Lindgren [Wed, 27 Jan 2010 03:17:03 +0000 (19:17 -0800)]
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.

Note that to avoid merge conflicts, this patch is using
hardcoded register r1 until tmp register is being passed
for all addruart macros.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap: Clean the serial port defines
Tony Lindgren [Wed, 27 Jan 2010 03:17:03 +0000 (19:17 -0800)]
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>
15 years agoMerge branch 'for_2.6.34_4f4e65_a' of git://git.pwsan.com/linux-2.6 into omap-for...
Tony Lindgren [Wed, 27 Jan 2010 03:16:40 +0000 (19:16 -0800)]
Merge branch 'for_2.6.34_4f4e65_a' of git://git.pwsan.com/linux-2.6 into omap-for-linus

15 years agoOMAP2+ powerdomains/clockdomains: prepare for multi-OMAP configs
Paul Walmsley [Wed, 27 Jan 2010 03:13:13 +0000 (20:13 -0700)]
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>
15 years agoOMAP4: PRCM: Define shift macros as n instead of 1 << n
Rajendra Nayak [Wed, 27 Jan 2010 03:13:12 +0000 (20:13 -0700)]
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>
15 years agoOMAP2/3/4 clock: rename and clean the omap2_clk_init() functions
Paul Walmsley [Wed, 27 Jan 2010 03:13:12 +0000 (20:13 -0700)]
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>
15 years agoOMAP clock: resolve all remaining sparse warnings
Paul Walmsley [Wed, 27 Jan 2010 03:13:11 +0000 (20:13 -0700)]
OMAP clock: resolve all remaining sparse warnings

Resolve all remaining sparse warnings in the OMAP clock code.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
15 years agoOMAP3 DPLL: reorganize static functions
Paul Walmsley [Wed, 27 Jan 2010 03:13:11 +0000 (20:13 -0700)]
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>
15 years agoOMAP2/3/4 clock: omap2_clk_prepare_for_reboot() is OMAP2xxx-only
Paul Walmsley [Wed, 27 Jan 2010 03:13:11 +0000 (20:13 -0700)]
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>
15 years agoOMAP2/3 clock: remove unnecessary includes and clean up header
Paul Walmsley [Wed, 27 Jan 2010 03:13:10 +0000 (20:13 -0700)]
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>
15 years agoOMAP2/3 clock: clean up omap*_clk_arch_init()
Paul Walmsley [Wed, 27 Jan 2010 03:13:09 +0000 (20:13 -0700)]
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>
15 years agoOMAP3 clock: split out DPLL3 M2 divider functions into mach-omap2/clkt3xxx_dpll3m2.c
Paul Walmsley [Wed, 27 Jan 2010 03:13:09 +0000 (20:13 -0700)]
OMAP3 clock: split out DPLL3 M2 divider functions into mach-omap2/clkt3xxx_dpll3m2.c

Split the DPLL3 M2 divider clock functions out of clock34xx.c and move
them into mach-omap2/clkt3xxx_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>
15 years agoOMAP2 clock: don't compile OMAP2430-only functions on non-2430 builds
Paul Walmsley [Wed, 27 Jan 2010 03:13:09 +0000 (20:13 -0700)]
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>
15 years agoOMAP2xxx clock: move sys_clk code into mach-omap2/clkt2xxx_sys.c
Paul Walmsley [Wed, 27 Jan 2010 03:13:08 +0000 (20:13 -0700)]
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>
15 years agoOMAP2xxx clock: move osc_clk code into mach-omap2/clkt2xxx_osc.c
Paul Walmsley [Wed, 27 Jan 2010 03:13:07 +0000 (20:13 -0700)]
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>
15 years agoOMAP2xxx clock: move the APLL clock code into mach-omap2/clkt2xxx_apll.c
Paul Walmsley [Wed, 27 Jan 2010 03:13:06 +0000 (20:13 -0700)]
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>
15 years agoOMAP2xxx clock: move the DVFS virtual clock code into mach-omap2/clkt2xxx_virt_prcm_set.c
Paul Walmsley [Wed, 27 Jan 2010 03:13:06 +0000 (20:13 -0700)]
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.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Cc: Alexander Shishkin <virtuoso@slind.org>
15 years agoOMAP2xxx clock: move the DPLL+CORE composite clock code into mach-omap2/clkt2xxx_dpll...
Paul Walmsley [Wed, 27 Jan 2010 03:13:06 +0000 (20:13 -0700)]
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>
15 years agoOMAP2/3/4 clock: combine all omap2_clk_functions
Paul Walmsley [Wed, 27 Jan 2010 03:13:04 +0000 (20:13 -0700)]
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>
15 years agoOMAP2 clock: move all static functions to the top of the file
Paul Walmsley [Wed, 27 Jan 2010 03:13:04 +0000 (20:13 -0700)]
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>
15 years agoOMAP2/3/4 clock: move clksel clock functions into mach-omap2/clkt_clksel.c
Paul Walmsley [Wed, 27 Jan 2010 03:13:04 +0000 (20:13 -0700)]
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>
15 years agoOMAP2/3/4 clock: move DPLL clock functions into mach-omap2/clkt_dpll.c
Paul Walmsley [Wed, 27 Jan 2010 03:13:03 +0000 (20:13 -0700)]
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>
15 years agoOMAP3 clock: move OMAP3-specific DPLL functions to dpll3xxx.c
Paul Walmsley [Wed, 27 Jan 2010 03:13:03 +0000 (20:13 -0700)]
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>
15 years agoOMAP: hwmod: add API for slave idlemode setting
Kevin Hilman [Wed, 27 Jan 2010 03:13:03 +0000 (20:13 -0700)]
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>
15 years agoOMAP: omap_device: optionally auto-adjust device activate/deactivate latencies
Kevin Hilman [Wed, 27 Jan 2010 03:13:02 +0000 (20:13 -0700)]
OMAP: omap_device: optionally auto-adjust device activate/deactivate latencies

First, this patch adds new worst-case latency values to the
omap_device_pm_latency struct.  Here the worst-case measured latencies
for the activate and deactivate hooks are stored.

In addition, add an option to auto-adjust the latency values used for
device activate/deactivate.

By setting a new 'OMAP_DEVICE_LATENCY_AUTO_ADJUST' flag in the
omap_device_pm_latency struct, the omap_device layer automatically
adjusts the activate/deactivate latencies to the worst-case measured
values.

Anytime a new worst-case value is found, it is printed to the console.
Here is an example log during boot using UART2 s an example.  After
boot, the OPP is manually changed to the 125MHz OPP:

[...]
Freeing init memory: 128K
omap_device: serial8250.2: new worst case deactivate latency 0: 30517
omap_device: serial8250.2: new worst case activate latency 0: 30517
omap_device: serial8250.2: new worst case activate latency 0: 218139648
omap_device: serial8250.2: new worst case deactivate latency 0: 61035
omap_device: serial8250.2: new worst case activate latency 0: 278076171
omap_device: serial8250.2: new worst case activate latency 0: 298614501
omap_device: serial8250.2: new worst case activate latency 0: 327331542

/ # echo 125000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

omap_device: serial8250.2: new worst case deactivate latency 0: 91552

Motivation: this can be used as a technique to automatically determine
the worst case latency values.  The current method of printing a
warning on every violation is too noisy to actually interact the
console in order to set low OPP to discover latencies.

Another motivation for this patch is that the activate/deactivate
latenices can vary depending on the idlemode of the device.  While
working on the UARTs, I noticed that when using no-idle, the activate
latencies were as high as several hundred msecs as shown above.  When
the UARTs are in smart-idle, the max latency is well under 100 usecs.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
15 years agoOMAP clockdomain/powerdomain: improve documentation
Paul Walmsley [Wed, 27 Jan 2010 03:13:02 +0000 (20:13 -0700)]
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>
15 years agoOMAP powerdomain: remove pwrdm_clk_state_switch
Paul Walmsley [Wed, 27 Jan 2010 03:13:02 +0000 (20:13 -0700)]
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>
15 years agoOMAP powerdomain: rearrange struct powerdomain to save some memory
Paul Walmsley [Wed, 27 Jan 2010 03:13:01 +0000 (20:13 -0700)]
OMAP powerdomain: rearrange struct powerdomain to save some memory

This patch rearranges the order of structure members in struct powerdomain
to avoid wasting memory due to alignment restrictions.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
15 years agoOMAP powerdomain/PM: use symbolic constants for the max number of power states
Paul Walmsley [Wed, 27 Jan 2010 03:13:01 +0000 (20:13 -0700)]
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>
15 years agoOMAP clockdomains: add usecounting for wakeup and sleep dependencies
Paul Walmsley [Wed, 27 Jan 2010 03:13:01 +0000 (20:13 -0700)]
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>
15 years agoOMAP clockdomain/powerdomain: remove runtime register/unregister
Paul Walmsley [Wed, 27 Jan 2010 03:13:00 +0000 (20:13 -0700)]
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>
15 years agoOMAP2 clockdomain: modem clockdomain is only present on OMAP2430
Paul Walmsley [Wed, 27 Jan 2010 03:12:59 +0000 (20:12 -0700)]
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>
15 years agoOMAP2/3 clockdomains: split shared structures so usecounting works
Paul Walmsley [Wed, 27 Jan 2010 03:12:59 +0000 (20:12 -0700)]
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>
15 years agoOMAP2/3 clkdm/pwrdm: move wkdep/sleepdep handling from pwrdm to clkdm
Paul Walmsley [Wed, 27 Jan 2010 03:12:59 +0000 (20:12 -0700)]
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>
15 years agoARM: OMAP4 clock domains : Add the missing Clock Domain Structure
Abhijit Pagare [Wed, 27 Jan 2010 03:12:58 +0000 (20:12 -0700)]
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>
15 years agoARM: OMAP4 clock framework: Remove the checks preventing OMAP4 clockdomain validation
Abhijit Pagare [Wed, 27 Jan 2010 03:12:58 +0000 (20:12 -0700)]
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>
15 years agoOMAP1 clock: convert armwdt_ck to use the fixed divisor recalc function
Paul Walmsley [Wed, 27 Jan 2010 03:12:57 +0000 (20:12 -0700)]
OMAP1 clock: convert armwdt_ck to use the fixed divisor recalc function

The armwdt_ck clock uses a fixed divisor, so it can use the OMAP clock
fixed divisor recalculation code, rather than a custom function.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
15 years agoOMAP clock: make the fixed divisor clock code available for all OMAPs
Paul Walmsley [Wed, 27 Jan 2010 03:12:57 +0000 (20:12 -0700)]
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>
15 years agoAM35xx: Clock table updates for AM3505/17
Ranjith Lohithakshan [Wed, 27 Jan 2010 03:12:57 +0000 (20:12 -0700)]
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>
15 years agoOMAP3 clock: reorganize CK_* platform flags
Paul Walmsley [Wed, 27 Jan 2010 03:12:56 +0000 (20:12 -0700)]
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>
15 years agoAM35xx: Add AM35xx specific control module registers
Ranjith Lohithakshan [Wed, 27 Jan 2010 03:12:56 +0000 (20:12 -0700)]
AM35xx: Add AM35xx specific control module registers

AM3517/05 has a few additional control module registers defined mainly
to control the new IP's. This patch adds support for those new registers.

Signed-off-by: Ranjith Lohithakshan <ranjithl@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
15 years agoARM: OMAP4: PM: Refine the APIs to support OMAP4 features.
Abhijit Pagare [Wed, 27 Jan 2010 03:12:54 +0000 (20:12 -0700)]
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>
15 years agoARM: OMAP4: PM: Adapt the existing OMAP2/3 Clock Domain Frameworks.
Abhijit Pagare [Wed, 27 Jan 2010 03:12:54 +0000 (20:12 -0700)]
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>
15 years agoARM: OMAP4: PM: Add the Autogenerated OMAP4 specific clock domain framework.
Abhijit Pagare [Wed, 27 Jan 2010 03:12:54 +0000 (20:12 -0700)]
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>
15 years agoARM: OMAP4: PM: Modify Clock-domain interfaces for OMAP4 compatibility.
Abhijit Pagare [Wed, 27 Jan 2010 03:12:53 +0000 (20:12 -0700)]
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>
15 years agoARM: OMAP4: PM: Make OMAP3 Clock-domain framework compatible for OMAP4.
Abhijit Pagare [Wed, 27 Jan 2010 03:12:53 +0000 (20:12 -0700)]
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>
15 years agoARM: OMAP4: PM: Refine the APIs to support OMAP4 features.
Abhijit Pagare [Wed, 27 Jan 2010 03:12:53 +0000 (20:12 -0700)]
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>
15 years agoARM: OMAP4: PM: Adapt the existing OMAP2/3 and common Power Domain Frameworks.
Abhijit Pagare [Wed, 27 Jan 2010 03:12:52 +0000 (20:12 -0700)]
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>
15 years agoARM: OMAP4: PM: Add the Autogenerated OMAP4 specific power domain framework.
Abhijit Pagare [Wed, 27 Jan 2010 03:12:52 +0000 (20:12 -0700)]
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>
15 years agoARM: OMAP4: PM: OMAP4 Power Domain Porting Related Clean-up.
Abhijit Pagare [Wed, 27 Jan 2010 03:12:51 +0000 (20:12 -0700)]
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>
15 years agoARM: OMAP4: PM: OMAP4 essential basic initialisations.
Abhijit Pagare [Wed, 27 Jan 2010 03:12:51 +0000 (20:12 -0700)]
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>
15 years agoARM: Select CPU_32v6K for CPU_V7 only if ARCH_OMAP2 is not selected
Tony Lindgren [Tue, 26 Jan 2010 18:57:07 +0000 (10:57 -0800)]
ARM: Select CPU_32v6K for CPU_V7 only if ARCH_OMAP2 is not selected

Otherwise the kernel built with both CPU_V6 and CPU_V7 will not
boot on omap2.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoLinux-omap rebuilt: omap-fixes merged to mainline
Tony Lindgren [Tue, 26 Jan 2010 03:48:35 +0000 (19:48 -0800)]
Linux-omap rebuilt: omap-fixes merged to mainline

$ git checkout -b tmp-rebuild-1264477604 linus
$ git merge -m "Merge omap-fixes" omap-fixes
$ git merge -m "Merge omap-testing" omap-testing
$ git merge -m "Merge for-next" for-next
$ git merge -m "Merge cbus" cbus
$ git merge -s ours master
$ git checkout master
$ git merge tmp-rebuild-1264477604

To view the changes since the last rebuild, please do
$ git diff c48807a26251343c3e8f24d1a42cb024e5584a86..0e0bb7f4c064aee30d0cdeff784f064cd9fdc6a0 arch/arm/*omap*/

15 years agoMerge cbus
Tony Lindgren [Tue, 26 Jan 2010 03:48:31 +0000 (19:48 -0800)]
Merge cbus

15 years agoMerge for-next
Tony Lindgren [Tue, 26 Jan 2010 03:48:30 +0000 (19:48 -0800)]
Merge for-next

15 years agoMerge omap-testing
Tony Lindgren [Tue, 26 Jan 2010 03:48:29 +0000 (19:48 -0800)]
Merge omap-testing

15 years agofix compile for tahvo-usb.c
Francisco Alecrim [Tue, 26 Jan 2010 03:46:31 +0000 (19:46 -0800)]
fix compile for tahvo-usb.c

drivers/cbus/tahvo-usb.c:138: undefined reference to 'usb_bus_start_enum'

usb_bus_start_enum only exported if USB_OTG enabled

Signed-off-by: Francisco Alecrim <francisco.alecrim@openbossa.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agon8x0_defconfig: active cbus, retu-wd and omap-wd
Francisco Alecrim [Tue, 26 Jan 2010 03:46:30 +0000 (19:46 -0800)]
n8x0_defconfig: active cbus, retu-wd and omap-wd

It's critical for correct n8x0 operation. Device turn power-off after some
seconds without these options.

Signed-off-by: Francisco Alecrim <alecrim@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: add platform_data to pass gpios
Felipe Balbi [Tue, 26 Jan 2010 03:46:30 +0000 (19:46 -0800)]
cbus: add platform_data to pass gpios

also add the platform_data to the related
board files.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: move to platform_driver
Felipe Balbi [Tue, 26 Jan 2010 03:46:30 +0000 (19:46 -0800)]
cbus: move to platform_driver

also add the platform_device to 770 and n8x0 board files.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: separate into several MODULE_AUTHOR entries
Felipe Balbi [Tue, 26 Jan 2010 03:46:29 +0000 (19:46 -0800)]
cbus: separate into several MODULE_AUTHOR entries

will look cleaner on modinfo.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: move EXPORT_SYMBOL close to its exported symbols
Felipe Balbi [Tue, 26 Jan 2010 03:46:29 +0000 (19:46 -0800)]
cbus: move EXPORT_SYMBOL close to its exported symbols

while there, also add a missing static to cbus_bus_init().

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: switch to kzalloc
Felipe Balbi [Tue, 26 Jan 2010 03:46:29 +0000 (19:46 -0800)]
cbus: switch to kzalloc

change kmalloc() + memset() to kzalloc(), no functional
changes.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: tahvo-usb: make it build again
Felipe Balbi [Tue, 26 Jan 2010 03:46:28 +0000 (19:46 -0800)]
cbus: tahvo-usb: make it build again

plenty of legacy code sitting there. Make it build
again. Later patches will come to clean that up.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: Make retu watchdog behave like a standard Linux watchdog
Tony Lindgren [Tue, 26 Jan 2010 03:46:28 +0000 (19:46 -0800)]
cbus: Make retu watchdog behave like a standard Linux watchdog

Make retu watchdog behave like a standard Linux watchdog.

Let the kernel do the kicking until the watchdog device is opened.

Note: We should remove the old non-standard interface, please
change to use standard /dev/watchdog instead.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agocbus: Fix compile and don't try to use tag
Tony Lindgren [Tue, 26 Jan 2010 03:46:28 +0000 (19:46 -0800)]
cbus: Fix compile and don't try to use tag

Fix compile and don't try to use tag

This should be really passed as platform_data from
the board-*.c files.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap: Search and replace headers to use plat
Tony Lindgren [Tue, 26 Jan 2010 03:46:27 +0000 (19:46 -0800)]
omap: Search and replace headers to use plat

Search and replace headers to use plat

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap: Add drivers/cbus support
Juha Yrjola [Tue, 26 Jan 2010 03:46:27 +0000 (19:46 -0800)]
omap: Add drivers/cbus support

CBUS is the bus that Energy Management ASICs are connected to on
some Nokia mobile devices. Added support for CBUS and two EM ASIC
drivers.

This commit is a merge of all the commits that were in the linux-omap
tree:

aae6da6d5f09307b1feb391a47d1ddb6bf2d523e CBUS: Switch to gpio_request/free calls
702e65cebefe0af8ac4a648286f229947f3e1b68 cbus build fixes
f03fdeddbbaafb57f0f62629a316036f270a973d use gpio_to_irq (OMAP tree only)
570f10b7d3aaa3d542b749622df2a1f86e54ebc3 use gpio_direction_output (OMAP tree only)
d59842e6881e8f58cb17de5c0d11866796347d50 use gpio_direction_input (OMAP tree only)
7270f33b7b0139f40fcfbf771dc5ec5a773a71cd use standard gpio get/set calls (OMAP tree only)
f228a725b975832ac5771ab2fc86d06bd694cdb3 ARM: OMAP: Remove io_p2v, use ioremap and XXX_IO_ADDRESS
fdee8764947cde1e6933e7d981ce5b9de00e83e6 Merge current mainline tree into linux-omap tree
5061bcd119547453b32c847d2b9490a052bc1755 Merge mainline v2.6.27-rc2 tree into linux-omap tree
2d46b9c984d1c862f2525b4d0cabcb092f77ac64 CBUS: A workaround for ADC S/H HW bug: always keep ch 8 selected when S/H is used
648f41f57c2bfa7152f0760ca29a1e9dac566ca4 USB: Change omap USB code to use omap_read/write instead of __REG for multi-omap
d305c615bb7f85d49788a4ed28cb6aace2317ab7 ARM: OMAP: Misc compile fixes
bfbd53fcc738ff33ebcf91bc3ef25ae637cc4175 CBUS: Checkpatch.pl fixes for retu-wdt.c
2d28be5848928fbb17952e8eb5295fb506e0c40e CBUS: Fix retu mutex handling
7faa6dd4ae4db44f9c3142484266e17080314d79 CBUS: Fix retu-headset driver by not using removed input_dev->private field
8964c7d13133723ef2fe6a2b798a3fd336b15f4e ARM: OMAP: Add return value check for input_register_device()
2cf7bc8a039d6a6b4558c8c3a319ea15eccab60c CBUS: Fix retu-headset driver by not using removed input_dev->cdev field
97b705ad835f1481270c4b67b402d6e37fa8ad15 ARM: OMAP: Misc compile fixes after syncing with mainline
488de021a75771df95473c85bfaa9c8f1c9db659 tahvo-usb: compile fix usb/gadget.h
d079a1c74ea46f75cc406838c45652b97205e6be CBUS: Do not BUG_ON in retu-headset in case of spurious release event
074e3419440ba83e659be554f827e928826b512d CBUS: Fix reentrant issues in retu-headset driver
9afd4b705891e8afd505ecabec25539b22416d7a CBUS: Manage bias voltage in retu-headset suspend/resume code
0de1ae4b1cee28514dec435bf58c4b5960dfb4e1 CBUS: Cleanup retu-headset driver
dff99b718dffb5c041c99eebb3607f411d377f4d ARM: OMAP: Misc compile fixes after updating to current mainline tree
e0f2c271e0e3feaab8f8190b39876683099d3f6a ARM: OMAP: Fix inconsistency of completion in retu-rtc
6cda72c73944cc50250b3ae959174b6778d5e19f ARM: OMAP: Fix USB compilation for N770 defconfig
d041f80e997ff7c21b14fdee920a034e576aa226 CBUS: Add driver for Retu/Vilma headset detection
699d8412c1bf505f24d1a2048b49b8ffd8fe1d00 ARM: OMAP: Clean up bitrot to sync with mainline
ba9ca80b6468c5500a84a5c5e84383a6925a0bc3 ARM: OMAP: Convert driver interrupt flags SA_* to IRQF_*
7adeaaa4390dff8dcd4e44e6bcb144befcc2816f ARM: OMAP: Workqueue changes for retu-rtc
708739a058a59b76f72062bda81fb961e05d61e8 ARM: OMAP: Workqueue changes for tahvo-usb
995dda5fa21c77d337fa2fc07914ecb15cd08e54 ARM: OMAP: Fix warnings in N770 build
e2f0b012fd0fc16899dcdabc0b43fabdfdadcd8c ARM: OMAP: Fix broken N770 build (tahvo-usb)
d5c772f519236d8683b460e5da37f4a943ca4aae Fix some pt_regs users
229b59cdb41742aa4aee3628962af6ef2c4d944a Sync with mainline: Get rid of unnecessary pt_regs
b983452be56be4169233c34be1134e8030be674b Sync with mainline: Get rid of <#include linux/config.h>
77845293a4eb6cfea806ecc74ea9988c044a76bc CBUS: Retu: add atomic set and clear register bits function
d2db44bd92af99576cdf976f7dfc95f54884b14d CBUS: Tahvo: add atomic set and clear register bits function
e19cba0ecf9dd2d9adfdba175e335aebe973023a CBUS: Enable suspend wakeup for Retu IRQ
8c81aa40bea255769f13449dfb7699552ddb8438 Merge source.mvista.com:/home/git/linux-omap-2.6
1230366a669d16c7a292586adc7ab0725395f5b4 Manual merge to make things compile after updating to 2.6.18-rc4
6b411907432fe97bce3e6a253f6b98ab6c105efc CBUS: turn off tahvo-usb OTG idle mode during enabling
e3b2a7b6c6bcb4d6e839695fdac3e23b86046f98 CBUS: Make Retu RTC and Tahvo USB drivers use sysfs_notify
fe3702054f6412aea04373ceb9d27a4a417ff3f0 OMAP: Fix USB on Nokia 770
9c926661738080ee298bc3a51240dd102973fa61 [PATCH] ARM: OMAP: tahvo_user: sem2mutex conversion
ea90ef431139e4ac40b1d08726f45283f98d50ef [PATCH] ARM: OMAP: tahvo usb: sem2mutex conversion
06563a863d399ab6a3a5c104ddf086030f33b6f6 [PATCH] ARM: OMAP: retu-user: sem2mutex conversion
72a222f41989a4b8ad8cddf62c47608ad2e9e358 [PATCH] ARM: OMAP: retu-rtc: sem2mutex conversion
7508d984603f5ce3cb6883c229c97ed0a35d24c6 [PATCH] CBUS: Fix tahvo-usb omap_otg_remove
07f4f04763e2ff4333d44bec438d4bacbea0b4ae CBUS: Convert Retu power button driver to use input_allocate_device()
c604ff0bb1bbd3c6bf14bb9e5cae67c5a89e4ece cbus: Update tahvo-usb for kernel API changes.
f5c9432bb9bd44968cb785e3bb8aad95d6af3431 [PATCH] ARM: OMAP: gpio-switch and retu-rtc kobject_uevent() fixes
517df76f9295ac1865494476e8b531c65232dc5a ARM: OMAP: Replace clock.h with clk.h
93cb1e87df6ac03d315c0408634831e7db898a77 ARM: OMAP: Support for new Retu chips
480a299b3f3a5302f068fb7e3c68069ab3d355a5 ARM: OMAP: Support for 7-bit backlight register on new Tahvo chips
19deb6846965d9fdd5a87cae3593a953ccfea778 ARM: OMAP: Add CBUS support

15 years agoomap: zoom3: enable ehci support
vikram pandita [Tue, 26 Jan 2010 03:46:20 +0000 (19:46 -0800)]
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: Gadiyar, Anand <gadiyar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap: serial: fix coding style indentaion
vikram pandita [Tue, 26 Jan 2010 03:46:19 +0000 (19:46 -0800)]
omap: 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: Menon, Nishanth <nm@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap3: pm: Add T2 Keypad as a wakeup source
Lesly A M [Tue, 26 Jan 2010 03:46:19 +0000 (19:46 -0800)]
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>
15 years agoARCH OMAP : enable ARCH_HAS_HOLES_MEMORYMODEL for OMAP
Sriram [Tue, 26 Jan 2010 03:46:19 +0000 (19:46 -0800)]
ARCH OMAP : enable ARCH_HAS_HOLES_MEMORYMODEL for OMAP

OMAP platforms(like OMAP3530) include DSP or other co-processors
for media acceleration. when carving out memory for the
accelerators we can end up creating a hole in the memory map
of sort:
<kernel memory><hole(memory for accelerator)><kernel memory>

To handle such a memory configuration ARCH_HAS_HOLES_MEMORYMODEL
has to be enabled. For further information refer discussion at:
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg15262.html.

Signed-off-by: Sriramakrishnan <srk@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>