X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/663af573eb897f7df39e85a652cd4f7cfb834f29..2da5dcf199f77603afb654d9127910cda5e225ac:/target/linux/adm5120/files/drivers/block/rb1xx/ata.c diff --git a/target/linux/adm5120/files/drivers/block/rb1xx/ata.c b/target/linux/adm5120/files/drivers/block/rb1xx/ata.c index c73d21958..9769c08fa 100644 --- a/target/linux/adm5120/files/drivers/block/rb1xx/ata.c +++ b/target/linux/adm5120/files/drivers/block/rb1xx/ata.c @@ -16,8 +16,9 @@ #include #include /* request_mem_region() */ -#include /* ioremap() */ -#include /* ioremap() */ +#include +#include +#include #include #include @@ -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 << ADM5120_GPIO_PIN4)); + 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 << ADM5120_GPIO_PIN0)) + if (gpio_get_value(8)) cmd |= EXTIO_WAIT_EN; SW_WRITE_REG(GPIO_CONF2, cmd);