diff options
author | Andreas Larsson <andreas@gaisler.com> | 2012-11-15 16:50:59 +0100 |
---|---|---|
committer | Wolfram Sang <w.sang@pengutronix.de> | 2012-11-16 18:22:35 +0100 |
commit | a000b8c1e30115800d3de86b4b058cadd9cba59d (patch) | |
tree | 2ddea497c45de6078738975e89b3954e305b7ddd /kernel/sys.c | |
parent | i2c: ocores: Add irq support for sparc (diff) | |
download | linux-a000b8c1e30115800d3de86b4b058cadd9cba59d.tar.xz linux-a000b8c1e30115800d3de86b4b058cadd9cba59d.zip |
i2c: ocores: Add support for the GRLIB port of the controller and use function pointers for getreg and setreg functions
The registers in the GRLIB port of the controller are 32-bit and in big endian
byte order. The PRELOW and PREHIGH registers are merged into one register. The
subsequent registers have their offset decreased accordingly. Hence the register
access needs to be handled in a non-standard manner using custom getreg and
setreg functions.
Add setreg and getreg functions for different register widths and let oc_setreg
and oc_getreg use function pointers to call the appropriate functions.
A type is added as the data of the of match table entries. A new entry with a
different compatible string is added to the table. The type of that entry
triggers usage of the custom grlib functions by setting the setreg and getreg
function pointers.
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Diffstat (limited to 'kernel/sys.c')
0 files changed, 0 insertions, 0 deletions