Commit Graph

1555 Commits

Author SHA1 Message Date
Magnus Damm
13eb604665 ARM: shmobile: Remove unused shmobile_init_time()
Remove shmobile_timer_init() since it now is unused.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:12 +09:00
Magnus Damm
c4a62a5f79 ARM: shmobile: Use clocksource_of_init() on r8a7790
Replace the call to shmobile_timer_init() with
clocksource_of_init(). This will allow us to
get rid of shmobile_timer_init().

Signed-off-by: Magnus Damm <damm@opensource.se>
[horms+renesas@verge.net.au: include linux/clocksource.h]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:12 +09:00
Magnus Damm
f611021034 ARM: shmobile: Use default ->init_time() on KZM9G DT ref
Leave ->init_time() set to NULL to use the default ARM behaviour.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:12 +09:00
Magnus Damm
3b2e2aa319 ARM: shmobile: Use default ->init_time() on Marzen DT ref
Leave ->init_time() set to NULL to use the default ARM behaviour.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:11 +09:00
Magnus Damm
364185f3ce ARM: shmobile: Use default ->init_time() on APE6EVM DT ref
Leave ->init_time() set to NULL to use the default ARM behaviour.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:11 +09:00
Magnus Damm
fb185bcb89 ARM: shmobile: Use default ->init_time() on APE6EVM
Leave ->init_time() set to NULL to use the default ARM behaviour.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:11 +09:00
Magnus Damm
70ce77f77e ARM: shmobile: Use default ->init_time() on Armadillo DT ref
Leave ->init_time() set to NULL to use the default ARM behaviour.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:11 +09:00
Magnus Damm
3bdbd1c9db ARM: shmobile: Use default ->init_time() on Bockw DT ref
Leave ->init_time() set to NULL to use the default ARM behaviour.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:11 +09:00
Magnus Damm
9808f79327 ARM: shmobile: Use default ->init_time() on Bockw
Leave ->init_time() set to NULL to use the default ARM behaviour.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:10 +09:00
Magnus Damm
67ac21f65f ARM: shmobile: Use default ->init_time() on r8a7779
Leave ->init_time() set to NULL to use the default ARM behaviour.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:10 +09:00
Magnus Damm
0765f48a21 ARM: shmobile: Use default ->init_time() on r8a7778
Leave ->init_time() set to NULL to use the default ARM behaviour.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:10 +09:00
Magnus Damm
8adacad26f ARM: shmobile: Use default ->init_time() on r8a7740
Leave ->init_time() set to NULL to use the default ARM behaviour.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:10 +09:00
Magnus Damm
58909ae593 ARM: shmobile: Use default ->init_time() on r8a73a4
Leave ->init_time() set to NULL to use the default ARM behaviour.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:10 +09:00
Kuninori Morimoto
3c7b536232 ARM: shmobile: r8a7778: cleanup registration of hspi
sh-hspi driver which doesn't need platform data at the time of
registration can be registerd on SoC.
And, registering these drivers in the SoC code can avoid
unwanted device numbering issue.
(ex. the hspi2 device number will be spi.0 if hspi2 only registered)
This patch registers it on SoC code as cleanup C code

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:09 +09:00
Kuninori Morimoto
1fd4eecd48 ARM: shmobile: r8a7778: cleanup registration of i2c
i2c-rcar driver which doesn't need platform data at the time of
registration can be registerd on SoC.
And, registering these drivers in the SoC code can avoid
unwanted device numbering issue.
(ex. the i2c3 device number will be i2c.0 if i2c3 only registered)
This patch registers it on SoC code as cleanup C code

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:09 +09:00
Kuninori Morimoto
fc55190835 ARM: shmobile: r8a7778: cleanup registration of sdhi
sdhi driver which needs platform data at the time of
registration is used from BockW only.
Now, ARM/shmobile aims to support DT,
and the C code base board support will be removed
if DT support is completed.
Current driver registration method which needs platform data
and which is not shared complicates codes.
This means legacy C code cleanup after DT supporting
will be more complicated
This patch registers it on board code as cleanup C code

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:09 +09:00
Kuninori Morimoto
044e212146 ARM: shmobile: r8a7778: cleanup registration of usb phy
usb phy driver which needs platform data at the time of
registration is used from BockW only.
Now, ARM/shmobile aims to support DT,
and the C code base board support will be removed
if DT support is completed.
Current driver registration method which needs platform data
and which is not shared complicates codes.
This means legacy C code cleanup after DT supporting
will be more complicated
This patch registers it on board code as cleanup C code

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:09 +09:00
Kuninori Morimoto
a66c974457 ARM: shmobile: r8a7778: cleanup registration of mmcif
sh_mmcif driver which needs platform data at the time of
registration is used from BockW only.
Now, ARM/shmobile aims to support DT,
and the C code base board support will be removed
if DT support is completed.
Current driver registration method which needs platform data
and which is not shared complicates codes.
This means legacy C code cleanup after DT supporting
will be more complicated
This patch registers it on board code as cleanup C code

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 18:07:09 +09:00
Simon Horman
4e0f3fcfe2 Merge branch 'dt2' into cleanup3-base
Conflicts:
	arch/arm/mach-shmobile/Makefile.boot
2013-08-06 18:06:53 +09:00
Laurent Pinchart
d687f4d199 ARM: shmobile: r8a7740: Add TPU clock entry for DT platforms
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 17:57:09 +09:00
Simon Horman
9b0b9c0151 ARM: shmobile: r8a7790: clocks for Ether support
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 17:57:01 +09:00
Simon Horman
21c7a13405 Renesas ARM based SoC fixes for v3.12
* Fix TPU clock name for r8a7740 SoC
 * Update romImage to relocate appended DTB
 * Thumb fixes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJR7N/rAAoJENfPZGlqN0++x3kP/AyNLjvA5l1i3dJgqOLKWl0h
 4r4YctfjLIMzyGQRKph7MhxmRGQqebcVLOSY1YkQzLrgl0HRE8xDb/Vs+DD61JoW
 SXRpU3dryMu8XJJQ1A8+HfGwemRgujzBdgt29siWo/K/E6X6KANQprRa245yga4H
 ntzNrGcnjT+BI39Eywsk6NQTfJE8i028qA3CC2wTegnoBtw6nExb80rNwoMds2pS
 43fhbU0CxsOm0YyiUCsP8iGbUOesYLjOvVKhgj+c5uLwEoU8oOKhT5IytMtuJIu3
 fbMOJNZT24Vkt9nkqaoZ06kcNiQaXoeeKShp/FeDe5+YQVw0ScNFCXFRldrSjhCT
 +dlYoSPGNkdV+cgl1UCRNZAQvTXUJurIA6waLALSlExEfwBNsErM7tVjs5gy/dKO
 lIY8mdeRVJB88FHhwv2f9gA00xzgZJiP9w12u2CHeFRvNa2gDd04UQRhQPo8U4qk
 TUudoIq6pASknJ75xJffklAlbU/rKqdLOeoGFxzFZ7L1sRIr6y6qxeHGWIEcF7NV
 tXrj1K/robcQNHcwqxd/qIbvXRhHebJx4gRf+K0g94Q00aaLKB3ncB6TUdwejyhe
 qe66SIP9D/Zp/DXMUelRjChc3vtGKnIZhSDRrvPnNmKe4G0sSWRvl/p/6qqBY44p
 3bUujC0uxXxdZntjEPUi
 =nXZN
 -----END PGP SIGNATURE-----

Merge tag 'renesas-fixes-for-v3.12' into soc2-base

Renesas ARM based SoC fixes for v3.12

* Fix TPU clock name for r8a7740 SoC
* Update romImage to relocate appended DTB
* Thumb fixes
2013-08-06 17:56:43 +09:00
Kuninori Morimoto
693ac41df3 ARM: shmobile: marzen: Use DT for GIC
Current Marzen is using DT booting,
and r8a7779.dtsi already has GIC settings.

So, we can remove the C version of the GIC setup code,
instead rely on GIC information provided by DT.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 11:18:40 +09:00
Kuninori Morimoto
15645581a9 ARM: shmobile: armadillo800eva: Use DT for GIC
Current Armadillo800eva is using DT booting,
and r8a7740.dtsi already has GIC settings.

So, we can remove the C version of the GIC setup code,
instead rely on GIC information provided by DT.

This patch removes r8a7740_init_irq() which has
no user any more

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 11:18:29 +09:00
Kuninori Morimoto
8c8881b506 ARM: shmobile: lager: add missing __initdata
This patch adds missing __initdata to driver data/resource
which are used from platform_device_register_xxx()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-06 09:53:56 +09:00
Olof Johansson
ca2480a9fc Second round of Renesas ARM based SoC fixes for v3.11
* Lager board: do not annotate gpio_buttons as __initdata
   - This avoids accessing uninitialised memory if keys are pressed
     after kernel initialisation completes.
   - Bug introduced in gpio-keys were enabled in v3.11-rc1
 
 * Bock-W board: fix SDHI0 PFC settings
   - Allow detection of SD card
   - Bug introduced in SDHI support was added in v3.11-rc1
 
 * shdma: fixup sh_dmae_get_partial() calculation error
   - Bug introduced in 2.6.34-rc1.
 
 * armadillo800eva board: Don't request GPIO 166 in board code
   - Allow use of touchscreen
   - Bug introduced in v3.11-rc1
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJR+GejAAoJENfPZGlqN0++NgAP/ie/7VKbb3gHzryz2biUufNQ
 3dfr13qOXJoxf2FqM6X7lSeTYJrzIavJZkMvGVv3m6bo/EQnF8PuHOXA6HgcNiRD
 EfXJDTS+1XUEf5cst+MqUeKLxmssRUKAFYGdGFjIShCtaZ3gBHDq3tM88kmK7V7e
 nnDKRoSYg5nooGLP+8C7fife/aqlxqGB1IckEDYkS678sn1Qf66b564bo5ycijjS
 xcQQMXsapfNtT97SRbXngPXUYMuwIA+zlhI7pCPA4OEgjByjtg99C/F/6+TqHH3J
 vO7cMkTILUl3YpNnE4w8RDjFfRwe2GbnbEJziaQ0J8qblazSS+C/sRAV0OTMwpj2
 /TepZSLP1oEngx2M4IPPDCHde4pLQDIdhmFwU3X/qIQlDXTj3PwbIK58D0Ap3uOW
 rwjrtk+e+HVZ3yewOxnTj7itgZuDx4ItXzkmmzPftHF26mnyj1CdZ4DZPfXzIbZf
 e/QEcgTLSUylgCTYNBpOmMMewVoHKAyaTixBa+XGQUgBP540DXFjvpMrYFsBVTQh
 10ueUIEBicAFoQFkW4PJ61vqW4f9CzTUpnKZ4fLWr3pE/q6yPZ3/vQtqhJuT2jfz
 AnfP1atxwH6wq1fknx+y2/6o0BtlJWzsyJ98nAb+K8+8MoqzF26qnr7kgXnZjFpz
 4XQZK/HAKqi5wGTXqtT/
 =B1WZ
 -----END PGP SIGNATURE-----

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

From Simon Horman:
Second round of Renesas ARM based SoC fixes for v3.11

* Lager board: do not annotate gpio_buttons as __initdata
  - This avoids accessing uninitialised memory if keys are pressed
    after kernel initialisation completes.
  - Bug introduced in gpio-keys were enabled in v3.11-rc1

* Bock-W board: fix SDHI0 PFC settings
  - Allow detection of SD card
  - Bug introduced in SDHI support was added in v3.11-rc1

* shdma: fixup sh_dmae_get_partial() calculation error
  - Bug introduced in 2.6.34-rc1.

* armadillo800eva board: Don't request GPIO 166 in board code
  - Allow use of touchscreen
  - Bug introduced in v3.11-rc1

* tag 'renesas-fixes2-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: lager: do not annotate gpio_buttons as __initdata
  ARM: shmobile: BOCK-W: fix SDHI0 PFC settings
  shdma: fixup sh_dmae_get_partial() calculation error
  ARM: shmobile: armadillo800eva: Don't request GPIO 166 in board code

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-08-04 13:37:49 -07:00
Olof Johansson
6a33fc8cac mvebu fixes-non-critical for v3.12
- dove
     - fix section mismatch (all callers are already _init, so it's just a space
       issue)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.20 (GNU/Linux)
 
 iQEcBAABAgAGBQJR8WKEAAoJEAi3KVZQDZAee5EH+wfCyJExLJIEl4WvqOAL/Nme
 w5WGU4NONKb4nP8OTzuN0iR1+IHU6M3kiunn44iW5DzL7Eh6xP/EtW/f43SpjXTN
 slIeEfgLSsZkLt4lTlDjja/K4cB61LbZ/T/SyeY4VnoIHAUr/Z0hR4OyuDqWRIai
 wMZ6X54oNz+EKXG2mXxDBysPmxywoZU8dLQfOgjYgunSk2g8D5EU03fhfLZwHRQt
 cn5EEmNpjalDD4j2X04hyI5iZcH1OguaElYj5YuyYqf+8prTuNNoJ7g2eaW2Fy61
 bHgx0N38rY0mhmTgVVSS6y7n0zlSlC2nl0BrjDKBAs9ekYq2NAXO9AohveOuYj0=
 =kbQG
 -----END PGP SIGNATURE-----

Merge tag 'fixes-non-3.12' of git://git.infradead.org/linux-mvebu into next/fixes-non-critical

From Jason Cooper:
mvebu fixes-non-critical for v3.12

 - dove
    - fix section mismatch (all callers are already _init, so it's just a space
      issue)

* tag 'fixes-non-3.12' of git://git.infradead.org/linux-mvebu:
  ARM: dove: fix missing __init section of dove_mpp_gpio_mode
  + Linux 3.11-rc2

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-08-04 13:19:05 -07:00
Olof Johansson
1cb3fd0982 renesas-cleanup-for-v3.12 Renesas ARM based SoC cleanups for v3.12
* remove mach/dma.h, it is not used
 * r8a7778 SoC: Removed unused r8a7778_init_irq
 * emev2 SoC: Use less verbose resource declarations
 * emev2 SoC: Correct typo in comment
 * r8a7790 SoC: Remove redundant init_machine callback
 * emev2, r8a7740, r8a7778, r8a7779, sh7372 and sh73a0 SoCs: Remove auxdata
 * emev2, r8a73a4, ape6evm, r8a7790 and sh73a0 SoCs, and
   lager and kzm9g boards: remove init_irq declaration in machine description
 * sh73a0 SoC: pinmux platform device cleanup
 * r8a7778 SoC: add __initdata on resource and device data
 * armadillo800eva board: Remove unused commend and define
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJR5yaYAAoJENfPZGlqN0++jX8P/jxQpzHR+WfDs4PaASW8lwo/
 SAcf9hSVuI0hLWQAHFMAgyjQGREGhWRTiwG3hFwfx5Pi2W8HmdhEcuXwP4suaGph
 sKVLgJEUTJ9JezrY842id2eeUYecy0yNooLU/87N4VXRTv74cBY/sbZ3EE4d1von
 Sl6JLUGkzcy8/ssnypdmgeADTJPlg4HH7ApscI4ZG4PhqUTqAkzTteUOnKsNBmQb
 AEk/L7QEB/t/G/P43zz1MiIWGOY3XCR6yuAxJ93X8tyong/dtQDbXXP4kG8GJf+5
 qpnR/UsWLdXR3pwyfmze7lFmMNWcroO2mmcGDKfJN577w8dRkgHZFZ5PCYWbqq/Y
 y7U8e8WHo1wR+aDm8fz7+vPYnkCrLfPj6KSEs79r8zkHtXlo0Go/GkLJ9kfGH77f
 /oCRbRQ8HdsJ+NGCVBhbhLpViqJ0Peh8Rx1mrDP/v9nFX820PB/wHeukHqTByoqF
 J2kdnoI3xVM3xaoVKsvza2ThSTF2iWoNWv++P1mSmWuIHKbmANYvPcGTfncah43L
 HhYm3A02dn2y71x87sO9Esq4GKNW4ArlFM/bp1J4nnwzJ0WkrG3cp3RP2t52SDMi
 lR6IS2qaPW7o7NzzsmsO5hbDc+/ZTMITWlfVt5s6gCxMoxGNWl11G15/Y7oGY3gl
 qQITlIUxUVt5m5/z23Zl
 =2Iva
 -----END PGP SIGNATURE-----

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

From Simon Horman:
renesas-cleanup-for-v3.12 Renesas ARM based SoC cleanups for v3.12

* remove mach/dma.h, it is not used
* r8a7778 SoC: Removed unused r8a7778_init_irq
* emev2 SoC: Use less verbose resource declarations
* emev2 SoC: Correct typo in comment
* r8a7790 SoC: Remove redundant init_machine callback
* emev2, r8a7740, r8a7778, r8a7779, sh7372 and sh73a0 SoCs: Remove auxdata
* emev2, r8a73a4, ape6evm, r8a7790 and sh73a0 SoCs, and
  lager and kzm9g boards: remove init_irq declaration in machine description
* sh73a0 SoC: pinmux platform device cleanup
* r8a7778 SoC: add __initdata on resource and device data
* armadillo800eva board: Remove unused commend and define

* tag 'renesas-cleanup-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (22 commits)
  ARM: shmobile: Remove unused mach/dma.h
  ARM: shmobile: r8a7778: remove r8a7778_init_irq()
  ARM: shmobile: Fix EMEV2 clock comment typo
  ARM: shmobile: Make EMEV2 platform devices more compact
  ARM: shmobile: Remove unused EMEV2/KZM9D early console
  ARM: shmobile: Remove redundant r8a7790 callback
  ARM: shmobile: Remove unused sh73a0 auxdata table
  ARM: shmobile: Remove unused sh7372 auxdata table
  ARM: shmobile: Remove unused r8a7779 auxdata table
  ARM: shmobile: Remove unused r8a7778 auxdata and callback
  ARM: shmobile: Remove unused r8a7740 auxdata table
  ARM: shmobile: Remove unused EMEV2 auxdata and callback
  ARM: shmobile: kzm9g: Remove init_irq declaration in machine description
  ARM: shmobile: sh73a0: Remove init_irq declaration in machine description
  ARM: shmobile: lager: Remove init_irq declaration in machine description
  ARM: shmobile: r8a7790: Remove init_irq declaration in machine description
  ARM: shmobile: ape6evm: Remove init_irq declaration in machine description
  ARM: shmobile: r8a73a4: Remove init_irq declaration in machine description
  ARM: shmobile: emev2: Remove init_irq declaration in machine description
  ARM: shmobile: sh73a0 pinmux platform device cleanup
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-08-04 12:00:31 -07:00
Guennadi Liakhovetski
23f1751c5f ARM: shmobile: ape6evm: add "__initconst" annotations where needed
This patch adds __initconst markers to the platform data and resources,
used on ape6evm as parameters to platform_device_register_resndata().
The data is duplicated inside that function, therefore original data
can be discarded after initialisation is completed.

Reported-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-08-01 19:04:41 +09:00
Simon Horman
a601469386 ARM: shmobile: lager: do not annotate gpio_buttons as __initdata
When the gpio-keys device is registered using
platform_device_register_data() the platform data argument,
lager_keys_pdata is duplicated and thus should be marked as __initdata
to avoid wasting memory. However, this is not true of gpio_buttons,
a reference to it rather than its value is duplicated when lager_keys_pdata
is duplicated.

This avoids accessing freed memory if gpio-key events occur
after unused kernel memory is freed late in the kernel's boot.

This but was added when support for gpio-keys was added to lager
in c3842e4fcb
("ARM: shmobile: lager: support GPIO switches") which was included
in v3.11-rc1.

Tested-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-31 10:11:17 +09:00
Sergei Shtylyov
fa3e0cee12 ARM: shmobile: BOCK-W: fix SDHI0 PFC settings
The following message is printed on the BOCK-W kernel bootup:

sh-pfc pfc-r8a7778: invalid group "sdhi0" for function "sdhi0"

In addition, SD card cannot be detected.  The reason is apparently that commit
ca7bb30948 (ARM: shmobile: bockw: add SDHI0 support) matched
the previous version of commit 564617d2f9 (sh-pfc: r8a7778:
add SDHI support).

Add the missing pin groups according to the BOCK-W board schematics.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-31 10:11:17 +09:00
Simon Horman
afad20105a ARM: shmobile: r8a7779: Rely on DT for SMP CPU info
Remove r8a7779 specific ->smp_init_cpus() callback and
instead of relying on shmobile_smp_init_cpus() simply
use DT for CPU core information.

Based on work for the sh73a0 by Magnus Damm.

Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-30 13:28:07 +09:00
Magnus Damm
7ebbb4ae6f ARM: shmobile: marzen: Switch to DT_MACHINE_START
Convert the marzen board to use DT_MACHINE_START. With this in
place all mach-shmobile boards use DT_MACHINE_START. Also, this
makes it possible for the r8a7779 SMP code to use DT for CPUs.

Signed-off-by: Magnus Damm <damm@opensource.se>
[horms+renesas@verge.net.au: Select USE_OF in Kconfig]
[horms+renesas@verge.net.au: Provide dt_compat in DT_MACHINE_START]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-30 13:28:01 +09:00
Kuninori Morimoto
fee529df76 ARM: shmobile: r8a7779: cleanup registration of usb phy
usb phy driver which needs platform data at the time of
registration is used from Marzen only.
Now, ARM/shmobile aims to support DT,
and the C code base board support will be removed
if DT support is completed.
Current driver registration method which needs platform data
and which is not shared complicates codes.
This means legacy C code cleanup after DT supporting
will be more complicated
This patch registers it on board code as cleanup C code

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-30 11:41:11 +09:00
Guennadi Liakhovetski
59b2bc34aa ARM: shmobile: ape6evm-reference: switch PFC to DT
PFC pinctrl configuration can now be performed via DT. Update
ape6evm-reference to use this.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-30 11:21:41 +09:00
Magnus Damm
5489cde560 ARM: shmobile: sh73a0: Rely on DT for SMP CPU info
Remove sh73a0 specific ->smp_init_cpus() callback and
instead of relying on shmobile_smp_init_cpus() simply
use DT for CPU core information.

This assumes that DT_MACHINE_START is used which is
the case when AG5EVM and Kota2 are removed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-26 09:19:54 +09:00
Kuninori Morimoto
cfa66a8162 ARM: shmobile: bockw: add DT reference
This patch adds a sample DT-based Bock-W "reference" implementation.
The use of platform-specific C-code should be avoided
with this configuration as much as possible.

This patch adds new r8a7778_add_dt_devices() which was same stance
of r8a7790_add_dt_devices()

Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-26 09:17:32 +09:00
Magnus Damm
d2ef0b9a51 ARM: shmobile: No need to use INTC header on r8a7779
Now when the intc-irqpin driver is used for external
IRQ pins on r8a7779 it possible to get rid of unused
INTC headers mach/intc.h and linux/sh_intc.h.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-25 14:46:47 +09:00
Guennadi Liakhovetski
f79d68da51 ARM: shmobile: ape6evm: add SDHI interfaces
Add support for SDHI0 and SDHI1 on APE6EVM in PIO mode only.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-25 14:46:38 +09:00
Guennadi Liakhovetski
8711613252 ARM: shmobile: ape6evm: add MMCIF support
Add MMCIF support to the APE6EVM board in PIO mode only. Power supply is
fixed for now, eventually support for the tps80032 regulator, also
supplying both VDD and VccQ to the MMCIF slot should be added to APE6EVM.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-25 14:46:37 +09:00
Magnus Damm
d76c626d31 ARM: shmobile: No need to use INTC demux on r8a7740
Now when the r8a7740 code has been converted to make use of
GIC instead of INTC for root interrupt controller it is
possible to exclude the low level INTC demux function
shmobile_handle_irq_intc from linking.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-25 14:45:19 +09:00
Magnus Damm
0173a741e1 ARM: shmobile: Use pm-rmobile on sh7372 and r8a7740 only
The functions in pm-rmobile.c are only used on sh7372 and
r8a7740, so adjust the Makefile to only link in that file
in case those SoCs are selected.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-25 14:45:18 +09:00
Kuninori Morimoto
16b551dd22 ARM: shmobile: armadillo800eva: Don't request GPIO 166 in board code
89ae7b5bbd
(ARM: shmobile: armadillo800eva: Register pinctrl mapping for INTC)
mistakenly requests GPIO 166 in board code,
most probably due to a wrong merge conflict resolution.
As the GPIO is passed to the st1232 driver through platform
data and requested by the driver,
there's no need to request it in board code. Fix it.

Tested by: Cao Minh Hiep <cm-hiep@jinso.co.jp>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-25 14:40:31 +09:00
Magnus Damm
67fde41ea4 ARM: shmobile: r8a73a4: Remove ->init_machine() special case
No need to special case r8a73a4 ->init_machine(),
so get rid of undesired cpufreq platform device
from the generic long term r8a73a4 DT support code.

For short term support on APE6EVM the DT reference
implementation already adds a "cpufreq-cpu0" platform
device so that can be used for development.

Regarding more long term cpufreq support, perhaps
it makes sense to adjust the cpufreq driver to check
for DT information directly instead of using a
platform device for software configuration and DT
for hardware parameters.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-24 16:35:30 +09:00
Magnus Damm
5717bcf371 ARM: shmobile: Remove include <mach/hardware.h>
Now when no one is using this file, remove <mach/hardware.h>.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-24 16:35:25 +09:00
Magnus Damm
85469abe49 ARM: shmobile: Remove Marzen use of <mach/hardware.h>
Remove unused <mach/hardware.h> on Marzen.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-24 16:35:24 +09:00
Magnus Damm
603e45827b ARM: shmobile: Remove r8a7779 use of <mach/hardware.h>
Remove unused <mach/hardware.h> on r8a7779.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-24 16:35:24 +09:00
Magnus Damm
7ffdc70e14 ARM: shmobile: Remove EMEV2 use of <mach/hardware.h>
Remove unused <mach/hardware.h> on EMEV2.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-24 16:35:24 +09:00
Magnus Damm
3a8e257f24 ARM: shmobile: Remove sh7372 use of <mach/hardware.h>
Remove unused <mach/hardware.h> on sh7372.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-24 16:35:24 +09:00
Magnus Damm
fb0724805e ARM: shmobile: Remove sh73a0 use of <mach/hardware.h>
Remove unused <mach/hardware.h> on sh73a0.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-24 16:35:24 +09:00
Simon Horman
c0bb9b3027 ARCH: ARM: shmobile: Remove ag5evm board support
Remove support for the sh73a0 based ag5evm board.

The sh73a0 SoC is continued to be supported using
the kzm9g board.

Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-24 16:35:23 +09:00
Simon Horman
5fa6d27612 ARCH: ARM: shmobile: Remove kota2 board support
Remove support for the sh73a0 based kota2 board.

The sh73a0 SoC is continued to be supported using
the kzm9g board.

Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-24 16:35:23 +09:00
Simon Horman
4431374926 Merge branches 'tpu-pwm', 'backlight' and 'soc' into cleanup2-base 2013-07-24 16:35:12 +09:00
Guennadi Liakhovetski
ab40900b70 ARM: shmobile: armadillo800eva-reference: fix compiler warning
Fix the compiler warning:

arch/arm/mach-shmobile/board-armadillo800eva-reference.c:196:2: warning: initialization from incompatible pointer type [enabled by default]
arch/arm/mach-shmobile/board-armadillo800eva-reference.c:196:2: warning: (near initialization for '__mach_desc_ARMADILLO800EVA_DT.restart') [enabled by default]

While at it also remove superfluous parenthesis.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-23 10:35:33 +09:00
Magnus Damm
fd071b669e ARM: shmobile: Allow ARCH_SHMOBILE_MULTI timer configuration
Move the timer configuration bits to allow use in
case of ARCH_SHMOBILE or ARCH_SHMOBILE_MULTI.

The timers all make use of the regular driver model
so they are safe to enable for ARCH_MULTIPLATFORM.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-23 09:52:44 +09:00
Magnus Damm
cbc60e7c04 ARM: shmobile: Add EMEV2 and KZM9D to ARCH_SHMOBILE_MULTI
Enable build of EMEV2 and KZM9D DT Reference in
case of ARCH_MULTIPLATFORM and ARCH_SHMOBILE_MULTI.

IS_ENABLED() is leaves the clock-emev2.c file out
in case of COMMON_CLK=y.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-23 09:52:25 +09:00
Magnus Damm
efacfce5f8 ARM: shmobile: Introduce ARCH_SHMOBILE_MULTI
Add ARCH_SHMOBILE_MULTI to mach-shmobile that can be used
to enable ARCH_MULTIPLATFORM on selected SoCs and boards.

The headers stay under arch/arm/mach-shmobile/include/mach/
for now, they can and will be migrated independently over time.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-23 09:50:59 +09:00
Magnus Damm
a360feb9e9 ARM: shmobile: Only build clocks when COMMON_CLK=n
Move shared clock.c file and per-SoC clock-xxx.c files
to only build when CONFIG_COMMON_CLK != y.

The regular ARCH_SHMOBILE case with legacy SH clock framework
will build just as before with this patch applied, however
the case when COMMON_CLK=y will exclude all the clock files.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-23 09:50:59 +09:00
Laurent Pinchart
f8f77ce940 ARM: shmobile: kzm9g-reference: Move SDHI regulators to DT
Create two GPIO-controlled fixed-voltage regulators in the
kzm9g-reference DT and remove manual configuration of the corresponding
GPIOs from board code.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-22 10:12:40 +09:00
Laurent Pinchart
ec028600f4 ARM: shmobile: kzm9g-reference: Move pinctrl mappings to device tree
Replace the pinctrl mappings in board code by device tree mappings.
For devices that are still instantiated from board code reference the
mappings as the default pin controller state to apply them at boot time.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-22 10:12:40 +09:00
Laurent Pinchart
c4a003f607 ARM: shmobile: marzen-reference: Move pinctrl mappings to device tree
Replace the pinctrl mappings in board code by device tree mappings.
For devices that are still instantiated from board code reference the
mappings as the default pin controller state to apply them at boot time.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-22 10:12:39 +09:00
Laurent Pinchart
14d0a2b796 ARM: shmobile: armadillo-reference: Move st1232 reset GPIO to DT
Reference the st1232 reset GPIO from the device tree and remove it from
board code.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-22 10:12:38 +09:00
Laurent Pinchart
5d244563da ARM: shmobile: armadillo-reference: Move pinctrl mappings to device tree
Replace the pinctrl mappings in board code by device tree mappings.
For devices that are still instantiated from board code reference the
mappings as the default pin controller state to apply them at boot time.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-22 10:12:37 +09:00
Laurent Pinchart
3f59007e8e ARM: shmobile: sh73a0: Add pin control device to device tree
Add a pfc node to the sh73a0 device tree and remove manual pinmux
initialization from the corresponding board files.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-22 10:12:36 +09:00
Laurent Pinchart
3ab03d01a9 ARM: shmobile: r8a7779: Add pin control device to device tree
Add a pfc node to the r8a7779 device tree and remove manual pinmux
initialization from the corresponding board files.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-22 10:12:34 +09:00
Laurent Pinchart
f36218d25f ARM: shmobile: r8a7740: Add pin control device to device tree
Add a pfc node to the r8a7740 device tree and remove manual pinmux
initialization from the corresponding board files.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-22 10:12:32 +09:00
Laurent Pinchart
e6909dcedb ARM: shmobile: sh73a0: Remove all GPIOs
Function GPIOs are not used anymore, and all code use the GPIO numbers
directly. Remove the GPIOs enumeration.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-19 11:22:47 +09:00
Laurent Pinchart
b885966f61 ARM: shmobile: kota2: Use leds-pwm + pwm-rmob
Instead of using the LED-specific TPU PWM driver, switch to the generic
TPU PWM driver with leds-pwm.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-19 11:22:47 +09:00
Laurent Pinchart
d58226a21a ARM: shmobile: armadillo800eva: Add backlight support
The flat panel backlight on the Armadillo 800 EVA board is driven by the
TPU PWM output.

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-07-19 11:22:46 +09:00
Laurent Pinchart
93d8a6fbe6 ARM: shmobile: r8a7740: Fix TPU clock name
The TPU device is called renesas-tpu-pwm, not renesas_tpu_pwm. Fix the
clock name accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-19 11:12:35 +09:00
Tetsuyuki Kobayashi
0b933cb305 ARM: shmobile: Insert align directives before 4 bytes data
In thumb2 mode instructions are not align to 4 byte. This patch insert
align directives before putting 4 byte data.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-18 08:35:21 +09:00
Tetsuyuki Kobayashi
c1d7e2e800 ARM: shmobile: Force ARM mode to compile reset vector for secondary CPUs
Instructions start from boot vector must be ARM mode.
This patch specify ARM mode explicitly and use 'bx' instruction to be
able to change to Thumb mode.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-18 08:35:21 +09:00
Tetsuyuki Kobayashi
bdea6c657e ARM: shmobile: fix compile error when CONFIG_THUMB2_KERNEL=y
On KZM-A9-GT board (SMP), when CONFIG_THUMB2_KERNEL=y it fails to compile

  AS      arch/arm/mach-shmobile/headsmp-scu.o
/proj/koba/kernel/arm-soc/arch/arm/mach-shmobile/headsmp-scu.S: Assembler messages:
/proj/koba/kernel/arm-soc/arch/arm/mach-shmobile/headsmp-scu.S:41: Error: shift must be constant -- `bic r2,r2,r3,lsl r1'
make[2]: *** [arch/arm/mach-shmobile/headsmp-scu.o] Error 1
make[1]: *** [arch/arm/mach-shmobile] Error 2
make: *** [sub-make] Error 2

Instruction `bic r2,r2,r3,lsl r1' is not supported in thumb mode. This patch split it into 2 instructions.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-18 08:35:21 +09:00
Kuninori Morimoto
c9996e51e4 ARM: shmobile: select the fixed regulator driver on BockW
34767f8dcc
(ARM: mach-shmobile: select the fixed regulator driver on several boards)
decided to select fixed regulator driver on Kconfig.
BockW follows same style.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[horms+renesas@verge.net.au: Change mach-shmobile to shmobile in changelog]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:32:08 +09:00
Guennadi Liakhovetski
63d0539e54 ARM: shmobile: lager: add MMCIF support
Add support for the MMCIF1 interface on Lager.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:32:08 +09:00
Guennadi Liakhovetski
872842084c ARM: shmobile: armadillo800eva: add DMA support to MMCIF
Add DMA slave IDs to MMCIF Tx and Rx channels.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:32:08 +09:00
Magnus Damm
d144f3623a ARM: shmobile: Minor update for the Lager DT reference code
Update the Lager DT reference code to get rid of the redundant
irqchip header and also make lager_add_standard_devices() static.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:30:03 +09:00
Simon Horman
6dace67f9b ARM: shmobile: lager: Add DT reference
This is sufficient to allow boot of the Lager board with
a console without boards-lager.c compiled into the kernel.
This is an example of a minimal but still useful initialisation
of the board using DT as much as possible.

As such it is the same as the boot of Lager that can be achieved
without a board file. The intention of adding this file
is to facilitate further work to allow board specific devices to be
initialised via DT.

Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:30:03 +09:00
Guennadi Liakhovetski
b88cf6f732 ARM: shmobile: ape6evm-reference: add CPUFreq support
Add CPUFreq support to ape6evm-reference, using a max8973 regulator, that
is supplying V_DVFS for the 4 CA15 cores on r8a73a4.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:28:31 +09:00
Guennadi Liakhovetski
69f366615e ARM: shmobile: ape6evm: add DT reference
This patch adds a sample DT-based APE6EVM "reference" implementation. The
use of platform-specific C-code should be avoided with this configuration
as much as possible.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:28:31 +09:00
Magnus Damm
81b9d5351f ARM: shmobile: Setup r8a7790 arch timer based on MD pins
Update the r8a7790 arch timer setup code to configure the
frequency dynamically at boot time. This means that the arch
timer driver will be able to detect a timer frequency that
has been calculated based on the MD pins instead of a fixed
and potentially incorrect 13 MHz.

With this patch applied the Linux kernel will correctly
support the r8a7790 Lager board that uses a 20 Mhz EXTAL.
The arch timer will operate on 10 MHz and the Linux arch
timer driver will be correctly configured to use 10 MHz.

Without this patch the 20 MHz EXTAL will be used to drive
the arch timer at 10 MHz, but the Linux arch timer driver
will believe it is counting at 13 Mhz.

Reported-by: Ulrich Hecht <ulrich.hecht@gmail.com>
Signed-off-by: Magnus Damm <damm@opensource.se>
Tested-by: Ulrich Hecht <ulrich.hecht@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:26:56 +09:00
Magnus Damm
512e53bc7f ARM: shmobile: Introduce r8a7790_read_mode_pins()
Break out the r8a7790 boot mode code into a separate
function so it can be shared by multiple users.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:26:56 +09:00
Guennadi Liakhovetski
9a1456242c ARM: shmobile: r8a7740: add MMCIF DMA definitions
Add DMA channel slave IDs and configuration entries for the r8a7740
MMCIF controller.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:26:55 +09:00
Magnus Damm
8d7217e5d7 ARM: shmobile: Disconnect EMEV2 SMP code from clocks
Update the EMEV2 SMP code to access the SMU directly
instead of relying on help from the legacy clock code.

This change moves us one step closer to common clocks.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:26:55 +09:00
Magnus Damm
b9a30ef1d3 ARM: shmobile: Make r8a73a4 Arch timer optional
Update the r8a73a4 code to allow using other
timers than Arch timer for clock event

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:26:54 +09:00
Magnus Damm
a7b99f27a2 ARM: shmobile: Add r8a73a4 CMT10 clock event
Add clock event support for CMT1 timer channel 0
to the r8a73a4 SoC code. The CMT is used together
with a 32KHz clock in this case.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:26:53 +09:00
Magnus Damm
8333d8c995 ARM: shmobile: Make r8a7790 Arch timer optional
Update the r8a7790 code to allow using other
timers than Arch timer for clock events.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:26:53 +09:00
Magnus Damm
99ade1a0f0 ARM: shmobile: Add r8a7790 CMT00 clock event
Add clock event support for CMT0 timer channel 0
to the r8a7790 SoC code. On most ARM mach-shmobile
the CMT is hooked up to a 32KHz clock but on r8a7790
a 31.7KHz clock is instead used.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:26:49 +09:00
Magnus Damm
29eb2ba89c ARM: shmobile: Sort r8a7790 MSTP entries
The r8a7790 MSTP bits should be kept sorted in the same way
as on other mach-shmobile SoCs. Move the HSCIF and thermal
bits to clean up the current state.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:25:38 +09:00
Guennadi Liakhovetski
1e453df900 ARM: shmobile: r8a73a4: add clocks for I2C controllers
r8a73a4 SoCs have numerous I2C controllers, of which 9 are compatible with
the i2c-sh_mobile.c driver. This patch adds clock definitions for them.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:25:37 +09:00
Guennadi Liakhovetski
a040f22d2c ARM: shmobile: r8a73a4: add Z2 clock support
The Z2 clock on r8a73a4 is used to clock the 4 Cortex A7 cores on the SoC.
Add a definition for this clock to later use it from the arm_big_little
CPUFreq driver.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:25:36 +09:00
Guennadi Liakhovetski
d1c3c959f2 ARM: shmobile: r8a73a4: safeguard against wrong clk_set_rate() uses
clk_set_rate() should only be called with exact rates, returned by
clk_round_rate(). However, it is still good to verify, that the value,
passed to clock's .set_rate() method is at least valid. This patch adds
such a check for the Z-clock on r8a73a4.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:25:36 +09:00
Guennadi Liakhovetski
181135e0b7 ARM: shmobile: r8a73a4: implement CPU clock scaling for CPUFreq
This patch adds support for the Z-clock on r8a73a4 SoCs, which is driving
the Cortex A15 core, and a "cpufreq-cpu0" platform device. Adding an
"operating-points" property to the CPU0 DT node and a regulator, this
patch allows platforms to use the generic cpufreq-cpu0 driver to use
SoC's DVFS capabilities.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:25:35 +09:00
Guennadi Liakhovetski
8d27657286 ARM: shmobile: r8a73a4: wait for completion when kicking the clock
To reconfigure clocks, controlled by FRQCRA and FRQCRB, a kick bit has to
be set and to make sure the setting has taken effect, it has to be read
back repeatedly until it is cleared by the hardware. This patch adds the
waiting part, that was missing until now.

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:25:35 +09:00
Simon Horman
0b8eeba451 ARM: shmobile: r8a7790: add thermal driver support
The current temperature may be read using:
cat /sys/class/thermal/thermal_zone0/temp

Based on similar work for the r8a73a4 by Kuninori Morimoto.

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:25:27 +09:00
Simon Horman
a4b91be0b6 ARM: shmobile: r8a7790: add clocks for thermal
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 14:24:40 +09:00
Magnus Damm
03393e8fe6 ARM: shmobile: KZM9D DT reference implementation
Add a DT reference implementation for the KZM9D board.

Only DT devices are used in this case. UART, STI, GPIO
and SMP / GIC are all provided by emev2.dtsi.

There is still a board specific C file used for enabling
legacy SH clocks. This file will be removed after we have
moved over to common clocks.

Signed-off-by: Magnus Damm <damm@opensource.se>
[horms+renesas@verge.net.au: Do not include trailing blank line in
 board-kzm9d-reference.c ]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 10:06:46 +09:00
Magnus Damm
0ea2b5389a ARM: shmobile: EMEV2 map_io update
Update the EMEV2 struct map_desc to exclude the SMU
and also include the ->map_io() callback in the DT
version of EMEV2 board support.

The EMEV2 SMP code can these days perform ioremap()
early on without the SMU information in the io_desc[].

To correctly support SMP in case of DT-only board
support then the ->map_io() callback is needed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 10:06:46 +09:00
Magnus Damm
683101a662 ARM: shmobile: Use DT for SMP on EMEV2 and KZM9D
Rework the EMEV2 SMP code to rely on DT for CPU information
instead of reading out number of CPU cores from the SCU.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 10:06:46 +09:00
Magnus Damm
23260e1b41 ARM: shmobile: Use DT for GIC on EMEV2 and KZM9D
Remove the C version of the EMEV2 GIC setup code,
instead rely on GIC information provided by DT.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-07-17 10:06:45 +09:00