Path: blob/master/arch/arm/mach-loki/lb88rc8480-setup.c
10817 views
/*1* arch/arm/mach-loki/lb88rc8480-setup.c2*3* Marvell LB88RC8480 Development Board Setup4*5* This file is licensed under the terms of the GNU General Public6* License version 2. This program is licensed "as is" without any7* warranty of any kind, whether express or implied.8*/910#include <linux/kernel.h>11#include <linux/init.h>12#include <linux/platform_device.h>13#include <linux/irq.h>14#include <linux/mtd/physmap.h>15#include <linux/mtd/nand.h>16#include <linux/timer.h>17#include <linux/ata_platform.h>18#include <linux/mv643xx_eth.h>19#include <asm/mach-types.h>20#include <asm/mach/arch.h>21#include <mach/loki.h>22#include "common.h"2324#define LB88RC8480_FLASH_BOOT_CS_BASE 0xf800000025#define LB88RC8480_FLASH_BOOT_CS_SIZE SZ_128M2627#define LB88RC8480_NOR_BOOT_BASE 0xff00000028#define LB88RC8480_NOR_BOOT_SIZE SZ_16M2930static struct mtd_partition lb88rc8480_boot_flash_parts[] = {31{32.name = "kernel",33.offset = 0,34.size = SZ_2M,35}, {36.name = "root-fs",37.offset = SZ_2M,38.size = (SZ_8M + SZ_4M + SZ_1M),39}, {40.name = "u-boot",41.offset = (SZ_8M + SZ_4M + SZ_2M + SZ_1M),42.size = SZ_1M,43},44};4546static struct physmap_flash_data lb88rc8480_boot_flash_data = {47.parts = lb88rc8480_boot_flash_parts,48.nr_parts = ARRAY_SIZE(lb88rc8480_boot_flash_parts),49.width = 1, /* 8 bit bus width */50};5152static struct resource lb88rc8480_boot_flash_resource = {53.flags = IORESOURCE_MEM,54.start = LB88RC8480_NOR_BOOT_BASE,55.end = LB88RC8480_NOR_BOOT_BASE + LB88RC8480_NOR_BOOT_SIZE - 1,56};5758static struct platform_device lb88rc8480_boot_flash = {59.name = "physmap-flash",60.id = 0,61.dev = {62.platform_data = &lb88rc8480_boot_flash_data,63},64.num_resources = 1,65.resource = &lb88rc8480_boot_flash_resource,66};6768static struct mv643xx_eth_platform_data lb88rc8480_ge0_data = {69.phy_addr = MV643XX_ETH_PHY_ADDR(1),70.mac_addr = { 0x00, 0x50, 0x43, 0x11, 0x22, 0x33 },71};7273static void __init lb88rc8480_init(void)74{75/*76* Basic setup. Needs to be called early.77*/78loki_init();7980loki_ge0_init(&lb88rc8480_ge0_data);81loki_sas_init();82loki_uart0_init();83loki_uart1_init();8485loki_setup_dev_boot_win(LB88RC8480_FLASH_BOOT_CS_BASE,86LB88RC8480_FLASH_BOOT_CS_SIZE);87platform_device_register(&lb88rc8480_boot_flash);88}8990MACHINE_START(LB88RC8480, "Marvell LB88RC8480 Development Board")91/* Maintainer: Ke Wei <[email protected]> */92.boot_params = 0x00000100,93.init_machine = lb88rc8480_init,94.map_io = loki_map_io,95.init_early = loki_init_early,96.init_irq = loki_init_irq,97.timer = &loki_timer,98MACHINE_END99100101