h7202-eval.c 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * linux/arch/arm/mach-h720x/h7202-eval.c
  3. *
  4. * Copyright (C) 2003 Thomas Gleixner <tglx@linutronix.de>
  5. * 2003 Robert Schwebel <r.schwebel@pengutronix.de>
  6. * 2004 Sascha Hauer <s.hauer@pengutronix.de>
  7. *
  8. * Architecture specific stuff for Hynix HMS30C7202 development board
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. *
  14. */
  15. #include <linux/init.h>
  16. #include <linux/kernel.h>
  17. #include <linux/types.h>
  18. #include <linux/string.h>
  19. #include <linux/platform_device.h>
  20. #include <asm/setup.h>
  21. #include <asm/types.h>
  22. #include <asm/mach-types.h>
  23. #include <asm/page.h>
  24. #include <asm/pgtable.h>
  25. #include <asm/mach/arch.h>
  26. #include <asm/hardware.h>
  27. #include "common.h"
  28. static struct resource cirrus_resources[] = {
  29. [0] = {
  30. .start = ETH0_PHYS + 0x300,
  31. .end = ETH0_PHYS + 0x300 + 0x10,
  32. .flags = IORESOURCE_MEM,
  33. },
  34. [1] = {
  35. .start = IRQ_CHAINED_GPIOB(8),
  36. .end = IRQ_CHAINED_GPIOB(8),
  37. .flags = IORESOURCE_IRQ,
  38. },
  39. };
  40. static struct platform_device cirrus_device = {
  41. .name = "cirrus-cs89x0",
  42. .id = -1,
  43. .num_resources = ARRAY_SIZE(cirrus_resources),
  44. .resource = cirrus_resources,
  45. };
  46. static struct platform_device *devices[] __initdata = {
  47. &cirrus_device,
  48. };
  49. /*
  50. * Hardware init. This is called early in initcalls
  51. * Place pin inits here. So you avoid adding ugly
  52. * #ifdef stuff to common drivers.
  53. * Use this only, if your bootloader is not able
  54. * to initialize the pins proper.
  55. */
  56. static void __init init_eval_h7202(void)
  57. {
  58. init_hw_h7202();
  59. (void) platform_add_devices(devices, ARRAY_SIZE(devices));
  60. /* Enable interrupt on portb bit 8 (ethernet) */
  61. CPU_REG (GPIO_B_VIRT, GPIO_POL) &= ~(1 << 8);
  62. CPU_REG (GPIO_B_VIRT, GPIO_EN) |= (1 << 8);
  63. }
  64. MACHINE_START(H7202, "Hynix HMS30C7202")
  65. /* Maintainer: Robert Schwebel, Pengutronix */
  66. .phys_io = 0x80000000,
  67. .io_pg_offst = ((0xf0000000) >> 18) & 0xfffc,
  68. .boot_params = 0x40000100,
  69. .map_io = h720x_map_io,
  70. .init_irq = h7202_init_irq,
  71. .timer = &h7202_timer,
  72. .init_machine = init_eval_h7202,
  73. MACHINE_END