Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/arch/arm/mach-sa1100/lart.c |
| 3 | */ |
| 4 | |
| 5 | #include <linux/init.h> |
| 6 | #include <linux/kernel.h> |
| 7 | #include <linux/tty.h> |
| 8 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 9 | #include <mach/hardware.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | #include <asm/setup.h> |
| 11 | #include <asm/mach-types.h> |
Russell King | 5876ee9 | 2009-04-26 13:56:01 +0100 | [diff] [blame] | 12 | #include <asm/page.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | |
| 14 | #include <asm/mach/arch.h> |
| 15 | #include <asm/mach/map.h> |
| 16 | #include <asm/mach/serial_sa1100.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 17 | #include <mach/mcp.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | |
| 19 | #include "generic.h" |
| 20 | |
| 21 | |
| 22 | #warning "include/asm/arch-sa1100/ide.h needs fixing for lart" |
| 23 | |
Russell King | 323cdfc | 2005-08-18 10:10:46 +0100 | [diff] [blame] | 24 | static struct mcp_plat_data lart_mcp_data = { |
| 25 | .mccr0 = MCCR0_ADM, |
| 26 | .sclk_rate = 11981000, |
| 27 | }; |
| 28 | |
| 29 | static void __init lart_init(void) |
| 30 | { |
Russell King | e36e26a | 2012-01-20 22:24:07 +0000 | [diff] [blame^] | 31 | sa11x0_ppc_configure_mcp(); |
Russell King | 7a5b4e1 | 2009-10-06 14:55:53 +0100 | [diff] [blame] | 32 | sa11x0_register_mcp(&lart_mcp_data); |
Russell King | 323cdfc | 2005-08-18 10:10:46 +0100 | [diff] [blame] | 33 | } |
| 34 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | static struct map_desc lart_io_desc[] __initdata = { |
Deepak Saxena | 92519d8 | 2005-10-28 15:19:04 +0100 | [diff] [blame] | 36 | { /* main flash memory */ |
| 37 | .virtual = 0xe8000000, |
| 38 | .pfn = __phys_to_pfn(0x00000000), |
| 39 | .length = 0x00400000, |
| 40 | .type = MT_DEVICE |
| 41 | }, { /* main flash, alternative location */ |
| 42 | .virtual = 0xec000000, |
| 43 | .pfn = __phys_to_pfn(0x08000000), |
| 44 | .length = 0x00400000, |
| 45 | .type = MT_DEVICE |
| 46 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | }; |
| 48 | |
| 49 | static void __init lart_map_io(void) |
| 50 | { |
| 51 | sa1100_map_io(); |
| 52 | iotable_init(lart_io_desc, ARRAY_SIZE(lart_io_desc)); |
| 53 | |
| 54 | sa1100_register_uart(0, 3); |
| 55 | sa1100_register_uart(1, 1); |
| 56 | sa1100_register_uart(2, 2); |
| 57 | |
| 58 | GAFR |= (GPIO_UART_TXD | GPIO_UART_RXD); |
| 59 | GPDR |= GPIO_UART_TXD; |
| 60 | GPDR &= ~GPIO_UART_RXD; |
| 61 | PPAR |= PPAR_UPR; |
| 62 | } |
| 63 | |
| 64 | MACHINE_START(LART, "LART") |
Nicolas Pitre | 17f4425 | 2011-07-05 22:38:17 -0400 | [diff] [blame] | 65 | .atag_offset = 0x100, |
Russell King | e9dea0c | 2005-07-03 17:38:58 +0100 | [diff] [blame] | 66 | .map_io = lart_map_io, |
| 67 | .init_irq = sa1100_init_irq, |
Russell King | 323cdfc | 2005-08-18 10:10:46 +0100 | [diff] [blame] | 68 | .init_machine = lart_init, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 69 | .timer = &sa1100_timer, |
Russell King | d9ca583 | 2011-11-05 10:28:50 +0000 | [diff] [blame] | 70 | .restart = sa11x0_restart, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 71 | MACHINE_END |