linux_dsm_epyc7002/arch/arm
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
..
boot ARM: 6739/1: update .gitignore for boot/compressed 2011-02-19 11:24:25 +00:00
common
configs
include/asm ARM: tlb: move noMMU tlb_flush() to asm/tlb.h 2011-02-21 19:29:28 +00:00
kernel ARM: 6745/1: kprobes insn decoding fix 2011-02-21 19:29:29 +00:00
lib
mach-aaec2000
mach-at91
mach-bcmring
mach-clps711x
mach-cns3xxx
mach-davinci davinci: tnetv107x: fix register indexing for GPIOs numbers > 31 2011-02-28 14:53:19 -08:00
mach-dove
mach-ebsa110
mach-ep93xx
mach-footbridge
mach-gemini
mach-h720x
mach-imx
mach-integrator
mach-iop13xx
mach-iop32x
mach-iop33x
mach-ixp4xx
mach-ixp23xx
mach-ixp2000
mach-kirkwood
mach-ks8695
mach-l7200/include/mach
mach-lh7a40x
mach-loki
mach-lpc32xx
mach-mmp
mach-msm
mach-mv78xx0
mach-mx3
mach-mx5
mach-mxc91231
mach-mxs
mach-netx
mach-nomadik
mach-ns9xxx
mach-nuc93x
mach-omap1
mach-omap2
mach-orion5x
mach-pnx4008
mach-pxa
mach-realview
mach-rpc
mach-s3c24a0/include/mach
mach-s3c64xx
mach-s3c2400
mach-s3c2410
mach-s3c2412
mach-s3c2416
mach-s3c2440
mach-s3c2443
mach-s5p64x0 ARM: S5P64X0: Cleanup map.h file 2011-02-17 12:52:52 +09:00
mach-s5p6442 ARM: S5P6442: Cleanup map.h file 2011-02-17 12:52:52 +09:00
mach-s5pc100 ARM: S5PC100: Clenaup map.h file 2011-02-17 12:52:52 +09:00
mach-s5pv210 ARM: S5PV210: Fix regulator names 2011-02-18 17:51:53 +09:00
mach-s5pv310 ARM: S5PV310: Cleanup map.h file 2011-02-17 12:52:52 +09:00
mach-sa1100
mach-shark
mach-shmobile
mach-spear3xx ARM: 6700/1: SPEAr: Correct SOC config base address for spear320 2011-02-21 19:29:24 +00:00
mach-spear6xx
mach-stmp37xx
mach-stmp378x
mach-tcc8k
mach-tegra
mach-u300
mach-ux500
mach-versatile
mach-vexpress
mach-w90x900
mm ARM: 6743/1: errata: interrupted ICALLUIS may prevent completion of broadcasted operation 2011-02-19 11:24:12 +00:00
nwfpe
oprofile
plat-iop
plat-mxc
plat-nomadik
plat-omap
plat-orion
plat-pxa
plat-s3c24xx
plat-s5p ARM: S5P: Fix end address in memory resource information for UART devices 2011-02-17 12:53:36 +09:00
plat-samsung ARM: SAMSUNG: Drop exporting s3c24xx_ts_set_platdata 2011-02-18 17:36:32 +09:00
plat-spear ARM: 6712/1: SPEAr: replace readl(), writel() with relaxed versions in uncompress.h 2011-02-21 19:29:23 +00:00
plat-stmp3xxx
plat-tcc
plat-versatile
tools
vfp
Kconfig ARM: 6743/1: errata: interrupted ICALLUIS may prevent completion of broadcasted operation 2011-02-19 11:24:12 +00:00
Kconfig-nommu
Kconfig.debug
Makefile ARM: 6740/1: Place correctly notes section in the linker script 2011-02-21 19:29:25 +00:00