mirror of
https://github.com/torvalds/linux.git
synced 2024-11-08 05:01:48 +00: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
159 lines
4.1 KiB
C
159 lines
4.1 KiB
C
/* Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
* only version 2 as published by the Free Software Foundation.
|
|
*
|
|
* 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 Street, Fifth Floor, Boston, MA
|
|
* 02110-1301, USA.
|
|
*/
|
|
#include <linux/gpio.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/irq.h>
|
|
#include <linux/platform_device.h>
|
|
#include <linux/delay.h>
|
|
#include <linux/io.h>
|
|
#include <linux/smsc911x.h>
|
|
#include <linux/usb/msm_hsusb.h>
|
|
#include <linux/clkdev.h>
|
|
#include <linux/memblock.h>
|
|
|
|
#include <asm/mach-types.h>
|
|
#include <asm/mach/arch.h>
|
|
#include <asm/memory.h>
|
|
#include <asm/setup.h>
|
|
|
|
#include <mach/board.h>
|
|
#include <mach/msm_iomap.h>
|
|
#include <mach/dma.h>
|
|
|
|
#include <mach/vreg.h>
|
|
#include "devices.h"
|
|
#include "gpiomux.h"
|
|
#include "proc_comm.h"
|
|
|
|
extern struct sys_timer msm_timer;
|
|
|
|
static void __init msm7x30_fixup(struct tag *tag, char **cmdline,
|
|
struct meminfo *mi)
|
|
{
|
|
for (; tag->hdr.size; tag = tag_next(tag))
|
|
if (tag->hdr.tag == ATAG_MEM && tag->u.mem.start == 0x200000) {
|
|
tag->u.mem.start = 0;
|
|
tag->u.mem.size += SZ_2M;
|
|
}
|
|
}
|
|
|
|
static void __init msm7x30_reserve(void)
|
|
{
|
|
memblock_remove(0x0, SZ_2M);
|
|
}
|
|
|
|
static int hsusb_phy_init_seq[] = {
|
|
0x30, 0x32, /* Enable and set Pre-Emphasis Depth to 20% */
|
|
0x02, 0x36, /* Disable CDR Auto Reset feature */
|
|
-1
|
|
};
|
|
|
|
static struct msm_otg_platform_data msm_otg_pdata = {
|
|
.phy_init_seq = hsusb_phy_init_seq,
|
|
.mode = USB_PERIPHERAL,
|
|
.otg_control = OTG_PHY_CONTROL,
|
|
};
|
|
|
|
struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = {
|
|
#ifdef CONFIG_SERIAL_MSM_CONSOLE
|
|
[49] = { /* UART2 RFR */
|
|
.suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN |
|
|
GPIOMUX_FUNC_2 | GPIOMUX_VALID,
|
|
},
|
|
[50] = { /* UART2 CTS */
|
|
.suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN |
|
|
GPIOMUX_FUNC_2 | GPIOMUX_VALID,
|
|
},
|
|
[51] = { /* UART2 RX */
|
|
.suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN |
|
|
GPIOMUX_FUNC_2 | GPIOMUX_VALID,
|
|
},
|
|
[52] = { /* UART2 TX */
|
|
.suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN |
|
|
GPIOMUX_FUNC_2 | GPIOMUX_VALID,
|
|
},
|
|
#endif
|
|
};
|
|
|
|
static struct platform_device *devices[] __initdata = {
|
|
#if defined(CONFIG_SERIAL_MSM) || defined(CONFIG_MSM_SERIAL_DEBUGGER)
|
|
&msm_device_uart2,
|
|
#endif
|
|
&msm_device_smd,
|
|
&msm_device_otg,
|
|
&msm_device_hsusb,
|
|
&msm_device_hsusb_host,
|
|
};
|
|
|
|
static void __init msm7x30_init_irq(void)
|
|
{
|
|
msm_init_irq();
|
|
}
|
|
|
|
static void __init msm7x30_init(void)
|
|
{
|
|
msm_device_otg.dev.platform_data = &msm_otg_pdata;
|
|
msm_device_hsusb.dev.parent = &msm_device_otg.dev;
|
|
msm_device_hsusb_host.dev.parent = &msm_device_otg.dev;
|
|
|
|
platform_add_devices(devices, ARRAY_SIZE(devices));
|
|
}
|
|
|
|
static void __init msm7x30_map_io(void)
|
|
{
|
|
msm_map_msm7x30_io();
|
|
msm_clock_init(msm_clocks_7x30, msm_num_clocks_7x30);
|
|
}
|
|
|
|
static void __init msm7x30_init_late(void)
|
|
{
|
|
smd_debugfs_init();
|
|
}
|
|
|
|
MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
|
|
.atag_offset = 0x100,
|
|
.fixup = msm7x30_fixup,
|
|
.reserve = msm7x30_reserve,
|
|
.map_io = msm7x30_map_io,
|
|
.init_irq = msm7x30_init_irq,
|
|
.init_machine = msm7x30_init,
|
|
.init_late = msm7x30_init_late,
|
|
.timer = &msm_timer,
|
|
MACHINE_END
|
|
|
|
MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
|
|
.atag_offset = 0x100,
|
|
.fixup = msm7x30_fixup,
|
|
.reserve = msm7x30_reserve,
|
|
.map_io = msm7x30_map_io,
|
|
.init_irq = msm7x30_init_irq,
|
|
.init_machine = msm7x30_init,
|
|
.init_late = msm7x30_init_late,
|
|
.timer = &msm_timer,
|
|
MACHINE_END
|
|
|
|
MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
|
|
.atag_offset = 0x100,
|
|
.fixup = msm7x30_fixup,
|
|
.reserve = msm7x30_reserve,
|
|
.map_io = msm7x30_map_io,
|
|
.init_irq = msm7x30_init_irq,
|
|
.init_machine = msm7x30_init,
|
|
.init_late = msm7x30_init_late,
|
|
.timer = &msm_timer,
|
|
MACHINE_END
|