summaryrefslogtreecommitdiffstats
path: root/arch/blackfin/cpu/gpio.c
Commit message (Collapse)AuthorAgeFilesLines
* blackfin: If none ADI_GPIOX macro is defined, use ADI_GPIO1 as defaultSonic Zhang2013-12-061-1/+1
| | | | Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* blackfin: Move machine specific gpio_port_t structure back to blackfin arch ↵Steven Miao2013-11-041-0/+17
| | | | | | | | | folder. The gpio register mappings are different among blackfin processors. Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* blackfin: gpio: Use proper mask for comparing functionAxel Lin2013-07-311-5/+6
| | | | | | | | | | | The function return from P_FUNCT2MUX(per) takes 2 bits, however for BF537_FAMILY with offset != 1 the function is 1 bit. Also has small refactor for better readability. In portmux_setup(), it looks odd having "muxreg &= ~(3 << 1);" while in current code we do muxreg |= (function << offset);. Signed-off-by: Axel Lin <axel.lin@ingics.com>
* blackfin: gpio: Unreserve gpio in special_gpio_free()Axel Lin2013-07-311-2/+2
| | | | | | | In special_gpio_free(), call unreserve() rather than reserve() to release gpio. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* bfin: Move gpio support for bf54x and bf60x into the generic driver folder.Sonic Zhang2013-05-131-125/+20
| | | | | | | | | | | | | | | The gpio spec for bf54x and bf60x differ a lot from the old gpio driver for bf5xx. A lot of machine macros are used to accomodate both code in one gpio driver. This patch split the old gpio driver and move new gpio2 support to the generic gpio driver folder. - To enable gpio2 driver, macro CONFIG_ADI_GPIO2 should be defined in the board's config header file. - The gpio2 driver supports bf54x, bf60x and future ADI processors, while the older gpio driver supports bf50x, bf51x, bf52x, bf53x and bf561. - All blackfin specific gpio function names are replaced by the generic gpio APIs. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* blackfin: bf60x: add gpio supportBob Liu2013-03-041-7/+29
| | | | | | Signed-off-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
* Blackfin: gpio: optimize free path a littleMike Frysinger2011-07-121-0/+2
| | | | | | | | | When we aren't doing resource tracking, the gpio_free() function is a stub that simply returns, so pull this logic up a level and make it an inline stub in the header. Now we don't have to waste time at any of the call sites. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: BF50x: new processor portMike Frysinger2011-04-081-3/+5
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: import gpio/portmux layer from LinuxMike Frysinger2010-07-051-0/+854
The current pinmux handling has spread throughout Blackfin drivers and board code and is getting hideous to maintain. So import the gpio and portmux layer from the Blackfin Linux code. This should spur a serious of cleanups across the Blackfin tree. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
OpenPOWER on IntegriCloud