Skip to contentSkip to conversation

BCM47xx: Use the new SSB GPIO API

PATCH New Aurelien Jarno 1 participant 1 message Feb 24, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 BCM47xx: Use the new SSB GPIO API

This patch simplifies the BCM47xx GPIO code by using the new SSB GPIO API, which does a lot things that were implemented directly in the BCM47xx code.

---
 arch/mips/Kconfig                    |    1 +
 arch/mips/bcm47xx/gpio.c             |   81 ++++++++++++---------------------
 arch/mips/bcm47xx/setup.c            |    5 +-
 include/asm-mips/mach-bcm47xx/gpio.h |   41 ++++++++---------
 4 files changed, 54 insertions(+), 74 deletions(-)
arch/mips/Kconfig +1 -0
index ade230d..02602e1 100644
@@ -52,6 +52,7 @@ config BCM47XX
 	select SSB
 	select SSB_DRIVER_MIPS
 	select SSB_DRIVER_EXTIF
+	select SSB_EMBEDDED
 	select SSB_PCICORE_HOSTMODE if PCI
 	select GENERIC_GPIO
 	select SYS_HAS_EARLY_PRINTK
arch/mips/bcm47xx/gpio.c +30 -51

98 lines not on this page · raw message

arch/mips/bcm47xx/setup.c +3 -2
index 8d36f18..2f580fa 100644
@@ -27,6 +27,7 @@
 
 #include <linux/types.h>
 #include <linux/ssb/ssb.h>
+#include <linux/ssb/ssb_embedded.h>
 #include <asm/bootinfo.h>
 #include <asm/reboot.h>
 #include <asm/time.h>
@@ -41,7 +42,7 @@ static void bcm47xx_machine_restart(char *command)
 	printk(KERN_ALERT "Please stand by while rebooting the system...\n");
 	local_irq_disable();
 	/* Set the watchdog timer to reset immediately */
-	ssb_chipco_watchdog_timer_set(&ssb_bcm47xx.chipco, 1);
+	ssb_watchdog_timer_set(&ssb_bcm47xx, 1);
 	while (1)
 		cpu_relax();
 }
@@ -50,7 +51,7 @@ static void bcm47xx_machine_halt(void)
 {
 	/* Disable interrupts and watchdog and spin forever */
 	local_irq_disable();
-	ssb_chipco_watchdog_timer_set(&ssb_bcm47xx.chipco, 0);
+	ssb_watchdog_timer_set(&ssb_bcm47xx, 0);
 	while (1)
 		cpu_relax();
 }
include/asm-mips/mach-bcm47xx/gpio.h +20 -21

67 lines not on this page · raw message

Signature · 8 lines
1.5.4.2


-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net