diff options
| author | wdenk <wdenk> | 2003-06-15 22:40:42 +0000 | 
|---|---|---|
| committer | wdenk <wdenk> | 2003-06-15 22:40:42 +0000 | 
| commit | 71f9511803de65a3b98d2f592d418da1d1539f13 (patch) | |
| tree | 4be38a22fc4f588a80aa8cc350ecd5617a211389 /cpu/pxa/cpu.c | |
| parent | 487778b781257831aa9b9140dd3c7ad4176e8314 (diff) | |
| download | olio-uboot-2014.01-71f9511803de65a3b98d2f592d418da1d1539f13.tar.xz olio-uboot-2014.01-71f9511803de65a3b98d2f592d418da1d1539f13.zip | |
* Fix CONFIG_NET_MULTI support in include/net.hLABEL_2003_06_16_0055
* Patches by Kyle Harris, 13 Mar 2003:
  - Add FAT partition support
  - Add command support for FAT
  - Add command support for MMC
  ----
  - Add Intel PXA support for video
  - Add Intel PXA support for MMC
  ----
  - Enable MMC and FAT for lubbock board
  - Other misc changes for lubbock board
Diffstat (limited to 'cpu/pxa/cpu.c')
| -rw-r--r-- | cpu/pxa/cpu.c | 19 | 
1 files changed, 19 insertions, 0 deletions
| diff --git a/cpu/pxa/cpu.c b/cpu/pxa/cpu.c index 6a3c24ded..cc9b3ff40 100644 --- a/cpu/pxa/cpu.c +++ b/cpu/pxa/cpu.c @@ -32,6 +32,7 @@  #include <common.h>  #include <command.h> +#include <asm/arch/pxa-regs.h>  int cpu_init (void)  { @@ -150,3 +151,21 @@ int dcache_status (void)  {  	return 0;					/* always off */  } + +void set_GPIO_mode(int gpio_mode) +{ +	int gpio = gpio_mode & GPIO_MD_MASK_NR; +	int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8; +	int gafr; + +	if (gpio_mode & GPIO_MD_MASK_DIR) +	{ +		GPDR(gpio) |= GPIO_bit(gpio); +	} +	else +	{ +		GPDR(gpio) &= ~GPIO_bit(gpio); +	} +	gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2)); +	GAFR(gpio) = gafr |  (fn  << (((gpio) & 0xf)*2)); +} |