setup.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Renesas - AP-325RXA
  4. * (Compatible with Algo System ., LTD. - AP-320A)
  5. *
  6. * Copyright (C) 2008 Renesas Solutions Corp.
  7. * Author : Yusuke Goda <goda.yuske@renesas.com>
  8. */
  9. #include <asm/clock.h>
  10. #include <asm/io.h>
  11. #include <asm/suspend.h>
  12. #include <cpu/sh7723.h>
  13. #include <linux/clkdev.h>
  14. #include <linux/delay.h>
  15. #include <linux/device.h>
  16. #include <linux/gpio.h>
  17. #include <linux/gpio/machine.h>
  18. #include <linux/i2c.h>
  19. #include <linux/init.h>
  20. #include <linux/interrupt.h>
  21. #include <linux/memblock.h>
  22. #include <linux/mfd/tmio.h>
  23. #include <linux/mmc/host.h>
  24. #include <linux/mtd/physmap.h>
  25. #include <linux/mtd/sh_flctl.h>
  26. #include <linux/platform_device.h>
  27. #include <linux/regulator/fixed.h>
  28. #include <linux/regulator/machine.h>
  29. #include <linux/sh_intc.h>
  30. #include <linux/smsc911x.h>
  31. #include <linux/videodev2.h>
  32. #include <media/drv-intf/renesas-ceu.h>
  33. #include <media/i2c/ov772x.h>
  34. #include <video/sh_mobile_lcdc.h>
  35. #define CEU_BUFFER_MEMORY_SIZE (4 << 20)
  36. static phys_addr_t ceu_dma_membase;
  37. /* Dummy supplies, where voltage doesn't matter */
  38. static struct regulator_consumer_supply dummy_supplies[] = {
  39. REGULATOR_SUPPLY("vddvario", "smsc911x"),
  40. REGULATOR_SUPPLY("vdd33a", "smsc911x"),
  41. };
  42. static struct smsc911x_platform_config smsc911x_config = {
  43. .phy_interface = PHY_INTERFACE_MODE_MII,
  44. .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
  45. .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
  46. .flags = SMSC911X_USE_32BIT,
  47. };
  48. static struct resource smsc9118_resources[] = {
  49. [0] = {
  50. .start = 0xb6080000,
  51. .end = 0xb60fffff,
  52. .flags = IORESOURCE_MEM,
  53. },
  54. [1] = {
  55. .start = evt2irq(0x660),
  56. .end = evt2irq(0x660),
  57. .flags = IORESOURCE_IRQ,
  58. }
  59. };
  60. static struct platform_device smsc9118_device = {
  61. .name = "smsc911x",
  62. .id = -1,
  63. .num_resources = ARRAY_SIZE(smsc9118_resources),
  64. .resource = smsc9118_resources,
  65. .dev = {
  66. .platform_data = &smsc911x_config,
  67. },
  68. };
  69. /*
  70. * AP320 and AP325RXA has CPLD data in NOR Flash(0xA80000-0xABFFFF).
  71. * If this area erased, this board can not boot.
  72. */
  73. static struct mtd_partition ap325rxa_nor_flash_partitions[] = {
  74. {
  75. .name = "uboot",
  76. .offset = 0,
  77. .size = (1 * 1024 * 1024),
  78. .mask_flags = MTD_WRITEABLE, /* Read-only */
  79. }, {
  80. .name = "kernel",
  81. .offset = MTDPART_OFS_APPEND,
  82. .size = (2 * 1024 * 1024),
  83. }, {
  84. .name = "free-area0",
  85. .offset = MTDPART_OFS_APPEND,
  86. .size = ((7 * 1024 * 1024) + (512 * 1024)),
  87. }, {
  88. .name = "CPLD-Data",
  89. .offset = MTDPART_OFS_APPEND,
  90. .mask_flags = MTD_WRITEABLE, /* Read-only */
  91. .size = (1024 * 128 * 2),
  92. }, {
  93. .name = "free-area1",
  94. .offset = MTDPART_OFS_APPEND,
  95. .size = MTDPART_SIZ_FULL,
  96. },
  97. };
  98. static struct physmap_flash_data ap325rxa_nor_flash_data = {
  99. .width = 2,
  100. .parts = ap325rxa_nor_flash_partitions,
  101. .nr_parts = ARRAY_SIZE(ap325rxa_nor_flash_partitions),
  102. };
  103. static struct resource ap325rxa_nor_flash_resources[] = {
  104. [0] = {
  105. .name = "NOR Flash",
  106. .start = 0x00000000,
  107. .end = 0x00ffffff,
  108. .flags = IORESOURCE_MEM,
  109. }
  110. };
  111. static struct platform_device ap325rxa_nor_flash_device = {
  112. .name = "physmap-flash",
  113. .resource = ap325rxa_nor_flash_resources,
  114. .num_resources = ARRAY_SIZE(ap325rxa_nor_flash_resources),
  115. .dev = {
  116. .platform_data = &ap325rxa_nor_flash_data,
  117. },
  118. };
  119. static struct mtd_partition nand_partition_info[] = {
  120. {
  121. .name = "nand_data",
  122. .offset = 0,
  123. .size = MTDPART_SIZ_FULL,
  124. },
  125. };
  126. static struct resource nand_flash_resources[] = {
  127. [0] = {
  128. .start = 0xa4530000,
  129. .end = 0xa45300ff,
  130. .flags = IORESOURCE_MEM,
  131. }
  132. };
  133. static struct sh_flctl_platform_data nand_flash_data = {
  134. .parts = nand_partition_info,
  135. .nr_parts = ARRAY_SIZE(nand_partition_info),
  136. .flcmncr_val = FCKSEL_E | TYPESEL_SET | NANWF_E,
  137. .has_hwecc = 1,
  138. };
  139. static struct platform_device nand_flash_device = {
  140. .name = "sh_flctl",
  141. .resource = nand_flash_resources,
  142. .num_resources = ARRAY_SIZE(nand_flash_resources),
  143. .dev = {
  144. .platform_data = &nand_flash_data,
  145. },
  146. };
  147. #define FPGA_LCDREG 0xB4100180
  148. #define FPGA_BKLREG 0xB4100212
  149. #define FPGA_LCDREG_VAL 0x0018
  150. #define PORT_MSELCRB 0xA4050182
  151. #define PORT_HIZCRC 0xA405015C
  152. #define PORT_DRVCRA 0xA405018A
  153. #define PORT_DRVCRB 0xA405018C
  154. static int ap320_wvga_set_brightness(int brightness)
  155. {
  156. if (brightness) {
  157. gpio_set_value(GPIO_PTS3, 0);
  158. __raw_writew(0x100, FPGA_BKLREG);
  159. } else {
  160. __raw_writew(0, FPGA_BKLREG);
  161. gpio_set_value(GPIO_PTS3, 1);
  162. }
  163. return 0;
  164. }
  165. static void ap320_wvga_power_on(void)
  166. {
  167. msleep(100);
  168. /* ASD AP-320/325 LCD ON */
  169. __raw_writew(FPGA_LCDREG_VAL, FPGA_LCDREG);
  170. }
  171. static void ap320_wvga_power_off(void)
  172. {
  173. /* ASD AP-320/325 LCD OFF */
  174. __raw_writew(0, FPGA_LCDREG);
  175. }
  176. static const struct fb_videomode ap325rxa_lcdc_modes[] = {
  177. {
  178. .name = "LB070WV1",
  179. .xres = 800,
  180. .yres = 480,
  181. .left_margin = 32,
  182. .right_margin = 160,
  183. .hsync_len = 8,
  184. .upper_margin = 63,
  185. .lower_margin = 80,
  186. .vsync_len = 1,
  187. .sync = 0, /* hsync and vsync are active low */
  188. },
  189. };
  190. static struct sh_mobile_lcdc_info lcdc_info = {
  191. .clock_source = LCDC_CLK_EXTERNAL,
  192. .ch[0] = {
  193. .chan = LCDC_CHAN_MAINLCD,
  194. .fourcc = V4L2_PIX_FMT_RGB565,
  195. .interface_type = RGB18,
  196. .clock_divider = 1,
  197. .lcd_modes = ap325rxa_lcdc_modes,
  198. .num_modes = ARRAY_SIZE(ap325rxa_lcdc_modes),
  199. .panel_cfg = {
  200. .width = 152, /* 7.0 inch */
  201. .height = 91,
  202. .display_on = ap320_wvga_power_on,
  203. .display_off = ap320_wvga_power_off,
  204. },
  205. .bl_info = {
  206. .name = "sh_mobile_lcdc_bl",
  207. .max_brightness = 1,
  208. .set_brightness = ap320_wvga_set_brightness,
  209. },
  210. }
  211. };
  212. static struct resource lcdc_resources[] = {
  213. [0] = {
  214. .name = "LCDC",
  215. .start = 0xfe940000, /* P4-only space */
  216. .end = 0xfe942fff,
  217. .flags = IORESOURCE_MEM,
  218. },
  219. [1] = {
  220. .start = evt2irq(0x580),
  221. .flags = IORESOURCE_IRQ,
  222. },
  223. };
  224. static struct platform_device lcdc_device = {
  225. .name = "sh_mobile_lcdc_fb",
  226. .num_resources = ARRAY_SIZE(lcdc_resources),
  227. .resource = lcdc_resources,
  228. .dev = {
  229. .platform_data = &lcdc_info,
  230. },
  231. };
  232. /* Powerdown/reset gpios for CEU image sensors */
  233. static struct gpiod_lookup_table ov7725_gpios = {
  234. .dev_id = "0-0021",
  235. .table = {
  236. GPIO_LOOKUP("sh7723_pfc", GPIO_PTZ5, "reset", GPIO_ACTIVE_LOW),
  237. },
  238. };
  239. static struct ceu_platform_data ceu0_pdata = {
  240. .num_subdevs = 1,
  241. .subdevs = {
  242. { /* [0] = ov7725 */
  243. .flags = 0,
  244. .bus_width = 8,
  245. .bus_shift = 0,
  246. .i2c_adapter_id = 0,
  247. .i2c_address = 0x21,
  248. },
  249. },
  250. };
  251. static struct resource ceu_resources[] = {
  252. [0] = {
  253. .name = "CEU",
  254. .start = 0xfe910000,
  255. .end = 0xfe91009f,
  256. .flags = IORESOURCE_MEM,
  257. },
  258. [1] = {
  259. .start = evt2irq(0x880),
  260. .flags = IORESOURCE_IRQ,
  261. },
  262. };
  263. static struct platform_device ap325rxa_ceu_device = {
  264. .name = "renesas-ceu",
  265. .id = 0, /* "ceu.0" clock */
  266. .num_resources = ARRAY_SIZE(ceu_resources),
  267. .resource = ceu_resources,
  268. .dev = {
  269. .platform_data = &ceu0_pdata,
  270. },
  271. };
  272. /* Fixed 3.3V regulators to be used by SDHI0, SDHI1 */
  273. static struct regulator_consumer_supply fixed3v3_power_consumers[] =
  274. {
  275. REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
  276. REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
  277. REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
  278. REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"),
  279. };
  280. static struct resource sdhi0_cn3_resources[] = {
  281. [0] = {
  282. .name = "SDHI0",
  283. .start = 0x04ce0000,
  284. .end = 0x04ce00ff,
  285. .flags = IORESOURCE_MEM,
  286. },
  287. [1] = {
  288. .start = evt2irq(0xe80),
  289. .flags = IORESOURCE_IRQ,
  290. },
  291. };
  292. static struct tmio_mmc_data sdhi0_cn3_data = {
  293. .capabilities = MMC_CAP_SDIO_IRQ,
  294. };
  295. static struct platform_device sdhi0_cn3_device = {
  296. .name = "sh_mobile_sdhi",
  297. .id = 0, /* "sdhi0" clock */
  298. .num_resources = ARRAY_SIZE(sdhi0_cn3_resources),
  299. .resource = sdhi0_cn3_resources,
  300. .dev = {
  301. .platform_data = &sdhi0_cn3_data,
  302. },
  303. };
  304. static struct resource sdhi1_cn7_resources[] = {
  305. [0] = {
  306. .name = "SDHI1",
  307. .start = 0x04cf0000,
  308. .end = 0x04cf00ff,
  309. .flags = IORESOURCE_MEM,
  310. },
  311. [1] = {
  312. .start = evt2irq(0x4e0),
  313. .flags = IORESOURCE_IRQ,
  314. },
  315. };
  316. static struct tmio_mmc_data sdhi1_cn7_data = {
  317. .capabilities = MMC_CAP_SDIO_IRQ,
  318. };
  319. static struct platform_device sdhi1_cn7_device = {
  320. .name = "sh_mobile_sdhi",
  321. .id = 1, /* "sdhi1" clock */
  322. .num_resources = ARRAY_SIZE(sdhi1_cn7_resources),
  323. .resource = sdhi1_cn7_resources,
  324. .dev = {
  325. .platform_data = &sdhi1_cn7_data,
  326. },
  327. };
  328. static struct ov772x_camera_info ov7725_info = {
  329. .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP,
  330. .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0),
  331. };
  332. static struct i2c_board_info ap325rxa_i2c_devices[] __initdata = {
  333. {
  334. I2C_BOARD_INFO("pcf8563", 0x51),
  335. },
  336. {
  337. I2C_BOARD_INFO("ov772x", 0x21),
  338. .platform_data = &ov7725_info,
  339. },
  340. };
  341. static struct platform_device *ap325rxa_devices[] __initdata = {
  342. &smsc9118_device,
  343. &ap325rxa_nor_flash_device,
  344. &lcdc_device,
  345. &nand_flash_device,
  346. &sdhi0_cn3_device,
  347. &sdhi1_cn7_device,
  348. };
  349. extern char ap325rxa_sdram_enter_start;
  350. extern char ap325rxa_sdram_enter_end;
  351. extern char ap325rxa_sdram_leave_start;
  352. extern char ap325rxa_sdram_leave_end;
  353. static int __init ap325rxa_devices_setup(void)
  354. {
  355. /* register board specific self-refresh code */
  356. sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF,
  357. &ap325rxa_sdram_enter_start,
  358. &ap325rxa_sdram_enter_end,
  359. &ap325rxa_sdram_leave_start,
  360. &ap325rxa_sdram_leave_end);
  361. regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
  362. ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
  363. regulator_register_fixed(1, dummy_supplies, ARRAY_SIZE(dummy_supplies));
  364. /* LD3 and LD4 LEDs */
  365. gpio_request(GPIO_PTX5, NULL); /* RUN */
  366. gpio_direction_output(GPIO_PTX5, 1);
  367. gpio_export(GPIO_PTX5, 0);
  368. gpio_request(GPIO_PTX4, NULL); /* INDICATOR */
  369. gpio_direction_output(GPIO_PTX4, 0);
  370. gpio_export(GPIO_PTX4, 0);
  371. /* SW1 input */
  372. gpio_request(GPIO_PTF7, NULL); /* MODE */
  373. gpio_direction_input(GPIO_PTF7);
  374. gpio_export(GPIO_PTF7, 0);
  375. /* LCDC */
  376. gpio_request(GPIO_FN_LCDD15, NULL);
  377. gpio_request(GPIO_FN_LCDD14, NULL);
  378. gpio_request(GPIO_FN_LCDD13, NULL);
  379. gpio_request(GPIO_FN_LCDD12, NULL);
  380. gpio_request(GPIO_FN_LCDD11, NULL);
  381. gpio_request(GPIO_FN_LCDD10, NULL);
  382. gpio_request(GPIO_FN_LCDD9, NULL);
  383. gpio_request(GPIO_FN_LCDD8, NULL);
  384. gpio_request(GPIO_FN_LCDD7, NULL);
  385. gpio_request(GPIO_FN_LCDD6, NULL);
  386. gpio_request(GPIO_FN_LCDD5, NULL);
  387. gpio_request(GPIO_FN_LCDD4, NULL);
  388. gpio_request(GPIO_FN_LCDD3, NULL);
  389. gpio_request(GPIO_FN_LCDD2, NULL);
  390. gpio_request(GPIO_FN_LCDD1, NULL);
  391. gpio_request(GPIO_FN_LCDD0, NULL);
  392. gpio_request(GPIO_FN_LCDLCLK_PTR, NULL);
  393. gpio_request(GPIO_FN_LCDDCK, NULL);
  394. gpio_request(GPIO_FN_LCDVEPWC, NULL);
  395. gpio_request(GPIO_FN_LCDVCPWC, NULL);
  396. gpio_request(GPIO_FN_LCDVSYN, NULL);
  397. gpio_request(GPIO_FN_LCDHSYN, NULL);
  398. gpio_request(GPIO_FN_LCDDISP, NULL);
  399. gpio_request(GPIO_FN_LCDDON, NULL);
  400. /* LCD backlight */
  401. gpio_request(GPIO_PTS3, NULL);
  402. gpio_direction_output(GPIO_PTS3, 1);
  403. /* CEU */
  404. gpio_request(GPIO_FN_VIO_CLK2, NULL);
  405. gpio_request(GPIO_FN_VIO_VD2, NULL);
  406. gpio_request(GPIO_FN_VIO_HD2, NULL);
  407. gpio_request(GPIO_FN_VIO_FLD, NULL);
  408. gpio_request(GPIO_FN_VIO_CKO, NULL);
  409. gpio_request(GPIO_FN_VIO_D15, NULL);
  410. gpio_request(GPIO_FN_VIO_D14, NULL);
  411. gpio_request(GPIO_FN_VIO_D13, NULL);
  412. gpio_request(GPIO_FN_VIO_D12, NULL);
  413. gpio_request(GPIO_FN_VIO_D11, NULL);
  414. gpio_request(GPIO_FN_VIO_D10, NULL);
  415. gpio_request(GPIO_FN_VIO_D9, NULL);
  416. gpio_request(GPIO_FN_VIO_D8, NULL);
  417. gpio_request(GPIO_PTZ7, NULL);
  418. gpio_direction_output(GPIO_PTZ7, 0); /* OE_CAM */
  419. gpio_request(GPIO_PTZ6, NULL);
  420. gpio_direction_output(GPIO_PTZ6, 0); /* STBY_CAM */
  421. gpio_request(GPIO_PTZ5, NULL);
  422. gpio_direction_output(GPIO_PTZ5, 0); /* RST_CAM */
  423. gpio_request(GPIO_PTZ4, NULL);
  424. gpio_direction_output(GPIO_PTZ4, 0); /* SADDR */
  425. __raw_writew(__raw_readw(PORT_MSELCRB) & ~0x0001, PORT_MSELCRB);
  426. /* FLCTL */
  427. gpio_request(GPIO_FN_FCE, NULL);
  428. gpio_request(GPIO_FN_NAF7, NULL);
  429. gpio_request(GPIO_FN_NAF6, NULL);
  430. gpio_request(GPIO_FN_NAF5, NULL);
  431. gpio_request(GPIO_FN_NAF4, NULL);
  432. gpio_request(GPIO_FN_NAF3, NULL);
  433. gpio_request(GPIO_FN_NAF2, NULL);
  434. gpio_request(GPIO_FN_NAF1, NULL);
  435. gpio_request(GPIO_FN_NAF0, NULL);
  436. gpio_request(GPIO_FN_FCDE, NULL);
  437. gpio_request(GPIO_FN_FOE, NULL);
  438. gpio_request(GPIO_FN_FSC, NULL);
  439. gpio_request(GPIO_FN_FWE, NULL);
  440. gpio_request(GPIO_FN_FRB, NULL);
  441. __raw_writew(0, PORT_HIZCRC);
  442. __raw_writew(0xFFFF, PORT_DRVCRA);
  443. __raw_writew(0xFFFF, PORT_DRVCRB);
  444. /* SDHI0 - CN3 - SD CARD */
  445. gpio_request(GPIO_FN_SDHI0CD_PTD, NULL);
  446. gpio_request(GPIO_FN_SDHI0WP_PTD, NULL);
  447. gpio_request(GPIO_FN_SDHI0D3_PTD, NULL);
  448. gpio_request(GPIO_FN_SDHI0D2_PTD, NULL);
  449. gpio_request(GPIO_FN_SDHI0D1_PTD, NULL);
  450. gpio_request(GPIO_FN_SDHI0D0_PTD, NULL);
  451. gpio_request(GPIO_FN_SDHI0CMD_PTD, NULL);
  452. gpio_request(GPIO_FN_SDHI0CLK_PTD, NULL);
  453. /* SDHI1 - CN7 - MICRO SD CARD */
  454. gpio_request(GPIO_FN_SDHI1CD, NULL);
  455. gpio_request(GPIO_FN_SDHI1D3, NULL);
  456. gpio_request(GPIO_FN_SDHI1D2, NULL);
  457. gpio_request(GPIO_FN_SDHI1D1, NULL);
  458. gpio_request(GPIO_FN_SDHI1D0, NULL);
  459. gpio_request(GPIO_FN_SDHI1CMD, NULL);
  460. gpio_request(GPIO_FN_SDHI1CLK, NULL);
  461. /* Add a clock alias for ov7725 xclk source. */
  462. clk_add_alias(NULL, "0-0021", "video_clk", NULL);
  463. /* Register RSTB gpio for ov7725 camera sensor. */
  464. gpiod_add_lookup_table(&ov7725_gpios);
  465. i2c_register_board_info(0, ap325rxa_i2c_devices,
  466. ARRAY_SIZE(ap325rxa_i2c_devices));
  467. /* Initialize CEU platform device separately to map memory first */
  468. device_initialize(&ap325rxa_ceu_device.dev);
  469. arch_setup_pdev_archdata(&ap325rxa_ceu_device);
  470. dma_declare_coherent_memory(&ap325rxa_ceu_device.dev,
  471. ceu_dma_membase, ceu_dma_membase,
  472. ceu_dma_membase + CEU_BUFFER_MEMORY_SIZE - 1,
  473. DMA_MEMORY_EXCLUSIVE);
  474. platform_device_add(&ap325rxa_ceu_device);
  475. return platform_add_devices(ap325rxa_devices,
  476. ARRAY_SIZE(ap325rxa_devices));
  477. }
  478. arch_initcall(ap325rxa_devices_setup);
  479. /* Return the board specific boot mode pin configuration */
  480. static int ap325rxa_mode_pins(void)
  481. {
  482. /* MD0=0, MD1=0, MD2=0: Clock Mode 0
  483. * MD3=0: 16-bit Area0 Bus Width
  484. * MD5=1: Little Endian
  485. * TSTMD=1, MD8=1: Test Mode Disabled
  486. */
  487. return MODE_PIN5 | MODE_PIN8;
  488. }
  489. /* Reserve a portion of memory for CEU buffers */
  490. static void __init ap325rxa_mv_mem_reserve(void)
  491. {
  492. phys_addr_t phys;
  493. phys_addr_t size = CEU_BUFFER_MEMORY_SIZE;
  494. phys = memblock_alloc_base(size, PAGE_SIZE, MEMBLOCK_ALLOC_ANYWHERE);
  495. memblock_free(phys, size);
  496. memblock_remove(phys, size);
  497. ceu_dma_membase = phys;
  498. }
  499. static struct sh_machine_vector mv_ap325rxa __initmv = {
  500. .mv_name = "AP-325RXA",
  501. .mv_mode_pins = ap325rxa_mode_pins,
  502. .mv_mem_reserve = ap325rxa_mv_mem_reserve,
  503. };