Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

-63
-59
arch/arm/common/sa1111.c
··· 1282 1282 } 1283 1283 EXPORT_SYMBOL(sa1111_get_audio_rate); 1284 1284 1285 - void sa1111_set_io_dir(struct sa1111_dev *sadev, 1286 - unsigned int bits, unsigned int dir, 1287 - unsigned int sleep_dir) 1288 - { 1289 - struct sa1111 *sachip = sa1111_chip_driver(sadev); 1290 - unsigned long flags; 1291 - unsigned int val; 1292 - void __iomem *gpio = sachip->base + SA1111_GPIO; 1293 - 1294 - #define MODIFY_BITS(port, mask, dir) \ 1295 - if (mask) { \ 1296 - val = readl_relaxed(port); \ 1297 - val &= ~(mask); \ 1298 - val |= (dir) & (mask); \ 1299 - writel_relaxed(val, port); \ 1300 - } 1301 - 1302 - spin_lock_irqsave(&sachip->lock, flags); 1303 - MODIFY_BITS(gpio + SA1111_GPIO_PADDR, bits & 15, dir); 1304 - MODIFY_BITS(gpio + SA1111_GPIO_PBDDR, (bits >> 8) & 255, dir >> 8); 1305 - MODIFY_BITS(gpio + SA1111_GPIO_PCDDR, (bits >> 16) & 255, dir >> 16); 1306 - 1307 - MODIFY_BITS(gpio + SA1111_GPIO_PASDR, bits & 15, sleep_dir); 1308 - MODIFY_BITS(gpio + SA1111_GPIO_PBSDR, (bits >> 8) & 255, sleep_dir >> 8); 1309 - MODIFY_BITS(gpio + SA1111_GPIO_PCSDR, (bits >> 16) & 255, sleep_dir >> 16); 1310 - spin_unlock_irqrestore(&sachip->lock, flags); 1311 - } 1312 - EXPORT_SYMBOL(sa1111_set_io_dir); 1313 - 1314 - void sa1111_set_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v) 1315 - { 1316 - struct sa1111 *sachip = sa1111_chip_driver(sadev); 1317 - unsigned long flags; 1318 - unsigned int val; 1319 - void __iomem *gpio = sachip->base + SA1111_GPIO; 1320 - 1321 - spin_lock_irqsave(&sachip->lock, flags); 1322 - MODIFY_BITS(gpio + SA1111_GPIO_PADWR, bits & 15, v); 1323 - MODIFY_BITS(gpio + SA1111_GPIO_PBDWR, (bits >> 8) & 255, v >> 8); 1324 - MODIFY_BITS(gpio + SA1111_GPIO_PCDWR, (bits >> 16) & 255, v >> 16); 1325 - spin_unlock_irqrestore(&sachip->lock, flags); 1326 - } 1327 - EXPORT_SYMBOL(sa1111_set_io); 1328 - 1329 - void sa1111_set_sleep_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v) 1330 - { 1331 - struct sa1111 *sachip = sa1111_chip_driver(sadev); 1332 - unsigned long flags; 1333 - unsigned int val; 1334 - void __iomem *gpio = sachip->base + SA1111_GPIO; 1335 - 1336 - spin_lock_irqsave(&sachip->lock, flags); 1337 - MODIFY_BITS(gpio + SA1111_GPIO_PASSR, bits & 15, v); 1338 - MODIFY_BITS(gpio + SA1111_GPIO_PBSSR, (bits >> 8) & 255, v >> 8); 1339 - MODIFY_BITS(gpio + SA1111_GPIO_PCSSR, (bits >> 16) & 255, v >> 16); 1340 - spin_unlock_irqrestore(&sachip->lock, flags); 1341 - } 1342 - EXPORT_SYMBOL(sa1111_set_sleep_io); 1343 - 1344 1285 /* 1345 1286 * Individual device operations. 1346 1287 */
-4
arch/arm/include/asm/hardware/sa1111.h
··· 433 433 int sa1111_driver_register(struct sa1111_driver *); 434 434 void sa1111_driver_unregister(struct sa1111_driver *); 435 435 436 - void sa1111_set_io_dir(struct sa1111_dev *sadev, unsigned int bits, unsigned int dir, unsigned int sleep_dir); 437 - void sa1111_set_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v); 438 - void sa1111_set_sleep_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v); 439 - 440 436 struct sa1111_platform_data { 441 437 int irq_base; /* base for cascaded on-chip IRQs */ 442 438 unsigned disable_devs;