blob: e5e7e09b7c1428f2d17ecaf44fd63eed8e2b8706 [file] [log] [blame]
John Crispin973c32e2011-03-30 09:27:55 +02001/*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License version 2 as published
4 * by the Free Software Foundation.
5 *
6 * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
7 */
8
9#include <linux/init.h>
10#include <linux/platform_device.h>
11#include <linux/mtd/mtd.h>
12#include <linux/mtd/partitions.h>
13#include <linux/mtd/physmap.h>
14#include <linux/input.h>
15
16#include <lantiq_soc.h>
17#include <irq.h>
18
19#include "../machtypes.h"
20#include "devices.h"
21
22static struct mtd_partition easy50712_partitions[] = {
23 {
24 .name = "uboot",
25 .offset = 0x0,
26 .size = 0x10000,
27 },
28 {
29 .name = "uboot_env",
30 .offset = 0x10000,
31 .size = 0x10000,
32 },
33 {
34 .name = "linux",
35 .offset = 0x20000,
36 .size = 0xe0000,
37 },
38 {
39 .name = "rootfs",
40 .offset = 0x100000,
41 .size = 0x300000,
42 },
43};
44
45static struct physmap_flash_data easy50712_flash_data = {
46 .nr_parts = ARRAY_SIZE(easy50712_partitions),
47 .parts = easy50712_partitions,
48};
49
50static struct ltq_pci_data ltq_pci_data = {
51 .clock = PCI_CLOCK_INT,
52 .gpio = PCI_GNT1 | PCI_REQ1,
53 .irq = {
54 [14] = INT_NUM_IM0_IRL0 + 22,
55 },
56};
57
58static void __init easy50712_init(void)
59{
60 ltq_register_gpio_stp();
61 ltq_register_nor(&easy50712_flash_data);
62 ltq_register_pci(&ltq_pci_data);
63}
64
65MIPS_MACHINE(LTQ_MACH_EASY50712,
66 "EASY50712",
67 "EASY50712 Eval Board",
68 easy50712_init);