mirror of
https://github.com/torvalds/linux.git
synced 2024-12-25 12:21:37 +00:00
93ce285503
This pull request adds support for I2C0 and watchdog timer for DA850 EVM booting using device tree. It also enables machine reboot when using device tree. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAABAgAGBQJRFoKmAAoJEGFBu2jqvgRN0PMP/jRz7la56By25SrTx0mf8RLt MY8KqLEipoVSATEv5W/SzE7Py1PKQXKFERU6JB14/JwU/+68NfPYfWcRPJ5Ya7/a vDM7QTSllOjAPRFjpviUD4E5PRz7HV6odYb9l/lKMXhAV7+0X/I14T6k4gEd/3pw TdhcLRQpPyCr8HKBfnw3n0fHtWo5Zt5J7wze66vL13CIHtPaoIAY7UUN/KggSum6 mHZ3G/Po+iQjkaRyTl0O/sTTkNA3CCp9bVb7v0DXHs6Im283jdVaPX9s5HsuN7Jw mzs3VTtS1E7is/WJbywy8ry2pjMJozJdRDWYse7wDGzTgCteQsJrQ3+C1H68IvPN +Phb4NZhrU8clnYtMvCIENiUsK7jNrRbzDPEGLEQa/Z5apqHLFbtWa/Qx88aqALg QdQsMgG92ZThIJ+LNaLj4fvHH9xnJjYBvYMiaKSwiTWs0b+zILQG+9Dfo8eFpQj+ PgXIhYW5Cg7CP3AqVyS6E2VSV36HCo0pSZ6aaBW6wvoCXDkOEHbxi0NpgvCWCIXK svKGDbrSqsHnnAJz8xfeuuqpU30YqOAtScfdjfdSTUXVyOSzRD5Tb0bCK4YCpyqm gCFWRx9y3BlP7AT4RYKKH+JJgkUEmAX7MO0EOIwk9FzxapE3dbNAcV51NoffAILl M/jfDPHuPZLiG3zBfa+0 =d1si -----END PGP SIGNATURE----- Merge tag 'davinci-for-v3.9/dt-2' of git://gitorious.org/linux-davinci/linux-davinci into next/dt From Sekhar Nori: Second round of DT updates for DaVinci. This pull request adds support for I2C0 and watchdog timer for DA850 EVM booting using device tree. It also enables machine reboot when using device tree. * tag 'davinci-for-v3.9/dt-2' of git://gitorious.org/linux-davinci/linux-davinci: ARM: davinci: da850 DT: add support for machine reboot ARM: davinci: da850: add wdt DT node ARM: davinci: da850: add DT node for I2C0
74 lines
1.7 KiB
C
74 lines
1.7 KiB
C
/*
|
|
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
|
|
*
|
|
* Modified from mach-omap/omap2/board-generic.c
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
#include <linux/io.h>
|
|
#include <linux/of_irq.h>
|
|
#include <linux/of_platform.h>
|
|
#include <linux/irqdomain.h>
|
|
|
|
#include <asm/mach/arch.h>
|
|
|
|
#include <mach/common.h>
|
|
#include <mach/cp_intc.h>
|
|
#include <mach/da8xx.h>
|
|
|
|
#define DA8XX_NUM_UARTS 3
|
|
|
|
void __init da8xx_uart_clk_enable(void)
|
|
{
|
|
int i;
|
|
for (i = 0; i < DA8XX_NUM_UARTS; i++)
|
|
davinci_serial_setup_clk(i, NULL);
|
|
}
|
|
|
|
static struct of_device_id da8xx_irq_match[] __initdata = {
|
|
{ .compatible = "ti,cp-intc", .data = cp_intc_of_init, },
|
|
{ }
|
|
};
|
|
|
|
static void __init da8xx_init_irq(void)
|
|
{
|
|
of_irq_init(da8xx_irq_match);
|
|
}
|
|
|
|
struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
|
|
OF_DEV_AUXDATA("ti,davinci-i2c", 0x01c22000, "i2c_davinci.1", NULL),
|
|
OF_DEV_AUXDATA("ti,davinci-wdt", 0x01c21000, "watchdog", NULL),
|
|
{}
|
|
};
|
|
|
|
#ifdef CONFIG_ARCH_DAVINCI_DA850
|
|
|
|
static void __init da850_init_machine(void)
|
|
{
|
|
of_platform_populate(NULL, of_default_bus_match_table,
|
|
da850_auxdata_lookup, NULL);
|
|
|
|
da8xx_uart_clk_enable();
|
|
}
|
|
|
|
static const char *da850_boards_compat[] __initdata = {
|
|
"enbw,cmc",
|
|
"ti,da850-evm",
|
|
"ti,da850",
|
|
NULL,
|
|
};
|
|
|
|
DT_MACHINE_START(DA850_DT, "Generic DA850/OMAP-L138/AM18x")
|
|
.map_io = da850_init,
|
|
.init_irq = da8xx_init_irq,
|
|
.init_time = davinci_timer_init,
|
|
.init_machine = da850_init_machine,
|
|
.dt_compat = da850_boards_compat,
|
|
.init_late = davinci_init_late,
|
|
.restart = da8xx_restart,
|
|
MACHINE_END
|
|
|
|
#endif
|