Path: blob/master/arch/mips/alchemy/xxs1500/platform.c
15119 views
/*1* XXS1500 board platform device registration2*3* Copyright (C) 2009 Manuel Lauss4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License as published by7* the Free Software Foundation; either version 2 of the License, or8* (at your option) any later version.9*10* This program is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13* GNU General Public License for more details.14*15* You should have received a copy of the GNU General Public License16* along with this program; if not, write to the Free Software17* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA18*/1920#include <linux/init.h>21#include <linux/platform_device.h>2223#include <asm/mach-au1x00/au1000.h>2425static struct resource xxs1500_pcmcia_res[] = {26{27.name = "pcmcia-io",28.flags = IORESOURCE_MEM,29.start = PCMCIA_IO_PHYS_ADDR,30.end = PCMCIA_IO_PHYS_ADDR + 0x000400000 - 1,31},32{33.name = "pcmcia-attr",34.flags = IORESOURCE_MEM,35.start = PCMCIA_ATTR_PHYS_ADDR,36.end = PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1,37},38{39.name = "pcmcia-mem",40.flags = IORESOURCE_MEM,41.start = PCMCIA_MEM_PHYS_ADDR,42.end = PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1,43},44};4546static struct platform_device xxs1500_pcmcia_dev = {47.name = "xxs1500_pcmcia",48.id = -1,49.num_resources = ARRAY_SIZE(xxs1500_pcmcia_res),50.resource = xxs1500_pcmcia_res,51};5253static struct platform_device *xxs1500_devs[] __initdata = {54&xxs1500_pcmcia_dev,55};5657static int __init xxs1500_dev_init(void)58{59return platform_add_devices(xxs1500_devs,60ARRAY_SIZE(xxs1500_devs));61}62device_initcall(xxs1500_dev_init);636465