richliu’s blog

Linux, 工作, 生活.

richliu’s blog header image 4

Linux kernel PCI Domains Support for ARM

December 17th, 2009 · No Comments

Linux kernel 支援不同 domain 的 PCI, 看起來是 ACPI 的功能之一.
其他平台看起來也有支援, 像是 sparc or mips 都有.
但是在 ARM 上並沒有這樣的支援
我的平台有 2 個 PCIe Host Controller , 而且都要設定在 PCIe bus 0 上面.
這時就拿 PCI domain 的 code 來用最快,
以下就是 Sample Code 和 ARM 部份的 Patch Code (不含我目前使用平台的 Patch)

Tags: arm, kernel, Linux, PCI

[Read more →]

Tags: 隨手札記

Linux kernel 2.6.24 Porting 雜記.

May 15th, 2008 · 5 Comments

最近將某個 Device Porting 從 2.6.16 Porting 上 2.6.24, 記錄一下碰到的問題.
1. Network Driver
當有這樣的訊息時
# ifconfig eth0 up
SIOCSIFFLAGS : invalid agument
我碰到的狀況是, MAC Address 必需要在 probe 時先行 initial 完成.
若是沒有完成, ifconfig 就會出現這樣的錯誤訊息, 原因仍然不明.
我的做法就是加一行
memcpy(dev->dev_addr , addr, 6); 這樣就可以了.
2.6.24 的 NAPI Interface 改過了, 上比對一下 2.6.23 和 2.6.24 的 Code 就可以知道改了什麼地方.
netif_poll_* 的 interface 改名了以外, NAPI hook 的 _poll function 在傳入參數和結構上有小小的修正
2.6.24 修改了 NAPI 的呼叫法, 對我這邊比較複雜的 [...]

[Read more →]

Tags: Linux