setup-sh73a0.c 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * sh73a0 processor support
  3. *
  4. * Copyright (C) 2010 Takashi Yoshii
  5. * Copyright (C) 2010 Magnus Damm
  6. * Copyright (C) 2008 Yoshihiro Shimoda
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; version 2 of the License.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. */
  17. #include <linux/kernel.h>
  18. #include <linux/init.h>
  19. #include <linux/interrupt.h>
  20. #include <linux/irq.h>
  21. #include <linux/of_platform.h>
  22. #include <linux/delay.h>
  23. #include <linux/input.h>
  24. #include <linux/io.h>
  25. #include <asm/hardware/cache-l2x0.h>
  26. #include <asm/mach/map.h>
  27. #include <asm/mach/arch.h>
  28. #include <asm/mach/time.h>
  29. #include "common.h"
  30. #include "sh73a0.h"
  31. static struct map_desc sh73a0_io_desc[] __initdata = {
  32. /* create a 1:1 identity mapping for 0xe6xxxxxx
  33. * used by CPGA, INTC and PFC.
  34. */
  35. {
  36. .virtual = 0xe6000000,
  37. .pfn = __phys_to_pfn(0xe6000000),
  38. .length = 256 << 20,
  39. .type = MT_DEVICE_NONSHARED
  40. },
  41. };
  42. static void __init sh73a0_map_io(void)
  43. {
  44. debug_ll_io_init();
  45. iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc));
  46. }
  47. static void __init sh73a0_generic_init(void)
  48. {
  49. #ifdef CONFIG_CACHE_L2X0
  50. /* Shared attribute override enable, 64K*8way */
  51. l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff);
  52. #endif
  53. of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
  54. }
  55. static const char *const sh73a0_boards_compat_dt[] __initconst = {
  56. "renesas,sh73a0",
  57. NULL,
  58. };
  59. DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)")
  60. .smp = smp_ops(sh73a0_smp_ops),
  61. .map_io = sh73a0_map_io,
  62. .init_early = shmobile_init_delay,
  63. .init_machine = sh73a0_generic_init,
  64. .init_late = shmobile_init_late,
  65. .dt_compat = sh73a0_boards_compat_dt,
  66. MACHINE_END