edb7211.c 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. #include <linux/init.h>
  10. #include <linux/memblock.h>
  11. #include <linux/types.h>
  12. #include <asm/setup.h>
  13. #include <asm/mach/map.h>
  14. #include <asm/mach/arch.h>
  15. #include <asm/mach-types.h>
  16. #include <mach/hardware.h>
  17. #include "common.h"
  18. #define VIDEORAM_SIZE SZ_128K
  19. static struct map_desc edb7211_io_desc[] __initdata = {
  20. { /* Memory-mapped extra keyboard row */
  21. .virtual = IO_ADDRESS(EP7211_PHYS_EXTKBD),
  22. .pfn = __phys_to_pfn(EP7211_PHYS_EXTKBD),
  23. .length = SZ_1M,
  24. .type = MT_DEVICE,
  25. }, { /* CS8900A Ethernet chip */
  26. .virtual = IO_ADDRESS(EP7211_PHYS_CS8900A),
  27. .pfn = __phys_to_pfn(EP7211_PHYS_CS8900A),
  28. .length = SZ_1M,
  29. .type = MT_DEVICE,
  30. }, { /* Flash bank 0 */
  31. .virtual = IO_ADDRESS(EP7211_PHYS_FLASH1),
  32. .pfn = __phys_to_pfn(EP7211_PHYS_FLASH1),
  33. .length = SZ_8M,
  34. .type = MT_DEVICE,
  35. }, { /* Flash bank 1 */
  36. .virtual = IO_ADDRESS(EP7211_PHYS_FLASH2),
  37. .pfn = __phys_to_pfn(EP7211_PHYS_FLASH2),
  38. .length = SZ_8M,
  39. .type = MT_DEVICE,
  40. },
  41. };
  42. void __init edb7211_map_io(void)
  43. {
  44. clps711x_map_io();
  45. iotable_init(edb7211_io_desc, ARRAY_SIZE(edb7211_io_desc));
  46. }
  47. /* Reserve screen memory region at the start of main system memory. */
  48. static void __init edb7211_reserve(void)
  49. {
  50. memblock_reserve(PHYS_OFFSET, VIDEORAM_SIZE);
  51. }
  52. static void __init
  53. fixup_edb7211(struct tag *tags, char **cmdline, struct meminfo *mi)
  54. {
  55. /*
  56. * Bank start addresses are not present in the information
  57. * passed in from the boot loader. We could potentially
  58. * detect them, but instead we hard-code them.
  59. *
  60. * Banks sizes _are_ present in the param block, but we're
  61. * not using that information yet.
  62. */
  63. mi->bank[0].start = 0xc0000000;
  64. mi->bank[0].size = SZ_8M;
  65. mi->bank[1].start = 0xc1000000;
  66. mi->bank[1].size = SZ_8M;
  67. mi->nr_banks = 2;
  68. }
  69. MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)")
  70. /* Maintainer: Jon McClintock */
  71. .atag_offset = VIDEORAM_SIZE + 0x100,
  72. .fixup = fixup_edb7211,
  73. .map_io = edb7211_map_io,
  74. .reserve = edb7211_reserve,
  75. .init_irq = clps711x_init_irq,
  76. .timer = &clps711x_timer,
  77. .restart = clps711x_restart,
  78. MACHINE_END