ezkit.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  1. /*
  2. * File: arch/blackfin/mach-bf548/boards/ezkit.c
  3. * Based on: arch/blackfin/mach-bf537/boards/ezkit.c
  4. * Author: Aidan Williams <aidan@nicta.com.au>
  5. *
  6. * Created:
  7. * Description:
  8. *
  9. * Modified:
  10. * Copyright 2005 National ICT Australia (NICTA)
  11. * Copyright 2004-2007 Analog Devices Inc.
  12. *
  13. * Bugs: Enter bugs at http://blackfin.uclinux.org/
  14. *
  15. * This program is free software; you can redistribute it and/or modify
  16. * it under the terms of the GNU General Public License as published by
  17. * the Free Software Foundation; either version 2 of the License, or
  18. * (at your option) any later version.
  19. *
  20. * This program is distributed in the hope that it will be useful,
  21. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. * GNU General Public License for more details.
  24. *
  25. * You should have received a copy of the GNU General Public License
  26. * along with this program; if not, see the file COPYING, or write
  27. * to the Free Software Foundation, Inc.,
  28. * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  29. */
  30. #include <linux/device.h>
  31. #include <linux/platform_device.h>
  32. #include <linux/mtd/mtd.h>
  33. #include <linux/mtd/partitions.h>
  34. #include <linux/spi/spi.h>
  35. #include <linux/spi/flash.h>
  36. #include <linux/irq.h>
  37. #include <linux/interrupt.h>
  38. #include <linux/usb/musb.h>
  39. #include <asm/bfin5xx_spi.h>
  40. #include <asm/cplb.h>
  41. #include <asm/dma.h>
  42. #include <asm/gpio.h>
  43. #include <asm/nand.h>
  44. #include <asm/portmux.h>
  45. #include <asm/mach/bf54x_keys.h>
  46. #include <linux/input.h>
  47. #include <linux/spi/ad7877.h>
  48. /*
  49. * Name the Board for the /proc/cpuinfo
  50. */
  51. const char bfin_board_name[] = "ADSP-BF548-EZKIT";
  52. /*
  53. * Driver needs to know address, irq and flag pin.
  54. */
  55. #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
  56. #include <asm/mach/bf54x-lq043.h>
  57. static struct bfin_bf54xfb_mach_info bf54x_lq043_data = {
  58. .width = 480,
  59. .height = 272,
  60. .xres = {480, 480, 480},
  61. .yres = {272, 272, 272},
  62. .bpp = {24, 24, 24},
  63. .disp = GPIO_PE3,
  64. };
  65. static struct resource bf54x_lq043_resources[] = {
  66. {
  67. .start = IRQ_EPPI0_ERR,
  68. .end = IRQ_EPPI0_ERR,
  69. .flags = IORESOURCE_IRQ,
  70. },
  71. };
  72. static struct platform_device bf54x_lq043_device = {
  73. .name = "bf54x-lq043",
  74. .id = -1,
  75. .num_resources = ARRAY_SIZE(bf54x_lq043_resources),
  76. .resource = bf54x_lq043_resources,
  77. .dev = {
  78. .platform_data = &bf54x_lq043_data,
  79. },
  80. };
  81. #endif
  82. #if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
  83. static const unsigned int bf548_keymap[] = {
  84. KEYVAL(0, 0, KEY_ENTER),
  85. KEYVAL(0, 1, KEY_HELP),
  86. KEYVAL(0, 2, KEY_0),
  87. KEYVAL(0, 3, KEY_BACKSPACE),
  88. KEYVAL(1, 0, KEY_TAB),
  89. KEYVAL(1, 1, KEY_9),
  90. KEYVAL(1, 2, KEY_8),
  91. KEYVAL(1, 3, KEY_7),
  92. KEYVAL(2, 0, KEY_DOWN),
  93. KEYVAL(2, 1, KEY_6),
  94. KEYVAL(2, 2, KEY_5),
  95. KEYVAL(2, 3, KEY_4),
  96. KEYVAL(3, 0, KEY_UP),
  97. KEYVAL(3, 1, KEY_3),
  98. KEYVAL(3, 2, KEY_2),
  99. KEYVAL(3, 3, KEY_1),
  100. };
  101. static struct bfin_kpad_platform_data bf54x_kpad_data = {
  102. .rows = 4,
  103. .cols = 4,
  104. .keymap = bf548_keymap,
  105. .keymapsize = ARRAY_SIZE(bf548_keymap),
  106. .repeat = 0,
  107. .debounce_time = 5000, /* ns (5ms) */
  108. .coldrive_time = 1000, /* ns (1ms) */
  109. .keyup_test_interval = 50, /* ms (50ms) */
  110. };
  111. static struct resource bf54x_kpad_resources[] = {
  112. {
  113. .start = IRQ_KEY,
  114. .end = IRQ_KEY,
  115. .flags = IORESOURCE_IRQ,
  116. },
  117. };
  118. static struct platform_device bf54x_kpad_device = {
  119. .name = "bf54x-keys",
  120. .id = -1,
  121. .num_resources = ARRAY_SIZE(bf54x_kpad_resources),
  122. .resource = bf54x_kpad_resources,
  123. .dev = {
  124. .platform_data = &bf54x_kpad_data,
  125. },
  126. };
  127. #endif
  128. #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
  129. static struct platform_device rtc_device = {
  130. .name = "rtc-bfin",
  131. .id = -1,
  132. };
  133. #endif
  134. #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
  135. static struct resource bfin_uart_resources[] = {
  136. #ifdef CONFIG_SERIAL_BFIN_UART0
  137. {
  138. .start = 0xFFC00400,
  139. .end = 0xFFC004FF,
  140. .flags = IORESOURCE_MEM,
  141. },
  142. #endif
  143. #ifdef CONFIG_SERIAL_BFIN_UART1
  144. {
  145. .start = 0xFFC02000,
  146. .end = 0xFFC020FF,
  147. .flags = IORESOURCE_MEM,
  148. },
  149. #endif
  150. #ifdef CONFIG_SERIAL_BFIN_UART2
  151. {
  152. .start = 0xFFC02100,
  153. .end = 0xFFC021FF,
  154. .flags = IORESOURCE_MEM,
  155. },
  156. #endif
  157. #ifdef CONFIG_SERIAL_BFIN_UART3
  158. {
  159. .start = 0xFFC03100,
  160. .end = 0xFFC031FF,
  161. },
  162. #endif
  163. };
  164. static struct platform_device bfin_uart_device = {
  165. .name = "bfin-uart",
  166. .id = 1,
  167. .num_resources = ARRAY_SIZE(bfin_uart_resources),
  168. .resource = bfin_uart_resources,
  169. };
  170. #endif
  171. #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
  172. static struct resource smsc911x_resources[] = {
  173. {
  174. .name = "smsc911x-memory",
  175. .start = 0x24000000,
  176. .end = 0x24000000 + 0xFF,
  177. .flags = IORESOURCE_MEM,
  178. },
  179. {
  180. .start = IRQ_PE8,
  181. .end = IRQ_PE8,
  182. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
  183. },
  184. };
  185. static struct platform_device smsc911x_device = {
  186. .name = "smsc911x",
  187. .id = 0,
  188. .num_resources = ARRAY_SIZE(smsc911x_resources),
  189. .resource = smsc911x_resources,
  190. };
  191. #endif
  192. #if defined(CONFIG_USB_BF54x_HCD) || defined(CONFIG_USB_BF54x_HCD_MODULE)
  193. static struct resource bf54x_hcd_resources[] = {
  194. {
  195. .start = 0xFFC03C00,
  196. .end = 0xFFC040FF,
  197. .flags = IORESOURCE_MEM,
  198. },
  199. };
  200. static struct platform_device bf54x_hcd = {
  201. .name = "bf54x-hcd",
  202. .id = 0,
  203. .num_resources = ARRAY_SIZE(bf54x_hcd_resources),
  204. .resource = bf54x_hcd_resources,
  205. };
  206. #endif
  207. #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
  208. static struct resource musb_resources[] = {
  209. [0] = {
  210. .start = 0xFFC03C00,
  211. .end = 0xFFC040FF,
  212. .flags = IORESOURCE_MEM,
  213. },
  214. [1] = { /* general IRQ */
  215. .start = IRQ_USB_INT0,
  216. .end = IRQ_USB_INT0,
  217. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
  218. },
  219. [2] = { /* DMA IRQ */
  220. .start = IRQ_USB_DMA,
  221. .end = IRQ_USB_DMA,
  222. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
  223. },
  224. };
  225. static struct musb_hdrc_platform_data musb_plat = {
  226. #ifdef CONFIG_USB_MUSB_OTG
  227. .mode = MUSB_OTG,
  228. #elif CONFIG_USB_MUSB_HDRC_HCD
  229. .mode = MUSB_HOST,
  230. #elif CONFIG_USB_GADGET_MUSB_HDRC
  231. .mode = MUSB_PERIPHERAL,
  232. #endif
  233. .multipoint = 1,
  234. };
  235. static u64 musb_dmamask = ~(u32)0;
  236. static struct platform_device musb_device = {
  237. .name = "musb_hdrc",
  238. .id = 0,
  239. .dev = {
  240. .dma_mask = &musb_dmamask,
  241. .coherent_dma_mask = 0xffffffff,
  242. .platform_data = &musb_plat,
  243. },
  244. .num_resources = ARRAY_SIZE(musb_resources),
  245. .resource = musb_resources,
  246. };
  247. #endif
  248. #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
  249. static struct resource bfin_atapi_resources[] = {
  250. {
  251. .start = 0xFFC03800,
  252. .end = 0xFFC0386F,
  253. .flags = IORESOURCE_MEM,
  254. },
  255. {
  256. .start = IRQ_ATAPI_ERR,
  257. .end = IRQ_ATAPI_ERR,
  258. .flags = IORESOURCE_IRQ,
  259. },
  260. };
  261. static struct platform_device bfin_atapi_device = {
  262. .name = "pata-bf54x",
  263. .id = -1,
  264. .num_resources = ARRAY_SIZE(bfin_atapi_resources),
  265. .resource = bfin_atapi_resources,
  266. };
  267. #endif
  268. #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
  269. static struct mtd_partition partition_info[] = {
  270. {
  271. .name = "Linux Kernel",
  272. .offset = 0,
  273. .size = 4 * SIZE_1M,
  274. },
  275. {
  276. .name = "File System",
  277. .offset = 4 * SIZE_1M,
  278. .size = (256 - 4) * SIZE_1M,
  279. },
  280. };
  281. static struct bf5xx_nand_platform bf5xx_nand_platform = {
  282. .page_size = NFC_PG_SIZE_256,
  283. .data_width = NFC_NWIDTH_8,
  284. .partitions = partition_info,
  285. .nr_partitions = ARRAY_SIZE(partition_info),
  286. .rd_dly = 3,
  287. .wr_dly = 3,
  288. };
  289. static struct resource bf5xx_nand_resources[] = {
  290. {
  291. .start = 0xFFC03B00,
  292. .end = 0xFFC03B4F,
  293. .flags = IORESOURCE_MEM,
  294. },
  295. {
  296. .start = CH_NFC,
  297. .end = CH_NFC,
  298. .flags = IORESOURCE_IRQ,
  299. },
  300. };
  301. static struct platform_device bf5xx_nand_device = {
  302. .name = "bf5xx-nand",
  303. .id = 0,
  304. .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
  305. .resource = bf5xx_nand_resources,
  306. .dev = {
  307. .platform_data = &bf5xx_nand_platform,
  308. },
  309. };
  310. #endif
  311. #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN)
  312. static struct platform_device bf54x_sdh_device = {
  313. .name = "bfin-sdh",
  314. .id = 0,
  315. };
  316. #endif
  317. #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
  318. /* all SPI peripherals info goes here */
  319. #if defined(CONFIG_MTD_M25P80) \
  320. || defined(CONFIG_MTD_M25P80_MODULE)
  321. /* SPI flash chip (m25p16) */
  322. static struct mtd_partition bfin_spi_flash_partitions[] = {
  323. {
  324. .name = "bootloader",
  325. .size = 0x00040000,
  326. .offset = 0,
  327. .mask_flags = MTD_CAP_ROM
  328. }, {
  329. .name = "linux kernel",
  330. .size = 0x1c0000,
  331. .offset = 0x40000
  332. }
  333. };
  334. static struct flash_platform_data bfin_spi_flash_data = {
  335. .name = "m25p80",
  336. .parts = bfin_spi_flash_partitions,
  337. .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
  338. .type = "m25p16",
  339. };
  340. static struct bfin5xx_spi_chip spi_flash_chip_info = {
  341. .enable_dma = 0, /* use dma transfer with this chip*/
  342. .bits_per_word = 8,
  343. .cs_change_per_word = 0,
  344. };
  345. #endif
  346. #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
  347. static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
  348. .cs_change_per_word = 0,
  349. .enable_dma = 0,
  350. .bits_per_word = 16,
  351. };
  352. static const struct ad7877_platform_data bfin_ad7877_ts_info = {
  353. .model = 7877,
  354. .vref_delay_usecs = 50, /* internal, no capacitor */
  355. .x_plate_ohms = 419,
  356. .y_plate_ohms = 486,
  357. .pressure_max = 1000,
  358. .pressure_min = 0,
  359. .stopacq_polarity = 1,
  360. .first_conversion_delay = 3,
  361. .acquisition_time = 1,
  362. .averaging = 1,
  363. .pen_down_acc_interval = 1,
  364. };
  365. #endif
  366. static struct spi_board_info bf54x_spi_board_info[] __initdata = {
  367. #if defined(CONFIG_MTD_M25P80) \
  368. || defined(CONFIG_MTD_M25P80_MODULE)
  369. {
  370. /* the modalias must be the same as spi device driver name */
  371. .modalias = "m25p80", /* Name of spi_driver for this device */
  372. .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
  373. .bus_num = 0, /* Framework bus number */
  374. .chip_select = 1, /* SPI_SSEL1*/
  375. .platform_data = &bfin_spi_flash_data,
  376. .controller_data = &spi_flash_chip_info,
  377. .mode = SPI_MODE_3,
  378. },
  379. #endif
  380. #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
  381. {
  382. .modalias = "ad7877",
  383. .platform_data = &bfin_ad7877_ts_info,
  384. .irq = IRQ_PJ11,
  385. .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
  386. .bus_num = 0,
  387. .chip_select = 2,
  388. .controller_data = &spi_ad7877_chip_info,
  389. },
  390. #endif
  391. };
  392. /* SPI (0) */
  393. static struct resource bfin_spi0_resource[] = {
  394. [0] = {
  395. .start = SPI0_REGBASE,
  396. .end = SPI0_REGBASE + 0xFF,
  397. .flags = IORESOURCE_MEM,
  398. },
  399. [1] = {
  400. .start = CH_SPI0,
  401. .end = CH_SPI0,
  402. .flags = IORESOURCE_IRQ,
  403. }
  404. };
  405. /* SPI (1) */
  406. static struct resource bfin_spi1_resource[] = {
  407. [0] = {
  408. .start = SPI1_REGBASE,
  409. .end = SPI1_REGBASE + 0xFF,
  410. .flags = IORESOURCE_MEM,
  411. },
  412. [1] = {
  413. .start = CH_SPI1,
  414. .end = CH_SPI1,
  415. .flags = IORESOURCE_IRQ,
  416. }
  417. };
  418. /* SPI controller data */
  419. static struct bfin5xx_spi_master bf54x_spi_master_info0 = {
  420. .num_chipselect = 8,
  421. .enable_dma = 1, /* master has the ability to do dma transfer */
  422. .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
  423. };
  424. static struct platform_device bf54x_spi_master0 = {
  425. .name = "bfin-spi",
  426. .id = 0, /* Bus number */
  427. .num_resources = ARRAY_SIZE(bfin_spi0_resource),
  428. .resource = bfin_spi0_resource,
  429. .dev = {
  430. .platform_data = &bf54x_spi_master_info0, /* Passed to driver */
  431. },
  432. };
  433. static struct bfin5xx_spi_master bf54x_spi_master_info1 = {
  434. .num_chipselect = 8,
  435. .enable_dma = 1, /* master has the ability to do dma transfer */
  436. .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
  437. };
  438. static struct platform_device bf54x_spi_master1 = {
  439. .name = "bfin-spi",
  440. .id = 1, /* Bus number */
  441. .num_resources = ARRAY_SIZE(bfin_spi1_resource),
  442. .resource = bfin_spi1_resource,
  443. .dev = {
  444. .platform_data = &bf54x_spi_master_info1, /* Passed to driver */
  445. },
  446. };
  447. #endif /* spi master and devices */
  448. #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
  449. static struct resource bfin_twi0_resource[] = {
  450. [0] = {
  451. .start = TWI0_REGBASE,
  452. .end = TWI0_REGBASE + 0xFF,
  453. .flags = IORESOURCE_MEM,
  454. },
  455. [1] = {
  456. .start = IRQ_TWI0,
  457. .end = IRQ_TWI0,
  458. .flags = IORESOURCE_IRQ,
  459. },
  460. };
  461. static struct platform_device i2c_bfin_twi0_device = {
  462. .name = "i2c-bfin-twi",
  463. .id = 0,
  464. .num_resources = ARRAY_SIZE(bfin_twi0_resource),
  465. .resource = bfin_twi0_resource,
  466. };
  467. #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
  468. static struct resource bfin_twi1_resource[] = {
  469. [0] = {
  470. .start = TWI1_REGBASE,
  471. .end = TWI1_REGBASE + 0xFF,
  472. .flags = IORESOURCE_MEM,
  473. },
  474. [1] = {
  475. .start = IRQ_TWI1,
  476. .end = IRQ_TWI1,
  477. .flags = IORESOURCE_IRQ,
  478. },
  479. };
  480. static struct platform_device i2c_bfin_twi1_device = {
  481. .name = "i2c-bfin-twi",
  482. .id = 1,
  483. .num_resources = ARRAY_SIZE(bfin_twi1_resource),
  484. .resource = bfin_twi1_resource,
  485. };
  486. #endif
  487. #endif
  488. static struct platform_device *ezkit_devices[] __initdata = {
  489. #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
  490. &rtc_device,
  491. #endif
  492. #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
  493. &bfin_uart_device,
  494. #endif
  495. #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
  496. &bf54x_lq043_device,
  497. #endif
  498. #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
  499. &smsc911x_device,
  500. #endif
  501. #if defined(CONFIG_USB_BF54x_HCD) || defined(CONFIG_USB_BF54x_HCD_MODULE)
  502. &bf54x_hcd,
  503. #endif
  504. #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
  505. &musb_device,
  506. #endif
  507. #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
  508. &bfin_atapi_device,
  509. #endif
  510. #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
  511. &bf5xx_nand_device,
  512. #endif
  513. #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN)
  514. &bf54x_sdh_device,
  515. #endif
  516. #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
  517. &bf54x_spi_master0,
  518. &bf54x_spi_master1,
  519. #endif
  520. #if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
  521. &bf54x_kpad_device,
  522. #endif
  523. #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
  524. &i2c_bfin_twi0_device,
  525. #if !defined(CONFIG_BF542)
  526. &i2c_bfin_twi1_device,
  527. #endif
  528. #endif
  529. };
  530. static int __init stamp_init(void)
  531. {
  532. printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
  533. platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
  534. #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
  535. spi_register_board_info(bf54x_spi_board_info,
  536. ARRAY_SIZE(bf54x_spi_board_info));
  537. #endif
  538. return 0;
  539. }
  540. arch_initcall(stamp_init);