2016-03-18 01:52:14 +08:00
|
|
|
# Kconfig.dw - DesignWare GPIO configuration options
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Copyright (c) 2016 Intel Corporation
|
|
|
|
#
|
2017-01-19 09:01:01 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2016-03-18 01:52:14 +08:00
|
|
|
#
|
|
|
|
|
|
|
|
menuconfig GPIO_DW
|
|
|
|
prompt "Designware GPIO"
|
|
|
|
default n
|
|
|
|
depends on GPIO
|
|
|
|
bool
|
|
|
|
help
|
|
|
|
Enable driver for Designware GPIO
|
|
|
|
|
|
|
|
if GPIO_DW
|
|
|
|
|
|
|
|
config GPIO_DW_SHARED_IRQ
|
|
|
|
bool
|
|
|
|
default n
|
|
|
|
|
|
|
|
config GPIO_DW_INIT_PRIORITY
|
|
|
|
int
|
|
|
|
default 60
|
|
|
|
prompt "Init priority"
|
|
|
|
help
|
|
|
|
Device driver initialization priority.
|
|
|
|
|
|
|
|
config GPIO_DW_CLOCK_GATE
|
2017-06-13 06:48:38 +08:00
|
|
|
bool "Enable clock gating"
|
2016-03-18 01:52:14 +08:00
|
|
|
select CLOCK_CONTROL
|
|
|
|
default n
|
|
|
|
|
|
|
|
config GPIO_DW_CLOCK_GATE_DRV_NAME
|
|
|
|
string
|
|
|
|
depends on GPIO_DW_CLOCK_GATE
|
|
|
|
default ""
|
|
|
|
|
|
|
|
config GPIO_DW_0
|
2016-05-25 07:17:13 +08:00
|
|
|
bool "Designware GPIO block 0"
|
|
|
|
default n
|
|
|
|
help
|
2016-11-15 19:39:35 +08:00
|
|
|
Include Designware GPIO driver
|
2016-03-18 01:52:14 +08:00
|
|
|
|
2018-05-04 11:02:52 +08:00
|
|
|
if !HAS_DTS
|
2016-03-18 01:52:14 +08:00
|
|
|
config GPIO_DW_0_NAME
|
2016-05-25 07:17:13 +08:00
|
|
|
string "Driver name"
|
|
|
|
depends on GPIO_DW_0
|
|
|
|
default "GPIO_0"
|
2018-05-04 11:02:52 +08:00
|
|
|
endif
|
2016-03-18 01:52:14 +08:00
|
|
|
|
|
|
|
config GPIO_DW_0_CLOCK_GATE_SUBSYS
|
|
|
|
int "Clock controller's subsystem"
|
|
|
|
depends on GPIO_DW_CLOCK_GATE && GPIO_DW_0
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Port 0 Interrupts via"
|
|
|
|
default GPIO_DW_0_IRQ_DIRECT
|
|
|
|
depends on GPIO_DW_0
|
|
|
|
|
|
|
|
config GPIO_DW_0_IRQ_DIRECT
|
|
|
|
bool "Direct Hardware Interrupt"
|
|
|
|
help
|
|
|
|
When interrupts fire, the driver's ISR function is being called directly.
|
|
|
|
|
|
|
|
config GPIO_DW_0_IRQ_SHARED
|
|
|
|
bool "Shared IRQ"
|
|
|
|
depends on SHARED_IRQ
|
|
|
|
select GPIO_DW_SHARED_IRQ
|
|
|
|
help
|
|
|
|
When interrupts fire, the shared IRQ driver is notified. Then the shared IRQ
|
|
|
|
driver dispatches the interrupt to other drivers.
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config GPIO_DW_0_IRQ_SHARED_NAME
|
|
|
|
string "Device name for Shared IRQ"
|
|
|
|
depends on GPIO_DW_0 && GPIO_DW_0_IRQ_SHARED
|
|
|
|
help
|
|
|
|
Specify the device name for the shared IRQ driver. It is used to register
|
|
|
|
this driver with the shared IRQ driver, so interrupts can be dispatched
|
|
|
|
correctly.
|
|
|
|
|
2018-05-04 11:02:52 +08:00
|
|
|
if !HAS_DTS
|
2016-05-07 20:10:52 +08:00
|
|
|
config GPIO_DW_0_IRQ_PRI
|
2016-05-25 07:17:13 +08:00
|
|
|
int "Controller interrupt priority"
|
|
|
|
depends on GPIO_DW_0 && GPIO_DW_0_IRQ_DIRECT
|
|
|
|
help
|
2016-11-15 19:39:35 +08:00
|
|
|
IRQ priority
|
2018-05-04 11:02:52 +08:00
|
|
|
endif
|
2016-03-18 01:52:14 +08:00
|
|
|
|
|
|
|
config GPIO_DW_1
|
2016-05-25 07:17:13 +08:00
|
|
|
bool "Designware GPIO block 1"
|
|
|
|
default n
|
|
|
|
help
|
2016-11-15 19:39:35 +08:00
|
|
|
Include Designware GPIO driver
|
2016-03-18 01:52:14 +08:00
|
|
|
|
2018-05-04 11:02:52 +08:00
|
|
|
if !HAS_DTS
|
2016-03-18 01:52:14 +08:00
|
|
|
config GPIO_DW_1_NAME
|
2016-05-25 07:17:13 +08:00
|
|
|
string "Driver name"
|
|
|
|
depends on GPIO_DW_1
|
|
|
|
default "GPIO_1"
|
2018-05-04 11:02:52 +08:00
|
|
|
endif
|
2016-03-18 01:52:14 +08:00
|
|
|
|
|
|
|
config GPIO_DW_1_CLOCK_GATE_SUBSYS
|
|
|
|
int "Clock controller's subsystem"
|
|
|
|
depends on GPIO_DW_CLOCK_GATE && GPIO_DW_1
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Port 1 Interrupts via"
|
|
|
|
default GPIO_DW_1_IRQ_DIRECT
|
|
|
|
depends on GPIO_DW_1
|
|
|
|
|
|
|
|
config GPIO_DW_1_IRQ_DIRECT
|
|
|
|
bool "Direct Hardware Interrupt"
|
|
|
|
help
|
|
|
|
When interrupts fire, the driver's ISR function is being called directly.
|
|
|
|
|
|
|
|
config GPIO_DW_1_IRQ_SHARED
|
|
|
|
bool "Shared IRQ"
|
|
|
|
depends on SHARED_IRQ
|
|
|
|
select GPIO_DW_SHARED_IRQ
|
|
|
|
help
|
|
|
|
When interrupts fire, the shared IRQ driver is notified. Then the shared IRQ
|
|
|
|
driver dispatches the interrupt to other drivers.
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config GPIO_DW_1_IRQ_SHARED_NAME
|
|
|
|
string "Device name for Shared IRQ"
|
|
|
|
depends on GPIO_DW_1_IRQ_SHARED
|
|
|
|
help
|
|
|
|
Specify the device name for the shared IRQ driver. It is used to register
|
|
|
|
this driver with the shared IRQ driver, so interrupts can be dispatched
|
|
|
|
correctly.
|
|
|
|
|
2018-05-04 11:02:52 +08:00
|
|
|
if !HAS_DTS
|
2016-05-07 20:10:52 +08:00
|
|
|
config GPIO_DW_1_IRQ_PRI
|
2016-05-25 07:17:13 +08:00
|
|
|
int "Controller interrupt priority"
|
|
|
|
depends on GPIO_DW_1 && GPIO_DW_1_IRQ_DIRECT
|
|
|
|
help
|
2016-11-15 19:39:35 +08:00
|
|
|
IRQ priority
|
2018-05-04 11:02:52 +08:00
|
|
|
endif
|
2016-03-18 01:52:14 +08:00
|
|
|
|
gpio: For ARC EM Starterkit, a 4-port GPIO implementation is being added
The file gpio_dw_registers.h already had the 4-port GPIO
registers defined, yet the gpio_dw.c implementation didn't
support it properly. There are 4 ports here, not 2, and only
PORTA can support interrupts and debounce.
On the em_starterkit board, for example, PORTA
has 3 bits for buttons: A, L and R. The other 3 ports should not
be used with interrupts & debounce.
I've re-worked this file to derive the port number from the
base address given. The lower 6 bits are divided by 12 to
derive the port number. From this, the registers EXT_PORTA,
EXT_PORTB, EXT_PORTC or EXT_PORTD can be read.
Also, for those ports that don't support interrupts,
set irq_num to 0, and that code will be avoided. I've verified
that I can access GPIO now correctly on the EM Starterkit. The
em_starterkit board support will be submitted soon but I'm
staging in this change first.
Change-Id: I98dbe083e03e046b40e07b4b14a99a39a6d0f0be
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-17 12:55:01 +08:00
|
|
|
config GPIO_DW_2
|
2016-05-26 09:11:03 +08:00
|
|
|
bool "Designware GPIO block 1"
|
|
|
|
default n
|
|
|
|
help
|
2016-11-15 19:39:35 +08:00
|
|
|
Include Designware GPIO driver
|
gpio: For ARC EM Starterkit, a 4-port GPIO implementation is being added
The file gpio_dw_registers.h already had the 4-port GPIO
registers defined, yet the gpio_dw.c implementation didn't
support it properly. There are 4 ports here, not 2, and only
PORTA can support interrupts and debounce.
On the em_starterkit board, for example, PORTA
has 3 bits for buttons: A, L and R. The other 3 ports should not
be used with interrupts & debounce.
I've re-worked this file to derive the port number from the
base address given. The lower 6 bits are divided by 12 to
derive the port number. From this, the registers EXT_PORTA,
EXT_PORTB, EXT_PORTC or EXT_PORTD can be read.
Also, for those ports that don't support interrupts,
set irq_num to 0, and that code will be avoided. I've verified
that I can access GPIO now correctly on the EM Starterkit. The
em_starterkit board support will be submitted soon but I'm
staging in this change first.
Change-Id: I98dbe083e03e046b40e07b4b14a99a39a6d0f0be
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-17 12:55:01 +08:00
|
|
|
|
2018-05-04 11:02:52 +08:00
|
|
|
if !HAS_DTS
|
gpio: For ARC EM Starterkit, a 4-port GPIO implementation is being added
The file gpio_dw_registers.h already had the 4-port GPIO
registers defined, yet the gpio_dw.c implementation didn't
support it properly. There are 4 ports here, not 2, and only
PORTA can support interrupts and debounce.
On the em_starterkit board, for example, PORTA
has 3 bits for buttons: A, L and R. The other 3 ports should not
be used with interrupts & debounce.
I've re-worked this file to derive the port number from the
base address given. The lower 6 bits are divided by 12 to
derive the port number. From this, the registers EXT_PORTA,
EXT_PORTB, EXT_PORTC or EXT_PORTD can be read.
Also, for those ports that don't support interrupts,
set irq_num to 0, and that code will be avoided. I've verified
that I can access GPIO now correctly on the EM Starterkit. The
em_starterkit board support will be submitted soon but I'm
staging in this change first.
Change-Id: I98dbe083e03e046b40e07b4b14a99a39a6d0f0be
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-17 12:55:01 +08:00
|
|
|
config GPIO_DW_2_NAME
|
2016-05-26 09:11:03 +08:00
|
|
|
string "Driver name"
|
|
|
|
depends on GPIO_DW_2
|
|
|
|
default "GPIO_2"
|
2018-05-04 11:02:52 +08:00
|
|
|
endif
|
gpio: For ARC EM Starterkit, a 4-port GPIO implementation is being added
The file gpio_dw_registers.h already had the 4-port GPIO
registers defined, yet the gpio_dw.c implementation didn't
support it properly. There are 4 ports here, not 2, and only
PORTA can support interrupts and debounce.
On the em_starterkit board, for example, PORTA
has 3 bits for buttons: A, L and R. The other 3 ports should not
be used with interrupts & debounce.
I've re-worked this file to derive the port number from the
base address given. The lower 6 bits are divided by 12 to
derive the port number. From this, the registers EXT_PORTA,
EXT_PORTB, EXT_PORTC or EXT_PORTD can be read.
Also, for those ports that don't support interrupts,
set irq_num to 0, and that code will be avoided. I've verified
that I can access GPIO now correctly on the EM Starterkit. The
em_starterkit board support will be submitted soon but I'm
staging in this change first.
Change-Id: I98dbe083e03e046b40e07b4b14a99a39a6d0f0be
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-17 12:55:01 +08:00
|
|
|
|
|
|
|
config GPIO_DW_2_CLOCK_GATE_SUBSYS
|
|
|
|
int "Clock controller's subsystem"
|
|
|
|
depends on GPIO_DW_CLOCK_GATE && GPIO_DW_2
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Port 1 Interrupts via"
|
|
|
|
default GPIO_DW_2_IRQ_DIRECT
|
|
|
|
depends on GPIO_DW_2
|
|
|
|
|
|
|
|
config GPIO_DW_2_IRQ_DIRECT
|
|
|
|
bool "Direct Hardware Interrupt"
|
|
|
|
help
|
|
|
|
When interrupts fire, the driver's ISR function is being called directly.
|
|
|
|
|
|
|
|
config GPIO_DW_2_IRQ_SHARED
|
|
|
|
bool "Shared IRQ"
|
|
|
|
depends on SHARED_IRQ
|
|
|
|
select GPIO_DW_SHARED_IRQ
|
|
|
|
help
|
|
|
|
When interrupts fire, the shared IRQ driver is notified. Then the shared IRQ
|
|
|
|
driver dispatches the interrupt to other drivers.
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config GPIO_DW_2_IRQ_SHARED_NAME
|
|
|
|
string "Device name for Shared IRQ"
|
|
|
|
depends on GPIO_DW_2_IRQ_SHARED
|
|
|
|
help
|
|
|
|
Specify the device name for the shared IRQ driver. It is used to register
|
|
|
|
this driver with the shared IRQ driver, so interrupts can be dispatched
|
|
|
|
correctly.
|
|
|
|
|
2018-05-04 11:02:52 +08:00
|
|
|
if !HAS_DTS
|
gpio: For ARC EM Starterkit, a 4-port GPIO implementation is being added
The file gpio_dw_registers.h already had the 4-port GPIO
registers defined, yet the gpio_dw.c implementation didn't
support it properly. There are 4 ports here, not 2, and only
PORTA can support interrupts and debounce.
On the em_starterkit board, for example, PORTA
has 3 bits for buttons: A, L and R. The other 3 ports should not
be used with interrupts & debounce.
I've re-worked this file to derive the port number from the
base address given. The lower 6 bits are divided by 12 to
derive the port number. From this, the registers EXT_PORTA,
EXT_PORTB, EXT_PORTC or EXT_PORTD can be read.
Also, for those ports that don't support interrupts,
set irq_num to 0, and that code will be avoided. I've verified
that I can access GPIO now correctly on the EM Starterkit. The
em_starterkit board support will be submitted soon but I'm
staging in this change first.
Change-Id: I98dbe083e03e046b40e07b4b14a99a39a6d0f0be
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-17 12:55:01 +08:00
|
|
|
config GPIO_DW_2_IRQ_PRI
|
2016-05-26 09:11:03 +08:00
|
|
|
int "Controller interrupt priority"
|
|
|
|
depends on GPIO_DW_2 && GPIO_DW_2_IRQ_DIRECT
|
|
|
|
help
|
2016-11-15 19:39:35 +08:00
|
|
|
IRQ priority
|
2018-05-04 11:02:52 +08:00
|
|
|
endif
|
gpio: For ARC EM Starterkit, a 4-port GPIO implementation is being added
The file gpio_dw_registers.h already had the 4-port GPIO
registers defined, yet the gpio_dw.c implementation didn't
support it properly. There are 4 ports here, not 2, and only
PORTA can support interrupts and debounce.
On the em_starterkit board, for example, PORTA
has 3 bits for buttons: A, L and R. The other 3 ports should not
be used with interrupts & debounce.
I've re-worked this file to derive the port number from the
base address given. The lower 6 bits are divided by 12 to
derive the port number. From this, the registers EXT_PORTA,
EXT_PORTB, EXT_PORTC or EXT_PORTD can be read.
Also, for those ports that don't support interrupts,
set irq_num to 0, and that code will be avoided. I've verified
that I can access GPIO now correctly on the EM Starterkit. The
em_starterkit board support will be submitted soon but I'm
staging in this change first.
Change-Id: I98dbe083e03e046b40e07b4b14a99a39a6d0f0be
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-17 12:55:01 +08:00
|
|
|
|
|
|
|
config GPIO_DW_3
|
2016-05-26 09:11:03 +08:00
|
|
|
bool "Designware GPIO block 1"
|
|
|
|
default n
|
|
|
|
help
|
2016-11-15 19:39:35 +08:00
|
|
|
Include Designware GPIO driver
|
gpio: For ARC EM Starterkit, a 4-port GPIO implementation is being added
The file gpio_dw_registers.h already had the 4-port GPIO
registers defined, yet the gpio_dw.c implementation didn't
support it properly. There are 4 ports here, not 2, and only
PORTA can support interrupts and debounce.
On the em_starterkit board, for example, PORTA
has 3 bits for buttons: A, L and R. The other 3 ports should not
be used with interrupts & debounce.
I've re-worked this file to derive the port number from the
base address given. The lower 6 bits are divided by 12 to
derive the port number. From this, the registers EXT_PORTA,
EXT_PORTB, EXT_PORTC or EXT_PORTD can be read.
Also, for those ports that don't support interrupts,
set irq_num to 0, and that code will be avoided. I've verified
that I can access GPIO now correctly on the EM Starterkit. The
em_starterkit board support will be submitted soon but I'm
staging in this change first.
Change-Id: I98dbe083e03e046b40e07b4b14a99a39a6d0f0be
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-17 12:55:01 +08:00
|
|
|
|
2018-05-04 11:02:52 +08:00
|
|
|
if !HAS_DTS
|
gpio: For ARC EM Starterkit, a 4-port GPIO implementation is being added
The file gpio_dw_registers.h already had the 4-port GPIO
registers defined, yet the gpio_dw.c implementation didn't
support it properly. There are 4 ports here, not 2, and only
PORTA can support interrupts and debounce.
On the em_starterkit board, for example, PORTA
has 3 bits for buttons: A, L and R. The other 3 ports should not
be used with interrupts & debounce.
I've re-worked this file to derive the port number from the
base address given. The lower 6 bits are divided by 12 to
derive the port number. From this, the registers EXT_PORTA,
EXT_PORTB, EXT_PORTC or EXT_PORTD can be read.
Also, for those ports that don't support interrupts,
set irq_num to 0, and that code will be avoided. I've verified
that I can access GPIO now correctly on the EM Starterkit. The
em_starterkit board support will be submitted soon but I'm
staging in this change first.
Change-Id: I98dbe083e03e046b40e07b4b14a99a39a6d0f0be
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-17 12:55:01 +08:00
|
|
|
config GPIO_DW_3_NAME
|
2016-05-26 09:11:03 +08:00
|
|
|
string "Driver name"
|
|
|
|
depends on GPIO_DW_3
|
|
|
|
default "GPIO_3"
|
2018-05-04 11:02:52 +08:00
|
|
|
endif
|
gpio: For ARC EM Starterkit, a 4-port GPIO implementation is being added
The file gpio_dw_registers.h already had the 4-port GPIO
registers defined, yet the gpio_dw.c implementation didn't
support it properly. There are 4 ports here, not 2, and only
PORTA can support interrupts and debounce.
On the em_starterkit board, for example, PORTA
has 3 bits for buttons: A, L and R. The other 3 ports should not
be used with interrupts & debounce.
I've re-worked this file to derive the port number from the
base address given. The lower 6 bits are divided by 12 to
derive the port number. From this, the registers EXT_PORTA,
EXT_PORTB, EXT_PORTC or EXT_PORTD can be read.
Also, for those ports that don't support interrupts,
set irq_num to 0, and that code will be avoided. I've verified
that I can access GPIO now correctly on the EM Starterkit. The
em_starterkit board support will be submitted soon but I'm
staging in this change first.
Change-Id: I98dbe083e03e046b40e07b4b14a99a39a6d0f0be
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-17 12:55:01 +08:00
|
|
|
|
|
|
|
config GPIO_DW_3_CLOCK_GATE_SUBSYS
|
|
|
|
int "Clock controller's subsystem"
|
|
|
|
depends on GPIO_DW_CLOCK_GATE && GPIO_DW_3
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Port 1 Interrupts via"
|
|
|
|
default GPIO_DW_3_IRQ_DIRECT
|
|
|
|
depends on GPIO_DW_3
|
|
|
|
|
|
|
|
config GPIO_DW_3_IRQ_DIRECT
|
|
|
|
bool "Direct Hardware Interrupt"
|
|
|
|
help
|
|
|
|
When interrupts fire, the driver's ISR function is being called directly.
|
|
|
|
|
|
|
|
config GPIO_DW_3_IRQ_SHARED
|
|
|
|
bool "Shared IRQ"
|
|
|
|
depends on SHARED_IRQ
|
|
|
|
select GPIO_DW_SHARED_IRQ
|
|
|
|
help
|
|
|
|
When interrupts fire, the shared IRQ driver is notified. Then the shared IRQ
|
|
|
|
driver dispatches the interrupt to other drivers.
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config GPIO_DW_3_IRQ_SHARED_NAME
|
|
|
|
string "Device name for Shared IRQ"
|
|
|
|
depends on GPIO_DW_3_IRQ_SHARED
|
|
|
|
help
|
|
|
|
Specify the device name for the shared IRQ driver. It is used to register
|
|
|
|
this driver with the shared IRQ driver, so interrupts can be dispatched
|
|
|
|
correctly.
|
|
|
|
|
2018-05-04 11:02:52 +08:00
|
|
|
if !HAS_DTS
|
gpio: For ARC EM Starterkit, a 4-port GPIO implementation is being added
The file gpio_dw_registers.h already had the 4-port GPIO
registers defined, yet the gpio_dw.c implementation didn't
support it properly. There are 4 ports here, not 2, and only
PORTA can support interrupts and debounce.
On the em_starterkit board, for example, PORTA
has 3 bits for buttons: A, L and R. The other 3 ports should not
be used with interrupts & debounce.
I've re-worked this file to derive the port number from the
base address given. The lower 6 bits are divided by 12 to
derive the port number. From this, the registers EXT_PORTA,
EXT_PORTB, EXT_PORTC or EXT_PORTD can be read.
Also, for those ports that don't support interrupts,
set irq_num to 0, and that code will be avoided. I've verified
that I can access GPIO now correctly on the EM Starterkit. The
em_starterkit board support will be submitted soon but I'm
staging in this change first.
Change-Id: I98dbe083e03e046b40e07b4b14a99a39a6d0f0be
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-17 12:55:01 +08:00
|
|
|
config GPIO_DW_3_IRQ_PRI
|
2016-05-26 09:11:03 +08:00
|
|
|
int "Controller interrupt priority"
|
|
|
|
depends on GPIO_DW_3 && GPIO_DW_3_IRQ_DIRECT
|
|
|
|
help
|
2018-02-15 21:36:16 +08:00
|
|
|
IRQ priority
|
2018-05-04 11:02:52 +08:00
|
|
|
endif
|
gpio: For ARC EM Starterkit, a 4-port GPIO implementation is being added
The file gpio_dw_registers.h already had the 4-port GPIO
registers defined, yet the gpio_dw.c implementation didn't
support it properly. There are 4 ports here, not 2, and only
PORTA can support interrupts and debounce.
On the em_starterkit board, for example, PORTA
has 3 bits for buttons: A, L and R. The other 3 ports should not
be used with interrupts & debounce.
I've re-worked this file to derive the port number from the
base address given. The lower 6 bits are divided by 12 to
derive the port number. From this, the registers EXT_PORTA,
EXT_PORTB, EXT_PORTC or EXT_PORTD can be read.
Also, for those ports that don't support interrupts,
set irq_num to 0, and that code will be avoided. I've verified
that I can access GPIO now correctly on the EM Starterkit. The
em_starterkit board support will be submitted soon but I'm
staging in this change first.
Change-Id: I98dbe083e03e046b40e07b4b14a99a39a6d0f0be
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-17 12:55:01 +08:00
|
|
|
|
2016-03-18 01:52:14 +08:00
|
|
|
endif # GPIO_DW
|