setup-emev2.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Emma Mobile EV2 processor support
  3. *
  4. * Copyright (C) 2012 Magnus Damm
  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; version 2 of the License.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. #include <linux/kernel.h>
  16. #include <linux/init.h>
  17. #include <linux/mm.h>
  18. #include <asm/mach-types.h>
  19. #include <asm/mach/arch.h>
  20. #include <asm/mach/map.h>
  21. #include "common.h"
  22. static struct map_desc emev2_io_desc[] __initdata = {
  23. #ifdef CONFIG_SMP
  24. /* 2M mapping for SCU + L2 controller */
  25. {
  26. .virtual = 0xf0000000,
  27. .pfn = __phys_to_pfn(0x1e000000),
  28. .length = SZ_2M,
  29. .type = MT_DEVICE
  30. },
  31. #endif
  32. };
  33. static void __init emev2_map_io(void)
  34. {
  35. iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc));
  36. }
  37. static const char *const emev2_boards_compat_dt[] __initconst = {
  38. "renesas,emev2",
  39. NULL,
  40. };
  41. extern const struct smp_operations emev2_smp_ops;
  42. DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
  43. .smp = smp_ops(emev2_smp_ops),
  44. .map_io = emev2_map_io,
  45. .init_early = shmobile_init_delay,
  46. .init_late = shmobile_init_late,
  47. .dt_compat = emev2_boards_compat_dt,
  48. MACHINE_END