Renesas ARM-based SoC DT updates for v3.12

* Reference implementation for kzm9d board
 * Add MMCIF and SDHI DT templates for r8a7790 and r8a73a4 SoCs
 * Use DT for SMP and GIC initialisation on emev2 SoC and kzm9d board
 * Add GIO to dtsi of emev2 SoC
 * Update dts command line of kzm9d board
 * Add CPUFreq support to ape6evm board
 * Add I2C controller DT nodes to r8a73a4 SoC
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJR7N5oAAoJENfPZGlqN0++WgoP/2R95Zo4PS38ZuD3oD0HhhaQ
 jCp/8dOxxv19Nkd4/xJ8dwD0TxBCdUUr3CsIgrr2T8x8V1HTk9IcndrlFEcQ9zUj
 A+CGl1YcRAsUaUB85yLOv1bKh7UoKNZ1NldyGzvjbOrK+dOKCqOE2njE3SmOnDiC
 oe44e/6ROdxmlqTeb8RRfhVE5zUgHzeGo/ZF7yFIXR1n7hGUiDmdSc4UgDJDnyMs
 aPvHJS8iLqapy9bFsf8vpUWfpiYwossJsCdTqAxNT0jrh0/+Swtuuzqavntz1lSs
 dfxk9+UTM/yvzL5RtnWnX7Ud3qaOcomMc5ZUAl7lSZNSxOpWEv8+zk4lQy5azxcG
 AFewNMUuE7FnxJg9e+wIMc3D0k9WG9Ce4ENvOmgnnFMxooMkyECy6dmfv9NCfjBe
 rQzFb/KIn7aeghbYfLrapm9vnkhdlfZwK3VOqo0VSpYqtycgZ2PVcgFBLFQstCPm
 ElEqHoctuQMYkHQg8u9sjQFiDXNnuCilX6o/W0JMbsZP7ecqpFRWT9mwtlUy+90t
 64Cprx0qtBKQhuIW8Po6+LZokP2MXYhZTWllrx8CM1B/LQE8/eVu5U4zX6GsghxQ
 vCrGDVvcDtgzv3didLAW37J630hIDM4hhnKjbg08OSkNDI5WY6HXyl76IoexbAvR
 Vn1iIGzoIPOq+4k6s67f
 =7Bri
 -----END PGP SIGNATURE-----

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

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

* Reference implementation for kzm9d board
* Add MMCIF and SDHI DT templates for r8a7790 and r8a73a4 SoCs
* Use DT for SMP and GIC initialisation on emev2 SoC and kzm9d board
* Add GIO to dtsi of emev2 SoC
* Update dts command line of kzm9d board
* Add CPUFreq support to ape6evm board
* Add I2C controller DT nodes to r8a73a4 SoC

* tag 'renesas-dt-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (33 commits)
  ARM: shmobile: Add SMSC ethernet chip to KZM9D DT reference
  ARM: shmobile: KZM9D DT reference implementation
  ARM: shmobile: r8a7790: add MMCIF and SDHI DT templates
  ARM: shmobile: r8a73a4: add MMCIF and SDHI DT templates
  ARM: shmobile: EMEV2 map_io update
  ARM: shmobile: Use DT for SMP on EMEV2 and KZM9D
  ARM: shmobile: Use DT for GIC on EMEV2 and KZM9D
  ARM: shmobile: Add GIO to EMEV2 dtsi
  ARM: shmobile: Update KZM9D dts command line
  ARM: shmobile: ape6evm: add CPUFreq support
  ARM: shmobile: r8a73a4: add I2C controller DT nodes
  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
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
Olof Johansson 2013-08-04 12:31:13 -07:00
commit 19dab4ce09
29 changed files with 490 additions and 455 deletions

View File

@ -183,6 +183,7 @@ dtb-$(CONFIG_ARCH_U8500) += snowball.dtb \
ccu9540.dtb ccu9540.dtb
dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb
dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
emev2-kzm9d-reference.dtb \
r8a7740-armadillo800eva.dtb \ r8a7740-armadillo800eva.dtb \
r8a7778-bockw.dtb \ r8a7778-bockw.dtb \
r8a7740-armadillo800eva-reference.dtb \ r8a7740-armadillo800eva-reference.dtb \

View File

@ -0,0 +1,57 @@
/*
* Device Tree Source for the KZM9D board
*
* Copyright (C) 2013 Renesas Solutions Corp.
*
* This file is licensed under the terms of the GNU General Public License
* version 2. This program is licensed "as is" without any warranty of any
* kind, whether express or implied.
*/
/dts-v1/;
/include/ "emev2.dtsi"
/ {
model = "EMEV2 KZM9D Board";
compatible = "renesas,kzm9d-reference", "renesas,emev2";
memory {
device_type = "memory";
reg = <0x40000000 0x8000000>;
};
chosen {
bootargs = "console=ttyS1,115200n81 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize=4096,wsize=4096";
};
reg_1p8v: regulator@0 {
compatible = "regulator-fixed";
regulator-name = "fixed-1.8V";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on;
};
reg_3p3v: regulator@1 {
compatible = "regulator-fixed";
regulator-name = "fixed-3.3V";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
regulator-boot-on;
};
lan9220@20000000 {
compatible = "smsc,lan9220", "smsc,lan9115";
reg = <0x20000000 0x10000>;
phy-mode = "mii";
interrupt-parent = <&gpio0>;
interrupts = <1 1>; /* active high */
reg-io-width = <4>;
smsc,irq-active-high;
smsc,irq-push-pull;
vddvario-supply = <&reg_1p8v>;
vdd33a-supply = <&reg_3p3v>;
};
};

View File

@ -21,6 +21,6 @@
}; };
chosen { chosen {
bootargs = "console=tty0 console=ttyS1,115200n81 earlyprintk=serial8250-em.1,115200n81 mem=128M@0x40000000 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize=4096,wsize=4096"; bootargs = "console=ttyS1,115200n81 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize=4096,wsize=4096";
}; };
}; };

View File

@ -14,6 +14,14 @@
compatible = "renesas,emev2"; compatible = "renesas,emev2";
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
aliases {
gpio0 = &gpio0;
gpio1 = &gpio1;
gpio2 = &gpio2;
gpio3 = &gpio3;
gpio4 = &gpio4;
};
cpus { cpus {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
@ -67,4 +75,55 @@
reg = <0xe1050000 0x38>; reg = <0xe1050000 0x38>;
interrupts = <0 11 0>; interrupts = <0 11 0>;
}; };
gpio0: gpio@e0050000 {
compatible = "renesas,em-gio";
reg = <0xe0050000 0x2c>, <0xe0050040 0x20>;
interrupts = <0 67 0>, <0 68 0>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <32>;
interrupt-controller;
#interrupt-cells = <2>;
};
gpio1: gpio@e0050080 {
compatible = "renesas,em-gio";
reg = <0xe0050080 0x2c>, <0xe00500c0 0x20>;
interrupts = <0 69 0>, <0 70 0>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <32>;
interrupt-controller;
#interrupt-cells = <2>;
};
gpio2: gpio@e0050100 {
compatible = "renesas,em-gio";
reg = <0xe0050100 0x2c>, <0xe0050140 0x20>;
interrupts = <0 71 0>, <0 72 0>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <32>;
interrupt-controller;
#interrupt-cells = <2>;
};
gpio3: gpio@e0050180 {
compatible = "renesas,em-gio";
reg = <0xe0050180 0x2c>, <0xe00501c0 0x20>;
interrupts = <0 73 0>, <0 74 0>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <32>;
interrupt-controller;
#interrupt-cells = <2>;
};
gpio4: gpio@e0050200 {
compatible = "renesas,em-gio";
reg = <0xe0050200 0x2c>, <0xe0050240 0x20>;
interrupts = <0 75 0>, <0 76 0>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <31>;
interrupt-controller;
#interrupt-cells = <2>;
};
}; };

View File

@ -50,3 +50,25 @@
}; };
}; };
}; };
&i2c5 {
vdd_dvfs: max8973@1b {
compatible = "maxim,max8973";
reg = <0x1b>;
regulator-min-microvolt = <935000>;
regulator-max-microvolt = <1200000>;
regulator-boot-on;
regulator-always-on;
};
};
&cpu0 {
cpu0-supply = <&vdd_dvfs>;
operating-points = <
/* kHz uV */
1950000 1115000
1462500 995000
>;
voltage-tolerance = <1>; /* 1% */
};

View File

@ -85,4 +85,130 @@
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <0 69 4>; interrupts = <0 69 4>;
}; };
i2c0: i2c@e6500000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "renesas,rmobile-iic";
reg = <0 0xe6500000 0 0x428>;
interrupt-parent = <&gic>;
interrupts = <0 174 0x4>;
};
i2c1: i2c@e6510000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "renesas,rmobile-iic";
reg = <0 0xe6510000 0 0x428>;
interrupt-parent = <&gic>;
interrupts = <0 175 0x4>;
};
i2c2: i2c@e6520000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "renesas,rmobile-iic";
reg = <0 0xe6520000 0 0x428>;
interrupt-parent = <&gic>;
interrupts = <0 176 0x4>;
};
i2c3: i2c@e6530000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "renesas,rmobile-iic";
reg = <0 0xe6530000 0 0x428>;
interrupt-parent = <&gic>;
interrupts = <0 177 0x4>;
};
i2c4: i2c@e6540000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "renesas,rmobile-iic";
reg = <0 0xe6540000 0 0x428>;
interrupt-parent = <&gic>;
interrupts = <0 178 0x4>;
};
i2c5: i2c@e60b0000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "renesas,rmobile-iic";
reg = <0 0xe60b0000 0 0x428>;
interrupt-parent = <&gic>;
interrupts = <0 179 0x4>;
};
i2c6: i2c@e6550000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "renesas,rmobile-iic";
reg = <0 0xe6550000 0 0x428>;
interrupt-parent = <&gic>;
interrupts = <0 184 0x4>;
};
i2c7: i2c@e6560000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "renesas,rmobile-iic";
reg = <0 0xe6560000 0 0x428>;
interrupt-parent = <&gic>;
interrupts = <0 185 0x4>;
};
i2c8: i2c@e6570000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "renesas,rmobile-iic";
reg = <0 0xe6570000 0 0x428>;
interrupt-parent = <&gic>;
interrupts = <0 173 0x4>;
};
mmcif0: mmcif@ee200000 {
compatible = "renesas,sh-mmcif";
reg = <0 0xee200000 0 0x80>;
interrupt-parent = <&gic>;
interrupts = <0 169 0x4>;
reg-io-width = <4>;
status = "disabled";
};
mmcif1: mmcif@ee220000 {
compatible = "renesas,sh-mmcif";
reg = <0 0xee220000 0 0x80>;
interrupt-parent = <&gic>;
interrupts = <0 170 0x4>;
reg-io-width = <4>;
status = "disabled";
};
sdhi0: sdhi@ee100000 {
compatible = "renesas,r8a73a4-sdhi";
reg = <0 0xee100000 0 0x100>;
interrupt-parent = <&gic>;
interrupts = <0 165 4>;
cap-sd-highspeed;
status = "disabled";
};
sdhi1: sdhi@ee120000 {
compatible = "renesas,r8a73a4-sdhi";
reg = <0 0xee120000 0 0x100>;
interrupt-parent = <&gic>;
interrupts = <0 166 4>;
cap-sd-highspeed;
status = "disabled";
};
sdhi2: sdhi@ee140000 {
compatible = "renesas,r8a73a4-sdhi";
reg = <0 0xee140000 0 0x100>;
interrupt-parent = <&gic>;
interrupts = <0 167 4>;
cap-sd-highspeed;
status = "disabled";
};
}; };

View File

@ -54,4 +54,58 @@
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <0 0 4>, <0 1 4>, <0 2 4>, <0 3 4>; interrupts = <0 0 4>, <0 1 4>, <0 2 4>, <0 3 4>;
}; };
mmcif0: mmcif@ee200000 {
compatible = "renesas,sh-mmcif";
reg = <0 0xee200000 0 0x80>;
interrupt-parent = <&gic>;
interrupts = <0 169 0x4>;
reg-io-width = <4>;
status = "disabled";
};
mmcif1: mmcif@ee220000 {
compatible = "renesas,sh-mmcif";
reg = <0 0xee220000 0 0x80>;
interrupt-parent = <&gic>;
interrupts = <0 170 0x4>;
reg-io-width = <4>;
status = "disabled";
};
sdhi0: sdhi@ee100000 {
compatible = "renesas,r8a7790-sdhi";
reg = <0 0xee100000 0 0x100>;
interrupt-parent = <&gic>;
interrupts = <0 165 4>;
cap-sd-highspeed;
status = "disabled";
};
sdhi1: sdhi@ee120000 {
compatible = "renesas,r8a7790-sdhi";
reg = <0 0xee120000 0 0x100>;
interrupt-parent = <&gic>;
interrupts = <0 166 4>;
cap-sd-highspeed;
status = "disabled";
};
sdhi2: sdhi@ee140000 {
compatible = "renesas,r8a7790-sdhi";
reg = <0 0xee140000 0 0x100>;
interrupt-parent = <&gic>;
interrupts = <0 167 4>;
cap-sd-highspeed;
status = "disabled";
};
sdhi3: sdhi@ee160000 {
compatible = "renesas,r8a7790-sdhi";
reg = <0 0xee160000 0 0x100>;
interrupt-parent = <&gic>;
interrupts = <0 168 4>;
cap-sd-highspeed;
status = "disabled";
};
}; };

View File

@ -156,6 +156,18 @@ config MACH_KZM9D
select REGULATOR_FIXED_VOLTAGE if REGULATOR select REGULATOR_FIXED_VOLTAGE if REGULATOR
select USE_OF select USE_OF
config MACH_KZM9D_REFERENCE
bool "KZM9D board - Reference Device Tree Implementation"
depends on ARCH_EMEV2
select REGULATOR_FIXED_VOLTAGE if REGULATOR
select USE_OF
---help---
Use reference implementation of KZM9D board support
which makes a greater use of device tree at the expense
of not supporting a number of devices.
This is intended to aid developers
config MACH_KZM9G config MACH_KZM9G
bool "KZM-A9-GT board" bool "KZM-A9-GT board"
depends on ARCH_SH73A0 depends on ARCH_SH73A0

View File

@ -46,6 +46,7 @@ obj-$(CONFIG_MACH_LAGER) += board-lager.o
obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o
obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o
obj-$(CONFIG_MACH_KZM9D) += board-kzm9d.o obj-$(CONFIG_MACH_KZM9D) += board-kzm9d.o
obj-$(CONFIG_MACH_KZM9D_REFERENCE) += board-kzm9d-reference.o
obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o
obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o

View File

@ -7,6 +7,7 @@ loadaddr-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += 0x40008000
loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000 loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000
loadaddr-$(CONFIG_MACH_KOTA2) += 0x41008000 loadaddr-$(CONFIG_MACH_KOTA2) += 0x41008000
loadaddr-$(CONFIG_MACH_KZM9D) += 0x40008000 loadaddr-$(CONFIG_MACH_KZM9D) += 0x40008000
loadaddr-$(CONFIG_MACH_KZM9D_REFERENCE) += 0x40008000
loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000
loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000
loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000 loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000

View File

@ -20,7 +20,6 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irqchip.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/pinctrl/machine.h> #include <linux/pinctrl/machine.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
@ -102,7 +101,6 @@ static const char *ape6evm_boards_compat_dt[] __initdata = {
}; };
DT_MACHINE_START(APE6EVM_DT, "ape6evm") DT_MACHINE_START(APE6EVM_DT, "ape6evm")
.init_irq = irqchip_init,
.init_time = shmobile_timer_init, .init_time = shmobile_timer_init,
.init_machine = ape6evm_add_standard_devices, .init_machine = ape6evm_add_standard_devices,
.dt_compat = ape6evm_boards_compat_dt, .dt_compat = ape6evm_boards_compat_dt,

View File

@ -679,15 +679,6 @@ static struct platform_device vcc_sdhi1 = {
}; };
/* SDHI0 */ /* SDHI0 */
/*
* FIXME
*
* It use polling mode here, since
* CD (= Card Detect) pin is not connected to SDHI0_CD.
* We can use IRQ31 as card detect irq,
* but it needs chattering removal operation
*/
#define IRQ31 irq_pin(31)
static struct sh_mobile_sdhi_info sdhi0_info = { static struct sh_mobile_sdhi_info sdhi0_info = {
.dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
.dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,

View File

@ -0,0 +1,46 @@
/*
* kzm9d board support - Reference DT implementation
*
* Copyright (C) 2013 Renesas Solutions Corp.
* Copyright (C) 2013 Magnus Damm
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <linux/init.h>
#include <linux/of_platform.h>
#include <mach/emev2.h>
#include <mach/common.h>
#include <asm/mach/arch.h>
static void __init kzm9d_add_standard_devices(void)
{
emev2_clock_init();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
static const char *kzm9d_boards_compat_dt[] __initdata = {
"renesas,kzm9d-reference",
NULL,
};
DT_MACHINE_START(KZM9D_DT, "kzm9d")
.smp = smp_ops(emev2_smp_ops),
.map_io = emev2_map_io,
.init_early = emev2_init_delay,
.init_machine = kzm9d_add_standard_devices,
.init_late = shmobile_init_late,
.dt_compat = kzm9d_boards_compat_dt,
MACHINE_END

View File

@ -85,9 +85,7 @@ static const char *kzm9d_boards_compat_dt[] __initdata = {
DT_MACHINE_START(KZM9D_DT, "kzm9d") DT_MACHINE_START(KZM9D_DT, "kzm9d")
.smp = smp_ops(emev2_smp_ops), .smp = smp_ops(emev2_smp_ops),
.map_io = emev2_map_io, .map_io = emev2_map_io,
.init_early = emev2_add_early_devices, .init_early = emev2_init_delay,
.nr_irqs = NR_IRQS_LEGACY,
.init_irq = emev2_init_irq,
.init_machine = kzm9d_add_standard_devices, .init_machine = kzm9d_add_standard_devices,
.init_late = shmobile_init_late, .init_late = shmobile_init_late,
.dt_compat = kzm9d_boards_compat_dt, .dt_compat = kzm9d_boards_compat_dt,

View File

@ -24,7 +24,6 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqchip.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/pinctrl/machine.h> #include <linux/pinctrl/machine.h>
@ -99,7 +98,6 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g-reference")
.map_io = sh73a0_map_io, .map_io = sh73a0_map_io,
.init_early = sh73a0_init_delay, .init_early = sh73a0_init_delay,
.nr_irqs = NR_IRQS_LEGACY, .nr_irqs = NR_IRQS_LEGACY,
.init_irq = irqchip_init,
.init_machine = kzm_init, .init_machine = kzm_init,
.init_time = shmobile_timer_init, .init_time = shmobile_timer_init,
.dt_compat = kzm9g_boards_compat_dt, .dt_compat = kzm9g_boards_compat_dt,

View File

@ -22,7 +22,6 @@
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irqchip.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/leds.h> #include <linux/leds.h>
#include <linux/pinctrl/machine.h> #include <linux/pinctrl/machine.h>
@ -103,7 +102,6 @@ static const char *lager_boards_compat_dt[] __initdata = {
}; };
DT_MACHINE_START(LAGER_DT, "lager") DT_MACHINE_START(LAGER_DT, "lager")
.init_irq = irqchip_init,
.init_time = r8a7790_timer_init, .init_time = r8a7790_timer_init,
.init_machine = lager_add_standard_devices, .init_machine = lager_add_standard_devices,
.dt_compat = lager_boards_compat_dt, .dt_compat = lager_boards_compat_dt,

View File

@ -221,7 +221,7 @@ void __init emev2_clock_init(void)
smu_base = ioremap(EMEV2_SMU_BASE, PAGE_SIZE); smu_base = ioremap(EMEV2_SMU_BASE, PAGE_SIZE);
BUG_ON(!smu_base); BUG_ON(!smu_base);
/* setup STI timer to run on 37.768 kHz and deassert reset */ /* setup STI timer to run on 32.768 kHz and deassert reset */
emev2_smu_write(0, STI_CLKSEL); emev2_smu_write(0, STI_CLKSEL);
emev2_smu_write(1, STI_RSTCTRL); emev2_smu_write(1, STI_RSTCTRL);

View File

@ -1 +0,0 @@
/* empty */

View File

@ -2,8 +2,7 @@
#define __ASM_EMEV2_H__ #define __ASM_EMEV2_H__
extern void emev2_map_io(void); extern void emev2_map_io(void);
extern void emev2_init_irq(void); extern void emev2_init_delay(void);
extern void emev2_add_early_devices(void);
extern void emev2_add_standard_devices(void); extern void emev2_add_standard_devices(void);
extern void emev2_clock_init(void); extern void emev2_clock_init(void);
extern void emev2_set_boot_vector(unsigned long value); extern void emev2_set_boot_vector(unsigned long value);

View File

@ -33,7 +33,6 @@ extern void r8a7778_add_mmc_device(struct sh_mmcif_plat_data *info);
extern void r8a7778_init_late(void); extern void r8a7778_init_late(void);
extern void r8a7778_init_delay(void); extern void r8a7778_init_delay(void);
extern void r8a7778_init_irq(void);
extern void r8a7778_init_irq_dt(void); extern void r8a7778_init_irq_dt(void);
extern void r8a7778_clock_init(void); extern void r8a7778_clock_init(void);
extern void r8a7778_init_irq_extpin(int irlm); extern void r8a7778_init_irq_extpin(int irlm);

View File

@ -20,7 +20,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqchip.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/platform_data/gpio-em.h> #include <linux/platform_data/gpio-em.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
@ -39,13 +38,6 @@
static struct map_desc emev2_io_desc[] __initdata = { static struct map_desc emev2_io_desc[] __initdata = {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* 128K entity map for 0xe0100000 (SMU) */
{
.virtual = 0xe0100000,
.pfn = __phys_to_pfn(0xe0100000),
.length = SZ_128K,
.type = MT_DEVICE
},
/* 2M mapping for SCU + L2 controller */ /* 2M mapping for SCU + L2 controller */
{ {
.virtual = 0xf0000000, .virtual = 0xf0000000,
@ -63,102 +55,40 @@ void __init emev2_map_io(void)
/* UART */ /* UART */
static struct resource uart0_resources[] = { static struct resource uart0_resources[] = {
[0] = { DEFINE_RES_MEM(0xe1020000, 0x38),
.start = 0xe1020000, DEFINE_RES_IRQ(40),
.end = 0xe1020037,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 40,
.flags = IORESOURCE_IRQ,
}
};
static struct platform_device uart0_device = {
.name = "serial8250-em",
.id = 0,
.num_resources = ARRAY_SIZE(uart0_resources),
.resource = uart0_resources,
}; };
static struct resource uart1_resources[] = { static struct resource uart1_resources[] = {
[0] = { DEFINE_RES_MEM(0xe1030000, 0x38),
.start = 0xe1030000, DEFINE_RES_IRQ(41),
.end = 0xe1030037,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 41,
.flags = IORESOURCE_IRQ,
}
};
static struct platform_device uart1_device = {
.name = "serial8250-em",
.id = 1,
.num_resources = ARRAY_SIZE(uart1_resources),
.resource = uart1_resources,
}; };
static struct resource uart2_resources[] = { static struct resource uart2_resources[] = {
[0] = { DEFINE_RES_MEM(0xe1040000, 0x38),
.start = 0xe1040000, DEFINE_RES_IRQ(42),
.end = 0xe1040037,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 42,
.flags = IORESOURCE_IRQ,
}
};
static struct platform_device uart2_device = {
.name = "serial8250-em",
.id = 2,
.num_resources = ARRAY_SIZE(uart2_resources),
.resource = uart2_resources,
}; };
static struct resource uart3_resources[] = { static struct resource uart3_resources[] = {
[0] = { DEFINE_RES_MEM(0xe1050000, 0x38),
.start = 0xe1050000, DEFINE_RES_IRQ(43),
.end = 0xe1050037,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 43,
.flags = IORESOURCE_IRQ,
}
}; };
static struct platform_device uart3_device = { #define emev2_register_uart(idx) \
.name = "serial8250-em", platform_device_register_simple("serial8250-em", idx, \
.id = 3, uart##idx##_resources, \
.num_resources = ARRAY_SIZE(uart3_resources), ARRAY_SIZE(uart##idx##_resources))
.resource = uart3_resources,
};
/* STI */ /* STI */
static struct resource sti_resources[] = { static struct resource sti_resources[] = {
[0] = { DEFINE_RES_MEM(0xe0180000, 0x54),
.name = "STI", DEFINE_RES_IRQ(157),
.start = 0xe0180000,
.end = 0xe0180053,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 157,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device sti_device = {
.name = "em_sti",
.id = 0,
.resource = sti_resources,
.num_resources = ARRAY_SIZE(sti_resources),
}; };
#define emev2_register_sti() \
platform_device_register_simple("em_sti", 0, \
sti_resources, \
ARRAY_SIZE(sti_resources))
/* GIO */ /* GIO */
static struct gpio_em_config gio0_config = { static struct gpio_em_config gio0_config = {
@ -168,36 +98,10 @@ static struct gpio_em_config gio0_config = {
}; };
static struct resource gio0_resources[] = { static struct resource gio0_resources[] = {
[0] = { DEFINE_RES_MEM(0xe0050000, 0x2c),
.name = "GIO_000", DEFINE_RES_MEM(0xe0050040, 0x20),
.start = 0xe0050000, DEFINE_RES_IRQ(99),
.end = 0xe005002b, DEFINE_RES_IRQ(100),
.flags = IORESOURCE_MEM,
},
[1] = {
.name = "GIO_000",
.start = 0xe0050040,
.end = 0xe005005f,
.flags = IORESOURCE_MEM,
},
[2] = {
.start = 99,
.flags = IORESOURCE_IRQ,
},
[3] = {
.start = 100,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device gio0_device = {
.name = "em_gio",
.id = 0,
.resource = gio0_resources,
.num_resources = ARRAY_SIZE(gio0_resources),
.dev = {
.platform_data = &gio0_config,
},
}; };
static struct gpio_em_config gio1_config = { static struct gpio_em_config gio1_config = {
@ -207,36 +111,10 @@ static struct gpio_em_config gio1_config = {
}; };
static struct resource gio1_resources[] = { static struct resource gio1_resources[] = {
[0] = { DEFINE_RES_MEM(0xe0050080, 0x2c),
.name = "GIO_032", DEFINE_RES_MEM(0xe00500c0, 0x20),
.start = 0xe0050080, DEFINE_RES_IRQ(101),
.end = 0xe00500ab, DEFINE_RES_IRQ(102),
.flags = IORESOURCE_MEM,
},
[1] = {
.name = "GIO_032",
.start = 0xe00500c0,
.end = 0xe00500df,
.flags = IORESOURCE_MEM,
},
[2] = {
.start = 101,
.flags = IORESOURCE_IRQ,
},
[3] = {
.start = 102,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device gio1_device = {
.name = "em_gio",
.id = 1,
.resource = gio1_resources,
.num_resources = ARRAY_SIZE(gio1_resources),
.dev = {
.platform_data = &gio1_config,
},
}; };
static struct gpio_em_config gio2_config = { static struct gpio_em_config gio2_config = {
@ -246,36 +124,10 @@ static struct gpio_em_config gio2_config = {
}; };
static struct resource gio2_resources[] = { static struct resource gio2_resources[] = {
[0] = { DEFINE_RES_MEM(0xe0050100, 0x2c),
.name = "GIO_064", DEFINE_RES_MEM(0xe0050140, 0x20),
.start = 0xe0050100, DEFINE_RES_IRQ(103),
.end = 0xe005012b, DEFINE_RES_IRQ(104),
.flags = IORESOURCE_MEM,
},
[1] = {
.name = "GIO_064",
.start = 0xe0050140,
.end = 0xe005015f,
.flags = IORESOURCE_MEM,
},
[2] = {
.start = 103,
.flags = IORESOURCE_IRQ,
},
[3] = {
.start = 104,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device gio2_device = {
.name = "em_gio",
.id = 2,
.resource = gio2_resources,
.num_resources = ARRAY_SIZE(gio2_resources),
.dev = {
.platform_data = &gio2_config,
},
}; };
static struct gpio_em_config gio3_config = { static struct gpio_em_config gio3_config = {
@ -285,36 +137,10 @@ static struct gpio_em_config gio3_config = {
}; };
static struct resource gio3_resources[] = { static struct resource gio3_resources[] = {
[0] = { DEFINE_RES_MEM(0xe0050180, 0x2c),
.name = "GIO_096", DEFINE_RES_MEM(0xe00501c0, 0x20),
.start = 0xe0050180, DEFINE_RES_IRQ(105),
.end = 0xe00501ab, DEFINE_RES_IRQ(106),
.flags = IORESOURCE_MEM,
},
[1] = {
.name = "GIO_096",
.start = 0xe00501c0,
.end = 0xe00501df,
.flags = IORESOURCE_MEM,
},
[2] = {
.start = 105,
.flags = IORESOURCE_IRQ,
},
[3] = {
.start = 106,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device gio3_device = {
.name = "em_gio",
.id = 3,
.resource = gio3_resources,
.num_resources = ARRAY_SIZE(gio3_resources),
.dev = {
.platform_data = &gio3_config,
},
}; };
static struct gpio_em_config gio4_config = { static struct gpio_em_config gio4_config = {
@ -324,126 +150,52 @@ static struct gpio_em_config gio4_config = {
}; };
static struct resource gio4_resources[] = { static struct resource gio4_resources[] = {
[0] = { DEFINE_RES_MEM(0xe0050200, 0x2c),
.name = "GIO_128", DEFINE_RES_MEM(0xe0050240, 0x20),
.start = 0xe0050200, DEFINE_RES_IRQ(107),
.end = 0xe005022b, DEFINE_RES_IRQ(108),
.flags = IORESOURCE_MEM,
},
[1] = {
.name = "GIO_128",
.start = 0xe0050240,
.end = 0xe005025f,
.flags = IORESOURCE_MEM,
},
[2] = {
.start = 107,
.flags = IORESOURCE_IRQ,
},
[3] = {
.start = 108,
.flags = IORESOURCE_IRQ,
},
}; };
static struct platform_device gio4_device = { #define emev2_register_gio(idx) \
.name = "em_gio", platform_device_register_resndata(&platform_bus, "em_gio", \
.id = 4, idx, gio##idx##_resources, \
.resource = gio4_resources, ARRAY_SIZE(gio##idx##_resources), \
.num_resources = ARRAY_SIZE(gio4_resources), &gio##idx##_config, \
.dev = { sizeof(struct gpio_em_config))
.platform_data = &gio4_config,
},
};
static struct resource pmu_resources[] = { static struct resource pmu_resources[] = {
[0] = { DEFINE_RES_IRQ(152),
.start = 152, DEFINE_RES_IRQ(153),
.end = 152,
.flags = IORESOURCE_IRQ,
},
[1] = {
.start = 153,
.end = 153,
.flags = IORESOURCE_IRQ,
},
}; };
static struct platform_device pmu_device = { #define emev2_register_pmu() \
.name = "arm-pmu", platform_device_register_simple("arm-pmu", -1, \
.id = -1, pmu_resources, \
.num_resources = ARRAY_SIZE(pmu_resources), ARRAY_SIZE(pmu_resources))
.resource = pmu_resources,
};
static struct platform_device *emev2_early_devices[] __initdata = {
&uart0_device,
&uart1_device,
&uart2_device,
&uart3_device,
};
static struct platform_device *emev2_late_devices[] __initdata = {
&sti_device,
&gio0_device,
&gio1_device,
&gio2_device,
&gio3_device,
&gio4_device,
&pmu_device,
};
void __init emev2_add_standard_devices(void) void __init emev2_add_standard_devices(void)
{ {
emev2_clock_init(); emev2_clock_init();
platform_add_devices(emev2_early_devices, emev2_register_uart(0);
ARRAY_SIZE(emev2_early_devices)); emev2_register_uart(1);
emev2_register_uart(2);
platform_add_devices(emev2_late_devices, emev2_register_uart(3);
ARRAY_SIZE(emev2_late_devices)); emev2_register_sti();
emev2_register_gio(0);
emev2_register_gio(1);
emev2_register_gio(2);
emev2_register_gio(3);
emev2_register_gio(4);
emev2_register_pmu();
} }
static void __init emev2_init_delay(void) void __init emev2_init_delay(void)
{ {
shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */ shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */
} }
void __init emev2_add_early_devices(void)
{
emev2_init_delay();
early_platform_add_devices(emev2_early_devices,
ARRAY_SIZE(emev2_early_devices));
/* setup early console here as well */
shmobile_setup_console();
}
void __init emev2_init_irq(void)
{
void __iomem *gic_dist_base;
void __iomem *gic_cpu_base;
/* Static mappings, never released */
gic_dist_base = ioremap(0xe0028000, PAGE_SIZE);
gic_cpu_base = ioremap(0xe0020000, PAGE_SIZE);
BUG_ON(!gic_dist_base || !gic_cpu_base);
/* Use GIC to handle interrupts */
gic_init(0, 29, gic_dist_base, gic_cpu_base);
}
#ifdef CONFIG_USE_OF #ifdef CONFIG_USE_OF
static const struct of_dev_auxdata emev2_auxdata_lookup[] __initconst = {
{ }
};
static void __init emev2_add_standard_devices_dt(void)
{
of_platform_populate(NULL, of_default_bus_match_table,
emev2_auxdata_lookup, NULL);
}
static const char *emev2_boards_compat_dt[] __initdata = { static const char *emev2_boards_compat_dt[] __initdata = {
"renesas,emev2", "renesas,emev2",
@ -452,10 +204,8 @@ static const char *emev2_boards_compat_dt[] __initdata = {
DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)") DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
.smp = smp_ops(emev2_smp_ops), .smp = smp_ops(emev2_smp_ops),
.map_io = emev2_map_io,
.init_early = emev2_init_delay, .init_early = emev2_init_delay,
.nr_irqs = NR_IRQS_LEGACY,
.init_irq = irqchip_init,
.init_machine = emev2_add_standard_devices_dt,
.dt_compat = emev2_boards_compat_dt, .dt_compat = emev2_boards_compat_dt,
MACHINE_END MACHINE_END

View File

@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqchip.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/platform_data/irq-renesas-irqc.h> #include <linux/platform_data/irq-renesas-irqc.h>
@ -194,7 +193,6 @@ static const char *r8a73a4_boards_compat_dt[] __initdata = {
}; };
DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)") DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)")
.init_irq = irqchip_init,
.init_machine = r8a73a4_add_standard_devices_dt, .init_machine = r8a73a4_add_standard_devices_dt,
.init_time = shmobile_timer_init, .init_time = shmobile_timer_init,
.dt_compat = r8a73a4_boards_compat_dt, .dt_compat = r8a73a4_boards_compat_dt,

View File

@ -986,16 +986,22 @@ void __init r8a7740_add_early_devices(void)
#ifdef CONFIG_USE_OF #ifdef CONFIG_USE_OF
static const struct of_dev_auxdata r8a7740_auxdata_lookup[] __initconst = { void __init r8a7740_add_early_devices_dt(void)
{ } {
}; shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
early_platform_add_devices(r8a7740_early_devices,
ARRAY_SIZE(r8a7740_early_devices));
/* setup early console here as well */
shmobile_setup_console();
}
void __init r8a7740_add_standard_devices_dt(void) void __init r8a7740_add_standard_devices_dt(void)
{ {
platform_add_devices(r8a7740_devices_dt, platform_add_devices(r8a7740_devices_dt,
ARRAY_SIZE(r8a7740_devices_dt)); ARRAY_SIZE(r8a7740_devices_dt));
of_platform_populate(NULL, of_default_bus_match_table, of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
r8a7740_auxdata_lookup, NULL);
} }
void __init r8a7740_init_delay(void) void __init r8a7740_init_delay(void)

View File

@ -53,7 +53,7 @@
.irqs = SCIx_IRQ_MUXED(irq), \ .irqs = SCIx_IRQ_MUXED(irq), \
} }
static struct plat_sci_port scif_platform_data[] = { static struct plat_sci_port scif_platform_data[] __initdata = {
SCIF_INFO(0xffe40000, gic_iid(0x66)), SCIF_INFO(0xffe40000, gic_iid(0x66)),
SCIF_INFO(0xffe41000, gic_iid(0x67)), SCIF_INFO(0xffe41000, gic_iid(0x67)),
SCIF_INFO(0xffe42000, gic_iid(0x68)), SCIF_INFO(0xffe42000, gic_iid(0x68)),
@ -63,24 +63,24 @@ static struct plat_sci_port scif_platform_data[] = {
}; };
/* TMU */ /* TMU */
static struct resource sh_tmu0_resources[] = { static struct resource sh_tmu0_resources[] __initdata = {
DEFINE_RES_MEM(0xffd80008, 12), DEFINE_RES_MEM(0xffd80008, 12),
DEFINE_RES_IRQ(gic_iid(0x40)), DEFINE_RES_IRQ(gic_iid(0x40)),
}; };
static struct sh_timer_config sh_tmu0_platform_data = { static struct sh_timer_config sh_tmu0_platform_data __initdata = {
.name = "TMU00", .name = "TMU00",
.channel_offset = 0x4, .channel_offset = 0x4,
.timer_bit = 0, .timer_bit = 0,
.clockevent_rating = 200, .clockevent_rating = 200,
}; };
static struct resource sh_tmu1_resources[] = { static struct resource sh_tmu1_resources[] __initdata = {
DEFINE_RES_MEM(0xffd80014, 12), DEFINE_RES_MEM(0xffd80014, 12),
DEFINE_RES_IRQ(gic_iid(0x41)), DEFINE_RES_IRQ(gic_iid(0x41)),
}; };
static struct sh_timer_config sh_tmu1_platform_data = { static struct sh_timer_config sh_tmu1_platform_data __initdata = {
.name = "TMU01", .name = "TMU01",
.channel_offset = 0x10, .channel_offset = 0x10,
.timer_bit = 1, .timer_bit = 1,
@ -189,7 +189,7 @@ USB_PLATFORM_INFO(ehci);
USB_PLATFORM_INFO(ohci); USB_PLATFORM_INFO(ohci);
/* Ether */ /* Ether */
static struct resource ether_resources[] = { static struct resource ether_resources[] __initdata = {
DEFINE_RES_MEM(0xfde00000, 0x400), DEFINE_RES_MEM(0xfde00000, 0x400),
DEFINE_RES_IRQ(gic_iid(0x89)), DEFINE_RES_IRQ(gic_iid(0x89)),
}; };
@ -203,17 +203,17 @@ void __init r8a7778_add_ether_device(struct sh_eth_plat_data *pdata)
} }
/* PFC/GPIO */ /* PFC/GPIO */
static struct resource pfc_resources[] = { static struct resource pfc_resources[] __initdata = {
DEFINE_RES_MEM(0xfffc0000, 0x118), DEFINE_RES_MEM(0xfffc0000, 0x118),
}; };
#define R8A7778_GPIO(idx) \ #define R8A7778_GPIO(idx) \
static struct resource r8a7778_gpio##idx##_resources[] = { \ static struct resource r8a7778_gpio##idx##_resources[] __initdata = { \
DEFINE_RES_MEM(0xffc40000 + 0x1000 * (idx), 0x30), \ DEFINE_RES_MEM(0xffc40000 + 0x1000 * (idx), 0x30), \
DEFINE_RES_IRQ(gic_iid(0x87)), \ DEFINE_RES_IRQ(gic_iid(0x87)), \
}; \ }; \
\ \
static struct gpio_rcar_config r8a7778_gpio##idx##_platform_data = { \ static struct gpio_rcar_config r8a7778_gpio##idx##_platform_data __initdata = { \
.gpio_base = 32 * (idx), \ .gpio_base = 32 * (idx), \
.irq_base = GPIO_IRQ_BASE(idx), \ .irq_base = GPIO_IRQ_BASE(idx), \
.number_of_pins = 32, \ .number_of_pins = 32, \
@ -249,7 +249,7 @@ void __init r8a7778_pinmux_init(void)
}; };
/* SDHI */ /* SDHI */
static struct resource sdhi_resources[] = { static struct resource sdhi_resources[] __initdata = {
/* SDHI0 */ /* SDHI0 */
DEFINE_RES_MEM(0xFFE4C000, 0x100), DEFINE_RES_MEM(0xFFE4C000, 0x100),
DEFINE_RES_IRQ(gic_iid(0x77)), DEFINE_RES_IRQ(gic_iid(0x77)),
@ -365,12 +365,12 @@ void __init r8a7778_init_late(void)
platform_device_register_full(&ohci_info); platform_device_register_full(&ohci_info);
} }
static struct renesas_intc_irqpin_config irqpin_platform_data = { static struct renesas_intc_irqpin_config irqpin_platform_data __initdata = {
.irq_base = irq_pin(0), /* IRQ0 -> IRQ3 */ .irq_base = irq_pin(0), /* IRQ0 -> IRQ3 */
.sense_bitfield_width = 2, .sense_bitfield_width = 2,
}; };
static struct resource irqpin_resources[] = { static struct resource irqpin_resources[] __initdata = {
DEFINE_RES_MEM(0xfe78001c, 4), /* ICR1 */ DEFINE_RES_MEM(0xfe78001c, 4), /* ICR1 */
DEFINE_RES_MEM(0xfe780010, 4), /* INTPRI */ DEFINE_RES_MEM(0xfe780010, 4), /* INTPRI */
DEFINE_RES_MEM(0xfe780024, 4), /* INTREQ */ DEFINE_RES_MEM(0xfe780024, 4), /* INTREQ */
@ -408,17 +408,25 @@ void __init r8a7778_init_irq_extpin(int irlm)
&irqpin_platform_data, sizeof(irqpin_platform_data)); &irqpin_platform_data, sizeof(irqpin_platform_data));
} }
void __init r8a7778_init_delay(void)
{
shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
}
#ifdef CONFIG_USE_OF
#define INT2SMSKCR0 0x82288 /* 0xfe782288 */ #define INT2SMSKCR0 0x82288 /* 0xfe782288 */
#define INT2SMSKCR1 0x8228c /* 0xfe78228c */ #define INT2SMSKCR1 0x8228c /* 0xfe78228c */
#define INT2NTSR0 0x00018 /* 0xfe700018 */ #define INT2NTSR0 0x00018 /* 0xfe700018 */
#define INT2NTSR1 0x0002c /* 0xfe70002c */ #define INT2NTSR1 0x0002c /* 0xfe70002c */
static void __init r8a7778_init_irq_common(void) void __init r8a7778_init_irq_dt(void)
{ {
void __iomem *base = ioremap_nocache(0xfe700000, 0x00100000); void __iomem *base = ioremap_nocache(0xfe700000, 0x00100000);
BUG_ON(!base); BUG_ON(!base);
irqchip_init();
/* route all interrupts to ARM */ /* route all interrupts to ARM */
__raw_writel(0x73ffffff, base + INT2NTSR0); __raw_writel(0x73ffffff, base + INT2NTSR0);
__raw_writel(0xffffffff, base + INT2NTSR1); __raw_writel(0xffffffff, base + INT2NTSR1);
@ -430,43 +438,6 @@ static void __init r8a7778_init_irq_common(void)
iounmap(base); iounmap(base);
} }
void __init r8a7778_init_irq(void)
{
void __iomem *gic_dist_base;
void __iomem *gic_cpu_base;
gic_dist_base = ioremap_nocache(0xfe438000, PAGE_SIZE);
gic_cpu_base = ioremap_nocache(0xfe430000, PAGE_SIZE);
BUG_ON(!gic_dist_base || !gic_cpu_base);
/* use GIC to handle interrupts */
gic_init(0, 29, gic_dist_base, gic_cpu_base);
r8a7778_init_irq_common();
}
void __init r8a7778_init_delay(void)
{
shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
}
#ifdef CONFIG_USE_OF
void __init r8a7778_init_irq_dt(void)
{
irqchip_init();
r8a7778_init_irq_common();
}
static const struct of_dev_auxdata r8a7778_auxdata_lookup[] __initconst = {
{},
};
void __init r8a7778_add_standard_devices_dt(void)
{
of_platform_populate(NULL, of_default_bus_match_table,
r8a7778_auxdata_lookup, NULL);
}
static const char *r8a7778_compat_dt[] __initdata = { static const char *r8a7778_compat_dt[] __initdata = {
"renesas,r8a7778", "renesas,r8a7778",
NULL, NULL,
@ -475,7 +446,6 @@ static const char *r8a7778_compat_dt[] __initdata = {
DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)") DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)")
.init_early = r8a7778_init_delay, .init_early = r8a7778_init_delay,
.init_irq = r8a7778_init_irq_dt, .init_irq = r8a7778_init_irq_dt,
.init_machine = r8a7778_add_standard_devices_dt,
.init_time = shmobile_timer_init, .init_time = shmobile_timer_init,
.dt_compat = r8a7778_compat_dt, .dt_compat = r8a7778_compat_dt,
.init_late = r8a7778_init_late, .init_late = r8a7778_init_late,

View File

@ -665,10 +665,6 @@ void __init r8a7779_init_delay(void)
shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */ shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */
} }
static const struct of_dev_auxdata r8a7779_auxdata_lookup[] __initconst = {
{},
};
void __init r8a7779_add_standard_devices_dt(void) void __init r8a7779_add_standard_devices_dt(void)
{ {
/* clocks are setup late during boot in the case of DT */ /* clocks are setup late during boot in the case of DT */
@ -676,8 +672,7 @@ void __init r8a7779_add_standard_devices_dt(void)
platform_add_devices(r8a7779_devices_dt, platform_add_devices(r8a7779_devices_dt,
ARRAY_SIZE(r8a7779_devices_dt)); ARRAY_SIZE(r8a7779_devices_dt));
of_platform_populate(NULL, of_default_bus_match_table, of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
r8a7779_auxdata_lookup, NULL);
} }
static const char *r8a7779_compat_dt[] __initdata = { static const char *r8a7779_compat_dt[] __initdata = {

View File

@ -19,7 +19,6 @@
*/ */
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqchip.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/serial_sci.h> #include <linux/serial_sci.h>
@ -177,10 +176,6 @@ void __init r8a7790_timer_init(void)
} }
#ifdef CONFIG_USE_OF #ifdef CONFIG_USE_OF
void __init r8a7790_add_standard_devices_dt(void)
{
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
static const char *r8a7790_boards_compat_dt[] __initdata = { static const char *r8a7790_boards_compat_dt[] __initdata = {
"renesas,r8a7790", "renesas,r8a7790",
@ -188,8 +183,6 @@ static const char *r8a7790_boards_compat_dt[] __initdata = {
}; };
DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)")
.init_irq = irqchip_init,
.init_machine = r8a7790_add_standard_devices_dt,
.init_time = r8a7790_timer_init, .init_time = r8a7790_timer_init,
.dt_compat = r8a7790_boards_compat_dt, .dt_compat = r8a7790_boards_compat_dt,
MACHINE_END MACHINE_END

View File

@ -1147,10 +1147,6 @@ void __init sh7372_add_early_devices_dt(void)
shmobile_setup_console(); shmobile_setup_console();
} }
static const struct of_dev_auxdata sh7372_auxdata_lookup[] __initconst = {
{ }
};
void __init sh7372_add_standard_devices_dt(void) void __init sh7372_add_standard_devices_dt(void)
{ {
/* clocks are setup late during boot in the case of DT */ /* clocks are setup late during boot in the case of DT */
@ -1159,8 +1155,7 @@ void __init sh7372_add_standard_devices_dt(void)
platform_add_devices(sh7372_early_devices, platform_add_devices(sh7372_early_devices,
ARRAY_SIZE(sh7372_early_devices)); ARRAY_SIZE(sh7372_early_devices));
of_platform_populate(NULL, of_default_bus_match_table, of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
sh7372_auxdata_lookup, NULL);
} }
static const char *sh7372_boards_compat_dt[] __initdata = { static const char *sh7372_boards_compat_dt[] __initdata = {

View File

@ -22,7 +22,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqchip.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/delay.h> #include <linux/delay.h>
@ -61,29 +60,16 @@ void __init sh73a0_map_io(void)
iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc)); iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc));
} }
static struct resource sh73a0_pfc_resources[] = { /* PFC */
[0] = { static struct resource pfc_resources[] __initdata = {
.start = 0xe6050000, DEFINE_RES_MEM(0xe6050000, 0x8000),
.end = 0xe6057fff, DEFINE_RES_MEM(0xe605801c, 0x000c),
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 0xe605801c,
.end = 0xe6058027,
.flags = IORESOURCE_MEM,
}
};
static struct platform_device sh73a0_pfc_device = {
.name = "pfc-sh73a0",
.id = -1,
.resource = sh73a0_pfc_resources,
.num_resources = ARRAY_SIZE(sh73a0_pfc_resources),
}; };
void __init sh73a0_pinmux_init(void) void __init sh73a0_pinmux_init(void)
{ {
platform_device_register(&sh73a0_pfc_device); platform_device_register_simple("pfc-sh73a0", -1, pfc_resources,
ARRAY_SIZE(pfc_resources));
} }
static struct plat_sci_port scif0_platform_data = { static struct plat_sci_port scif0_platform_data = {
@ -958,10 +944,6 @@ void __init sh73a0_add_early_devices(void)
#ifdef CONFIG_USE_OF #ifdef CONFIG_USE_OF
static const struct of_dev_auxdata sh73a0_auxdata_lookup[] __initconst = {
{},
};
void __init sh73a0_add_standard_devices_dt(void) void __init sh73a0_add_standard_devices_dt(void)
{ {
struct platform_device_info devinfo = { .name = "cpufreq-cpu0", .id = -1, }; struct platform_device_info devinfo = { .name = "cpufreq-cpu0", .id = -1, };
@ -971,8 +953,7 @@ void __init sh73a0_add_standard_devices_dt(void)
platform_add_devices(sh73a0_devices_dt, platform_add_devices(sh73a0_devices_dt,
ARRAY_SIZE(sh73a0_devices_dt)); ARRAY_SIZE(sh73a0_devices_dt));
of_platform_populate(NULL, of_default_bus_match_table, of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
sh73a0_auxdata_lookup, NULL);
/* Instantiate cpufreq-cpu0 */ /* Instantiate cpufreq-cpu0 */
platform_device_register_full(&devinfo); platform_device_register_full(&devinfo);
@ -988,7 +969,6 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)")
.map_io = sh73a0_map_io, .map_io = sh73a0_map_io,
.init_early = sh73a0_init_delay, .init_early = sh73a0_init_delay,
.nr_irqs = NR_IRQS_LEGACY, .nr_irqs = NR_IRQS_LEGACY,
.init_irq = irqchip_init,
.init_machine = sh73a0_add_standard_devices_dt, .init_machine = sh73a0_add_standard_devices_dt,
.dt_compat = sh73a0_boards_compat_dt, .dt_compat = sh73a0_boards_compat_dt,
MACHINE_END MACHINE_END

View File

@ -38,9 +38,12 @@ static int __cpuinit emev2_boot_secondary(unsigned int cpu, struct task_struct *
static void __init emev2_smp_prepare_cpus(unsigned int max_cpus) static void __init emev2_smp_prepare_cpus(unsigned int max_cpus)
{ {
/* setup EMEV2 specific SCU base, enable */
shmobile_scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE);
scu_enable(shmobile_scu_base); scu_enable(shmobile_scu_base);
/* Tell ROM loader about our vector (in headsmp-scu.S, headsmp.S) */ /* Tell ROM loader about our vector (in headsmp-scu.S, headsmp.S) */
emev2_clock_init(); /* need ioremapped SMU */
emev2_set_boot_vector(__pa(shmobile_boot_vector)); emev2_set_boot_vector(__pa(shmobile_boot_vector));
shmobile_boot_fn = virt_to_phys(shmobile_boot_scu); shmobile_boot_fn = virt_to_phys(shmobile_boot_scu);
shmobile_boot_arg = (unsigned long)shmobile_scu_base; shmobile_boot_arg = (unsigned long)shmobile_scu_base;
@ -49,21 +52,7 @@ static void __init emev2_smp_prepare_cpus(unsigned int max_cpus)
scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL); scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL);
} }
static void __init emev2_smp_init_cpus(void)
{
unsigned int ncores;
/* setup EMEV2 specific SCU base */
shmobile_scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE);
emev2_clock_init(); /* need ioremapped SMU */
ncores = shmobile_scu_base ? scu_get_core_count(shmobile_scu_base) : 1;
shmobile_smp_init_cpus(ncores);
}
struct smp_operations emev2_smp_ops __initdata = { struct smp_operations emev2_smp_ops __initdata = {
.smp_init_cpus = emev2_smp_init_cpus,
.smp_prepare_cpus = emev2_smp_prepare_cpus, .smp_prepare_cpus = emev2_smp_prepare_cpus,
.smp_boot_secondary = emev2_boot_secondary, .smp_boot_secondary = emev2_boot_secondary,
}; };