lkml.org 
[lkml]   [2004]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] add legacy I/O port & memory APIs to /proc/bus/pci
Date
On Thursday, December 16, 2004 10:45 am, David Mosberger wrote:
> >>>>> On Thu, 16 Dec 2004 08:50:19 -0800, Jesse Barnes
> >>>>> <jbarnes@engr.sgi.com> said:
>
> Jesse> +int ia64_pci_legacy_read(struct pci_dev *dev, u16 port, u32 *val,
> u8 size) Jesse> +{
> Jesse> + int ret = 0;
> Jesse> :
> Jesse> + case 1:
> Jesse> + addr = (unsigned long *)paddr;
> Jesse> + *val = (u8)(*(volatile u8 *)(addr));
> Jesse> + break;
> Jesse> + case 2:
> Jesse> + addr = (unsigned long *)paddr;
> Jesse> + *val = (u16)(*(volatile u16 *)(addr));
> Jesse> + break;
> Jesse> :
> Jesse> +}
>
> Jesse> +int ia64_pci_legacy_write(struct pci_dev *dev, u16 port, u32 val,
> u8 size) Jesse> +{
> Jesse> + switch (size) {
> Jesse> + case 1:
> Jesse> + addr = (unsigned long *)paddr;
> Jesse> + *(volatile u8 *)(addr) = (u8)(val);
> Jesse> + break;
> Jesse> + case 2:
> Jesse> + addr = (unsigned long *)paddr;
> Jesse> + *(volatile u16 *)(addr) = (u16)(val);
> Jesse> + break;
> Jesse> :
> Jesse> + }
>
> No offense, but what's up with this castamania?

Leftovers from other code. I don't actually use this stuff on sn2, someone
with a DIG test box will have to verify it (willy pointed out that I should
probably just be using the appropriate inX our outX routine here instead,
which makes sense).

Jesse
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.086 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site