1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

CF driver cleanup

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9473 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian
2007-11-01 17:11:16 +00:00
parent a40177e0b2
commit a3f3528dd9
3 changed files with 32 additions and 10 deletions

View File

@@ -16,8 +16,9 @@
#include <linux/pci.h>
#include <linux/ioport.h> /* request_mem_region() */
#include <asm/unaligned.h> /* ioremap() */
#include <asm/io.h> /* ioremap() */
#include <asm/unaligned.h>
#include <asm/io.h>
#include <asm/gpio.h>
#include <gpio.h>
#include <adm5120_defs.h>
@@ -69,7 +70,7 @@ static inline u8 rareg(unsigned reg, struct cf_mips_dev* dev)
static inline int cfrdy(struct cf_mips_dev *dev)
{
return (SW_READ_REG(GPIO_CONF0) & (1 << 12));
return gpio_get_value(12);
}
static inline void prepare_cf_irq(struct cf_mips_dev *dev)
@@ -92,7 +93,7 @@ static inline int cf_present(struct cf_mips_dev* dev)
int i;
/* on RB100 WAIT is LOW all the time => read will hang */
if (SW_READ_REG(GPIO_CONF0) & (1 << 8))
if (gpio_read_value(8))
cmd |= EXTIO_WAIT_EN;
SW_WRITE_REG(GPIO_CONF2, cmd);