fimc-reg.c 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. /*
  2. * Register interface file for Samsung Camera Interface (FIMC) driver
  3. *
  4. * Copyright (c) 2010 Samsung Electronics
  5. *
  6. * Sylwester Nawrocki, s.nawrocki@samsung.com
  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/io.h>
  13. #include <linux/delay.h>
  14. #include <mach/map.h>
  15. #include "fimc-core.h"
  16. void fimc_hw_reset(struct fimc_dev *dev)
  17. {
  18. u32 cfg;
  19. cfg = readl(dev->regs + S5P_CISRCFMT);
  20. cfg |= S5P_CISRCFMT_ITU601_8BIT;
  21. writel(cfg, dev->regs + S5P_CISRCFMT);
  22. /* Software reset. */
  23. cfg = readl(dev->regs + S5P_CIGCTRL);
  24. cfg |= (S5P_CIGCTRL_SWRST | S5P_CIGCTRL_IRQ_LEVEL);
  25. writel(cfg, dev->regs + S5P_CIGCTRL);
  26. msleep(1);
  27. cfg = readl(dev->regs + S5P_CIGCTRL);
  28. cfg &= ~S5P_CIGCTRL_SWRST;
  29. writel(cfg, dev->regs + S5P_CIGCTRL);
  30. }
  31. void fimc_hw_set_rotation(struct fimc_ctx *ctx)
  32. {
  33. u32 cfg, flip;
  34. struct fimc_dev *dev = ctx->fimc_dev;
  35. cfg = readl(dev->regs + S5P_CITRGFMT);
  36. cfg &= ~(S5P_CITRGFMT_INROT90 | S5P_CITRGFMT_OUTROT90);
  37. flip = readl(dev->regs + S5P_MSCTRL);
  38. flip &= ~S5P_MSCTRL_FLIP_MASK;
  39. /*
  40. * The input and output rotator cannot work simultaneously.
  41. * Use the output rotator in output DMA mode or the input rotator
  42. * in direct fifo output mode.
  43. */
  44. if (ctx->rotation == 90 || ctx->rotation == 270) {
  45. if (ctx->out_path == FIMC_LCDFIFO) {
  46. cfg |= S5P_CITRGFMT_INROT90;
  47. if (ctx->rotation == 270)
  48. flip |= S5P_MSCTRL_FLIP_180;
  49. } else {
  50. cfg |= S5P_CITRGFMT_OUTROT90;
  51. if (ctx->rotation == 270)
  52. cfg |= S5P_CITRGFMT_FLIP_180;
  53. }
  54. } else if (ctx->rotation == 180) {
  55. if (ctx->out_path == FIMC_LCDFIFO)
  56. flip |= S5P_MSCTRL_FLIP_180;
  57. else
  58. cfg |= S5P_CITRGFMT_FLIP_180;
  59. }
  60. if (ctx->rotation == 180 || ctx->rotation == 270)
  61. writel(flip, dev->regs + S5P_MSCTRL);
  62. writel(cfg, dev->regs + S5P_CITRGFMT);
  63. }
  64. static u32 fimc_hw_get_in_flip(u32 ctx_flip)
  65. {
  66. u32 flip = S5P_MSCTRL_FLIP_NORMAL;
  67. switch (ctx_flip) {
  68. case FLIP_X_AXIS:
  69. flip = S5P_MSCTRL_FLIP_X_MIRROR;
  70. break;
  71. case FLIP_Y_AXIS:
  72. flip = S5P_MSCTRL_FLIP_Y_MIRROR;
  73. break;
  74. case FLIP_XY_AXIS:
  75. flip = S5P_MSCTRL_FLIP_180;
  76. break;
  77. }
  78. return flip;
  79. }
  80. static u32 fimc_hw_get_target_flip(u32 ctx_flip)
  81. {
  82. u32 flip = S5P_CITRGFMT_FLIP_NORMAL;
  83. switch (ctx_flip) {
  84. case FLIP_X_AXIS:
  85. flip = S5P_CITRGFMT_FLIP_X_MIRROR;
  86. break;
  87. case FLIP_Y_AXIS:
  88. flip = S5P_CITRGFMT_FLIP_Y_MIRROR;
  89. break;
  90. case FLIP_XY_AXIS:
  91. flip = S5P_CITRGFMT_FLIP_180;
  92. break;
  93. case FLIP_NONE:
  94. break;
  95. }
  96. return flip;
  97. }
  98. void fimc_hw_set_target_format(struct fimc_ctx *ctx)
  99. {
  100. u32 cfg;
  101. struct fimc_dev *dev = ctx->fimc_dev;
  102. struct fimc_frame *frame = &ctx->d_frame;
  103. dbg("w= %d, h= %d color: %d", frame->width,
  104. frame->height, frame->fmt->color);
  105. cfg = readl(dev->regs + S5P_CITRGFMT);
  106. cfg &= ~(S5P_CITRGFMT_FMT_MASK | S5P_CITRGFMT_HSIZE_MASK |
  107. S5P_CITRGFMT_VSIZE_MASK);
  108. switch (frame->fmt->color) {
  109. case S5P_FIMC_RGB565:
  110. case S5P_FIMC_RGB666:
  111. case S5P_FIMC_RGB888:
  112. cfg |= S5P_CITRGFMT_RGB;
  113. break;
  114. case S5P_FIMC_YCBCR420:
  115. cfg |= S5P_CITRGFMT_YCBCR420;
  116. break;
  117. case S5P_FIMC_YCBYCR422:
  118. case S5P_FIMC_YCRYCB422:
  119. case S5P_FIMC_CBYCRY422:
  120. case S5P_FIMC_CRYCBY422:
  121. if (frame->fmt->planes_cnt == 1)
  122. cfg |= S5P_CITRGFMT_YCBCR422_1P;
  123. else
  124. cfg |= S5P_CITRGFMT_YCBCR422;
  125. break;
  126. default:
  127. break;
  128. }
  129. cfg |= S5P_CITRGFMT_HSIZE(frame->width);
  130. cfg |= S5P_CITRGFMT_VSIZE(frame->height);
  131. if (ctx->rotation == 0) {
  132. cfg &= ~S5P_CITRGFMT_FLIP_MASK;
  133. cfg |= fimc_hw_get_target_flip(ctx->flip);
  134. }
  135. writel(cfg, dev->regs + S5P_CITRGFMT);
  136. cfg = readl(dev->regs + S5P_CITAREA) & ~S5P_CITAREA_MASK;
  137. cfg |= (frame->width * frame->height);
  138. writel(cfg, dev->regs + S5P_CITAREA);
  139. }
  140. static void fimc_hw_set_out_dma_size(struct fimc_ctx *ctx)
  141. {
  142. struct fimc_dev *dev = ctx->fimc_dev;
  143. struct fimc_frame *frame = &ctx->d_frame;
  144. u32 cfg = 0;
  145. if (ctx->rotation == 90 || ctx->rotation == 270) {
  146. cfg |= S5P_ORIG_SIZE_HOR(frame->f_height);
  147. cfg |= S5P_ORIG_SIZE_VER(frame->f_width);
  148. } else {
  149. cfg |= S5P_ORIG_SIZE_HOR(frame->f_width);
  150. cfg |= S5P_ORIG_SIZE_VER(frame->f_height);
  151. }
  152. writel(cfg, dev->regs + S5P_ORGOSIZE);
  153. }
  154. void fimc_hw_set_out_dma(struct fimc_ctx *ctx)
  155. {
  156. u32 cfg;
  157. struct fimc_dev *dev = ctx->fimc_dev;
  158. struct fimc_frame *frame = &ctx->d_frame;
  159. struct fimc_dma_offset *offset = &frame->dma_offset;
  160. /* Set the input dma offsets. */
  161. cfg = 0;
  162. cfg |= S5P_CIO_OFFS_HOR(offset->y_h);
  163. cfg |= S5P_CIO_OFFS_VER(offset->y_v);
  164. writel(cfg, dev->regs + S5P_CIOYOFF);
  165. cfg = 0;
  166. cfg |= S5P_CIO_OFFS_HOR(offset->cb_h);
  167. cfg |= S5P_CIO_OFFS_VER(offset->cb_v);
  168. writel(cfg, dev->regs + S5P_CIOCBOFF);
  169. cfg = 0;
  170. cfg |= S5P_CIO_OFFS_HOR(offset->cr_h);
  171. cfg |= S5P_CIO_OFFS_VER(offset->cr_v);
  172. writel(cfg, dev->regs + S5P_CIOCROFF);
  173. fimc_hw_set_out_dma_size(ctx);
  174. /* Configure chroma components order. */
  175. cfg = readl(dev->regs + S5P_CIOCTRL);
  176. cfg &= ~(S5P_CIOCTRL_ORDER2P_MASK | S5P_CIOCTRL_ORDER422_MASK |
  177. S5P_CIOCTRL_YCBCR_PLANE_MASK);
  178. if (frame->fmt->planes_cnt == 1)
  179. cfg |= ctx->out_order_1p;
  180. else if (frame->fmt->planes_cnt == 2)
  181. cfg |= ctx->out_order_2p | S5P_CIOCTRL_YCBCR_2PLANE;
  182. else if (frame->fmt->planes_cnt == 3)
  183. cfg |= S5P_CIOCTRL_YCBCR_3PLANE;
  184. writel(cfg, dev->regs + S5P_CIOCTRL);
  185. }
  186. static void fimc_hw_en_autoload(struct fimc_dev *dev, int enable)
  187. {
  188. u32 cfg = readl(dev->regs + S5P_ORGISIZE);
  189. if (enable)
  190. cfg |= S5P_CIREAL_ISIZE_AUTOLOAD_EN;
  191. else
  192. cfg &= ~S5P_CIREAL_ISIZE_AUTOLOAD_EN;
  193. writel(cfg, dev->regs + S5P_ORGISIZE);
  194. }
  195. void fimc_hw_en_lastirq(struct fimc_dev *dev, int enable)
  196. {
  197. unsigned long flags;
  198. u32 cfg;
  199. spin_lock_irqsave(&dev->slock, flags);
  200. cfg = readl(dev->regs + S5P_CIOCTRL);
  201. if (enable)
  202. cfg |= S5P_CIOCTRL_LASTIRQ_ENABLE;
  203. else
  204. cfg &= ~S5P_CIOCTRL_LASTIRQ_ENABLE;
  205. writel(cfg, dev->regs + S5P_CIOCTRL);
  206. spin_unlock_irqrestore(&dev->slock, flags);
  207. }
  208. void fimc_hw_set_prescaler(struct fimc_ctx *ctx)
  209. {
  210. struct fimc_dev *dev = ctx->fimc_dev;
  211. struct fimc_scaler *sc = &ctx->scaler;
  212. u32 cfg = 0, shfactor;
  213. shfactor = 10 - (sc->hfactor + sc->vfactor);
  214. cfg |= S5P_CISCPRERATIO_SHFACTOR(shfactor);
  215. cfg |= S5P_CISCPRERATIO_HOR(sc->pre_hratio);
  216. cfg |= S5P_CISCPRERATIO_VER(sc->pre_vratio);
  217. writel(cfg, dev->regs + S5P_CISCPRERATIO);
  218. cfg = 0;
  219. cfg |= S5P_CISCPREDST_WIDTH(sc->pre_dst_width);
  220. cfg |= S5P_CISCPREDST_HEIGHT(sc->pre_dst_height);
  221. writel(cfg, dev->regs + S5P_CISCPREDST);
  222. }
  223. void fimc_hw_set_scaler(struct fimc_ctx *ctx)
  224. {
  225. struct fimc_dev *dev = ctx->fimc_dev;
  226. struct fimc_scaler *sc = &ctx->scaler;
  227. struct fimc_frame *src_frame = &ctx->s_frame;
  228. struct fimc_frame *dst_frame = &ctx->d_frame;
  229. u32 cfg = 0;
  230. if (!(ctx->flags & FIMC_COLOR_RANGE_NARROW))
  231. cfg |= (S5P_CISCCTRL_CSCR2Y_WIDE | S5P_CISCCTRL_CSCY2R_WIDE);
  232. if (!sc->enabled)
  233. cfg |= S5P_CISCCTRL_SCALERBYPASS;
  234. if (sc->scaleup_h)
  235. cfg |= S5P_CISCCTRL_SCALEUP_H;
  236. if (sc->scaleup_v)
  237. cfg |= S5P_CISCCTRL_SCALEUP_V;
  238. if (sc->copy_mode)
  239. cfg |= S5P_CISCCTRL_ONE2ONE;
  240. if (ctx->in_path == FIMC_DMA) {
  241. if (src_frame->fmt->color == S5P_FIMC_RGB565)
  242. cfg |= S5P_CISCCTRL_INRGB_FMT_RGB565;
  243. else if (src_frame->fmt->color == S5P_FIMC_RGB666)
  244. cfg |= S5P_CISCCTRL_INRGB_FMT_RGB666;
  245. else if (src_frame->fmt->color == S5P_FIMC_RGB888)
  246. cfg |= S5P_CISCCTRL_INRGB_FMT_RGB888;
  247. }
  248. if (ctx->out_path == FIMC_DMA) {
  249. if (dst_frame->fmt->color == S5P_FIMC_RGB565)
  250. cfg |= S5P_CISCCTRL_OUTRGB_FMT_RGB565;
  251. else if (dst_frame->fmt->color == S5P_FIMC_RGB666)
  252. cfg |= S5P_CISCCTRL_OUTRGB_FMT_RGB666;
  253. else if (dst_frame->fmt->color == S5P_FIMC_RGB888)
  254. cfg |= S5P_CISCCTRL_OUTRGB_FMT_RGB888;
  255. } else {
  256. cfg |= S5P_CISCCTRL_OUTRGB_FMT_RGB888;
  257. if (ctx->flags & FIMC_SCAN_MODE_INTERLACED)
  258. cfg |= S5P_CISCCTRL_INTERLACE;
  259. }
  260. dbg("main_hratio= 0x%X main_vratio= 0x%X",
  261. sc->main_hratio, sc->main_vratio);
  262. cfg |= S5P_CISCCTRL_SC_HORRATIO(sc->main_hratio);
  263. cfg |= S5P_CISCCTRL_SC_VERRATIO(sc->main_vratio);
  264. writel(cfg, dev->regs + S5P_CISCCTRL);
  265. }
  266. void fimc_hw_en_capture(struct fimc_ctx *ctx)
  267. {
  268. struct fimc_dev *dev = ctx->fimc_dev;
  269. u32 cfg;
  270. cfg = readl(dev->regs + S5P_CIIMGCPT);
  271. /* One shot mode for output DMA or freerun for FIFO. */
  272. if (ctx->out_path == FIMC_DMA)
  273. cfg |= S5P_CIIMGCPT_CPT_FREN_ENABLE;
  274. else
  275. cfg &= ~S5P_CIIMGCPT_CPT_FREN_ENABLE;
  276. if (ctx->scaler.enabled)
  277. cfg |= S5P_CIIMGCPT_IMGCPTEN_SC;
  278. writel(cfg | S5P_CIIMGCPT_IMGCPTEN, dev->regs + S5P_CIIMGCPT);
  279. }
  280. void fimc_hw_set_effect(struct fimc_ctx *ctx)
  281. {
  282. struct fimc_dev *dev = ctx->fimc_dev;
  283. struct fimc_effect *effect = &ctx->effect;
  284. u32 cfg = (S5P_CIIMGEFF_IE_ENABLE | S5P_CIIMGEFF_IE_SC_AFTER);
  285. cfg |= effect->type;
  286. if (effect->type == S5P_FIMC_EFFECT_ARBITRARY) {
  287. cfg |= S5P_CIIMGEFF_PAT_CB(effect->pat_cb);
  288. cfg |= S5P_CIIMGEFF_PAT_CR(effect->pat_cr);
  289. }
  290. writel(cfg, dev->regs + S5P_CIIMGEFF);
  291. }
  292. static void fimc_hw_set_in_dma_size(struct fimc_ctx *ctx)
  293. {
  294. struct fimc_dev *dev = ctx->fimc_dev;
  295. struct fimc_frame *frame = &ctx->s_frame;
  296. u32 cfg_o = 0;
  297. u32 cfg_r = 0;
  298. if (FIMC_LCDFIFO == ctx->out_path)
  299. cfg_r |= S5P_CIREAL_ISIZE_AUTOLOAD_EN;
  300. cfg_o |= S5P_ORIG_SIZE_HOR(frame->f_width);
  301. cfg_o |= S5P_ORIG_SIZE_VER(frame->f_height);
  302. cfg_r |= S5P_CIREAL_ISIZE_WIDTH(frame->width);
  303. cfg_r |= S5P_CIREAL_ISIZE_HEIGHT(frame->height);
  304. writel(cfg_o, dev->regs + S5P_ORGISIZE);
  305. writel(cfg_r, dev->regs + S5P_CIREAL_ISIZE);
  306. }
  307. void fimc_hw_set_in_dma(struct fimc_ctx *ctx)
  308. {
  309. struct fimc_dev *dev = ctx->fimc_dev;
  310. struct fimc_frame *frame = &ctx->s_frame;
  311. struct fimc_dma_offset *offset = &frame->dma_offset;
  312. u32 cfg = 0;
  313. /* Set the pixel offsets. */
  314. cfg |= S5P_CIO_OFFS_HOR(offset->y_h);
  315. cfg |= S5P_CIO_OFFS_VER(offset->y_v);
  316. writel(cfg, dev->regs + S5P_CIIYOFF);
  317. cfg = 0;
  318. cfg |= S5P_CIO_OFFS_HOR(offset->cb_h);
  319. cfg |= S5P_CIO_OFFS_VER(offset->cb_v);
  320. writel(cfg, dev->regs + S5P_CIICBOFF);
  321. cfg = 0;
  322. cfg |= S5P_CIO_OFFS_HOR(offset->cr_h);
  323. cfg |= S5P_CIO_OFFS_VER(offset->cr_v);
  324. writel(cfg, dev->regs + S5P_CIICROFF);
  325. /* Input original and real size. */
  326. fimc_hw_set_in_dma_size(ctx);
  327. /* Autoload is used currently only in FIFO mode. */
  328. fimc_hw_en_autoload(dev, ctx->out_path == FIMC_LCDFIFO);
  329. /* Set the input DMA to process single frame only. */
  330. cfg = readl(dev->regs + S5P_MSCTRL);
  331. cfg &= ~(S5P_MSCTRL_FLIP_MASK
  332. | S5P_MSCTRL_INFORMAT_MASK
  333. | S5P_MSCTRL_IN_BURST_COUNT_MASK
  334. | S5P_MSCTRL_INPUT_MASK
  335. | S5P_MSCTRL_C_INT_IN_MASK
  336. | S5P_MSCTRL_2P_IN_ORDER_MASK);
  337. cfg |= (S5P_MSCTRL_FRAME_COUNT(1) | S5P_MSCTRL_INPUT_MEMORY);
  338. switch (frame->fmt->color) {
  339. case S5P_FIMC_RGB565:
  340. case S5P_FIMC_RGB666:
  341. case S5P_FIMC_RGB888:
  342. cfg |= S5P_MSCTRL_INFORMAT_RGB;
  343. break;
  344. case S5P_FIMC_YCBCR420:
  345. cfg |= S5P_MSCTRL_INFORMAT_YCBCR420;
  346. if (frame->fmt->planes_cnt == 2)
  347. cfg |= ctx->in_order_2p | S5P_MSCTRL_C_INT_IN_2PLANE;
  348. else
  349. cfg |= S5P_MSCTRL_C_INT_IN_3PLANE;
  350. break;
  351. case S5P_FIMC_YCBYCR422:
  352. case S5P_FIMC_YCRYCB422:
  353. case S5P_FIMC_CBYCRY422:
  354. case S5P_FIMC_CRYCBY422:
  355. if (frame->fmt->planes_cnt == 1) {
  356. cfg |= ctx->in_order_1p
  357. | S5P_MSCTRL_INFORMAT_YCBCR422_1P;
  358. } else {
  359. cfg |= S5P_MSCTRL_INFORMAT_YCBCR422;
  360. if (frame->fmt->planes_cnt == 2)
  361. cfg |= ctx->in_order_2p
  362. | S5P_MSCTRL_C_INT_IN_2PLANE;
  363. else
  364. cfg |= S5P_MSCTRL_C_INT_IN_3PLANE;
  365. }
  366. break;
  367. default:
  368. break;
  369. }
  370. /*
  371. * Input DMA flip mode (and rotation).
  372. * Do not allow simultaneous rotation and flipping.
  373. */
  374. if (!ctx->rotation && ctx->out_path == FIMC_LCDFIFO)
  375. cfg |= fimc_hw_get_in_flip(ctx->flip);
  376. writel(cfg, dev->regs + S5P_MSCTRL);
  377. /* Input/output DMA linear/tiled mode. */
  378. cfg = readl(dev->regs + S5P_CIDMAPARAM);
  379. cfg &= ~S5P_CIDMAPARAM_TILE_MASK;
  380. if (tiled_fmt(ctx->s_frame.fmt))
  381. cfg |= S5P_CIDMAPARAM_R_64X32;
  382. if (tiled_fmt(ctx->d_frame.fmt))
  383. cfg |= S5P_CIDMAPARAM_W_64X32;
  384. writel(cfg, dev->regs + S5P_CIDMAPARAM);
  385. }
  386. void fimc_hw_set_input_path(struct fimc_ctx *ctx)
  387. {
  388. struct fimc_dev *dev = ctx->fimc_dev;
  389. u32 cfg = readl(dev->regs + S5P_MSCTRL);
  390. cfg &= ~S5P_MSCTRL_INPUT_MASK;
  391. if (ctx->in_path == FIMC_DMA)
  392. cfg |= S5P_MSCTRL_INPUT_MEMORY;
  393. else
  394. cfg |= S5P_MSCTRL_INPUT_EXTCAM;
  395. writel(cfg, dev->regs + S5P_MSCTRL);
  396. }
  397. void fimc_hw_set_output_path(struct fimc_ctx *ctx)
  398. {
  399. struct fimc_dev *dev = ctx->fimc_dev;
  400. u32 cfg = readl(dev->regs + S5P_CISCCTRL);
  401. cfg &= ~S5P_CISCCTRL_LCDPATHEN_FIFO;
  402. if (ctx->out_path == FIMC_LCDFIFO)
  403. cfg |= S5P_CISCCTRL_LCDPATHEN_FIFO;
  404. writel(cfg, dev->regs + S5P_CISCCTRL);
  405. }
  406. void fimc_hw_set_input_addr(struct fimc_dev *dev, struct fimc_addr *paddr)
  407. {
  408. u32 cfg = 0;
  409. cfg = readl(dev->regs + S5P_CIREAL_ISIZE);
  410. cfg |= S5P_CIREAL_ISIZE_ADDR_CH_DIS;
  411. writel(cfg, dev->regs + S5P_CIREAL_ISIZE);
  412. writel(paddr->y, dev->regs + S5P_CIIYSA0);
  413. writel(paddr->cb, dev->regs + S5P_CIICBSA0);
  414. writel(paddr->cr, dev->regs + S5P_CIICRSA0);
  415. cfg &= ~S5P_CIREAL_ISIZE_ADDR_CH_DIS;
  416. writel(cfg, dev->regs + S5P_CIREAL_ISIZE);
  417. }
  418. void fimc_hw_set_output_addr(struct fimc_dev *dev, struct fimc_addr *paddr)
  419. {
  420. int i;
  421. /* Set all the output register sets to point to single video buffer. */
  422. for (i = 0; i < FIMC_MAX_OUT_BUFS; i++) {
  423. writel(paddr->y, dev->regs + S5P_CIOYSA(i));
  424. writel(paddr->cb, dev->regs + S5P_CIOCBSA(i));
  425. writel(paddr->cr, dev->regs + S5P_CIOCRSA(i));
  426. }
  427. }