009-m5445x_serial.patch 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. From 4b5a534c16325217c05a87938885c0ee1fe69a34 Mon Sep 17 00:00:00 2001
  2. From: Kurt Mahan <[email protected]>
  3. Date: Wed, 31 Oct 2007 17:01:41 -0600
  4. Subject: [PATCH] MCF5445x core serial support.
  5. LTIBName: m5445x-serial
  6. Signed-off-by: Kurt Mahan <[email protected]>
  7. ---
  8. drivers/serial/mcfserial.c | 23 +++++++++++++++++++++--
  9. 1 files changed, 21 insertions(+), 2 deletions(-)
  10. --- a/drivers/serial/mcfserial.c
  11. +++ b/drivers/serial/mcfserial.c
  12. @@ -45,7 +45,9 @@
  13. #include <asm/coldfire.h>
  14. #include <asm/mcfsim.h>
  15. #include <asm/mcfuart.h>
  16. +#ifdef CONFIG_NETtel
  17. #include <asm/nettel.h>
  18. +#endif
  19. #include <asm/uaccess.h>
  20. #include "mcfserial.h"
  21. @@ -61,7 +63,8 @@ struct timer_list mcfrs_timer_struct;
  22. #define CONSOLE_BAUD_RATE 38400
  23. #define DEFAULT_CBAUD B38400
  24. #elif defined(CONFIG_MOD5272) || defined(CONFIG_M5208EVB) || \
  25. - defined(CONFIG_M5329EVB) || defined(CONFIG_GILBARCO)
  26. + defined(CONFIG_M5329EVB) || defined(CONFIG_GILBARCO) || \
  27. + defined(CONFIG_M54455)
  28. #define CONSOLE_BAUD_RATE 115200
  29. #define DEFAULT_CBAUD B115200
  30. #elif defined(CONFIG_ARNEWSH) || defined(CONFIG_FREESCALE) || \
  31. @@ -94,7 +97,7 @@ static struct tty_driver *mcfrs_serial_d
  32. #undef SERIAL_DEBUG_FLOW
  33. #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \
  34. - defined(CONFIG_M520x) || defined(CONFIG_M532x)
  35. + defined(CONFIG_M520x) || defined(CONFIG_M532x) || defined(CONFIG_M54455)
  36. #define IRQBASE (MCFINT_VECBASE+MCFINT_UART0)
  37. #else
  38. #define IRQBASE 73
  39. @@ -1604,6 +1607,20 @@ static void mcfrs_irqinit(struct mcf_ser
  40. /* GPIOs also must be initalized, depends on board */
  41. break;
  42. }
  43. +#elif defined(CONFIG_M54455)
  44. + volatile unsigned char *uartp;
  45. + uartp = info->addr;
  46. + switch (info->line) {
  47. + case 0:
  48. + MCF_GPIO_PAR_UART |= 0x000F;
  49. + break;
  50. + case 1:
  51. + MCF_GPIO_PAR_UART |= 0x0FF0;
  52. + break;
  53. + case 2:
  54. + /* GPIOs also must be initalized, depends on board */
  55. + break;
  56. + }
  57. #else
  58. volatile unsigned char *icrp, *uartp;
  59. @@ -1966,7 +1983,9 @@ struct console mcfrs_console = {
  60. static int __init mcfrs_console_init(void)
  61. {
  62. +#ifndef CONFIG_M54455
  63. register_console(&mcfrs_console);
  64. +#endif
  65. return 0;
  66. }