source: freewrt/target/linux/au1000-2.6/patches/008-isdel_cardbus.patch@ 475ad56

freewrt_1_0 freewrt_2_0
Last change on this file since 475ad56 was 475ad56, checked in by Waldemar Brodkorb <wbx@…>, 20 years ago

add OpenWrt trunk revision 3830.

git-svn-id: svn://www.freewrt.org/trunk/freewrt@1 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 2.4 KB
  • arch/mips/au1000/mtx-1/board_setup.c

    diff -urN linux-2.6.16.7/arch/mips/au1000/mtx-1/board_setup.c linux-2.6.16.7.new/arch/mips/au1000/mtx-1/board_setup.c
    old new  
    4444#include <asm/pgtable.h>
    4545#include <asm/mach-au1x00/au1000.h>
    4646
     47extern int (*board_pci_idsel)(unsigned int devsel, int assert);
     48int    mtx1_pci_idsel(unsigned int devsel, int assert);
     49
    4750void board_reset (void)
    4851{
    4952        /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */
     
    7780        au_writel( 0xFFFFFFFF, SYS_TRIOUTCLR );
    7881        au_writel( 0x00000001, SYS_OUTPUTCLR ); // set M66EN (PCI 66MHz) to OFF
    7982        au_writel( 0x00000008, SYS_OUTPUTSET ); // set PCI CLKRUN# to OFF
     83        au_writel( 0x00000002, SYS_OUTPUTSET ); // set EXT_IO3 ON
    8084        au_writel( 0x00000020, SYS_OUTPUTCLR ); // set eth PHY TX_ER to OFF
    8185
    8286        // enable LED and set it to green
    8387        au_writel( au_readl(GPIO2_DIR) | 0x1800, GPIO2_DIR );
    8488        au_writel( 0x18000800, GPIO2_OUTPUT );
    8589
     90        board_pci_idsel = mtx1_pci_idsel;
     91
    8692        printk("4G Systems MTX-1 Board\n");
    8793}
     94
     95int
     96mtx1_pci_idsel(unsigned int devsel, int assert)
     97{
     98#define MTX_IDSEL_ONLY_0_AND_3 0
     99#if MTX_IDSEL_ONLY_0_AND_3
     100       if (devsel != 0 && devsel != 3) {
     101               printk("*** not 0 or 3\n");
     102               return 0;
     103       }
     104#endif
     105
     106       if (assert && devsel != 0) {
     107               // supress signal to cardbus
     108               au_writel( 0x00000002, SYS_OUTPUTCLR ); // set EXT_IO3 OFF
     109       }
     110       else {
     111               au_writel( 0x00000002, SYS_OUTPUTSET ); // set EXT_IO3 ON
     112       }
     113       au_sync_udelay(1);
     114       return 1;
     115}
     116
  • arch/mips/au1000/mtx-1/irqmap.c

    diff -urN linux-2.6.16.7/arch/mips/au1000/mtx-1/irqmap.c linux-2.6.16.7.new/arch/mips/au1000/mtx-1/irqmap.c
    old new  
    4848#include <asm/mach-au1x00/au1000.h>
    4949
    5050char irq_tab_alchemy[][5] __initdata = {
    51  [0] = { -1, INTA, INTB, INTX, INTX},   /* IDSEL 00 - AdapterA-Slot0 (top)    */
     51 [0] = { -1, INTA, INTA, INTX, INTX},   /* IDSEL 00 - AdapterA-Slot0 (top)    */
    5252 [1] = { -1, INTB, INTA, INTX, INTX},   /* IDSEL 01 - AdapterA-Slot1 (bottom) */
    5353 [2] = { -1, INTC, INTD, INTX, INTX},   /* IDSEL 02 - AdapterB-Slot0 (top)    */
    5454 [3] = { -1, INTD, INTC, INTX, INTX},   /* IDSEL 03 - AdapterB-Slot1 (bottom) */
Note: See TracBrowser for help on using the repository browser.