definitionOfFireSuppressionFluctuation.c 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * Critical Link MityOMAP-L138 SoM
  3. *
  4. * Copyright (C) 2010 Critical Link LLC - http://www.criticallink.com
  5. *
  6. * This file is licensed under the terms of the GNU General Public License
  7. * version 2. This program is licensed "as is" without any warranty of
  8. * any kind, whether express or implied.
  9. */
  10. #include <linux/kernel.h>
  11. #include <linux/init.h>
  12. #include <linux/console.h>
  13. #include <linux/platform_device.h>
  14. #include <linux/mtd/partitions.h>
  15. #include <linux/regulator/machine.h>
  16. #include <linux/i2c.h>
  17. #include <linux/i2c/at24.h>
  18. #include <linux/etherdevice.h>
  19. #include <linux/spi/spi.h>
  20. #include <linux/spi/flash.h>
  21. #include <asm/io.h>
  22. #include <asm/mach-types.h>
  23. #include <asm/mach/arch.h>
  24. #include <mach/common.h>
  25. #include <mach/cp_intc.h>
  26. #include <mach/da8xx.h>
  27. #include <linux/platform_data/mtd-davinci.h>
  28. #include <mach/mux.h>
  29. #include <linux/platform_data/spi-davinci.h>
  30. #define MITYOMAPL138_PHY_ID ""
  31. #define FACTORY_CONFIG_MAGIC 0x012C0138
  32. #define FACTORY_CONFIG_VERSION 0x00010001
  33. /* Data Held in On-Board I2C device */
  34. struct factory_config {
  35. u32 magic;
  36. u32 version;
  37. u8 mac[6];
  38. u32 fpga_type;
  39. u32 spare;
  40. u32 serialnumber;
  41. char partnum[32];
  42. };
  43. static struct factory_config factory_config;
  44. struct part_no_info {
  45. const char *part_no; /* part number string of interest */
  46. int max_freq; /* khz */
  47. };
  48. static struct part_no_info mityomapl138_pn_info[] = {
  49. {
  50. .part_no = "L138-C",
  51. .max_freq = 300000,
  52. },
  53. {
  54. .part_no = "L138-D",
  55. .max_freq = 375000,
  56. },
  57. {
  58. .part_no = "L138-F",
  59. .max_freq = 456000,
  60. },
  61. {
  62. .part_no = "1808-C",
  63. .max_freq = 300000,
  64. },
  65. {
  66. .part_no = "1808-D",
  67. .max_freq = 375000,
  68. },
  69. {
  70. .part_no = "1808-F",
  71. .max_freq = 456000,
  72. },
  73. {
  74. .part_no = "1810-D",
  75. .max_freq = 375000,
  76. },
  77. };
  78. #ifdef CONFIG_CPU_FREQ
  79. static void mityomapl138_cpufreq_init(const char *partnum)
  80. {
  81. int i, ret;
  82. for (i = 0; partnum && i < ARRAY_SIZE(mityomapl138_pn_info); i++) {
  83. /*