Sakari Ailus [Mon, 20 Aug 2007 12:29:44 +0000 (15:29 +0300)]
V4L: Add internal ioctl-like interface.
This patch adds an internal ioctl-like interface which can be used in
situations where a single Video4Linux device is implemented by multiple
device drivers. One master device controls one or more slave devices.
The slaves provide Video4Linux ioctl-like interface for the use of the
master.
Only a handful of ioctls are implemented at the moment. More can (and
should) be added as more functionality is required.
Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
Paul Walmsley [Mon, 27 Aug 2007 08:39:22 +0000 (02:39 -0600)]
omap2 clock: generalize clock enable upon framework initialization
The OMAP2 clock framework enables a few clocks by hand upon initialization.
OMAP3430 will have a different set of clocks to enable upon init. So,
generalize this code by adding a new clock flag, ENABLE_ON_INIT, to mark
clocks that should be enabled on init; and add a new framework-wide function,
clk_enable_init_clocks(), that can be called from generalized init code.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Mon, 27 Aug 2007 08:39:21 +0000 (02:39 -0600)]
omap2 clock: Standardize DPLL rate recalculation with struct dpll_data
Introduce a new data structure, struct dpll_data, that contains DPLL
multiplier, divider, and autoidle information. Update existing DPLL code
to use struct dpll_data. The goal here is to set up something that will be
usable for OMAP3430 clock tree. Note that this does not affect the SRAM DPLL
assembly code - the DPLL register addresses are still hard-coded there.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Mon, 27 Aug 2007 08:39:20 +0000 (02:39 -0600)]
omap2 clock: replace omap2_get_crystal_rate() with clock-specific recalc code
The OMAP2 clock framework currently uses a nonstandard function to
assign the osc_ck and sys_ck rates, omap2_get_crystal_rate(). By
using custom recalc code for these clocks, we can get rid of it and
rely on the existing clock tree recalculation process.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Mon, 27 Aug 2007 08:39:19 +0000 (02:39 -0600)]
omap2 clock: use standard clk->enable/disable for APLLs
Now that we're calling the clock-specific enable & disable code, we can
get rid of the special-case code in _omap2_clk_{enable,disable}() for the
APLLs.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Mon, 27 Aug 2007 08:39:18 +0000 (02:39 -0600)]
omap2 clock: use custom osc_ck enable/disable routines
Now that we're paying attention to the .enable/.disable fields in struct
clk, convert the osc_ck enable and disable code to use this standard
mechanism. (osc_ck enable/disable does not technically enable or disable
the osc_ck; it actually enables/disables autoidling.)
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Mon, 27 Aug 2007 08:39:14 +0000 (02:39 -0600)]
omap2 clock: separate clksel set_rate code into its own function
Simplify omap2_clk_set_rate() by separating out the clksel set_rate code into
its own function, omap2_clksel_set_rate(). Clksel clocks use this function
by placing its function pointer in their .set_rate fields. Convert
existing clksel clocks accordingly.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Mon, 27 Aug 2007 08:39:13 +0000 (02:39 -0600)]
omap2 clock: use the struct clk round_rate field for clksel rate rounding code
The OMAP clock framework struct clk contains a field, .round_rate,
that is intended to contain a function pointer to rate rounding code.
Take advantage of it by converting all clksel clocks' round_rate field
to point to omap2_clksel_round_rate(). Rename the existing
omap2_clksel_round_rate() to omap2_clksel_round_rate_div(), to signify
that it returns divisor information as well, and set up
omap2_clksel_round_rate() as a wrapper for the clock framework to use.
Simplify omap2_clk_round_rate() accordingly.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Mon, 27 Aug 2007 08:39:12 +0000 (02:39 -0600)]
omap2 clock: remove all {src, rate}_offset fields from struct clk
src_offset and rate_offset are no longer used in OMAP2 clock framework
after the struct clksel/struct clksel_rate additions. Remove these
fields from clock.h and #ifdef out those fields for OMAP24XX compiles.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Mon, 27 Aug 2007 08:39:11 +0000 (02:39 -0600)]
omap2 clock: convert remaining clksel clocks to use omap2_clksel_recalc
This completes the transition to struct clksel/clksel_rate by converting the
remaining clksel clocks to call omap2_clksel_recalc() on rate recalculation.
Also remove RATE_FIXED from some clocks that can now recalculate their own
rates correctly via clksel.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Mon, 27 Aug 2007 08:39:06 +0000 (02:39 -0600)]
omap2 clock: convert omap2_get_clksel to use new clksel struct
Convert omap2_get_clksel to use new struct clksel and struct
clksel_rate data. Also fix its parameter order to conform with the
rest of the clock framework functions (i.e., struct clk first).
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Mon, 27 Aug 2007 08:39:04 +0000 (02:39 -0600)]
omap2 clock: convert omap2_clksel_to_divisor and omap2_divisor_to_clksel to use new clksel struct
Convert omap2_clksel_to_divisor() and omap2_divisor_to_clksel() to use
the new struct clksel and struct clksel_rate data. Add
omap2_get_clksel_by_parent() utility code, called by both functions,
to return the appropriate struct clksel for a given (struct clk, parent
struct clk) combination.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Mon, 27 Aug 2007 08:39:03 +0000 (02:39 -0600)]
omap2 clock: init clksel clock parents to hardware reality at clock init
Source-selectable clksel clocks have a 'default parent' assigned to them
at compile-time. This default parent may or may not match the reality
that is configured in the hardware registers by the bootloader. Clock tree
recalculations could be erratic if the struct clk parent field contents
don't match the hardware registers.
Resolve this by creating omap2_init_clksel_parent() to read the hardware
registers and update the struct clk parent field as appropriate for clksel
clocks. Add an '.init' field to each source-selectable clk structure so
that the parent is fixed up when the clock is initially registered. (We
don't do this for clksel clocks that are only rate-selectable, since they
only have one possible parent clock.)
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Mon, 27 Aug 2007 08:39:02 +0000 (02:39 -0600)]
omap2 clock: add clksel and clksel_rate data
Many OMAP2 clocks are either source- or divisor-selectable by twiddling
various register bits; these are 'clksel' clocks. The table of rate divisors
and source clock settings was previously embedded in the clock.c source code.
Encode this data in two data structures:
1) struct clksel_rate for divisor-selection, mapping divisor values to
register bit field values, along with a flags field indicating which
chips the rate is available for -- one for each parent-rate combination; and:
2) struct clksel for source-selection, mapping parent struct clk pointers
to struct clksel_rate array pointers; one for each parent.
Also, add several fields to the clk structure:
1) clksel: pointer to the struct clksel array
2) clksel_reg: pointer to the clksel register
3) clksel_mask: mask for the clksel bitfield
Add this data to each clksel clock. All this data is not yet used by the clock
framework; that functionality is in the following patches.
N.B. Two clocks, sys_clkout and sys_clkout2, could not be converted to
this setup without splitting source selection and divisor selection.
This is because these clocks use separate registers for each
selector. So, create two new clocks, sys_clkout_src and
sys_clkout2_src, and locate source-selection there, and keep divisor
selection in sys_clkout/sys_clkout2. This entailed modifying
board-n800-audio.c.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Mon, 27 Aug 2007 08:39:01 +0000 (02:39 -0600)]
omap2 clock: rename, add comment to omap2_mpu_recalc()
omap2_mpu_recalc() actually just looks up what the MPU speed 'should'
currently be from the current virt_prcm_set rate set, rather than reporting
the actual hardware settings. Clarify this by renaming it to
omap2_table_mpu_recalc() and adding some comments.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
omap2_propagate_rate() seems completely superfluous. It handles two
cases. The first case is for non-fixed rate clocks. It assigns the
parent's rate to the clock, and continues propagating the rate
downwards. This can be handled by adding a RATE_PROPAGATES clock flag
to the clock, if it wasn't there already, and by using
followparent_recalc() directly as the recalc function. The second
case is for fixed rate clocks. Here all we need to do is to call
propagate_rate() directly, so, use that for the recalc function.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Add a new clock framework function, recalculate_root_clocks(), that
recalculates all root clocks (i.e., clocks with no parent clock).
Call this function in omap2_clk_arch_init(), rather than manually
propagating specific clocks. Add propagate_rate() recalcs to func_32k_ck
and osc_ck.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Felipe Balbi [Mon, 27 Aug 2007 19:11:44 +0000 (15:11 -0400)]
OMAP2: PM: Kill compile warnings at arch/arm/mach-omap2/pm.c
Get rid of the following warnings:
arch/arm/mach-omap2/pm.c: In function 'omap2_enter_full_retention':
arch/arm/mach-omap2/pm.c:509: warning: implicit declaration of function 'omap2_gpio_prepare_for_retention'
arch/arm/mach-omap2/pm.c:536: warning: implicit declaration of function 'omap2_gpio_resume_after_retention'
Signed-off-by: Felipe Balbi <felipe.lima@indt.org.br> Signed-off-by: Tony Lindgren <tony@atomide.com>
Even more CamelCase removal from CPPI:
- members of cppi_channel struct
- parameters to cppi_channel_program()
- "buffSz" local variables
- "chNum" local variables
- "regVal" local variables
Also
- remove the FIXME about using container_of(), that's resolved now
- stop using the now-pointless private_data fields
- remove the redundant actualLen field (use dma_channel.actual_len)
- remove some redundent local variables
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
More CamelCase removal from the CPPI support. In this case:
- CPPI descriptor members;
- Some members of the controller struct;
- Rename "regBase" variables (as "tibase", vs Mentor registers)
- Rename otgCh variables as cppi_ch;
This code still has a bunch of CaMeLcAsInG going on.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Felipe Balbi [Mon, 27 Aug 2007 19:11:45 +0000 (15:11 -0400)]
MUSB: Kill compile warnings at drivers/usb/musb/tusb6010.c
Get rid of the following warning:
drivers/usb/musb/tusb6010.c: In function 'tusb_otg_ints':
drivers/usb/musb/tusb6010.c:716: warning: unused variable 'devctl'
Signed-off-by: Felipe Balbi <felipe.lima@indt.org.br> Signed-off-by: Tony Lindgren <tony@atomide.com>
David Brownell [Thu, 7 Dec 2006 01:14:03 +0000 (17:14 -0800)]
ARM: OMAP: abstract debug card setup (smc, leds)
Additional cleanup for debug boards on H2/P2/H3/H4: move the init
code that's not board-specific into a new file where it can be easily
shared between all the different boards (avoiding code duplication,
and making it easier to support more devices). Make H4 use that.
This should be easy to drop in to the OMAP1 boards using these debug
cards; the only difference seems to be that the p2 does an extra reset
of the smc using the fpga (probably all boards could do that, if it's
necessary) and doesn't use the gpio mux or request APIs.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
David Brownell [Thu, 7 Dec 2006 01:13:55 +0000 (17:13 -0800)]
ARM: OMAP: omap2/gpmc updates
GPMC updates:
- bugfixes: wrong/missing flags, omitted write, wrong test
- don't map memory segments starting at zero
- improve debug messaging
- export gpmc_get_fclk_perio]d() since it's needed to calc timings
- expect gpmc_cs_set_timings() caller to have initialized sync vs async
Note that this API is glitchy; likely the best fix would be to add
a member to "struct gpmc_timings" to hold GPMC_CONFIG1, since that
holds one key aspect of the GPMC timings (the gpmc_fclk divisor,
and sync vs. async == whether that divisor matters).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
This adds basic support for Siemens SX1. More patches are available,
with video driver, mixer, and serial ports working. That is enough to
do gsm calls with right userland.
Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Tony Lindgren <tony@atomide.com>
This adds support for the keypad on the top of the Amstrad Delta. It's
just a standard omap-keypad so all we need to do is add the keypad
layout and platform data to the board definition file.
Signed-off-by: Jonathan McDowell <noodles@earth.li> Signed-off-by: Tony Lindgren <tony@atomide.com>
General update of the board file for Palm Tungsten E. Registers the
platform devices contained in the PDA (ROM chip, keypad, infra-red)
and updates the configuration for USB and MMC, whose config values
were previously guessed in most cases due to lack of documentation
(and now are confirmed by a number of users). Macros for GPIO pins are
moved to a file in include/asm-arm/arch-omap.
Signed-off-by: Andrzej Zaborowski <balrog@zabor.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
Imre Deak [Mon, 5 Mar 2007 15:34:05 +0000 (17:34 +0200)]
ARM: OMAP: add SoSSI clock (remove manual checking of SoSSI state from idle)
The SoSSI driver should already take care of this by enabling / disabling
its clock when necessary, so this legacy callout from the PM idle code
is not needed any more.
Signed-off-by: Imre Deak <imre.deak@solidboot.com> Signed-off-by: Tony Lindgren <tony@atomide.com>