• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/arch/arm/mach-loki/
1/*
2 * arch/arm/mach-loki/lb88rc8480-setup.c
3 *
4 * Marvell LB88RC8480 Development Board Setup
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2.  This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/platform_device.h>
14#include <linux/irq.h>
15#include <linux/mtd/physmap.h>
16#include <linux/mtd/nand.h>
17#include <linux/timer.h>
18#include <linux/ata_platform.h>
19#include <linux/mv643xx_eth.h>
20#include <asm/mach-types.h>
21#include <asm/mach/arch.h>
22#include <mach/loki.h>
23#include "common.h"
24
25#define LB88RC8480_FLASH_BOOT_CS_BASE	0xf8000000
26#define LB88RC8480_FLASH_BOOT_CS_SIZE	SZ_128M
27
28#define LB88RC8480_NOR_BOOT_BASE	0xff000000
29#define LB88RC8480_NOR_BOOT_SIZE	SZ_16M
30
31static struct mtd_partition lb88rc8480_boot_flash_parts[] = {
32	{
33		.name	= "kernel",
34		.offset	= 0,
35		.size	= SZ_2M,
36	}, {
37		.name	= "root-fs",
38		.offset	= SZ_2M,
39		.size	= (SZ_8M + SZ_4M + SZ_1M),
40	}, {
41		.name	= "u-boot",
42		.offset	= (SZ_8M + SZ_4M + SZ_2M + SZ_1M),
43		.size	= SZ_1M,
44	},
45};
46
47static struct physmap_flash_data lb88rc8480_boot_flash_data = {
48	.parts		= lb88rc8480_boot_flash_parts,
49	.nr_parts	= ARRAY_SIZE(lb88rc8480_boot_flash_parts),
50	.width		= 1,	/* 8 bit bus width */
51};
52
53static struct resource lb88rc8480_boot_flash_resource = {
54	.flags	= IORESOURCE_MEM,
55	.start	= LB88RC8480_NOR_BOOT_BASE,
56	.end	= LB88RC8480_NOR_BOOT_BASE + LB88RC8480_NOR_BOOT_SIZE - 1,
57};
58
59static struct platform_device lb88rc8480_boot_flash = {
60	.name	= "physmap-flash",
61	.id	= 0,
62	.dev	= {
63		.platform_data	= &lb88rc8480_boot_flash_data,
64	},
65	.num_resources	= 1,
66	.resource	= &lb88rc8480_boot_flash_resource,
67};
68
69static struct mv643xx_eth_platform_data lb88rc8480_ge0_data = {
70	.phy_addr	= MV643XX_ETH_PHY_ADDR(1),
71	.mac_addr	= { 0x00, 0x50, 0x43, 0x11, 0x22, 0x33 },
72};
73
74static void __init lb88rc8480_init(void)
75{
76	/*
77	 * Basic setup. Needs to be called early.
78	 */
79	loki_init();
80
81	loki_ge0_init(&lb88rc8480_ge0_data);
82	loki_sas_init();
83	loki_uart0_init();
84	loki_uart1_init();
85
86	loki_setup_dev_boot_win(LB88RC8480_FLASH_BOOT_CS_BASE,
87				LB88RC8480_FLASH_BOOT_CS_SIZE);
88	platform_device_register(&lb88rc8480_boot_flash);
89}
90
91MACHINE_START(LB88RC8480, "Marvell LB88RC8480 Development Board")
92	/* Maintainer: Ke Wei <kewei@marvell.com> */
93	.phys_io	= LOKI_REGS_PHYS_BASE,
94	.io_pg_offst	= ((LOKI_REGS_VIRT_BASE) >> 18) & 0xfffc,
95	.boot_params	= 0x00000100,
96	.init_machine	= lb88rc8480_init,
97	.map_io		= loki_map_io,
98	.init_irq	= loki_init_irq,
99	.timer		= &loki_timer,
100MACHINE_END
101