mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 16:44:10 +08:00
f465d145d7
This is a patch series from Shawn Guo that moves from individual late_initcalls() to using a member in the machine structure to invoke a platform's late initcalls. This cleanup is a step in the move towards multiplatform kernels since it would reduce the need to check for compatible platforms in each and every initcall. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJPwHYJAAoJEIwa5zzehBx3PugP/2Wd6HN030iO5EhFBcBcrh5T WaJ4KfzK3tWev5QA3idvenVNhk5My1HQ+PLij7BLpjNqKCKlNK0k/K9wMI5X827T wkFFprdUcoMVrB1ZCjzwCk4/uTGWB5BMxoZ6mlBh1sZIR/yXo91t+wO971Uqr0ho Ky1oW9uaPZ6Eja00iDLkfJfygquA5+zNb0a29q19zWnHlRkH76jtqZgfDKy9I2nq virYZ4uhoPnY2g1JxhnaMNNC861CgfTDEtmtNjgeEbA6t9bbjqsZoQRhcYHZP4OM a4Iu8FOyIvAAzQzUglfAZ4Ar4uYTmVRnG39XFh4wK/8tJYt0hEQwFS26B0pYKx/5 F76bwc4SqO7H9AWBF0WhyUbny5XmJcNwJjobm/oCeAvemTi3xA6BbubyfKMHPoIr dDSEqcAcMt9G6sS48h3Pm0caEYDVzxf202vdylz1JABiJZi1W/7v+NMdhujfotJh 7IGehNRu0foPEsRIS9wsvD2TzSdQtDdjyFkGHd83XMc3JpvwmyePO6ynbbxrVnJJ HzlPnbLIk3VyqyVCqVXj21NKEY1dbsYPItketAwwzc1BUGcld0qvQY/t/UI4JQT6 9vq77AwNjUhfomDdEWTp7aNx0whkY0R5KEY9jHjuu9WoE+xdPZbQKm589AJ6LA4U j6HPMzWKUHOKT6g10rCl =21h6 -----END PGP SIGNATURE----- Merge tag 'cleanup-initcall' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull sweeping late_initcall cleanup for arm-soc from Olof Johansson: "This is a patch series from Shawn Guo that moves from individual late_initcalls() to using a member in the machine structure to invoke a platform's late initcalls. This cleanup is a step in the move towards multiplatform kernels since it would reduce the need to check for compatible platforms in each and every initcall." Fix up trivial conflicts in arch/arm/mach-{exynos/mach-universal_c210.c, imx/mach-cpuimx51.c, omap2/board-generic.c} due to changes nearby (and, in the case of cpuimx51.c the board support being deleted) * tag 'cleanup-initcall' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: ux500: use machine specific hook for late init ARM: tegra: use machine specific hook for late init ARM: shmobile: use machine specific hook for late init ARM: sa1100: use machine specific hook for late init ARM: s3c64xx: use machine specific hook for late init ARM: prima2: use machine specific hook for late init ARM: pnx4008: use machine specific hook for late init ARM: omap2: use machine specific hook for late init ARM: omap1: use machine specific hook for late init ARM: msm: use machine specific hook for late init ARM: imx: use machine specific hook for late init ARM: exynos: use machine specific hook for late init ARM: ep93xx: use machine specific hook for late init ARM: davinci: use machine specific hook for late init ARM: provide a late_initcall hook for platform initialization
84 lines
2.8 KiB
C
84 lines
2.8 KiB
C
/*
|
|
* SAMSUNG EXYNOS5250 Flattened Device Tree enabled machine
|
|
*
|
|
* Copyright (c) 2012 Samsung Electronics Co., Ltd.
|
|
* http://www.samsung.com
|
|
*
|
|
* 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/of_platform.h>
|
|
#include <linux/serial_core.h>
|
|
|
|
#include <asm/mach/arch.h>
|
|
#include <asm/hardware/gic.h>
|
|
#include <mach/map.h>
|
|
|
|
#include <plat/cpu.h>
|
|
#include <plat/regs-serial.h>
|
|
|
|
#include "common.h"
|
|
|
|
/*
|
|
* The following lookup table is used to override device names when devices
|
|
* are registered from device tree. This is temporarily added to enable
|
|
* device tree support addition for the EXYNOS5 architecture.
|
|
*
|
|
* For drivers that require platform data to be provided from the machine
|
|
* file, a platform data pointer can also be supplied along with the
|
|
* devices names. Usually, the platform data elements that cannot be parsed
|
|
* from the device tree by the drivers (example: function pointers) are
|
|
* supplied. But it should be noted that this is a temporary mechanism and
|
|
* at some point, the drivers should be capable of parsing all the platform
|
|
* data from the device tree.
|
|
*/
|
|
static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = {
|
|
OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5_PA_UART0,
|
|
"exynos4210-uart.0", NULL),
|
|
OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5_PA_UART1,
|
|
"exynos4210-uart.1", NULL),
|
|
OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5_PA_UART2,
|
|
"exynos4210-uart.2", NULL),
|
|
OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5_PA_UART3,
|
|
"exynos4210-uart.3", NULL),
|
|
OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS5_PA_IIC(0),
|
|
"s3c2440-i2c.0", NULL),
|
|
OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS5_PA_IIC(1),
|
|
"s3c2440-i2c.1", NULL),
|
|
OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA0, "dma-pl330.0", NULL),
|
|
OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA1, "dma-pl330.1", NULL),
|
|
OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_MDMA1, "dma-pl330.2", NULL),
|
|
{},
|
|
};
|
|
|
|
static void __init exynos5250_dt_map_io(void)
|
|
{
|
|
exynos_init_io(NULL, 0);
|
|
s3c24xx_init_clocks(24000000);
|
|
}
|
|
|
|
static void __init exynos5250_dt_machine_init(void)
|
|
{
|
|
of_platform_populate(NULL, of_default_bus_match_table,
|
|
exynos5250_auxdata_lookup, NULL);
|
|
}
|
|
|
|
static char const *exynos5250_dt_compat[] __initdata = {
|
|
"samsung,exynos5250",
|
|
NULL
|
|
};
|
|
|
|
DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)")
|
|
/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
|
|
.init_irq = exynos5_init_irq,
|
|
.map_io = exynos5250_dt_map_io,
|
|
.handle_irq = gic_handle_irq,
|
|
.init_machine = exynos5250_dt_machine_init,
|
|
.init_late = exynos_init_late,
|
|
.timer = &exynos4_timer,
|
|
.dt_compat = exynos5250_dt_compat,
|
|
.restart = exynos5_restart,
|
|
MACHINE_END
|