RE: [PATCH 01/10 v2] ARM: Samsung: Add FIMC register and platform definitions

2010-07-16 Thread Sylwester Nawrocki
> -Original Message-
> From: Maurus Cuelenaere [mailto:mcuelena...@gmail.com]
> Sent: Friday, July 16, 2010 3:36 PM
> To: Sylwester Nawrocki
> Cc: 'Kukjin Kim'; Pawel Osciak; Marek Szyprowski;
> kyungmin.p...@samsung.com; linux-media@vger.kernel.org; linux-samsung-
> s...@vger.kernel.org; linux-arm-ker...@lists.infradead.org
> Subject: Re: [PATCH 01/10 v2] ARM: Samsung: Add FIMC register and
> platform definitions
> 
>  Op 16-07-10 15:30, Sylwester Nawrocki schreef:
> > Hi,
> >
> > thank you for the review. Please se my comments below.
> >
> >> -Original Message-
> >> From: Kukjin Kim [mailto:kgene@samsung.com]
> >> Sent: Friday, July 16, 2010 11:45 AM
> >> To: 'Sylwester Nawrocki'; linux-samsung-...@vger.kernel.org; linux-
> arm-
> >> ker...@lists.infradead.org
> >> Cc: p.osc...@samsung.com; m.szyprow...@samsung.com;
> >> kyungmin.p...@samsung.com; linux-media@vger.kernel.org
> >> Subject: RE: [PATCH 01/10 v2] ARM: Samsung: Add FIMC register and
> >> platform definitions
> >>



> >>> +
> >>> +struct samsung_plat_fimc {
> >>> + struct s3c_fifo_link*fifo_targets[FIMC_MAX_FIFO_TARGETS];
> >>> +};
> >>> +
> >>> +#endif /* FIMC_H_ */
> >>> +
> >> No need last empty line...
> > C89 and C99 standard requires a new line character at the end of
> file.
> > The compiler should issue a warning when the new line character
> > at the end of file is missing, otherwise it is not compliant with
> > the above C standards.
> > So I would rather add a new line where it is missing rather than
> > removing it.
> > There is lots of header files already in arch/arm/plat-samsung where
> > there is even more than one empty line at the end of file.
> 
> AFAIK there *already is* an empty line, git just omits it in diffs.
> Try removing the last line with your editor and see what git diff
> gives, it'll
> show "\ No newline at end of file".

Indeed, I just had two new-line characters with single empty line..

> 
> --
> Maurus Cuelenaere

Thanks,
Sylwester


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 01/10 v2] ARM: Samsung: Add FIMC register and platform definitions

2010-07-16 Thread Maurus Cuelenaere
 Op 16-07-10 15:30, Sylwester Nawrocki schreef:
> Hi,
>
> thank you for the review. Please se my comments below.
>
>> -Original Message-
>> From: Kukjin Kim [mailto:kgene@samsung.com]
>> Sent: Friday, July 16, 2010 11:45 AM
>> To: 'Sylwester Nawrocki'; linux-samsung-...@vger.kernel.org; linux-arm-
>> ker...@lists.infradead.org
>> Cc: p.osc...@samsung.com; m.szyprow...@samsung.com;
>> kyungmin.p...@samsung.com; linux-media@vger.kernel.org
>> Subject: RE: [PATCH 01/10 v2] ARM: Samsung: Add FIMC register and
>> platform definitions
>>
>> Sylwester Nawrocki wrote:
>>> FIMC device is a camera interface embedded in S3C/S5P Samsung SOC
>> series.
>>> It supports ITU-R BT.601/656 and MIPI-CSI2 standards, memory to
>> memory
>>> operations, color conversion, resizing and rotation.
>>>
>>> Signed-off-by: Sylwester Nawrocki 
>>> Signed-off-by: Marek Szyprowski 
>>> Signed-off-by: Kyungmin Park 
>>> ---
>>>  arch/arm/plat-samsung/include/plat/fimc.h  |   31 ++
>>>  arch/arm/plat-samsung/include/plat/regs-fimc.h |  361
>>> 
>>>  2 files changed, 392 insertions(+), 0 deletions(-)
>>>  create mode 100644 arch/arm/plat-samsung/include/plat/fimc.h
>>>  create mode 100644 arch/arm/plat-samsung/include/plat/regs-fimc.h
>>>
>>> diff --git a/arch/arm/plat-samsung/include/plat/fimc.h
>> b/arch/arm/plat-
>>> samsung/include/plat/fimc.h
>>> new file mode 100644
>>> index 000..be1e853
>>> --- /dev/null
>>> +++ b/arch/arm/plat-samsung/include/plat/fimc.h
>>> @@ -0,0 +1,31 @@
>>> +/* linux/arch/arm/plat-samsung/include/plat/fimc.h
>>> + *
>>> + * Platform header file for FIMC driver
>>> + *
>>> + * Copyright (c) 2010 Samsung Electronics
>>> + *
>>> + * Sylwester Nawrocki, 
>>> + *
>>> + * This program is free software; you can redistribute it and/or
>> modify
>>> + * it under the terms of the GNU General Public License version 2 as
>>> + * published by the Free Software Foundation.
>>> + */
>>> +
>>> +#ifndef FIMC_H_
>>> +#define FIMC_H_
>>> +
>>> +#include 
>>> +#include 
>>> +
>>> +
>> 2 empty lines...
> I don't mind at all changing these to single line if it is 
> the adopted style, however I didn't file like so when looking
> through the existing headers.
>
>>> +#define FIMC_MAX_FIFO_TARGETS  1
>>> +#define FIMC_LCD_FIFO_TARGET   0
>>> +
>>> +struct s3c_fifo_link;
>>> +
>>> +struct samsung_plat_fimc {
>>> +   struct s3c_fifo_link*fifo_targets[FIMC_MAX_FIFO_TARGETS];
>>> +};
>>> +
>>> +#endif /* FIMC_H_ */
>>> +
>> No need last empty line...
> C89 and C99 standard requires a new line character at the end of file.
> The compiler should issue a warning when the new line character 
> at the end of file is missing, otherwise it is not compliant with 
> the above C standards.
> So I would rather add a new line where it is missing rather than 
> removing it.
> There is lots of header files already in arch/arm/plat-samsung where 
> there is even more than one empty line at the end of file. 

AFAIK there *already is* an empty line, git just omits it in diffs.
Try removing the last line with your editor and see what git diff gives, it'll
show "\ No newline at end of file".

-- 
Maurus Cuelenaere
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 01/10 v2] ARM: Samsung: Add FIMC register and platform definitions

2010-07-16 Thread Sylwester Nawrocki
Hi,

thank you for the review. Please se my comments below.

> -Original Message-
> From: Kukjin Kim [mailto:kgene@samsung.com]
> Sent: Friday, July 16, 2010 11:45 AM
> To: 'Sylwester Nawrocki'; linux-samsung-...@vger.kernel.org; linux-arm-
> ker...@lists.infradead.org
> Cc: p.osc...@samsung.com; m.szyprow...@samsung.com;
> kyungmin.p...@samsung.com; linux-media@vger.kernel.org
> Subject: RE: [PATCH 01/10 v2] ARM: Samsung: Add FIMC register and
> platform definitions
> 
> Sylwester Nawrocki wrote:
> >
> > FIMC device is a camera interface embedded in S3C/S5P Samsung SOC
> series.
> > It supports ITU-R BT.601/656 and MIPI-CSI2 standards, memory to
> memory
> > operations, color conversion, resizing and rotation.
> >
> > Signed-off-by: Sylwester Nawrocki 
> > Signed-off-by: Marek Szyprowski 
> > Signed-off-by: Kyungmin Park 
> > ---
> >  arch/arm/plat-samsung/include/plat/fimc.h  |   31 ++
> >  arch/arm/plat-samsung/include/plat/regs-fimc.h |  361
> > 
> >  2 files changed, 392 insertions(+), 0 deletions(-)
> >  create mode 100644 arch/arm/plat-samsung/include/plat/fimc.h
> >  create mode 100644 arch/arm/plat-samsung/include/plat/regs-fimc.h
> >
> > diff --git a/arch/arm/plat-samsung/include/plat/fimc.h
> b/arch/arm/plat-
> > samsung/include/plat/fimc.h
> > new file mode 100644
> > index 000..be1e853
> > --- /dev/null
> > +++ b/arch/arm/plat-samsung/include/plat/fimc.h
> > @@ -0,0 +1,31 @@
> > +/* linux/arch/arm/plat-samsung/include/plat/fimc.h
> > + *
> > + * Platform header file for FIMC driver
> > + *
> > + * Copyright (c) 2010 Samsung Electronics
> > + *
> > + * Sylwester Nawrocki, 
> > + *
> > + * This program is free software; you can redistribute it and/or
> modify
> > + * it under the terms of the GNU General Public License version 2 as
> > + * published by the Free Software Foundation.
> > + */
> > +
> > +#ifndef FIMC_H_
> > +#define FIMC_H_
> > +
> > +#include 
> > +#include 
> > +
> > +
> 
> 2 empty lines...

I don't mind at all changing these to single line if it is 
the adopted style, however I didn't file like so when looking
through the existing headers.

> 
> > +#define FIMC_MAX_FIFO_TARGETS  1
> > +#define FIMC_LCD_FIFO_TARGET   0
> > +
> > +struct s3c_fifo_link;
> > +
> > +struct samsung_plat_fimc {
> > +   struct s3c_fifo_link*fifo_targets[FIMC_MAX_FIFO_TARGETS];
> > +};
> > +
> > +#endif /* FIMC_H_ */
> > +
> 
> No need last empty line...

C89 and C99 standard requires a new line character at the end of file.
The compiler should issue a warning when the new line character 
at the end of file is missing, otherwise it is not compliant with 
the above C standards.
So I would rather add a new line where it is missing rather than 
removing it.
There is lots of header files already in arch/arm/plat-samsung where 
there is even more than one empty line at the end of file. 

> 
> > diff --git a/arch/arm/plat-samsung/include/plat/regs-fimc.h
> b/arch/arm/plat-
> > samsung/include/plat/regs-fimc.h
> > new file mode 100644
> > index 000..6946a93
> > --- /dev/null
> > +++ b/arch/arm/plat-samsung/include/plat/regs-fimc.h
> > @@ -0,0 +1,361 @@
> > +/* arch/arm/plat-s5p/include/plat/regs-fimc.h
> > + *
> > + * Register definition file for Samsung Camera Interface (FIMC)
> driver
> > + *
> > + * Copyright (c) 2010 Samsung Electronics
> > + *
> > + * This program is free software; you can redistribute it and/or
> modify
> > + * it under the terms of the GNU General Public License version 2 as
> > + * published by the Free Software Foundation.
> > + */
> > +
> > +#ifndef REGS_FIMC_H_
> > +#define REGS_FIMC_H_
> > +
> > +#define S5P_CIOYSA(__x)(0x18 + (__x) * 4)
> > +#define S5P_CIOCBSA(__x)   (0x28 + (__x) * 4)
> > +#define S5P_CIOCRSA(__x)   (0x38 + (__x) * 4)
> > +
> > +/* Input source format */
> > +#define S5P_CISRCFMT   0x00
> > +/* Window offset */
> > +#define S5P_CIWDOFST   0x04
> > +/* Global control */
> > +#define S5P_CIGCTRL0x08
> > +/* Window offset 2 */
> > +#define S5P_CIWDOFST2  0x14
> > +/* Output DMA Y 1st frame start address */
> > +#define S5P_CIOYSA10x18
> > +/* Output DMA Y 2nd frame start address *

RE: [PATCH 01/10 v2] ARM: Samsung: Add FIMC register and platform definitions

2010-07-16 Thread Kukjin Kim
Sylwester Nawrocki wrote:
> 
> FIMC device is a camera interface embedded in S3C/S5P Samsung SOC series.
> It supports ITU-R BT.601/656 and MIPI-CSI2 standards, memory to memory
> operations, color conversion, resizing and rotation.
> 
> Signed-off-by: Sylwester Nawrocki 
> Signed-off-by: Marek Szyprowski 
> Signed-off-by: Kyungmin Park 
> ---
>  arch/arm/plat-samsung/include/plat/fimc.h  |   31 ++
>  arch/arm/plat-samsung/include/plat/regs-fimc.h |  361
> 
>  2 files changed, 392 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/plat-samsung/include/plat/fimc.h
>  create mode 100644 arch/arm/plat-samsung/include/plat/regs-fimc.h
> 
> diff --git a/arch/arm/plat-samsung/include/plat/fimc.h b/arch/arm/plat-
> samsung/include/plat/fimc.h
> new file mode 100644
> index 000..be1e853
> --- /dev/null
> +++ b/arch/arm/plat-samsung/include/plat/fimc.h
> @@ -0,0 +1,31 @@
> +/* linux/arch/arm/plat-samsung/include/plat/fimc.h
> + *
> + * Platform header file for FIMC driver
> + *
> + * Copyright (c) 2010 Samsung Electronics
> + *
> + * Sylwester Nawrocki, 
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#ifndef FIMC_H_
> +#define FIMC_H_
> +
> +#include 
> +#include 
> +
> +

2 empty lines...

> +#define FIMC_MAX_FIFO_TARGETS1
> +#define FIMC_LCD_FIFO_TARGET 0
> +
> +struct s3c_fifo_link;
> +
> +struct samsung_plat_fimc {
> + struct s3c_fifo_link*fifo_targets[FIMC_MAX_FIFO_TARGETS];
> +};
> +
> +#endif /* FIMC_H_ */
> +

No need last empty line...

> diff --git a/arch/arm/plat-samsung/include/plat/regs-fimc.h
b/arch/arm/plat-
> samsung/include/plat/regs-fimc.h
> new file mode 100644
> index 000..6946a93
> --- /dev/null
> +++ b/arch/arm/plat-samsung/include/plat/regs-fimc.h
> @@ -0,0 +1,361 @@
> +/* arch/arm/plat-s5p/include/plat/regs-fimc.h
> + *
> + * Register definition file for Samsung Camera Interface (FIMC) driver
> + *
> + * Copyright (c) 2010 Samsung Electronics
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#ifndef REGS_FIMC_H_
> +#define REGS_FIMC_H_
> +
> +#define S5P_CIOYSA(__x)  (0x18 + (__x) * 4)
> +#define S5P_CIOCBSA(__x) (0x28 + (__x) * 4)
> +#define S5P_CIOCRSA(__x) (0x38 + (__x) * 4)
> +
> +/* Input source format */
> +#define S5P_CISRCFMT 0x00
> +/* Window offset */
> +#define S5P_CIWDOFST 0x04
> +/* Global control */
> +#define S5P_CIGCTRL  0x08
> +/* Window offset 2 */
> +#define S5P_CIWDOFST20x14
> +/* Output DMA Y 1st frame start address */
> +#define S5P_CIOYSA1  0x18
> +/* Output DMA Y 2nd frame start address */
> +#define S5P_CIOYSA2  0x1c
> +/* Output DMA Y 3rd frame start address */
> +#define S5P_CIOYSA3  0x20
> +/* Output DMA Y 4th frame start address */
> +#define S5P_CIOYSA4  0x24
> +/* Output DMA Cb 1st frame start address */
> +#define S5P_CIOCBSA1 0x28
> +/* Output DMA Cb 2nd frame start address */
> +#define S5P_CIOCBSA2 0x2c
> +/* Output DMA Cb 3rd frame start address */
> +#define S5P_CIOCBSA3 0x30
> +/* Output DMA Cb 4th frame start address */
> +#define S5P_CIOCBSA4 0x34
> +/* Output DMA Cr 1st frame start address */
> +#define S5P_CIOCRSA1 0x38
> +/* Output DMA Cr 2nd frame start address */
> +#define S5P_CIOCRSA2 0x3c
> +/* Output DMA Cr 3rd frame start address */
> +#define S5P_CIOCRSA3 0x40
> +/* Output DMA Cr 4th frame start address */
> +#define S5P_CIOCRSA4 0x44
> +/* Target image format */
> +#define S5P_CITRGFMT 0x48
> +/* Output DMA control */
> +#define S5P_CIOCTRL  0x4c
> +/* Pre-scaler control 1 */
> +#define S5P_CISCPRERATIO 0x50
> +/* Pre-scaler control 2 */
> +#define S5P_CISCPREDST   0x54
> +/* Main scaler control */
> +#define S5P_CISCCTRL 0x58
> +/* Target area */
> +#define S5P_CITAREA  0x5c
> +/* Status */
> +#define S5P_CISTATUS 0x64
> +/* Image capture enable command */
> +#define S5P_CIIMGCPT 0xc0
> +/* Capture sequence */
> +#define S5P_CICPTSEQ 0xc4
> +/* Image effects */
> +#define S5P_CIIMGEFF 0xd0
> +/* Y frame start address for input DMA */
> +#define S5P_CIIYSA0

[PATCH 01/10 v2] ARM: Samsung: Add FIMC register and platform definitions

2010-07-15 Thread Sylwester Nawrocki
FIMC device is a camera interface embedded in S3C/S5P Samsung SOC series.
It supports ITU-R BT.601/656 and MIPI-CSI2 standards, memory to memory
operations, color conversion, resizing and rotation.

Signed-off-by: Sylwester Nawrocki 
Signed-off-by: Marek Szyprowski 
Signed-off-by: Kyungmin Park 
---
 arch/arm/plat-samsung/include/plat/fimc.h  |   31 ++
 arch/arm/plat-samsung/include/plat/regs-fimc.h |  361 
 2 files changed, 392 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/plat-samsung/include/plat/fimc.h
 create mode 100644 arch/arm/plat-samsung/include/plat/regs-fimc.h

diff --git a/arch/arm/plat-samsung/include/plat/fimc.h 
b/arch/arm/plat-samsung/include/plat/fimc.h
new file mode 100644
index 000..be1e853
--- /dev/null
+++ b/arch/arm/plat-samsung/include/plat/fimc.h
@@ -0,0 +1,31 @@
+/* linux/arch/arm/plat-samsung/include/plat/fimc.h
+ *
+ * Platform header file for FIMC driver
+ *
+ * Copyright (c) 2010 Samsung Electronics
+ *
+ * Sylwester Nawrocki, 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef FIMC_H_
+#define FIMC_H_
+
+#include 
+#include 
+
+
+#define FIMC_MAX_FIFO_TARGETS  1
+#define FIMC_LCD_FIFO_TARGET   0
+
+struct s3c_fifo_link;
+
+struct samsung_plat_fimc {
+   struct s3c_fifo_link*fifo_targets[FIMC_MAX_FIFO_TARGETS];
+};
+
+#endif /* FIMC_H_ */
+
diff --git a/arch/arm/plat-samsung/include/plat/regs-fimc.h 
b/arch/arm/plat-samsung/include/plat/regs-fimc.h
new file mode 100644
index 000..6946a93
--- /dev/null
+++ b/arch/arm/plat-samsung/include/plat/regs-fimc.h
@@ -0,0 +1,361 @@
+/* arch/arm/plat-s5p/include/plat/regs-fimc.h
+ *
+ * Register definition file for Samsung Camera Interface (FIMC) driver
+ *
+ * Copyright (c) 2010 Samsung Electronics
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef REGS_FIMC_H_
+#define REGS_FIMC_H_
+
+#define S5P_CIOYSA(__x)(0x18 + (__x) * 4)
+#define S5P_CIOCBSA(__x)   (0x28 + (__x) * 4)
+#define S5P_CIOCRSA(__x)   (0x38 + (__x) * 4)
+
+/* Input source format */
+#define S5P_CISRCFMT   0x00
+/* Window offset */
+#define S5P_CIWDOFST   0x04
+/* Global control */
+#define S5P_CIGCTRL0x08
+/* Window offset 2 */
+#define S5P_CIWDOFST2  0x14
+/* Output DMA Y 1st frame start address */
+#define S5P_CIOYSA10x18
+/* Output DMA Y 2nd frame start address */
+#define S5P_CIOYSA20x1c
+/* Output DMA Y 3rd frame start address */
+#define S5P_CIOYSA30x20
+/* Output DMA Y 4th frame start address */
+#define S5P_CIOYSA40x24
+/* Output DMA Cb 1st frame start address */
+#define S5P_CIOCBSA1   0x28
+/* Output DMA Cb 2nd frame start address */
+#define S5P_CIOCBSA2   0x2c
+/* Output DMA Cb 3rd frame start address */
+#define S5P_CIOCBSA3   0x30
+/* Output DMA Cb 4th frame start address */
+#define S5P_CIOCBSA4   0x34
+/* Output DMA Cr 1st frame start address */
+#define S5P_CIOCRSA1   0x38
+/* Output DMA Cr 2nd frame start address */
+#define S5P_CIOCRSA2   0x3c
+/* Output DMA Cr 3rd frame start address */
+#define S5P_CIOCRSA3   0x40
+/* Output DMA Cr 4th frame start address */
+#define S5P_CIOCRSA4   0x44
+/* Target image format */
+#define S5P_CITRGFMT   0x48
+/* Output DMA control */
+#define S5P_CIOCTRL0x4c
+/* Pre-scaler control 1 */
+#define S5P_CISCPRERATIO   0x50
+/* Pre-scaler control 2 */
+#define S5P_CISCPREDST 0x54
+/* Main scaler control */
+#define S5P_CISCCTRL   0x58
+/* Target area */
+#define S5P_CITAREA0x5c
+/* Status */
+#define S5P_CISTATUS   0x64
+/* Image capture enable command */
+#define S5P_CIIMGCPT   0xc0
+/* Capture sequence */
+#define S5P_CICPTSEQ   0xc4
+/* Image effects */
+#define S5P_CIIMGEFF   0xd0
+/* Y frame start address for input DMA */
+#define S5P_CIIYSA00xd4
+/* Cb frame start address for input DMA */
+#define S5P_CIICBSA0   0xd8
+/* Cr frame start address for input DMA */
+#define S5P_CIICRSA0   0xdc
+/* Real input DMA image size */
+#define S5P_CIREAL_ISIZE   0