Commit 629de518 authored by Eugen Hristev's avatar Eugen Hristev Committed by Mauro Carvalho Chehab

media: atmel: atmel-isc: add his_entry to register offsets

Add his_entry to the reg offsets struct.
This will allow different products to have a different reg offset for this
particular module.
Signed-off-by: default avatarEugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent d5147006
...@@ -1684,7 +1684,8 @@ static void isc_hist_count(struct isc_device *isc, u32 *min, u32 *max) ...@@ -1684,7 +1684,8 @@ static void isc_hist_count(struct isc_device *isc, u32 *min, u32 *max)
*min = 0; *min = 0;
*max = HIST_ENTRIES; *max = HIST_ENTRIES;
regmap_bulk_read(regmap, ISC_HIS_ENTRY, hist_entry, HIST_ENTRIES); regmap_bulk_read(regmap, ISC_HIS_ENTRY + isc->offsets.his_entry,
hist_entry, HIST_ENTRIES);
*hist_count = 0; *hist_count = 0;
/* /*
......
...@@ -300,6 +300,8 @@ ...@@ -300,6 +300,8 @@
/* Version Register */ /* Version Register */
#define ISC_VERSION 0x0000040c #define ISC_VERSION 0x0000040c
/* Offset for version register specific to sama5d2 product */
#define ISC_SAMA5D2_HIS_ENTRY_OFFSET 0
/* Histogram Entry */ /* Histogram Entry */
#define ISC_HIS_ENTRY 0x00000410 #define ISC_HIS_ENTRY 0x00000410
......
...@@ -154,6 +154,7 @@ struct isc_ctrls { ...@@ -154,6 +154,7 @@ struct isc_ctrls {
* @his: Offset for the HIS related registers * @his: Offset for the HIS related registers
* @dma: Offset for the DMA related registers * @dma: Offset for the DMA related registers
* @version: Offset for the version register * @version: Offset for the version register
* @his_entry: Offset for the HIS entries registers
*/ */
struct isc_reg_offsets { struct isc_reg_offsets {
u32 csc; u32 csc;
...@@ -164,6 +165,7 @@ struct isc_reg_offsets { ...@@ -164,6 +165,7 @@ struct isc_reg_offsets {
u32 his; u32 his;
u32 dma; u32 dma;
u32 version; u32 version;
u32 his_entry;
}; };
/* /*
......
...@@ -239,6 +239,7 @@ static int atmel_isc_probe(struct platform_device *pdev) ...@@ -239,6 +239,7 @@ static int atmel_isc_probe(struct platform_device *pdev)
isc->offsets.his = ISC_SAMA5D2_HIS_OFFSET; isc->offsets.his = ISC_SAMA5D2_HIS_OFFSET;
isc->offsets.dma = ISC_SAMA5D2_DMA_OFFSET; isc->offsets.dma = ISC_SAMA5D2_DMA_OFFSET;
isc->offsets.version = ISC_SAMA5D2_VERSION_OFFSET; isc->offsets.version = ISC_SAMA5D2_VERSION_OFFSET;
isc->offsets.his_entry = ISC_SAMA5D2_HIS_ENTRY_OFFSET;
/* sama5d2-isc - 8 bits per beat */ /* sama5d2-isc - 8 bits per beat */
isc->dcfg = ISC_DCFG_YMBSIZE_BEATS8 | ISC_DCFG_CMBSIZE_BEATS8; isc->dcfg = ISC_DCFG_YMBSIZE_BEATS8 | ISC_DCFG_CMBSIZE_BEATS8;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment