Changeset 36


Ignore:
Timestamp:
Nov 5, 2010, 1:40:22 PM (15 years ago)
Author:
markus
Message:

Heureka! Fixed problems on real hardware (AHCI enabled bit must be set explicitly for each command...)

Location:
trunk/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/include/devhelp.h

    r25 r36  
    33 * Markus Thielen 09/2010:
    44 *    some modifications for OpenWatcom/os2ahci.add
     5 *
     6 * TODO: the Watcom build is broken - the resulting ADD does not work.
    57 *
    68*/
  • trunk/src/os2ahci

    • Property svn:ignore
      •  

        old new  
        88*.out
        99*.map
         10TAGS
         11bldday.h
  • trunk/src/os2ahci/Makefile

    r34 r36  
    11###############################################################################
    2 # Makefile - makefile for os2ahci driver
     2# Makefile - makefile for os2ahci driver, c600 tool chain
    33#
    4 # Copyright (c) 2010 Christian Mueller. Parts copied from/inspired by the
    5 # Linux AHCI driver; those parts are (c) Linux AHCI/ATA maintainers
     4# Copyright (c) 2010 Christian Mueller, Markus Thielen.
    65#
    76#  This program is free software; you can redistribute it and/or modify
     
    1817#  along with this program; if not, write to the Free Software
    1918#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    20 
     19#
    2120
    2221###############################################################################
     
    104103# Action definitions (compile/link commands)
    105104
     105# emacs TAGS file creation
     106# NOTE: OS/2 emacs etags.exe expects an empty file named c:\dev\null...
     107tags:   $(SRCS) $(INCS)
     108        etags.exe $(SRCS) $(INCS)
     109
    106110bldday.h:
    107111        $(BLDDATE) > bldday.h
  • trunk/src/os2ahci/ahci.c

    r35 r36  
    546546  }
    547547
    548   /* clear any pending adapter-level interrupts */
     548  /* clear pending interrupt status */
    549549  writel(ai->mmio + HOST_IRQ_STAT, readl(ai->mmio + HOST_IRQ_STAT));
    550550  readl(ai->mmio + HOST_IRQ_STAT); /* flush */
     
    671671  ahci_start_fis_rx(ai, p);
    672672
    673   /* enable DMA */
     673  /* enable command engine */
    674674  ahci_start_engine(ai, p);
    675675
     
    752752  }
    753753
    754   /* disable DMA */
     754  /* disable command engine */
    755755  if ((rc = ahci_stop_engine(ai, p)) != 0) {
    756756    dprintf("error: failed to stop port HW engine (%d)\n", rc);
     
    847847  u16 cmd_max = ai->cmd_max;
    848848  int i;
     849
     850  /* Enable AHCI mode; apparently, the AHCI mode may end up becoming
     851   * disabled, either during the boot sequence (by the BIOS) or by
     852   * something else. The Linux AHCI drivers have this call in the
     853   * command processing chain, and apparently for a good reason because
     854   * without this, commands won't be executed.
     855   */
     856  ahci_enable_ahci(ai);
    849857
    850858  /* determine whether this will be an NCQ request */
  • trunk/src/os2ahci/ata.c

    r24 r36  
    681681                   AP_SGLIST,    io->pSGList + sg_indx, (u16) sg_cnt,
    682682                   AP_DEVICE,    0x4000,
    683                    AP_WRITE,
     683                   AP_WRITE,     1,
    684684                   AP_END);
    685685    }
  • trunk/src/os2ahci/os2ahci.def

    r35 r36  
    11library os2ahci
    2 Description '$@#thi.guten (www.thiguten.de):1.00.20101104#@OS/2 AHCI Adapter Device Driver'
     2Description '$@#thi.guten (www.thiguten.de):1.00.20101105#@OS/2 AHCI Adapter Device Driver'
    33protmode
    44
  • trunk/src/os2ahci/pci.c

    r33 r36  
    706706    if (ret == RMRC_SUCCESS) {
    707707      /* MT: got a new address from Resource Manager; now we
    708        * need to tell the BIOS about the new address.
     708       * need to tell PCI about the new address.
    709709       * Leave the last 4 bits of the original MMIO value alone.
    710710       */
     
    713713      ddprintf("address we got from RM: 0x%08lx\n",
    714714               resource.MEMResource.MemBase);
    715       ddprintf("setting new MMIO BIOS addr to 0x%08lx\n", mmio_bios);
     715      ddprintf("setting new MMIO addr to 0x%08lx\n", mmio_bios);
    716716
    717717      if (pci_write_conf(bus, dev_func, AHCI_MMIO,
    718718                         sizeof(u32), mmio_bios) != OH_SUCCESS) {
    719         /* failed to update BIOS MMIO address - bail out */
    720         cprintf("error: couldn't update BIOS MMIO address\n");
     719        /* failed to update MMIO address - bail out */
     720        cprintf("error: couldn't update MMIO address\n");
    721721        ret = ~RMRC_SUCCESS;
    722722        goto add_pci_fail;
Note: See TracChangeset for help on using the changeset viewer.