Path: blob/master/arch/mips/alchemy/devboards/pb1500/platform.c
10820 views
/*1* Pb1500 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 <asm/mach-au1x00/au1000.h>22#include <asm/mach-db1x00/bcsr.h>2324#include "../platform.h"2526static int __init pb1500_dev_init(void)27{28int swapped;2930/* PCMCIA. single socket, identical to Pb1500 */31db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR,32PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1,33PCMCIA_MEM_PHYS_ADDR,34PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1,35PCMCIA_IO_PHYS_ADDR,36PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1,37AU1500_GPIO11_INT, /* card */38AU1500_GPIO9_INT, /* insert */39/*AU1500_GPIO10_INT*/0, /* stschg */400, /* eject */410); /* id */4243swapped = bcsr_read(BCSR_STATUS) & BCSR_STATUS_DB1000_SWAPBOOT;44db1x_register_norflash(64 * 1024 * 1024, 4, swapped);4546return 0;47}48device_initcall(pb1500_dev_init);495051