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.
6 * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
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 #include <linux/phy.h>
16 #include <linux/spi/spi.h>
17 #include <linux/spi/flash.h>
19 #include <lantiq_soc.h>
22 #include "../machtypes.h"
25 static struct ltq_pci_data ltq_pci_data
= {
26 .clock
= PCI_CLOCK_INT
,
27 .gpio
= PCI_GNT1
| PCI_REQ1
,
29 [14] = INT_NUM_IM0_IRL0
+ 22,
33 static struct ltq_eth_data ltq_eth_data
= {
34 .mii_mode
= PHY_INTERFACE_MODE_MII
,
37 static struct mtd_partition easy98000_nor_partitions
[] =
47 .size
= 0x40000, /* 2 sectors for redundant env. */
52 .size
= 0xF80000, /* map only 16 MiB */
56 static struct flash_platform_data easy98000_spi_flash_platform_data
= {
58 .parts
= easy98000_nor_partitions
,
59 .nr_parts
= ARRAY_SIZE(easy98000_nor_partitions
)
62 static struct spi_board_info spi_info __initdata
= {
66 .max_speed_hz
= 10 * 1000 * 1000,
68 .platform_data
= &easy98000_spi_flash_platform_data
71 struct ltq_spi_platform_data ltq_spi_data
= {
75 static void __init
dgn3500_init(void)
77 ltq_register_pci(<q_pci_data
);
78 ltq_register_etop(<q_eth_data
);
79 ltq_register_spi(<q_spi_data
, &spi_info
, 1);
82 MIPS_MACHINE(LANTIQ_MACH_DGN3500B
,