2 * arch/m68k/coldfire/mcf5445x-devices.c
4 * Coldfire M5445x Platform Device Configuration
6 * Based on the Freescale MXC devices.c
8 * Copyright (c) 2007 Freescale Semiconductor, Inc.
9 * Kurt Mahan <kmahan@freescale.com>
11 #include <linux/module.h>
12 #include <linux/kernel.h>
13 #include <linux/init.h>
14 #include <linux/mtd/physmap.h>
15 #include <linux/platform_device.h>
16 #include <linux/fsl_devices.h>
18 #include <asm/coldfire.h>
19 #include <asm/mcfsim.h>
21 static struct resource coldfire_i2c_resources[] = {
23 .start = MCF_MBAR + 0x008F00,
24 .end = MCF_MBAR + 0x008F20,
25 .flags = IORESOURCE_MEM,
30 .flags = IORESOURCE_IRQ,
34 static struct platform_device coldfire_i2c_device = {
35 .name = "MCF548X-i2c",
37 .num_resources = ARRAY_SIZE(coldfire_i2c_resources),
38 .resource = coldfire_i2c_resources,
41 static struct resource coldfire_sec_resources[] = {
43 .start = MCF_MBAR + 0x00020000,
44 .end = MCF_MBAR + 0x00033000,
45 .flags = IORESOURCE_MEM,
50 .flags = IORESOURCE_IRQ,
54 static struct platform_device coldfire_sec_device = {
57 .num_resources = ARRAY_SIZE(coldfire_sec_resources),
58 .resource = coldfire_sec_resources,
61 #if defined(CONFIG_MTD_PHYSMAP)
62 static struct physmap_flash_data mcf5485_flash_data = {
66 static struct resource mcf5485_flash_resource = {
69 .flags = IORESOURCE_MEM,
72 static struct platform_device mcf5485_flash_device = {
73 .name = "physmap-flash",
76 .platform_data = &mcf5485_flash_data,
79 .resource = &mcf5485_flash_resource,
83 static int __init mcf5485_init_devices(void)
85 printk(KERN_INFO "MCF5485x INIT_DEVICES\n");
87 platform_device_register(&coldfire_i2c_device);
88 platform_device_register(&coldfire_sec_device);
89 /*#if defined(CONFIG_MTD_PHYSMAP)
90 platform_device_register(&mcf5485_flash_device);
94 arch_initcall(mcf5485_init_devices);