Lines Matching refs:ioaddr
68 static inline void SMC_outw(u16 val, void __iomem *ioaddr, int reg) in SMC_outw() argument
73 v |= readl(ioaddr + (reg & ~2)) & 0xffff; in SMC_outw()
74 writel(v, ioaddr + (reg & ~2)); in SMC_outw()
76 writew(val, ioaddr + reg); in SMC_outw()
275 smc_pxa_dma_insl(void __iomem *ioaddr, struct smc_local *lp, int reg, int dma, in smc_pxa_dma_insl() argument
283 readsl(ioaddr + reg, buf, len); in smc_pxa_dma_insl()
289 *((u32 *)buf) = SMC_inl(ioaddr, reg); in smc_pxa_dma_insl()
314 smc_pxa_dma_insw(void __iomem *ioaddr, struct smc_local *lp, int reg, int dma, in smc_pxa_dma_insw() argument
322 readsw(ioaddr + reg, buf, len); in smc_pxa_dma_insw()
328 *((u16 *)buf) = SMC_inw(ioaddr, reg); in smc_pxa_dma_insw()
364 #define SMC_inl(ioaddr, reg) ({ BUG(); 0; }) argument
365 #define SMC_outl(x, ioaddr, reg) BUG() argument
381 #define SMC_outw(x, ioaddr, reg) \ argument
384 SMC_outb( __val16, ioaddr, reg ); \
385 SMC_outb( __val16 >> 8, ioaddr, reg + (1 << SMC_IO_SHIFT));\
387 #define SMC_inw(ioaddr, reg) \ argument
390 __val16 = SMC_inb( ioaddr, reg ); \
391 __val16 |= SMC_inb( ioaddr, reg + (1 << SMC_IO_SHIFT)) << 8; \
406 #define SMC_inb(ioaddr, reg) ({ BUG(); 0; }) argument
407 #define SMC_outb(x, ioaddr, reg) BUG() argument
833 (SMC_8BIT(lp) ? (SMC_inb(ioaddr, PN_REG(lp))) \
834 : (SMC_inw(ioaddr, PN_REG(lp)) & 0xFF))
839 SMC_outl((x)<<16, ioaddr, SMC_REG(lp, 0, 2)); \
841 SMC_outb(x, ioaddr, PN_REG(lp)); \
843 SMC_outw(x, ioaddr, PN_REG(lp)); \
847 (SMC_8BIT(lp) ? (SMC_inb(ioaddr, AR_REG(lp))) \
848 : (SMC_inw(ioaddr, PN_REG(lp)) >> 8))
851 (SMC_8BIT(lp) ? (SMC_inb(ioaddr, TXFIFO_REG(lp))) \
852 : (SMC_inw(ioaddr, TXFIFO_REG(lp)) & 0xFF))
855 (SMC_8BIT(lp) ? (SMC_inb(ioaddr, RXFIFO_REG(lp))) \
856 : (SMC_inw(ioaddr, TXFIFO_REG(lp)) >> 8))
859 (SMC_8BIT(lp) ? (SMC_inb(ioaddr, INT_REG(lp))) \
860 : (SMC_inw(ioaddr, INT_REG(lp)) & 0xFF))
865 SMC_outb(x, ioaddr, INT_REG(lp)); \
870 __mask = SMC_inw(ioaddr, INT_REG(lp)) & ~0xff; \
871 SMC_outw(__mask | (x), ioaddr, INT_REG(lp)); \
877 (SMC_8BIT(lp) ? (SMC_inb(ioaddr, IM_REG(lp))) \
878 : (SMC_inw(ioaddr, INT_REG(lp)) >> 8))
883 SMC_outb(x, ioaddr, IM_REG(lp)); \
885 SMC_outw((x) << 8, ioaddr, INT_REG(lp)); \
888 #define SMC_CURRENT_BANK(lp) SMC_inw(ioaddr, BANK_SELECT)
893 SMC_outl((x)<<16, ioaddr, 12<<SMC_IO_SHIFT); \
895 SMC_outw(x, ioaddr, BANK_SELECT); \
898 #define SMC_GET_BASE(lp) SMC_inw(ioaddr, BASE_REG(lp))
900 #define SMC_SET_BASE(lp, x) SMC_outw(x, ioaddr, BASE_REG(lp))
902 #define SMC_GET_CONFIG(lp) SMC_inw(ioaddr, CONFIG_REG(lp))
904 #define SMC_SET_CONFIG(lp, x) SMC_outw(x, ioaddr, CONFIG_REG(lp))
906 #define SMC_GET_COUNTER(lp) SMC_inw(ioaddr, COUNTER_REG(lp))
908 #define SMC_GET_CTL(lp) SMC_inw(ioaddr, CTL_REG(lp))
910 #define SMC_SET_CTL(lp, x) SMC_outw(x, ioaddr, CTL_REG(lp))
912 #define SMC_GET_MII(lp) SMC_inw(ioaddr, MII_REG(lp))
914 #define SMC_GET_GP(lp) SMC_inw(ioaddr, GP_REG(lp))
919 SMC_outl((x)<<16, ioaddr, SMC_REG(lp, 8, 1)); \
921 SMC_outw(x, ioaddr, GP_REG(lp)); \
924 #define SMC_SET_MII(lp, x) SMC_outw(x, ioaddr, MII_REG(lp))
926 #define SMC_GET_MIR(lp) SMC_inw(ioaddr, MIR_REG(lp))
928 #define SMC_SET_MIR(lp, x) SMC_outw(x, ioaddr, MIR_REG(lp))
930 #define SMC_GET_MMU_CMD(lp) SMC_inw(ioaddr, MMU_CMD_REG(lp))
932 #define SMC_SET_MMU_CMD(lp, x) SMC_outw(x, ioaddr, MMU_CMD_REG(lp))
934 #define SMC_GET_FIFO(lp) SMC_inw(ioaddr, FIFO_REG(lp))
936 #define SMC_GET_PTR(lp) SMC_inw(ioaddr, PTR_REG(lp))
941 SMC_outl((x)<<16, ioaddr, SMC_REG(lp, 4, 2)); \
943 SMC_outw(x, ioaddr, PTR_REG(lp)); \
946 #define SMC_GET_EPH_STATUS(lp) SMC_inw(ioaddr, EPH_STATUS_REG(lp))
948 #define SMC_GET_RCR(lp) SMC_inw(ioaddr, RCR_REG(lp))
950 #define SMC_SET_RCR(lp, x) SMC_outw(x, ioaddr, RCR_REG(lp))
952 #define SMC_GET_REV(lp) SMC_inw(ioaddr, REV_REG(lp))
954 #define SMC_GET_RPC(lp) SMC_inw(ioaddr, RPC_REG(lp))
959 SMC_outl((x)<<16, ioaddr, SMC_REG(lp, 8, 0)); \
961 SMC_outw(x, ioaddr, RPC_REG(lp)); \
964 #define SMC_GET_TCR(lp) SMC_inw(ioaddr, TCR_REG(lp))
966 #define SMC_SET_TCR(lp, x) SMC_outw(x, ioaddr, TCR_REG(lp))
972 __v = SMC_inw(ioaddr, ADDR0_REG(lp)); \
974 __v = SMC_inw(ioaddr, ADDR1_REG(lp)); \
976 __v = SMC_inw(ioaddr, ADDR2_REG(lp)); \
983 SMC_outw(addr[0]|(addr[1] << 8), ioaddr, ADDR0_REG(lp)); \
984 SMC_outw(addr[2]|(addr[3] << 8), ioaddr, ADDR1_REG(lp)); \
985 SMC_outw(addr[4]|(addr[5] << 8), ioaddr, ADDR2_REG(lp)); \
991 SMC_outw(mt[0] | (mt[1] << 8), ioaddr, MCAST_REG1(lp)); \
992 SMC_outw(mt[2] | (mt[3] << 8), ioaddr, MCAST_REG2(lp)); \
993 SMC_outw(mt[4] | (mt[5] << 8), ioaddr, MCAST_REG3(lp)); \
994 SMC_outw(mt[6] | (mt[7] << 8), ioaddr, MCAST_REG4(lp)); \
1000 SMC_outl((status) | (length)<<16, ioaddr, \
1003 SMC_outw(status, ioaddr, DATA_REG(lp)); \
1004 SMC_outw(length, ioaddr, DATA_REG(lp)); \
1011 unsigned int __val = SMC_inl(ioaddr, DATA_REG(lp)); \
1015 (status) = SMC_inw(ioaddr, DATA_REG(lp)); \
1016 (length) = SMC_inw(ioaddr, DATA_REG(lp)); \
1025 void __iomem *__ioaddr = ioaddr; \
1028 SMC_outsw(ioaddr, DATA_REG(lp), __ptr, 1); \
1036 SMC_outsw(ioaddr, DATA_REG(lp), __ptr, 1); \
1039 SMC_outsw(ioaddr, DATA_REG(lp), p, (l) >> 1); \
1041 SMC_outsb(ioaddr, DATA_REG(lp), p, l); \
1049 void __iomem *__ioaddr = ioaddr; \
1074 SMC_insw(ioaddr, DATA_REG(lp), p, (l) >> 1); \
1076 SMC_insb(ioaddr, DATA_REG(lp), p, l); \