391-MIPS-BCM63XX-do-not-register-uart.patch 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. --- a/arch/mips/bcm63xx/Makefile
  2. +++ b/arch/mips/bcm63xx/Makefile
  3. @@ -1,6 +1,6 @@
  4. obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \
  5. setup.o timer.o dev-dsp.o dev-enet.o dev-flash.o \
  6. - dev-pcmcia.o dev-rng.o dev-uart.o \
  7. + dev-pcmcia.o dev-rng.o \
  8. dev-wdt.o dev-usb-ehci.o dev-usb-ohci.o dev-usb-usbd.o \
  9. usb-common.o sprom.o
  10. obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
  11. --- a/arch/mips/bcm63xx/dev-uart.c
  12. +++ /dev/null
  13. @@ -1,76 +0,0 @@
  14. -/*
  15. - * This file is subject to the terms and conditions of the GNU General Public
  16. - * License. See the file "COPYING" in the main directory of this archive
  17. - * for more details.
  18. - *
  19. - * Copyright (C) 2008 Maxime Bizon <[email protected]>
  20. - */
  21. -
  22. -#include <linux/init.h>
  23. -#include <linux/kernel.h>
  24. -#include <linux/platform_device.h>
  25. -#include <bcm63xx_cpu.h>
  26. -
  27. -static struct resource uart0_resources[] = {
  28. - {
  29. - /* start & end filled at runtime */
  30. - .flags = IORESOURCE_MEM,
  31. - },
  32. - {
  33. - /* start filled at runtime */
  34. - .flags = IORESOURCE_IRQ,
  35. - },
  36. -};
  37. -
  38. -static struct resource uart1_resources[] = {
  39. - {
  40. - /* start & end filled at runtime */
  41. - .flags = IORESOURCE_MEM,
  42. - },
  43. - {
  44. - /* start filled at runtime */
  45. - .flags = IORESOURCE_IRQ,
  46. - },
  47. -};
  48. -
  49. -static struct platform_device bcm63xx_uart_devices[] = {
  50. - {
  51. - .name = "bcm63xx_uart",
  52. - .id = 0,
  53. - .num_resources = ARRAY_SIZE(uart0_resources),
  54. - .resource = uart0_resources,
  55. - },
  56. -
  57. - {
  58. - .name = "bcm63xx_uart",
  59. - .id = 1,
  60. - .num_resources = ARRAY_SIZE(uart1_resources),
  61. - .resource = uart1_resources,
  62. - }
  63. -};
  64. -
  65. -int __init bcm63xx_uart_register(unsigned int id)
  66. -{
  67. - if (id >= ARRAY_SIZE(bcm63xx_uart_devices))
  68. - return -ENODEV;
  69. -
  70. - if (id == 1 && (!BCMCPU_IS_3368() && !BCMCPU_IS_6358() &&
  71. - !BCMCPU_IS_6368()))
  72. - return -ENODEV;
  73. -
  74. - if (id == 0) {
  75. - uart0_resources[0].start = bcm63xx_regset_address(RSET_UART0);
  76. - uart0_resources[0].end = uart0_resources[0].start +
  77. - RSET_UART_SIZE - 1;
  78. - uart0_resources[1].start = bcm63xx_get_irq_number(IRQ_UART0);
  79. - }
  80. -
  81. - if (id == 1) {
  82. - uart1_resources[0].start = bcm63xx_regset_address(RSET_UART1);
  83. - uart1_resources[0].end = uart1_resources[0].start +
  84. - RSET_UART_SIZE - 1;
  85. - uart1_resources[1].start = bcm63xx_get_irq_number(IRQ_UART1);
  86. - }
  87. -
  88. - return platform_device_register(&bcm63xx_uart_devices[id]);
  89. -}
  90. --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_uart.h
  91. +++ /dev/null
  92. @@ -1,6 +0,0 @@
  93. -#ifndef BCM63XX_DEV_UART_H_
  94. -#define BCM63XX_DEV_UART_H_
  95. -
  96. -int bcm63xx_uart_register(unsigned int id);
  97. -
  98. -#endif /* BCM63XX_DEV_UART_H_ */
  99. --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
  100. +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
  101. @@ -33,8 +33,6 @@ struct board_info {
  102. unsigned int has_ehci0:1;
  103. unsigned int has_usbd:1;
  104. unsigned int has_dsp:1;
  105. - unsigned int has_uart0:1;
  106. - unsigned int has_uart1:1;
  107. unsigned int use_fallback_sprom:1;
  108. /* ethernet config */
  109. --- a/arch/mips/bcm63xx/boards/board_common.c
  110. +++ b/arch/mips/bcm63xx/boards/board_common.c
  111. @@ -20,7 +20,6 @@
  112. #include <asm/prom.h>
  113. #include <bcm63xx_board.h>
  114. #include <bcm63xx_cpu.h>
  115. -#include <bcm63xx_dev_uart.h>
  116. #include <bcm63xx_regs.h>
  117. #include <bcm63xx_io.h>
  118. #include <bcm63xx_gpio.h>
  119. @@ -189,12 +188,6 @@ int __init board_register_devices(void)
  120. bcm63xx_gpio_init();
  121. - if (board.has_uart0)
  122. - bcm63xx_uart_register(0);
  123. -
  124. - if (board.has_uart1)
  125. - bcm63xx_uart_register(1);
  126. -
  127. if (board.has_pccard)
  128. bcm63xx_pcmcia_register();
  129. --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
  130. +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
  131. @@ -35,9 +35,6 @@ static struct board_info __initdata boar
  132. .name = "CVG834G_E15R3921",
  133. .expected_cpu_id = 0x3368,
  134. - .has_uart0 = 1,
  135. - .has_uart1 = 1,
  136. -
  137. .has_enet0 = 1,
  138. .has_pci = 1,
  139. @@ -67,7 +64,6 @@ static struct board_info __initdata boar
  140. .name = "96328avng",
  141. .expected_cpu_id = 0x6328,
  142. - .has_uart0 = 1,
  143. .has_pci = 1,
  144. .has_usbd = 0,
  145. .use_fallback_sprom = 1,
  146. @@ -116,7 +112,6 @@ static struct board_info __initdata boar
  147. .name = "96338GW",
  148. .expected_cpu_id = 0x6338,
  149. - .has_uart0 = 1,
  150. .has_enet0 = 1,
  151. .enet0 = {
  152. .force_speed_100 = 1,
  153. @@ -159,7 +154,6 @@ static struct board_info __initdata boar
  154. .name = "96338W",
  155. .expected_cpu_id = 0x6338,
  156. - .has_uart0 = 1,
  157. .has_enet0 = 1,
  158. .enet0 = {
  159. .force_speed_100 = 1,
  160. @@ -204,8 +198,6 @@ static struct board_info __initdata boar
  161. static struct board_info __initdata board_96345gw2 = {
  162. .name = "96345GW2",
  163. .expected_cpu_id = 0x6345,
  164. -
  165. - .has_uart0 = 1,
  166. };
  167. #endif
  168. @@ -217,7 +209,6 @@ static struct board_info __initdata boar
  169. .name = "96348R",
  170. .expected_cpu_id = 0x6348,
  171. - .has_uart0 = 1,
  172. .has_enet0 = 1,
  173. .has_pci = 1,
  174. .use_fallback_sprom = 1,
  175. @@ -262,7 +253,6 @@ static struct board_info __initdata boar
  176. .name = "96348GW-10",
  177. .expected_cpu_id = 0x6348,
  178. - .has_uart0 = 1,
  179. .has_enet0 = 1,
  180. .has_enet1 = 1,
  181. .has_pci = 1,
  182. @@ -323,7 +313,6 @@ static struct board_info __initdata boar
  183. .name = "96348GW-11",
  184. .expected_cpu_id = 0x6348,
  185. - .has_uart0 = 1,
  186. .has_enet0 = 1,
  187. .has_enet1 = 1,
  188. .has_pci = 1,
  189. @@ -378,7 +367,6 @@ static struct board_info __initdata boar
  190. .name = "96348GW",
  191. .expected_cpu_id = 0x6348,
  192. - .has_uart0 = 1,
  193. .has_enet0 = 1,
  194. .has_enet1 = 1,
  195. .has_pci = 1,
  196. @@ -437,7 +425,6 @@ static struct board_info __initdata boar
  197. .name = "F@ST2404",
  198. .expected_cpu_id = 0x6348,
  199. - .has_uart0 = 1,
  200. .has_enet0 = 1,
  201. .has_enet1 = 1,
  202. .has_pci = 1,
  203. @@ -482,7 +469,6 @@ static struct board_info __initdata boar
  204. .name = "DV201AMR",
  205. .expected_cpu_id = 0x6348,
  206. - .has_uart0 = 1,
  207. .has_pci = 1,
  208. .use_fallback_sprom = 1,
  209. .has_ohci0 = 1,
  210. @@ -503,7 +489,6 @@ static struct board_info __initdata boar
  211. .name = "96348GW-A",
  212. .expected_cpu_id = 0x6348,
  213. - .has_uart0 = 1,
  214. .has_enet0 = 1,
  215. .has_enet1 = 1,
  216. .has_pci = 1,
  217. @@ -530,7 +515,6 @@ static struct board_info __initdata boar
  218. .name = "96358VW",
  219. .expected_cpu_id = 0x6358,
  220. - .has_uart0 = 1,
  221. .has_enet0 = 1,
  222. .has_enet1 = 1,
  223. .has_pci = 1,
  224. @@ -583,7 +567,6 @@ static struct board_info __initdata boar
  225. .name = "96358VW2",
  226. .expected_cpu_id = 0x6358,
  227. - .has_uart0 = 1,
  228. .has_enet0 = 1,
  229. .has_enet1 = 1,
  230. .has_pci = 1,
  231. @@ -633,7 +616,6 @@ static struct board_info __initdata boar
  232. .name = "AGPF-S0",
  233. .expected_cpu_id = 0x6358,
  234. - .has_uart0 = 1,
  235. .has_enet0 = 1,
  236. .has_enet1 = 1,
  237. .has_pci = 1,