Commit Graph

26916 Commits

Author SHA1 Message Date
Olof Johansson ea36b02269 Merge branch 'clps711x/soc' into next/soc
From Alexander Shiyan, this is a series of cleanups of clps711x, movig it
closer to multiplatform and cleans up a bunch of old code.

* clps711x/soc:
  ARM: clps711x: Update defconfig
  ARM: clps711x: Add support for SYSCON driver
  ARM: clps711x: edb7211: Control LCD backlight via PWM
  ARM: clps711x: edb7211: Add support for I2C
  ARM: clps711x: Optimize interrupt handling
  ARM: clps711x: Add clocksource framework
  ARM: clps711x: Replace "arch_initcall" in common code with ".init_early"
  ARM: clps711x: Move specific definitions from hardware.h to boards files
  ARM: clps711x: p720t: Define PLD registers as GPIOs
  ARM: clps711x: autcpu12: Move remaining specific definitions to board file
  ARM: clps711x: autcpu12: Special driver for handling memory is removed
  ARM: clps711x: autcpu12: Add support for NOR flash
  ARM: clps711x: autcpu12: Move LCD DPOT definitions to board file
  ARM: clps711x: Set PLL clock to zero if we work from 13 mHz source
  ARM: clps711x: Remove NEED_MACH_MEMORY_H dependency
  ARM: clps711x: Re-add GPIO support
  GPIO: clps711x: Add DT support
  GPIO: clps711x: Rewrite driver for using generic GPIO code
  + Linux 3.10-rc4

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-11 15:57:51 -07:00
Alexander Shiyan 70423a379d ARM: clps711x: Update defconfig
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-11 15:47:48 -07:00
Alexander Shiyan 6597619f9c ARM: clps711x: Add support for SYSCON driver
This patch adds support for SYSCON driver for CLPS711X targets.
At this time there are no users for this driver, but it is will
be used as start point to use in CLPS711X drivers and remove
<mach/xx> dependencies.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-11 15:47:45 -07:00
Alexander Shiyan e337d724e8 ARM: clps711x: edb7211: Control LCD backlight via PWM
This patch provide control LCD backlight via PWM. GPIO is used
only for switch backlight ON and OFF.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-11 15:47:43 -07:00
Alexander Shiyan 362168f86e ARM: clps711x: edb7211: Add support for I2C
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-11 15:47:40 -07:00
Alexander Shiyan 7dfbf1b68e ARM: clps711x: Optimize interrupt handling
This patch modify interrupt handler for processing all penging interrupts
at once.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-11 15:47:38 -07:00
Alexander Shiyan c99f72addb ARM: clps711x: Add clocksource framework
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-11 15:47:35 -07:00
Alexander Shiyan d0ad52a6fa ARM: clps711x: Replace "arch_initcall" in common code with ".init_early"
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-11 15:47:33 -07:00
Alexander Shiyan 7e4615cd1f ARM: clps711x: Move specific definitions from hardware.h to boards files
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-11 15:47:30 -07:00
Alexander Shiyan 6d640edeb5 ARM: clps711x: p720t: Define PLD registers as GPIOs
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-11 15:47:28 -07:00
Alexander Shiyan be95f7aaac ARM: clps711x: autcpu12: Move remaining specific definitions to board file
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-11 15:47:26 -07:00
Alexander Shiyan d29268ceb8 ARM: clps711x: autcpu12: Special driver for handling memory is removed
This patch provide migration to using "mtd-ram" driver instead of using
special driver for handling NVRAM memory.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-11 15:47:23 -07:00
Alexander Shiyan 3f0bcaa5e9 ARM: clps711x: autcpu12: Add support for NOR flash
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-11 15:47:21 -07:00
Alexander Shiyan ba18ec214e ARM: clps711x: autcpu12: Move LCD DPOT definitions to board file
We do not have driver for Up/Down digital potentiometer (DPOT), so
just define pins as GPIOs and export these pins to user.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-11 15:47:19 -07:00
Alexander Shiyan 2a6f061415 ARM: clps711x: Set PLL clock to zero if we work from 13 mHz source
This clock will be used in audio subsystem. Since audio cannot work
without PLL we should indicate this.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-11 15:47:15 -07:00
Alexander Shiyan 5c15bd28ff ARM: clps711x: Remove NEED_MACH_MEMORY_H dependency
This patch removes dependency of NEED_MACH_MEMORY_H for CLPS711X-target.
Since some board may have memory holes, define ARCH_HAS_HOLES_MEMORYMODEL
for these boards.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-11 15:47:11 -07:00
Alexander Shiyan e328b88094 ARM: clps711x: Re-add GPIO support
arch_initcall was been removed from GPIO driver, so this patch
re-add support for GPIO into boards as platform_device.
Since some drivers (spi, nand, etc.) is not support deferred probe,
separate machine init calls is used in board code to make proper
loading sequence.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-11 15:44:57 -07:00
Olof Johansson b67172ec00 Renesas ARM-based SoC updates for v3.11
* Increased clock coverage for r8a7740, r8a73a4, r8a7778 and r8a7790
 * Use fixed clock ratio for r8a7778
 * Always use shmobile_setup_delay for sh73a0
 * Add add CPUFreq support for sh73a0
 * Check kick bit before changing rate on sh73a0
 * Do not overwrite all div4 clock operations on sh73a0
 
 * Cleanup SH_FIXED_RATIO_CLK and SH_FIXED_RATIO_CLK macros
 * sh73a0: Use DEFINE_RES_MEM*() everywhere
 * r8a7740: Make private clock arrays static
 * r8a7778: Correct model number
 
 The last four changes listed above are cleanups. I have included them
 in this series as all bar the last one are dependencies of non-cleanup
 patches.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRsY+RAAoJENfPZGlqN0++q3cP/0UR42WWj+pm6a7N7JDiby+b
 +Dv1qxQB4zN+1eBFfLoNUNponGbKLPXP7ULHkN0BX0j5xLYhVpZJeCdAdMvHnKG7
 rvDLfjE0eBWyxxnaKIx/UyOmE6TTWn/TRbj726qpQWv4CFNEtEx+WdRymMSikSPK
 HeaXuhpm98kwqYpCH8yVu2VYgYMgv8fJxhd/N2ppsN65KKoTq5EITZ9K7+sqlueX
 uwG45uquBM3K+UGfr/7KMhEY/IvWHrCqq2MpgRrcJAy6ROK39oNDtG/YfI8II/dK
 T8IOCpHKbDvsvU/XGY3E0e2H1FRZCqzfI0dYp9Q/iSd9HSfOR3CwoMlZCC6zRBq2
 dzHRqsklurbYjCSOQlHRxGNISBaSnaf6Fy8Ok720Zh7xDPinZeQrfxGccYA8eQaW
 +Z7k3k6M5RaipRln5Hj4XiWc+Vk5ieJ1/clvSNpq+mmIxwGLJOdsqwhBktnGwsgs
 3hxlzH6owR6JgP5iDZYcTdngRqhPb8AZeQduA0I3Lwf/1eyBKYH6ryPaKVutH89Q
 PKJnxKETbEDN7eueblV5EhBeFHewTRn5U6wnOkD2ompuGUQCs1T2djF4F0IFy5WD
 KZBaTkaKORaUq5woRzc12RYnLkRVlyQ1W+1u3e7NpZSG0ZlSufgW2m4pnfSpBJ6h
 y+IBsNzw4ZHkNbwtj5ai
 =9UCz
 -----END PGP SIGNATURE-----

Merge tag 'renesas-soc-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc

From Simon Horman:
Renesas ARM-based SoC updates for v3.11

* Increased clock coverage for r8a7740, r8a73a4, r8a7778 and r8a7790
* Use fixed clock ratio for r8a7778
* Always use shmobile_setup_delay for sh73a0
* Add add CPUFreq support for sh73a0
* Check kick bit before changing rate on sh73a0
* Do not overwrite all div4 clock operations on sh73a0

* Cleanup SH_FIXED_RATIO_CLK and SH_FIXED_RATIO_CLK macros
* sh73a0: Use DEFINE_RES_MEM*() everywhere
* r8a7740: Make private clock arrays static
* r8a7778: Correct model number

The last four changes listed above are cleanups. I have included them
in this series as all bar the last one are dependencies of non-cleanup
patches.

* tag 'renesas-soc-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (27 commits)
  ARM: shmobile: sh73a0: div4 clocks must check the kick bit before changing rate
  ARM: shmobile: sh73a0: do not overwrite all div4 clock operations
  ARM: shmobile: sh73a0: Always use shmobile_setup_delay()
  ARM: shmobile: sh73a0: add CPUFreq support
  ARM: shmobile: sh73a0: add support for adjusting CPU frequency
  ARM: shmobile: r8a7790: add TPU PWM support
  ARM: shmobile: r8a7790: Make private clock arrays static
  ARM: shmobile: r8a7790: add div6 clocks
  ARM: shmobile: r8a7790: add div4 clocks
  ARM: shmobile: r8a7790: add main clock
  ARM: shmobile: r8a7778: Register SDHI device
  ARM: shmobile: r8a7778: add SDHI clock support
  ARM: shmobile: r8a7778: use fixed ratio clock
  ARM: shmobile: r8a7779: Add PCIe clocks
  ARM: shmobile: r8a73a4: add div6 clocks
  ARM: shmobile: r8a73a4: add div4 clocks
  ARM: shmobile: r8a73a4: add pll clocks
  ARM: shmobile: r8a73a4: add main clock
  ARM: shmobile: r8a7740: add TPU PWM support
  ARM: shmobile: r8a7740: Add I2C DT clock names
  ...

Conflicts:
	arch/arm/mach-shmobile/Kconfig
	arch/arm/mach-shmobile/include/mach/r8a7778.h
	arch/arm/mach-shmobile/setup-r8a7778.c
2013-06-11 00:31:14 -07:00
Olof Johansson 620fa619a9 Renesas ARM based SoC pinmux and GPIO update for v3.11
SH-PFC:
 * Entries for INTC external IRQs
 * Remove dependency on GPIOLIB
 * PFC support for r8a7790 SoC
 * Pinmux support for r8a7778 SoC
 * Increase pin group and function coverage for sh7372, r8a7740,
   r8a7778, r8a7779 and r8a7790 SoCs
 * Use pinctrl mapping on mackerel, ap4evb, armadillo800eva,
   bonito, bockw, lager boards
 * Use RCAR_GP_PIN macro in marzen board
 * Remove unused GPIOs for sh7372, sh73a0, r8a7740 and r8a7790 SoCs
 * Add bias (pull-up/down) pinconf support for r8a7740 SoC
 * Add VCCQ support for sh73a0
 
 GPIO car:
 * Add RCAR_GP_PIN macro
 * Add support for IRQ_TYPE_EDGE_BOTH
 * Make the platform data gpio_base field signed
 
 The GPIO changes have been included as the RCAR_GP_PIN and
 IRQ_TYPE_EDGE_BOTH changes are depended on by SH-PFC changes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRrvTrAAoJENfPZGlqN0++OGkP/0ZqhzLRSqojR4YgoWlsL2UE
 lKS41m8/eW2mPbyW2U+rpSWzPghJic9b9AgyKZXcpV5kzp2GQLzyLqRT3gqOoDP/
 /4mxstqoCpvHq0+UsGSlv2yk9zMzYjL7dDbGslPhVXZD5SmGN/NM0W80le37ZDEd
 UqIzg6O/dB+vZl343nXrZKvGc73HlDY9EiWhpgB6tbLiUvmbT+hATTg+ExY8cwEF
 742klazJoqN+DVF6ihx7BQwDWs/beUyqp+ii0rfzcU5yI+fWe0cyHa+v64rZFQhI
 F2rWLQu6rkDRCpcwvfu21azDKPFG8cMiV0xxgxF5bvg6STUfiAEpaCmjw1v+F30g
 S+TdoeUlXkH1x761CDJ0qo0N4SQ2ueJ8/UPMOaA4cRU9mGCSp4o+S8PlUCd1HSVH
 vKQzfxnyaqt0LPi23KAkXbAiwxwrq4ru06XvsuC9KbAdAK9n+FpnJKFZ7fv8c1uw
 8a7FDSFdVnQ6E6DKvxl33JfDMsPEpFmikw+Nr/1Jnxms9THpCMphhZVc4mUDmdQT
 BLxSXa2Y5ihiQoaHjJnrENUGRI4o4oZwVDCU5i0eUQBeqbx00UEW85iUNiVPecW1
 aKphnrhoxqQZMHRrU2MqCe2mY5SPSnbKdc2YVcTW9/yxS7Q16txmAsiDyfiVB+bd
 ZHw324BCBEvSk4NM2syW
 =zNOH
 -----END PGP SIGNATURE-----

Merge tag 'renesas-pinmux-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc

From Simon Horman:
Renesas ARM based SoC pinmux and GPIO update for v3.11

SH-PFC:
* Entries for INTC external IRQs
* Remove dependency on GPIOLIB
* PFC support for r8a7790 SoC
* Pinmux support for r8a7778 SoC
* Increase pin group and function coverage for sh7372, r8a7740,
  r8a7778, r8a7779 and r8a7790 SoCs
* Use pinctrl mapping on mackerel, ap4evb, armadillo800eva,
  bonito, bockw, lager boards
* Use RCAR_GP_PIN macro in marzen board
* Remove unused GPIOs for sh7372, sh73a0, r8a7740 and r8a7790 SoCs
* Add bias (pull-up/down) pinconf support for r8a7740 SoC
* Add VCCQ support for sh73a0

GPIO car:
* Add RCAR_GP_PIN macro
* Add support for IRQ_TYPE_EDGE_BOTH
* Make the platform data gpio_base field signed

The GPIO changes have been included as the RCAR_GP_PIN and
IRQ_TYPE_EDGE_BOTH changes are depended on by SH-PFC changes.

* tag 'renesas-pinmux-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (132 commits)
  ARM: shmobile: marzen: Use RCAR_GP_PIN macro
  ARM: shmobile: lager: Initialize pinmux
  ARM: shmobile: bockw: add pinctrl support
  ARM: shmobile: kzm9g: tidyup FSI pinctrl
  ARM: shmobile: r8a7740 pinmux platform device cleanup
  ARM: shmobile: r8a7790: Configure R-Car GPIO for IRQ_TYPE_EDGE_BOTH
  pinctrl: sh-pfc: r8a7779: Fix missing MOD_SEL2 entry
  Revert "ARM: shmobile: Disallow PINCTRL without GPIOLIB"
  pinctrl: r8a7790: add pinmux data for MMCIF and SDHI interfaces
  sh-pfc: r8a7778: add MMCIF pin groups
  sh-pfc: r8a7778: add HSPI pin groups
  sh-pfc: r8a7778: add I2C pin groups
  pinctrl: sh-pfc: fix a typo in pfc-r8a7790
  pinctrl: sh-pfc: fix r8a7790 Function Select register tables
  sh-pfc: r8a7778: fixup IRQ1A settings
  sh-pfc: r8a7779: add Ether pin groups
  sh-pfc: r8a7778: add Ether pin groups
  sh-pfc: r8a7778: add VIN pin groups
  sh-pfc: sh73a0: Remove function GPIOs
  sh-pfc: r8a7790: Add TPU pin groups and functions
  ...
2013-06-11 00:21:46 -07:00
Olof Johansson ed3d27fecc mvebu pcie driver (kirkwood) for v3.11 (round 2)
- kirkwood
     - migrate Netgear ReadyNAS Duo v2 to pcie DT init
 
 depends
  - mvebu/pcie
     - mvebu/of_pci
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQEcBAABAgAGBQJRrfATAAoJEAi3KVZQDZAea8MH/iwWWy+9EWQFzMjDD3ZvccBr
 FuNW8j5+nI3u421VNpjpTXCXlLzGZp47RvwVRX6PO84MWKF4ALcb5JhKkrBvzdt9
 76shBRPciLCT5cXibPKh8Dj7ffe/9hG+KVJkQhubEaJ2b2NUPx/o10eSI4WTvq0K
 094M2STqvQs+pgPzpg9K163sJvhxiWJiY5lF+suYEccN6sa3+p6E0QC2lmDN46VI
 hJi3YmKVcYLRrx3M2l0OadZOjI78Z5H42STbpVtrSOYI/Nn2jEkKhVv86OgwTa9A
 ZHl12mA5h1Gan87oVPS1eHVVhByFEfpHs2Ea/ekOmdMEVLQar2Suf3PeFcl97rM=
 =91cW
 -----END PGP SIGNATURE-----

Merge tag 'pcie_kw-3.11-2' of git://git.infradead.org/users/jcooper/linux into next/soc

From Jason Cooper:
mvebu pcie driver (kirkwood) for v3.11 (round 2)
 - kirkwood
    - migrate Netgear ReadyNAS Duo v2 to pcie DT init

* tag 'pcie_kw-3.11-2' of git://git.infradead.org/users/jcooper/linux:
  arm: kirkwood: NETGEAR ReadyNAS Duo v2 init PCIe via DT

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-10 22:00:59 -07:00
Olof Johansson e56c60c374 Merge tag 'zynq-clk-for-3.11' of git://git.xilinx.com/linux-xlnx into next/soc
From Michal Simek:
arm: Xilinx Zynq clock changes for v3.11

Change Xilinx Zynq DT clock description which reflects logical abstraction
of Zynq's clock tree.

- Refactor PLL driver
- Use new clock controller driver
- Change timer and uart drivers

* tag 'zynq-clk-for-3.11' of git://git.xilinx.com/linux-xlnx:
  clk: zynq: Remove deprecated clock code
  arm: zynq: Migrate platform to clock controller
  clk: zynq: Add clock controller driver
  clk: zynq: Factor out PLL driver

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-07 18:21:51 -07:00
Guennadi Liakhovetski 413bfd0e67 ARM: shmobile: sh73a0: div4 clocks must check the kick bit before changing rate
According to the datasheet, it is not allowed to change div4 clock rates
if an earlier rate change operation is still in progress, as indicated by
a set kick bit.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:52 +09:00
Guennadi Liakhovetski 3b207a45f9 ARM: shmobile: sh73a0: do not overwrite all div4 clock operations
An earlier commit "ARM: shmobile: sh73a0: add support for adjusting CPU
frequency" intended to replace some clock operations only for the Z-clock,
instead it replaced them for all div4 clocks, since all div4 clocks share
the same copy of clock operations. Fix this by using a separate clock
operations structure for Z-clock.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:52 +09:00
Magnus Damm 43cb8cb739 ARM: shmobile: sh73a0: Always use shmobile_setup_delay()
Break out the function sh73a0_init_delay() that now
gets called both for the C version of the code and
the DT -reference boards. This way we handle both
cases in the same way.

Allows us to boot with TWD only in the kernel configuration
for C board code. TWD is not yet enabled in the case of
DT -reference - this due to a dependency on CCF.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:51 +09:00
Guennadi Liakhovetski d23473828c ARM: shmobile: sh73a0: add CPUFreq support
This patch enables the use of the generic cpufreq-cpu0 driver on sh73a0.
Providing a regulator, a list of OPPs in DT, combined with a virtual
cpufreq-cpu0 platform device and a clock, attached to it is everything,
the cpufreq-cpu0 driver needs. The first sh73a0 platform, implementing
such CPUFreq support is kzm9g-reference.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:51 +09:00
Guennadi Liakhovetski 73107925f4 ARM: shmobile: sh73a0: add support for adjusting CPU frequency
On SH73A0 the output of PLL0 is supplied to two dividers, feeding clock to
the CPU core and SGX. Lower CPU frequencies allow the use of lower supply
voltages and thus reduce power consumption.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:50 +09:00
Laurent Pinchart aa9c185bbc ARM: shmobile: r8a7790: add TPU PWM support
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:50 +09:00
Laurent Pinchart 72378a4ab7 ARM: shmobile: r8a7790: Make private clock arrays static
Both clock-r8a7740.c and clock-r8a7790.c define a div4_clks array as
non-static. Compiling support for both SoCs thus result in a symbol
redefinition. Fix it by defining the arrays as static.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:49 +09:00
Kuninori Morimoto 46632512c4 ARM: shmobile: r8a7790: add div6 clocks
DIV6 clocks control SD*/MMC* core clocks.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:49 +09:00
Kuninori Morimoto 9f13ee6f83 ARM: shmobile: r8a7790: add div4 clocks
DIV4 clocks control SD* core clocks.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:49 +09:00
Kuninori Morimoto 8d100c0454 ARM: shmobile: r8a7790: add main clock
Almost all clock needs main clock which is basis clock on r8a7790.
This patch adds it, and, set its parent/ratio via MD pin.
It is based on v0.05 datasheet

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:48 +09:00
Kuninori Morimoto dab581139c ARM: shmobile: r8a7778: Register SDHI device
This patch adds SDHI register function which needs id number (= 0/1/2)

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:48 +09:00
Kuninori Morimoto 1189b1cb50 ARM: shmobile: r8a7778: add SDHI clock support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:47 +09:00
Kuninori Morimoto 08b93ec126 ARM: shmobile: r8a7778: use fixed ratio clock
R-Car M1 has many clocks, and it is possible to
read/use clock ratio of these clocks from FRQMRx.
But, these ratio are fixed value and
these are decided by MD pin status.

This patch reads MD pin status,
and used fixed ratio clock for other clocks.
It was tesed on bock-w board.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:47 +09:00
Phil Edworthy 0f704e1285 ARM: shmobile: r8a7779: Add PCIe clocks
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:46 +09:00
Kuninori Morimoto 9051e9125b ARM: shmobile: r8a73a4: add div6 clocks
DIV6 clocks control each core clocks.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:46 +09:00
Kuninori Morimoto b89edf3446 ARM: shmobile: r8a73a4: add div4 clocks
DIV4 clocks control each core clocks.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:45 +09:00
Kuninori Morimoto 0c3091ad45 ARM: shmobile: r8a73a4: add pll clocks
PLL clocks are basis clock for other clock.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:45 +09:00
Kuninori Morimoto 5e634d9863 ARM: shmobile: r8a73a4: add main clock
Almost all clock needs main clock which is basis clock on r8a73a4.
This patch adds it, and, set parent clock via CKSCR register.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:44 +09:00
Laurent Pinchart 58645fe9a8 ARM: shmobile: r8a7740: add TPU PWM support
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:44 +09:00
Bastian Hecht 8d79071eec ARM: shmobile: r8a7740: Add I2C DT clock names
Add clock association for i2c0 and i2c1 for the new DT names.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:44 +09:00
Bastian Hecht 9e0b428f07 ARM: shmobile: r8a7740: Add interim sh-eth device name to clocks list
When we use the ethernet device via DT setup, we need to add it
to a lookup list until this is properly handled later in a DT-only
fashion.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:43 +09:00
Kuninori Morimoto 734e02f888 ARM: shmobile: r8a7778: fixup Ether setup code position
Ether setup code position was scattering.
This patch fixes it up

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:43 +09:00
Kuninori Morimoto b6825a02fd ARM: shmobile: use do{ }while() on SH_CLK_SET_RATIO()
SH_CLK_SET_RATIO() will be trouble without this patch

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:42 +09:00
Kuninori Morimoto bdd5d28461 ARM: shmobile: remove ";" from SH_FIXED_RATIO_CLK*() macro
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-07 14:24:42 +09:00
Simon Horman abbec5f415 ARM: shmobile: sh73a0: Use DEFINE_RES_MEM*() everywhere
Convert code to use DEFINE_RES_MEM*() macros.
These macros were already used in this file,
this change makes their usage consistent throughout the file.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-06 16:41:53 +09:00
Sergei Shtylyov 45fa9295a0 ARM: shmobile: r8a7778: correct model name in Kconfig
The correct model name is R-Car M1A or R8A77781; R8A77780 corresponds to R-Car
M1S which is a SH based SoC.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[horms+renesas@verge.net.au: manually applied]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-06 16:41:52 +09:00
Laurent Pinchart 2482c589c3 ARM: shmobile: r8a7740: Make private clock arrays static
Both clock-r8a7740.c and clock-r8a7790.c define a div4_clks array as
non-static. Compiling support for both SoCs thus result in a symbol
redefinition. Fix it by defining the arrays as static.

To avoid further similar issues, also define the main_clks as static.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-06 14:14:00 +09:00
Laurent Pinchart 5fcf4a3c3a ARM: shmobile: marzen: Use RCAR_GP_PIN macro
Replace hardcoded pin numbers with the RCAR_GP_PIN macro to make the
code match the documentation.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-05 17:18:24 +09:00
Laurent Pinchart e3a28ac29c ARM: shmobile: lager: Initialize pinmux
Initialize r8a7790 pinmuxing and register mappings for the two debug
serial ports.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-05 17:18:24 +09:00