board-kzm9g.c 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * KZM-A9-GT board support
  3. *
  4. * Copyright (C) 2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
  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. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  18. */
  19. #include <linux/gpio.h>
  20. #include <linux/io.h>
  21. #include <linux/irq.h>
  22. #include <linux/platform_device.h>
  23. #include <mach/sh73a0.h>
  24. #include <mach/common.h>
  25. #include <asm/hardware/cache-l2x0.h>
  26. #include <asm/hardware/gic.h>
  27. #include <asm/mach-types.h>
  28. #include <asm/mach/arch.h>
  29. static struct platform_device *kzm_devices[] __initdata = {
  30. };
  31. static void __init kzm_init(void)
  32. {
  33. sh73a0_pinmux_init();
  34. /* enable SCIFA4 */
  35. gpio_request(GPIO_FN_SCIFA4_TXD, NULL);
  36. gpio_request(GPIO_FN_SCIFA4_RXD, NULL);
  37. gpio_request(GPIO_FN_SCIFA4_RTS_, NULL);
  38. gpio_request(GPIO_FN_SCIFA4_CTS_, NULL);
  39. #ifdef CONFIG_CACHE_L2X0
  40. /* Early BRESP enable, Shared attribute override enable, 64K*8way */
  41. l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff);
  42. #endif
  43. sh73a0_add_standard_devices();
  44. platform_add_devices(kzm_devices, ARRAY_SIZE(kzm_devices));
  45. }
  46. MACHINE_START(KZM9G, "kzm9g")
  47. .map_io = sh73a0_map_io,
  48. .init_early = sh73a0_add_early_devices,
  49. .nr_irqs = NR_IRQS_LEGACY,
  50. .init_irq = sh73a0_init_irq,
  51. .handle_irq = gic_handle_irq,
  52. .init_machine = kzm_init,
  53. .timer = &shmobile_timer,
  54. MACHINE_END