versatile_pb.c 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. * linux/arch/arm/mach-versatile/versatile_pb.c
  3. *
  4. * Copyright (C) 2004 ARM Limited
  5. * Copyright (C) 2000 Deep Blue Solutions Ltd
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  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. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. */
  21. #include <linux/init.h>
  22. #include <linux/device.h>
  23. #include <linux/amba/bus.h>
  24. #include <linux/amba/pl061.h>
  25. #include <linux/amba/mmci.h>
  26. #include <linux/io.h>
  27. #include <mach/hardware.h>
  28. #include <asm/irq.h>
  29. #include <asm/mach-types.h>
  30. #include <asm/mach/arch.h>
  31. #include "core.h"
  32. #if 1
  33. #define IRQ_MMCI1A IRQ_VICSOURCE23
  34. #else
  35. #define IRQ_MMCI1A IRQ_SIC_MMCI1A
  36. #endif
  37. static struct mmci_platform_data mmc1_plat_data = {
  38. .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
  39. .status = mmc_status,
  40. .gpio_wp = -1,
  41. .gpio_cd = -1,
  42. };
  43. #define UART3_IRQ { IRQ_SIC_UART3 }
  44. #define SCI1_IRQ { IRQ_SIC_SCI3 }
  45. #define MMCI1_IRQ { IRQ_MMCI1A, IRQ_SIC_MMCI1B }
  46. /*
  47. * These devices are connected via the DMA APB bridge
  48. */
  49. /* FPGA Primecells */
  50. APB_DEVICE(uart3, "fpga:09", UART3, NULL);
  51. APB_DEVICE(sci1, "fpga:0a", SCI1, NULL);
  52. APB_DEVICE(mmc1, "fpga:0b", MMCI1, &mmc1_plat_data);
  53. static struct amba_device *amba_devs[] __initdata = {
  54. &uart3_device,
  55. &sci1_device,
  56. &mmc1_device,
  57. };
  58. static void __init versatile_pb_init(void)
  59. {
  60. int i;
  61. versatile_init();
  62. for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
  63. struct amba_device *d = amba_devs[i];
  64. amba_device_register(d, &iomem_resource);
  65. }
  66. }
  67. MACHINE_START(VERSATILE_PB, "ARM-Versatile PB")
  68. /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
  69. .atag_offset = 0x100,
  70. .map_io = versatile_map_io,
  71. .init_early = versatile_init_early,
  72. .init_irq = versatile_init_irq,
  73. .init_time = versatile_timer_init,
  74. .init_machine = versatile_pb_init,
  75. .restart = versatile_restart,
  76. MACHINE_END