On Fri, Feb 11, 2011 at 01:18:03PM -0800, Stefan Reinauer wrote:
add support for OXPCIe 952 card and clean up debug
Signed-off-by: Stefan Reinauer <reinauer(a)google.com>
Thanks. See comments below.
+#define OXPCIE_COM1 (oxpcie_bar + 0x1000)
+u32 oxpcie_bar VAR16VISIBLE;
I don't think it's a good idea to have an all caps define that
references a variable.
+ oxpcie_bar = pci_config_readl(oxpcie_bdf,
+// Write a character to the serial port.
+ if (!CONFIG_DEBUG_SERIAL_OXFORD)
+ if (!oxpcie_bar)
+ int timeout = DEBUG_TIMEOUT;
+ while ((readb((void *)OXPCIE_COM1+SEROFF_LSR) & 0x60) != 0x60)
I'm not sure how this will work. The bar is likely to be in high
memory, yet this code can be run from 16bit mode.
There is now pci_readl/pci_writel for trampolining into 32bit mode to
read/write BARs. Would you want to trampoline to 32bit mode for a
debug device though?
The rest of the patch looks okay to me.