h7202-eval.c 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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/config.h>
  16. #include <linux/init.h>
  17. #include <linux/kernel.h>
  18. #include <linux/types.h>
  19. #include <linux/string.h>
  20. #include <linux/device.h>
  21. #include <asm/setup.h>
  22. #include <asm/types.h>
  23. #include <asm/mach-types.h>
  24. #include <asm/page.h>
  25. #include <asm/pgtable.h>
  26. #include <asm/mach/arch.h>
  27. #include <asm/hardware.h>
  28. #include "common.h"
  29. static struct resource cirrus_resources[] = {
  30. [0] = {
  31. .start = ETH0_PHYS + 0x300,
  32. .end = ETH0_PHYS + 0x300 + 0x10,
  33. .flags = IORESOURCE_MEM,
  34. },
  35. [1] = {
  36. .start = IRQ_CHAINED_GPIOB(8),
  37. .end = IRQ_CHAINED_GPIOB(8),
  38. .flags = IORESOURCE_IRQ,
  39. },
  40. };
  41. static struct platform_device cirrus_device = {
  42. .name = "cirrus-cs89x0",
  43. .id = -1,
  44. .num_resources = ARRAY_SIZE(cirrus_resources),
  45. .resource = cirrus_resources,
  46. };
  47. static struct platform_device *devices[] __initdata = {
  48. &cirrus_device,
  49. };
  50. /*
  51. * Hardware init. This is called early in initcalls
  52. * Place pin inits here. So you avoid adding ugly
  53. * #ifdef stuff to common drivers.
  54. * Use this only, if your bootloader is not able
  55. * to initialize the pins proper.
  56. */
  57. static void __init init_eval_h7202(void)
  58. {
  59. init_hw_h7202();
  60. (void) platform_add_devices(devices, ARRAY_SIZE(devices));
  61. /* Enable interrupt on portb bit 8 (ethernet) */
  62. CPU_REG (GPIO_B_VIRT, GPIO_POL) &= ~(1 << 8);
  63. CPU_REG (GPIO_B_VIRT, GPIO_EN) |= (1 << 8);
  64. }
  65. MACHINE_START(H7202, "Hynix HMS30C7202")
  66. /* Maintainer: Robert Schwebel, Pengutronix */
  67. .phys_ram = 0x40000000,
  68. .phys_io = 0x80000000,
  69. .io_pg_offst = ((0xf0000000) >> 18) & 0xfffc,
  70. .boot_params = 0x40000100,
  71. .map_io = h720x_map_io,
  72. .init_irq = h7202_init_irq,
  73. .timer = &h7202_timer,
  74. .init_machine = init_eval_h7202,
  75. MACHINE_END