LinHES Forums
http://forum.linhes.org/

Pundit-R
http://forum.linhes.org/viewtopic.php?f=2&t=2173
Page 1 of 1

Author:  Michel [ Thu Aug 12, 2004 4:41 pm ]
Post subject:  Pundit-R

I just bought a Pundit-R with a hauppauge PVR 250. Got quite a few problems with it (I still do actually). Some of which I have solved, some of which I'm still working on. I'll try to keep this post updated if I find more solutions.

I've been using V4R4.1

Now for my complete hardware list:

    Asus Pundit-R black
    Celeron 533Mhz 2.66Ghz
    Kingston 333Mhz 512MB DIMM
    Maxtor 200Gb HD
    Hauppauge PVR-250 (hard to get in the case, don't even think about getting 2 in, it's just a few millimeters too high)
    LG DVD burner (duallayer!)


Totalled for me to around 750 euro's (I live in The Netherlands).


Now for the problems:


**** FIXED: Onboard networkcard not working ****

The onboard networkcard is not detected by default. However, it's possible to change the 3c59x driver, to add support for it. (If you are installing knoppmyth, after the first reboot, do a <CTRL>+<ALT>+<F1> to get a console, and perform the following instructions, then reboot and continue as normal)

Install kernel source:

Code:
   cd /usr/src
   bzcat linux-2.4.25-chw.tar.bz2 | tar xvf –
   cp linux/.config linux-2.4.25-chw
   rm linux
   ln –s linux-2.4.25-chw linux
   cd linux-2.4.25-chw
   make oldconfig dep
   cd drivers/net


Patch the 3c59x.c driver:

Code:
--- 3c59x.c.orig 2004-06-14 21:17:17.000000000 +0300
+++ 3c59x.c 2004-06-14 21:23:06.000000000 +0300
@@ -464,6 +464,7 @@
CH_3CCFEM656_1,
CH_3C450,
CH_3C920,
+ CH_ATI,
CH_3C982A,
CH_3C982B,

@@ -561,6 +562,8 @@
PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, },
{"3c920 Tornado",
PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, },
+ {"3c920b CH_ATI 9100 IGP",
+ PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_MII|HAS_HWCKSM, 128, },
{"3c982 Hydra Dual Port A",
PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, },
{"3c982 Hydra Dual Port B",
@@ -615,6 +618,7 @@
{ 0x10B7, 0x6564, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3CCFEM656_1 },
{ 0x10B7, 0x4500, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C450 },
{ 0x10B7, 0x9201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C920 },
+ { 0x10B7, 0x9202, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_ATI },
{ 0x10B7, 0x1201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C982A },
{ 0x10B7, 0x1202, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C982B },


Patch command:

Code:
   patch < above.patch.saved.to.a.file


You could also do it by hand (it's not that many lines). Just add the lines which have a "+" in front of them on the right place (the lines without a "+" are the context in which the "+" lines need to be placed). I did it that way, the pundit-r doesn't have a diskdrive :-)

Now recompile the kernel (takes a looooong while :)):

Code:
   cd /usr/local/linux
   make
   make modules
   make install
   make modules_install
   lilo


To make sure that the module gets loaded at boottime, change /etc/modules, and add 3c95x on a new line at the end.


B.t.w.: The patch isn't mine. The original patch was by Andrew Morton I believe, but this was for the 2.6 kernel. It was backported by "darkprok". More information here: http://www.fedoraforum.org/forum/showth ... 0B-EMB-WNM

And thanks to krypton_john for explaining how to install the kernel sources, and how to compile a new kernel :-) I used his example (although this was for something completely different) from here: http://mysettopbox.tv/phpBB2/viewtopic. ... nux+kernel




**** FIXED: IDE Controller is not supported ****

Update: I've fixed this problem, by backporting the ATIIXP driver from 2.4.26 to 2.4.25. Read one of the following messages to find out how to do it.

The IDE controller of de Pundit-R is not supported in kernel 2.4.25 . I've read some rumors that support is in 2.4.26, but I'm not sure about that.

The fact that the IDE controller is not supported sucks, as you can't enable DMA (thus stuttering live tv :( ).

Is it possible to apt-get a new kernel (I'm not used to debian)? Or it that considered playing with fire? :-)

The guy here has a Shuttle ST62K, which seems to be using the same chipset as the Asus Pundit-R. That's where the statement about the IDE support in 2.4.26 comes from: http://www.bluelightning.org/linux/st62k/


**** NOT FIXED: No audio ****

Haven't got any audio from my PVR-250 yet. I'm still looking into that, probably some module I forgot or anything... I'll update this if I figured it out.

Update: Looked a bit deeper into this, as I haven't spend much time on it yet. Noticed that my onboard sound wasn't working yet, so started to see if I could get it to work. Unfortunatly, it seems that there are no drivers for it, until kernel 2.6.5. Not easy to backport, so I probably have to install an old SoundBlaster.

Update: For now, installed an old SoundBlaster. Guess I'll have to wait for R5, which will have the 2.6 kernel, in order to get onboard sound working. With the SoundBlaster, audio works perfectly (also of the PVR250).


**** NOT FIXED: Hardware acceleration in X ****

The Pundit-R has an ATI Radeon 9200 on board, which isn't supported by X 4.3.0. The vesa driver works, but is too slow to show TV in fullscreen on 800x600 pixels.

The driver CD that came with the Pundit-R contains linux drivers for X. When installed, these do work, but the screen acts like there is a mobile phone next to it. Therefore it's not really usable.

The fglrx driver does not recognise the card, so that doesn't work either.


**** NOT FIXED: Kernel panics ****

From time to time the kernel panics. Can't see anything of it in the logs, but the capslock and scrollock are blinking at that time, and there's only a blank screen. Remote login doesn't work either, and the machine doesn't respond to pings anymore.

It seems like it's related to the networkcard. As long as the networkcard is not used, all seems to work well, but when you use it intensively, it seems to crash in time. Problem looks related to what can be found here, and sounds like a kernel bug:

http://mysettopbox.tv/phpBB2/viewtopic.php?t=1702


There are a lot of other things, which I haven't figured out yet, or have not started to look at (e.g. TV-Out). But I hope this is at least of some help to people. I'll try to update it whenever I discover something new.


P.s.: Anyone knows when R5 is planned? And which kernel it will be using?

P.s.2: Thanks a lot for KnoppMyth! Excellent job!!!!

Author:  Xsecrets [ Thu Aug 12, 2004 9:28 pm ]
Post subject: 

you can apt-get install kernels in debian, the problem becomes that they you have to recompile ivtv and a couple of other things. The biggest problem is lirc, because it requires full configured kernel source to compile. all the rest you can compile with the kernel headers.

Not sure on the timeframe for R5, but I believe that I heard it was moving to the 2.6 kernel series, which should fix most of your problems.

No sound from the pvr250 is a common issue in R4V4.x and the solution has been discussed many times. basically you have to recompile ivtv.

Author:  Michel [ Fri Aug 13, 2004 1:52 am ]
Post subject: 

Xsecrets wrote:
you can apt-get install kernels in debian, the problem becomes that they you have to recompile ivtv and a couple of other things. The biggest problem is lirc, because it requires full configured kernel source to compile. all the rest you can compile with the kernel headers.

Not sure on the timeframe for R5, but I believe that I heard it was moving to the 2.6 kernel series, which should fix most of your problems.

No sound from the pvr250 is a common issue in R4V4.x and the solution has been discussed many times. basically you have to recompile ivtv.


Hmmm... getting a new kernel still sounds like a nightmare :-) I'll see if I can backport the IDE driver to the current kernel first.

As for the no-sound problem. I've already recompiled ivtv, but that didn't work out (yet). Wasn't really a cry for help though :-) Wrote this message at the end of the day mainly to help people with the networking problem in the Pundit-R. I figured I might as well tell where I left off, so others have a clue as to how easy (or is it hard ;-)) it is to set up the pundit-r, and as a bit of a warning that the chipset has changed compared to the normal pundit. Haven't seen anyone with a pundit-r in the forums before, so I found it important enough to start posting, even though I'm not done yet.

Anyway, thanks!

Author:  Michel [ Fri Aug 13, 2004 4:40 am ]
Post subject:  IDE Controller problem fixed

Okay, I've backported the ATIIXP driver (for the IDE controller of the Pundit-R) to kernel 2.4.25, and it works perfectly. My HD is now using DMA, and no more stuttering while watching LiveTV!

Hmm... Too bad I can't attach files here :(

Here is a short tutorial on how to get the ATIIXP driver in the KnoppMyth kernel:

Note: I'm not used to programming in linux, so everything here is hacked together from other sources. If I'm doing something stupid, or if there was a nicer way to do it, I'm sorry, it seemed to work for me ;-) I will accept no responsebility whatsoever, so use at your own risk.

I assume you already extracted the kernel (to get the network working), so I won't be covering that. If you need it, it's in the top message.

Now do the following

Code:
cd /usr/src/linux
cd include/linux
vi pci_ids.h


Locate the following lines in the file:

Code:
/* RadeonIGP */
#define PCI_DEVICE_ID_ATI_RADEON_IGP   0xCAB0


And add the following below it:

Code:
/* ATI IXP Chipset */
#define PCI_DEVICE_ID_ATI_IXP_IDE   0x4349


Now save the file, and exit.

Do the following:

Code:
cd /usr/src/linux
cd Documentation
vi Configure.help


Find the following in the file:

Code:

AMD and nVidia IDE support
CONFIG_BLK_DEV_AMD74XX
  This driver adds explicit support for AMD-7xx and AMD-8111 chips
  and also for the nVidia nForce chip.  This allows the kernel to
  change PIO, DMA and UDMA speeds and to configure the chip to
  optimum performance.

  If you say Y here, you also need to say Y to "Use DMA by default
  when available", above.
  Please read the comments at the top of <file:drivers/ide/pci/amd74xx.c>.

  If unsure, say N.


And add the following just below it:

Code:

ATI IXP chipset IDE support
CONFIG_BLK_DEV_ATIIXP
  This driver adds explicit support for ATI IXP chipset.
  This allows the kernel to change PIO, DMA and UDMA speeds
  and to configure the chip to optimum performance.

  Say Y here if you have an ATI IXP chipset IDE controller.


Now do the following:

Code:
cd /usr/src/linux
cd drivers/ide
vi Config.in


Find the following:

Code:
       dep_tristate '    AMD and nVidia IDE support' CONFIG_BLK_DEV_AMD74XX $CONFIG_BLK_DEV_IDEDMA_PCI
       dep_mbool    '      AMD Viper ATA-66 Override' CONFIG_AMD74XX_OVERRIDE $CONFIG_BLK_DEV_AMD74XX


And add the following just below it:

Code:
       dep_tristate '    ATI IXP chipset IDE support' CONFIG_BLK_DEV_ATIIXP $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_X86


Do the following:

Code:
cd pci
vi Makefile


Find the following:

Code:
obj-$(CONFIG_BLK_DEV_AMD74XX)      += amd74xx.o


And add the following just below it:

Code:
obj-$(CONFIG_BLK_DEV_ATIIXP)      += atiixp.o


Now create a new file in the same directory named atiixp.c, and add the following to it (sorry for the large post):

Code:
/*
 *  linux/drivers/ide/pci/atiixp.c   Version 0.01-bart2   Feb. 26, 2004
 *
 *  Copyright (C) 2003 ATI Inc. <hyu@ati.com>
 *  Copyright (C) 2004 Bartlomiej Zolnierkiewicz
 *
 */

#include <linux/config.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/ioport.h>
#include <linux/pci.h>
#include <linux/hdreg.h>
#include <linux/ide.h>
#include <linux/delay.h>
#include <linux/init.h>

#include <asm/io.h>

#include "ide_modes.h"

#define ATIIXP_IDE_PIO_TIMING      0x40
#define ATIIXP_IDE_MDMA_TIMING      0x44
#define ATIIXP_IDE_PIO_CONTROL      0x48
#define ATIIXP_IDE_PIO_MODE      0x4a
#define ATIIXP_IDE_UDMA_CONTROL      0x54
#define ATIIXP_IDE_UDMA_MODE      0x56

typedef struct {
   u8 command_width;
   u8 recover_width;
} atiixp_ide_timing;

static atiixp_ide_timing pio_timing[] = {
   { 0x05, 0x0d },
   { 0x04, 0x07 },
   { 0x03, 0x04 },
   { 0x02, 0x02 },
   { 0x02, 0x00 },
};

static atiixp_ide_timing mdma_timing[] = {
   { 0x07, 0x07 },
   { 0x02, 0x01 },
   { 0x02, 0x00 },
};

static int save_mdma_mode[4];

#define DISPLAY_ATIIXP_TIMINGS

#if defined(DISPLAY_ATIIXP_TIMINGS) && defined(CONFIG_PROC_FS)

#include <linux/stat.h>
#include <linux/proc_fs.h>

static u8 atiixp_proc;
static struct pci_dev *bmide_dev;

/**
 *   atiixp_get_info      -   fill in /proc for ATIIXP IDE
 *   @buffer: buffer to fill
 *   @addr: address of user start in buffer
 *   @offset: offset into 'file'
 *   @count: buffer count
 *
 *   Output summary data on the tuning.
 */

static int atiixp_get_info(char *buffer, char **addr, off_t offset, int count)
{
   char *p = buffer;
   struct pci_dev *dev = bmide_dev;
   unsigned long bibma = pci_resource_start(dev, 4);
   u32 mdma_timing = 0;
   u16 udma_mode = 0, pio_mode = 0;
   u8 c0, c1, udma_control = 0;

   p += sprintf(p, "\n                          ATI ");
   p += sprintf(p, "ATIIXP Ultra100 IDE Chipset.\n");

   pci_read_config_byte(dev, ATIIXP_IDE_UDMA_CONTROL, &udma_control);
   pci_read_config_word(dev, ATIIXP_IDE_UDMA_MODE, &udma_mode);
   pci_read_config_word(dev, ATIIXP_IDE_PIO_MODE, &pio_mode);
   pci_read_config_dword(dev, ATIIXP_IDE_MDMA_TIMING, &mdma_timing);

   /*
    * at that point bibma+0x2 et bibma+0xa are byte registers
    * to investigate:
    */
   c0 = inb(bibma + 0x02);
   c1 = inb(bibma + 0x0a);

   p += sprintf(p, "--------------- Primary Channel "
         "---------------- Secondary Channel "
         "-------------\n");
   p += sprintf(p, "                %sabled "
         "                        %sabled\n",
         (c0 & 0x80) ? "dis" : " en",
         (c1 & 0x80) ? "dis" : " en");
   p += sprintf(p, "--------------- drive0 --------- drive1 "
         "-------- drive0 ---------- drive1 ------\n");
   p += sprintf(p, "DMA enabled:    %s              %s "
         "            %s               %s\n",
         (c0 & 0x20) ? "yes" : "no ",
         (c0 & 0x40) ? "yes" : "no ",
         (c1 & 0x20) ? "yes" : "no ",
         (c1 & 0x40) ? "yes" : "no " );
   p += sprintf(p, "UDMA enabled:   %s              %s "
         "            %s               %s\n",
         (udma_control & 0x01) ? "yes" : "no ",
         (udma_control & 0x02) ? "yes" : "no ",
         (udma_control & 0x04) ? "yes" : "no ",
         (udma_control & 0x08) ? "yes" : "no " );
   p += sprintf(p, "UDMA mode:      %c                %c "
         "              %c                 %c\n",
         (udma_control & 0x01) ?
         ((udma_mode & 0x07) + 48) : 'X',
         (udma_control & 0x02) ?
         (((udma_mode >> 4) & 0x07) + 48) : 'X',
         (udma_control & 0x04) ?
         (((udma_mode >> 8) & 0x07) + 48) : 'X',
         (udma_control & 0x08) ?
         (((udma_mode >> 12) & 0x07) + 48) : 'X');
   p += sprintf(p, "MDMA mode:      %c                %c "
         "              %c                 %c\n",
         (save_mdma_mode[0] && (c0 & 0x20)) ?
         ((save_mdma_mode[0] & 0xf) + 48) : 'X',
         (save_mdma_mode[1] && (c0 & 0x40)) ?
         ((save_mdma_mode[1] & 0xf) + 48) : 'X',
         (save_mdma_mode[2] && (c1 & 0x20)) ?
         ((save_mdma_mode[2] & 0xf) + 48) : 'X',
         (save_mdma_mode[3] && (c1 & 0x40)) ?
         ((save_mdma_mode[3] & 0xf) + 48) : 'X');
   p += sprintf(p, "PIO mode:       %c                %c "
         "              %c                 %c\n",
         (c0 & 0x20) ? 'X' : ((pio_mode & 0x07) + 48),
         (c0 & 0x40) ? 'X' : (((pio_mode >> 4) & 0x07) + 48),
         (c1 & 0x20) ? 'X' : (((pio_mode >> 8) & 0x07) + 48),
         (c1 & 0x40) ? 'X' : (((pio_mode >> 12) & 0x07) + 48));

   return p - buffer;   /* => must be less than 4k! */
}

static ide_pci_host_proc_t atiixp_procs = {
   .name      = "atiixp",
   .set      = 1,
   .get_info   = atiixp_get_info,
};
#endif  /* defined(DISPLAY_ATIIXP_TIMINGS) && defined(CONFIG_PROC_FS) */

/**
 *   atiixp_ratemask      -   compute rate mask for ATIIXP IDE
 *   @drive: IDE drive to compute for
 *
 *   Returns the available modes for the ATIIXP IDE controller.
 */

static u8 atiixp_ratemask(ide_drive_t *drive)
{
   u8 mode = 3;

   if (!eighty_ninty_three(drive))
      mode = min(mode, (u8)1);
   return mode;
}

/**
 *   atiixp_dma_2_pio      -   return the PIO mode matching DMA
 *   @xfer_rate: transfer speed
 *
 *   Returns the nearest equivalent PIO timing for the PIO or DMA
 *   mode requested by the controller.
 */

static u8 atiixp_dma_2_pio(u8 xfer_rate) {
   switch(xfer_rate) {
      case XFER_UDMA_6:
      case XFER_UDMA_5:
      case XFER_UDMA_4:
      case XFER_UDMA_3:
      case XFER_UDMA_2:
      case XFER_UDMA_1:
      case XFER_UDMA_0:
      case XFER_MW_DMA_2:
      case XFER_PIO_4:
         return 4;
      case XFER_MW_DMA_1:
      case XFER_PIO_3:
         return 3;
      case XFER_SW_DMA_2:
      case XFER_PIO_2:
         return 2;
      case XFER_MW_DMA_0:
      case XFER_SW_DMA_1:
      case XFER_SW_DMA_0:
      case XFER_PIO_1:
      case XFER_PIO_0:
      case XFER_PIO_SLOW:
      default:
         return 0;
   }
}

static int atiixp_ide_dma_host_on(ide_drive_t *drive)
{
   struct pci_dev *dev = drive->hwif->pci_dev;
   unsigned long flags;
   u16 tmp16;

   spin_lock_irqsave(&ide_lock, flags);

   pci_read_config_word(dev, ATIIXP_IDE_UDMA_CONTROL, &tmp16);
   if (save_mdma_mode[drive->dn])
      tmp16 &= ~(1 << drive->dn);
   else
      tmp16 |= (1 << drive->dn);
   pci_write_config_word(dev, ATIIXP_IDE_UDMA_CONTROL, tmp16);

   spin_unlock_irqrestore(&ide_lock, flags);

   return __ide_dma_host_on(drive);
}

static int atiixp_ide_dma_host_off(ide_drive_t *drive)
{
   struct pci_dev *dev = drive->hwif->pci_dev;
   unsigned long flags;
   u16 tmp16;

   spin_lock_irqsave(&ide_lock, flags);

   pci_read_config_word(dev, ATIIXP_IDE_UDMA_CONTROL, &tmp16);
   tmp16 &= ~(1 << drive->dn);
   pci_write_config_word(dev, ATIIXP_IDE_UDMA_CONTROL, tmp16);

   spin_unlock_irqrestore(&ide_lock, flags);

   return __ide_dma_host_off(drive);
}

/**
 *   atiixp_tune_drive      -   tune a drive attached to a ATIIXP
 *   @drive: drive to tune
 *   @pio: desired PIO mode
 *
 *   Set the interface PIO mode.
 */

static void atiixp_tuneproc(ide_drive_t *drive, u8 pio)
{
   struct pci_dev *dev = drive->hwif->pci_dev;
   unsigned long flags;
   int timing_shift = (drive->dn & 2) ? 16 : 0 + (drive->dn & 1) ? 0 : 8;
   u32 pio_timing_data;
   u16 pio_mode_data;

   spin_lock_irqsave(&ide_lock, flags);

   pci_read_config_word(dev, ATIIXP_IDE_PIO_MODE, &pio_mode_data);
   pio_mode_data &= ~(0x07 << (drive->dn * 4));
   pio_mode_data |= (pio << (drive->dn * 4));
   pci_write_config_word(dev, ATIIXP_IDE_PIO_MODE, pio_mode_data);

   pci_read_config_dword(dev, ATIIXP_IDE_PIO_TIMING, &pio_timing_data);
   pio_timing_data &= ~(0xff << timing_shift);
   pio_timing_data |= (pio_timing[pio].recover_width << timing_shift) |
       (pio_timing[pio].command_width << (timing_shift + 4));
   pci_write_config_dword(dev, ATIIXP_IDE_PIO_TIMING, pio_timing_data);

   spin_unlock_irqrestore(&ide_lock, flags);
}

/**
 *   atiixp_tune_chipset   -   tune a ATIIXP interface
 *   @drive: IDE drive to tune
 *   @xferspeed: speed to configure
 *
 *   Set a ATIIXP interface channel to the desired speeds. This involves
 *   requires the right timing data into the ATIIXP configuration space
 *   then setting the drive parameters appropriately
 */

static int atiixp_speedproc(ide_drive_t *drive, u8 xferspeed)
{
   struct pci_dev *dev = drive->hwif->pci_dev;
   unsigned long flags;
   int timing_shift = (drive->dn & 2) ? 16 : 0 + (drive->dn & 1) ? 0 : 8;
   u32 tmp32;
   u16 tmp16;
   u8 speed, pio;

   speed = ide_rate_filter(atiixp_ratemask(drive), xferspeed);

   spin_lock_irqsave(&ide_lock, flags);

   save_mdma_mode[drive->dn] = 0;
   if (speed >= XFER_UDMA_0) {
      pci_read_config_word(dev, ATIIXP_IDE_UDMA_MODE, &tmp16);
      tmp16 &= ~(0x07 << (drive->dn * 4));
      tmp16 |= ((speed & 0x07) << (drive->dn * 4));
      pci_write_config_word(dev, ATIIXP_IDE_UDMA_MODE, tmp16);
   } else {
      if ((speed >= XFER_MW_DMA_0) && (speed <= XFER_MW_DMA_2)) {
         save_mdma_mode[drive->dn] = speed;
         pci_read_config_dword(dev, ATIIXP_IDE_MDMA_TIMING, &tmp32);
         tmp32 &= ~(0xff << timing_shift);
         tmp32 |= (mdma_timing[speed & 0x03].recover_width << timing_shift) |
            (mdma_timing[speed & 0x03].command_width << (timing_shift + 4));
         pci_write_config_dword(dev, ATIIXP_IDE_MDMA_TIMING, tmp32);
      }
   }

   spin_unlock_irqrestore(&ide_lock, flags);

   if (speed >= XFER_SW_DMA_0)
      pio = atiixp_dma_2_pio(speed);
   else
      pio = speed - XFER_PIO_0;

   atiixp_tuneproc(drive, pio);

   return ide_config_drive_speed(drive, speed);
}

/**
 *   atiixp_config_drive_for_dma   -   configure drive for DMA
 *   @drive: IDE drive to configure
 *
 *   Set up a ATIIXP interface channel for the best available speed.
 *   We prefer UDMA if it is available and then MWDMA. If DMA is
 *   not available we switch to PIO and return 0.
 */

static int atiixp_config_drive_for_dma(ide_drive_t *drive)
{
   u8 speed = ide_dma_speed(drive, atiixp_ratemask(drive));

   /* If no DMA speed was available then disable DMA and use PIO. */
   if (!speed) {
      u8 tspeed = ide_get_best_pio_mode(drive, 255, 5, NULL);
      speed = atiixp_dma_2_pio(XFER_PIO_0 + tspeed) + XFER_PIO_0;
   }

   (void) atiixp_speedproc(drive, speed);
   return ide_dma_enable(drive);
}

/**
 *   atiixp_dma_check   -   set up an IDE device
 *   @drive: IDE drive to configure
 *
 *   Set up the ATIIXP interface for the best available speed on this
 *   interface, preferring DMA to PIO.
 */

static int atiixp_dma_check(ide_drive_t *drive)
{
   ide_hwif_t *hwif   = HWIF(drive);
   struct hd_driveid *id   = drive->id;
   u8 tspeed, speed;

   drive->init_speed = 0;

   if ((id->capability & 1) && drive->autodma) {
      /* Consult the list of known "bad" drives */
      if (__ide_dma_bad_drive(drive))
         goto fast_ata_pio;
      if (id->field_valid & 4) {
         if (id->dma_ultra & hwif->ultra_mask) {
            /* Force if Capable UltraDMA */
            if ((id->field_valid & 2) &&
                (!atiixp_config_drive_for_dma(drive)))
               goto try_dma_modes;
         }
      } else if (id->field_valid & 2) {
try_dma_modes:
         if ((id->dma_mword & hwif->mwdma_mask) ||
             (id->dma_1word & hwif->swdma_mask)) {
            /* Force if Capable regular DMA modes */
            if (!atiixp_config_drive_for_dma(drive))
               goto no_dma_set;
         }
      } else if (__ide_dma_good_drive(drive) &&
            (id->eide_dma_time < 150)) {
         /* Consult the list of known "good" drives */
         if (!atiixp_config_drive_for_dma(drive))
            goto no_dma_set;
      } else {
         goto fast_ata_pio;
      }
      return hwif->ide_dma_on(drive);
   } else if ((id->capability & 8) || (id->field_valid & 2)) {
fast_ata_pio:
no_dma_set:
      tspeed = ide_get_best_pio_mode(drive, 255, 5, NULL);
      speed = atiixp_dma_2_pio(XFER_PIO_0 + tspeed) + XFER_PIO_0;
      hwif->speedproc(drive, speed);
      return hwif->ide_dma_off_quietly(drive);
}
   /* IORDY not supported */
   return 0;
}

/**
 *   init_chipset_atiixp   -   set up the ATIIXP chipset
 *   @dev: PCI device to set up
 *   @name: Name of the device
 *
 *   Initialize the PCI device as required. For the ATIIXP this turns
 *   out to be nice and simple
 */

static unsigned int __devinit init_chipset_atiixp(struct pci_dev *dev, const char *name)
{
#if defined(DISPLAY_ATIIXP_TIMINGS) && defined(CONFIG_PROC_FS)
if (!atiixp_proc) {
      atiixp_proc = 1;
      bmide_dev = dev;
      ide_pci_register_host_proc(&atiixp_procs);
   }
#endif /* DISPLAY_ATIIXP_TIMINGS && CONFIG_PROC_FS */
   return 0;
}

/**
 *   init_hwif_atiixp      -   fill in the hwif for the ATIIXP
 *   @hwif: IDE interface
 *
 *   Set up the ide_hwif_t for the ATIIXP interface according to the
 *   capabilities of the hardware.
 */

static void __devinit init_hwif_atiixp(ide_hwif_t *hwif)
{
   if (!hwif->irq)
      hwif->irq = hwif->channel ? 15 : 14;

   hwif->autodma = 0;
   hwif->tuneproc = &atiixp_tuneproc;
   hwif->speedproc = &atiixp_speedproc;
   hwif->drives[0].autotune = 1;
   hwif->drives[1].autotune = 1;

   if (!hwif->dma_base)
   return;

   hwif->atapi_dma = 1;
   hwif->ultra_mask = 0x3f;
   hwif->mwdma_mask = 0x06;
   hwif->swdma_mask = 0x04;

   /* FIXME: proper cable detection needed */
   hwif->udma_four = 1;
   hwif->ide_dma_host_on = &atiixp_ide_dma_host_on;
   hwif->ide_dma_host_off = &atiixp_ide_dma_host_off;
   hwif->ide_dma_check = &atiixp_dma_check;
   if (!noautodma)
      hwif->autodma = 1;

   hwif->drives[1].autodma = hwif->autodma;
   hwif->drives[0].autodma = hwif->autodma;
}

static ide_pci_device_t atiixp_pci_info[] __devinitdata = {
   {   /* 0 */
      .vendor      = PCI_VENDOR_ID_ATI,
      .device      = PCI_DEVICE_ID_ATI_IXP_IDE,
      .name      = "ATIIXP",
      .init_chipset   = init_chipset_atiixp,
      .init_hwif   = init_hwif_atiixp,
      .channels   = 2,
      .autodma   = AUTODMA,
      .enablebits   = {{0x48,0x01,0x00}, {0x48,0x08,0x00}},
      .bootable   = ON_BOARD,
   }
};

/**
 *   atiixp_init_one   -   called when a ATIIXP is found
 *   @dev: the atiixp device
 *   @id: the matching pci id
 *
 *   Called when the PCI registration layer (or the IDE initialization)
 *   finds a device matching our IDE device tables.
 */

static int __devinit atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
   ide_pci_device_t *d = &atiixp_pci_info[id->driver_data];

   if (dev->device != d->device)
      BUG();
   ide_setup_pci_device(dev, d);
   return 0;
}

static struct pci_device_id atiixp_pci_tbl[] = {
   { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
   { 0, },
};

static struct pci_driver driver = {
   .name      = "ATIIXP IDE",
   .id_table   = atiixp_pci_tbl,
   .probe      = atiixp_init_one,
};

static int atiixp_ide_init(void)
{
   return ide_pci_register_driver(&driver);
}

module_init(atiixp_ide_init);

MODULE_AUTHOR("HUI YU");
MODULE_DESCRIPTION("PCI driver module for ATI IXP IDE");
MODULE_LICENSE("GPL");

EXPORT_NO_SYMBOLS;


Now do the following:

Code:
cd /usr/src/linux
make menuconfig


Go to ATI/IDE/MFM/RLL Support, then to IDE, ATA and ATAPI Block devices. Find ATI IXP chipset IDE support and make sure it's selected (has a "*" in front of it).

Now exit, and save the changes.

Rebuild your kernel:

Code:
make
make modules
make install
make modules_install
lilo


You might want to add an extra entry to /etc/lilo.conf, so you can always boot your old kernel. Just copy the Linux entry to a new name, and add ".old" after the kernel file.

Now reboot, et voila, you should be able to set your drive to UDMA mode!

You can check this by doing:

Code:
hdparm /dev/hda


You can set it (if it's not set already) by doing the following:

Code:
/sbin/hdparm -qd1 -c3 -u1 /dev/hda


If you want it automated, look at the file /etc/init.d/bootmisc.sh. The hdparm command was at the end of the file in my configuration.

I hope I've been of some help.

All the kernel changes, and sources, were extracted from the patches for making the 2.4.26 kernel, which I found here: http://www.funet.fi/pub/Linux/PEOPLE/Li ... ch-2.4.26/

I've only extracted the ATIIXP driver, since I didn't feel like upgrading everything.

Note: I'm not used to programming in linux, so everything here is hacked together from other sources. If I'm doing something stupid, or if there was a nicer way to do it, I'm sorry, it seemed to work for me ;-) I will accept no responsebility whatsoever, so use at your own risk.

Author:  Michel [ Fri Aug 13, 2004 4:43 pm ]
Post subject:  Onboard sound... probably not until kernel 2.6.5

Been trying to get the onboard sound of the Pundit-R going, but it seems that there is no support for it, until kernel 2.6.5:

http://www.linuxhq.com/kernel/v2.6/5/sound/pci/atiixp.c

The audiochip seems to be a AD1888 according to the documentation. But it's no ordinary AD1888 I think. Asus supplies linux drivers for the AD1888 (for a different board), but these don't work.

Especially seeing that a seperate driver for it is present in the 2.6.5 kernel, it leads me to believe that this is a somewhat different AD1888. Probably integrated somehow with the ATI stuff.

Backporting the driver from the 2.6.5 kernel seems a little out of my league on first sight, so I probably try to dig up an old SoundBlaster, and see if that works. Boy, do I hope that KnoppMyth R5 is coming out soon ;-)

Author:  cesman [ Fri Aug 13, 2004 4:49 pm ]
Post subject:  Re: Onboard sound... probably not until kernel 2.6.5

Michel wrote:
Boy, do I hope that KnoppMyth R5 is coming out soon ;-)
Me too... Cecil sure is taking his sweet time... :)

Author:  Michel [ Fri Aug 13, 2004 4:52 pm ]
Post subject:  Re: Onboard sound... probably not until kernel 2.6.5

B.t.w.: Probably not possible to beta test it anywhere right?

Author:  Michel [ Fri Aug 13, 2004 5:00 pm ]
Post subject:  Re: Onboard sound... probably not until kernel 2.6.5

cesman wrote:
Michel wrote:
Boy, do I hope that KnoppMyth R5 is coming out soon ;-)
Me too... Cecil sure is taking his sweet time... :)


Don't rush yourse... euhm... cecil ;-) He's doing a great job :-D

(on the other hand, maybe rush him a little :-P)

Author:  cesman [ Fri Aug 13, 2004 5:39 pm ]
Post subject: 

It will go into beta... I'll hopfully have time to install an alpha on my production systems this weekend. That does mean beta is around the corne however. I'll ask for folks to beta when the time is right...

Author:  Michel [ Sun Aug 15, 2004 1:02 pm ]
Post subject: 

Updated the first message in this thread:

- Used a soundblaster card to overcome the sound problem for now
- Trying to get a driver for my graphics card working in X, but failed so far
- Added a note about occasional crashes, probably related to a bad kernel(??)

Author:  Michel [ Wed Aug 18, 2004 6:44 am ]
Post subject: 

I've stopped putting more effort into this for release V4R4.1, and will be waiting for R5.

R5 will feature the 2.6 kernel, which probably solves a lot in respect to the driver issues. As soon as R5 is released, I will install it, and post my findings here.

Author:  UnderT [ Mon Nov 08, 2004 1:25 pm ]
Post subject:  3Com 3C920B ????

Hi there,

I'm from Belgium and I also bought an Asus Pundit -R.
I would like to install MythTV on it, so I downloaded KnoppMyth (R4 V5).

It all worked fine, but like you said there are problems ... .

I did all the things you have done to get the 3Com driver up and running, but the damned thing just does NOT want to work.

I made a patch file, but it did not work. Later, I tried to do it manually, but after the recompilation of the kernel I realised that this also didn't work :(

I'm getting quite hopeless at the moment, because I have been trying to get things going for a few weeks now. All with the same result, the damned 3Com card doesn't work ... :(

Please HELP !!

Author:  MrIch [ Thu Nov 18, 2004 1:47 am ]
Post subject: 

the following links could be usefull:
http://www.bluelightning.org/linux/st62k/
http://www.rage3d.com/board/showthread.php?t=33781391
http://www.rage3d.com/board/showthread.php?t=33766378

the tvout seems to work in a quite well quaity.

Is there any support for pundit-r on the next knoppmyth planed?

Author:  Xsecrets [ Thu Nov 18, 2004 9:26 am ]
Post subject: 

well the next version will be based on a 2.6 kernel, so will benefit from the updated drivers there. Not sure about the tvout stuff, but I believe the ati driver install script is going to be included, so that may provide some relief there. We do have a tester with a pundit-r, so some efforts will be made to have this system working. Just depends on what all is entailed.

Author:  MrIch [ Sun Dec 05, 2004 7:14 am ]
Post subject: 

Is there a release date...?

The latest version makes everything a bit diffucult, I would be happy to have dma and lan working out of the box...

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/