gpmi-nand.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along
  15. * with this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  17. */
  18. #ifndef __MACH_MXS_GPMI_NAND_H__
  19. #define __MACH_MXS_GPMI_NAND_H__
  20. /* The size of the resources is fixed. */
  21. #define GPMI_NAND_RES_SIZE 6
  22. /* Resource names for the GPMI NAND driver. */
  23. #define GPMI_NAND_GPMI_REGS_ADDR_RES_NAME "GPMI NAND GPMI Registers"
  24. #define GPMI_NAND_GPMI_INTERRUPT_RES_NAME "GPMI NAND GPMI Interrupt"
  25. #define GPMI_NAND_BCH_REGS_ADDR_RES_NAME "GPMI NAND BCH Registers"
  26. #define GPMI_NAND_BCH_INTERRUPT_RES_NAME "GPMI NAND BCH Interrupt"
  27. #define GPMI_NAND_DMA_CHANNELS_RES_NAME "GPMI NAND DMA Channels"
  28. #define GPMI_NAND_DMA_INTERRUPT_RES_NAME "GPMI NAND DMA Interrupt"
  29. /**
  30. * struct gpmi_nand_platform_data - GPMI NAND driver platform data.
  31. *
  32. * This structure communicates platform-specific information to the GPMI NAND
  33. * driver that can't be expressed as resources.
  34. *
  35. * @platform_init: A pointer to a function the driver will call to
  36. * initialize the platform (e.g., set up the pin mux).
  37. * @min_prop_delay_in_ns: Minimum propagation delay of GPMI signals to and
  38. * from the NAND Flash device, in nanoseconds.
  39. * @max_prop_delay_in_ns: Maximum propagation delay of GPMI signals to and
  40. * from the NAND Flash device, in nanoseconds.
  41. * @max_chip_count: The maximum number of chips for which the driver
  42. * should configure the hardware. This value most
  43. * likely reflects the number of pins that are
  44. * connected to a NAND Flash device. If this is
  45. * greater than the SoC hardware can support, the
  46. * driver will print a message and fail to initialize.
  47. * @partitions: An optional pointer to an array of partition
  48. * descriptions.
  49. * @partition_count: The number of elements in the partitions array.
  50. */
  51. struct gpmi_nand_platform_data {
  52. /* SoC hardware information. */
  53. int (*platform_init)(void);
  54. /* NAND Flash information. */
  55. unsigned int min_prop_delay_in_ns;
  56. unsigned int max_prop_delay_in_ns;
  57. unsigned int max_chip_count;
  58. /* Medium information. */
  59. struct mtd_partition *partitions;
  60. unsigned partition_count;
  61. };
  62. #endif