| 1 | /* |
| 2 | * This program is free software; you can redistribute it and/or modify |
| 3 | * it under the terms of the GNU General Public License as published by |
| 4 | * the Free Software Foundation; either version 2 of the License, or |
| 5 | * (at your option) any later version. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | * |
| 12 | * You should have received a copy of the GNU General Public License |
| 13 | * along with this program; if not, write to the Free Software |
| 14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. |
| 15 | * |
| 16 | * Copyright (C) 2009 Hauke Mehrtens <hauke@hauke-m.de> |
| 17 | */ |
| 18 | |
| 19 | |
| 20 | #include <linux/platform_device.h> |
| 21 | #include <asm/amazon/irq.h> |
| 22 | |
| 23 | #define AMAZON_FLASH_START 0x13000000 |
| 24 | #define AMAZON_FLASH_MAX 0x1000000 |
| 25 | |
| 26 | static struct platform_device amazon_mii = { |
| 27 | .id = 0, |
| 28 | .name = "amazon_mii0", |
| 29 | // .dev = { |
| 30 | // .platform_data = amazon_ethaddr, |
| 31 | // } |
| 32 | }; |
| 33 | |
| 34 | static struct platform_device amazon_wdt = { |
| 35 | .id = 0, |
| 36 | .name = "amazon_wdt", |
| 37 | }; |
| 38 | |
| 39 | static struct platform_device amazon_asc = { |
| 40 | .id = 0, |
| 41 | .name = "amazon_asc", |
| 42 | }; |
| 43 | |
| 44 | static struct resource amazon_mtd_resource = { |
| 45 | .start = AMAZON_FLASH_START, |
| 46 | .end = AMAZON_FLASH_START + AMAZON_FLASH_MAX - 1, |
| 47 | .flags = IORESOURCE_MEM, |
| 48 | }; |
| 49 | |
| 50 | static struct platform_device amazon_mtd = { |
| 51 | .id = 0, |
| 52 | .name = "amazon_mtd", |
| 53 | .num_resources = 1, |
| 54 | .resource = &amazon_mtd_resource, |
| 55 | }; |
| 56 | |
| 57 | |
| 58 | struct platform_device *amazon_devs[] = { |
| 59 | &amazon_mii, &amazon_mtd, &amazon_wdt, &amazon_asc |
| 60 | }; |
| 61 | |
| 62 | |
| 63 | int __init amazon_init_devices(void) |
| 64 | { |
| 65 | printk(KERN_INFO ""); |
| 66 | return platform_add_devices(amazon_devs, 4); |
| 67 | } |
| 68 | |
| 69 | arch_initcall(amazon_init_devices); |
| 70 | |