ARM: sa1111: remove legacy GPIO interfaces
Now that we have migrated all users of the legacy private SA1111 gpio interfaces, we can remove these redundant GPIO interfaces. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
This commit is contained in:
parent
57c1cdce71
commit
e1b0d97845
|
@ -1282,65 +1282,6 @@ int sa1111_get_audio_rate(struct sa1111_dev *sadev)
|
|||
}
|
||||
EXPORT_SYMBOL(sa1111_get_audio_rate);
|
||||
|
||||
void sa1111_set_io_dir(struct sa1111_dev *sadev,
|
||||
unsigned int bits, unsigned int dir,
|
||||
unsigned int sleep_dir)
|
||||
{
|
||||
struct sa1111 *sachip = sa1111_chip_driver(sadev);
|
||||
unsigned long flags;
|
||||
unsigned int val;
|
||||
void __iomem *gpio = sachip->base + SA1111_GPIO;
|
||||
|
||||
#define MODIFY_BITS(port, mask, dir) \
|
||||
if (mask) { \
|
||||
val = readl_relaxed(port); \
|
||||
val &= ~(mask); \
|
||||
val |= (dir) & (mask); \
|
||||
writel_relaxed(val, port); \
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&sachip->lock, flags);
|
||||
MODIFY_BITS(gpio + SA1111_GPIO_PADDR, bits & 15, dir);
|
||||
MODIFY_BITS(gpio + SA1111_GPIO_PBDDR, (bits >> 8) & 255, dir >> 8);
|
||||
MODIFY_BITS(gpio + SA1111_GPIO_PCDDR, (bits >> 16) & 255, dir >> 16);
|
||||
|
||||
MODIFY_BITS(gpio + SA1111_GPIO_PASDR, bits & 15, sleep_dir);
|
||||
MODIFY_BITS(gpio + SA1111_GPIO_PBSDR, (bits >> 8) & 255, sleep_dir >> 8);
|
||||
MODIFY_BITS(gpio + SA1111_GPIO_PCSDR, (bits >> 16) & 255, sleep_dir >> 16);
|
||||
spin_unlock_irqrestore(&sachip->lock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL(sa1111_set_io_dir);
|
||||
|
||||
void sa1111_set_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v)
|
||||
{
|
||||
struct sa1111 *sachip = sa1111_chip_driver(sadev);
|
||||
unsigned long flags;
|
||||
unsigned int val;
|
||||
void __iomem *gpio = sachip->base + SA1111_GPIO;
|
||||
|
||||
spin_lock_irqsave(&sachip->lock, flags);
|
||||
MODIFY_BITS(gpio + SA1111_GPIO_PADWR, bits & 15, v);
|
||||
MODIFY_BITS(gpio + SA1111_GPIO_PBDWR, (bits >> 8) & 255, v >> 8);
|
||||
MODIFY_BITS(gpio + SA1111_GPIO_PCDWR, (bits >> 16) & 255, v >> 16);
|
||||
spin_unlock_irqrestore(&sachip->lock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL(sa1111_set_io);
|
||||
|
||||
void sa1111_set_sleep_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v)
|
||||
{
|
||||
struct sa1111 *sachip = sa1111_chip_driver(sadev);
|
||||
unsigned long flags;
|
||||
unsigned int val;
|
||||
void __iomem *gpio = sachip->base + SA1111_GPIO;
|
||||
|
||||
spin_lock_irqsave(&sachip->lock, flags);
|
||||
MODIFY_BITS(gpio + SA1111_GPIO_PASSR, bits & 15, v);
|
||||
MODIFY_BITS(gpio + SA1111_GPIO_PBSSR, (bits >> 8) & 255, v >> 8);
|
||||
MODIFY_BITS(gpio + SA1111_GPIO_PCSSR, (bits >> 16) & 255, v >> 16);
|
||||
spin_unlock_irqrestore(&sachip->lock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL(sa1111_set_sleep_io);
|
||||
|
||||
/*
|
||||
* Individual device operations.
|
||||
*/
|
||||
|
|
|
@ -433,10 +433,6 @@ int sa1111_check_dma_bug(dma_addr_t addr);
|
|||
int sa1111_driver_register(struct sa1111_driver *);
|
||||
void sa1111_driver_unregister(struct sa1111_driver *);
|
||||
|
||||
void sa1111_set_io_dir(struct sa1111_dev *sadev, unsigned int bits, unsigned int dir, unsigned int sleep_dir);
|
||||
void sa1111_set_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v);
|
||||
void sa1111_set_sleep_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v);
|
||||
|
||||
struct sa1111_platform_data {
|
||||
int irq_base; /* base for cascaded on-chip IRQs */
|
||||
unsigned disable_devs;
|
||||
|
|
Loading…
Reference in New Issue