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> |
| 12 | |
| 13 | #include <asm/mach/arch.h> |
| 14 | #include <asm/mach/map.h> |
| 15 | #include <asm/mach/serial_sa1100.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 16 | #include <mach/mcp.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | |
| 18 | #include "generic.h" |
| 19 | |
| 20 | |
| 21 | #warning "include/asm/arch-sa1100/ide.h needs fixing for lart" |
| 22 | |
Russell King | 323cdfc | 2005-08-18 10:10:46 +0100 | [diff] [blame] | 23 | static struct mcp_plat_data lart_mcp_data = { |
| 24 | .mccr0 = MCCR0_ADM, |
| 25 | .sclk_rate = 11981000, |
| 26 | }; |
| 27 | |
| 28 | static void __init lart_init(void) |
| 29 | { |
| 30 | sa11x0_set_mcp_data(&lart_mcp_data); |
| 31 | } |
| 32 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | static struct map_desc lart_io_desc[] __initdata = { |
Deepak Saxena | 92519d8 | 2005-10-28 15:19:04 +0100 | [diff] [blame] | 34 | { /* main flash memory */ |
| 35 | .virtual = 0xe8000000, |
| 36 | .pfn = __phys_to_pfn(0x00000000), |
| 37 | .length = 0x00400000, |
| 38 | .type = MT_DEVICE |
| 39 | }, { /* main flash, alternative location */ |
| 40 | .virtual = 0xec000000, |
| 41 | .pfn = __phys_to_pfn(0x08000000), |
| 42 | .length = 0x00400000, |
| 43 | .type = MT_DEVICE |
| 44 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | }; |
| 46 | |
| 47 | static void __init lart_map_io(void) |
| 48 | { |
| 49 | sa1100_map_io(); |
| 50 | iotable_init(lart_io_desc, ARRAY_SIZE(lart_io_desc)); |
| 51 | |
| 52 | sa1100_register_uart(0, 3); |
| 53 | sa1100_register_uart(1, 1); |
| 54 | sa1100_register_uart(2, 2); |
| 55 | |
| 56 | GAFR |= (GPIO_UART_TXD | GPIO_UART_RXD); |
| 57 | GPDR |= GPIO_UART_TXD; |
| 58 | GPDR &= ~GPIO_UART_RXD; |
| 59 | PPAR |= PPAR_UPR; |
| 60 | } |
| 61 | |
| 62 | MACHINE_START(LART, "LART") |
Russell King | e9dea0c | 2005-07-03 17:38:58 +0100 | [diff] [blame] | 63 | .phys_io = 0x80000000, |
| 64 | .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, |
| 65 | .boot_params = 0xc0000100, |
| 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, |
| 70 | MACHINE_END |