arm/pxa/spitz.h rewritten and commented
Subsystems (5)
PATCH 1/1 arm/pxa/spitz.h rewritten and commented
Here is a rewrite of spitz.h, which includes comments documenting function of particular GPIO pins.
spitz_h_rewrite.patch provides:
- no changes in compiled code
- partial spitz.h rewrite:
* organized by function
* describes complete GPIO pinout
* comments added
* removed defines cloning pxa-regs.h
- prefer generic pxa-regs.h GPIO if available
- use GPIO names instead of numbers
Thanks to Trisoft for providing needed information.
arch/arm/mach-pxa/spitz_pm.c +4 -4
@@ -110,9 +110,9 @@ static void spitz_presuspend(void)pxa_gpio_mode (GPIO18_RDY |GPIO_OUT |GPIO_DFLT_HIGH );PRER =GPIO_bit (SPITZ_GPIO_KEY_INT ); -PFER =GPIO_bit (SPITZ_GPIO_KEY_INT ) |GPIO_bit (SPITZ_GPIO_RESET ); -PWER =GPIO_bit (SPITZ_GPIO_KEY_INT ) |GPIO_bit (SPITZ_GPIO_RESET ) |PWER_RTC ; -PKWR =GPIO_bit (SPITZ_GPIO_SYNC ) |GPIO_bit (SPITZ_GPIO_KEY_INT ) |GPIO_bit (SPITZ_GPIO_RESET ); +PFER =GPIO_bit (SPITZ_GPIO_KEY_INT ) |GPIO_bit (GPIO1_RST ); +PWER =GPIO_bit (SPITZ_GPIO_KEY_INT ) |GPIO_bit (GPIO1_RST ) |PWER_RTC ; +PKWR =GPIO_bit (SPITZ_GPIO_SYNC ) |GPIO_bit (SPITZ_GPIO_KEY_INT ) |GPIO_bit (GPIO1_RST );PKSR =0xffffffff ;// clear /* nRESET_OUT Disable */
@@ -128,7 +128,7 @@ static void spitz_presuspend(void)static void spitz_postsuspend (void ) {pxa_gpio_mode (GPIO18_RDY_MD ); -pxa_gpio_mode (10 |GPIO_IN ); +pxa_gpio_mode (SPITZ_GPIO_NC_10 |GPIO_IN ); }static int spitz_should_wakeup (unsigned int resume_on_alarm)
drivers/video/pxafb.c +1 -1
@@ -816,7 +816,7 @@ static void pxafb_setup_gpio(struct pxafb_info *fbi)return ; } -for (gpio =58 ; ldd_bits; gpio++, ldd_bits--) +for (gpio =GPIO58_LDD_0 ; ldd_bits; gpio++, ldd_bits--)pxa_gpio_mode (gpio |GPIO_ALT_FN_2_OUT );pxa_gpio_mode (GPIO74_LCD_FCLK_MD );pxa_gpio_mode (GPIO75_LCD_LCLK_MD );
include/asm-arm/arch-pxa/akita.h +5 -5
@@ -12,11 +12,11 @@/* Akita IO Expander GPIOs */ #define AKITA_IOEXP_RESERVED_7 (1 << 7) -#define AKITA_IOEXP_IR_ON (1 << 6) -#define AKITA_IOEXP_AKIN_PULLUP (1 << 5) -#define AKITA_IOEXP_BACKLIGHT_CONT (1 << 4) -#define AKITA_IOEXP_BACKLIGHT_ON (1 << 3) -#define AKITA_IOEXP_MIC_BIAS (1 << 2) +#define AKITA_IOEXP_IR_ON (1 << 6)/* IrDA On */ +#define AKITA_IOEXP_AKIN_PULLUP (1 << 5)/* Pull-Up for Remote */ +#define AKITA_IOEXP_BACKLIGHT_CONT (1 << 4)/* Backlight Control */ +#define AKITA_IOEXP_BACKLIGHT_ON (1 << 3)/* Backlight On */ +#define AKITA_IOEXP_MIC_BIAS (1 << 2)/* Mic Bias On */ #define AKITA_IOEXP_RESERVED_1 (1 << 1)#define AKITA_IOEXP_RESERVED_0 (1 << 0)
include/asm-arm/arch-pxa/pxa-regs.h +1 -0
@@ -1340,6 +1340,7 @@#define GPIO85_nPCE_1 85/* Card Enable for Card Space (PXA27x) */ #define GPIO92_MMCDAT0 92/* MMC DAT0 (PXA27x) */ #define GPIO102_nPCE_1 102/* PCMCIA (PXA27x) */ +#define GPIO104_pSKTSEL 104/* PCMCIA Socket Select (PXA27x) */ #define GPIO109_MMCDAT1 109/* MMC DAT1 (PXA27x) */ #define GPIO110_MMCDAT2 110/* MMC DAT2 (PXA27x) */ #define GPIO110_MMCCS0 110/* MMC Chip Select 0 (PXA27x) */
include/asm-arm/arch-pxa/spitz.h +228 -108
379 lines not on this page · raw message
sound/arm/pxa2xx-ac97.c +3 -3
@@ -132,10 +132,10 @@ static void pxa2xx_ac97_reset(struct snd_ac97 *ac97)#ifdef CONFIG_PXA27x/* warm reset broken on Bulverde, so manually keep AC97 reset high */ -pxa_gpio_mode (113 |GPIO_OUT |GPIO_DFLT_HIGH ); +pxa_gpio_mode (GPIO113_AC97_RESET_N |GPIO_OUT |GPIO_DFLT_HIGH );udelay (10 );GCR |=GCR_WARM_RST ; -pxa_gpio_mode (113 |GPIO_ALT_FN_2_OUT ); +pxa_gpio_mode (GPIO113_AC97_RESET_N_MD );udelay (500 );#else GCR |=GCR_WARM_RST |GCR_PRIRDY_IEN |GCR_SECRDY_IEN ;
@@ -334,7 +334,7 @@ static int __devinit pxa2xx_ac97_probe(struct platform_device *dev)pxa_gpio_mode (GPIO29_SDATA_IN_AC97_MD );#ifdef CONFIG_PXA27x/* Use GPIO 113 as AC97 Reset on Bulverde */ -pxa_gpio_mode (113 |GPIO_ALT_FN_2_OUT ); +pxa_gpio_mode (GPIO113_AC97_RESET_N_MD );#endif pxa_set_cken (CKEN_AC97 ,1 );
Signature · 9 lines
Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: [email protected] Lihovarská 1060/12 tel: +420 284 028 966, +49 911 740538747 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/
Quoted 12 lines · Stanislav Brabec
Here is a rewrite of
spitz.h, which includes comments documenting function of particular GPIO pins.spitz_h_rewrite.patch provides:
- no changes in compiled code
- partialspitz.hrewrite:
* organized by function
* describes complete GPIO pinout
* comments added
* removed defines cloningpxa-regs.h
- prefer genericpxa-regs.hGPIO if available
- use GPIO names instead of numbers
Please don't apply. Future GPIO order in spitz.h needs further discussion with Richard Purdie.
Signature · 9 lines
Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: [email protected] Lihovarská 1060/12 tel: +420 284 028 966, +49 911 740538747 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/