setup.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. /*
  2. * Renesas System Solutions Asia Pte. Ltd - Migo-R
  3. *
  4. * Copyright (C) 2008 Magnus Damm
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive
  8. * for more details.
  9. */
  10. #include <linux/init.h>
  11. #include <linux/platform_device.h>
  12. #include <linux/interrupt.h>
  13. #include <linux/input.h>
  14. #include <linux/mtd/physmap.h>
  15. #include <linux/mtd/nand.h>
  16. #include <linux/i2c.h>
  17. #include <linux/smc91x.h>
  18. #include <linux/delay.h>
  19. #include <linux/clk.h>
  20. #include <media/soc_camera_platform.h>
  21. #include <media/sh_mobile_ceu.h>
  22. #include <asm/clock.h>
  23. #include <asm/machvec.h>
  24. #include <asm/io.h>
  25. #include <asm/sh_keysc.h>
  26. #include <asm/sh_mobile_lcdc.h>
  27. #include <asm/migor.h>
  28. /* Address IRQ Size Bus Description
  29. * 0x00000000 64MB 16 NOR Flash (SP29PL256N)
  30. * 0x0c000000 64MB 64 SDRAM (2xK4M563233G)
  31. * 0x10000000 IRQ0 16 Ethernet (SMC91C111)
  32. * 0x14000000 IRQ4 16 USB 2.0 Host Controller (M66596)
  33. * 0x18000000 8GB 8 NAND Flash (K9K8G08U0A)
  34. */
  35. static struct smc91x_platdata smc91x_info = {
  36. .flags = SMC91X_USE_16BIT,
  37. };
  38. static struct resource smc91x_eth_resources[] = {
  39. [0] = {
  40. .name = "SMC91C111" ,
  41. .start = 0x10000300,
  42. .end = 0x1000030f,
  43. .flags = IORESOURCE_MEM,
  44. },
  45. [1] = {
  46. .start = 32, /* IRQ0 */
  47. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
  48. },
  49. };
  50. static struct platform_device smc91x_eth_device = {
  51. .name = "smc91x",
  52. .num_resources = ARRAY_SIZE(smc91x_eth_resources),
  53. .resource = smc91x_eth_resources,
  54. .dev = {
  55. .platform_data = &smc91x_info,
  56. },
  57. };
  58. static struct sh_keysc_info sh_keysc_info = {
  59. .mode = SH_KEYSC_MODE_2, /* KEYOUT0->4, KEYIN1->5 */
  60. .scan_timing = 3,
  61. .delay = 5,
  62. .keycodes = {
  63. 0, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_ENTER,
  64. 0, KEY_F, KEY_C, KEY_D, KEY_H, KEY_1,
  65. 0, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6,
  66. 0, KEY_7, KEY_8, KEY_9, KEY_S, KEY_0,
  67. 0, KEY_P, KEY_STOP, KEY_REWIND, KEY_PLAY, KEY_FASTFORWARD,
  68. },
  69. };
  70. static struct resource sh_keysc_resources[] = {
  71. [0] = {
  72. .start = 0x044b0000,
  73. .end = 0x044b000f,
  74. .flags = IORESOURCE_MEM,
  75. },
  76. [1] = {
  77. .start = 79,
  78. .flags = IORESOURCE_IRQ,
  79. },
  80. };
  81. static struct platform_device sh_keysc_device = {
  82. .name = "sh_keysc",
  83. .num_resources = ARRAY_SIZE(sh_keysc_resources),
  84. .resource = sh_keysc_resources,
  85. .dev = {
  86. .platform_data = &sh_keysc_info,
  87. },
  88. };
  89. static struct mtd_partition migor_nor_flash_partitions[] =
  90. {
  91. {
  92. .name = "uboot",
  93. .offset = 0,
  94. .size = (1 * 1024 * 1024),
  95. .mask_flags = MTD_WRITEABLE, /* Read-only */
  96. },
  97. {
  98. .name = "rootfs",
  99. .offset = MTDPART_OFS_APPEND,
  100. .size = (15 * 1024 * 1024),
  101. },
  102. {
  103. .name = "other",
  104. .offset = MTDPART_OFS_APPEND,
  105. .size = MTDPART_SIZ_FULL,
  106. },
  107. };
  108. static struct physmap_flash_data migor_nor_flash_data = {
  109. .width = 2,
  110. .parts = migor_nor_flash_partitions,
  111. .nr_parts = ARRAY_SIZE(migor_nor_flash_partitions),
  112. };
  113. static struct resource migor_nor_flash_resources[] = {
  114. [0] = {
  115. .name = "NOR Flash",
  116. .start = 0x00000000,
  117. .end = 0x03ffffff,
  118. .flags = IORESOURCE_MEM,
  119. }
  120. };
  121. static struct platform_device migor_nor_flash_device = {
  122. .name = "physmap-flash",
  123. .resource = migor_nor_flash_resources,
  124. .num_resources = ARRAY_SIZE(migor_nor_flash_resources),
  125. .dev = {
  126. .platform_data = &migor_nor_flash_data,
  127. },
  128. };
  129. static struct mtd_partition migor_nand_flash_partitions[] = {
  130. {
  131. .name = "nanddata1",
  132. .offset = 0x0,
  133. .size = 512 * 1024 * 1024,
  134. },
  135. {
  136. .name = "nanddata2",
  137. .offset = MTDPART_OFS_APPEND,
  138. .size = 512 * 1024 * 1024,
  139. },
  140. };
  141. static void migor_nand_flash_cmd_ctl(struct mtd_info *mtd, int cmd,
  142. unsigned int ctrl)
  143. {
  144. struct nand_chip *chip = mtd->priv;
  145. if (cmd == NAND_CMD_NONE)
  146. return;
  147. if (ctrl & NAND_CLE)
  148. writeb(cmd, chip->IO_ADDR_W + 0x00400000);
  149. else if (ctrl & NAND_ALE)
  150. writeb(cmd, chip->IO_ADDR_W + 0x00800000);
  151. else
  152. writeb(cmd, chip->IO_ADDR_W);
  153. }
  154. static int migor_nand_flash_ready(struct mtd_info *mtd)
  155. {
  156. return ctrl_inb(PORT_PADR) & 0x02; /* PTA1 */
  157. }
  158. struct platform_nand_data migor_nand_flash_data = {
  159. .chip = {
  160. .nr_chips = 1,
  161. .partitions = migor_nand_flash_partitions,
  162. .nr_partitions = ARRAY_SIZE(migor_nand_flash_partitions),
  163. .chip_delay = 20,
  164. .part_probe_types = (const char *[]) { "cmdlinepart", NULL },
  165. },
  166. .ctrl = {
  167. .dev_ready = migor_nand_flash_ready,
  168. .cmd_ctrl = migor_nand_flash_cmd_ctl,
  169. },
  170. };
  171. static struct resource migor_nand_flash_resources[] = {
  172. [0] = {
  173. .name = "NAND Flash",
  174. .start = 0x18000000,
  175. .end = 0x18ffffff,
  176. .flags = IORESOURCE_MEM,
  177. },
  178. };
  179. static struct platform_device migor_nand_flash_device = {
  180. .name = "gen_nand",
  181. .resource = migor_nand_flash_resources,
  182. .num_resources = ARRAY_SIZE(migor_nand_flash_resources),
  183. .dev = {
  184. .platform_data = &migor_nand_flash_data,
  185. }
  186. };
  187. static struct sh_mobile_lcdc_info sh_mobile_lcdc_info = {
  188. #ifdef CONFIG_SH_MIGOR_RTA_WVGA
  189. .clock_source = LCDC_CLK_BUS,
  190. .ch[0] = {
  191. .chan = LCDC_CHAN_MAINLCD,
  192. .bpp = 16,
  193. .interface_type = RGB16,
  194. .clock_divider = 2,
  195. .lcd_cfg = {
  196. .name = "LB070WV1",
  197. .xres = 800,
  198. .yres = 480,
  199. .left_margin = 64,
  200. .right_margin = 16,
  201. .hsync_len = 120,
  202. .upper_margin = 1,
  203. .lower_margin = 17,
  204. .vsync_len = 2,
  205. .sync = 0,
  206. },
  207. .lcd_size_cfg = { /* 7.0 inch */
  208. .width = 152,
  209. .height = 91,
  210. },
  211. }
  212. #endif
  213. #ifdef CONFIG_SH_MIGOR_QVGA
  214. .clock_source = LCDC_CLK_PERIPHERAL,
  215. .ch[0] = {
  216. .chan = LCDC_CHAN_MAINLCD,
  217. .bpp = 16,
  218. .interface_type = SYS16A,
  219. .clock_divider = 10,
  220. .lcd_cfg = {
  221. .name = "PH240320T",
  222. .xres = 320,
  223. .yres = 240,
  224. .left_margin = 0,
  225. .right_margin = 16,
  226. .hsync_len = 8,
  227. .upper_margin = 1,
  228. .lower_margin = 17,
  229. .vsync_len = 2,
  230. .sync = FB_SYNC_HOR_HIGH_ACT,
  231. },
  232. .lcd_size_cfg = { /* 2.4 inch */
  233. .width = 49,
  234. .height = 37,
  235. },
  236. .board_cfg = {
  237. .setup_sys = migor_lcd_qvga_setup,
  238. },
  239. .sys_bus_cfg = {
  240. .ldmt2r = 0x06000a09,
  241. .ldmt3r = 0x180e3418,
  242. },
  243. }
  244. #endif
  245. };
  246. static struct resource migor_lcdc_resources[] = {
  247. [0] = {
  248. .name = "LCDC",
  249. .start = 0xfe940000, /* P4-only space */
  250. .end = 0xfe941fff,
  251. .flags = IORESOURCE_MEM,
  252. },
  253. };
  254. static struct platform_device migor_lcdc_device = {
  255. .name = "sh_mobile_lcdc_fb",
  256. .num_resources = ARRAY_SIZE(migor_lcdc_resources),
  257. .resource = migor_lcdc_resources,
  258. .dev = {
  259. .platform_data = &sh_mobile_lcdc_info,
  260. },
  261. };
  262. static struct clk *camera_clk;
  263. static void camera_power_on(void)
  264. {
  265. unsigned char value;
  266. camera_clk = clk_get(NULL, "video_clk");
  267. clk_set_rate(camera_clk, 24000000);
  268. clk_enable(camera_clk); /* start VIO_CKO */
  269. mdelay(10);
  270. value = ctrl_inb(PORT_PTDR);
  271. value &= ~0x09;
  272. #ifndef CONFIG_SH_MIGOR_RTA_WVGA
  273. value |= 0x01;
  274. #endif
  275. ctrl_outb(value, PORT_PTDR);
  276. mdelay(10);
  277. ctrl_outb(value | 8, PORT_PTDR);
  278. }
  279. static void camera_power_off(void)
  280. {
  281. clk_disable(camera_clk); /* stop VIO_CKO */
  282. clk_put(camera_clk);
  283. ctrl_outb(ctrl_inb(PORT_PTDR) & ~0x08, PORT_PTDR);
  284. }
  285. #ifdef CONFIG_I2C
  286. static unsigned char camera_ov772x_magic[] =
  287. {
  288. 0x09, 0x01, 0x0c, 0x10, 0x0d, 0x41, 0x0e, 0x01,
  289. 0x12, 0x00, 0x13, 0x8F, 0x14, 0x4A, 0x15, 0x00,
  290. 0x16, 0x00, 0x17, 0x23, 0x18, 0xa0, 0x19, 0x07,
  291. 0x1a, 0xf0, 0x1b, 0x40, 0x1f, 0x00, 0x20, 0x10,
  292. 0x22, 0xff, 0x23, 0x01, 0x28, 0x00, 0x29, 0xa0,
  293. 0x2a, 0x00, 0x2b, 0x00, 0x2c, 0xf0, 0x2d, 0x00,
  294. 0x2e, 0x00, 0x30, 0x80, 0x31, 0x60, 0x32, 0x00,
  295. 0x33, 0x00, 0x34, 0x00, 0x3d, 0x80, 0x3e, 0xe2,
  296. 0x3f, 0x1f, 0x42, 0x80, 0x43, 0x80, 0x44, 0x80,
  297. 0x45, 0x80, 0x46, 0x00, 0x47, 0x00, 0x48, 0x00,
  298. 0x49, 0x50, 0x4a, 0x30, 0x4b, 0x50, 0x4c, 0x50,
  299. 0x4d, 0x00, 0x4e, 0xef, 0x4f, 0x10, 0x50, 0x60,
  300. 0x51, 0x00, 0x52, 0x00, 0x53, 0x24, 0x54, 0x7a,
  301. 0x55, 0xfc, 0x62, 0xff, 0x63, 0xf0, 0x64, 0x1f,
  302. 0x65, 0x00, 0x66, 0x10, 0x67, 0x00, 0x68, 0x00,
  303. 0x69, 0x5c, 0x6a, 0x11, 0x6b, 0xa2, 0x6c, 0x01,
  304. 0x6d, 0x50, 0x6e, 0x80, 0x6f, 0x80, 0x70, 0x0f,
  305. 0x71, 0x00, 0x72, 0x00, 0x73, 0x0f, 0x74, 0x0f,
  306. 0x75, 0xff, 0x78, 0x10, 0x79, 0x70, 0x7a, 0x70,
  307. 0x7b, 0xf0, 0x7c, 0xf0, 0x7d, 0xf0, 0x7e, 0x0e,
  308. 0x7f, 0x1a, 0x80, 0x31, 0x81, 0x5a, 0x82, 0x69,
  309. 0x83, 0x75, 0x84, 0x7e, 0x85, 0x88, 0x86, 0x8f,
  310. 0x87, 0x96, 0x88, 0xa3, 0x89, 0xaf, 0x8a, 0xc4,
  311. 0x8b, 0xd7, 0x8c, 0xe8, 0x8d, 0x20, 0x8e, 0x00,
  312. 0x8f, 0x00, 0x90, 0x08, 0x91, 0x10, 0x92, 0x1f,
  313. 0x93, 0x01, 0x94, 0x2c, 0x95, 0x24, 0x96, 0x08,
  314. 0x97, 0x14, 0x98, 0x24, 0x99, 0x38, 0x9a, 0x9e,
  315. 0x9b, 0x00, 0x9c, 0x40, 0x9e, 0x11, 0x9f, 0x02,
  316. 0xa0, 0x00, 0xa1, 0x40, 0xa2, 0x40, 0xa3, 0x06,
  317. 0xa4, 0x00, 0xa6, 0x00, 0xa7, 0x40, 0xa8, 0x40,
  318. 0xa9, 0x80, 0xaa, 0x80, 0xab, 0x06, 0xac, 0xff,
  319. 0x12, 0x06, 0x64, 0x3f, 0x12, 0x46, 0x17, 0x3f,
  320. 0x18, 0x50, 0x19, 0x03, 0x1a, 0x78, 0x29, 0x50,
  321. 0x2c, 0x78,
  322. };
  323. static int ov772x_set_capture(struct soc_camera_platform_info *info,
  324. int enable)
  325. {
  326. struct i2c_adapter *a = i2c_get_adapter(0);
  327. struct i2c_msg msg;
  328. int ret = 0;
  329. int i;
  330. if (!enable)
  331. return 0; /* camera_power_off() is enough */
  332. for (i = 0; i < ARRAY_SIZE(camera_ov772x_magic); i += 2) {
  333. u_int8_t buf[8];
  334. msg.addr = 0x21;
  335. msg.buf = buf;
  336. msg.len = 2;
  337. msg.flags = 0;
  338. buf[0] = camera_ov772x_magic[i];
  339. buf[1] = camera_ov772x_magic[i + 1];
  340. ret = (ret < 0) ? ret : i2c_transfer(a, &msg, 1);
  341. }
  342. return ret;
  343. }
  344. static struct soc_camera_platform_info ov772x_info = {
  345. .iface = 0,
  346. .format_name = "RGB565",
  347. .format_depth = 16,
  348. .format = {
  349. .pixelformat = V4L2_PIX_FMT_RGB565,
  350. .colorspace = V4L2_COLORSPACE_SRGB,
  351. .width = 320,
  352. .height = 240,
  353. },
  354. .bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
  355. SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8,
  356. .set_capture = ov772x_set_capture,
  357. };
  358. static struct platform_device migor_camera_device = {
  359. .name = "soc_camera_platform",
  360. .dev = {
  361. .platform_data = &ov772x_info,
  362. },
  363. };
  364. #endif /* CONFIG_I2C */
  365. static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
  366. .flags = SOCAM_MASTER | SOCAM_DATAWIDTH_8 | SOCAM_PCLK_SAMPLE_RISING \
  367. | SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH,
  368. .enable_camera = camera_power_on,
  369. .disable_camera = camera_power_off,
  370. };
  371. static struct resource migor_ceu_resources[] = {
  372. [0] = {
  373. .name = "CEU",
  374. .start = 0xfe910000,
  375. .end = 0xfe91009f,
  376. .flags = IORESOURCE_MEM,
  377. },
  378. [1] = {
  379. .start = 52,
  380. .flags = IORESOURCE_IRQ,
  381. },
  382. [2] = {
  383. /* place holder for contiguous memory */
  384. },
  385. };
  386. static struct platform_device migor_ceu_device = {
  387. .name = "sh_mobile_ceu",
  388. .num_resources = ARRAY_SIZE(migor_ceu_resources),
  389. .resource = migor_ceu_resources,
  390. .dev = {
  391. .platform_data = &sh_mobile_ceu_info,
  392. },
  393. };
  394. static struct platform_device *migor_devices[] __initdata = {
  395. &smc91x_eth_device,
  396. &sh_keysc_device,
  397. &migor_lcdc_device,
  398. &migor_ceu_device,
  399. #ifdef CONFIG_I2C
  400. &migor_camera_device,
  401. #endif
  402. &migor_nor_flash_device,
  403. &migor_nand_flash_device,
  404. };
  405. static struct i2c_board_info migor_i2c_devices[] = {
  406. {
  407. I2C_BOARD_INFO("rs5c372b", 0x32),
  408. },
  409. {
  410. I2C_BOARD_INFO("migor_ts", 0x51),
  411. .irq = 38, /* IRQ6 */
  412. },
  413. };
  414. static int __init migor_devices_setup(void)
  415. {
  416. clk_always_enable("mstp214"); /* KEYSC */
  417. clk_always_enable("mstp200"); /* LCDC */
  418. clk_always_enable("mstp203"); /* CEU */
  419. platform_resource_setup_memory(&migor_ceu_device, "ceu", 4 << 20);
  420. i2c_register_board_info(0, migor_i2c_devices,
  421. ARRAY_SIZE(migor_i2c_devices));
  422. return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices));
  423. }
  424. __initcall(migor_devices_setup);
  425. static void __init migor_setup(char **cmdline_p)
  426. {
  427. /* SMC91C111 - Enable IRQ0 */
  428. ctrl_outw(ctrl_inw(PORT_PJCR) & ~0x0003, PORT_PJCR);
  429. /* KEYSC */
  430. ctrl_outw(ctrl_inw(PORT_PYCR) & ~0x0fff, PORT_PYCR);
  431. ctrl_outw(ctrl_inw(PORT_PZCR) & ~0x0ff0, PORT_PZCR);
  432. ctrl_outw(ctrl_inw(PORT_PSELA) & ~0x4100, PORT_PSELA);
  433. ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x4000, PORT_HIZCRA);
  434. ctrl_outw(ctrl_inw(PORT_HIZCRC) & ~0xc000, PORT_HIZCRC);
  435. /* NAND Flash */
  436. ctrl_outw(ctrl_inw(PORT_PXCR) & 0x0fff, PORT_PXCR);
  437. ctrl_outl((ctrl_inl(BSC_CS6ABCR) & ~0x00000600) | 0x00000200,
  438. BSC_CS6ABCR);
  439. /* Touch Panel - Enable IRQ6 */
  440. ctrl_outw(ctrl_inw(PORT_PZCR) & ~0xc, PORT_PZCR);
  441. ctrl_outw((ctrl_inw(PORT_PSELA) | 0x8000), PORT_PSELA);
  442. ctrl_outw((ctrl_inw(PORT_HIZCRC) & ~0x4000), PORT_HIZCRC);
  443. #ifdef CONFIG_SH_MIGOR_RTA_WVGA
  444. /* LCDC - WVGA - Enable RGB Interface signals */
  445. ctrl_outw(ctrl_inw(PORT_PACR) & ~0x0003, PORT_PACR);
  446. ctrl_outw(0x0000, PORT_PHCR);
  447. ctrl_outw(0x0000, PORT_PLCR);
  448. ctrl_outw(0x0000, PORT_PMCR);
  449. ctrl_outw(ctrl_inw(PORT_PRCR) & ~0x000f, PORT_PRCR);
  450. ctrl_outw((ctrl_inw(PORT_PSELD) & ~0x000d) | 0x0400, PORT_PSELD);
  451. ctrl_outw(ctrl_inw(PORT_MSELCRB) & ~0x0100, PORT_MSELCRB);
  452. ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x01e0, PORT_HIZCRA);
  453. #endif
  454. #ifdef CONFIG_SH_MIGOR_QVGA
  455. /* LCDC - QVGA - Enable SYS Interface signals */
  456. ctrl_outw(ctrl_inw(PORT_PACR) & ~0x0003, PORT_PACR);
  457. ctrl_outw((ctrl_inw(PORT_PHCR) & ~0xcfff) | 0x0010, PORT_PHCR);
  458. ctrl_outw(0x0000, PORT_PLCR);
  459. ctrl_outw(0x0000, PORT_PMCR);
  460. ctrl_outw(ctrl_inw(PORT_PRCR) & ~0x030f, PORT_PRCR);
  461. ctrl_outw((ctrl_inw(PORT_PSELD) & ~0x0001) | 0x0420, PORT_PSELD);
  462. ctrl_outw(ctrl_inw(PORT_MSELCRB) | 0x0100, PORT_MSELCRB);
  463. ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x01e0, PORT_HIZCRA);
  464. #endif
  465. /* CEU */
  466. ctrl_outw((ctrl_inw(PORT_PTCR) & ~0x03c3) | 0x0051, PORT_PTCR);
  467. ctrl_outw(ctrl_inw(PORT_PUCR) & ~0x03ff, PORT_PUCR);
  468. ctrl_outw(ctrl_inw(PORT_PVCR) & ~0x03ff, PORT_PVCR);
  469. ctrl_outw(ctrl_inw(PORT_PWCR) & ~0x3c00, PORT_PWCR);
  470. ctrl_outw(ctrl_inw(PORT_PSELC) | 0x0001, PORT_PSELC);
  471. ctrl_outw(ctrl_inw(PORT_PSELD) & ~0x2000, PORT_PSELD);
  472. ctrl_outw(ctrl_inw(PORT_PSELE) | 0x000f, PORT_PSELE);
  473. ctrl_outw(ctrl_inw(PORT_MSELCRB) | 0x2200, PORT_MSELCRB);
  474. ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x0a00, PORT_HIZCRA);
  475. ctrl_outw(ctrl_inw(PORT_HIZCRB) & ~0x0003, PORT_HIZCRB);
  476. }
  477. static struct sh_machine_vector mv_migor __initmv = {
  478. .mv_name = "Migo-R",
  479. .mv_setup = migor_setup,
  480. };