pci_fire.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  1. // SPDX-License-Identifier: GPL-2.0
  2. /* pci_fire.c: Sun4u platform PCI-E controller support.
  3. *
  4. * Copyright (C) 2007 David S. Miller (davem@davemloft.net)
  5. */
  6. #include <linux/kernel.h>
  7. #include <linux/pci.h>
  8. #include <linux/slab.h>
  9. #include <linux/init.h>
  10. #include <linux/msi.h>
  11. #include <linux/export.h>
  12. #include <linux/irq.h>
  13. #include <linux/of.h>
  14. #include <linux/platform_device.h>
  15. #include <linux/numa.h>
  16. #include <asm/prom.h>
  17. #include <asm/irq.h>
  18. #include <asm/upa.h>
  19. #include "pci_impl.h"
  20. #define DRIVER_NAME "fire"
  21. #define PFX DRIVER_NAME ": "
  22. #define FIRE_IOMMU_CONTROL 0x40000UL
  23. #define FIRE_IOMMU_TSBBASE 0x40008UL
  24. #define FIRE_IOMMU_FLUSH 0x40100UL
  25. #define FIRE_IOMMU_FLUSHINV 0x40108UL
  26. static int pci_fire_pbm_iommu_init(struct pci_pbm_info *pbm)
  27. {
  28. struct iommu *iommu = pbm->iommu;
  29. u32 vdma[2], dma_mask;
  30. u64 control;
  31. int tsbsize, err;
  32. /* No virtual-dma property on these guys, use largest size. */
  33. vdma[0] = 0xc0000000; /* base */
  34. vdma[1] = 0x40000000; /* size */
  35. dma_mask = 0xffffffff;
  36. tsbsize = 128;
  37. /* Register addresses. */
  38. iommu->iommu_control = pbm->pbm_regs + FIRE_IOMMU_CONTROL;
  39. iommu->iommu_tsbbase = pbm->pbm_regs + FIRE_IOMMU_TSBBASE;
  40. iommu->iommu_flush = pbm->pbm_regs + FIRE_IOMMU_FLUSH;
  41. iommu->iommu_flushinv = pbm->pbm_regs + FIRE_IOMMU_FLUSHINV;
  42. /* We use the main control/status register of FIRE as the write
  43. * completion register.
  44. */
  45. iommu->write_complete_reg = pbm->controller_regs + 0x410000UL;
  46. /*
  47. * Invalidate TLB Entries.
  48. */
  49. upa_writeq(~(u64)0, iommu->iommu_flushinv);
  50. err = iommu_table_init(iommu, tsbsize * 8 * 1024, vdma[0], dma_mask,
  51. pbm->numa_node);
  52. if (err)
  53. return err;
  54. upa_writeq(__pa(iommu->page_table) | 0x7UL, iommu->iommu_tsbbase);
  55. control = upa_readq(iommu->iommu_control);
  56. control |= (0x00000400 /* TSB cache snoop enable */ |
  57. 0x00000300 /* Cache mode */ |
  58. 0x00000002 /* Bypass enable */ |
  59. 0x00000001 /* Translation enable */);
  60. upa_writeq(control, iommu->iommu_control);
  61. return 0;
  62. }
  63. #ifdef CONFIG_PCI_MSI
  64. struct pci_msiq_entry {
  65. u64 word0;
  66. #define MSIQ_WORD0_RESV 0x8000000000000000UL
  67. #define MSIQ_WORD0_FMT_TYPE 0x7f00000000000000UL
  68. #define MSIQ_WORD0_FMT_TYPE_SHIFT 56
  69. #define MSIQ_WORD0_LEN 0x00ffc00000000000UL
  70. #define MSIQ_WORD0_LEN_SHIFT 46
  71. #define MSIQ_WORD0_ADDR0 0x00003fff00000000UL
  72. #define MSIQ_WORD0_ADDR0_SHIFT 32
  73. #define MSIQ_WORD0_RID 0x00000000ffff0000UL
  74. #define MSIQ_WORD0_RID_SHIFT 16
  75. #define MSIQ_WORD0_DATA0 0x000000000000ffffUL
  76. #define MSIQ_WORD0_DATA0_SHIFT 0
  77. #define MSIQ_TYPE_MSG 0x6
  78. #define MSIQ_TYPE_MSI32 0xb
  79. #define MSIQ_TYPE_MSI64 0xf
  80. u64 word1;
  81. #define MSIQ_WORD1_ADDR1 0xffffffffffff0000UL
  82. #define MSIQ_WORD1_ADDR1_SHIFT 16
  83. #define MSIQ_WORD1_DATA1 0x000000000000ffffUL
  84. #define MSIQ_WORD1_DATA1_SHIFT 0
  85. u64 resv[6];
  86. };
  87. /* All MSI registers are offset from pbm->pbm_regs */
  88. #define EVENT_QUEUE_BASE_ADDR_REG 0x010000UL
  89. #define EVENT_QUEUE_BASE_ADDR_ALL_ONES 0xfffc000000000000UL
  90. #define EVENT_QUEUE_CONTROL_SET(EQ) (0x011000UL + (EQ) * 0x8UL)
  91. #define EVENT_QUEUE_CONTROL_SET_OFLOW 0x0200000000000000UL
  92. #define EVENT_QUEUE_CONTROL_SET_EN 0x0000100000000000UL
  93. #define EVENT_QUEUE_CONTROL_CLEAR(EQ) (0x011200UL + (EQ) * 0x8UL)
  94. #define EVENT_QUEUE_CONTROL_CLEAR_OF 0x0200000000000000UL
  95. #define EVENT_QUEUE_CONTROL_CLEAR_E2I 0x0000800000000000UL
  96. #define EVENT_QUEUE_CONTROL_CLEAR_DIS 0x0000100000000000UL
  97. #define EVENT_QUEUE_STATE(EQ) (0x011400UL + (EQ) * 0x8UL)
  98. #define EVENT_QUEUE_STATE_MASK 0x0000000000000007UL
  99. #define EVENT_QUEUE_STATE_IDLE 0x0000000000000001UL
  100. #define EVENT_QUEUE_STATE_ACTIVE 0x0000000000000002UL
  101. #define EVENT_QUEUE_STATE_ERROR 0x0000000000000004UL
  102. #define EVENT_QUEUE_TAIL(EQ) (0x011600UL + (EQ) * 0x8UL)
  103. #define EVENT_QUEUE_TAIL_OFLOW 0x0200000000000000UL
  104. #define EVENT_QUEUE_TAIL_VAL 0x000000000000007fUL
  105. #define EVENT_QUEUE_HEAD(EQ) (0x011800UL + (EQ) * 0x8UL)
  106. #define EVENT_QUEUE_HEAD_VAL 0x000000000000007fUL
  107. #define MSI_MAP(MSI) (0x020000UL + (MSI) * 0x8UL)
  108. #define MSI_MAP_VALID 0x8000000000000000UL
  109. #define MSI_MAP_EQWR_N 0x4000000000000000UL
  110. #define MSI_MAP_EQNUM 0x000000000000003fUL
  111. #define MSI_CLEAR(MSI) (0x028000UL + (MSI) * 0x8UL)
  112. #define MSI_CLEAR_EQWR_N 0x4000000000000000UL
  113. #define IMONDO_DATA0 0x02C000UL
  114. #define IMONDO_DATA0_DATA 0xffffffffffffffc0UL
  115. #define IMONDO_DATA1 0x02C008UL
  116. #define IMONDO_DATA1_DATA 0xffffffffffffffffUL
  117. #define MSI_32BIT_ADDR 0x034000UL
  118. #define MSI_32BIT_ADDR_VAL 0x00000000ffff0000UL
  119. #define MSI_64BIT_ADDR 0x034008UL
  120. #define MSI_64BIT_ADDR_VAL 0xffffffffffff0000UL
  121. static int pci_fire_get_head(struct pci_pbm_info *pbm, unsigned long msiqid,
  122. unsigned long *head)
  123. {
  124. *head = upa_readq(pbm->pbm_regs + EVENT_QUEUE_HEAD(msiqid));
  125. return 0;
  126. }
  127. static int pci_fire_dequeue_msi(struct pci_pbm_info *pbm, unsigned long msiqid,
  128. unsigned long *head, unsigned long *msi)
  129. {
  130. unsigned long type_fmt, type, msi_num;
  131. struct pci_msiq_entry *base, *ep;
  132. base = (pbm->msi_queues + ((msiqid - pbm->msiq_first) * 8192));
  133. ep = &base[*head];
  134. if ((ep->word0 & MSIQ_WORD0_FMT_TYPE) == 0)
  135. return 0;
  136. type_fmt = ((ep->word0 & MSIQ_WORD0_FMT_TYPE) >>
  137. MSIQ_WORD0_FMT_TYPE_SHIFT);
  138. type = (type_fmt >> 3);
  139. if (unlikely(type != MSIQ_TYPE_MSI32 &&
  140. type != MSIQ_TYPE_MSI64))
  141. return -EINVAL;
  142. *msi = msi_num = ((ep->word0 & MSIQ_WORD0_DATA0) >>
  143. MSIQ_WORD0_DATA0_SHIFT);
  144. upa_writeq(MSI_CLEAR_EQWR_N, pbm->pbm_regs + MSI_CLEAR(msi_num));
  145. /* Clear the entry. */
  146. ep->word0 &= ~MSIQ_WORD0_FMT_TYPE;
  147. /* Go to next entry in ring. */
  148. (*head)++;
  149. if (*head >= pbm->msiq_ent_count)
  150. *head = 0;
  151. return 1;
  152. }
  153. static int pci_fire_set_head(struct pci_pbm_info *pbm, unsigned long msiqid,
  154. unsigned long head)
  155. {
  156. upa_writeq(head, pbm->pbm_regs + EVENT_QUEUE_HEAD(msiqid));
  157. return 0;
  158. }
  159. static int pci_fire_msi_setup(struct pci_pbm_info *pbm, unsigned long msiqid,
  160. unsigned long msi, int is_msi64)
  161. {
  162. u64 val;
  163. val = upa_readq(pbm->pbm_regs + MSI_MAP(msi));
  164. val &= ~(MSI_MAP_EQNUM);
  165. val |= msiqid;
  166. upa_writeq(val, pbm->pbm_regs + MSI_MAP(msi));
  167. upa_writeq(MSI_CLEAR_EQWR_N, pbm->pbm_regs + MSI_CLEAR(msi));
  168. val = upa_readq(pbm->pbm_regs + MSI_MAP(msi));
  169. val |= MSI_MAP_VALID;
  170. upa_writeq(val, pbm->pbm_regs + MSI_MAP(msi));
  171. return 0;
  172. }
  173. static int pci_fire_msi_teardown(struct pci_pbm_info *pbm, unsigned long msi)
  174. {
  175. u64 val;
  176. val = upa_readq(pbm->pbm_regs + MSI_MAP(msi));
  177. val &= ~MSI_MAP_VALID;
  178. upa_writeq(val, pbm->pbm_regs + MSI_MAP(msi));
  179. return 0;
  180. }
  181. static int pci_fire_msiq_alloc(struct pci_pbm_info *pbm)
  182. {
  183. unsigned long pages, order, i;
  184. order = get_order(512 * 1024);
  185. pages = __get_free_pages(GFP_KERNEL | __GFP_COMP, order);
  186. if (pages == 0UL) {
  187. printk(KERN_ERR "MSI: Cannot allocate MSI queues (o=%lu).\n",
  188. order);
  189. return -ENOMEM;
  190. }
  191. memset((char *)pages, 0, PAGE_SIZE << order);
  192. pbm->msi_queues = (void *) pages;
  193. upa_writeq((EVENT_QUEUE_BASE_ADDR_ALL_ONES |
  194. __pa(pbm->msi_queues)),
  195. pbm->pbm_regs + EVENT_QUEUE_BASE_ADDR_REG);
  196. upa_writeq(pbm->portid << 6, pbm->pbm_regs + IMONDO_DATA0);
  197. upa_writeq(0, pbm->pbm_regs + IMONDO_DATA1);
  198. upa_writeq(pbm->msi32_start, pbm->pbm_regs + MSI_32BIT_ADDR);
  199. upa_writeq(pbm->msi64_start, pbm->pbm_regs + MSI_64BIT_ADDR);
  200. for (i = 0; i < pbm->msiq_num; i++) {
  201. upa_writeq(0, pbm->pbm_regs + EVENT_QUEUE_HEAD(i));
  202. upa_writeq(0, pbm->pbm_regs + EVENT_QUEUE_TAIL(i));
  203. }
  204. return 0;
  205. }
  206. static void pci_fire_msiq_free(struct pci_pbm_info *pbm)
  207. {
  208. unsigned long pages, order;
  209. order = get_order(512 * 1024);
  210. pages = (unsigned long) pbm->msi_queues;
  211. free_pages(pages, order);
  212. pbm->msi_queues = NULL;
  213. }
  214. static int pci_fire_msiq_build_irq(struct pci_pbm_info *pbm,
  215. unsigned long msiqid,
  216. unsigned long devino)
  217. {
  218. unsigned long cregs = (unsigned long) pbm->pbm_regs;
  219. unsigned long imap_reg, iclr_reg, int_ctrlr;
  220. unsigned int irq;
  221. int fixup;
  222. u64 val;
  223. imap_reg = cregs + (0x001000UL + (devino * 0x08UL));
  224. iclr_reg = cregs + (0x001400UL + (devino * 0x08UL));
  225. /* XXX iterate amongst the 4 IRQ controllers XXX */
  226. int_ctrlr = (1UL << 6);
  227. val = upa_readq(imap_reg);
  228. val |= (1UL << 63) | int_ctrlr;
  229. upa_writeq(val, imap_reg);
  230. fixup = ((pbm->portid << 6) | devino) - int_ctrlr;
  231. irq = build_irq(fixup, iclr_reg, imap_reg);
  232. if (!irq)
  233. return -ENOMEM;
  234. upa_writeq(EVENT_QUEUE_CONTROL_SET_EN,
  235. pbm->pbm_regs + EVENT_QUEUE_CONTROL_SET(msiqid));
  236. return irq;
  237. }
  238. static const struct sparc64_msiq_ops pci_fire_msiq_ops = {
  239. .get_head = pci_fire_get_head,
  240. .dequeue_msi = pci_fire_dequeue_msi,
  241. .set_head = pci_fire_set_head,
  242. .msi_setup = pci_fire_msi_setup,
  243. .msi_teardown = pci_fire_msi_teardown,
  244. .msiq_alloc = pci_fire_msiq_alloc,
  245. .msiq_free = pci_fire_msiq_free,
  246. .msiq_build_irq = pci_fire_msiq_build_irq,
  247. };
  248. static void pci_fire_msi_init(struct pci_pbm_info *pbm)
  249. {
  250. sparc64_pbm_msi_init(pbm, &pci_fire_msiq_ops);
  251. }
  252. #else /* CONFIG_PCI_MSI */
  253. static void pci_fire_msi_init(struct pci_pbm_info *pbm)
  254. {
  255. }
  256. #endif /* !(CONFIG_PCI_MSI) */
  257. /* Based at pbm->controller_regs */
  258. #define FIRE_PARITY_CONTROL 0x470010UL
  259. #define FIRE_PARITY_ENAB 0x8000000000000000UL
  260. #define FIRE_FATAL_RESET_CTL 0x471028UL
  261. #define FIRE_FATAL_RESET_SPARE 0x0000000004000000UL
  262. #define FIRE_FATAL_RESET_MB 0x0000000002000000UL
  263. #define FIRE_FATAL_RESET_CPE 0x0000000000008000UL
  264. #define FIRE_FATAL_RESET_APE 0x0000000000004000UL
  265. #define FIRE_FATAL_RESET_PIO 0x0000000000000040UL
  266. #define FIRE_FATAL_RESET_JW 0x0000000000000004UL
  267. #define FIRE_FATAL_RESET_JI 0x0000000000000002UL
  268. #define FIRE_FATAL_RESET_JR 0x0000000000000001UL
  269. #define FIRE_CORE_INTR_ENABLE 0x471800UL
  270. /* Based at pbm->pbm_regs */
  271. #define FIRE_TLU_CTRL 0x80000UL
  272. #define FIRE_TLU_CTRL_TIM 0x00000000da000000UL
  273. #define FIRE_TLU_CTRL_QDET 0x0000000000000100UL
  274. #define FIRE_TLU_CTRL_CFG 0x0000000000000001UL
  275. #define FIRE_TLU_DEV_CTRL 0x90008UL
  276. #define FIRE_TLU_LINK_CTRL 0x90020UL
  277. #define FIRE_TLU_LINK_CTRL_CLK 0x0000000000000040UL
  278. #define FIRE_LPU_RESET 0xe2008UL
  279. #define FIRE_LPU_LLCFG 0xe2200UL
  280. #define FIRE_LPU_LLCFG_VC0 0x0000000000000100UL
  281. #define FIRE_LPU_FCTRL_UCTRL 0xe2240UL
  282. #define FIRE_LPU_FCTRL_UCTRL_N 0x0000000000000002UL
  283. #define FIRE_LPU_FCTRL_UCTRL_P 0x0000000000000001UL
  284. #define FIRE_LPU_TXL_FIFOP 0xe2430UL
  285. #define FIRE_LPU_LTSSM_CFG2 0xe2788UL
  286. #define FIRE_LPU_LTSSM_CFG3 0xe2790UL
  287. #define FIRE_LPU_LTSSM_CFG4 0xe2798UL
  288. #define FIRE_LPU_LTSSM_CFG5 0xe27a0UL
  289. #define FIRE_DMC_IENAB 0x31800UL
  290. #define FIRE_DMC_DBG_SEL_A 0x53000UL
  291. #define FIRE_DMC_DBG_SEL_B 0x53008UL
  292. #define FIRE_PEC_IENAB 0x51800UL
  293. static void pci_fire_hw_init(struct pci_pbm_info *pbm)
  294. {
  295. u64 val;
  296. upa_writeq(FIRE_PARITY_ENAB,
  297. pbm->controller_regs + FIRE_PARITY_CONTROL);
  298. upa_writeq((FIRE_FATAL_RESET_SPARE |
  299. FIRE_FATAL_RESET_MB |
  300. FIRE_FATAL_RESET_CPE |
  301. FIRE_FATAL_RESET_APE |
  302. FIRE_FATAL_RESET_PIO |
  303. FIRE_FATAL_RESET_JW |
  304. FIRE_FATAL_RESET_JI |
  305. FIRE_FATAL_RESET_JR),
  306. pbm->controller_regs + FIRE_FATAL_RESET_CTL);
  307. upa_writeq(~(u64)0, pbm->controller_regs + FIRE_CORE_INTR_ENABLE);
  308. val = upa_readq(pbm->pbm_regs + FIRE_TLU_CTRL);
  309. val |= (FIRE_TLU_CTRL_TIM |
  310. FIRE_TLU_CTRL_QDET |
  311. FIRE_TLU_CTRL_CFG);
  312. upa_writeq(val, pbm->pbm_regs + FIRE_TLU_CTRL);
  313. upa_writeq(0, pbm->pbm_regs + FIRE_TLU_DEV_CTRL);
  314. upa_writeq(FIRE_TLU_LINK_CTRL_CLK,
  315. pbm->pbm_regs + FIRE_TLU_LINK_CTRL);
  316. upa_writeq(0, pbm->pbm_regs + FIRE_LPU_RESET);
  317. upa_writeq(FIRE_LPU_LLCFG_VC0, pbm->pbm_regs + FIRE_LPU_LLCFG);
  318. upa_writeq((FIRE_LPU_FCTRL_UCTRL_N | FIRE_LPU_FCTRL_UCTRL_P),
  319. pbm->pbm_regs + FIRE_LPU_FCTRL_UCTRL);
  320. upa_writeq(((0xffff << 16) | (0x0000 << 0)),
  321. pbm->pbm_regs + FIRE_LPU_TXL_FIFOP);
  322. upa_writeq(3000000, pbm->pbm_regs + FIRE_LPU_LTSSM_CFG2);
  323. upa_writeq(500000, pbm->pbm_regs + FIRE_LPU_LTSSM_CFG3);
  324. upa_writeq((2 << 16) | (140 << 8),
  325. pbm->pbm_regs + FIRE_LPU_LTSSM_CFG4);
  326. upa_writeq(0, pbm->pbm_regs + FIRE_LPU_LTSSM_CFG5);
  327. upa_writeq(~(u64)0, pbm->pbm_regs + FIRE_DMC_IENAB);
  328. upa_writeq(0, pbm->pbm_regs + FIRE_DMC_DBG_SEL_A);
  329. upa_writeq(0, pbm->pbm_regs + FIRE_DMC_DBG_SEL_B);
  330. upa_writeq(~(u64)0, pbm->pbm_regs + FIRE_PEC_IENAB);
  331. }
  332. static int pci_fire_pbm_init(struct pci_pbm_info *pbm,
  333. struct platform_device *op, u32 portid)
  334. {
  335. const struct linux_prom64_registers *regs;
  336. struct device_node *dp = op->dev.of_node;
  337. int err;
  338. pbm->numa_node = NUMA_NO_NODE;
  339. pbm->pci_ops = &sun4u_pci_ops;
  340. pbm->config_space_reg_bits = 12;
  341. pbm->index = pci_num_pbms++;
  342. pbm->portid = portid;
  343. pbm->op = op;
  344. pbm->name = dp->full_name;
  345. regs = of_get_property(dp, "reg", NULL);
  346. pbm->pbm_regs = regs[0].phys_addr;
  347. pbm->controller_regs = regs[1].phys_addr - 0x410000UL;
  348. printk("%s: SUN4U PCIE Bus Module\n", pbm->name);
  349. pci_determine_mem_io_space(pbm);
  350. pci_get_pbm_props(pbm);
  351. pci_fire_hw_init(pbm);
  352. err = pci_fire_pbm_iommu_init(pbm);
  353. if (err)
  354. return err;
  355. pci_fire_msi_init(pbm);
  356. pbm->pci_bus = pci_scan_one_pbm(pbm, &op->dev);
  357. /* XXX register error interrupt handlers XXX */
  358. pbm->next = pci_pbm_root;
  359. pci_pbm_root = pbm;
  360. return 0;
  361. }
  362. static int fire_probe(struct platform_device *op)
  363. {
  364. struct device_node *dp = op->dev.of_node;
  365. struct pci_pbm_info *pbm;
  366. struct iommu *iommu;
  367. u32 portid;
  368. int err;
  369. portid = of_getintprop_default(dp, "portid", 0xff);
  370. err = -ENOMEM;
  371. pbm = kzalloc(sizeof(*pbm), GFP_KERNEL);
  372. if (!pbm) {
  373. printk(KERN_ERR PFX "Cannot allocate pci_pbminfo.\n");
  374. goto out_err;
  375. }
  376. iommu = kzalloc(sizeof(struct iommu), GFP_KERNEL);
  377. if (!iommu) {
  378. printk(KERN_ERR PFX "Cannot allocate PBM iommu.\n");
  379. goto out_free_controller;
  380. }
  381. pbm->iommu = iommu;
  382. err = pci_fire_pbm_init(pbm, op, portid);
  383. if (err)
  384. goto out_free_iommu;
  385. dev_set_drvdata(&op->dev, pbm);
  386. return 0;
  387. out_free_iommu:
  388. kfree(pbm->iommu);
  389. out_free_controller:
  390. kfree(pbm);
  391. out_err:
  392. return err;
  393. }
  394. static const struct of_device_id fire_match[] = {
  395. {
  396. .name = "pci",
  397. .compatible = "pciex108e,80f0",
  398. },
  399. {},
  400. };
  401. static struct platform_driver fire_driver = {
  402. .driver = {
  403. .name = DRIVER_NAME,
  404. .of_match_table = fire_match,
  405. },
  406. .probe = fire_probe,
  407. };
  408. static int __init fire_init(void)
  409. {
  410. return platform_driver_register(&fire_driver);
  411. }
  412. subsys_initcall(fire_init);