diff options
Diffstat (limited to 'xhfc/xhfc_leb.c')
-rw-r--r-- | xhfc/xhfc_leb.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/xhfc/xhfc_leb.c b/xhfc/xhfc_leb.c new file mode 100644 index 0000000..8bc8904 --- /dev/null +++ b/xhfc/xhfc_leb.c @@ -0,0 +1,54 @@ +/* $Id: xhfc_pci2pi.c,v 1.10 2007/11/28 08:10:40 martinb1 Exp $ + * PCI2PI Pci Bridge support for xhfc_su.c + * + * (C) 2007 Copyright Cologne Chip AG + * Authors : Martin Bachem, Joerg Ciesielski + * Contact : info@colognechip.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#include <linux/module.h> +#include <linux/delay.h> +#include <linux/pci.h> +#include <linux/errno.h> +#include "xhfc.h" +#include "xhfc_leb.h" + +void leb_init(struct xhfc_pi *leb) +{ + struct tlp_leb_regs __iomem *regs = leb->regs; + + writel( LEB_TCS_CS_EN + | LEB_TCS_T1_ADDR_TM(3) + | LEB_TCS_T2_SU_CS_TM(3) + | LEB_TCS_T3_STRB_TM(3) + | LEB_TCS_T4_HOLD_TM(3) + | LEB_TCS_T5_RCVRY_TM(3) + | LEB_TCS_CYC_TYPE_INTEL + | LEB_TCS_CNFG_512_B /* 256_B does not exist */ + | LEB_TCS_MUX_EN + | LEB_TCS_SPLT_EN + | LEB_TCS_WR_EN + | LEB_TCS_BYTE_EN, + ®s->timing_cs[0]); + + /* We are true paranoiacs: */ + (void)readl(®s->timing_cs[0]); + + /* That's it! :-) */ +} + |