aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/ncsw
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2017-10-31 02:53:50 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2017-10-31 02:53:50 +0000
commita32b54357f2b915718c7d179537be19ea2ebd622 (patch)
tree517032c4bfe3fb3d9fcbba42f03ece366177cf84 /sys/contrib/ncsw
parent337698b78dc673c004b07527a39733f7bef53413 (diff)
downloadsrc-a32b54357f2b915718c7d179537be19ea2ebd622.tar.gz
src-a32b54357f2b915718c7d179537be19ea2ebd622.zip
Make DPAA work in 64-bit mode
Rework the dTSEC and FMan drivers to be more like a full bus relationship, so that dtsec can use bus_alloc_resource() instead of trying to handle the offset from the dts. This required taking some code from the sparc64 ebus driver to allow subdividing the fman region for the dTSEC devices.
Notes
Notes: svn path=/head/; revision=325204
Diffstat (limited to 'sys/contrib/ncsw')
-rw-r--r--sys/contrib/ncsw/Peripherals/FM/Port/fm_port.c2
-rw-r--r--sys/contrib/ncsw/Peripherals/QM/qm_portal_fqr.c6
-rw-r--r--sys/contrib/ncsw/etc/memcpy.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/contrib/ncsw/Peripherals/FM/Port/fm_port.c b/sys/contrib/ncsw/Peripherals/FM/Port/fm_port.c
index e277b4250689..79419eab453f 100644
--- a/sys/contrib/ncsw/Peripherals/FM/Port/fm_port.c
+++ b/sys/contrib/ncsw/Peripherals/FM/Port/fm_port.c
@@ -1996,7 +1996,7 @@ t_Error FmPortGetSetCcParams(t_Handle h_FmPort,
t_FmPortGetSetCcParams *p_CcParams)
{
t_FmPort *p_FmPort = (t_FmPort*)h_FmPort;
- int tmpInt;
+ uint32_t tmpInt;
volatile uint32_t *p_BmiPrsStartOffset = NULL;
/* this function called from Cc for pass and receive parameters port params between CC and PORT*/
diff --git a/sys/contrib/ncsw/Peripherals/QM/qm_portal_fqr.c b/sys/contrib/ncsw/Peripherals/QM/qm_portal_fqr.c
index f49c1f42258d..605d09aeb1aa 100644
--- a/sys/contrib/ncsw/Peripherals/QM/qm_portal_fqr.c
+++ b/sys/contrib/ncsw/Peripherals/QM/qm_portal_fqr.c
@@ -78,8 +78,7 @@ aligned_int_from_ptr(const void *p)
KASSERT(ctx >= VM_MIN_KERNEL_ADDRESS, ("%p is too low!\n", p));
ctx -= VM_MIN_KERNEL_ADDRESS;
KASSERT((ctx & 0x07) == 0, ("Pointer %p is not 8-byte aligned!\n", p));
- if ((ctx & (0x7)) != 0)
- return (0);
+
return (ctx >> 3);
}
@@ -88,7 +87,8 @@ ptr_from_aligned_int(uint32_t ctx)
{
uintptr_t p;
- p = VM_MIN_KERNEL_ADDRESS + (ctx << 3);
+ p = ctx;
+ p = VM_MIN_KERNEL_ADDRESS + (p << 3);
return ((void *)p);
}
diff --git a/sys/contrib/ncsw/etc/memcpy.c b/sys/contrib/ncsw/etc/memcpy.c
index fa203ec7cebf..8494440bd1c3 100644
--- a/sys/contrib/ncsw/etc/memcpy.c
+++ b/sys/contrib/ncsw/etc/memcpy.c
@@ -38,7 +38,7 @@
void * MemCpy8(void* pDst, void* pSrc, uint32_t size)
{
- int i;
+ uint32_t i;
for(i = 0; i < size; ++i)
*(((uint8_t*)(pDst)) + i) = *(((uint8_t*)(pSrc)) + i);
@@ -48,7 +48,7 @@ void * MemCpy8(void* pDst, void* pSrc, uint32_t size)
void * MemSet8(void* pDst, int c, uint32_t size)
{
- int i;
+ uint32_t i;
for(i = 0; i < size; ++i)
*(((uint8_t*)(pDst)) + i) = (uint8_t)(c);