Skip to content

bcm2708: remove NEED_MACH_GPIO_H #495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ config ARCH_BCM2708
select ARM_AMBA
select HAVE_CLK
select HAVE_SCHED_CLOCK
select NEED_MACH_GPIO_H
select NEED_MACH_MEMORY_H
select CLKDEV_LOOKUP
select ARCH_HAS_CPUFREQ
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-bcm2708/bcm2708_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <mach/gpio.h>
#include <mach/gpio_irq.h>
#include <linux/gpio.h>
#include <linux/platform_device.h>
#include <mach/platform.h>
Expand Down
6 changes: 2 additions & 4 deletions arch/arm/mach-bcm2708/include/mach/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
#ifndef __ASM_ARCH_GPIO_H
#define __ASM_ARCH_GPIO_H

#define ARCH_NR_GPIOS 54 // number of gpio lines

#define __bcm2708_gpio_to_irq(x) ((x) + GPIO_IRQ_START)
#define __bcm2708_irq_to_gpio(x) ((x) - GPIO_IRQ_START)
#error Use <mach/gpio_irq.h> and __bcm2708_gpio_to_irq() to achieve what you want. <mach/gpio.h> used to contain gpio_to_irq() which conflicted with the gpio subsystem function of the same name in subtle ways.

#endif

17 changes: 17 additions & 0 deletions arch/arm/mach-bcm2708/include/mach/gpio_irq.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* arch/arm/mach-bcm2708/include/mach/gpio_irq.h
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/

#ifndef __ASM_ARCH_GPIO_IRQ_H
#define __ASM_ARCH_GPIO_IRQ_H

#define ARCH_NR_GPIOS 54 // number of gpio lines

#define __bcm2708_gpio_to_irq(x) ((x) + GPIO_IRQ_START)
#define __bcm2708_irq_to_gpio(x) ((x) - GPIO_IRQ_START)

#endif