search for: writel

Displaying 20 results from an estimated 292 matches for "writel".

Did you mean: write
2015 Jan 20
4
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...right IBM Corp. 2007 * * This work is licensed under the terms of the GNU GPL, version 2 or later. @@ -145,11 +115,16 @@ struct virtio_mmio_vq_info { static u64 vm_get_features(struct virtio_device *vdev) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); + u64 features; + + writel(1, vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES_SEL); + features = readl(vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES); + features <<= 32; - /* TODO: Features > 32 bits */ - writel(0, vm_dev->base + VIRTIO_MMIO_HOST_FEATURES_SEL); + writel(0, vm_dev->base + VIRTIO_MMIO_DEVICE_FEA...
2015 Jan 20
4
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...right IBM Corp. 2007 * * This work is licensed under the terms of the GNU GPL, version 2 or later. @@ -145,11 +115,16 @@ struct virtio_mmio_vq_info { static u64 vm_get_features(struct virtio_device *vdev) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); + u64 features; + + writel(1, vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES_SEL); + features = readl(vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES); + features <<= 32; - /* TODO: Features > 32 bits */ - writel(0, vm_dev->base + VIRTIO_MMIO_HOST_FEATURES_SEL); + writel(0, vm_dev->base + VIRTIO_MMIO_DEVICE_FEA...
2014 Dec 19
5
[RFC] virtio-mmio: Update the device to OASIS spec version
...right IBM Corp. 2007 * * This work is licensed under the terms of the GNU GPL, version 2 or later. @@ -145,11 +115,16 @@ struct virtio_mmio_vq_info { static u64 vm_get_features(struct virtio_device *vdev) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); + u64 features; + + writel(1, vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES_SEL); + features = readl(vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES); + features <<= 32; - /* TODO: Features > 32 bits */ - writel(0, vm_dev->base + VIRTIO_MMIO_HOST_FEATURES_SEL); + writel(0, vm_dev->base + VIRTIO_MMIO_DEVICE_FEA...
2014 Dec 19
5
[RFC] virtio-mmio: Update the device to OASIS spec version
...right IBM Corp. 2007 * * This work is licensed under the terms of the GNU GPL, version 2 or later. @@ -145,11 +115,16 @@ struct virtio_mmio_vq_info { static u64 vm_get_features(struct virtio_device *vdev) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); + u64 features; + + writel(1, vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES_SEL); + features = readl(vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES); + features <<= 32; - /* TODO: Features > 32 bits */ - writel(0, vm_dev->base + VIRTIO_MMIO_HOST_FEATURES_SEL); + writel(0, vm_dev->base + VIRTIO_MMIO_DEVICE_FEA...
2015 Jan 20
1
[PATCH] virtio-mmio: Update the device to OASIS spec version
...rk is licensed under the terms of the GNU GPL, version 2 or later. @@ -145,11 +115,16 @@ struct virtio_mmio_vq_info { static u64 vm_get_features(struct virtio_device *vdev) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); + u64 features; - /* TODO: Features > 32 bits */ - writel(0, vm_dev->base + VIRTIO_MMIO_HOST_FEATURES_SEL); + writel(1, vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES_SEL); + features = readl(vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES); + features <<= 32; - return readl(vm_dev->base + VIRTIO_MMIO_HOST_FEATURES); + writel(0, vm_dev->base...
2015 Jan 20
1
[PATCH] virtio-mmio: Update the device to OASIS spec version
...rk is licensed under the terms of the GNU GPL, version 2 or later. @@ -145,11 +115,16 @@ struct virtio_mmio_vq_info { static u64 vm_get_features(struct virtio_device *vdev) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); + u64 features; - /* TODO: Features > 32 bits */ - writel(0, vm_dev->base + VIRTIO_MMIO_HOST_FEATURES_SEL); + writel(1, vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES_SEL); + features = readl(vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES); + features <<= 32; - return readl(vm_dev->base + VIRTIO_MMIO_HOST_FEATURES); + writel(0, vm_dev->base...
2015 Jan 20
0
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...ork is licensed under the terms of the GNU GPL, version 2 or later. > @@ -145,11 +115,16 @@ struct virtio_mmio_vq_info { > static u64 vm_get_features(struct virtio_device *vdev) > { > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > + u64 features; > + > + writel(1, vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES_SEL); > + features = readl(vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES); > + features <<= 32; > > - /* TODO: Features > 32 bits */ > - writel(0, vm_dev->base + VIRTIO_MMIO_HOST_FEATURES_SEL); > + writel(0, vm_dev-&gt...
2015 Jan 20
0
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
...ork is licensed under the terms of the GNU GPL, version 2 or later. > @@ -145,11 +115,16 @@ struct virtio_mmio_vq_info { > static u64 vm_get_features(struct virtio_device *vdev) > { > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > + u64 features; > + > + writel(1, vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES_SEL); > + features = readl(vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES); > + features <<= 32; > > - /* TODO: Features > 32 bits */ > - writel(0, vm_dev->base + VIRTIO_MMIO_HOST_FEATURES_SEL); > + writel(0, vm_dev-&gt...
2015 Jan 15
0
[RFC] virtio-mmio: Update the device to OASIS spec version
...ork is licensed under the terms of the GNU GPL, version 2 or later. > @@ -145,11 +115,16 @@ struct virtio_mmio_vq_info { > static u64 vm_get_features(struct virtio_device *vdev) > { > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > + u64 features; > + > + writel(1, vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES_SEL); > + features = readl(vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES); > + features <<= 32; > > - /* TODO: Features > 32 bits */ > - writel(0, vm_dev->base + VIRTIO_MMIO_HOST_FEATURES_SEL); > + writel(0, vm_dev-&gt...
2015 Jan 15
0
[RFC] virtio-mmio: Update the device to OASIS spec version
...ork is licensed under the terms of the GNU GPL, version 2 or later. > @@ -145,11 +115,16 @@ struct virtio_mmio_vq_info { > static u64 vm_get_features(struct virtio_device *vdev) > { > struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); > + u64 features; > + > + writel(1, vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES_SEL); > + features = readl(vm_dev->base + VIRTIO_MMIO_DEVICE_FEATURES); > + features <<= 32; > > - /* TODO: Features > 32 bits */ > - writel(0, vm_dev->base + VIRTIO_MMIO_HOST_FEATURES_SEL); > + writel(0, vm_dev-&gt...
2015 Apr 28
0
[PATCH v2] virtio-mmio: Update the device to OASIS spec version
Hi, On 01/20/2015 01:12 PM, Pawel Moll wrote: > @@ -356,13 +346,6 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, > info->num /= 2; > } > > - /* Activate the queue */ > - writel(info->num, vm_dev->base + VIRTIO_MMIO_QUEUE_NUM); > - writel(VIRTIO_MMIO_VRING_ALIGN, > - vm_dev->base + VIRTIO_MMIO_QUEUE_ALIGN); > - writel(virt_to_phys(info->queue) >> PAGE_SHIFT, > - vm_dev->base + VIRTIO_MMIO_QUEUE_PFN); > - > /* Create the vring */...
2005 Aug 09
1
RE: Compiling legacy LSI megaraid drivers (Linux 2.6.11)with xen 2.0.7?
...gt; > 2. cd .. > > 3. make kernels > > At some point....I get the following warnings during compilation: > > CC drivers/scsi/megaraid.o > drivers/scsi/megaraid.c: In function `issue_scb'': > drivers/scsi/megaraid.c:1132: warning: passing arg 2 of > `writel'' makes pointer from integer without a cast > drivers/scsi/megaraid.c: In function `issue_scb_block'': > drivers/scsi/megaraid.c:1195: warning: passing arg 2 of > `writel'' makes pointer from integer without a cast > drivers/scsi/megaraid.c:1208: warning: passin...
2015 Jan 15
3
[RFC] virtio-mmio: Update the device to OASIS spec version
On Thu, 2015-01-15 at 16:51 +0000, Michael S. Tsirkin wrote: > > + uint64_t addr = virt_to_phys(info->queue); > > Kernel normally uses u64 for this type. Sure, well spotted. > > + > > + writel(addr & 0xffffffff, > > + vm_dev->base + VIRTIO_MMIO_QUEUE_DESC_LOW); > > + writel((addr >> 32) & 0xffffffff, > > + vm_dev->base + VIRTIO_MMIO_QUEUE_DESC_HIGH); > > + > > +...
2015 Jan 15
3
[RFC] virtio-mmio: Update the device to OASIS spec version
On Thu, 2015-01-15 at 16:51 +0000, Michael S. Tsirkin wrote: > > + uint64_t addr = virt_to_phys(info->queue); > > Kernel normally uses u64 for this type. Sure, well spotted. > > + > > + writel(addr & 0xffffffff, > > + vm_dev->base + VIRTIO_MMIO_QUEUE_DESC_LOW); > > + writel((addr >> 32) & 0xffffffff, > > + vm_dev->base + VIRTIO_MMIO_QUEUE_DESC_HIGH); > > + > > +...
2016 Aug 26
0
[PATCH v8 01/18] remoteproc: st_slim_rproc: add a slimcore rproc driver
...unsigned long hw_id, hw_ver, fw_rev; + u32 val; + int ret; + + ret = slim_clk_enable(slim_rproc); + if (ret) { + dev_err(dev, "Failed to enable clocks\n"); + return ret; + } + + /* disable CPU pipeline clock & reset cpu pipeline */ + val = SLIM_CLK_GATE_DIS | SLIM_CLK_GATE_RESET; + writel(val, slim_rproc->slimcore + SLIM_CLK_GATE_OFST); + + /* disable SLIM core STBus sync */ + writel(SLIM_STBUS_SYNC_DIS, slim_rproc->peri + SLIM_STBUS_SYNC_OFST); + + /* enable cpu pipeline clock */ + writel(!SLIM_CLK_GATE_DIS, + slim_rproc->slimcore + SLIM_CLK_GATE_OFST); + + /* clear int &...
2016 Aug 30
4
[PATCH v8 01/18] remoteproc: st_slim_rproc: add a slimcore rproc driver
...pipeline */ Be consistent. Is it 'cpu' or 'CPU'. Personally I find using 'correct English' to be the most consistent way of formatting comments i.e. Capitals for names, acronyms and at the start of a sentence. > + val = SLIM_CLK_GATE_DIS | SLIM_CLK_GATE_RESET; > + writel(val, slim_rproc->slimcore + SLIM_CLK_GATE_OFST); > + > + /* disable SLIM core STBus sync */ > + writel(SLIM_STBUS_SYNC_DIS, slim_rproc->peri + SLIM_STBUS_SYNC_OFST); > + > + /* enable cpu pipeline clock */ > + writel(!SLIM_CLK_GATE_DIS, > + slim_rproc->slimcore + SLIM...
2016 Aug 30
4
[PATCH v8 01/18] remoteproc: st_slim_rproc: add a slimcore rproc driver
...pipeline */ Be consistent. Is it 'cpu' or 'CPU'. Personally I find using 'correct English' to be the most consistent way of formatting comments i.e. Capitals for names, acronyms and at the start of a sentence. > + val = SLIM_CLK_GATE_DIS | SLIM_CLK_GATE_RESET; > + writel(val, slim_rproc->slimcore + SLIM_CLK_GATE_OFST); > + > + /* disable SLIM core STBus sync */ > + writel(SLIM_STBUS_SYNC_DIS, slim_rproc->peri + SLIM_STBUS_SYNC_OFST); > + > + /* enable cpu pipeline clock */ > + writel(!SLIM_CLK_GATE_DIS, > + slim_rproc->slimcore + SLIM...
2015 Mar 05
3
[PATCH] virtio_mmio: fix endian-ness for mmio
...writeb(ptr[i], base + offset + i); + + return; + } + + switch (len) { + case 1: + memcpy(&b, buf, sizeof b); + writeb(b, base + offset); + break; + case 2: + memcpy(&w, buf, sizeof w); + writew(le16_to_cpu(w), base + offset); + break; + case 4: + memcpy(&l, buf, sizeof l); + writel(le32_to_cpu(l), base + offset); + break; + case 8: + memcpy(&l, buf, sizeof l); + writel(le32_to_cpu(l), base + offset); + memcpy(&l, buf + sizeof l, sizeof l); + writel(le32_to_cpu(l), base + offset + sizeof l); + break; + default: + BUG(); + } } static u8 vm_get_status(struct v...
2015 Mar 05
3
[PATCH] virtio_mmio: fix endian-ness for mmio
...writeb(ptr[i], base + offset + i); + + return; + } + + switch (len) { + case 1: + memcpy(&b, buf, sizeof b); + writeb(b, base + offset); + break; + case 2: + memcpy(&w, buf, sizeof w); + writew(le16_to_cpu(w), base + offset); + break; + case 4: + memcpy(&l, buf, sizeof l); + writel(le32_to_cpu(l), base + offset); + break; + case 8: + memcpy(&l, buf, sizeof l); + writel(le32_to_cpu(l), base + offset); + memcpy(&l, buf + sizeof l, sizeof l); + writel(le32_to_cpu(l), base + offset + sizeof l); + break; + default: + BUG(); + } } static u8 vm_get_status(struct v...
2016 Aug 30
0
[PATCH v8 01/18] remoteproc: st_slim_rproc: add a slimcore rproc driver
...9;. Personally I find using > 'correct English' to be the most consistent way of formatting > comments i.e. Capitals for names, acronyms and at the start of a > sentence. OK will update to CPU for both. > > > + val = SLIM_CLK_GATE_DIS | SLIM_CLK_GATE_RESET; > > + writel(val, slim_rproc->slimcore + SLIM_CLK_GATE_OFST); > > + > > + /* disable SLIM core STBus sync */ > > + writel(SLIM_STBUS_SYNC_DIS, slim_rproc->peri + SLIM_STBUS_SYNC_OFST); > > + > > + /* enable cpu pipeline clock */ > > + writel(!SLIM_CLK_GATE_DIS, > &gt...