mach-easy50712.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * This program is free software; you can redistribute it and/or modify it
  3. * under the terms of the GNU General Public License version 2 as published
  4. * by the Free Software Foundation.
  5. *
  6. * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
  7. */
  8. #include <linux/init.h>
  9. #include <linux/platform_device.h>
  10. #include <linux/mtd/mtd.h>
  11. #include <linux/mtd/partitions.h>
  12. #include <linux/mtd/physmap.h>
  13. #include <linux/input.h>
  14. #include <linux/phy.h>
  15. #include <lantiq_soc.h>
  16. #include <irq.h>
  17. #include "../machtypes.h"
  18. #include "devices.h"
  19. static struct mtd_partition easy50712_partitions[] = {
  20. {
  21. .name = "uboot",
  22. .offset = 0x0,
  23. .size = 0x10000,
  24. },
  25. {
  26. .name = "uboot_env",
  27. .offset = 0x10000,
  28. .size = 0x10000,
  29. },
  30. {
  31. .name = "linux",
  32. .offset = 0x20000,
  33. .size = 0xe0000,
  34. },
  35. {
  36. .name = "rootfs",
  37. .offset = 0x100000,
  38. .size = 0x300000,
  39. },
  40. };
  41. static struct physmap_flash_data easy50712_flash_data = {
  42. .nr_parts = ARRAY_SIZE(easy50712_partitions),
  43. .parts = easy50712_partitions,
  44. };
  45. static struct ltq_pci_data ltq_pci_data = {
  46. .clock = PCI_CLOCK_INT,
  47. .gpio = PCI_GNT1 | PCI_REQ1,
  48. .irq = {
  49. [14] = INT_NUM_IM0_IRL0 + 22,
  50. },
  51. };
  52. static struct ltq_eth_data ltq_eth_data = {
  53. .mii_mode = PHY_INTERFACE_MODE_MII,
  54. };
  55. static void __init easy50712_init(void)
  56. {
  57. ltq_register_gpio_stp();
  58. ltq_register_nor(&easy50712_flash_data);
  59. ltq_register_pci(&ltq_pci_data);
  60. ltq_register_etop(&ltq_eth_data);
  61. }
  62. MIPS_MACHINE(LTQ_MACH_EASY50712,
  63. "EASY50712",
  64. "EASY50712 Eval Board",
  65. easy50712_init);