Lines Matching refs:ioaddr

69 static inline void SMC_outw(u16 val, void __iomem *ioaddr, int reg)  in SMC_outw()  argument
74 v |= readl(ioaddr + (reg & ~2)) & 0xffff; in SMC_outw()
75 writel(v, ioaddr + (reg & ~2)); in SMC_outw()
77 writew(val, ioaddr + reg); in SMC_outw()
303 smc_pxa_dma_insl(void __iomem *ioaddr, struct smc_local *lp, int reg, int dma, in smc_pxa_dma_insl() argument
311 readsl(ioaddr + reg, buf, len); in smc_pxa_dma_insl()
317 *((u32 *)buf) = SMC_inl(ioaddr, reg); in smc_pxa_dma_insl()
346 smc_pxa_dma_insw(void __iomem *ioaddr, struct smc_local *lp, int reg, int dma, in smc_pxa_dma_insw() argument
354 readsw(ioaddr + reg, buf, len); in smc_pxa_dma_insw()
360 *((u16 *)buf) = SMC_inw(ioaddr, reg); in smc_pxa_dma_insw()
395 #define SMC_inl(ioaddr, reg) ({ BUG(); 0; }) argument
396 #define SMC_outl(x, ioaddr, reg) BUG() argument
412 #define SMC_outw(x, ioaddr, reg) \ argument
415 SMC_outb( __val16, ioaddr, reg ); \
416 SMC_outb( __val16 >> 8, ioaddr, reg + (1 << SMC_IO_SHIFT));\
418 #define SMC_inw(ioaddr, reg) \ argument
421 __val16 = SMC_inb( ioaddr, reg ); \
422 __val16 |= SMC_inb( ioaddr, reg + (1 << SMC_IO_SHIFT)) << 8; \
437 #define SMC_inb(ioaddr, reg) ({ BUG(); 0; }) argument
438 #define SMC_outb(x, ioaddr, reg) BUG() argument
864 (SMC_8BIT(lp) ? (SMC_inb(ioaddr, PN_REG(lp))) \
865 : (SMC_inw(ioaddr, PN_REG(lp)) & 0xFF))
870 SMC_outl((x)<<16, ioaddr, SMC_REG(lp, 0, 2)); \
872 SMC_outb(x, ioaddr, PN_REG(lp)); \
874 SMC_outw(x, ioaddr, PN_REG(lp)); \
878 (SMC_8BIT(lp) ? (SMC_inb(ioaddr, AR_REG(lp))) \
879 : (SMC_inw(ioaddr, PN_REG(lp)) >> 8))
882 (SMC_8BIT(lp) ? (SMC_inb(ioaddr, TXFIFO_REG(lp))) \
883 : (SMC_inw(ioaddr, TXFIFO_REG(lp)) & 0xFF))
886 (SMC_8BIT(lp) ? (SMC_inb(ioaddr, RXFIFO_REG(lp))) \
887 : (SMC_inw(ioaddr, TXFIFO_REG(lp)) >> 8))
890 (SMC_8BIT(lp) ? (SMC_inb(ioaddr, INT_REG(lp))) \
891 : (SMC_inw(ioaddr, INT_REG(lp)) & 0xFF))
896 SMC_outb(x, ioaddr, INT_REG(lp)); \
901 __mask = SMC_inw(ioaddr, INT_REG(lp)) & ~0xff; \
902 SMC_outw(__mask | (x), ioaddr, INT_REG(lp)); \
908 (SMC_8BIT(lp) ? (SMC_inb(ioaddr, IM_REG(lp))) \
909 : (SMC_inw(ioaddr, INT_REG(lp)) >> 8))
914 SMC_outb(x, ioaddr, IM_REG(lp)); \
916 SMC_outw((x) << 8, ioaddr, INT_REG(lp)); \
919 #define SMC_CURRENT_BANK(lp) SMC_inw(ioaddr, BANK_SELECT)
924 SMC_outl((x)<<16, ioaddr, 12<<SMC_IO_SHIFT); \
926 SMC_outw(x, ioaddr, BANK_SELECT); \
929 #define SMC_GET_BASE(lp) SMC_inw(ioaddr, BASE_REG(lp))
931 #define SMC_SET_BASE(lp, x) SMC_outw(x, ioaddr, BASE_REG(lp))
933 #define SMC_GET_CONFIG(lp) SMC_inw(ioaddr, CONFIG_REG(lp))
935 #define SMC_SET_CONFIG(lp, x) SMC_outw(x, ioaddr, CONFIG_REG(lp))
937 #define SMC_GET_COUNTER(lp) SMC_inw(ioaddr, COUNTER_REG(lp))
939 #define SMC_GET_CTL(lp) SMC_inw(ioaddr, CTL_REG(lp))
941 #define SMC_SET_CTL(lp, x) SMC_outw(x, ioaddr, CTL_REG(lp))
943 #define SMC_GET_MII(lp) SMC_inw(ioaddr, MII_REG(lp))
945 #define SMC_GET_GP(lp) SMC_inw(ioaddr, GP_REG(lp))
950 SMC_outl((x)<<16, ioaddr, SMC_REG(lp, 8, 1)); \
952 SMC_outw(x, ioaddr, GP_REG(lp)); \
955 #define SMC_SET_MII(lp, x) SMC_outw(x, ioaddr, MII_REG(lp))
957 #define SMC_GET_MIR(lp) SMC_inw(ioaddr, MIR_REG(lp))
959 #define SMC_SET_MIR(lp, x) SMC_outw(x, ioaddr, MIR_REG(lp))
961 #define SMC_GET_MMU_CMD(lp) SMC_inw(ioaddr, MMU_CMD_REG(lp))
963 #define SMC_SET_MMU_CMD(lp, x) SMC_outw(x, ioaddr, MMU_CMD_REG(lp))
965 #define SMC_GET_FIFO(lp) SMC_inw(ioaddr, FIFO_REG(lp))
967 #define SMC_GET_PTR(lp) SMC_inw(ioaddr, PTR_REG(lp))
972 SMC_outl((x)<<16, ioaddr, SMC_REG(lp, 4, 2)); \
974 SMC_outw(x, ioaddr, PTR_REG(lp)); \
977 #define SMC_GET_EPH_STATUS(lp) SMC_inw(ioaddr, EPH_STATUS_REG(lp))
979 #define SMC_GET_RCR(lp) SMC_inw(ioaddr, RCR_REG(lp))
981 #define SMC_SET_RCR(lp, x) SMC_outw(x, ioaddr, RCR_REG(lp))
983 #define SMC_GET_REV(lp) SMC_inw(ioaddr, REV_REG(lp))
985 #define SMC_GET_RPC(lp) SMC_inw(ioaddr, RPC_REG(lp))
990 SMC_outl((x)<<16, ioaddr, SMC_REG(lp, 8, 0)); \
992 SMC_outw(x, ioaddr, RPC_REG(lp)); \
995 #define SMC_GET_TCR(lp) SMC_inw(ioaddr, TCR_REG(lp))
997 #define SMC_SET_TCR(lp, x) SMC_outw(x, ioaddr, TCR_REG(lp))
1003 __v = SMC_inw(ioaddr, ADDR0_REG(lp)); \
1005 __v = SMC_inw(ioaddr, ADDR1_REG(lp)); \
1007 __v = SMC_inw(ioaddr, ADDR2_REG(lp)); \
1014 SMC_outw(addr[0]|(addr[1] << 8), ioaddr, ADDR0_REG(lp)); \
1015 SMC_outw(addr[2]|(addr[3] << 8), ioaddr, ADDR1_REG(lp)); \
1016 SMC_outw(addr[4]|(addr[5] << 8), ioaddr, ADDR2_REG(lp)); \
1022 SMC_outw(mt[0] | (mt[1] << 8), ioaddr, MCAST_REG1(lp)); \
1023 SMC_outw(mt[2] | (mt[3] << 8), ioaddr, MCAST_REG2(lp)); \
1024 SMC_outw(mt[4] | (mt[5] << 8), ioaddr, MCAST_REG3(lp)); \
1025 SMC_outw(mt[6] | (mt[7] << 8), ioaddr, MCAST_REG4(lp)); \
1031 SMC_outl((status) | (length)<<16, ioaddr, \
1034 SMC_outw(status, ioaddr, DATA_REG(lp)); \
1035 SMC_outw(length, ioaddr, DATA_REG(lp)); \
1042 unsigned int __val = SMC_inl(ioaddr, DATA_REG(lp)); \
1046 (status) = SMC_inw(ioaddr, DATA_REG(lp)); \
1047 (length) = SMC_inw(ioaddr, DATA_REG(lp)); \
1056 void __iomem *__ioaddr = ioaddr; \
1059 SMC_outsw(ioaddr, DATA_REG(lp), __ptr, 1); \
1067 SMC_outsw(ioaddr, DATA_REG(lp), __ptr, 1); \
1070 SMC_outsw(ioaddr, DATA_REG(lp), p, (l) >> 1); \
1072 SMC_outsb(ioaddr, DATA_REG(lp), p, l); \
1080 void __iomem *__ioaddr = ioaddr; \
1105 SMC_insw(ioaddr, DATA_REG(lp), p, (l) >> 1); \
1107 SMC_insb(ioaddr, DATA_REG(lp), p, l); \