Skip to content

Commit

Permalink
CRISv32: Add GPIO driver to the default configs
Browse files Browse the repository at this point in the history
Fix a number of small issues visible when GPIO is enabled:

- Correct missing default for !ETRAXFS in Kconfig
- Remove information on number of bits for some Kconfigs
  related to the GPIO, they are different in ETRAX FS and ARTPEC-3
- Fix compile warning in ARTPEC-3 GPIO driver

Signed-off-by: Jesper Nilsson <[email protected]>
  • Loading branch information
Jesper Nilsson committed Sep 4, 2015
1 parent 9423017 commit 939b83f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
16 changes: 8 additions & 8 deletions arch/cris/arch-v32/drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ config ETRAX_PA_CHANGEABLE_DIR
default "0x00" if ETRAXFS
default "0x00000000" if !ETRAXFS
help
This is a bitmask (8 bits) with information of what bits in PA that a
This is a bitmask with information of what bits in PA that a
user can change direction on using ioctl's.
Bit set = changeable.
You probably want 0 here, but it depends on your hardware.
Expand All @@ -213,7 +213,7 @@ config ETRAX_PA_CHANGEABLE_BITS
default "0x00" if ETRAXFS
default "0x00000000" if !ETRAXFS
help
This is a bitmask (8 bits) with information of what bits in PA
This is a bitmask with information of what bits in PA
that a user can change the value on using ioctl's.
Bit set = changeable.

Expand All @@ -223,7 +223,7 @@ config ETRAX_PB_CHANGEABLE_DIR
default "0x00000" if ETRAXFS
default "0x00000000" if !ETRAXFS
help
This is a bitmask (18 bits) with information of what bits in PB
This is a bitmask with information of what bits in PB
that a user can change direction on using ioctl's.
Bit set = changeable.
You probably want 0 here, but it depends on your hardware.
Expand All @@ -234,7 +234,7 @@ config ETRAX_PB_CHANGEABLE_BITS
default "0x00000" if ETRAXFS
default "0x00000000" if !ETRAXFS
help
This is a bitmask (18 bits) with information of what bits in PB
This is a bitmask with information of what bits in PB
that a user can change the value on using ioctl's.
Bit set = changeable.

Expand All @@ -244,7 +244,7 @@ config ETRAX_PC_CHANGEABLE_DIR
default "0x00000" if ETRAXFS
default "0x00000000" if !ETRAXFS
help
This is a bitmask (18 bits) with information of what bits in PC
This is a bitmask with information of what bits in PC
that a user can change direction on using ioctl's.
Bit set = changeable.
You probably want 0 here, but it depends on your hardware.
Expand All @@ -253,9 +253,9 @@ config ETRAX_PC_CHANGEABLE_BITS
hex "PC user changeable bits mask"
depends on ETRAX_GPIO
default "0x00000" if ETRAXFS
default "0x00000000" if ETRAXFS
default "0x00000000" if !ETRAXFS
help
This is a bitmask (18 bits) with information of what bits in PC
This is a bitmask with information of what bits in PC
that a user can change the value on using ioctl's.
Bit set = changeable.

Expand All @@ -264,7 +264,7 @@ config ETRAX_PD_CHANGEABLE_DIR
depends on ETRAX_GPIO && ETRAXFS
default "0x00000"
help
This is a bitmask (18 bits) with information of what bits in PD
This is a bitmask with information of what bits in PD
that a user can change direction on using ioctl's.
Bit set = changeable.
You probably want 0x00000 here, but it depends on your hardware.
Expand Down
4 changes: 2 additions & 2 deletions arch/cris/arch-v32/drivers/mach-a3/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ static void __init virtual_gpio_init(void)

static int __init gpio_init(void)
{
int res;
int res, res2;

printk(KERN_INFO "ETRAX FS GPIO driver v2.7, (c) 2003-2008 "
"Axis Communications AB\n");
Expand All @@ -977,7 +977,7 @@ static int __init gpio_init(void)
CRIS_LED_DISK_READ(0);
CRIS_LED_DISK_WRITE(0);

int res2 = request_irq(GIO_INTR_VECT, gpio_interrupt,
res2 = request_irq(GIO_INTR_VECT, gpio_interrupt,
IRQF_SHARED, "gpio", &alarmlist);
if (res2) {
printk(KERN_ERR "err: irq for gpio\n");
Expand Down
5 changes: 1 addition & 4 deletions arch/cris/configs/artpec_3_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ CONFIG_ETRAX_FAST_TIMER=y
CONFIG_CRIS_MACH_ARTPEC3=y
CONFIG_ETRAX_DRAM_SIZE=32
CONFIG_ETRAX_FLASH1_SIZE=4
CONFIG_ETRAX_DEF_GIO_PA_OE=1c
CONFIG_ETRAX_DEF_GIO_PA_OUT=00
CONFIG_ETRAX_DEF_GIO_PB_OE=00000
CONFIG_ETRAX_DEF_GIO_PB_OUT=00000
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
Expand All @@ -42,3 +38,4 @@ CONFIG_JFFS2_FS=y
CONFIG_CRAMFS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_ETRAX_GPIO=y
1 change: 1 addition & 0 deletions arch/cris/configs/etraxfs_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ CONFIG_JFFS2_FS=y
CONFIG_CRAMFS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_ETRAX_GPIO=y

0 comments on commit 939b83f

Please sign in to comment.