Re: parisc debian kernel - missing modules for C8000 - linux-image-3.10-2-parisc64-smp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



02.09.2013, в 18:10, John David Anglin <dave.anglin@xxxxxxxx> написал(а):

> You don't think it ran briefly and crashed?
> 
> I have a thought.  The code that loads the microcode appears to be trying to load in 32-bit hunks.  Maybe
> we have a 64-bit path on the bus and we need to load the firmware in 64-bit words.
> 
> Dave
> --
> John David Anglin	dave.anglin@xxxxxxxx

Dave,

Am i understood you right?

--- r100.c.orig 2013-09-04 16:53:28.000000000 +0000
+++ r100.c      2013-09-04 18:28:23.000000000 +0000
@@ -1049,9 +1049,13 @@ static int r100_cp_init_microcode(struct
        return err;
 }
 
+#define RADEON_CP_ME_RAM_DATAHL 0x07dc0x07e0
+
+void r100_mm_wregq(struct radeon_device *rdev, uint64_t reg, uint64_t v,
+                  bool always_indirect);
 static void r100_cp_load_microcode(struct radeon_device *rdev)
 {
-       const __be32 *fw_data;
+       const __be64 *fw_data;
        int i, size;
 
        if (r100_gui_wait_for_idle(rdev)) {
@@ -1060,14 +1064,12 @@ static void r100_cp_load_microcode(struc
        }
 
        if (rdev->me_fw) {
-               size = rdev->me_fw->size / 4;
-               fw_data = (const __be32 *)&rdev->me_fw->data[0];
+               size = rdev->me_fw->size / 8;
+               fw_data = (const __be64 *)&rdev->me_fw->data[0];
                WREG32(RADEON_CP_ME_RAM_ADDR, 0);
-               for (i = 0; i < size; i += 2) {
-                       WREG32(RADEON_CP_ME_RAM_DATAH,
-                              be32_to_cpup(&fw_data[i]));
-                       WREG32(RADEON_CP_ME_RAM_DATAL,
-                              be32_to_cpup(&fw_data[i + 1]));
+               for (i = 0; i < size; i += 1) {
+                       r100_mm_wregq(rdev, RADEON_CP_ME_RAM_DATAHL,
+                               be64_to_cpup(&fw_data[i]), false);
                }
        }
 }
@@ -4078,6 +4080,21 @@ void r100_mm_wreg(struct radeon_device *
        }
 }
 
+void r100_mm_wregq(struct radeon_device *rdev, uint64_t reg, uint64_t v,
+                  bool always_indirect)
+{
+        if (reg < rdev->rmmio_size && !always_indirect)
+                writeq(v, ((void __iomem *)rdev->rmmio) + reg);
+        else {
+                unsigned long flags;
+
+                spin_lock_irqsave(&rdev->mmio_idx_lock, flags);
+                writeq(reg, ((void __iomem *)rdev->rmmio) + RADEON_MM_INDEX);
+                writeq(v, ((void __iomem *)rdev->rmmio) + RADEON_MM_DATA);
+                spin_unlock_irqrestore(&rdev->mmio_idx_lock, flags);
+        }
+}
+
 u32 r100_io_rreg(struct radeon_device *rdev, u32 reg)
 {
        if (reg < rdev->rio_mem_size)

I'm not sure if this correct, but it didn't help.--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux