common.c 1.2 KB
Newer Older
1
/*
2
 * Defines machines for CSR SiRFprimaII
3 4 5 6 7 8 9 10
 *
 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
 *
 * Licensed under GPLv2 or later.
 */

#include <linux/init.h>
#include <linux/kernel.h>
11
#include <asm/sizes.h>
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include "common.h"

static struct of_device_id sirfsoc_of_bus_ids[] __initdata = {
	{ .compatible = "simple-bus", },
	{},
};

void __init sirfsoc_mach_init(void)
{
	of_platform_bus_probe(NULL, sirfsoc_of_bus_ids, NULL);
}

28 29 30 31 32
void __init sirfsoc_init_late(void)
{
	sirfsoc_pm_init();
}

33 34 35
#ifdef CONFIG_ARCH_PRIMA2
static const char *prima2_dt_match[] __initdata = {
       "sirf,prima2",
36 37 38
       NULL
};

39
DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
40
	/* Maintainer: Barry Song <baohua.song@csr.com> */
41
	.map_io         = sirfsoc_map_lluart,
42
	.init_irq	= sirfsoc_of_irq_init,
43
	.init_time	= sirfsoc_prima2_timer_init,
44 45 46
#ifdef CONFIG_MULTI_IRQ_HANDLER
	.handle_irq     = sirfsoc_handle_irq,
#endif
47
	.dma_zone_size	= SZ_256M,
48
	.init_machine	= sirfsoc_mach_init,
49
	.init_late	= sirfsoc_init_late,
50
	.dt_compat      = prima2_dt_match,
51
	.restart	= sirfsoc_restart,
52
MACHINE_END
53
#endif