From: Magnus Damm Date: Thu, 16 Oct 2008 22:50:56 +0000 (-0300) Subject: V4L/DVB (9243): video: add byte swap to sh_mobile_ceu driver X-Git-Tag: v2.6.28-rc1~256^2~48 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2c0a072e3efc17c27566c28028f4b46f79c1f0ca;p=linux-2.6-omap-h63xx.git V4L/DVB (9243): video: add byte swap to sh_mobile_ceu driver Extend the sh_mobile_ceu driver to enable byte swap. This way bytes are stored in memory in incoming byte order. Signed-off-by: Magnus Damm Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index 7a7268c43dc..fa88d382d5b 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c @@ -401,10 +401,10 @@ static int sh_mobile_ceu_set_bus_param(struct soc_camera_device *icd, * D7, D6, D5, D4, D3, D2, D1, D0 (D7 written to lowest byte) * * The lowest three bits of CDOCR allows us to do swapping, - * right now we swap the data bytes to the following order: - * D1, D0, D3, D2, D5, D4, D7, D6 + * using 7 we swap the data bytes to match the incoming order: + * D0, D1, D2, D3, D4, D5, D6, D7 */ - ceu_write(pcdev, CDOCR, 0x00000016); + ceu_write(pcdev, CDOCR, 0x00000017); ceu_write(pcdev, CDWDR, cdwdr_width); ceu_write(pcdev, CFWCR, 0); /* keep "datafetch firewall" disabled */