Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319265
b: refs/heads/master
c: 755d57b
h: refs/heads/master
i:
  319263: 24759ce
v: v3
  • Loading branch information
Magnus Damm authored and Rafael J. Wysocki committed Jul 6, 2012
1 parent d17c91d commit 7717876
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a330ce3cdaba5202051edf8ae69482e15fdc9db5
refs/heads/master: 755d57b2229bd8cfa1d553c0b6878f2096f55ec3
21 changes: 21 additions & 0 deletions trunk/arch/arm/boot/dts/r8a7740.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Device Tree Source for the r8a7740 SoC
*
* Copyright (C) 2012 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.
*/

/include/ "skeleton.dtsi"

/ {
compatible = "renesas,r8a7740";

cpus {
cpu@0 {
compatible = "arm,cortex-a9";
};
};
};
47 changes: 47 additions & 0 deletions trunk/arch/arm/mach-shmobile/setup-r8a7740.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/init.h>
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/of_platform.h>
#include <linux/serial_sci.h>
#include <linux/sh_dma.h>
#include <linux/sh_timer.h>
Expand Down Expand Up @@ -716,3 +717,49 @@ void __init r8a7740_add_early_devices(void)
/* override timer setup with soc-specific code */
shmobile_timer.init = r8a7740_earlytimer_init;
}

#ifdef CONFIG_USE_OF

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();
}

static const struct of_dev_auxdata r8a7740_auxdata_lookup[] __initconst = {
{ }
};

void __init r8a7740_add_standard_devices_dt(void)
{
/* clocks are setup late during boot in the case of DT */
r8a7740_clock_init(0);

platform_add_devices(r8a7740_early_devices,
ARRAY_SIZE(r8a7740_early_devices));

of_platform_populate(NULL, of_default_bus_match_table,
r8a7740_auxdata_lookup, NULL);
}

static const char *r8a7740_boards_compat_dt[] __initdata = {
"renesas,r8a7740",
NULL,
};

DT_MACHINE_START(SH7372_DT, "Generic R8A7740 (Flattened Device Tree)")
.map_io = r8a7740_map_io,
.init_early = r8a7740_add_early_devices_dt,
.init_irq = r8a7740_init_irq,
.handle_irq = shmobile_handle_irq_intc,
.init_machine = r8a7740_add_standard_devices_dt,
.timer = &shmobile_timer,
.dt_compat = r8a7740_boards_compat_dt,
MACHINE_END

#endif /* CONFIG_USE_OF */

0 comments on commit 7717876

Please sign in to comment.