mach-bast.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. /* linux/arch/arm/mach-s3c2410/mach-bast.c
  2. *
  3. * Copyright 2003-2008 Simtec Electronics
  4. * Ben Dooks <ben@simtec.co.uk>
  5. *
  6. * http://www.simtec.co.uk/products/EB2410ITX/
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #include <linux/kernel.h>
  13. #include <linux/types.h>
  14. #include <linux/interrupt.h>
  15. #include <linux/list.h>
  16. #include <linux/timer.h>
  17. #include <linux/init.h>
  18. #include <linux/gpio.h>
  19. #include <linux/syscore_ops.h>
  20. #include <linux/serial_core.h>
  21. #include <linux/platform_device.h>
  22. #include <linux/dm9000.h>
  23. #include <linux/ata_platform.h>
  24. #include <linux/i2c.h>
  25. #include <linux/io.h>
  26. #include <net/ax88796.h>
  27. #include <asm/mach/arch.h>
  28. #include <asm/mach/map.h>
  29. #include <asm/mach/irq.h>
  30. #include <mach/bast-map.h>
  31. #include <mach/bast-irq.h>
  32. #include <mach/bast-cpld.h>
  33. #include <mach/hardware.h>
  34. #include <asm/irq.h>
  35. #include <asm/mach-types.h>
  36. //#include <asm/debug-ll.h>
  37. #include <plat/regs-serial.h>
  38. #include <mach/regs-gpio.h>
  39. #include <mach/regs-mem.h>
  40. #include <mach/regs-lcd.h>
  41. #include <plat/hwmon.h>
  42. #include <plat/nand.h>
  43. #include <plat/iic.h>
  44. #include <mach/fb.h>
  45. #include <linux/mtd/mtd.h>
  46. #include <linux/mtd/nand.h>
  47. #include <linux/mtd/nand_ecc.h>
  48. #include <linux/mtd/partitions.h>
  49. #include <linux/serial_8250.h>
  50. #include <plat/clock.h>
  51. #include <plat/devs.h>
  52. #include <plat/cpu.h>
  53. #include <plat/cpu-freq.h>
  54. #include <plat/gpio-cfg.h>
  55. #include <plat/audio-simtec.h>
  56. #include "usb-simtec.h"
  57. #include "nor-simtec.h"
  58. #include "common.h"
  59. #define COPYRIGHT ", Copyright 2004-2008 Simtec Electronics"
  60. /* macros for virtual address mods for the io space entries */
  61. #define VA_C5(item) ((unsigned long)(item) + BAST_VAM_CS5)
  62. #define VA_C4(item) ((unsigned long)(item) + BAST_VAM_CS4)
  63. #define VA_C3(item) ((unsigned long)(item) + BAST_VAM_CS3)
  64. #define VA_C2(item) ((unsigned long)(item) + BAST_VAM_CS2)
  65. /* macros to modify the physical addresses for io space */
  66. #define PA_CS2(item) (__phys_to_pfn((item) + S3C2410_CS2))
  67. #define PA_CS3(item) (__phys_to_pfn((item) + S3C2410_CS3))
  68. #define PA_CS4(item) (__phys_to_pfn((item) + S3C2410_CS4))
  69. #define PA_CS5(item) (__phys_to_pfn((item) + S3C2410_CS5))
  70. static struct map_desc bast_iodesc[] __initdata = {
  71. /* ISA IO areas */
  72. {
  73. .virtual = (u32)S3C24XX_VA_ISA_BYTE,
  74. .pfn = PA_CS2(BAST_PA_ISAIO),
  75. .length = SZ_16M,
  76. .type = MT_DEVICE,
  77. }, {
  78. .virtual = (u32)S3C24XX_VA_ISA_WORD,
  79. .pfn = PA_CS3(BAST_PA_ISAIO),
  80. .length = SZ_16M,
  81. .type = MT_DEVICE,
  82. },
  83. /* bast CPLD control registers, and external interrupt controls */
  84. {
  85. .virtual = (u32)BAST_VA_CTRL1,
  86. .pfn = __phys_to_pfn(BAST_PA_CTRL1),
  87. .length = SZ_1M,
  88. .type = MT_DEVICE,
  89. }, {
  90. .virtual = (u32)BAST_VA_CTRL2,
  91. .pfn = __phys_to_pfn(BAST_PA_CTRL2),
  92. .length = SZ_1M,
  93. .type = MT_DEVICE,
  94. }, {
  95. .virtual = (u32)BAST_VA_CTRL3,
  96. .pfn = __phys_to_pfn(BAST_PA_CTRL3),
  97. .length = SZ_1M,
  98. .type = MT_DEVICE,
  99. }, {
  100. .virtual = (u32)BAST_VA_CTRL4,
  101. .pfn = __phys_to_pfn(BAST_PA_CTRL4),
  102. .length = SZ_1M,
  103. .type = MT_DEVICE,
  104. },
  105. /* PC104 IRQ mux */
  106. {
  107. .virtual = (u32)BAST_VA_PC104_IRQREQ,
  108. .pfn = __phys_to_pfn(BAST_PA_PC104_IRQREQ),
  109. .length = SZ_1M,
  110. .type = MT_DEVICE,
  111. }, {
  112. .virtual = (u32)BAST_VA_PC104_IRQRAW,
  113. .pfn = __phys_to_pfn(BAST_PA_PC104_IRQRAW),
  114. .length = SZ_1M,
  115. .type = MT_DEVICE,
  116. }, {
  117. .virtual = (u32)BAST_VA_PC104_IRQMASK,
  118. .pfn = __phys_to_pfn(BAST_PA_PC104_IRQMASK),
  119. .length = SZ_1M,
  120. .type = MT_DEVICE,
  121. },
  122. /* peripheral space... one for each of fast/slow/byte/16bit */
  123. /* note, ide is only decoded in word space, even though some registers
  124. * are only 8bit */
  125. /* slow, byte */
  126. { VA_C2(BAST_VA_ISAIO), PA_CS2(BAST_PA_ISAIO), SZ_16M, MT_DEVICE },
  127. { VA_C2(BAST_VA_ISAMEM), PA_CS2(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE },
  128. { VA_C2(BAST_VA_SUPERIO), PA_CS2(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE },
  129. /* slow, word */
  130. { VA_C3(BAST_VA_ISAIO), PA_CS3(BAST_PA_ISAIO), SZ_16M, MT_DEVICE },
  131. { VA_C3(BAST_VA_ISAMEM), PA_CS3(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE },
  132. { VA_C3(BAST_VA_SUPERIO), PA_CS3(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE },
  133. /* fast, byte */
  134. { VA_C4(BAST_VA_ISAIO), PA_CS4(BAST_PA_ISAIO), SZ_16M, MT_DEVICE },
  135. { VA_C4(BAST_VA_ISAMEM), PA_CS4(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE },
  136. { VA_C4(BAST_VA_SUPERIO), PA_CS4(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE },
  137. /* fast, word */
  138. { VA_C5(BAST_VA_ISAIO), PA_CS5(BAST_PA_ISAIO), SZ_16M, MT_DEVICE },
  139. { VA_C5(BAST_VA_ISAMEM), PA_CS5(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE },
  140. { VA_C5(BAST_VA_SUPERIO), PA_CS5(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE },
  141. };
  142. #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
  143. #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
  144. #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
  145. static struct s3c2410_uartcfg bast_uartcfgs[] __initdata = {
  146. [0] = {
  147. .hwport = 0,
  148. .flags = 0,
  149. .ucon = UCON,
  150. .ulcon = ULCON,
  151. .ufcon = UFCON,
  152. },
  153. [1] = {
  154. .hwport = 1,
  155. .flags = 0,
  156. .ucon = UCON,
  157. .ulcon = ULCON,
  158. .ufcon = UFCON,
  159. },
  160. /* port 2 is not actually used */
  161. [2] = {
  162. .hwport = 2,
  163. .flags = 0,
  164. .ucon = UCON,
  165. .ulcon = ULCON,
  166. .ufcon = UFCON,
  167. }
  168. };
  169. /* NAND Flash on BAST board */
  170. #ifdef CONFIG_PM
  171. static int bast_pm_suspend(void)
  172. {
  173. /* ensure that an nRESET is not generated on resume. */
  174. gpio_direction_output(S3C2410_GPA(21), 1);
  175. return 0;
  176. }
  177. static void bast_pm_resume(void)
  178. {
  179. s3c_gpio_cfgpin(S3C2410_GPA(21), S3C2410_GPA21_nRSTOUT);
  180. }
  181. #else
  182. #define bast_pm_suspend NULL
  183. #define bast_pm_resume NULL
  184. #endif
  185. static struct syscore_ops bast_pm_syscore_ops = {
  186. .suspend = bast_pm_suspend,
  187. .resume = bast_pm_resume,
  188. };
  189. static int smartmedia_map[] = { 0 };
  190. static int chip0_map[] = { 1 };
  191. static int chip1_map[] = { 2 };
  192. static int chip2_map[] = { 3 };
  193. static struct mtd_partition __initdata bast_default_nand_part[] = {
  194. [0] = {
  195. .name = "Boot Agent",
  196. .size = SZ_16K,
  197. .offset = 0,
  198. },
  199. [1] = {
  200. .name = "/boot",
  201. .size = SZ_4M - SZ_16K,
  202. .offset = SZ_16K,
  203. },
  204. [2] = {
  205. .name = "user",
  206. .offset = SZ_4M,
  207. .size = MTDPART_SIZ_FULL,
  208. }
  209. };
  210. /* the bast has 4 selectable slots for nand-flash, the three
  211. * on-board chip areas, as well as the external SmartMedia
  212. * slot.
  213. *
  214. * Note, there is no current hot-plug support for the SmartMedia
  215. * socket.
  216. */
  217. static struct s3c2410_nand_set __initdata bast_nand_sets[] = {
  218. [0] = {
  219. .name = "SmartMedia",
  220. .nr_chips = 1,
  221. .nr_map = smartmedia_map,
  222. .options = NAND_SCAN_SILENT_NODEV,
  223. .nr_partitions = ARRAY_SIZE(bast_default_nand_part),
  224. .partitions = bast_default_nand_part,
  225. },
  226. [1] = {
  227. .name = "chip0",
  228. .nr_chips = 1,
  229. .nr_map = chip0_map,
  230. .nr_partitions = ARRAY_SIZE(bast_default_nand_part),
  231. .partitions = bast_default_nand_part,
  232. },
  233. [2] = {
  234. .name = "chip1",
  235. .nr_chips = 1,
  236. .nr_map = chip1_map,
  237. .options = NAND_SCAN_SILENT_NODEV,
  238. .nr_partitions = ARRAY_SIZE(bast_default_nand_part),
  239. .partitions = bast_default_nand_part,
  240. },
  241. [3] = {
  242. .name = "chip2",
  243. .nr_chips = 1,
  244. .nr_map = chip2_map,
  245. .options = NAND_SCAN_SILENT_NODEV,
  246. .nr_partitions = ARRAY_SIZE(bast_default_nand_part),
  247. .partitions = bast_default_nand_part,
  248. }
  249. };
  250. static void bast_nand_select(struct s3c2410_nand_set *set, int slot)
  251. {
  252. unsigned int tmp;
  253. slot = set->nr_map[slot] & 3;
  254. pr_debug("bast_nand: selecting slot %d (set %p,%p)\n",
  255. slot, set, set->nr_map);
  256. tmp = __raw_readb(BAST_VA_CTRL2);
  257. tmp &= BAST_CPLD_CTLR2_IDERST;
  258. tmp |= slot;
  259. tmp |= BAST_CPLD_CTRL2_WNAND;
  260. pr_debug("bast_nand: ctrl2 now %02x\n", tmp);
  261. __raw_writeb(tmp, BAST_VA_CTRL2);
  262. }
  263. static struct s3c2410_platform_nand __initdata bast_nand_info = {
  264. .tacls = 30,
  265. .twrph0 = 60,
  266. .twrph1 = 60,
  267. .nr_sets = ARRAY_SIZE(bast_nand_sets),
  268. .sets = bast_nand_sets,
  269. .select_chip = bast_nand_select,
  270. };
  271. /* DM9000 */
  272. static struct resource bast_dm9k_resource[] = {
  273. [0] = {
  274. .start = S3C2410_CS5 + BAST_PA_DM9000,
  275. .end = S3C2410_CS5 + BAST_PA_DM9000 + 3,
  276. .flags = IORESOURCE_MEM,
  277. },
  278. [1] = {
  279. .start = S3C2410_CS5 + BAST_PA_DM9000 + 0x40,
  280. .end = S3C2410_CS5 + BAST_PA_DM9000 + 0x40 + 0x3f,
  281. .flags = IORESOURCE_MEM,
  282. },
  283. [2] = {
  284. .start = IRQ_DM9000,
  285. .end = IRQ_DM9000,
  286. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
  287. }
  288. };
  289. /* for the moment we limit ourselves to 16bit IO until some
  290. * better IO routines can be written and tested
  291. */
  292. static struct dm9000_plat_data bast_dm9k_platdata = {
  293. .flags = DM9000_PLATF_16BITONLY,
  294. };
  295. static struct platform_device bast_device_dm9k = {
  296. .name = "dm9000",
  297. .id = 0,
  298. .num_resources = ARRAY_SIZE(bast_dm9k_resource),
  299. .resource = bast_dm9k_resource,
  300. .dev = {
  301. .platform_data = &bast_dm9k_platdata,
  302. }
  303. };
  304. /* serial devices */
  305. #define SERIAL_BASE (S3C2410_CS2 + BAST_PA_SUPERIO)
  306. #define SERIAL_FLAGS (UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SHARE_IRQ)
  307. #define SERIAL_CLK (1843200)
  308. static struct plat_serial8250_port bast_sio_data[] = {
  309. [0] = {
  310. .mapbase = SERIAL_BASE + 0x2f8,
  311. .irq = IRQ_PCSERIAL1,
  312. .flags = SERIAL_FLAGS,
  313. .iotype = UPIO_MEM,
  314. .regshift = 0,
  315. .uartclk = SERIAL_CLK,
  316. },
  317. [1] = {
  318. .mapbase = SERIAL_BASE + 0x3f8,
  319. .irq = IRQ_PCSERIAL2,
  320. .flags = SERIAL_FLAGS,
  321. .iotype = UPIO_MEM,
  322. .regshift = 0,
  323. .uartclk = SERIAL_CLK,
  324. },
  325. { }
  326. };
  327. static struct platform_device bast_sio = {
  328. .name = "serial8250",
  329. .id = PLAT8250_DEV_PLATFORM,
  330. .dev = {
  331. .platform_data = &bast_sio_data,
  332. },
  333. };
  334. /* we have devices on the bus which cannot work much over the
  335. * standard 100KHz i2c bus frequency
  336. */
  337. static struct s3c2410_platform_i2c __initdata bast_i2c_info = {
  338. .flags = 0,
  339. .slave_addr = 0x10,
  340. .frequency = 100*1000,
  341. };
  342. /* Asix AX88796 10/100 ethernet controller */
  343. static struct ax_plat_data bast_asix_platdata = {
  344. .flags = AXFLG_MAC_FROMDEV,
  345. .wordlength = 2,
  346. .dcr_val = 0x48,
  347. .rcr_val = 0x40,
  348. };
  349. static struct resource bast_asix_resource[] = {
  350. [0] = {
  351. .start = S3C2410_CS5 + BAST_PA_ASIXNET,
  352. .end = S3C2410_CS5 + BAST_PA_ASIXNET + (0x18 * 0x20) - 1,
  353. .flags = IORESOURCE_MEM,
  354. },
  355. [1] = {
  356. .start = S3C2410_CS5 + BAST_PA_ASIXNET + (0x1f * 0x20),
  357. .end = S3C2410_CS5 + BAST_PA_ASIXNET + (0x1f * 0x20),
  358. .flags = IORESOURCE_MEM,
  359. },
  360. [2] = {
  361. .start = IRQ_ASIX,
  362. .end = IRQ_ASIX,
  363. .flags = IORESOURCE_IRQ
  364. }
  365. };
  366. static struct platform_device bast_device_asix = {
  367. .name = "ax88796",
  368. .id = 0,
  369. .num_resources = ARRAY_SIZE(bast_asix_resource),
  370. .resource = bast_asix_resource,
  371. .dev = {
  372. .platform_data = &bast_asix_platdata
  373. }
  374. };
  375. /* Asix AX88796 10/100 ethernet controller parallel port */
  376. static struct resource bast_asixpp_resource[] = {
  377. [0] = {
  378. .start = S3C2410_CS5 + BAST_PA_ASIXNET + (0x18 * 0x20),
  379. .end = S3C2410_CS5 + BAST_PA_ASIXNET + (0x1b * 0x20) - 1,
  380. .flags = IORESOURCE_MEM,
  381. }
  382. };
  383. static struct platform_device bast_device_axpp = {
  384. .name = "ax88796-pp",
  385. .id = 0,
  386. .num_resources = ARRAY_SIZE(bast_asixpp_resource),
  387. .resource = bast_asixpp_resource,
  388. };
  389. /* LCD/VGA controller */
  390. static struct s3c2410fb_display __initdata bast_lcd_info[] = {
  391. {
  392. .type = S3C2410_LCDCON1_TFT,
  393. .width = 640,
  394. .height = 480,
  395. .pixclock = 33333,
  396. .xres = 640,
  397. .yres = 480,
  398. .bpp = 4,
  399. .left_margin = 40,
  400. .right_margin = 20,
  401. .hsync_len = 88,
  402. .upper_margin = 30,
  403. .lower_margin = 32,
  404. .vsync_len = 3,
  405. .lcdcon5 = 0x00014b02,
  406. },
  407. {
  408. .type = S3C2410_LCDCON1_TFT,
  409. .width = 640,
  410. .height = 480,
  411. .pixclock = 33333,
  412. .xres = 640,
  413. .yres = 480,
  414. .bpp = 8,
  415. .left_margin = 40,
  416. .right_margin = 20,
  417. .hsync_len = 88,
  418. .upper_margin = 30,
  419. .lower_margin = 32,
  420. .vsync_len = 3,
  421. .lcdcon5 = 0x00014b02,
  422. },
  423. {
  424. .type = S3C2410_LCDCON1_TFT,
  425. .width = 640,
  426. .height = 480,
  427. .pixclock = 33333,
  428. .xres = 640,
  429. .yres = 480,
  430. .bpp = 16,
  431. .left_margin = 40,
  432. .right_margin = 20,
  433. .hsync_len = 88,
  434. .upper_margin = 30,
  435. .lower_margin = 32,
  436. .vsync_len = 3,
  437. .lcdcon5 = 0x00014b02,
  438. },
  439. };
  440. /* LCD/VGA controller */
  441. static struct s3c2410fb_mach_info __initdata bast_fb_info = {
  442. .displays = bast_lcd_info,
  443. .num_displays = ARRAY_SIZE(bast_lcd_info),
  444. .default_display = 1,
  445. };
  446. /* I2C devices fitted. */
  447. static struct i2c_board_info bast_i2c_devs[] __initdata = {
  448. {
  449. I2C_BOARD_INFO("tlv320aic23", 0x1a),
  450. }, {
  451. I2C_BOARD_INFO("simtec-pmu", 0x6b),
  452. }, {
  453. I2C_BOARD_INFO("ch7013", 0x75),
  454. },
  455. };
  456. static struct s3c_hwmon_pdata bast_hwmon_info = {
  457. /* LCD contrast (0-6.6V) */
  458. .in[0] = &(struct s3c_hwmon_chcfg) {
  459. .name = "lcd-contrast",
  460. .mult = 3300,
  461. .div = 512,
  462. },
  463. /* LED current feedback */
  464. .in[1] = &(struct s3c_hwmon_chcfg) {
  465. .name = "led-feedback",
  466. .mult = 3300,
  467. .div = 1024,
  468. },
  469. /* LCD feedback (0-6.6V) */
  470. .in[2] = &(struct s3c_hwmon_chcfg) {
  471. .name = "lcd-feedback",
  472. .mult = 3300,
  473. .div = 512,
  474. },
  475. /* Vcore (1.8-2.0V), Vref 3.3V */
  476. .in[3] = &(struct s3c_hwmon_chcfg) {
  477. .name = "vcore",
  478. .mult = 3300,
  479. .div = 1024,
  480. },
  481. };
  482. /* Standard BAST devices */
  483. // cat /sys/devices/platform/s3c24xx-adc/s3c-hwmon/in_0
  484. static struct platform_device *bast_devices[] __initdata = {
  485. &s3c_device_ohci,
  486. &s3c_device_lcd,
  487. &s3c_device_wdt,
  488. &s3c_device_i2c0,
  489. &s3c_device_rtc,
  490. &s3c_device_nand,
  491. &s3c_device_adc,
  492. &s3c_device_hwmon,
  493. &bast_device_dm9k,
  494. &bast_device_asix,
  495. &bast_device_axpp,
  496. &bast_sio,
  497. };
  498. static struct clk *bast_clocks[] __initdata = {
  499. &s3c24xx_dclk0,
  500. &s3c24xx_dclk1,
  501. &s3c24xx_clkout0,
  502. &s3c24xx_clkout1,
  503. &s3c24xx_uclk,
  504. };
  505. static struct s3c_cpufreq_board __initdata bast_cpufreq = {
  506. .refresh = 7800, /* 7.8usec */
  507. .auto_io = 1,
  508. .need_io = 1,
  509. };
  510. static struct s3c24xx_audio_simtec_pdata __initdata bast_audio = {
  511. .have_mic = 1,
  512. .have_lout = 1,
  513. };
  514. static void __init bast_map_io(void)
  515. {
  516. /* initialise the clocks */
  517. s3c24xx_dclk0.parent = &clk_upll;
  518. s3c24xx_dclk0.rate = 12*1000*1000;
  519. s3c24xx_dclk1.parent = &clk_upll;
  520. s3c24xx_dclk1.rate = 24*1000*1000;
  521. s3c24xx_clkout0.parent = &s3c24xx_dclk0;
  522. s3c24xx_clkout1.parent = &s3c24xx_dclk1;
  523. s3c24xx_uclk.parent = &s3c24xx_clkout1;
  524. s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks));
  525. s3c_hwmon_set_platdata(&bast_hwmon_info);
  526. s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
  527. s3c24xx_init_clocks(0);
  528. s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs));
  529. }
  530. static void __init bast_init(void)
  531. {
  532. register_syscore_ops(&bast_pm_syscore_ops);
  533. s3c_i2c0_set_platdata(&bast_i2c_info);
  534. s3c_nand_set_platdata(&bast_nand_info);
  535. s3c24xx_fb_set_platdata(&bast_fb_info);
  536. platform_add_devices(bast_devices, ARRAY_SIZE(bast_devices));
  537. i2c_register_board_info(0, bast_i2c_devs,
  538. ARRAY_SIZE(bast_i2c_devs));
  539. usb_simtec_init();
  540. nor_simtec_init();
  541. simtec_audio_add(NULL, true, &bast_audio);
  542. WARN_ON(gpio_request(S3C2410_GPA(21), "bast nreset"));
  543. s3c_cpufreq_setboard(&bast_cpufreq);
  544. }
  545. MACHINE_START(BAST, "Simtec-BAST")
  546. /* Maintainer: Ben Dooks <ben@simtec.co.uk> */
  547. .atag_offset = 0x100,
  548. .map_io = bast_map_io,
  549. .init_irq = s3c24xx_init_irq,
  550. .init_machine = bast_init,
  551. .timer = &s3c24xx_timer,
  552. .restart = s3c2410_restart,
  553. MACHINE_END