calculationAnalysisOfLeakageCurrentConsumption.c 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /*
  2. * board-omap3pandora.c (Pandora Handheld Console)
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * version 2 as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. * General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program; if not, write to the Free Software
  15. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  16. * 02110-1301 USA
  17. *
  18. */
  19. #include <linux/init.h>
  20. #include <linux/kernel.h>
  21. #include <linux/platform_device.h>
  22. #include <linux/spi/spi.h>
  23. #include <linux/regulator/machine.h>
  24. #include <linux/i2c/twl.h>
  25. #include <linux/wl12xx.h>
  26. #include <linux/mtd/partitions.h>
  27. #include <linux/mtd/nand.h>
  28. #include <linux/leds.h>
  29. #include <linux/input.h>
  30. #include <linux/input/matrix_keypad.h>
  31. #include <linux/gpio.h>
  32. #include <linux/gpio_keys.h>
  33. #include <linux/mmc/host.h>
  34. #include <linux/mmc/card.h>
  35. #include <linux/regulator/fixed.h>
  36. #include <linux/platform_data/spi-omap2-mcspi.h>
  37. #include <asm/mach-types.h>
  38. #include <asm/mach/arch.h>
  39. #include <asm/mach/map.h>
  40. #include "common.h"
  41. #include <video/omapdss.h>
  42. #include <linux/platform_data/mtd-nand-omap2.h>
  43. #include "mux.h"
  44. #include "sdram-micron-mt46h32m32lf-6.h"
  45. #include "hsmmc.h"
  46. #include "common-board-devices.h"
  47. #include "gpmc-nand.h"
  48. #define PANDORA_WIFI_IRQ_GPIO 21
  49. #define PANDORA_WIFI_NRESET_GPIO 23
  50. #define OMAP3_PANDORA_TS_GPIO 94
  51. static struct mtd_partition omap3pandora_nand_partitions[] = {
  52. {
  53. .name = "xloader",
  54. .offset = 0,
  55. .size = 4 * NAND_BLOCK_SIZE,
  56. .mask_flags = MTD_WRITEABLE
  57. }, {
  58. .name = "uboot",
  59. .offset = MTDPART_OFS_APPEND,
  60. .size = 15 * NAND_BLOCK_SIZE,
  61. }, {
  62. .name = "uboot-env",
  63. .offset = MTDPART_OFS_APPEND,
  64. .size = 1 * NAND_BLOCK_SIZE,
  65. }, {
  66. .name = "boot",
  67. .offset = MTDPART_OFS_APPEND,
  68. .size = 80 * NAND_BLOCK_SIZE,
  69. }, {
  70. .name = "rootfs",
  71. .offset = MTDPART_OFS_APPEND,
  72. .size = MTDPART_SIZ_FULL,
  73. },
  74. };
  75. static struct omap_nand_platform_data pandora_nand_data = {
  76. .cs = 0,
  77. .devsize = NAND_BUSWIDTH_16,
  78. .xfer_type = NAND_OMAP_PREFETCH_DMA,
  79. .parts = omap3pandora_nand_partitions,
  80. .nr_parts = ARRAY_SIZE(omap3pandora_nand_partitions),
  81. };
  82. static struct gpio_led pandora_gpio_leds[] = {
  83. {
  84. .name = "pandora::sd1",
  85. .default_trigger = "mmc0",
  86. .gpio = 128,
  87. }, {
  88. .name = "pandora::sd2",
  89. .default_trigger = "mmc1",
  90. .gpio = 129,
  91. }, {
  92. .name = "pandora::bluetooth",
  93. .gpio = 158,
  94. }, {
  95. .name = "pandora::wifi",
  96. .gpio = 159,
  97. },
  98. };
  99. static struct gpio_led_platform_data pandora_gpio_led_data = {
  100. .leds = pandora_gpio_leds,
  101. .num_leds = ARRAY_SIZE(pandora_gpio_leds),
  102. };
  103. static struct platform_device pandora_leds_gpio = {
  104. .name = "leds-gpio",
  105. .id = -1,
  106. .dev = {
  107. .platform_data = &pandora_gpio_led_data,
  108. },
  109. };
  110. static struct platform_device pandora_backlight = {
  111. .name = "pandora-backlight",
  112. .id = -1,