preliminaryDataProcessing.c 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * arch/arm/mach-orion5x/net2big-setup.c
  3. *
  4. * LaCie 2Big Network NAS setup
  5. *
  6. * Copyright (C) 2009 Simon Guinot <sguinot@lacie.com>
  7. *
  8. * This file is licensed under the terms of the GNU General Public
  9. * License version 2. This program is licensed "as is" without any
  10. * warranty of any kind, whether express or implied.
  11. */
  12. #include <linux/kernel.h>
  13. #include <linux/init.h>
  14. #include <linux/platform_device.h>
  15. #include <linux/mtd/physmap.h>
  16. #include <linux/mv643xx_eth.h>
  17. #include <linux/leds.h>
  18. #include <linux/gpio_keys.h>
  19. #include <linux/input.h>
  20. #include <linux/i2c.h>
  21. #include <linux/ata_platform.h>
  22. #include <linux/gpio.h>
  23. #include <linux/delay.h>
  24. #include <asm/mach-types.h>
  25. #include <asm/mach/arch.h>
  26. #include <mach/orion5x.h>
  27. #include <plat/orion-gpio.h>
  28. #include "common.h"
  29. #include "mpp.h"
  30. /*****************************************************************************
  31. * LaCie 2Big Network Info
  32. ****************************************************************************/
  33. /*
  34. * 512KB NOR flash Device bus boot chip select
  35. */
  36. #define NET2BIG_NOR_BOOT_BASE 0xfff80000
  37. #define NET2BIG_NOR_BOOT_SIZE SZ_512K
  38. /*****************************************************************************
  39. * 512KB NOR Flash on Boot Device
  40. ****************************************************************************/
  41. /*
  42. * TODO: Check write support on flash MX29LV400CBTC-70G
  43. */
  44. static struct mtd_partition net2big_partitions[] = {
  45. {
  46. .name = "Full512kb",
  47. .size = MTDPART_SIZ_FULL,
  48. .offset = 0x00000000,
  49. .mask_flags = MTD_WRITEABLE,
  50. },
  51. };
  52. static struct physmap_flash_data net2big_nor_flash_data = {
  53. .width = 1,
  54. .parts = net2big_partitions,
  55. .nr_parts = ARRAY_SIZE(net2big_partitions),
  56. };
  57. static struct resource net2big_nor_flash_resource = {
  58. .flags = IORESOURCE_MEM,
  59. .start = NET2BIG_NOR_BOOT_BASE,
  60. .end = NET2BIG_NOR_BOOT_BASE
  61. + NET2BIG_NOR_BOOT_SIZE - 1,
  62. };
  63. static struct platform_device net2big_nor_flash = {