Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/arch/arm/mach-clps711x/p720t.c |
| 3 | * |
| 4 | * Copyright (C) 2000-2001 Deep Blue Solutions Ltd |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 | */ |
| 20 | #include <linux/config.h> |
| 21 | #include <linux/kernel.h> |
| 22 | #include <linux/init.h> |
| 23 | #include <linux/types.h> |
| 24 | #include <linux/string.h> |
| 25 | #include <linux/mm.h> |
| 26 | |
| 27 | #include <asm/hardware.h> |
| 28 | #include <asm/io.h> |
| 29 | #include <asm/pgtable.h> |
| 30 | #include <asm/page.h> |
| 31 | #include <asm/setup.h> |
Deepak Saxena | f10083f | 2005-10-28 15:19:05 +0100 | [diff] [blame^] | 32 | #include <asm/sizes.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | #include <asm/mach-types.h> |
| 34 | #include <asm/mach/arch.h> |
| 35 | #include <asm/mach/map.h> |
| 36 | #include <asm/arch/syspld.h> |
| 37 | |
| 38 | #include "common.h" |
| 39 | |
| 40 | /* |
| 41 | * Map the P720T system PLD. It occupies two address spaces: |
| 42 | * SYSPLD_PHYS_BASE and SYSPLD_PHYS_BASE + 0x00400000 |
| 43 | * We map both here. |
| 44 | */ |
| 45 | static struct map_desc p720t_io_desc[] __initdata = { |
Deepak Saxena | f10083f | 2005-10-28 15:19:05 +0100 | [diff] [blame^] | 46 | { |
| 47 | .virtual = SYSPLD_VIRT_BASE, |
| 48 | .pfn = __phys_to_pfn(SYSPLD_PHYS_BASE), |
| 49 | .length = SZ_1M, |
| 50 | .type = MT_DEVICE |
| 51 | }, { |
| 52 | .virtual = 0xfe400000, |
| 53 | .pfn = __phys_to_pfn(0x10400000), |
| 54 | .length = SZ_1M, |
| 55 | .type = MT_DEVICE |
| 56 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | }; |
| 58 | |
| 59 | static void __init |
| 60 | fixup_p720t(struct machine_desc *desc, struct tag *tag, |
| 61 | char **cmdline, struct meminfo *mi) |
| 62 | { |
| 63 | /* |
| 64 | * Our bootloader doesn't setup any tags (yet). |
| 65 | */ |
| 66 | if (tag->hdr.tag != ATAG_CORE) { |
| 67 | tag->hdr.tag = ATAG_CORE; |
| 68 | tag->hdr.size = tag_size(tag_core); |
| 69 | tag->u.core.flags = 0; |
| 70 | tag->u.core.pagesize = PAGE_SIZE; |
| 71 | tag->u.core.rootdev = 0x0100; |
| 72 | |
| 73 | tag = tag_next(tag); |
| 74 | tag->hdr.tag = ATAG_MEM; |
| 75 | tag->hdr.size = tag_size(tag_mem32); |
| 76 | tag->u.mem.size = 4096; |
| 77 | tag->u.mem.start = PHYS_OFFSET; |
| 78 | |
| 79 | tag = tag_next(tag); |
| 80 | tag->hdr.tag = ATAG_NONE; |
| 81 | tag->hdr.size = 0; |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | static void __init p720t_map_io(void) |
| 86 | { |
| 87 | clps711x_map_io(); |
| 88 | iotable_init(p720t_io_desc, ARRAY_SIZE(p720t_io_desc)); |
| 89 | } |
| 90 | |
| 91 | MACHINE_START(P720T, "ARM-Prospector720T") |
Russell King | e9dea0c | 2005-07-03 17:38:58 +0100 | [diff] [blame] | 92 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
| 93 | .phys_ram = 0xc0000000, |
| 94 | .phys_io = 0x80000000, |
| 95 | .io_pg_offst = ((0xff000000) >> 18) & 0xfffc, |
| 96 | .boot_params = 0xc0000100, |
| 97 | .fixup = fixup_p720t, |
| 98 | .map_io = p720t_map_io, |
| 99 | .init_irq = clps711x_init_irq, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 100 | .timer = &clps711x_timer, |
| 101 | MACHINE_END |
| 102 | |
| 103 | static int p720t_hw_init(void) |
| 104 | { |
| 105 | /* |
| 106 | * Power down as much as possible in case we don't |
| 107 | * have the drivers loaded. |
| 108 | */ |
| 109 | PLD_LCDEN = 0; |
| 110 | PLD_PWR &= ~(PLD_S4_ON|PLD_S3_ON|PLD_S2_ON|PLD_S1_ON); |
| 111 | |
| 112 | PLD_KBD = 0; |
| 113 | PLD_IO = 0; |
| 114 | PLD_IRDA = 0; |
| 115 | PLD_CODEC = 0; |
| 116 | PLD_TCH = 0; |
| 117 | PLD_SPI = 0; |
| 118 | #ifndef CONFIG_DEBUG_LL |
| 119 | PLD_COM2 = 0; |
| 120 | PLD_COM1 = 0; |
| 121 | #endif |
| 122 | |
| 123 | return 0; |
| 124 | } |
| 125 | |
| 126 | __initcall(p720t_hw_init); |
| 127 | |