Commit graph

362067 commits

Author SHA1 Message Date
Fabio Estevam
4344429d3d video: mxsfb: Introduce regulator support
Instead of using a custom binding for retrieving the GPIO that activates the
LCD from devicetree, use a standard regulator.

This approach has the advantage to be more generic.

For example: in the case of a board that has a PMIC supplying the LCD voltage,
the current approach would not work, as it only searches for a GPIO pin.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-08 15:44:55 +08:00
Alexandre Belloni
ac77bc227e ARM: dts: cfa10036: Add touchscreen support to the CFA-10049
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-07 14:18:32 +08:00
Alexandre Pereira da Silva
1897fda941 ARM: dts: imx23-olinuxino: mark sdcard cd as broken
The imx23-olinuxino sdcard doesn't have card detect.

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-07 14:15:23 +08:00
Shawn Guo
bcc20f9e40 serial: mxs-auart: move to use generic DMA helper
With the generic DMA device tree helper supported by mxs-dma driver,
client devices only need to call dma_request_slave_channel() for
requesting a DMA channel from dmaengine.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
2013-04-04 21:22:45 +08:00
Shawn Guo
5fac0e18bd mtd: gpmi: move to use generic DMA helper
With the generic DMA device tree helper supported by mxs-dma driver,
client devices only need to call dma_request_slave_channel() for
requesting a DMA channel from dmaengine.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
2013-04-04 21:22:45 +08:00
Shawn Guo
e5aba13da0 i2c: i2c-mxs: move to use generic DMA helper
With the generic DMA device tree helper supported by mxs-dma driver,
client devices only need to call dma_request_slave_channel() for
requesting a DMA channel from dmaengine.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
2013-04-04 21:22:45 +08:00
Shawn Guo
26aafa77df spi: mxs-spi: move to use generic DMA helper
With the generic DMA device tree helper supported by mxs-dma driver,
client devices only need to call dma_request_slave_channel() for
requesting a DMA channel from dmaengine.

Since mxs is a DT only platform now, along with the changes, the non-DT
case handling in probe function also gets removed.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
2013-04-04 21:22:44 +08:00
Shawn Guo
0e91e434c8 mmc: mxs-mmc: move to use generic DMA helper
With the generic DMA device tree helper supported by mxs-dma driver,
client devices only need to call dma_request_slave_channel() for
requesting a DMA channel from dmaengine.

Since mxs is a DT only platform now, along with the changes, the non-DT
case checking in probe function also gets cleaned up.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Chris Ball <cjb@laptop.org>
Cc: linux-mmc@vger.kernel.org
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
2013-04-04 21:22:44 +08:00
Shawn Guo
d84f638b03 dma: mxs-dma: move to generic device tree binding
Update mxs-dma driver to adopt generic DMA device tree binding.  It
calls of_dma_controller_register() with mxs specific of_dma_xlate to
get the generic DMA device tree helper support.  Then DMA clients only
need to call dma_request_slave_channel() for requesting a DMA channel
from dmaengine.

The existing way of requesting channel, clients directly call
dma_request_channel(), still work there, and will be removed after
all mxs-dma clients get converted to generic DMA device tree helper.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
2013-04-04 21:22:43 +08:00
Shawn Guo
aaa20517c0 dma: mxs-dma: use devm_* managed functions
Use devm_* managed functions to simplify probe() error handling.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
2013-04-04 21:22:43 +08:00
Shawn Guo
f30fb03d4d ARM: dts: add generic DMA device tree binding for mxs-dma
Add generic DMA device tree binding for mxs-dma.  The changes include:

 * Add channel interrupts into DMA controller nodes
 * Add properties '#dma-cells' and 'dma-channels' for DMA controller nodes
 * And properties 'dmas' and 'dma-names' for DMA client nodes
 * Update mxs-dma device tree binding doc

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
2013-04-04 21:22:43 +08:00
Alexandre Belloni
d8880a126d pinctrl: pinctrl-mxs: document the missing pull-ups
Some pins on the i.mx23 and i.mx28 are missing pull-ups, document that
oddity because it was difficult to know the expected behaviour.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-04 21:22:42 +08:00
Alexandre Belloni
7d40340864 ARM: cfa10036: add one wire bitbanging to the cfa10049
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-04 21:22:42 +08:00
Shawn Guo
c8b5cfc879 video: mxsfb: remove mxsfb_platform_data
None of mxsfb users uses mxsfb_platform_data now.  Let's remove it
from mxsfb driver.

As the result, include/linux/mxsfb.h gets deleted with a few macros
moved into mxsfb.c.  Along with the change, the typo "FAILING" in macro
name is fixed to be "FALLING".

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-04 21:22:42 +08:00
Shawn Guo
0d9f8217db ARM: mxs: move display timing configurations into device tree
Move display timing configurations into device tree, so that the
auxdata for mxsfb driver can be killed.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-04 21:22:42 +08:00
Shawn Guo
669406534b video: mxsfb: get display timings from device tree
Use videomode helpers to get display timings and configurations from
device tree when platform_data is absent.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-04 21:22:41 +08:00
Shawn Guo
36f3e99649 video: mxsfb: remove dotclk_delay from platform_data
There is no in-tree mxsfb users using mxsfb_platform_data dotclk_delay.
Let's remove it from mxsfb_platform_data to ease full device tree
adoption of mxsfb driver.  If later we have platform/board need to
configure this parameter, we can add it into device tree bindings.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-04 21:22:41 +08:00
Shawn Guo
4aa02c7cbb video: mxsfb: remove fb_phys/fb_size from platform_data
There is no in-tree users of mxsfb_platform_data fb_phys/fb_size.
With CMA support in the kernel, there is no real need for platform to
reserve memory and pass address and size into driver via platform_data.
So let's remove fb_phys/fb_size from mxsfb_platform_data to ease full
device tree adoption.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-04 21:22:41 +08:00
Shawn Guo
9e5485791b video: mxsfb: use devm_* managed functions
Use devm_* managed functions to make code a little cleaner.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-04 21:22:41 +08:00
Shawn Guo
d260a7af0f ARM: mxs: remove unneeded enet_out clk initialization
With fec driver taking care of enet_out clk, most of board setup
do not need to enable enet_out clk.  So remove them.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-04 21:22:40 +08:00
Wolfram Sang
f231a9fe7f ARM: dts: mxs: add enet_out clock to devicetree
Put the clock to the devicetree, so the driver can take care of it
later. Then, we don't have to do the enabling as a workaround in board
init.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
[shawn.guo: add enet_out into imx28.dtsi and overwrite it for m28evk]
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-04 21:22:40 +08:00
Wolfram Sang
daa7d392ff net: freescale: fec: add support for optional enet_out clk
Some MX28 boards need the internal enet_out clock to be enabled. So, do
this in the driver iff the clock was referenced via devicetree.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: David S. Miller <davem@davemloft.net>
2013-04-04 21:22:40 +08:00
Shawn Guo
c29dc2d771 net: fec: handle optional clk_ptp more gracefully
When the optional clk_ptp is absent, we can just set it to NULL, and
clk API will just handle it gracefully.  It saves us from checking
clk_ptp whenever calling into clk API.

Also since clk_ptp is optional, the "ret" variable shouldn't be set
in case that the clock is absent.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: David S. Miller <davem@davemloft.net>
2013-04-04 21:22:39 +08:00
Fabio Estevam
e933a1a12a clocksource: mxs_timer: Add semicolon at end of line
Fix the following build error:

drivers/clocksource/mxs_timer.c:304:1: error: expected ',' or ';' at end of input

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-03 10:30:08 +08:00
Shawn Guo
0b48d3a6fb ARM: mxs: remove unused headers
Most of the stuff in the headers are used nowhere now.  Move a few
things that are useful for mach-mxs.c into there and remove the headers.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 20:42:23 +08:00
Shawn Guo
39490ab0ff ARM: mxs: merge imx23 and imx28 into one machine_desc
Most of the function hooks are same between imx23 and imx28
machine_desc, so merge them into one.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 20:42:21 +08:00
Shawn Guo
3cb7825bdc ARM: mxs: remove common.h
All three remaining functions declared in common.h are implemented by
clock driver.  Create header include/linux/clk/mxs.h to contain them
and remove common.h.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 20:42:20 +08:00
Shawn Guo
1bff2d76ac ARM: mxs: move mxs_get_ocotp() into mach-mxs.c
All the users of mxs_get_ocotp() are in mach-mxs.c.  Move the function
into mach-mxs.c, make it a static function, and then remove ocotp.c.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 20:42:19 +08:00
Shawn Guo
0265b6cbfe ARM: mxs: remove mm.c
The static mapping is used nowhere now.  Hence mm.c can be removed
completely.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 20:42:18 +08:00
Shawn Guo
1f629564d0 ARM: mxs: use debug_ll_io_init for low-level debug
The only user of the static mapping done in mx23_map_io and mx28_map_io
is low-level debug now.  Use debug_ll_io_init() instead, so that the
static mapping is used nowhere and can be removed completely later.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 20:42:17 +08:00
Shawn Guo
69d75a02db ARM: mxs: get ocotp base address from device tree
Instead of using the static definitions, get ocotp base address from
device tree with mapping.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 20:42:16 +08:00
Shawn Guo
974a9af532 ARM: mxs: remove system.c
There is no user of function mxs_reset_block() now.  Let's move
mxs_restart() into mach-mxs.c as a static function and remove system.c
completely.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 20:42:15 +08:00
Shawn Guo
8f7cf8815f ARM: mxs: get reset address from device tree
Instead of using static address definition, get reset address from
device tree with mapping, so that core_initcall mxs_arch_reset_init()
can be killed.

The "rtc" clock code in mxs_arch_reset_init() seems to be zombie, since
there is no clk lookup defined in clock driver at all.  Remove it
together.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 20:42:13 +08:00
Shawn Guo
c226221359 ARM: mxs: remove empty hardware.h
The hardware.h is an empty header and used nowhere now.  Remmove it.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 20:42:12 +08:00
Shawn Guo
114fe75def ASoC: mxs-saif: remove mach header inclusion
The header <mach/hardware.h> is not needed at all, and <mach/mxs.h> is
needed only for macros MXS_SET_ADDR and MXS_CLR_ADDR.  Define the macros
and remove the mach header inclusions.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-01 20:41:59 +08:00
Shawn Guo
987869aa4a iio: mxs-lradc: remove unneeded mach header inclusion
Headers <mach/mxs.h> and <mach/common.h> are not used in the driver
at all.  Removed the inclusions.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Jonathan Cameron <jic23@kernel.org>
2013-04-01 16:30:05 +08:00
Shawn Guo
36d1da1d15 rtc: stmp3xxx: use stmp_reset_block() instead
The function stmp_reset_block() provides the exactly same functionality
as mxs_reset_block().  So use stmp_reset_block() instead, so that
<mach/common.h> inclusion can be removed.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: rtc-linux@googlegroups.com
2013-04-01 16:30:05 +08:00
Shawn Guo
0c672aae28 clk: mxs: remove the use of mach level IO accessor
It removes the use of mach level IO accessor __mxs_setl/clrl, and hence
removes mach header inclusion from clock driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
2013-04-01 16:30:04 +08:00
Shawn Guo
38d6590f0f clk: mxs: get base address from device tree
Instead of using the static definitions, get clkctrl and digctl base
addresses with mapping from device tree.

Use macro on variable is not nice, but it's done here to save huge
pointless diff stat.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
2013-04-01 16:30:04 +08:00
Shawn Guo
2835705c8a ARM: mxs: remove unneeded mach-types.h inclusion
Remove the unneeded mach-types.h inclusion from mxs.h, which is a
leftover from commit 845da6b (ARM: mxs: detect SoC by checking CHIPID
register).

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 16:30:04 +08:00
Shawn Guo
6a8e95b071 ARM: mxs: move icoll driver into drivers/irqchip
Move icoll.c into drivers/irqchip as irq-mxs.c, and along with the
renaming, change the driver to use IRQCHIP_DECLARE.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 16:30:04 +08:00
Shawn Guo
cec6bae8ca ARM: mxs: call stmp_reset_block() in icoll
Call stmp_reset_block() rather than mxs_reset_block(), so that
<mach/common.h> inclusion can be removed from icoll driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 16:30:03 +08:00
Shawn Guo
8256aa7129 ARM: mxs: get icoll base address from device tree
Rather than using the static definition, it gets icoll base address
with mapping from device tree.

As the result, <mach/mxs.h> inclusion can be removed from the driver
now.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 16:30:03 +08:00
Shawn Guo
c74512bf83 ARM: mxs: move timer driver into drivers/clocksource
Move mxs timer driver into drivers/clocksource as mxs_timer.c.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 16:30:03 +08:00
Shawn Guo
7a9c39f787 ARM: mxs: select STMP_DEVICE and use it for timer code
Select STMP_DEVICE and in timer code replace mxs_reset_block() with
stmp_reset_block(), use STMP_OFFSET_REG_SET/CLR to replace
__mxs_setl/clrl.

As the result, <mach/mxs.h> and <mach/common.h> includsion can be
removed from timer.c now.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 16:30:02 +08:00
Shawn Guo
220d2f269a ARM: mxs: remove cpu_is_mx23() call from timer code
Remove cpu_is_mx23() call from timer code by using
of_device_is_compatible() instead.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 16:30:02 +08:00
Shawn Guo
be35bd2bcd ARM: mxs: get timrot base address from device tree
Instead of using static defines, it gets timrot base address with
mapping from device tree.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 16:30:02 +08:00
Shawn Guo
2efb950465 ARM: mxs: look up timrot clock from device tree
Change call clk_get_sys() to of_clk_get() to look up timrot clock from
device tree, so that the clk_register_clkdev() call for timrot can be
saved in clock driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 16:30:02 +08:00
Shawn Guo
633ef4c7d1 ARM: mxs: use CLKSRC_OF helper to initialize timer
Select CLKSRC_OF and use clocksource_of_init() to initialize timer, so
that the call to mxs_timer_init() in clock driver can be removed.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 16:30:01 +08:00
Shawn Guo
3ed628a812 Merge remote-tracking branch 'arm-soc/clksrc/cleanup' into mxs/cleanup 2013-04-01 16:29:56 +08:00