Manuel Lauss | 0273b4e | 2009-10-04 14:55:29 +0200 | [diff] [blame] | 1 | /* |
| 2 | * XXS1500 board platform device registration |
| 3 | * |
| 4 | * Copyright (C) 2009 Manuel Lauss |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | */ |
| 20 | |
| 21 | #include <linux/init.h> |
| 22 | #include <linux/platform_device.h> |
| 23 | |
| 24 | #include <asm/mach-au1x00/au1000.h> |
| 25 | |
| 26 | static struct resource xxs1500_pcmcia_res[] = { |
| 27 | { |
Manuel Lauss | 11b897c | 2010-02-24 17:40:21 +0100 | [diff] [blame] | 28 | .name = "pcmcia-io", |
Manuel Lauss | 0273b4e | 2009-10-04 14:55:29 +0200 | [diff] [blame] | 29 | .flags = IORESOURCE_MEM, |
Manuel Lauss | 11b897c | 2010-02-24 17:40:21 +0100 | [diff] [blame] | 30 | .start = PCMCIA_IO_PHYS_ADDR, |
| 31 | .end = PCMCIA_IO_PHYS_ADDR + 0x000400000 - 1, |
Manuel Lauss | 0273b4e | 2009-10-04 14:55:29 +0200 | [diff] [blame] | 32 | }, |
| 33 | { |
Manuel Lauss | 11b897c | 2010-02-24 17:40:21 +0100 | [diff] [blame] | 34 | .name = "pcmcia-attr", |
Manuel Lauss | 0273b4e | 2009-10-04 14:55:29 +0200 | [diff] [blame] | 35 | .flags = IORESOURCE_MEM, |
Manuel Lauss | 11b897c | 2010-02-24 17:40:21 +0100 | [diff] [blame] | 36 | .start = PCMCIA_ATTR_PHYS_ADDR, |
| 37 | .end = PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1, |
Manuel Lauss | 0273b4e | 2009-10-04 14:55:29 +0200 | [diff] [blame] | 38 | }, |
| 39 | { |
Manuel Lauss | 11b897c | 2010-02-24 17:40:21 +0100 | [diff] [blame] | 40 | .name = "pcmcia-mem", |
Manuel Lauss | 0273b4e | 2009-10-04 14:55:29 +0200 | [diff] [blame] | 41 | .flags = IORESOURCE_MEM, |
Manuel Lauss | 11b897c | 2010-02-24 17:40:21 +0100 | [diff] [blame] | 42 | .start = PCMCIA_MEM_PHYS_ADDR, |
| 43 | .end = PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1, |
Manuel Lauss | 0273b4e | 2009-10-04 14:55:29 +0200 | [diff] [blame] | 44 | }, |
| 45 | }; |
| 46 | |
| 47 | static struct platform_device xxs1500_pcmcia_dev = { |
| 48 | .name = "xxs1500_pcmcia", |
| 49 | .id = -1, |
| 50 | .num_resources = ARRAY_SIZE(xxs1500_pcmcia_res), |
| 51 | .resource = xxs1500_pcmcia_res, |
| 52 | }; |
| 53 | |
| 54 | static struct platform_device *xxs1500_devs[] __initdata = { |
| 55 | &xxs1500_pcmcia_dev, |
| 56 | }; |
| 57 | |
| 58 | static int __init xxs1500_dev_init(void) |
| 59 | { |
| 60 | return platform_add_devices(xxs1500_devs, |
| 61 | ARRAY_SIZE(xxs1500_devs)); |
| 62 | } |
| 63 | device_initcall(xxs1500_dev_init); |