mach-bast.c 15 KB

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