diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2004-07-25 13:44:23 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2004-07-25 13:44:23 +0000 |
commit | f22d65790f63141b4a8c149c7e2bf12f73bc7232 (patch) | |
tree | 5ac7e8aa1c75acf4992b47a2aec72ac6b06fd0e5 /sys/dev/cardbus | |
parent | 053a9c8642782d31af3b5c24e7e6e52ffc34cae1 (diff) |
Program BARs before enabling memory or I/O access. From NetBSD (mycroft).
Diffstat (limited to 'sys/dev/cardbus')
-rw-r--r-- | sys/dev/cardbus/if_atw_cardbus.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/cardbus/if_atw_cardbus.c b/sys/dev/cardbus/if_atw_cardbus.c index b0e57497e76..155332391a7 100644 --- a/sys/dev/cardbus/if_atw_cardbus.c +++ b/sys/dev/cardbus/if_atw_cardbus.c @@ -1,5 +1,5 @@ -/* $OpenBSD: if_atw_cardbus.c,v 1.2 2004/07/15 15:39:41 millert Exp $ */ -/* $NetBSD: if_atw_cardbus.c,v 1.7 2004/05/08 23:40:01 dyoung Exp $ */ +/* $OpenBSD: if_atw_cardbus.c,v 1.3 2004/07/25 13:44:22 millert Exp $ */ +/* $NetBSD: if_atw_cardbus.c,v 1.8 2004/07/22 15:50:50 dyoung Exp $ */ /*- * Copyright (c) 1999, 2000, 2003 The NetBSD Foundation, Inc. @@ -399,14 +399,14 @@ atw_cardbus_setup(struct atw_cardbus_softc *csc) PCI_PWR_D0); #endif - /* Make sure the right access type is on the CardBus bridge. */ - (*ct->ct_cf->cardbus_ctrl)(cc, csc->sc_cben); - (*ct->ct_cf->cardbus_ctrl)(cc, CARDBUS_BM_ENABLE); - /* Program the BAR. */ cardbus_conf_write(cc, cf, csc->sc_tag, csc->sc_bar_reg, csc->sc_bar_val); + /* Make sure the right access type is on the CardBus bridge. */ + (*ct->ct_cf->cardbus_ctrl)(cc, csc->sc_cben); + (*ct->ct_cf->cardbus_ctrl)(cc, CARDBUS_BM_ENABLE); + /* Enable the appropriate bits in the PCI CSR. */ reg = cardbus_conf_read(cc, cf, csc->sc_tag, CARDBUS_COMMAND_STATUS_REG); |