Saeed Bishara | edabd38 | 2009-08-06 15:12:43 +0300 | [diff] [blame] | 1 | /* |
| 2 | * arch/arm/mach-dove/dove-db-setup.c |
| 3 | * |
| 4 | * Marvell DB-MV88AP510-BP Development Board Setup |
| 5 | * |
| 6 | * This file is licensed under the terms of the GNU General Public |
| 7 | * License version 2. This program is licensed "as is" without any |
| 8 | * warranty of any kind, whether express or implied. |
| 9 | */ |
| 10 | |
| 11 | #include <linux/kernel.h> |
| 12 | #include <linux/init.h> |
| 13 | #include <linux/platform_device.h> |
| 14 | #include <linux/irq.h> |
| 15 | #include <linux/mtd/physmap.h> |
| 16 | #include <linux/mtd/nand.h> |
| 17 | #include <linux/timer.h> |
| 18 | #include <linux/ata_platform.h> |
| 19 | #include <linux/mv643xx_eth.h> |
| 20 | #include <linux/i2c.h> |
| 21 | #include <linux/pci.h> |
| 22 | #include <linux/spi/spi.h> |
Saeed Bishara | edabd38 | 2009-08-06 15:12:43 +0300 | [diff] [blame] | 23 | #include <linux/spi/flash.h> |
| 24 | #include <linux/gpio.h> |
| 25 | #include <asm/mach-types.h> |
| 26 | #include <asm/mach/arch.h> |
| 27 | #include <mach/dove.h> |
| 28 | #include "common.h" |
| 29 | |
| 30 | static struct mv643xx_eth_platform_data dove_db_ge00_data = { |
| 31 | .phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT, |
| 32 | }; |
| 33 | |
| 34 | static struct mv_sata_platform_data dove_db_sata_data = { |
| 35 | .n_ports = 1, |
| 36 | }; |
| 37 | |
| 38 | /***************************************************************************** |
| 39 | * SPI Devices: |
| 40 | * SPI0: 4M Flash ST-M25P32-VMF6P |
| 41 | ****************************************************************************/ |
| 42 | static const struct flash_platform_data dove_db_spi_flash_data = { |
| 43 | .type = "m25p64", |
| 44 | }; |
| 45 | |
| 46 | static struct spi_board_info __initdata dove_db_spi_flash_info[] = { |
| 47 | { |
| 48 | .modalias = "m25p80", |
| 49 | .platform_data = &dove_db_spi_flash_data, |
| 50 | .irq = -1, |
| 51 | .max_speed_hz = 20000000, |
| 52 | .bus_num = 0, |
| 53 | .chip_select = 0, |
| 54 | }, |
| 55 | }; |
| 56 | |
| 57 | /***************************************************************************** |
| 58 | * PCI |
| 59 | ****************************************************************************/ |
| 60 | static int __init dove_db_pci_init(void) |
| 61 | { |
| 62 | if (machine_is_dove_db()) |
| 63 | dove_pcie_init(1, 1); |
| 64 | |
| 65 | return 0; |
| 66 | } |
| 67 | |
| 68 | subsys_initcall(dove_db_pci_init); |
| 69 | |
| 70 | /***************************************************************************** |
| 71 | * Board Init |
| 72 | ****************************************************************************/ |
| 73 | static void __init dove_db_init(void) |
| 74 | { |
| 75 | /* |
| 76 | * Basic Dove setup. Needs to be called early. |
| 77 | */ |
| 78 | dove_init(); |
| 79 | |
| 80 | dove_ge00_init(&dove_db_ge00_data); |
| 81 | dove_ehci0_init(); |
| 82 | dove_ehci1_init(); |
| 83 | dove_sata_init(&dove_db_sata_data); |
Saeed Bishara | 16bc90a | 2010-05-06 16:12:06 +0300 | [diff] [blame] | 84 | dove_sdio0_init(); |
| 85 | dove_sdio1_init(); |
Saeed Bishara | edabd38 | 2009-08-06 15:12:43 +0300 | [diff] [blame] | 86 | dove_spi0_init(); |
| 87 | dove_spi1_init(); |
| 88 | dove_uart0_init(); |
| 89 | dove_uart1_init(); |
| 90 | dove_i2c_init(); |
| 91 | spi_register_board_info(dove_db_spi_flash_info, |
| 92 | ARRAY_SIZE(dove_db_spi_flash_info)); |
| 93 | } |
| 94 | |
| 95 | MACHINE_START(DOVE_DB, "Marvell DB-MV88AP510-BP Development Board") |
Nicolas Pitre | 57fa572 | 2011-07-05 22:38:11 -0400 | [diff] [blame] | 96 | .atag_offset = 0x100, |
Arnd Bergmann | 5cdbe5d | 2015-12-02 22:27:05 +0100 | [diff] [blame] | 97 | .nr_irqs = DOVE_NR_IRQS, |
Saeed Bishara | edabd38 | 2009-08-06 15:12:43 +0300 | [diff] [blame] | 98 | .init_machine = dove_db_init, |
| 99 | .map_io = dove_map_io, |
Lennert Buytenhek | 4ee1f6b | 2010-10-15 16:50:26 +0200 | [diff] [blame] | 100 | .init_early = dove_init_early, |
Saeed Bishara | edabd38 | 2009-08-06 15:12:43 +0300 | [diff] [blame] | 101 | .init_irq = dove_init_irq, |
Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame] | 102 | .init_time = dove_timer_init, |
Russell King | 6ca6ff9 | 2011-11-05 09:48:52 +0000 | [diff] [blame] | 103 | .restart = dove_restart, |
Saeed Bishara | edabd38 | 2009-08-06 15:12:43 +0300 | [diff] [blame] | 104 | MACHINE_END |