X-Git-Url: https://gerrit.fd.io/r/gitweb?p=deb_dpdk.git;a=blobdiff_plain;f=drivers%2Fbus%2Ffslmc%2Fmc%2Ffsl_mc_sys.h;h=d803205e521f56ccbbeb03583f75f396895c5047;hp=ebada60e1d340d29fdba09a763ec6587ce21f1dd;hb=055c52583a2794da8ba1e85a48cce3832372b12f;hpb=f239aed5e674965691846e8ce3f187dd47523689 diff --git a/drivers/bus/fslmc/mc/fsl_mc_sys.h b/drivers/bus/fslmc/mc/fsl_mc_sys.h index ebada60e..d803205e 100644 --- a/drivers/bus/fslmc/mc/fsl_mc_sys.h +++ b/drivers/bus/fslmc/mc/fsl_mc_sys.h @@ -5,6 +5,7 @@ * BSD LICENSE * * Copyright 2013-2015 Freescale Semiconductor Inc. + * Copyright 2017 NXP. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -65,40 +66,31 @@ struct fsl_mc_io { #include #include -#define cpu_to_le64(x) __cpu_to_le64(x) #ifndef dmb #define dmb() {__asm__ __volatile__("" : : : "memory"); } #endif -#define __iormb() dmb() -#define __iowmb() dmb() -#define __arch_getq(a) (*(volatile unsigned long *)(a)) -#define __arch_putq(v, a) (*(volatile unsigned long *)(a) = (v)) -#define __arch_putq32(v, a) (*(volatile unsigned int *)(a) = (v)) -#define readq(c) \ +#define __iormb() dmb() +#define __iowmb() dmb() +#define __arch_getq(a) (*(volatile uint64_t *)(a)) +#define __arch_putq(v, a) (*(volatile uint64_t *)(a) = (v)) +#define __arch_putq32(v, a) (*(volatile uint32_t *)(a) = (v)) +#define readq(c) \ ({ uint64_t __v = __arch_getq(c); __iormb(); __v; }) -#define writeq(v, c) \ +#define writeq(v, c) \ ({ uint64_t __v = v; __iowmb(); __arch_putq(__v, c); __v; }) #define writeq32(v, c) \ ({ uint32_t __v = v; __iowmb(); __arch_putq32(__v, c); __v; }) -#define ioread64(_p) readq(_p) -#define iowrite64(_v, _p) writeq(_v, _p) -#define iowrite32(_v, _p) writeq32(_v, _p) +#define ioread64(_p) readq(_p) +#define iowrite64(_v, _p) writeq(_v, _p) +#define iowrite32(_v, _p) writeq32(_v, _p) #define __iomem -struct fsl_mc_io { - void *regs; -}; - -#ifndef ENOTSUP -#define ENOTSUP 95 -#endif - /*GPP is supposed to use MC commands with low priority*/ #define CMD_PRI_LOW 0 /*!< Low Priority command indication */ -struct mc_command; - -int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd); +struct fsl_mc_io { + void *regs; +}; #endif /* __linux_driver__ */