Path: blob/master/arch/mips/alchemy/devboards/pb1100/platform.c
10820 views
/*1* Pb1100 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>2122#include <asm/mach-au1x00/au1000.h>23#include <asm/mach-db1x00/bcsr.h>2425#include "../platform.h"2627static int __init pb1100_dev_init(void)28{29int swapped;3031/* PCMCIA. single socket, identical to Pb1500 */32db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR,33PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1,34PCMCIA_MEM_PHYS_ADDR,35PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1,36PCMCIA_IO_PHYS_ADDR,37PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1,38AU1100_GPIO11_INT, /* card */39AU1100_GPIO9_INT, /* insert */40/*AU1100_GPIO10_INT*/0, /* stschg */410, /* eject */420); /* id */4344swapped = bcsr_read(BCSR_STATUS) & BCSR_STATUS_DB1000_SWAPBOOT;45db1x_register_norflash(64 * 1024 * 1024, 4, swapped);4647return 0;48}49device_initcall(pb1100_dev_init);505152