Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192002
b: refs/heads/master
c: 1635ca4
h: refs/heads/master
v: v3
  • Loading branch information
Ben Dooks committed May 18, 2010
1 parent 0f5ba07 commit 9d4ccca
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7987bd7a7051c979f7b9b572898f92dbef6aaeb1
refs/heads/master: 1635ca4aaf835794401da33079e50ce1d6bbb5d0
1 change: 0 additions & 1 deletion trunk/arch/arm/mach-s3c2410/include/mach/gpio-nrs.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#define S3C2410_GPIONO(bank,offset) ((bank) + (offset))

#define S3C2410_GPIO_BANKC (32*2)
#define S3C2410_GPIO_BANKG (32*6)
#define S3C2410_GPIO_BANKH (32*7)

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-s3c2410/include/mach/gpio-track.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static inline struct s3c_gpio_chip *s3c_gpiolib_getchip(unsigned int pin)
return NULL;

chip = &s3c24xx_gpios[pin/32];
return (S3C2410_GPIO_OFFSET(pin) < chip->chip.ngpio) ? chip : NULL;
return ((pin - chip->chip.base) < chip->chip.ngpio) ? chip : NULL;
}

#endif /* __ASM_ARCH_GPIO_CORE_H */
22 changes: 2 additions & 20 deletions trunk/arch/arm/mach-s3c2410/include/mach/regs-gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,11 @@
#include <mach/gpio-nrs.h>

#ifdef CONFIG_CPU_S3C2400
#define S3C24XX_GPIO_BASE(x) S3C2400_GPIO_BASE(x)
#define S3C24XX_MISCCR S3C2400_MISCCR
#define S3C24XX_MISCCR S3C2400_MISCCR
#else
#define S3C24XX_GPIO_BASE(x) S3C2410_GPIO_BASE(x)
#define S3C24XX_MISCCR S3C24XX_GPIOREG2(0x80)
#define S3C24XX_MISCCR S3C24XX_GPIOREG2(0x80)
#endif /* CONFIG_CPU_S3C2400 */


/* S3C2400 doesn't have a 1:1 mapping to S3C2410 gpio base pins */

#define S3C2400_BANKNUM(pin) (((pin) & ~31) / 32)
#define S3C2400_BASEA2B(pin) ((((pin) & ~31) >> 2))
#define S3C2400_BASEC2H(pin) ((S3C2400_BANKNUM(pin) * 10) + \
(2 * (S3C2400_BANKNUM(pin)-2)))

#define S3C2400_GPIO_BASE(pin) (pin < S3C2410_GPIO_BANKC ? \
S3C2400_BASEA2B(pin)+S3C24XX_VA_GPIO : \
S3C2400_BASEC2H(pin)+S3C24XX_VA_GPIO)


#define S3C2410_GPIO_BASE(pin) ((((pin) & ~31) >> 1) + S3C24XX_VA_GPIO)
#define S3C2410_GPIO_OFFSET(pin) ((pin) & 31)

/* general configuration options */

#define S3C2410_GPIO_LEAVE (0xFFFFFFFF)
Expand Down

0 comments on commit 9d4ccca

Please sign in to comment.