blob: d117ceab6215c4f8d814504aa313bacf17460b45 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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 Kinga09e64f2008-08-05 16:14:15 +01009#include <mach/hardware.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070010#include <asm/setup.h>
11#include <asm/mach-types.h>
Russell King5876ee92009-04-26 13:56:01 +010012#include <asm/page.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070013
14#include <asm/mach/arch.h>
15#include <asm/mach/map.h>
16#include <asm/mach/serial_sa1100.h>
Russell Kinga09e64f2008-08-05 16:14:15 +010017#include <mach/mcp.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070018
19#include "generic.h"
20
21
22#warning "include/asm/arch-sa1100/ide.h needs fixing for lart"
23
Russell King323cdfc2005-08-18 10:10:46 +010024static struct mcp_plat_data lart_mcp_data = {
25 .mccr0 = MCCR0_ADM,
26 .sclk_rate = 11981000,
Jochen Friedrich5dd7bf52011-11-27 22:00:54 +010027 .codec = "ucb1x00",
Russell King323cdfc2005-08-18 10:10:46 +010028};
29
30static void __init lart_init(void)
31{
Jochen Friedrichaf9081a2011-11-27 22:00:55 +010032 /*
33 * Setup the PPC unit correctly.
34 */
35 PPDR &= ~PPC_RXD4;
36 PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM;
37 PSDR |= PPC_RXD4;
38 PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM);
39 PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM);
40
Russell King7a5b4e12009-10-06 14:55:53 +010041 sa11x0_register_mcp(&lart_mcp_data);
Russell King323cdfc2005-08-18 10:10:46 +010042}
43
Linus Torvalds1da177e2005-04-16 15:20:36 -070044static struct map_desc lart_io_desc[] __initdata = {
Deepak Saxena92519d82005-10-28 15:19:04 +010045 { /* main flash memory */
46 .virtual = 0xe8000000,
47 .pfn = __phys_to_pfn(0x00000000),
48 .length = 0x00400000,
49 .type = MT_DEVICE
50 }, { /* main flash, alternative location */
51 .virtual = 0xec000000,
52 .pfn = __phys_to_pfn(0x08000000),
53 .length = 0x00400000,
54 .type = MT_DEVICE
55 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070056};
57
58static void __init lart_map_io(void)
59{
60 sa1100_map_io();
61 iotable_init(lart_io_desc, ARRAY_SIZE(lart_io_desc));
62
63 sa1100_register_uart(0, 3);
64 sa1100_register_uart(1, 1);
65 sa1100_register_uart(2, 2);
66
67 GAFR |= (GPIO_UART_TXD | GPIO_UART_RXD);
68 GPDR |= GPIO_UART_TXD;
69 GPDR &= ~GPIO_UART_RXD;
70 PPAR |= PPAR_UPR;
71}
72
73MACHINE_START(LART, "LART")
Nicolas Pitre17f44252011-07-05 22:38:17 -040074 .atag_offset = 0x100,
Russell Kinge9dea0c2005-07-03 17:38:58 +010075 .map_io = lart_map_io,
76 .init_irq = sa1100_init_irq,
Russell King323cdfc2005-08-18 10:10:46 +010077 .init_machine = lart_init,
Linus Torvalds1da177e2005-04-16 15:20:36 -070078 .timer = &sa1100_timer,
Russell Kingd9ca5832011-11-05 10:28:50 +000079 .restart = sa11x0_restart,
Linus Torvalds1da177e2005-04-16 15:20:36 -070080MACHINE_END