Recent Posts
C# | 0 sec ago
None | 5 sec ago
None | 23 sec ago
None | 27 sec ago
XML | 48 sec ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By MusikMonk on the 9th of Feb 2010 10:20:25 PM Download | Raw | Embed | Report
  1.  -35,27 +35,33 @@ void htc_bt_init_gpios()
  2.  
  3.         /* configure UART PIN MUX */
  4.         /* Note: UART / serial pins are shared with GPIO 40,41,42,43
  5.          * That means doing anything with those GPIOs will do nothing
  6.          */
  7. -       omap_writel((omap_readl(OMAP850_IO_CONF_3) & 0xf11fffff), OMAP850_IO_CONF_3);
  8. +   omap_writel((omap_readl(OMAP850_IO_CONF_3) & 0xf11fffff) | 0x01100000, OMAP850_IO_CONF_3);
  9.  
  10. -       /* configure GPIO 125 (BT power) MUX */
  11. -       omap_writel((omap_readl(OMAP850_IO_CONF_8) & 0xfffffff1) | 0x0000000c, OMAP850_IO_CONF_8);
  12. +   /* configure GPIO 81 MUX */
  13. +   omap_writel((omap_readl(OMAP850_IO_CONF_6) & 0xfffffcff) | 0x00000c00, OMAP850_IO_CONF_6);
  14. +   /* configure GPIO 168 MUX */
  15. +   omap_writel((omap_readl(OMAP850_IO_CONF_13) & 0xfcffffff) | 0x0c000000, OMAP850_IO_CONF_13);
  16.  
  17. -       /* GPIO 125 to output */
  18. -       omap_set_gpio_direction(125, 0);
  19. +   /* GPIO 81 to output */
  20. +   omap_set_gpio_direction(81, 0);
  21. +   /* GPIO 168 to output */
  22. +   omap_set_gpio_direction(168, 0);
  23.  
  24. -       /* turn it off - functions as a reset too! */
  25. -       gpio_set_value(125, 0);
  26. +   /* turn it off - functions as a reset too! */
  27. +   gpio_set_value(81, 0);
  28. +   gpio_set_value(168, 0);
  29.  
  30.     /* Disable the I2C bit to toggle bluetooth on -- HTC Herald, HTC Elf, and others needs this */
  31.     if  (machine_is_herald() ||
  32.          machine_is_htcelf() ||
  33.          machine_is_htcstartrek() ||            // Not sure about this yet, just copying off of Elf
  34.          machine_is_htcpharos() ||
  35. -        machine_is_artemis())
  36. +        machine_is_artemis() ||
  37. +       machine_is_htc_opal())
  38.     {
  39.  #ifdef CONFIG_I2C_HTCPLD
  40.        htcpld_chip_set(0x04, htcpld_chip_get(0x04) & 0xef);
  41.  #endif
  42.     }
  43.  -67,24 +73,26 @@ void htc_bt_init_gpios()
  44.  #define EGPIO_5_0_BT 22
  45.  
  46.  void htc_bt_on()
  47.  {
  48.     /* configure SIRF.III GPIOS */
  49. -   gpio_set_value(125, 1);
  50. +   gpio_set_value(81, 1);
  51. +   gpio_set_value(168, 1);
  52.  
  53. -       /* Is this really necessary? */
  54. +   /* Is this really necessary? */
  55.     mdelay(1000);
  56.  
  57.     /* configure bt UART clock*/
  58.     omap_writel(omap_readl(0xfffe0834) | 0x200, 0xfffe0834);
  59.  
  60.     /* Enable the I2C bit to toggle bluetooth on */
  61.     if  (machine_is_herald() ||
  62.          machine_is_htcelf() ||
  63. -        machine_is_htcstartrek() ||            // Not sure about this yet, just copying off of Elf
  64.          machine_is_htcpharos() ||
  65. -        machine_is_artemis())
  66. +        machine_is_htcstartrek() ||            // Not sure about this yet, just copying off of Elf
  67. +        machine_is_artemis() ||
  68. +       machine_is_htc_opal())
  69.     {
  70.  #ifdef CONFIG_I2C_HTCPLD
  71.        htcpld_chip_set(0x04, htcpld_chip_get(0x04) | 0x10);
  72.  #endif
  73.     }
  74.  -98,18 +106,20 @@ void htc_bt_off()
  75.  {
  76.     /* configure bt UART clock*/
  77.     omap_writel(omap_readl(0xfffe0834) & 0xfffffdff, 0xfffe0834);
  78.  
  79.     /* configure SIRF.III GPIOS */
  80. -   gpio_set_value(125, 0);
  81. +   gpio_set_value(81, 0);
  82. +   gpio_set_value(168, 0);
  83.  
  84.     /* Disable the I2C bit to toggle bluetooth on */
  85.     if  (machine_is_herald() ||
  86.          machine_is_htcelf() ||
  87.          machine_is_htcstartrek() ||            // Not sure about this yet, just copying off of Elf
  88.          machine_is_htcpharos() ||
  89. -        machine_is_artemis())
  90. +        machine_is_artemis() ||
  91. +       machine_is_htc_opal())
  92.     {
  93.  #ifdef CONFIG_I2C_HTCPLD
  94.        htcpld_chip_set(0x04, htcpld_chip_get(0x04) & 0xef);
  95.  #endif
  96.     }
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: