Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303175
b: refs/heads/master
c: 3b7b705
h: refs/heads/master
i:
  303173: c76e450
  303171: 404b4fc
  303167: 5d7d6cf
v: v3
  • Loading branch information
Magnus Damm authored and Rafael J. Wysocki committed Apr 11, 2012
1 parent 3a1c5f3 commit 529b23d
Show file tree
Hide file tree
Showing 3 changed files with 70 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: 012f825f13d8e5f1007d1f604517dba1b9a5586e
refs/heads/master: 3b7b70552afe351a8bd8fff1eb2d60aab2206576
21 changes: 21 additions & 0 deletions trunk/arch/arm/boot/dts/sh7372.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Device Tree Source for the sh7372 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,sh7372";

cpus {
cpu@0 {
compatible = "arm,cortex-a8";
};
};
};
48 changes: 48 additions & 0 deletions trunk/arch/arm/mach-shmobile/setup-sh7372.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/platform_device.h>
#include <linux/of_platform.h>
#include <linux/uio_driver.h>
#include <linux/delay.h>
#include <linux/input.h>
Expand Down Expand Up @@ -1092,3 +1093,50 @@ void __init sh7372_add_early_devices(void)
/* override timer setup with soc-specific code */
shmobile_timer.init = sh7372_earlytimer_init;
}

#ifdef CONFIG_USE_OF

void __init sh7372_add_early_devices_dt(void)
{
shmobile_setup_delay(800, 1, 3); /* Cortex-A8 @ 800MHz */

early_platform_add_devices(sh7372_early_devices,
ARRAY_SIZE(sh7372_early_devices));

/* setup early console here as well */
shmobile_setup_console();
}

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

void __init sh7372_add_standard_devices_dt(void)
{
/* clocks are setup late during boot in the case of DT */
sh7372_clock_init();

platform_add_devices(sh7372_early_devices,
ARRAY_SIZE(sh7372_early_devices));

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

static const char *sh7372_boards_compat_dt[] __initdata = {
"renesas,sh7372",
NULL,
};

DT_MACHINE_START(SH7372_DT, "Generic SH7372 (Flattened Device Tree)")
.map_io = sh7372_map_io,
.init_early = sh7372_add_early_devices_dt,
.nr_irqs = NR_IRQS_LEGACY,
.init_irq = sh7372_init_irq,
.handle_irq = shmobile_handle_irq_intc,
.init_machine = sh7372_add_standard_devices_dt,
.timer = &shmobile_timer,
.dt_compat = sh7372_boards_compat_dt,
MACHINE_END

#endif /* CONFIG_USE_OF */

0 comments on commit 529b23d

Please sign in to comment.