X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fieee1394%2Fohci1394.h;h=fa05f113f7f046e1363c9c19b118276a261ec6d9;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=e2e6194c9728292d5065ca4fd37e71823293199c;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/ieee1394/ohci1394.h b/drivers/ieee1394/ohci1394.h index e2e6194c9..fa05f113f 100644 --- a/drivers/ieee1394/ohci1394.h +++ b/drivers/ieee1394/ohci1394.h @@ -163,7 +163,7 @@ struct ti_ohci { } init_state; /* remapped memory spaces */ - void *registers; + void __iomem *registers; /* dma buffer for self-id packets */ quadlet_t *selfid_buf_cpu; @@ -219,8 +219,8 @@ struct ti_ohci { int self_id_errors; - /* Tasklets for iso receive and transmit, used by video1394, - * amdtp and dv1394 */ + /* Tasklets for iso receive and transmit, used by video1394 + * and dv1394 */ struct list_head iso_tasklet_list; spinlock_t iso_tasklet_list_lock; @@ -236,6 +236,9 @@ struct ti_ohci { static inline int cross_bound(unsigned long addr, unsigned int size) { + if (size == 0) + return 0; + if (size > PAGE_SIZE) return 1; @@ -440,6 +443,16 @@ static inline u32 reg_read(const struct ti_ohci *ohci, int offset) #define OHCI1394_TCODE_PHY 0xE +/* Node offset map (phys DMA area, posted write area). + * The value of OHCI1394_PHYS_UPPER_BOUND_PROGRAMMED may be modified but must + * be lower than OHCI1394_MIDDLE_ADDRESS_SPACE. + * OHCI1394_PHYS_UPPER_BOUND_FIXED and OHCI1394_MIDDLE_ADDRESS_SPACE are + * constants given by the OHCI spec. + */ +#define OHCI1394_PHYS_UPPER_BOUND_FIXED 0x000100000000ULL /* 4 GB */ +#define OHCI1394_PHYS_UPPER_BOUND_PROGRAMMED 0x010000000000ULL /* 1 TB */ +#define OHCI1394_MIDDLE_ADDRESS_SPACE 0xffff00000000ULL + void ohci1394_init_iso_tasklet(struct ohci1394_iso_tasklet *tasklet, int type, void (*func)(unsigned long),