2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-20 16:46:23 +08:00
linux-next/arch/arm/mach-davinci
Hirosh Dabui c284d9fa48 davinci: tnetv107x: fix register indexing for GPIOs numbers > 31
This patch fix a bug in the register indexing for GPIOs numbers >  31
to get the relevant hardware registers of tnetv107x to control the GPIOs.

In the structure tnetv107x_gpio_regs:

struct tnetv107x_gpio_regs {
            u32     idver;
            u32     data_in[3];
            u32     data_out[3];
            u32     direction[3];
            u32     enable[3];
};

The GPIO hardware register addresses of tnetv107x are stored.
The chip implements 3 registers of each entity to serve 96 GPIOs,
each register provides a subset of 32 GPIOs.
The driver provides these macros: gpio_reg_set_bit, gpio_reg_get_bit
and gpio_reg_clear_bit.

The bug implied the use of macros to access the relevant hardware
register e.g. the driver code used the macro like this:
'gpio_reg_clear_bit(&reg->data_out, gpio)'

But it has to be used like this:
'gpio_reg_clear_bit(reg->data_out, gpio)'.

The different results are shown here:
- &reg->data_out + 1 (it will add the full array size of data_out i.e. 12 bytes)
- reg->data_out + 1 (it will increment only the size of data_out i.e. only 4 bytes)

Acked-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Hirosh Dabui <hirosh.dabui@snom.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-02-28 14:53:19 -08:00
..
include/mach Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6 2011-01-07 17:08:46 -08:00
aemif.c davinci: aemif: signedness bug in davinci_aemif_setup_timing() 2010-12-10 07:33:51 -08:00
board-da830-evm.c Merge branch 'davinci-next' into davinci-for-linus 2010-10-21 11:21:55 -07:00
board-da850-evm.c davinci: am18x/da850/omap-l138 evm: add support for higher speed grades 2010-12-22 11:45:29 -08:00
board-dm355-evm.c arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
board-dm355-leopard.c arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
board-dm365-evm.c Merge branch 'davinci-next' into davinci-for-linus 2010-10-21 11:21:55 -07:00
board-dm644x-evm.c Merge branch 'davinci-next' into davinci-for-linus 2010-10-21 11:21:55 -07:00
board-dm646x-evm.c Merge branch 'davinci-next' into davinci-for-linus 2010-10-21 11:21:55 -07:00
board-mityomapl138.c davinci: fix remaining board support after io_pgoffst removal 2010-10-21 17:03:36 -07:00
board-neuros-osd2.c Merge branch 'davinci-next' into davinci-for-linus 2010-10-21 11:21:55 -07:00
board-omapl138-hawk.c davinci: fix remaining board support after io_pgoffst removal 2010-10-21 17:03:36 -07:00
board-sffsdr.c Merge branch 'davinci-next' into davinci-for-linus 2010-10-21 11:21:55 -07:00
board-tnetv107x-evm.c Merge branch 'davinci-next' into davinci-for-linus 2010-10-21 11:21:55 -07:00
cdce949.c davinci: misc cleanups from sparse 2010-05-06 15:02:01 -07:00
clock.c davinci: use divide ratio limits from pll_data 2010-12-10 07:33:49 -08:00
clock.h ARM: 6483/1: arm & sh: factorised duplicated clkdev.c 2010-11-26 10:51:04 +00:00
common.c Davinci: aintc/cpintc - use ioremap() 2010-05-13 10:05:28 -07:00
cp_intc.c ARM: davinci: irq_data conversion. 2011-01-13 17:18:26 +01:00
cpufreq.c davinci: cpufreq: add support for keeping an additional clock constant 2010-09-24 07:40:25 -07:00
cpuidle.c davinci: cpuidle: move mapping of DDR2 controller registers out of driver 2010-02-04 13:29:38 -08:00
da830.c davinci: da8xx: sparse cleanup: remove duplicate entries in irq priorities 2010-08-05 09:58:23 -07:00
da850.c davinci: am18x/da850/omap-l138: add support for higher speed grades 2010-12-22 11:45:29 -08:00
devices-da8xx.c davinci: da8xx/omap-l1x: add platform device for davinci-pcm-audio 2011-02-28 14:53:19 -08:00
devices-tnetv107x.c davinci: minor tnetv107x clock tree fixes 2010-12-10 07:33:50 -08:00
devices.c Merge branch 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci 2010-10-25 10:59:31 -07:00
dm355.c Merge branch 'for-grant' of git://arago-project.org/git/projects/linux-davinci into spi/next 2010-12-29 00:47:38 -07:00
dm365.c Merge branch 'for-grant' of git://arago-project.org/git/projects/linux-davinci into spi/next 2010-12-29 00:47:38 -07:00
dm644x.c ASoC: davinci: fixes for multi-component 2010-11-17 18:36:40 +00:00
dm646x.c Merge branch 'davinci-next' into davinci-for-linus 2010-10-21 11:21:55 -07:00
dma.c arm: mach-davinci: check irq2ctlr() result 2010-09-24 07:40:25 -07:00
gpio-tnetv107x.c davinci: tnetv107x: fix register indexing for GPIOs numbers > 31 2011-02-28 14:53:19 -08:00
gpio.c ARM: davinci: irq_data conversion. 2011-01-13 17:18:26 +01:00
io.c Davinci: iotable based ioremap() interception 2010-05-13 10:05:31 -07:00
irq.c ARM: davinci: irq_data conversion. 2011-01-13 17:18:26 +01:00
Kconfig da850-evm: KEYBOARD_GPIO_POLLED Kconfig conditional 2010-12-22 11:45:20 -08:00
Makefile davinci: Initial support for Omapl138-Hawkboard 2010-09-24 07:40:32 -07:00
Makefile.boot davinci: da8xx: Add base DA830/OMAP-L137 SoC support 2009-08-26 10:56:59 +03:00
mux.c Davinci: pinmux - use ioremap() 2010-05-13 10:05:29 -07:00
mux.h Davinci: eliminate pinmux offset verbosity 2010-05-06 15:02:09 -07:00
pm.c suspend: constify platform_suspend_ops 2010-11-16 14:14:02 +01:00
psc.c davinci: psc: simplify if-statement 2010-12-10 07:33:50 -08:00
serial.c Davinci: serial - conditional reset via pwremu 2010-05-06 15:02:10 -07:00
sleep.S davinci: add power management support 2010-02-04 13:29:55 -08:00
sram.c DaVinci: remove unneeded #include's 2009-11-25 10:21:31 -08:00
time.c Merge branch 'devel-stable' into devel 2011-01-06 22:33:32 +00:00
tnetv107x.c davinci: minor tnetv107x clock tree fixes 2010-12-10 07:33:50 -08:00
usb.c DA8xx: assign name to MUSB IRQ resource 2010-12-11 12:15:53 +02:00