Alexander Shiyan | 2a55289 | 2012-10-10 19:45:33 +0400 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2000, 2001 Blue Mug, Inc. All Rights Reserved. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by |
| 6 | * the Free Software Foundation; either version 2 of the License, or |
| 7 | * (at your option) any later version. |
| 8 | */ |
| 9 | |
| 10 | #include <linux/init.h> |
| 11 | #include <linux/memblock.h> |
| 12 | #include <linux/types.h> |
| 13 | |
| 14 | #include <asm/setup.h> |
| 15 | #include <asm/mach/map.h> |
| 16 | #include <asm/mach/arch.h> |
| 17 | #include <asm/mach-types.h> |
| 18 | |
| 19 | #include <mach/hardware.h> |
| 20 | |
| 21 | #include "common.h" |
| 22 | |
| 23 | #define VIDEORAM_SIZE SZ_128K |
| 24 | |
| 25 | static struct map_desc edb7211_io_desc[] __initdata = { |
| 26 | { /* Memory-mapped extra keyboard row */ |
| 27 | .virtual = IO_ADDRESS(EP7211_PHYS_EXTKBD), |
| 28 | .pfn = __phys_to_pfn(EP7211_PHYS_EXTKBD), |
| 29 | .length = SZ_1M, |
| 30 | .type = MT_DEVICE, |
| 31 | }, { /* CS8900A Ethernet chip */ |
| 32 | .virtual = IO_ADDRESS(EP7211_PHYS_CS8900A), |
| 33 | .pfn = __phys_to_pfn(EP7211_PHYS_CS8900A), |
| 34 | .length = SZ_1M, |
| 35 | .type = MT_DEVICE, |
| 36 | }, { /* Flash bank 0 */ |
| 37 | .virtual = IO_ADDRESS(EP7211_PHYS_FLASH1), |
| 38 | .pfn = __phys_to_pfn(EP7211_PHYS_FLASH1), |
| 39 | .length = SZ_8M, |
| 40 | .type = MT_DEVICE, |
| 41 | }, { /* Flash bank 1 */ |
| 42 | .virtual = IO_ADDRESS(EP7211_PHYS_FLASH2), |
| 43 | .pfn = __phys_to_pfn(EP7211_PHYS_FLASH2), |
| 44 | .length = SZ_8M, |
| 45 | .type = MT_DEVICE, |
| 46 | }, |
| 47 | }; |
| 48 | |
| 49 | void __init edb7211_map_io(void) |
| 50 | { |
| 51 | clps711x_map_io(); |
| 52 | iotable_init(edb7211_io_desc, ARRAY_SIZE(edb7211_io_desc)); |
| 53 | } |
| 54 | |
| 55 | /* Reserve screen memory region at the start of main system memory. */ |
| 56 | static void __init edb7211_reserve(void) |
| 57 | { |
| 58 | memblock_reserve(PHYS_OFFSET, VIDEORAM_SIZE); |
| 59 | } |
| 60 | |
| 61 | static void __init |
| 62 | fixup_edb7211(struct tag *tags, char **cmdline, struct meminfo *mi) |
| 63 | { |
| 64 | /* |
| 65 | * Bank start addresses are not present in the information |
| 66 | * passed in from the boot loader. We could potentially |
| 67 | * detect them, but instead we hard-code them. |
| 68 | * |
| 69 | * Banks sizes _are_ present in the param block, but we're |
| 70 | * not using that information yet. |
| 71 | */ |
| 72 | mi->bank[0].start = 0xc0000000; |
| 73 | mi->bank[0].size = SZ_8M; |
| 74 | mi->bank[1].start = 0xc1000000; |
| 75 | mi->bank[1].size = SZ_8M; |
| 76 | mi->nr_banks = 2; |
| 77 | } |
| 78 | |
| 79 | MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)") |
| 80 | /* Maintainer: Jon McClintock */ |
| 81 | .atag_offset = VIDEORAM_SIZE + 0x100, |
| 82 | .fixup = fixup_edb7211, |
| 83 | .map_io = edb7211_map_io, |
| 84 | .reserve = edb7211_reserve, |
| 85 | .init_irq = clps711x_init_irq, |
| 86 | .timer = &clps711x_timer, |
| 87 | .restart = clps711x_restart, |
| 88 | MACHINE_END |