Commit Graph

239 Commits

Author SHA1 Message Date
Takashi YOSHII 6bf45a1018 ARM: mach-shmobile: Add eMMC support through MMCIF on AG5EVM
Adding platform resources, PFC setting and release
reset pin for eMMC on ag5evm.

[damm@opensource.se: Add MSTP code for MMCIF]
Signed-off-by: Takashi YOSHII <takashi.yoshii.zj@renesas.com>
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 16:36:33 +09:00
Takashi YOSHII 5d7814728d ARM: mach-shmobile: Use pullups for AG5EVM KEYSC pins
Follow up to pfc-sh73a0.c's pull-up support.
Change GPIO_FN_KEYINx to GPIO_FN_KEYINx_PU.

Signed-off-by: Takashi YOSHII <takashi.yoshii.zj@renesas.com>
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 16:35:54 +09:00
Takashi YOSHII a0794fd019 ARM: mach-shmobile: sh73a0 GPIO pullup improvement
On SH-Mobile, Pull UP/Downs can be controlled independently
from Function selectors (by lower nibble of PFCR).
It means people may want to use GPIO_FN_xxx_PU/PD in addition
to GPIO_IN_PU/PD which is currently supported.
This patch adds pull-up version for some input signals on
KEYSC, MMC, FSIA as well as SDHI1.

Signed-off-by: Takashi YOSHII <takashi.yoshii.zj@renesas.com>
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 16:35:50 +09:00
Magnus Damm 019c4ae313 ARM: mach-shmobile: sh73a0 CPGA fix for KEYSC
Fix the sh73a0 KEYSC clock control by adding MSTP403
to mstp_clks[]. Use KEYSC instead of KEYSC0 in comments.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 16:35:45 +09:00
Magnus Damm 5010f3db95 ARM: mach-shmobile: sh73a0 TMU support
Add support for 2 TMU timer channels on sh73a0.

One timer channel is used for clocksource and
the other is used for clockevents. All channels
in the same TMU block share MSTP bit as usual.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 13:46:15 +09:00
Magnus Damm 5f53a56af5 ARM: mach-shmobile: sh73a0 INTCS support
Add INTCS support for the sh73a0 processor.

The interrupts on the sh73a0 processor are managed
through controllers such as GIC, INTCS and INTCA.

The ARM cores use the GIC as primary interrupt
controller and the INTCS and INTCA are hanging off
the GIC as cascaded interrupt controllers.

Peripherals connected both to the GIC and the INTC
controllers should if possible only use the GIC.

If no GIC connection is available then INTCS and
INTCA may be used instead.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 13:46:12 +09:00
Kuninori Morimoto 354e4157d9 ARM: mach-shmobile: mackerel: fixup default memory size
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 13:38:26 +09:00
Paul Mundt 7ccbefe07e Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2010-12-22 12:56:10 +09:00
Paul Mundt 8bcee1832d Merge branch 'rmobile/urgent' into rmobile-latest
Conflicts:
	arch/arm/mach-shmobile/include/mach/entry-macro.S

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-21 00:40:51 +09:00
Magnus Damm 5ce2a2ddb5 ARM: mach-shmobile: Bump up NR_IRQS to 1024
Increase NR_IRQS from 512 to 1024 on SH-Mobile ARM.

Needed to support vectors in the sh73a0 INTCS block.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-21 00:27:55 +09:00
Magnus Damm 6155f77d09 ARM: mach-shmobile: Clean up headsmp.S
Use PAGE_OFFSET and PHYS_OFFSET for secondary_startup
entry point as recommended by Russell King.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-21 00:27:41 +09:00
Yusuke Goda 56e78dafc4 ARM: mach-shmobile: mackerel: Add GPS support
Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-21 00:25:31 +09:00
Yusuke Goda 41491b9adc ARM: mach-shmobile: mackerel: Add mmcif support
v2
 Add comment of J22 and OCR field.

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-17 19:46:31 +09:00
Magnus Damm 1cf215a5b4 ARM: mach-shmobile: INTC interrupt priority level demux fix
Fix interrupt priority level handling on SH-Mobile ARM.

SH-Mobile ARM platforms using multiple interrupt priority
levels need this patch to fix a potential dead lock that
may occur if multiple interrupts with different levels
are pending simultaneously.

The default INTC configuration is to use the same priority
level for all interrupts, so this issue does not trigger by
default. It is however common for board code to override the
interrupt priority for certain interrupt sources depending
on the application. Without this fix such boards may lock up.

In detail, this patch updates the INTC code in entry-macro.S
to make sure that the INTLVLA register gets set as expected.

To trigger this bug modify the board specific code to adjust
the interrupt priority level for the ethernet chip. After
changing the priority level simply use flood ping to drown
the board with interrupts.

This patch applies to INTCA-based processors such as sh7372,
sh7377 and sh7372. GIC-based processors are not affected.

Suitable for v2.6.37-rc and stable from v2.6.34 to v2.6.36.

Cc: stable@kernel.org
Signed-off-by: Magnus Damm <damm@opensource.se>
Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-17 19:42:47 +09:00
Magnus Damm 676b14c36d ARM: mach-shmobile: fix compile warning in mm/init.c
Turn down the warning noise from the compiler,
basically a SH-Mobile specific version of the
patch located in the RMK patch tracker:

6484/1: "fix compile warning in mm/init.c",

Without this patch the following warning triggers:

 CC      arch/arm/kernel/sys_arm.o
arch/arm/mm/init.c: In function 'mem_init':
arch/arm/mm/init.c:606: warning: format '%08lx' expects type 'long unsigned int', but argument 12 has type 'unsigned int'
  CC      arch/arm/kernel/traps.o

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-17 19:41:13 +09:00
Magnus Damm 72f4d57923 ARM: mach-shmobile: sh73a0 SMP support
Add SMP support for ag5evm and the sh73a0 processor.

Onlining and offlining works well, but at this point
offlined processor cores are not put into sleep mode.

There is no spinlock for syncing the secondary core
with the first one in this implementation. The code
instead relies on the cpu_online() check in __cpu_up().

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-14 18:15:47 +09:00
Magnus Damm 1c51ed4fb9 ARM: mach-shmobile: SMP base support
Add SMP base support for R-Mobile / SH-Mobile processors.

This patch contains all base code to support CONFIG_SMP
regardless of ARCH_SHMOBILE processor type. Both local timer
and CPU hotplug are supported, but no processor specific
code is included.

At this point only the default behavior is in place, so
a single core will always be used even though CONFIG_SMP
is enabled on multicore systems.

The SMP Kconfig entry for arch/arm/Kconfig is excluded from
this patch to simplify merging.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-14 18:15:44 +09:00
Yusuke Goda 6dff7da2ad ARM: mach-shmobile: mackerel: Add sdhi support
Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-14 18:15:17 +09:00
Magnus Damm 09dd7ded60 ARM: mach-shmobile: Fix up pinmux entries in Makefile
Compiling in multiple CPUs into the same kernel binary
requires a Makefile update. With this patch in place
it is possible to enable the pinmux code for both the
SH7372 and the SH7377.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-14 18:13:50 +09:00
Takashi Iwai 20aeeb356b Merge branch 'topic/workq-update' into topic/asoc
Conflicts:
	sound/soc/codecs/wm8350.c
	sound/soc/codecs/wm8753.c
	sound/soc/sh/fsi.c
	sound/soc/soc-core.c
2010-12-13 09:28:43 +01:00
Paul Mundt 598e227ea9 Merge branches 'rmobile/ag5' and 'rmobile/mackerel' into rmobile-latest 2010-12-13 15:36:36 +09:00
Tony SIM cd8ab0041d ARM: mach-shmobile: mackerel: Add keypad tca6408a support
This patch maps key0/key1/key2/key3 as HOME/MENU/BACK/POWER buttons
on mackerel board.

Signed-off-by: Tony SIM <chinyeow.sim.xt@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-13 14:11:14 +09:00
Tony SIM 80f1dc7cc9 ARM: mach-shmobile: mackerel: Add Accelerometer sensor support
Signed-off-by: Tony SIM <chinyeow.sim.xt@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-08 16:11:17 +09:00
Kuninori Morimoto 3d09fbcd26 ARM: 6514/1: mach-shmobile: Add zboot support for SuperH Mobile ARM
When CONFIG_ZBOOT_ROM is selected, the resulting zImage file will be small
boot loader and may be burned to rom or flash.

This is the board-specific portion of this patch-set.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-05 08:40:21 +00:00
Kuninori Morimoto 9a4af112bd ARM: 6515/1: Add zboot support for SuperH Mobile ARM
When CONFIG_ZBOOT_ROM is selected, the resulting zImage file will be small
boot loader and may be burned to rom or flash.

This is the non-board-specific framework portion of this patch-set.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-05 08:40:17 +00:00
Magnus Damm f6d84f4a7d ARM: mach-shmobile: AG5 clock framework improvements
This patch improves the state of the AG5 clock
framework support. The main clock parent is
automatically detected, but most of the clocks
are not used by any driver or subsystem at this
point. More work is needed for support of multi
media hardware such as FSI and/or LCDC/MIPI-DSI.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-03 16:29:15 +09:00
Kuninori Morimoto 1a44d72a40 ARM: mach-shmobile: mackerel: Add FSI-AK4643 support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-01 15:55:04 +09:00
Kuninori Morimoto d44deb35c2 ARM: mach-shmobile: mackerel: Add LEDs support
you can control it by
echo 0 > /sys/class/leds/led0/brightness
echo 1 > /sys/class/leds/led0/brightness

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-01 15:54:58 +09:00
Kuninori Morimoto c8d6bf9a7b ASoC: sh: fsi-ak4642: Add FSI port and ak464x selection
Current FSI-Ak4642 device had niche settings which were
FSI2-A-AK4643 and FSI-A-AK4642.
This patch add platform_device_id which can control
FSI/FSI2, PortA/PortB, AK4642/AK4643 from platform data.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-30 11:34:44 +00:00
Paul Mundt 2818b19102 Merge branch 'rmobile/mackerel' into rmobile-latest
Conflicts:
	arch/arm/mach-shmobile/Kconfig
	arch/arm/mach-shmobile/Makefile

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-30 14:53:45 +09:00
Paul Mundt 0ae26c8cf7 Merge branches 'rmobile/ag5' and 'rmobile/mmcif' into rmobile-latest 2010-11-30 14:50:10 +09:00
Kuninori Morimoto 25338f2e09 ARM: mach-shmobile: mackerel: Add USB1(Host) support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-30 13:44:08 +09:00
Kuninori Morimoto eb87e6770a ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23
RGB24 bus needs 18-23 pin

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-29 15:33:57 +09:00
Kuninori Morimoto 4b82b68925 ARM: mach-shmobile: mackerel: document switch and pin modes.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-29 13:05:26 +09:00
Kuninori Morimoto 11fee467a1 ARM: mach-shmobile: mackerel: Add LCDC support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-29 13:05:21 +09:00
Kuninori Morimoto 2264c151ef ARM: mach-shmobile: mackerel: Add SMSC support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-29 13:05:16 +09:00
Kuninori Morimoto 920adc75d5 ARM: mach-shmobile: Add mackerel board support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-29 13:05:10 +09:00
Kuninori Morimoto 208c7dc272 ARM: mach-shmobile: ag5evm: Add FSI resources
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-29 13:01:08 +09:00
Linus Torvalds d4d2ad948e Merge branch 'rmobile-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'rmobile-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  ARM: mach-shmobile: clock-sh7372: remove bogus pllc2 clock toggling.
  ARM: mach-shmobile: clock-sh7372: remove unnecessary fsi clocks
  ARM: mach-shmobile: clock-sh7372: modify error code
  ARM: mach-shmobile: ap4evb: FSI clock use proper process for ak4642
  ARM: mach-shmobile: ap4evb: FSI clock use proper process for HDMI
  ARM: mach-shmobile: clock-sh7372: remove fsidiv bogus disable
  ARM: mach-shmobile: sh7372 USB0/IIC1 MSTP fix
2010-11-27 07:17:16 +09:00
Jean-Christop PLAGNIOL-VILLARD 6d803ba736 ARM: 6483/1: arm & sh: factorised duplicated clkdev.c
factorise some generic infrastructure to assist looking up struct clks
for the ARM & SH architecture.

as the code is identical at 99%

put the arch specific code for allocation as example in asm/clkdev.h

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-11-26 10:51:04 +00:00
Paul Mundt 1ad2096c4e Merge branch 'rmobile/mmcif' into rmobile-latest 2010-11-25 16:45:43 +09:00
Kuninori Morimoto 696d6e178a ARM: mach-shmobile: clock-sh73a0: modify MSTP order
This patch permuted clock arrays in the order of MSTP

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-25 16:29:03 +09:00
Guennadi Liakhovetski df73af86b6 ARM: mach-shmobile: enable MMCIF DMA on ap4evb
Have to add DMA slave configuration to enable DMA for the sh7372 MMCIF
controller.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-25 16:26:50 +09:00
Guennadi Liakhovetski 6d11dc14e6 ARM: mach-shmobile: add DMA defines for MMCIF on sh7372
Add DMA slave IDs and slave definitions for MMCIF on sh7372.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-25 16:26:35 +09:00
Paul Mundt 5405652571 Merge branch 'rmobile/fsi-despair' into rmobile-fixes-for-linus 2010-11-24 16:21:08 +09:00
Paul Mundt c4d73e7d75 Merge branches 'rmobile/ag5' and 'rmobile/fsi-despair' into rmobile-latest 2010-11-24 15:34:46 +09:00
Kuninori Morimoto 421b446abe ARM: mach-shmobile: clock-sh7372: remove bogus pllc2 clock toggling.
The PLLC2 clock was utilizing the same sort of enable/disable without
regard to usecount approach that the FSIDIV clock was when being used as
a PLL pass-through. This forces the enable/disable through the clock
framework, which now prevents the clock from being ripped out or modified
underneath users that have an existing handle on it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 15:34:04 +09:00
Kuninori Morimoto b16a2892b9 ARM: mach-shmobile: clock-sh7372: remove unnecessary fsi clocks
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 15:31:08 +09:00
Kuninori Morimoto a57b1a9bdf ARM: mach-shmobile: clock-sh7372: modify error code
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 15:31:03 +09:00
Kuninori Morimoto 22de4e1fe4 ARM: mach-shmobile: ap4evb: FSI clock use proper process for ak4642
Current AP4 FSI didn't use set_rate for ak4642,
and used dummy rate when init.
And FSI driver was modified to always call set_rate.

The user which are using FSI set_rate is only AP4 now.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 15:31:00 +09:00
Kuninori Morimoto d4bc99b977 ARM: mach-shmobile: ap4evb: FSI clock use proper process for HDMI
Current AP4 FSI set_rate function used bogus clock process
which didn't care enable/disable and clk->usecound.
To solve this issue, this patch also modify FSI driver to call
set_rate with enough options.
This patch modify it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 15:29:56 +09:00
Kuninori Morimoto e8ee13a818 ARM: mach-shmobile: clock-sh7372: remove fsidiv bogus disable
Current FSIDIV clock framework had bogus disable.
This patch remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 15:29:50 +09:00
Kuninori Morimoto aae0f73604 ARM: mach-shmobile: ag5evm: remove unused define
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 14:54:51 +09:00
Yoshii Takashi 8e67b22a13 ARM: mach-shmobile: ag5evm i2c_shmobile support.
Just add port multiplex settings to enable i2c modules.

Signed-off-by: Takashi YOSHII <takashi.yoshii.zj@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 14:54:46 +09:00
Yoshii Takashi b028f94b76 ARM: mach-shmobile: sh73a0 i2c_shmobile support.
Platform device resource/data definition for CPU, and clkdev entries

Signed-off-by: Takashi YOSHII <takashi.yoshii.zj@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 14:54:40 +09:00
Yoshii Takashi 2d22d48660 ARM: mach-shmobile: ag5evm: scan keyboard support
This consists of platform device resources/data for the board, and
simple clvdev entry for MSTP bit for keysc module.

This support only 49 of 80 key-switches on the board.

Signed-off-by: Takashi YOSHII <takashi.yoshii.zj@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 14:54:34 +09:00
Paul Mundt fe040be2fd Merge branch 'common/fbdev-mipi' of master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6 2010-11-19 17:04:25 +09:00
Magnus Damm 5958d58a0e ARM: mach-shmobile: Extend AP4EVB MIPI-DSI resources
Update the AP4EVB board code to go from a single I/O
resource to two I/O resources for the MIPI-DSI driver.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-19 17:02:43 +09:00
Takashi YOSHII 3256c78988 ARM: mach-shmobile: ag5evm: use gpio.
Ag5evm board now uses gpio api to initialize pins and peripherals.

Signed-off-by: Takashi YOSHII <takashi.yoshii.zj@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-19 16:49:38 +09:00
Takashi YOSHII 1cdf370244 ARM: mach-shmobile: Add sh73a0 pinmux support
PFC definitions for sh73a0 to support GPIO and pinmux handling.

Signed-off-by: Takashi YOSHII <takashi.yoshii.zj@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-19 16:47:16 +09:00
Paul Mundt 45bbaae0dc ARM: mach-shmobile: Split out entry-macros in to GIC and INTC variants.
Presently the entry macros are all globbed together, this simply splits
them out in to their insular variants. Future work such as the GIC
generalization will replace some of these and tidy the abstraction up
further.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-18 16:07:27 +09:00
Magnus Damm 6d9598e24d ARM: mach-shmobile: Initial AG5 and AG5EVM support
This patch adds initial support for Renesas SH-Mobile AG5.

At this point the AG5 CPU support is limited to the ARM
core, SCIF serial and a CMT timer together with L2 cache
and the GIC. The AG5EVM board also supports Ethernet.

Future patches will add support for GPIO, INTCS, CPGA
and platform data / driver updates for devices such as
IIC, LCDC, FSI, KEYSC, CEU and SDHI among others.

The code in entry-macro.S will be cleaned up when the
ARM IRQ demux code improvements have been merged.

Depends on the AG5EVM mach-type recently registered but
not yet present in arch/arm/tools/mach-types.

As the AG5EVM board comes with 512MiB memory it is
recommended to turn on HIGHMEM.

Many thanks to Yoshii-san for initial bring up.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-18 15:45:21 +09:00
Magnus Damm 4d048435e9 ARM: mach-shmobile: sh7372 USB0/IIC1 MSTP fix
Fix a MSTP assignment problem in the sh7372 clock
framework code. The USB drivers should attach to
MSTP322 not MSTP33 where IIC1 is located.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-18 14:58:07 +09:00
Paul Mundt 6d72ad35f1 ARM: mach-shmobile: Tidy up the Kconfig bits.
Presently each one of the CPUs manually selects the same feature set, and
there's a reasonable expectation that none of these will change for
future CPUs in the SH-Mobile / R-Mobile family, so we move those over to
the top-level ARCH_SHMOBILE.

While we're at it, all of the CPUs support optional GPIOs via the PFC,
do not have I/O ports, and expect sparse IRQ, so we bring the
configuration in line across the board.

This more or less brings the ARM-based parts in sync with their SH
counterparts.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-16 16:10:20 +09:00
Paul Mundt 849653372d Merge branch 'common/clkfwk' into sh-fixes-for-linus 2010-11-16 10:11:20 +09:00
Paul Mundt 35a96c739f sh: clkfwk: Kill off now unused algo_id in set_rate op.
Now that clk_set_rate_ex() is gone, there is also no way to get at rate
setting algo id, which is now also completely unused. Kill it off before
new clock ops start using it.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-15 18:25:17 +09:00
Kuninori Morimoto 574490e30a ARM: mach-shmobile: ap4evb: add fsib 44100Hz rate
Tested-by: Tony SIM <chinyeow.sim.xt@renesas.com>
Tested-by: TAKEI Mitsuharu <takei.andr@gmail.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-15 14:46:38 +09:00
Guennadi Liakhovetski 640dcfa0ff ARM: mach-shmobile: optimize PLLC2 frequency for HDMI
On ap4evb PLLC2 is only used as a parent of the HDMI clock, therefore it can
be reconfigured freely to improve HDMI clock precision.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-10 17:59:43 +09:00
Yusuke Goda 2e351ec61c ARM: mach-shmobile: ap4evb: Mark NOR boot loader partitions read-only.
This makes the loader and bootenv partitions read-only under MTD for the
on-board NOR flash.

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-08 14:55:11 +09:00
Tony SIM 3f25cb042c ARM: mach-shmobile: intc-sh7372: fix interrupt number
Signed-off-by: Tony SIM <chinyeow.sim.xt@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-08 13:48:50 +09:00
Paul Mundt cad3cde3f6 ARM: mach-shmobile: Allow GPIO chips to register IRQ mappings.
As non-PFC chips are added that may support IRQs, pass through to the
generic helper. This follows the the SH change.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-04 12:19:11 +09:00
Guennadi Liakhovetski 5c4e0f198d ARM: mach-shmobile: fix sh7372 after a recent clock framework rework
The updated sh clock framework has introduced a .nr_freqs element of struct
clk, which has to be initialised with the number of possible frequencies.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-02 11:52:37 -04:00
Paul Mundt be8cb585d2 ARM: mach-shmobile: include drivers/sh/Kconfig
Many of the config bit are presently duplicated between the platforms,
which will gradually cleaned up through centralization. For the moment we
expose some new INTC features through drivers/sh/Kconfig that the ARM
platforms presently don't enable, so make it generally available.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-01 11:38:06 -04:00
Kuninori Morimoto 2669efec08 ARM: mach-shmobile: ap4evb: Add HDMI sound support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-31 10:43:14 -04:00
Kuninori Morimoto f2ace4a5d7 ARM: mach-shmobile: clock-sh7372: Add FSIDIV clock support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-31 10:40:45 -04:00
Linus Torvalds 706d4b12f8 Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (215 commits)
  ARM: memblock: setup lowmem mappings using memblock
  ARM: memblock: move meminfo into find_limits directly
  ARM: memblock: convert free_highpages() to use memblock
  ARM: move freeing of highmem pages out of mem_init()
  ARM: memblock: convert memory detail printing to use memblock
  ARM: memblock: use memblock to free memory into arm_bootmem_init()
  ARM: memblock: use memblock when initializing memory allocators
  ARM: ensure membank array is always sorted
  ARM: 6466/1: implement flush_icache_all for the rest of the CPUs
  ARM: 6464/2: fix spinlock recursion in adjust_pte()
  ARM: fix memblock breakage
  ARM: 6465/1: Fix data abort accessing proc_info from __lookup_processor_type
  ARM: 6460/1: ixp2000: fix type of ixp2000_timer_interrupt
  ARM: 6449/1: Fix for compiler warning of uninitialized variable.
  ARM: 6445/1: fixup TCM memory types
  ARM: imx: Add wake functionality to GPIO
  ARM: mx5: Add gpio-keys to mx51 babbage board
  ARM: imx: Add gpio-keys to plat-mxc
  mx31_3ds: Fix spi registration
  mx31_3ds: Fix the logic for detecting the debug board
  ...
2010-10-30 08:26:25 -07:00
Arnd Hannemann 68accd7370 ARM: mach-shmobile: ap4evb: Fix hotplug for SDHI1
On AP4EVB the card detect pin of the top SD/MMC slot is not directly
connected to the tmio/mmcif controller but to a GPIO pin, so polling
needs to be done for SDHI1 and MMCIF in order to support hotplug for
that slot. SHDI1 and MMCIF share that slot, and the used controller
is selected by a DIP switch.
This patch adds a helper function to check if a card is present in that
particular slot, registers this function with SDHI1 and MMCIF and enables
polling for SDHI1.

Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-10-29 00:29:14 +02:00
Russell King b3773301c4 Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/genesis-2.6 into devel-stable
Conflicts:
	drivers/video/sh_mobile_hdmi.c
2010-10-28 20:14:38 +01:00
Guennadi Liakhovetski 1a0b1eac50 ARM: arch-shmobile: Add IMX074 camera sensor data to the AP4EVB platform
Add platform data, necessary to use Sony IMX074 camera sensor with AP4EVB.
Note: this does not work reliably without an API to reserve contiguous and
coherent memory for V4L DMA buffers. Such memory reservation has to be added as
soon as a suitable API becomes available.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-25 10:46:05 +09:00
TAKEI Mitsuharu 88c759a2c8 ARM: mach-shmobile: ap4evb: modify LCDC1 irq number
Signed-off-by: TAKEI Mitsuharu <takei.andr@gmail.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-25 10:46:01 +09:00
Nicolas Pitre 6451d7783b arm: remove machine_desc.io_pg_offst and .phys_io
Since we're now using addruart to establish the debug mapping, we can
remove the io_pg_offst and phys_io members of struct machine_desc.

The various declarations were removed using the following script:

  grep -rl MACHINE_START arch/arm | xargs \
  sed -i '/MACHINE_START/,/MACHINE_END/ { /\.\(phys_io\|io_pg_offst\)/d }'

[ Initial patch was from Jeremy Kerr, example script from Russell King ]

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: Eric Miao <eric.miao at canonical.com>
2010-10-20 00:27:46 -04:00
Magnus Damm c6c049ecbc ARM: mach-shmobile: add TMU platform data for sh7372
This patch adds support for the two first channels of
the TMU0 timer block on sh7372. One channel is used
for clock event, the other for clock source.

Signed-off-by: Magnus Damm <damm@opensource.se>
Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-15 20:16:45 +09:00
Guennadi Liakhovetski 402f33154e ARM: mach-shmobile: remove videomodes from ap4evb platform data
Now that HDMI videomodes have become optional, they can be safely removed from
ap4evb platform data, since anyway 720p seems to be the best supported mode.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-15 19:00:56 +09:00
Kuninori Morimoto 69ce8aa492 ARM: mach-shmobile: clock-sh7372: FSI parent select support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-15 18:58:41 +09:00
Kuninori Morimoto 685e4080c6 ARM: mach-shmobile: clock-sh7372: add sh7372_ prefix to global clocks
This patch also registered global extal clocks to sh7372.h

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-15 18:58:40 +09:00
Magnus Damm 90e09a5911 ARM: shmobile: use device name for timer clocks
Move SH-Mobile ARM systems over from the legacy
"clk" member of struct sh_timer_config to using
the device name and clkdev for clock matching.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-13 18:47:04 +09:00
Magnus Damm 0fb0834b36 ARM: shmobile: make AP4EVB MMCIF resource string consistent
Just use MMCIF as name to match the sh7372 data sheet.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-13 18:43:56 +09:00
Magnus Damm 934e40781a ARM: shmobile: break out sh7372 platform devices
This patch introduces sh7372_late_devices which
should include all regular processor specific
platform devices.

Early platform devices for console and timers
should be put on the sh7372_early_devices list,
all other devices should be on sh7372_late_devices.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-13 18:43:56 +09:00
Nicolas Kaiser 532daaa110 arm/shmobile: remove duplicated include
Remove duplicated include.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-06 20:24:21 +09:00
Kuninori Morimoto 5d8e3451d1 ARM: mach-shmobile: modify wrong array size of div6_reparent_clks
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-09-16 17:22:01 +09:00
Kuninori Morimoto 52d5ac0073 ARM: mach-shmobile: ap4evb: modify touchpanel judgment condition
Current touchpanel had below 2 issues

- LCDD2 pin which is needed for WVGA was changed to
  IRQ28_123 pin on ts_get_pendown_state

- GPIO pull up on ts_init was disabled by gpio_request
  on ts_get_pendown_state.
  This mean the return value from gpio_get_value is untrusted.

This patch solve these issues

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-09-14 17:28:55 +09:00
Guennadi Liakhovetski a91a2d06c9 ARM: mach-shmobile: add two more video modes for HDMI
Add video modes for 480p and SXGA (1280x1024).

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-09-14 17:23:45 +09:00
Guennadi Liakhovetski 44432407d9 fbdev: sh_mobile_lcdcfb: Support multiple video modes in platform data
This is a preparation for HDMI hotplug support. This patch just moves all
platform defined video modes for the sh_mobile_lcdcfb driver to separate
arrays and switches all users to use element 0 of that array, so, this patch
doesn't introduce any functional changes and as such should not cause any
regressions.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-09-14 17:22:38 +09:00
Kuninori Morimoto 7923ac133b ARM: mach-shmobile: sh7372: modify INTCS table
Add ignored device name by comment-out in INTCS.
And MSIOF which has been forgotten is added

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-09-14 17:20:20 +09:00
Kuninori Morimoto 53b29b4c36 ARM: mach-shmobile: pfc-sh7372: modify wrong comment
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-09-14 17:20:13 +09:00
Magnus Damm f989ae5b01 ARM: mach-shmobile: Use evt2irq() for sh7372 DMAC
Use evt2irq() for DMAC resources on sh7372.

This makes the code easier to read and also
allows adjusting the INTC base offset without
breaking platform data.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-09-14 17:20:06 +09:00
Magnus Damm dd8a61a739 ARM: mach-shmobile: Extend AP4EVB LCD comments
Extend dip switch comments for QHD and WVGA LCD panels
on AP4EVB. Similar to the Ecovec comments.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-09-14 17:19:59 +09:00
Kuninori Morimoto ef7315084e ARM: mach-shmobile: ap4evb: modify tsc2007 platform settings
This patch modify x_plate_ohms to correct value for tsc2007,
and removed un-necessary ts_get_pendown_state().
gpio_pull_up() was removed also.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-09-14 17:18:50 +09:00
Arnd Hannemann 410d878bd0 ARM: mach-shmobile: ap4evb: fix write protect for SDHI1
SDHI1 on AP4EVB has no pin to detect write protection of a card.
This had the result that a card inserted in this slot was always detected
as read only. This patch adds the corresponding flag to disable
write protection detection for SDHI1.

Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-08-20 20:41:23 +09:00
Kuninori Morimoto 9f6f11b65e ARM: mach-shmobile: ap4evb: modify FSI2 ID
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-08-18 16:31:26 +09:00